sample project

This commit is contained in:
Phuoc Nguyen
2025-11-28 15:01:51 +07:00
parent ed6cc4cebc
commit 440b474504
11 changed files with 1071 additions and 343 deletions

View File

@@ -320,6 +320,24 @@ class ApiConstants {
/// Form-data: { "fid": "file_id", "dt": "Architectural Project", "dn": "project_name" }
static const String removeProjectFile = '/frappe.desk.form.utils.remove_attach';
// ============================================================================
// Sample Project / Model House Endpoints (Frappe ERPNext)
// ============================================================================
/// Get list of sample/model house projects (requires sid and csrf_token)
/// POST /api/method/building_material.building_material.api.sample_project.get_list
/// Body: { "limit_start": 0, "limit_page_length": 0 }
/// Returns: { "message": [{ "name": "...", "project_name": "...", "notes": "...", "link": "...", "thumbnail": "..." }] }
static const String getSampleProjectList =
'/building_material.building_material.api.sample_project.get_list';
/// Get detail of a sample/model house project (requires sid and csrf_token)
/// POST /api/method/building_material.building_material.api.sample_project.get_detail
/// Body: { "name": "PROJ-0001" }
/// Returns: { "message": { "name": "...", "project_name": "...", "notes": "...", "link": "...", "thumbnail": "...", "files_list": [...] } }
static const String getSampleProjectDetail =
'/building_material.building_material.api.sample_project.get_detail';
/// Create new project (legacy endpoint - may be deprecated)
/// POST /projects
static const String createProject = '/projects';