{"openapi":"3.1.0","info":{"title":"Rudus API","version":"0.1.0"},"paths":{"/api/v1/projects/{project_id}/exports/annotated-pdf":{"post":{"tags":["annotated-pdf-exports"],"summary":"Create Annotated Pdf Export","operationId":"create_annotated_pdf_export_api_v1_projects__project_id__exports_annotated_pdf_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotatedPdfExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotatedPdfExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotated-pdf-exports/{export_id}":{"get":{"tags":["annotated-pdf-exports"],"summary":"Get Annotated Pdf Export","operationId":"get_annotated_pdf_export_api_v1_annotated_pdf_exports__export_id__get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotatedPdfExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotated-pdf-exports/{export_id}/download-url":{"get":{"tags":["annotated-pdf-exports"],"summary":"Get Annotated Pdf Export Download Url","operationId":"get_annotated_pdf_export_download_url_api_v1_annotated_pdf_exports__export_id__download_url_get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotatedPdfExportDownloadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/revision-diff-exports":{"post":{"tags":["revision-diff-exports"],"summary":"Create Revision Diff Export","operationId":"create_revision_diff_export_api_v1_projects__project_id__revision_diff_exports_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRevisionDiffExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revision-diff-exports/{export_id}":{"get":{"tags":["revision-diff-exports"],"summary":"Get Revision Diff Export","operationId":"get_revision_diff_export_api_v1_revision_diff_exports__export_id__get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revision-diff-exports/{export_id}/download-url":{"get":{"tags":["revision-diff-exports"],"summary":"Get Revision Diff Export Download Url","operationId":"get_revision_diff_export_download_url_api_v1_revision_diff_exports__export_id__download_url_get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffExportDownloadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/revision-diff-exports/upload-targets":{"post":{"tags":["revision-diff-exports"],"summary":"Create Revision Diff Export Upload Targets","description":"Mint prefix-scoped staging URLs without writing rows.\n\nA client that abandons the later create can leave an orphan under the export-id\nprefix; cleanup is deliberately deferred with the existing abandoned-draft posture.","operationId":"create_revision_diff_export_upload_targets_api_v1_projects__project_id__revision_diff_exports_upload_targets_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffUploadTargetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffUploadTargetsResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/annotations":{"get":{"tags":["annotations"],"summary":"List Annotations","operationId":"list_annotations_api_v1_projects__project_id__annotations_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"page_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["note","text","callout","line","polyline","rect","ellipse","polygon","ink","highlight","stamp"],"type":"string"}},{"type":"null"}],"title":"Kind"}},{"name":"display_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Display Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["accepted","rejected","completed","cancelled","none"],"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"author_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"}},{"name":"author_kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["user","agent","imported"],"type":"string"},{"type":"null"}],"title":"Author Kind"}},{"name":"visibility","in":"query","required":false,"schema":{"anyOf":[{"enum":["private","project"],"type":"string"},{"type":"null"}],"title":"Visibility"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"linked_condition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Linked Condition Id"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["created_at","updated_at","page","status","subject","author","display_kind","comments","color"],"type":"string","default":"created_at","title":"Sort"}},{"name":"direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Direction"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["annotations"],"summary":"Create Annotation","operationId":"create_annotation_api_v1_projects__project_id__annotations_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/annotations/link-counts":{"get":{"tags":["annotations"],"summary":"Annotation Link Counts","operationId":"annotation_link_counts_api_v1_projects__project_id__annotations_link_counts_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkCounts"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/annotations/summary":{"get":{"tags":["annotations"],"summary":"Annotation Summary","operationId":"annotation_summary_api_v1_projects__project_id__annotations_summary_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Format"}},{"name":"page_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["note","text","callout","line","polyline","rect","ellipse","polygon","ink","highlight","stamp"],"type":"string"}},{"type":"null"}],"title":"Kind"}},{"name":"display_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Display Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["accepted","rejected","completed","cancelled","none"],"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"author_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"}},{"name":"author_kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["user","agent","imported"],"type":"string"},{"type":"null"}],"title":"Author Kind"}},{"name":"visibility","in":"query","required":false,"schema":{"anyOf":[{"enum":["private","project"],"type":"string"},{"type":"null"}],"title":"Visibility"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"linked_condition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Linked Condition Id"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["created_at","updated_at","page","status","subject","author","display_kind","comments","color"],"type":"string","default":"created_at","title":"Sort"}},{"name":"direction","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/annotations/batch":{"post":{"tags":["annotations"],"summary":"Batch Create Annotations","operationId":"batch_create_annotations_api_v1_projects__project_id__annotations_batch_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateAnnotationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateAnnotationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/status-bulk":{"post":{"tags":["annotations"],"summary":"Set Annotation Status Bulk","operationId":"set_annotation_status_bulk_api_v1_annotations_status_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStatusResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/annotations/{annotation_id}":{"get":{"tags":["annotations"],"summary":"Get Annotation","operationId":"get_annotation_api_v1_annotations__annotation_id__get","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationDetailResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["annotations"],"summary":"Update Annotation","operationId":"update_annotation_api_v1_annotations__annotation_id__patch","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnnotationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["annotations"],"summary":"Delete Annotation","operationId":"delete_annotation_api_v1_annotations__annotation_id__delete","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}},{"name":"row_version","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"Row Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/{annotation_id}/attachments":{"post":{"tags":["annotations"],"summary":"Create Annotation Attachment","operationId":"create_annotation_attachment_api_v1_annotations__annotation_id__attachments_post","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttachmentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttachmentResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/{annotation_id}/links":{"post":{"tags":["annotations"],"summary":"Create Annotation Link","operationId":"create_annotation_link_api_v1_annotations__annotation_id__links_post","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotationLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotation-links/{link_id}":{"delete":{"tags":["annotations"],"summary":"Delete Annotation Link","operationId":"delete_annotation_link_api_v1_annotation_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotation-attachments/{attachment_id}/confirm":{"post":{"tags":["annotations"],"summary":"Confirm Annotation Attachment","operationId":"confirm_annotation_attachment_api_v1_annotation_attachments__attachment_id__confirm_post","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotation-attachments/{attachment_id}":{"delete":{"tags":["annotations"],"summary":"Delete Annotation Attachment","operationId":"delete_annotation_attachment_api_v1_annotation_attachments__attachment_id__delete","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotation-attachments/{attachment_id}/download-url":{"get":{"tags":["annotations"],"summary":"Download Annotation Attachment Url","operationId":"download_annotation_attachment_url_api_v1_annotation_attachments__attachment_id__download_url_get","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedDownloadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/{annotation_id}/replies":{"post":{"tags":["annotations"],"summary":"Create Annotation Reply","operationId":"create_annotation_reply_api_v1_annotations__annotation_id__replies_post","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotationReplyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotation-replies/{reply_id}":{"patch":{"tags":["annotations"],"summary":"Update Annotation Reply","operationId":"update_annotation_reply_api_v1_annotation_replies__reply_id__patch","parameters":[{"name":"reply_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reply Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnnotationReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["annotations"],"summary":"Delete Annotation Reply","operationId":"delete_annotation_reply_api_v1_annotation_replies__reply_id__delete","parameters":[{"name":"reply_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reply Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyWriteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/{annotation_id}/status":{"post":{"tags":["annotations"],"summary":"Set Annotation Status","operationId":"set_annotation_status_api_v1_annotations__annotation_id__status_post","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAnnotationStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/annotations/{annotation_id}/restore":{"post":{"tags":["annotations"],"summary":"Restore Annotation","operationId":"restore_annotation_api_v1_annotations__annotation_id__restore_post","parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Annotation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/health/ready":{"get":{"summary":"Health Ready","description":"Readiness: one cheap DB round-trip (ADR-0107 monitoring).\n\n/health stays liveness-only on purpose — see module docstring. The 2s\ntimeout keeps a hung database from hanging the probe itself.","operationId":"health_ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessResponse"}}}}}}},"/api/v1/orgs/{org_id}/invites":{"post":{"tags":["org-invites"],"summary":"Create Org Invite","operationId":"create_org_invite_api_v1_orgs__org_id__invites_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInviteCreated"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"get":{"tags":["org-invites"],"summary":"Get Org Invites","operationId":"get_org_invites_api_v1_orgs__org_id__invites_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInviteList"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/orgs/{org_id}/invites/{invite_id}/resend":{"post":{"tags":["org-invites"],"summary":"Resend Org Invite","operationId":"resend_org_invite_api_v1_orgs__org_id__invites__invite_id__resend_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInviteCreated"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["org-invites"],"summary":"Revoke Org Invite","operationId":"revoke_org_invite_api_v1_orgs__org_id__invites__invite_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/invites/preview":{"get":{"tags":["org-invites"],"summary":"Preview Invite","description":"One preview for both invite kinds, discriminated by `kind` (spec §9).\n\nProject invites resolve first because the resolver asks an explicit question;\ntrying the org path and catching its NotFoundError would swallow a genuine miss\non the project side.","operationId":"preview_invite_api_v1_invites_preview_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePreview"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/invites/accept":{"post":{"tags":["org-invites"],"summary":"Accept Invite","operationId":"accept_invite_api_v1_invites_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAccepted"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/orgs":{"post":{"tags":["orgs"],"summary":"Create Org","operationId":"create_org_api_v1_orgs_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/orgs/me":{"get":{"tags":["orgs"],"summary":"Get My Org","operationId":"get_my_org_api_v1_orgs_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWithMembers"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/orgs/{org_id}":{"patch":{"tags":["orgs"],"summary":"Rename Org","operationId":"rename_org_api_v1_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/orgs/{org_id}/members/{user_id}":{"patch":{"tags":["orgs"],"summary":"Change Member Role","operationId":"change_member_role_api_v1_orgs__org_id__members__user_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMember"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["orgs"],"summary":"Remove Member","operationId":"remove_member_api_v1_orgs__org_id__members__user_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/orgs/{org_id}/billing":{"get":{"tags":["billing"],"summary":"Get Billing","operationId":"get_billing_api_v1_orgs__org_id__billing_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BillingNotConfigured"},{"$ref":"#/components/schemas/BillingUnlinked"},{"$ref":"#/components/schemas/BillingNoSubscription"},{"$ref":"#/components/schemas/BillingSubscribed"},{"$ref":"#/components/schemas/BillingNeedsAttention"},{"$ref":"#/components/schemas/BillingUnavailable"}],"discriminator":{"propertyName":"state","mapping":{"not_configured":"#/components/schemas/BillingNotConfigured","unlinked":"#/components/schemas/BillingUnlinked","no_subscription":"#/components/schemas/BillingNoSubscription","subscribed":"#/components/schemas/BillingSubscribed","needs_attention":"#/components/schemas/BillingNeedsAttention","unavailable":"#/components/schemas/BillingUnavailable"}},"title":"Response Get Billing Api V1 Orgs  Org Id  Billing Get"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/profiles/me":{"put":{"tags":["profiles"],"summary":"Set My Display Name","operationId":"set_my_display_name_api_v1_profiles_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDisplayNameRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/projects":{"get":{"tags":["projects"],"summary":"List Projects","operationId":"list_projects_api_v1_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["projects"],"summary":"Create Project","operationId":"create_project_api_v1_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","operationId":"get_project_api_v1_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["projects"],"summary":"Update Project","operationId":"update_project_api_v1_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["projects"],"summary":"Delete Project","operationId":"delete_project_api_v1_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/invites":{"post":{"tags":["project-invites"],"summary":"Create Project Invite","operationId":"create_project_invite_api_v1_projects__project_id__invites_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectInviteCreated"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"get":{"tags":["project-invites"],"summary":"Get Project Invites","operationId":"get_project_invites_api_v1_projects__project_id__invites_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectInviteList"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/invites/{invite_id}/resend":{"post":{"tags":["project-invites"],"summary":"Resend Project Invite","operationId":"resend_project_invite_api_v1_projects__project_id__invites__invite_id__resend_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectInviteCreated"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/invites/{invite_id}":{"delete":{"tags":["project-invites"],"summary":"Revoke Project Invite","operationId":"revoke_project_invite_api_v1_projects__project_id__invites__invite_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/grants":{"get":{"tags":["project-sharing"],"summary":"Get Project Sharing","operationId":"get_project_sharing_api_v1_projects__project_id__grants_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSharing"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["project-sharing"],"summary":"Create Project Grant","operationId":"create_project_grant_api_v1_projects__project_id__grants_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectGrantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSharing"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/visibility":{"put":{"tags":["project-sharing"],"summary":"Set Project Visibility","operationId":"set_project_visibility_api_v1_projects__project_id__visibility_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSharing"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/grants/{user_id}":{"delete":{"tags":["project-sharing"],"summary":"Delete Project Grant","operationId":"delete_project_grant_api_v1_projects__project_id__grants__user_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/drawings":{"get":{"tags":["drawings"],"summary":"List Drawings","description":"Workspace inventory, including draft drawings for wizard ingest polling.\n\nNormal workspace display is membership-driven and filters draft pages.","operationId":"list_drawings_api_v1_projects__project_id__drawings_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawingListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["drawings"],"summary":"Create Drawing","operationId":"create_drawing_api_v1_projects__project_id__drawings_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDrawingRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Drawing"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}":{"get":{"tags":["drawings"],"summary":"Get Drawing","operationId":"get_drawing_api_v1_drawings__drawing_id__get","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawingDetail"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["drawings"],"summary":"Delete Drawing","operationId":"delete_drawing_api_v1_drawings__drawing_id__delete","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}/upload":{"post":{"tags":["drawings"],"summary":"Upload Drawing","description":"Mint a signed PUT URL for direct-to-Storage uploads.\n\nThe browser uploads the PDF body directly to Supabase Storage. The\nAPI never sees the bytes. After the upload completes, the frontend\ncalls `/ingest` to start parsing.","operationId":"upload_drawing_api_v1_drawings__drawing_id__upload_post","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUploadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}/download-url":{"get":{"tags":["drawings"],"summary":"Download Drawing Url","description":"Mint a signed GET URL for rendering the source PDF.\n\nUser-scoped connection; RLS is the safety net per ADR-0015.\nReuses get_drawing_storage_path (the same ownership check as /upload).\nPer docs/superpowers/specs/2026-05-06-ingestion-design.md §2.1.","operationId":"download_drawing_url_api_v1_drawings__drawing_id__download_url_get","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedDownloadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}/preview-urls":{"get":{"tags":["drawings"],"summary":"Drawing Preview Urls","description":"Batch-mint signed preview URLs, keyed by page_number (cold-open\nPhase 1). Misses are per-item null — the client falls back to today's\npath (fail-open); the API never proxies bytes.","operationId":"drawing_preview_urls_api_v1_drawings__drawing_id__preview_urls_get","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":"Response Drawing Preview Urls Api V1 Drawings  Drawing Id  Preview Urls Get"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}/ingest":{"post":{"tags":["drawings"],"summary":"Ingest Drawing","description":"Idempotent ingest enqueue, plus the RUD-152 stale-retry mode.\n\nPlain POST: unchanged — the partial unique index on\n`pdf_extractions(drawing_id) WHERE status IN ('pending','running')`\nmakes it atomically idempotent (design spec §3.4).\n`?retry_stale=true`: re-arm a STALE in-flight run in place and resend\nits message; non-stale/terminal rows no-op. Never inserts a fresh row\nwhile any extraction row exists. Uses the unscoped (service-role)\nconnection because pgmq writes are infrastructure work; ownership is\nverified manually inside the repo functions.","operationId":"ingest_drawing_api_v1_drawings__drawing_id__ingest_post","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}},{"name":"retry_stale","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Retry Stale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/drawings/{drawing_id}/pages":{"get":{"tags":["drawings"],"summary":"List Drawing Pages","operationId":"list_drawing_pages_api_v1_drawings__drawing_id__pages_get","parameters":[{"name":"drawing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drawing Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}":{"get":{"tags":["pages"],"summary":"Get Page","operationId":"get_page_api_v1_pages__page_id__get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDetail"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["pages"],"summary":"Update Page","description":"Merge-update a page's sheet_number / sheet_title (e.g. user rename).\n\nOnly the fields present in the PATCH body are written, each stamped\nsource='user' so a later Step-3 auto re-run won't overwrite the edit.","operationId":"update_page_api_v1_pages__page_id__patch","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDetail"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/text-elements":{"get":{"tags":["pages"],"summary":"List Text Elements","operationId":"list_text_elements_api_v1_pages__page_id__text_elements_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"bbox_x_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bbox X Min"}},{"name":"bbox_x_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bbox X Max"}},{"name":"bbox_y_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bbox Y Min"}},{"name":"bbox_y_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Bbox Y Max"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextElementListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/line-segments":{"get":{"tags":["pages"],"summary":"List Line Segments","description":"Candidate line segments for takeoff autocomplete.\n\nAbsence of geometry (raster sheet, pre-geometry ingest, storage\nhiccup) is a normal state, not an error: the response is an empty\nlist and the frontend simply shows no ghosts. Spec\n2026-07-02-line-autocomplete-design.md §4.","operationId":"list_line_segments_api_v1_pages__page_id__line_segments_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineSegmentListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/calibration":{"patch":{"tags":["pages"],"summary":"Update Calibration","description":"Set or update a page's calibration; recompute affected measurements.\n\nAtomic: writes scale_ratio + calibration columns and recomputes every\nlinear/area measurement on the page in a single transaction. Returns\nthe updated page detail and the count of recomputed measurements.\n\n`accepted_suggestion` marks the write as an accepted detector read, the\nonly thing that tells it apart from hand calibration; it is rejected 422\n`page_calibration_reduced_print_needs_confirmation` on a reduced print\nunless `confirm_reduced_print` overrides (RUD-482, ADR-0152).\n\nPer docs/superpowers/specs/2026-05-07-calibration-design.md §4.1, §4.3.","operationId":"update_calibration_api_v1_pages__page_id__calibration_patch","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageCalibrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageCalibrationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["pages"],"summary":"Clear Calibration","description":"Return a page to the uncalibrated state.\n\nRejected 422 `page_calibration_clear_would_orphan_measurements` if live\npage-scale measurements of any geometry kind exist — counts included,\nADR-0207 — and no on_orphan was supplied;\non_orphan=delete soft-deletes them in the same transaction. No\nrecompute. Idempotent on a fully-uncalibrated page.\n\nPer docs/superpowers/specs/2026-07-17-rud146-clear-calibration-design.md §2.","operationId":"clear_calibration_api_v1_pages__page_id__calibration_delete","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"revision_set_id","in":"query","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},{"name":"on_orphan","in":"query","required":false,"schema":{"anyOf":[{"const":"delete","type":"string"},{"type":"null"}],"title":"On Orphan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearPageCalibrationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/revisions":{"get":{"tags":["revisions"],"summary":"List Revisions","operationId":"list_revisions_api_v1_projects__project_id__revisions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["revisions"],"summary":"Create Revision Draft","operationId":"create_revision_draft_api_v1_projects__project_id__revisions_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRevisionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDraft"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/revision-diff":{"get":{"tags":["revisions"],"summary":"Get Revision Diff","operationId":"get_revision_diff_api_v1_projects__project_id__revision_diff_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"To"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDiffResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/sheet-organization":{"put":{"tags":["revisions"],"summary":"Save Sheet Organization","operationId":"save_sheet_organization_api_v1_projects__project_id__sheet_organization_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSheetOrganizationRequest"}}}},"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/matching":{"get":{"tags":["revisions"],"summary":"Get Revision Matching","operationId":"get_revision_matching_api_v1_revisions__revision_id__matching_get","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchingDraftResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"put":{"tags":["revisions"],"summary":"Save Revision Matching","operationId":"save_revision_matching_api_v1_revisions__revision_id__matching_put","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMatchingPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDraft"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/adopt":{"post":{"tags":["revisions"],"summary":"Adopt Revision","operationId":"adopt_revision_api_v1_revisions__revision_id__adopt_post","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptRevisionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDraft"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/sheets":{"get":{"tags":["revisions"],"summary":"List Revision Sheets","operationId":"list_revision_sheets_api_v1_revisions__revision_id__sheets_get","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionSheetListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/delete-impact":{"get":{"tags":["revisions"],"summary":"Get Revision Delete Impact","operationId":"get_revision_delete_impact_api_v1_revisions__revision_id__delete_impact_get","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDeleteImpact"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/summary":{"get":{"tags":["revisions"],"summary":"Get Revision Summary","operationId":"get_revision_summary_api_v1_revisions__revision_id__summary_get","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionSummary"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}":{"delete":{"tags":["revisions"],"summary":"Delete Revision","operationId":"delete_revision_api_v1_revisions__revision_id__delete","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRevisionResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/revisions/{revision_id}/draft":{"delete":{"tags":["revisions"],"summary":"Cancel Revision Draft","operationId":"cancel_revision_draft_api_v1_revisions__revision_id__draft_delete","parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDraftResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/conditions":{"get":{"tags":["conditions"],"summary":"List Conditions","operationId":"list_conditions_api_v1_projects__project_id__conditions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["conditions"],"summary":"Create Condition","operationId":"create_condition_api_v1_projects__project_id__conditions_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConditionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/conditions/from-library":{"post":{"tags":["conditions"],"summary":"Instantiate Templates","operationId":"instantiate_templates_api_v1_projects__project_id__conditions_from_library_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromLibraryRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromLibraryResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/conditions/{condition_id}/save-to-library":{"post":{"tags":["conditions"],"summary":"Save Condition To Library","operationId":"save_condition_to_library_api_v1_projects__project_id__conditions__condition_id__save_to_library_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Condition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveToLibraryRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveToLibraryResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conditions/{source_condition_id}/duplicate":{"post":{"tags":["conditions"],"summary":"Duplicate Condition","description":"Atomically duplicate a condition and its live measurements.","operationId":"duplicate_condition_api_v1_conditions__source_condition_id__duplicate_post","parameters":[{"name":"source_condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Condition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateConditionForRevisionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conditions/{condition_id}":{"get":{"tags":["conditions"],"summary":"Get Condition","operationId":"get_condition_api_v1_conditions__condition_id__get","parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Condition Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["conditions"],"summary":"Update Condition","operationId":"update_condition_api_v1_conditions__condition_id__patch","parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Condition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConditionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["conditions"],"summary":"Delete Condition","description":"Tombstone a condition and return the exact dependent ids stamped.","operationId":"delete_condition_api_v1_conditions__condition_id__delete","parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Condition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConditionResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conditions/bulk-update":{"post":{"tags":["conditions"],"summary":"Bulk Update Conditions","description":"Bulk update — all-or-nothing across `condition_ids`.\n\nResolves the project from the first condition; the repo verifies all\nother ids belong to the same project. URL deliberately omits\nproject_id because the operation is over a set of ids, not a project\nscope.","operationId":"bulk_update_conditions_api_v1_conditions_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateConditionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateConditionsResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/conditions/bulk-move":{"post":{"tags":["conditions"],"summary":"Bulk Move Conditions","description":"Bulk move + reorder — atomic across `condition_ids`.","operationId":"bulk_move_conditions_api_v1_conditions_bulk_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveConditionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveConditionsResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/conditions/{condition_id}/restore":{"post":{"tags":["conditions"],"summary":"Restore Condition","description":"Restore a condition and the dependent tombstones named by its receipt.\n\nEvery submitted id is validated atomically for writable-project scope,\ncondition linkage, and tombstone state. The server cannot verify that the\nset is complete: only the caller's receipt records which rows one delete\nstamped, and transaction-stable `deleted_at` cannot reconstruct that fact\n(spec-lite §2.1). An incomplete receipt therefore produces ADR-0172's\naccepted lossy restore. Returns 409 `not_deleted` for an already-live row.","operationId":"restore_condition_api_v1_conditions__condition_id__restore_post","parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Condition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreConditionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/folders":{"get":{"tags":["folders"],"summary":"List Folders","operationId":"list_folders_api_v1_projects__project_id__folders_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["folders"],"summary":"Create Folder","operationId":"create_folder_api_v1_projects__project_id__folders_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/folders/{folder_id}":{"get":{"tags":["folders"],"summary":"Get Folder","operationId":"get_folder_api_v1_folders__folder_id__get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["folders"],"summary":"Update Folder","operationId":"update_folder_api_v1_folders__folder_id__patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["folders"],"summary":"Delete Folder","description":"Tombstone a folder subtree and return the exact rows it stamped.","operationId":"delete_folder_api_v1_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFolderResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/folders/{folder_id}/restore":{"post":{"tags":["folders"],"summary":"Restore Folder","description":"Restore the folder, conditions, and dependents named by its receipt.\n\nEvery submitted id is validated atomically for writable-project scope,\ncurrent parent linkage, and tombstone state. The server cannot verify that\nthe set is complete: only the caller's receipt records which rows one delete\nstamped, and transaction-stable `deleted_at` cannot reconstruct that fact\n(spec-lite §2.1). An incomplete receipt therefore produces ADR-0172's\naccepted lossy restore. Returns 409 `not_deleted` for an already-live row.","operationId":"restore_folder_api_v1_folders__folder_id__restore_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/bid-areas":{"get":{"tags":["bid-areas"],"summary":"List Bid Areas","operationId":"list_bid_areas_api_v1_projects__project_id__bid_areas_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BidAreaListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["bid-areas"],"summary":"Create Bid Areas","operationId":"create_bid_areas_api_v1_projects__project_id__bid_areas_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBidAreasRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBidAreasResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/bid-areas/{bid_area_id}":{"patch":{"tags":["bid-areas"],"summary":"Update Bid Area","operationId":"update_bid_area_api_v1_bid_areas__bid_area_id__patch","parameters":[{"name":"bid_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bid Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBidAreaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BidArea"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["bid-areas"],"summary":"Delete Bid Area","description":"Tombstone an empty bid-area subtree and return the exact ids stamped.","operationId":"delete_bid_area_api_v1_bid_areas__bid_area_id__delete","parameters":[{"name":"bid_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bid Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteBidAreaResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/bid-areas/{bid_area_id}/restore":{"post":{"tags":["bid-areas"],"summary":"Restore Bid Area","description":"Restore exactly the bid-area subtree ids named by the delete receipt.\n\nEvery submitted id is validated atomically for writable-project scope,\ndescendant linkage, and tombstone state. The server cannot verify that the\nset is complete: only the caller's receipt records which rows one delete\nstamped, and transaction-stable `deleted_at` cannot reconstruct that fact\n(spec-lite §2.1). An incomplete receipt therefore produces ADR-0172's\naccepted lossy restore. Returns 409 `not_deleted` for an already-live row.","operationId":"restore_bid_area_api_v1_bid_areas__bid_area_id__restore_post","parameters":[{"name":"bid_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bid Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreBidAreaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BidArea"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/zones":{"get":{"tags":["zones"],"summary":"List Zones","operationId":"list_zones_api_v1_projects__project_id__zones_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoneListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["zones"],"summary":"Create Zone","operationId":"create_zone_api_v1_projects__project_id__zones_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZoneRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/zones/{zone_id}":{"patch":{"tags":["zones"],"summary":"Update Zone","operationId":"update_zone_api_v1_zones__zone_id__patch","parameters":[{"name":"zone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["zones"],"summary":"Delete Zone","operationId":"delete_zone_api_v1_zones__zone_id__delete","parameters":[{"name":"zone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zone Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteZoneResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/zones/{zone_id}/restore":{"post":{"tags":["zones"],"summary":"Restore Zone","operationId":"restore_zone_api_v1_zones__zone_id__restore_post","parameters":[{"name":"zone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreZoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/zones/{zone_id}/regions":{"post":{"tags":["zones"],"summary":"Create Zone Region","operationId":"create_zone_region_api_v1_zones__zone_id__regions_post","parameters":[{"name":"zone_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Zone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZoneRegionBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoneRegion"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/zone-regions/{region_id}":{"patch":{"tags":["zones"],"summary":"Update Zone Region","operationId":"update_zone_region_api_v1_zone_regions__region_id__patch","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZoneRegionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoneRegion"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["zones"],"summary":"Delete Zone Region","operationId":"delete_zone_region_api_v1_zone_regions__region_id__delete","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteZoneRegionResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/zone-regions/{region_id}/restore":{"post":{"tags":["zones"],"summary":"Restore Zone Region","operationId":"restore_zone_region_api_v1_zone_regions__region_id__restore_post","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoneRegion"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/zone-attributions":{"get":{"tags":["zones"],"summary":"List Page Attributions","operationId":"list_page_attributions_api_v1_pages__page_id__zone_attributions_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageZoneAttributionsResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/capabilities":{"get":{"tags":["capabilities"],"summary":"Get Capabilities","operationId":"get_capabilities_api_v1_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilitiesResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/projects/{project_id}/multipliers":{"get":{"tags":["multipliers"],"summary":"List Multipliers","operationId":"list_multipliers_api_v1_projects__project_id__multipliers_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Multiplier"},"title":"Response List Multipliers Api V1 Projects  Project Id  Multipliers Get"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["multipliers"],"summary":"Create Multiplier","operationId":"create_multiplier_api_v1_projects__project_id__multipliers_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiplierCreateForRevision"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multiplier"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/multipliers/{multiplier_id}":{"patch":{"tags":["multipliers"],"summary":"Update Multiplier","operationId":"update_multiplier_api_v1_multipliers__multiplier_id__patch","parameters":[{"name":"multiplier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Multiplier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiplierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multiplier"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["multipliers"],"summary":"Delete Multiplier","description":"Return the soft-deleted row; a 204 breaks the Next.js 16 dev proxy.\n\nThis matches the measurement delete response documented in ADR-0033.","operationId":"delete_multiplier_api_v1_multipliers__multiplier_id__delete","parameters":[{"name":"multiplier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Multiplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multiplier"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/multipliers/{multiplier_id}/restore":{"post":{"tags":["multipliers"],"summary":"Restore Multiplier","description":"Undo support for a soft-deleted multiplier (ADR-0033 id stability).\n\nReturns 200 with the row for the same reason the delete route above does.\n`get_multiplier` filters `deleted_at IS NULL`, so the tombstone's project\ncomes from `get_multiplier_project_id`.","operationId":"restore_multiplier_api_v1_multipliers__multiplier_id__restore_post","parameters":[{"name":"multiplier_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Multiplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multiplier"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/layers":{"get":{"tags":["layers"],"summary":"List Layers","operationId":"list_layers_api_v1_projects__project_id__layers_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["layers"],"summary":"Create Layer","operationId":"create_layer_api_v1_projects__project_id__layers_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLayerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layer"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/layers/{layer_id}":{"get":{"tags":["layers"],"summary":"Get Layer","operationId":"get_layer_api_v1_layers__layer_id__get","parameters":[{"name":"layer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Layer Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layer"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["layers"],"summary":"Update Layer","operationId":"update_layer_api_v1_layers__layer_id__patch","parameters":[{"name":"layer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Layer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLayerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layer"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["layers"],"summary":"Delete Layer","description":"Reassign live conditions, tombstone the layer, and return the moved ids.","operationId":"delete_layer_api_v1_layers__layer_id__delete","parameters":[{"name":"layer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Layer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLayerResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/layers/{layer_id}/restore":{"post":{"tags":["layers"],"summary":"Restore Layer","description":"Restore a layer and recorded members that still sit on Default.\n\nEvery submitted id is validated atomically for writable-project scope and\nlive state before any write. Historical membership and completeness cannot\nbe verified after delete moved members to Default: only the caller's receipt\nrecords them, and `deleted_at` cannot reconstruct that fact (spec-lite\n§2.1). An incomplete receipt therefore produces ADR-0172's accepted lossy\nrestore. Returns 409 `not_deleted` for an already-live layer.","operationId":"restore_layer_api_v1_layers__layer_id__restore_post","parameters":[{"name":"layer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Layer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreLayerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layer"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/layer-visibility":{"get":{"tags":["layer-visibility"],"summary":"Get Layer Visibility","operationId":"get_layer_visibility_api_v1_projects__project_id__layer_visibility_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerVisibilityResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"put":{"tags":["layer-visibility"],"summary":"Set Layer Visibility","operationId":"set_layer_visibility_api_v1_projects__project_id__layer_visibility_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLayerVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerVisibilityResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/layer-visibility/toggle":{"post":{"tags":["layer-visibility"],"summary":"Toggle Layer Visibility","operationId":"toggle_layer_visibility_api_v1_projects__project_id__layer_visibility_toggle_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleLayerVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayerVisibilityResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/condition-visibility":{"get":{"tags":["condition-visibility"],"summary":"Get Condition Visibility","operationId":"get_condition_visibility_api_v1_projects__project_id__condition_visibility_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionVisibilityResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/condition-visibility/toggle":{"post":{"tags":["condition-visibility"],"summary":"Toggle Condition Visibility","operationId":"toggle_condition_visibility_api_v1_projects__project_id__condition_visibility_toggle_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleConditionVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionVisibilityResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/condition-templates":{"get":{"tags":["condition_templates"],"summary":"List Condition Templates","operationId":"list_condition_templates_api_v1_condition_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionTemplateListResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["condition_templates"],"summary":"Create Condition Template","operationId":"create_condition_template_api_v1_condition_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConditionTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionTemplate"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/condition-templates/{template_id}":{"patch":{"tags":["condition_templates"],"summary":"Update Condition Template","operationId":"update_condition_template_api_v1_condition_templates__template_id__patch","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConditionTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionTemplate"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["condition_templates"],"summary":"Delete Condition Template","operationId":"delete_condition_template_api_v1_condition_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"row_version","in":"query","required":true,"schema":{"type":"integer","title":"Row Version"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/condition-template-folders":{"get":{"tags":["condition_templates"],"summary":"List Condition Template Folders","operationId":"list_condition_template_folders_api_v1_condition_template_folders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionLibraryFolderListResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["condition_templates"],"summary":"Create Condition Template Folder","operationId":"create_condition_template_folder_api_v1_condition_template_folders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConditionLibraryFolderRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionLibraryFolder"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/condition-template-folders/{folder_id}":{"patch":{"tags":["condition_templates"],"summary":"Update Condition Template Folder","operationId":"update_condition_template_folder_api_v1_condition_template_folders__folder_id__patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConditionLibraryFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionLibraryFolder"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["condition_templates"],"summary":"Delete Condition Template Folder","operationId":"delete_condition_template_folder_api_v1_condition_template_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}},{"name":"row_version","in":"query","required":true,"schema":{"type":"integer","title":"Row Version"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/library-assets/import":{"post":{"tags":["library_assets"],"summary":"Import Library Assets","operationId":"import_library_assets_api_v1_library_assets_import_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Dry Run"}},{"name":"expected_assets_sha256","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Assets Sha256"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_library_assets_api_v1_library_assets_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAssetsImportReport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/condition-templates/import":{"post":{"tags":["condition_templates"],"summary":"Import Condition Templates","operationId":"import_condition_templates_api_v1_condition_templates_import_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Dry Run"}},{"name":"expected_sheet_sha256","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Sheet Sha256"}},{"name":"strict","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Strict"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_condition_templates_api_v1_condition_templates_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryImportReport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/condition-template-imports":{"get":{"tags":["condition_templates"],"summary":"List Condition Library Imports","operationId":"list_condition_library_imports_api_v1_condition_template_imports_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryImportListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/condition-template-imports/{import_id}/revert":{"post":{"tags":["condition_templates"],"summary":"Revert Condition Library Import","operationId":"revert_condition_library_import_api_v1_condition_template_imports__import_id__revert_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertImportResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/extensions":{"get":{"tags":["extensions"],"summary":"List Extensions","description":"List the caller's library, or the slice of it one project exposes.\n\nOmit `project_id` for the whole organization library. Supply it to get only the\nrows a condition in that project references, which is what an external guest\nwith no organization membership can see.","operationId":"list_extensions_api_v1_extensions_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["extensions"],"summary":"Create Extension","operationId":"create_extension_api_v1_extensions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExtensionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Extension"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/extensions/{extension_id}":{"patch":{"tags":["extensions"],"summary":"Update Extension","operationId":"update_extension_api_v1_extensions__extension_id__patch","parameters":[{"name":"extension_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Extension Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExtensionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Extension"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["extensions"],"summary":"Delete Extension","description":"Tombstone an extension while preserving condition and template references.","operationId":"delete_extension_api_v1_extensions__extension_id__delete","parameters":[{"name":"extension_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Extension Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteExtensionResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/extensions/{extension_id}/restore":{"post":{"tags":["extensions"],"summary":"Restore Extension","description":"Restore an extension tombstone while preserving its existing references.\n\nOrganization scope and tombstone state are validated before the write.\nReturns 409 `not_deleted` if already live or `extension_name_taken` if a\nlive extension has claimed the same case-insensitive name.","operationId":"restore_extension_api_v1_extensions__extension_id__restore_post","parameters":[{"name":"extension_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Extension Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Extension"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/export-templates":{"get":{"tags":["exports"],"summary":"List Templates","operationId":"list_templates_api_v1_export_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExportTemplate"},"type":"array","title":"Response List Templates Api V1 Export Templates Get"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["exports"],"summary":"Upload Template","operationId":"upload_template_api_v1_export_templates_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_template_api_v1_export_templates_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportTemplate"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/projects/{project_id}/export/excel/preview":{"post":{"tags":["exports"],"summary":"Preview Export","operationId":"preview_export_api_v1_projects__project_id__export_excel_preview_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"sheets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Sheets"}},{"name":"include_hidden_layers","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Hidden Layers"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationReport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/export-templates/{template_id}/connectors":{"post":{"tags":["exports"],"summary":"Save Connector","operationId":"save_connector_api_v1_export_templates__template_id__connectors_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveConnectorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedConnector"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/export/excel/download":{"get":{"tags":["exports"],"summary":"Download Export","operationId":"download_export_api_v1_projects__project_id__export_excel_download_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"sheets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Sheets"}},{"name":"include_hidden_layers","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Hidden Layers"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/phase-codes":{"get":{"tags":["phase_codes"],"summary":"List Phase Codes","description":"List the caller's library, or the slice of it one project exposes.\n\nOmit `project_id` for the whole organization library. Supply it to get only the\nrows a condition in that project references, which is what an external guest\nwith no organization membership can see.","operationId":"list_phase_codes_api_v1_phase_codes_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseCodeListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"put":{"tags":["phase_codes"],"summary":"Replace Phase Codes","operationId":"replace_phase_codes_api_v1_phase_codes_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplacePhaseCodesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseCodeListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements":{"get":{"tags":["measurements"],"summary":"List Measurements","operationId":"list_measurements_api_v1_measurements_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"page_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"}},{"name":"condition_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["measurements"],"summary":"Create Measurement","operationId":"create_measurement_api_v1_measurements_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMeasurementForRevisionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Measurement"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/batch":{"post":{"tags":["measurements"],"summary":"Batch Create Measurements","description":"All-or-nothing batch insert. Used by copy/paste and, with `link: true`, by\nthe RUD-263 linked draw.\n\nIterates the items inside one transaction; any per-item validation\nfailure surfaces as 422 and the whole transaction rolls back. Order\nof `items` in the response matches the request order so the client\ncan map each result back to its originating temp id.\n\nWith `link: true` the items become one locked link group. Per the repo's\nexisting key-becomes-identity idiom (`routes/annotated_pdf_exports.py`,\n`routes/pdf_markup_imports.py`), an `Idempotency-Key` header BECOMES the\ngroup id; without one the server mints a uuid4. A retry carrying the same key\nfinds the group already populated and returns those rows with 200 instead of\nminting a second group and duplicating N rows.","operationId":"batch_create_measurements_api_v1_measurements_batch_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateMeasurementRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateMeasurementResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/bid-area":{"post":{"tags":["measurements"],"summary":"Assign Bid Area","description":"Bulk-assign selected measurements to a bid area (null = Unassigned).","operationId":"assign_bid_area_api_v1_measurements_bid_area_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignBidAreaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignBidAreaResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/measurements/reassign":{"post":{"tags":["measurements"],"summary":"Reassign Measurements","description":"Rebind measurements to same-kind conditions, rederiving quantities\nagainst each target. All-or-nothing. Per ADR-0117.","operationId":"reassign_measurements_api_v1_measurements_reassign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignMeasurementsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignMeasurementsResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/measurements/rename":{"post":{"tags":["measurements"],"summary":"Rename Measurements","description":"Name an explicit selection of measurements (`name: null` returns them to\nthe Default group). All-or-nothing. Per RUD-265/266.","operationId":"rename_measurements_api_v1_measurements_rename_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameBySelection"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameBySelectionResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/measurements/rename-group":{"post":{"tags":["measurements"],"summary":"Rename Measurement Group","description":"Rename a whole trace group on one condition. A group is project-wide and\nunbounded, so this responds with a count rather than the renamed bodies.\nPer RUD-265/266.","operationId":"rename_measurement_group_api_v1_measurements_rename_group_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameByGroup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameByGroupResponse"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/measurements/{measurement_id}":{"get":{"tags":["measurements"],"summary":"Get Measurement","operationId":"get_measurement_api_v1_measurements__measurement_id__get","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Measurement"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["measurements"],"summary":"Update Measurement","description":"Partial update. Returns `{items}` — one row normally, N for a link group\nwhose shared ring this edit moves (RUD-263 spec §7.1).","operationId":"update_measurement_api_v1_measurements__measurement_id__patch","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeasurementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListEnvelope"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["measurements"],"summary":"Delete Measurement","description":"Soft-delete the measurement and return the soft-deleted row.\n\nReturns 200 with the measurement (deleted_at is set) instead of the\nREST-idiomatic 204 No Content. The Next.js 16 dev proxy mangles 204\ninto 503, which would fire useDeleteMeasurement.onError and roll\nback the client's optimistic remove — producing a \"zombie\" cache\nstate where the row is gone server-side but present client-side.\nSubsequent PATCHes on the zombie return 404 and the broad\nonError rollback would wipe out concurrent drag optimistic writes.\nReturning 200 with a body avoids the proxy quirk entirely and\nkeeps the FE / BE in sync. Per ADR-0033.","operationId":"delete_measurement_api_v1_measurements__measurement_id__delete","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Measurement"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/{measurement_id}/find-similar":{"post":{"tags":["measurements"],"summary":"Find Similar","description":"S-layer symbol search: candidate positions where the selected COUNT\nmeasurement's local symbol repeats on the same page. Spec:\ndocs/specs/2026-07-07-slayer-find-similar-slice.md.","operationId":"find_similar_api_v1_measurements__measurement_id__find_similar_post","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindSimilarResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/{measurement_id}/restore":{"post":{"tags":["measurements"],"summary":"Restore Measurement","description":"Restore a soft-deleted measurement.\n\nPer ADR-0033 and docs/superpowers/specs/2026-05-22-undo-redo-design.md §5.4.\nThe measurement's id is preserved across delete↔restore cycles so\nthe canvas history stack stays internally consistent.\n\nReturns 200 with the resurrected measurement. Raises 404 if the row\nis missing or not owned by the user; 409 if the row exists but is\nalready alive.","operationId":"restore_measurement_api_v1_measurements__measurement_id__restore_post","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Measurement"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/{measurement_id}/unlink":{"post":{"tags":["measurements"],"summary":"Unlink Measurement","description":"Fork one member out of its link group, keeping its current geometry as a\nprivate copy.\n\nReturns every row whose membership changed, so the client can reconcile the\nremainder too — unlinking from a two-member group dissolves the other member\nas well (spec §7.3). 409 if the measurement is not in a group.","operationId":"unlink_measurement_api_v1_measurements__measurement_id__unlink_post","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Measurement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListEnvelope"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/groups/{group_id}/delete":{"post":{"tags":["measurements"],"summary":"Delete Link Group","description":"Soft-delete every member of a link group as one unit.\n\nMembers are one takeoff, so a member delete takes the group (spec §7.4). The\ngroup is NOT dissolved — soft-deleted members keep their `link_group_id`,\nwhich is what lets `restore` bring the group back intact. 404 if the group has\nno live members.","operationId":"delete_link_group_api_v1_measurements_groups__group_id__delete_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListEnvelope"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/groups/{group_id}/restore":{"post":{"tags":["measurements"],"summary":"Restore Link Group","description":"Undo a group delete, restoring every member in id order.\n\nProject resolution goes through `link_group_project_id`, not\n`_live_measurement_project_id`: during a group restore EVERY member is\nsoft-deleted by design, so a live-only lookup would 404 on a group that\nexists. 409 if any member is already alive.","operationId":"restore_link_group_api_v1_measurements_groups__group_id__restore_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListEnvelope"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/measurements/groups/{group_id}/relink":{"post":{"tags":["measurements"],"summary":"Relink Measurements","description":"Restore named live measurements to a link group as one transaction.\n\nProject resolution goes through `live_measurement_project_id` on the first\nnamed row, not `link_group_project_id`: a fully dissolved group has no live\nmember carrying its old group id, so a group-scoped lookup would 404 its own\nundo.","operationId":"relink_measurements_api_v1_measurements_groups__group_id__relink_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelinkMeasurementsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasurementListEnvelope"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/rulers":{"get":{"tags":["rulers"],"summary":"List Rulers","operationId":"list_rulers_api_v1_projects__project_id__rulers_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulerListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["rulers"],"summary":"Create Ruler","operationId":"create_ruler_api_v1_projects__project_id__rulers_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRulerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ruler"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/rulers/{ruler_id}":{"patch":{"tags":["rulers"],"summary":"Update Ruler","operationId":"update_ruler_api_v1_rulers__ruler_id__patch","parameters":[{"name":"ruler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ruler Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRulerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ruler"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["rulers"],"summary":"Delete Ruler","operationId":"delete_ruler_api_v1_rulers__ruler_id__delete","parameters":[{"name":"ruler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ruler Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/rulers/{ruler_id}/restore":{"post":{"tags":["rulers"],"summary":"Restore Ruler","operationId":"restore_ruler_api_v1_rulers__ruler_id__restore_post","parameters":[{"name":"ruler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ruler Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ruler"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/scale-regions":{"get":{"tags":["scale-regions"],"summary":"List Scale Regions","operationId":"list_scale_regions_api_v1_pages__page_id__scale_regions_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScaleRegion"},"title":"Response List Scale Regions Api V1 Pages  Page Id  Scale Regions Get"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["scale-regions"],"summary":"Create Scale Region","operationId":"create_scale_region_api_v1_pages__page_id__scale_regions_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScaleRegionForRevisionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScaleRegion"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/detail-scale-proposals":{"get":{"tags":["scale-regions"],"summary":"List Detail Scale Proposals","description":"Every scale this sheet states. Read-only; the box-placement arm is the\ndetail_scale_suggest worker now (RUD-633 design §7.5).","operationId":"list_detail_scale_proposals_api_v1_pages__page_id__detail_scale_proposals_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailScaleProposals"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/scale-regions/{region_id}/calibration":{"patch":{"tags":["scale-regions"],"summary":"Calibrate Scale Region","operationId":"calibrate_scale_region_api_v1_scale_regions__region_id__calibration_patch","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScaleRegionCalibrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScaleRegionMutationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/scale-regions/{region_id}":{"patch":{"tags":["scale-regions"],"summary":"Update Scale Region","description":"Rename and/or move/resize. A geometry change re-resolves membership and\nis rejected 422 if it would orphan a measurement unless payload.on_orphan\nis set.","operationId":"update_scale_region_api_v1_scale_regions__region_id__patch","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScaleRegionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScaleRegionMutationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["scale-regions"],"summary":"Delete Scale Region","description":"Soft-delete. Rejected 422 if it would orphan a measurement unless\non_orphan is supplied.","operationId":"delete_scale_region_api_v1_scale_regions__region_id__delete","parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}},{"name":"on_orphan","in":"query","required":false,"schema":{"anyOf":[{"enum":["snap_to_page","delete"],"type":"string"},{"type":"null"}],"title":"On Orphan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScaleRegionDeleteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/integrations/slack/events":{"post":{"tags":["integrations"],"summary":"Slack Events","operationId":"slack_events_api_v1_integrations_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/projects/{project_id}/stack-proposals":{"post":{"tags":["stack-proposals"],"summary":"Create Stack Proposal","operationId":"create_stack_proposal_api_v1_projects__project_id__stack_proposals_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProposalRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProposalResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"},"200":{"description":"Idempotent replay or typed no-op","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProposalResponse"}}}}}}},"/api/v1/projects/{project_id}/summary":{"get":{"tags":["summary"],"summary":"Get Project Summary","operationId":"get_project_summary_api_v1_projects__project_id__summary_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"sheets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Sheets"}},{"name":"include_hidden_layers","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Hidden Layers"}},{"name":"group_by","in":"query","required":false,"schema":{"enum":["condition","bid_area","zone"],"type":"string","default":"condition","title":"Group By"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/support/messages":{"post":{"tags":["support"],"summary":"Create Support Message","operationId":"create_support_message_api_v1_support_messages_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportMessageRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessage"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"get":{"tags":["support"],"summary":"Get Support Messages","operationId":"get_support_messages_api_v1_support_messages_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessageListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/totals":{"get":{"tags":["totals"],"summary":"Get Project Totals","operationId":"get_project_totals_api_v1_projects__project_id__totals_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalsResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conversations":{"get":{"tags":["conversations"],"summary":"List Conversations","operationId":"list_conversations_api_v1_conversations_get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["conversations"],"summary":"Create Conversation","operationId":"create_conversation_api_v1_conversations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","operationId":"get_conversation_api_v1_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"patch":{"tags":["conversations"],"summary":"Update Conversation","operationId":"update_conversation_api_v1_conversations__conversation_id__patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","operationId":"delete_conversation_api_v1_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conversations/{conversation_id}/messages":{"get":{"tags":["conversations"],"summary":"List Conversation Messages","description":"Return the complete transcript, ordered by sequence.\n\nDeliberately unpaginated: transcripts are read as a whole, and image payloads\nare references rather than blobs.","operationId":"list_conversation_messages_api_v1_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"post":{"tags":["chat"],"summary":"Post Message","operationId":"post_message_api_v1_conversations__conversation_id__messages_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conversations/{conversation_id}/ui-state-replies":{"post":{"tags":["conversations"],"summary":"Post Ui State Reply","operationId":"post_ui_state_reply_api_v1_conversations__conversation_id__ui_state_replies_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiStateReplyRequest"}}}},"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/conversations/{conversation_id}/chat-actions":{"get":{"tags":["chat-actions"],"summary":"Get Chat Actions","operationId":"get_chat_actions_api_v1_conversations__conversation_id__chat_actions_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"batch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatActionsResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-actions/{action_id}/preview":{"get":{"tags":["chat-actions"],"summary":"Preview Chat Action","description":"Ghost-preview read (spec §6): the CURRENT plan for a pending\nplace_measurements row. Auth is decide-aligned per the user ruling on\n2026-08-16: only users who could decide the card may see its ghosts. This\ncalls the resolver BELOW the decide-time recheck: live_action_state treats\nan empty plan as ConflictError and the decide routes flip such rows failed,\nbut here empty is data — the ghost layer draws nothing, and the user learns\nthe real reason at decide time. A plan that no longer resolves at all\n(source/target deleted), or whose stored request is malformed/stale,\npreviews as empty for the same reason.","operationId":"preview_chat_action_api_v1_chat_actions__action_id__preview_get","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionPreviewResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-actions/{action_id}/apply":{"post":{"tags":["chat-actions"],"summary":"Apply Chat Action","operationId":"apply_chat_action_api_v1_chat_actions__action_id__apply_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-action-batches/{batch_id}/apply":{"post":{"tags":["chat-actions"],"summary":"Apply Chat Action Batch","operationId":"apply_chat_action_batch_api_v1_chat_action_batches__batch_id__apply_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-actions/{action_id}/reject":{"post":{"tags":["chat-actions"],"summary":"Reject Chat Action","operationId":"reject_chat_action_api_v1_chat_actions__action_id__reject_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-actions/{action_id}/undo":{"post":{"tags":["chat-actions"],"summary":"Undo Chat Action","operationId":"undo_chat_action_api_v1_chat_actions__action_id__undo_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-action-batches/{batch_id}/undo":{"post":{"tags":["chat-actions"],"summary":"Undo Chat Action Batch","operationId":"undo_chat_action_batch_api_v1_chat_action_batches__batch_id__undo_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/chat-actions/{action_id}/redo":{"post":{"tags":["chat-actions"],"summary":"Redo Chat Action","operationId":"redo_chat_action_api_v1_chat_actions__action_id__redo_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResult"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/autocomplete-assist":{"post":{"tags":["assist"],"summary":"Autocomplete Assist","operationId":"autocomplete_assist_api_v1_pages__page_id__autocomplete_assist_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutocompleteAssistRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutocompleteAssistResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/export-templates/{template_id}/propose-connector":{"post":{"tags":["export-authoring"],"summary":"Propose Connector","operationId":"propose_connector_api_v1_projects__project_id__export_templates__template_id__propose_connector_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"SSE stream of progress events; the terminal `proposal` event carries a MappingProposal (declared here so the type is generated for the frontend).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingProposal"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/help/messages":{"post":{"tags":["help"],"summary":"Post Help Message","operationId":"post_help_message_api_v1_help_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/ai/overlay-changes/summarize":{"post":{"tags":["overlay-changes"],"summary":"Summarize Overlay Changes","operationId":"summarize_overlay_changes_api_v1_ai_overlay_changes_summarize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeOverlayChangesRequest"}}},"required":true},"responses":{"200":{"description":"SSE stream. Each `group.summary` event's data is an OverlayChangeSummary; `group.error` carries {group_id, code, message}; `done` ends the stream.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverlayChangeSummary"}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/api/v1/imports":{"post":{"tags":["imports"],"summary":"Create Import","operationId":"create_import_api_v1_imports_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImportRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImportResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"get":{"tags":["imports"],"summary":"List Imports","operationId":"list_imports_api_v1_imports_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportListResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/imports/{import_id}/start":{"post":{"tags":["imports"],"summary":"Start Import","operationId":"start_import_api_v1_imports__import_id__start_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/imports/{import_id}/accept-plan":{"post":{"tags":["imports"],"summary":"Accept Plan","operationId":"accept_plan_api_v1_imports__import_id__accept_plan_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/import-review":{"get":{"tags":["imports"],"summary":"Get Import Review","operationId":"get_import_review_api_v1_projects__project_id__import_review_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReviewResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/imports/{import_id}":{"get":{"tags":["imports"],"summary":"Get Import","operationId":"get_import_api_v1_imports__import_id__get","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/imports/{import_id}/confirm":{"post":{"tags":["imports"],"summary":"Confirm Import","operationId":"confirm_import_api_v1_imports__import_id__confirm_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/imports/{import_id}/revert":{"post":{"tags":["imports"],"summary":"Revert Import","operationId":"revert_import_api_v1_imports__import_id__revert_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/exports":{"post":{"tags":["project-exports"],"summary":"Create Export","operationId":"create_export_api_v1_projects__project_id__exports_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateProjectExportRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/project-exports/{export_id}":{"get":{"tags":["project-exports"],"summary":"Get Export","operationId":"get_export_api_v1_project_exports__export_id__get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectExport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/project-exports/{export_id}/download-url":{"get":{"tags":["project-exports"],"summary":"Get Export Download Url","operationId":"get_export_download_url_api_v1_project_exports__export_id__download_url_get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Export Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectExportDownloadResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/note":{"get":{"tags":["page-notes"],"summary":"Get Page Note","operationId":"get_page_note_api_v1_pages__page_id__note_get","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageNoteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}},"put":{"tags":["page-notes"],"summary":"Put Page Note","operationId":"put_page_note_api_v1_pages__page_id__note_put","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPageNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageNote"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/verification":{"get":{"tags":["verification"],"summary":"Get Project Verification","operationId":"get_project_verification_api_v1_projects__project_id__verification_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectVerificationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/verification/confirm":{"post":{"tags":["verification"],"summary":"Confirm Page Verification","operationId":"confirm_page_verification_api_v1_pages__page_id__verification_confirm_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPageVerificationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/verification/unconfirm":{"post":{"tags":["verification"],"summary":"Unconfirm Page Verification","description":"Withdraw a page's confirmation, restoring its pre-confirm derived status.\n\nThe inverse half of `confirm`, added so Ctrl+Z can reverse a confirmation\n(RUD-282 Wave A). No migration: all four columns `confirm` writes are already\nnullable and `status` derives purely from them.\n\nDeliberate consequence, carried from the design's §8 verbatim: \"undo there can\nunlock a page another user verified. In scope, but it makes undo the one\nmutation path that toggles the gate other mutations respect — called out\ndeliberately rather than discovered later.\" This route enforces project-write,\nnot confirmation ownership, so a second reviewer's confirmation is reversible.\nRationale and the alternatives rejected: ADR-0170.\n\nIdempotent on a never-confirmed page: it returns the current derived status\nrather than 409, so replaying an undo against a page someone else already\nunconfirmed succeeds instead of dropping the history entry.","operationId":"unconfirm_page_verification_api_v1_pages__page_id__verification_unconfirm_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"rev","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rev"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnconfirmPageVerificationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/verification/flag":{"post":{"tags":["verification"],"summary":"Flag Page Verification","operationId":"flag_page_verification_api_v1_pages__page_id__verification_flag_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagPageVerificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagPageVerificationResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/verification/note":{"post":{"tags":["verification"],"summary":"Set Page Verification Note","operationId":"set_page_verification_note_api_v1_pages__page_id__verification_note_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPageVerificationNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPageVerificationNoteResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pages/{page_id}/verification/sheet-type":{"post":{"tags":["verification"],"summary":"Set Page Sheet Type","operationId":"set_page_sheet_type_api_v1_pages__page_id__verification_sheet_type_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPageSheetTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPageSheetTypeResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/verification/classify-sheets":{"post":{"tags":["verification"],"summary":"Classify Sheet Types","operationId":"classify_sheet_types_api_v1_projects__project_id__verification_classify_sheets_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifySheetTypesResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/projects/{project_id}/imports/pdf-markups":{"post":{"tags":["pdf-markup-imports"],"summary":"Create Pdf Markup Import","operationId":"create_pdf_markup_import_api_v1_projects__project_id__imports_pdf_markups_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid","title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePdfMarkupImportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePdfMarkupImportResponse"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pdf-markup-imports/{import_id}/start":{"post":{"tags":["pdf-markup-imports"],"summary":"Start Pdf Markup Import","operationId":"start_pdf_markup_import_api_v1_pdf_markup_imports__import_id__start_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfMarkupImport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pdf-markup-imports/{import_id}":{"get":{"tags":["pdf-markup-imports"],"summary":"Get Pdf Markup Import","operationId":"get_pdf_markup_import_api_v1_pdf_markup_imports__import_id__get","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfMarkupImport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pdf-markup-imports/{import_id}/confirm-mapping":{"post":{"tags":["pdf-markup-imports"],"summary":"Confirm Pdf Markup Mapping","operationId":"confirm_pdf_markup_mapping_api_v1_pdf_markup_imports__import_id__confirm_mapping_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPdfMarkupMappingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfMarkupImport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}},"/api/v1/pdf-markup-imports/{import_id}/cancel":{"post":{"tags":["pdf-markup-imports"],"summary":"Cancel Pdf Markup Import","operationId":"cancel_pdf_markup_import_api_v1_pdf_markup_imports__import_id__cancel_post","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfMarkupImport"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"description":"Server Error"}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"},"password":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Password"}},"type":"object","required":["token"],"title":"AcceptInviteRequest"},"AcceptPlanRequest":{"properties":{"skip_issue_ids":{"items":{"type":"string"},"type":"array","maxItems":10000,"title":"Skip Issue Ids"}},"additionalProperties":false,"type":"object","title":"AcceptPlanRequest"},"ActionImpact":{"properties":{"measurements":{"type":"integer","title":"Measurements","default":0},"sheets":{"type":"integer","title":"Sheets","default":0},"conditions":{"type":"integer","title":"Conditions","default":0},"folders":{"type":"integer","title":"Folders","default":0}},"type":"object","title":"ActionImpact"},"ActionPreviewPlacement":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["page_id","x","y"],"title":"ActionPreviewPlacement","description":"One planned ghost location, PDF user-space units (spec §2)."},"ActionPreviewResponse":{"properties":{"placements":{"items":{"$ref":"#/components/schemas/ActionPreviewPlacement"},"type":"array","title":"Placements"},"already_placed":{"type":"integer","title":"Already Placed"}},"type":"object","required":["placements","already_placed"],"title":"ActionPreviewResponse","description":"GET /chat-actions/{id}/preview — the CURRENT plan for a pending\nplace_measurements row (spec §6), recomputed on every call; nothing is\npersisted and the row is never transitioned. Empty placements covers BOTH\n\"everything already placed\" and \"the plan no longer resolves\" (source or\ntarget condition deleted): the ghost layer draws nothing either way, and\nflipping the row failed stays the decide routes' job. already_placed\ndistinguishes the two for tests and observability (covered-empty > 0,\nbroken-empty == 0). Both fields are required — no defaults — so the\ngenerated TS properties are non-optional."},"ActionReceipt":{"properties":{"ordinal":{"type":"integer","title":"Ordinal"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"status":{"type":"string","enum":["pending","applied","rejected","undone","failed"],"title":"Status"},"kind":{"type":"string","enum":["create_condition","create_folder","update_condition","update_folder","move_conditions","delete_condition","delete_folder","update_measurement","reassign_measurement","rename_measurement_group","delete_measurement","restore_measurement","create_annotation","update_annotation_status","place_measurements","flag_page_verification","set_page_verification_note"],"title":"Kind"},"entity_type":{"type":"string","enum":["condition","folder","measurement","annotation","page"],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"summary":{"type":"string","title":"Summary"},"impact":{"anyOf":[{"$ref":"#/components/schemas/ActionImpact"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ordinal","action_id","status","kind","entity_type","summary"],"title":"ActionReceipt","description":"Tool output row (model-facing) — summary/error stored in the ledger."},"ActionRow":{"properties":{"ordinal":{"type":"integer","title":"Ordinal"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"status":{"type":"string","enum":["pending","applied","rejected","undone","failed"],"title":"Status"},"kind":{"type":"string","enum":["create_condition","create_folder","update_condition","update_folder","move_conditions","delete_condition","delete_folder","update_measurement","reassign_measurement","rename_measurement_group","delete_measurement","restore_measurement","create_annotation","update_annotation_status","place_measurements","flag_page_verification","set_page_verification_note"],"title":"Kind"},"entity_type":{"type":"string","enum":["condition","folder","measurement","annotation","page"],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"summary":{"type":"string","title":"Summary"},"impact":{"anyOf":[{"$ref":"#/components/schemas/ActionImpact"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At"},"undone_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Undone At"}},"type":"object","required":["ordinal","action_id","status","kind","entity_type","summary","batch_id","created_at"],"title":"ActionRow","description":"Public card row (GET/decision endpoints). FLAT — the shared-types package\nforbids model inheritance (AGENTS.md); repeat the receipt fields."},"AdoptRevisionRequest":{"properties":{"row_version":{"type":"integer","minimum":1.0,"title":"Row Version"}},"type":"object","required":["row_version"],"title":"AdoptRevisionRequest"},"AnnotatedPdfExport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"drawing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Drawing Id"},"options":{"$ref":"#/components/schemas/AnnotatedPdfExportOptions"},"status":{"type":"string","enum":["pending","running","completed","failed"],"title":"Status"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"report":{"anyOf":[{"$ref":"#/components/schemas/AnnotatedPdfExportReport"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","options","status","created_at"],"title":"AnnotatedPdfExport"},"AnnotatedPdfExportDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["download_url"],"title":"AnnotatedPdfExportDownloadResponse"},"AnnotatedPdfExportOptions":{"properties":{"include_private":{"type":"boolean","title":"Include Private","default":false},"flatten":{"type":"boolean","title":"Flatten","default":false},"include_links":{"type":"boolean","title":"Include Links","default":true},"include_attachments":{"type":"boolean","title":"Include Attachments","default":true},"include_summary":{"type":"boolean","title":"Include Summary","default":true}},"additionalProperties":false,"type":"object","title":"AnnotatedPdfExportOptions"},"AnnotatedPdfExportReport":{"properties":{"glyph_substitutions":{"type":"integer","title":"Glyph Substitutions","default":0},"font_remaps":{"type":"integer","title":"Font Remaps","default":0},"skipped_private":{"type":"integer","title":"Skipped Private","default":0},"condition_measurement_links":{"type":"integer","title":"Condition Measurement Links","default":0},"cross_drawing_links":{"type":"integer","title":"Cross Drawing Links","default":0},"imageless_stamps":{"type":"integer","title":"Imageless Stamps","default":0},"flatten_dropped_links":{"type":"integer","title":"Flatten Dropped Links","default":0},"flatten_dropped_attachments":{"type":"integer","title":"Flatten Dropped Attachments","default":0},"per_annot_errors":{"type":"integer","title":"Per Annot Errors","default":0},"summary_pages_written":{"type":"integer","title":"Summary Pages Written","default":0},"summary_glyph_substitutions":{"type":"integer","title":"Summary Glyph Substitutions","default":0},"details":{"additionalProperties":{"items":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object"},"type":"array"},"type":"object","title":"Details"}},"additionalProperties":false,"type":"object","title":"AnnotatedPdfExportReport"},"Annotation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"kind":{"type":"string","enum":["note","text","callout","line","polyline","rect","ellipse","polygon","ink","highlight","stamp"],"title":"Kind"},"geometry":{"oneOf":[{"$ref":"#/components/schemas/AnnotationPointGeometry-Output"},{"$ref":"#/components/schemas/AnnotationRectGeometry-Output"},{"$ref":"#/components/schemas/AnnotationCalloutGeometry-Output"},{"$ref":"#/components/schemas/AnnotationPolylineGeometry-Output"},{"$ref":"#/components/schemas/AnnotationPolygonGeometry-Output"},{"$ref":"#/components/schemas/AnnotationInkGeometry-Output"},{"$ref":"#/components/schemas/AnnotationQuadsGeometry-Output"}],"title":"Geometry","discriminator":{"propertyName":"type","mapping":{"callout":"#/components/schemas/AnnotationCalloutGeometry-Output","ink":"#/components/schemas/AnnotationInkGeometry-Output","point":"#/components/schemas/AnnotationPointGeometry-Output","polygon":"#/components/schemas/AnnotationPolygonGeometry-Output","polyline":"#/components/schemas/AnnotationPolylineGeometry-Output","quads":"#/components/schemas/AnnotationQuadsGeometry-Output","rect":"#/components/schemas/AnnotationRectGeometry-Output"}}},"style":{"$ref":"#/components/schemas/AnnotationStyle-Output"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"contents":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contents"},"status":{"anyOf":[{"type":"string","enum":["accepted","rejected","completed","cancelled"]},{"type":"null"}],"title":"Status"},"author_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"author_kind":{"type":"string","enum":["user","agent","imported"],"title":"Author Kind"},"visibility":{"type":"string","enum":["private","project"],"title":"Visibility"},"locked":{"type":"boolean","title":"Locked"},"bbox_x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox X"},"bbox_y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox Y"},"bbox_w":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox W"},"bbox_h":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox H"},"display_kind":{"type":"string","title":"Display Kind"},"row_version":{"type":"integer","title":"Row Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceSummary"},{"type":"null"}]}},"type":"object","required":["id","project_id","page_id","kind","geometry","style","subject","contents","status","author_id","author_name","author_kind","visibility","locked","bbox_x","bbox_y","bbox_w","bbox_h","display_kind","row_version","created_at","updated_at","deleted_at"],"title":"Annotation"},"AnnotationAttachment":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"annotation_id":{"type":"string","format":"uuid","title":"Annotation Id"},"content_type":{"type":"string","title":"Content Type"},"byte_size":{"type":"integer","title":"Byte Size"},"sha256":{"type":"string","title":"Sha256"},"filename":{"type":"string","title":"Filename"},"state":{"type":"string","enum":["pending","confirmed"],"title":"State"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","annotation_id","content_type","byte_size","sha256","filename","state","created_by","created_at"],"title":"AnnotationAttachment"},"AnnotationCalloutGeometry-Input":{"properties":{"type":{"type":"string","const":"callout","title":"Type"},"rect":{"$ref":"#/components/schemas/_RectShape-Input"},"leader":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":3,"minItems":2,"title":"Leader"}},"additionalProperties":false,"type":"object","required":["type","rect","leader"],"title":"AnnotationCalloutGeometry"},"AnnotationCalloutGeometry-Output":{"properties":{"type":{"type":"string","const":"callout","title":"Type"},"rect":{"$ref":"#/components/schemas/_RectShape-Output"},"leader":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":3,"minItems":2,"title":"Leader"}},"additionalProperties":false,"type":"object","required":["type","rect","leader"],"title":"AnnotationCalloutGeometry"},"AnnotationContextItem":{"properties":{"kind":{"type":"string","const":"annotation","title":"Kind","default":"annotation"},"measurement_id":{"type":"string","format":"uuid","title":"Measurement Id"}},"type":"object","required":["measurement_id"],"title":"AnnotationContextItem"},"AnnotationDetailResponse":{"properties":{"annotation":{"$ref":"#/components/schemas/Annotation"},"replies":{"items":{"$ref":"#/components/schemas/AnnotationReply"},"type":"array","title":"Replies"},"links":{"items":{"$ref":"#/components/schemas/AnnotationLink"},"type":"array","title":"Links"},"attachments":{"items":{"$ref":"#/components/schemas/AnnotationAttachment"},"type":"array","title":"Attachments"}},"type":"object","required":["annotation","replies","links","attachments"],"title":"AnnotationDetailResponse"},"AnnotationFont-Input":{"properties":{"family":{"type":"string","title":"Family","default":"Helvetica"},"size_pts":{"anyOf":[{"type":"number","maximum":144.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Size Pts","default":"12"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"align":{"type":"string","enum":["left","center","right"],"title":"Align","default":"left"}},"additionalProperties":false,"type":"object","title":"AnnotationFont"},"AnnotationFont-Output":{"properties":{"family":{"type":"string","title":"Family","default":"Helvetica"},"size_pts":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Size Pts","default":"12"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"align":{"type":"string","enum":["left","center","right"],"title":"Align","default":"left"}},"additionalProperties":false,"type":"object","title":"AnnotationFont"},"AnnotationInkGeometry-Input":{"properties":{"type":{"type":"string","const":"ink","title":"Type"},"strokes":{"items":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":2},"type":"array","maxItems":500,"minItems":1,"title":"Strokes"}},"additionalProperties":false,"type":"object","required":["type","strokes"],"title":"AnnotationInkGeometry"},"AnnotationInkGeometry-Output":{"properties":{"type":{"type":"string","const":"ink","title":"Type"},"strokes":{"items":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":2},"type":"array","maxItems":500,"minItems":1,"title":"Strokes"}},"additionalProperties":false,"type":"object","required":["type","strokes"],"title":"AnnotationInkGeometry"},"AnnotationLink":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"annotation_id":{"type":"string","format":"uuid","title":"Annotation Id"},"target_kind":{"type":"string","enum":["condition","measurement","page","url"],"title":"Target Kind"},"condition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"},"measurement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Measurement Id"},"target_page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Page Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"label":{"type":"string","title":"Label"},"dest":{"anyOf":[{"$ref":"#/components/schemas/LinkDest"},{"type":"null"}]},"position":{"type":"integer","title":"Position"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"stale":{"type":"boolean","title":"Stale"},"nav":{"anyOf":[{"$ref":"#/components/schemas/LinkNav"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","annotation_id","target_kind","condition_id","measurement_id","target_page_id","url","label","dest","position","created_by","created_at","stale","nav"],"title":"AnnotationLink"},"AnnotationLinkCounts":{"properties":{"condition_counts":{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object","title":"Condition Counts"}},"additionalProperties":false,"type":"object","required":["condition_counts"],"title":"AnnotationLinkCounts"},"AnnotationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AnnotationListRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"AnnotationListResponse"},"AnnotationListRow":{"properties":{"annotation":{"$ref":"#/components/schemas/Annotation"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"drawing_name":{"type":"string","title":"Drawing Name"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"comment_count":{"type":"integer","minimum":0.0,"title":"Comment Count","default":0}},"type":"object","required":["annotation","drawing_id","drawing_name","page_number","sheet_number"],"title":"AnnotationListRow","description":"List rows: the full annotation plus drawing/page identity (spec §5).\n\nComposition, not inheritance — shared-types AGENTS.md forbids model\ninheritance (plays poorly with the TS generator)."},"AnnotationPointGeometry-Input":{"properties":{"type":{"type":"string","const":"point","title":"Type"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"}},"additionalProperties":false,"type":"object","required":["type","x","y"],"title":"AnnotationPointGeometry"},"AnnotationPointGeometry-Output":{"properties":{"type":{"type":"string","const":"point","title":"Type"},"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"}},"additionalProperties":false,"type":"object","required":["type","x","y"],"title":"AnnotationPointGeometry"},"AnnotationPolygonGeometry-Input":{"properties":{"type":{"type":"string","const":"polygon","title":"Type"},"points":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":3,"title":"Points"}},"additionalProperties":false,"type":"object","required":["type","points"],"title":"AnnotationPolygonGeometry"},"AnnotationPolygonGeometry-Output":{"properties":{"type":{"type":"string","const":"polygon","title":"Type"},"points":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":3,"title":"Points"}},"additionalProperties":false,"type":"object","required":["type","points"],"title":"AnnotationPolygonGeometry"},"AnnotationPolylineGeometry-Input":{"properties":{"type":{"type":"string","const":"polyline","title":"Type"},"points":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":2,"title":"Points"}},"additionalProperties":false,"type":"object","required":["type","points"],"title":"AnnotationPolylineGeometry"},"AnnotationPolylineGeometry-Output":{"properties":{"type":{"type":"string","const":"polyline","title":"Type"},"points":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":2000,"minItems":2,"title":"Points"}},"additionalProperties":false,"type":"object","required":["type","points"],"title":"AnnotationPolylineGeometry"},"AnnotationQuadsGeometry-Input":{"properties":{"type":{"type":"string","const":"quads","title":"Type"},"quads":{"items":{"items":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},"type":"array","maxItems":8,"minItems":8},"type":"array","maxItems":500,"minItems":1,"title":"Quads"}},"additionalProperties":false,"type":"object","required":["type","quads"],"title":"AnnotationQuadsGeometry"},"AnnotationQuadsGeometry-Output":{"properties":{"type":{"type":"string","const":"quads","title":"Type"},"quads":{"items":{"items":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"array","maxItems":8,"minItems":8},"type":"array","maxItems":500,"minItems":1,"title":"Quads"}},"additionalProperties":false,"type":"object","required":["type","quads"],"title":"AnnotationQuadsGeometry"},"AnnotationRectGeometry-Input":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"w":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"W"},"h":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"H"},"type":{"type":"string","const":"rect","title":"Type"}},"additionalProperties":false,"type":"object","required":["x","y","w","h","type"],"title":"AnnotationRectGeometry"},"AnnotationRectGeometry-Output":{"properties":{"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"},"w":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"W"},"h":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"H"},"type":{"type":"string","const":"rect","title":"Type"}},"additionalProperties":false,"type":"object","required":["x","y","w","h","type"],"title":"AnnotationRectGeometry"},"AnnotationReply":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"annotation_id":{"type":"string","format":"uuid","title":"Annotation Id"},"parent_reply_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Reply Id"},"entry_kind":{"type":"string","enum":["comment","status_change"],"title":"Entry Kind"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"new_status":{"anyOf":[{"type":"string","enum":["accepted","rejected","completed","cancelled"]},{"type":"null"}],"title":"New Status"},"author_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"author_kind":{"type":"string","enum":["user","agent","imported"],"title":"Author Kind"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceSummary"},{"type":"null"}]}},"type":"object","required":["id","annotation_id","parent_reply_id","entry_kind","body","new_status","author_id","author_name","author_kind","created_at","updated_at","deleted_at"],"title":"AnnotationReply"},"AnnotationStyle-Input":{"properties":{"stroke_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Stroke Color","default":"#ff6568"},"stroke_opacity":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Stroke Opacity","default":"1"},"fill_color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Fill Color"},"fill_opacity":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Fill Opacity","default":"1"},"stroke_width":{"anyOf":[{"type":"number","maximum":72.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Stroke Width","default":"2"},"dash":{"anyOf":[{"items":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},"type":"array","maxItems":8,"minItems":1},{"type":"null"}],"title":"Dash"},"border_effect":{"anyOf":[{"$ref":"#/components/schemas/BorderEffect"},{"type":"null"}]},"line_endings":{"anyOf":[{"prefixItems":[{"type":"string","enum":["none","open_arrow","closed_arrow","circle","square","diamond","slash"]},{"type":"string","enum":["none","open_arrow","closed_arrow","circle","square","diamond","slash"]}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Line Endings"},"font":{"anyOf":[{"$ref":"#/components/schemas/AnnotationFont-Input"},{"type":"null"}]},"blend":{"type":"string","enum":["normal","multiply"],"title":"Blend","default":"normal"},"rotation":{"anyOf":[{"type":"number","exclusiveMaximum":360.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rotation","default":"0"},"stamp_attachment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stamp Attachment Id"}},"additionalProperties":false,"type":"object","title":"AnnotationStyle"},"AnnotationStyle-Output":{"properties":{"stroke_color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Stroke Color","default":"#ff6568"},"stroke_opacity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Stroke Opacity","default":"1"},"fill_color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Fill Color"},"fill_opacity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Fill Opacity","default":"1"},"stroke_width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Stroke Width","default":"2"},"dash":{"anyOf":[{"items":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"array","maxItems":8,"minItems":1},{"type":"null"}],"title":"Dash"},"border_effect":{"anyOf":[{"$ref":"#/components/schemas/BorderEffect"},{"type":"null"}]},"line_endings":{"anyOf":[{"prefixItems":[{"type":"string","enum":["none","open_arrow","closed_arrow","circle","square","diamond","slash"]},{"type":"string","enum":["none","open_arrow","closed_arrow","circle","square","diamond","slash"]}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Line Endings"},"font":{"anyOf":[{"$ref":"#/components/schemas/AnnotationFont-Output"},{"type":"null"}]},"blend":{"type":"string","enum":["normal","multiply"],"title":"Blend","default":"normal"},"rotation":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rotation","default":"0"},"stamp_attachment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stamp Attachment Id"}},"additionalProperties":false,"type":"object","title":"AnnotationStyle"},"ApiErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["code","message"],"title":"ApiErrorBody","description":"The inner `error` object."},"ApiErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ApiErrorBody"}},"type":"object","required":["error"],"title":"ApiErrorResponse","description":"The full envelope returned on every non-2xx response."},"AssetItemReport":{"properties":{"kind":{"type":"string","enum":["extension","phase_code"],"title":"Kind"},"label":{"type":"string","title":"Label"},"action":{"type":"string","enum":["create","skip_exists"],"title":"Action"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]}},"additionalProperties":false,"type":"object","required":["kind","label","action"],"title":"AssetItemReport"},"AssignBidAreaRequest":{"properties":{"measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Measurement Ids"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"}},"additionalProperties":false,"type":"object","required":["measurement_ids","bid_area_id"],"title":"AssignBidAreaRequest","description":"Bulk-assign live measurements to one bid area. `bid_area_id: null`\nmoves them to Unassigned. Per docs/superpowers/specs/2026-07-02-bid-areas-design.md."},"AssignBidAreaResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AssignBidAreaResponse"},"AssistImage":{"properties":{"data_base64":{"type":"string","maxLength":2800000,"title":"Data Base64"},"media_type":{"type":"string","enum":["image/png","image/jpeg"],"title":"Media Type"},"width_px":{"type":"integer","maximum":4096.0,"exclusiveMinimum":0.0,"title":"Width Px"},"height_px":{"type":"integer","maximum":4096.0,"exclusiveMinimum":0.0,"title":"Height Px"}},"type":"object","required":["data_base64","media_type","width_px","height_px"],"title":"AssistImage","description":"Browser-rendered PNG/JPEG crop, base64 without the data: prefix."},"AssistTransform":{"properties":{"a":{"type":"number","title":"A"},"b":{"type":"number","title":"B"},"c":{"type":"number","title":"C"},"d":{"type":"number","title":"D"},"e":{"type":"number","title":"E"},"f":{"type":"number","title":"F"}},"type":"object","required":["a","b","c","d","e","f"],"title":"AssistTransform"},"AttachmentConfig":{"properties":{"deduct_from_parent":{"type":"boolean","title":"Deduct From Parent","default":true}},"additionalProperties":false,"type":"object","title":"AttachmentConfig"},"AttachmentWriteResponse":{"properties":{"attachment":{"$ref":"#/components/schemas/AnnotationAttachment"},"annotation":{"$ref":"#/components/schemas/Annotation"}},"additionalProperties":false,"type":"object","required":["attachment","annotation"],"title":"AttachmentWriteResponse"},"AutocompleteAssistRequest":{"properties":{"kind":{"type":"string","enum":["rescue","complete"],"title":"Kind"},"image":{"$ref":"#/components/schemas/AssistImage"},"transform":{"$ref":"#/components/schemas/AssistTransform"},"rescue":{"anyOf":[{"$ref":"#/components/schemas/RescueContext"},{"type":"null"}]},"complete":{"anyOf":[{"$ref":"#/components/schemas/CompleteContext"},{"type":"null"}]}},"type":"object","required":["kind","image","transform"],"title":"AutocompleteAssistRequest"},"AutocompleteAssistResponse":{"properties":{"assist":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/RescueAssistResult"},{"$ref":"#/components/schemas/CompleteAssistResult"}],"discriminator":{"propertyName":"kind","mapping":{"complete":"#/components/schemas/CompleteAssistResult","rescue":"#/components/schemas/RescueAssistResult"}}},{"type":"null"}],"title":"Assist"}},"type":"object","title":"AutocompleteAssistResponse","description":"assist is None whenever the VLM was unavailable, timed out, or\nreturned something unusable — a normal state, never an error."},"BatchCreateAnnotationRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreateAnnotationRequest"},"type":"array","maxItems":500,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BatchCreateAnnotationRequest"},"BatchCreateAnnotationResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"BatchCreateAnnotationResponse"},"BatchCreateMeasurementRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreateMeasurementRequest"},"type":"array","maxItems":500,"minItems":1,"title":"Items"},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"},"link":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Link"}},"type":"object","required":["items","revision_set_id"],"title":"BatchCreateMeasurementRequest","description":"All-or-nothing batch insert. Used by copy/paste; the server runs\nevery item inside one transaction.\n\n`min_length=1` rejects an empty paste at the boundary; `max_length=500`\nis a defensive cap, not user-facing — the v1 UI cannot realistically\ndrive a batch this large."},"BatchCreateMeasurementResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"BatchCreateMeasurementResponse","description":"Server response. Preserves request order so the client can match\neach result with its originating temp id."},"BidArea":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"parent_bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Bid Area Id"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"number","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","parent_bid_area_id","name","sort_order","created_at"],"title":"BidArea"},"BidAreaListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BidArea"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"BidAreaListResponse"},"BillingNeedsAttention":{"properties":{"state":{"type":"string","const":"needs_attention","title":"State","default":"needs_attention"}},"type":"object","title":"BillingNeedsAttention","description":"Ambiguous Stripe shape. Never guess which subscription is real."},"BillingNoSubscription":{"properties":{"state":{"type":"string","const":"no_subscription","title":"State","default":"no_subscription"}},"type":"object","title":"BillingNoSubscription","description":"Customer matched, no non-canceled subscription. Real and days-long."},"BillingNotConfigured":{"properties":{"state":{"type":"string","const":"not_configured","title":"State","default":"not_configured"}},"type":"object","title":"BillingNotConfigured","description":"No Stripe credential in this environment (local dev, CI)."},"BillingSubscribed":{"properties":{"state":{"type":"string","const":"subscribed","title":"State","default":"subscribed"},"status":{"type":"string","title":"Status"},"collection_method":{"type":"string","title":"Collection Method"},"days_until_due":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Until Due"},"invoiced_seats":{"type":"integer","title":"Invoiced Seats"},"member_seats":{"type":"integer","title":"Member Seats"},"unit_amount":{"type":"integer","title":"Unit Amount"},"currency":{"type":"string","title":"Currency"},"current_period_ends_at":{"type":"string","format":"date-time","title":"Current Period Ends At"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"}},"type":"object","required":["status","collection_method","days_until_due","invoiced_seats","member_seats","unit_amount","currency","current_period_ends_at","cancel_at_period_end"],"title":"BillingSubscribed","description":"Exactly one customer, one live subscription, one recurring item."},"BillingUnavailable":{"properties":{"state":{"type":"string","const":"unavailable","title":"State","default":"unavailable"}},"type":"object","title":"BillingUnavailable","description":"Stripe could not be reached or answered an error."},"BillingUnlinked":{"properties":{"state":{"type":"string","const":"unlinked","title":"State","default":"unlinked"},"org_id":{"type":"string","format":"uuid","title":"Org Id"}},"type":"object","required":["org_id"],"title":"BillingUnlinked","description":"No Stripe customer carries this org id.\n\nCarries the org id so the pane can show it with a copy control — this is how\nthe operator learns the id, which does not exist until the customer\nbootstraps their own org."},"Body_import_condition_templates_api_v1_condition_templates_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_condition_templates_api_v1_condition_templates_import_post"},"Body_import_library_assets_api_v1_library_assets_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_library_assets_api_v1_library_assets_import_post"},"Body_upload_template_api_v1_export_templates_post":{"properties":{"name":{"type":"string","title":"Name"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["name","file"],"title":"Body_upload_template_api_v1_export_templates_post"},"BorderEffect":{"properties":{"cloudy":{"type":"integer","enum":[1,2],"title":"Cloudy"}},"additionalProperties":false,"type":"object","required":["cloudy"],"title":"BorderEffect"},"BugReportContext":{"properties":{"replay_url":{"anyOf":[{"type":"string","maxLength":2000,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Replay Url"},"page_url":{"anyOf":[{"type":"string","maxLength":2000,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Page Url"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"web_sha":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Web Sha"},"api_sha":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Api Sha"},"user_agent":{"anyOf":[{"type":"string","maxLength":512,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"User Agent"}},"additionalProperties":false,"type":"object","title":"BugReportContext"},"BulkMoveConditionsRequest":{"properties":{"condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"minItems":1,"title":"Condition Ids"},"target_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Folder Id"},"anchor":{"anyOf":[{"$ref":"#/components/schemas/_AnchorAfter"},{"$ref":"#/components/schemas/_AnchorBefore"},{"$ref":"#/components/schemas/_AnchorAtStart"},{"$ref":"#/components/schemas/_AnchorAtEnd"}],"title":"Anchor"}},"additionalProperties":false,"type":"object","required":["condition_ids","anchor"],"title":"BulkMoveConditionsRequest"},"BulkMoveConditionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"BulkMoveConditionsResponse"},"BulkStatusItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"anyOf":[{"type":"string","enum":["accepted","rejected","completed","cancelled"]},{"type":"null"}],"title":"Status"},"row_version":{"type":"integer","title":"Row Version"}},"additionalProperties":false,"type":"object","required":["id","status","row_version"],"title":"BulkStatusItem"},"BulkStatusRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BulkStatusItem"},"type":"array","maxItems":500,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BulkStatusRequest"},"BulkStatusResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"BulkStatusResponse"},"BulkUpdateConditionsConfigPatch":{"properties":{"rounding":{"anyOf":[{"$ref":"#/components/schemas/Rounding"},{"type":"null"}]},"tile_module":{"anyOf":[{"$ref":"#/components/schemas/TileModule"},{"type":"null"}]},"grid_spacing":{"anyOf":[{"$ref":"#/components/schemas/GridSpacing"},{"type":"null"}]},"display":{"anyOf":[{"$ref":"#/components/schemas/DisplayConfig"},{"type":"null"}]},"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"BulkUpdateConditionsConfigPatch","description":"Partial config patch — each key is optional and replaces that\nsub-object wholesale on the target rows. Empty patch is a no-op."},"BulkUpdateConditionsPatch":{"properties":{"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"layer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Layer Id"},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"config":{"anyOf":[{"$ref":"#/components/schemas/BulkUpdateConditionsConfigPatch"},{"type":"null"}]},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateDerivation"},"type":"array"},{"type":"null"}],"title":"Derivations"}},"additionalProperties":false,"type":"object","title":"BulkUpdateConditionsPatch","description":"Patch applied to every condition in a bulk-update call.\n\nEvery key is optional. Absent = leave-as-is. Present = apply to all.\n`config` is shallow-merged into each row's existing config.\n`derivations`, if present, fully replaces each row's derivation list."},"BulkUpdateConditionsRequest":{"properties":{"condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"minItems":1,"title":"Condition Ids"},"patch":{"$ref":"#/components/schemas/BulkUpdateConditionsPatch"}},"additionalProperties":false,"type":"object","required":["condition_ids"],"title":"BulkUpdateConditionsRequest"},"BulkUpdateConditionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"BulkUpdateConditionsResponse"},"CalibrationData-Input":{"properties":{"drawing_distance":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Drawing Distance"},"drawing_units":{"type":"string","enum":["in","ft","mm","cm","m"],"title":"Drawing Units"},"actual_distance":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Actual Distance"},"actual_units":{"type":"string","enum":["in","ft","mm","cm","m"],"title":"Actual Units"},"source":{"type":"string","enum":["standard","manual","calibrate"],"title":"Source"},"description":{"type":"string","maxLength":200,"minLength":1,"title":"Description"}},"type":"object","required":["drawing_distance","drawing_units","actual_distance","actual_units","source","description"],"title":"CalibrationData","description":"User-entered calibration tuple, the shape stored in pages.calibration JSONB."},"CalibrationData-Output":{"properties":{"drawing_distance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Drawing Distance"},"drawing_units":{"type":"string","enum":["in","ft","mm","cm","m"],"title":"Drawing Units"},"actual_distance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Actual Distance"},"actual_units":{"type":"string","enum":["in","ft","mm","cm","m"],"title":"Actual Units"},"source":{"type":"string","enum":["standard","manual","calibrate"],"title":"Source"},"description":{"type":"string","maxLength":200,"minLength":1,"title":"Description"}},"type":"object","required":["drawing_distance","drawing_units","actual_distance","actual_units","source","description"],"title":"CalibrationData","description":"User-entered calibration tuple, the shape stored in pages.calibration JSONB."},"CancelDraftResponse":{"properties":{"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["warning"],"title":"CancelDraftResponse"},"CapabilitiesResponse":{"properties":{"flags":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Flags"}},"type":"object","required":["flags"],"title":"CapabilitiesResponse"},"ChangeMemberRoleRequest":{"properties":{"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"}},"type":"object","required":["role"],"title":"ChangeMemberRoleRequest"},"ChatActionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActionRow"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ChatActionsResponse"},"CheckboxVariable":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^v_[A-Za-z0-9]{8,16}$","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"hide":{"type":"boolean","title":"Hide","default":false},"kind":{"type":"string","const":"checkbox","title":"Kind"},"default":{"type":"boolean","title":"Default","default":false},"hide_if_zero":{"type":"boolean","title":"Hide If Zero","default":false},"hide_if_not_used":{"type":"boolean","title":"Hide If Not Used","default":false},"clear_if_hidden":{"type":"boolean","title":"Clear If Hidden","default":false}},"additionalProperties":false,"type":"object","required":["id","name","kind"],"title":"CheckboxVariable"},"ClassifySheetTypesResponse":{"properties":{"classified":{"type":"integer","title":"Classified"},"sheet_types":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Sheet Types"}},"type":"object","required":["classified","sheet_types"],"title":"ClassifySheetTypesResponse"},"ClearPageCalibrationResponse":{"properties":{"page":{"$ref":"#/components/schemas/PageDetail"},"deleted_measurement_count":{"type":"integer","title":"Deleted Measurement Count"}},"type":"object","required":["page","deleted_measurement_count"],"title":"ClearPageCalibrationResponse","description":"Result of DELETE /pages/{page_id}/calibration.\n\n`deleted_measurement_count` counts the page-scale linear/area\nmeasurements soft-deleted via on_orphan=delete (0 when the page had\nnone, or was already uncalibrated). Kept in the body — a caller\npassing on_orphan=delete up front never sees the 422's ids."},"CompleteAssistResult":{"properties":{"kind":{"type":"string","const":"complete","title":"Kind","default":"complete"},"vertices_pdf":{"items":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":64,"title":"Vertices Pdf"},"confidence":{"type":"string","enum":["high","low"],"title":"Confidence"}},"type":"object","required":["vertices_pdf","confidence"],"title":"CompleteAssistResult"},"CompleteContext":{"properties":{"placed_vertices":{"items":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":256,"minItems":1,"title":"Placed Vertices"},"tool":{"type":"string","enum":["polyline","polygon"],"title":"Tool"}},"type":"object","required":["placed_vertices","tool"],"title":"CompleteContext"},"Condition":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"geometry_kind":{"type":"string","enum":["count","linear","area"],"title":"Geometry Kind"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"unit":{"type":"string","title":"Unit"},"color":{"type":"string","title":"Color"},"config":{"$ref":"#/components/schemas/ConditionConfig"},"metadata":{"$ref":"#/components/schemas/ConditionMetadata"},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"derivations":{"items":{"$ref":"#/components/schemas/Derivation"},"type":"array","title":"Derivations"},"measurement_count":{"type":"integer","title":"Measurement Count","default":0},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"folder_path":{"type":"string","title":"Folder Path","default":""},"sort_order":{"type":"number","title":"Sort Order","default":0.0},"layer_id":{"type":"string","format":"uuid","title":"Layer Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"},"trace_groups":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraceGroupRef"},"type":"array"},{"type":"null"}],"title":"Trace Groups"}},"type":"object","required":["id","project_id","name","geometry_kind","unit","color","layer_id"],"title":"Condition"},"ConditionConfig":{"properties":{"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}]},"tile_module":{"anyOf":[{"$ref":"#/components/schemas/TileModule"},{"type":"null"}]},"grid_spacing":{"anyOf":[{"$ref":"#/components/schemas/GridSpacing"},{"type":"null"}]},"rounding":{"$ref":"#/components/schemas/Rounding"},"display":{"$ref":"#/components/schemas/DisplayConfig"}},"additionalProperties":false,"type":"object","title":"ConditionConfig"},"ConditionLibraryFolder":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"sort_order":{"type":"number","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"row_version":{"type":"integer","title":"Row Version"}},"additionalProperties":false,"type":"object","required":["id","org_id","parent_folder_id","name","sort_order","created_at","row_version"],"title":"ConditionLibraryFolder"},"ConditionLibraryFolderListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionLibraryFolder"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ConditionLibraryFolderListResponse"},"ConditionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"ConditionListResponse"},"ConditionMetadata":{"properties":{"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"ConditionMetadata","description":"Back-compat metadata. Reads fall back here when config.dimensions\nis empty."},"ConditionTarget":{"properties":{"file_ref":{"type":"string","title":"File Ref"},"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"fallback_page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Fallback Page Id"},"sheet_count":{"type":"integer","title":"Sheet Count","default":0}},"type":"object","required":["file_ref","condition_id","name","color"],"title":"ConditionTarget"},"ConditionTemplate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"geometry_kind":{"type":"string","enum":["count","linear","area"],"title":"Geometry Kind"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color"},"config":{"$ref":"#/components/schemas/ConditionConfig"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"sort_order":{"type":"number","title":"Sort Order"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"row_version":{"type":"integer","title":"Row Version"},"derivations":{"items":{"$ref":"#/components/schemas/Derivation"},"type":"array","title":"Derivations"}},"additionalProperties":false,"type":"object","required":["id","org_id","name","geometry_kind","shape","color","config","notes","attachment_kind","attachment_config","extension_id","phase_code_id","folder_id","sort_order","external_id","created_at","updated_at","row_version"],"title":"ConditionTemplate"},"ConditionTemplateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionTemplate"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ConditionTemplateListResponse"},"ConditionTotal":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"name":{"type":"string","title":"Name"},"unit":{"type":"string","title":"Unit"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"},"measurement_count":{"type":"integer","title":"Measurement Count"},"pending_count":{"type":"integer","title":"Pending Count","default":0}},"type":"object","required":["condition_id","name","unit","total","measurement_count"],"title":"ConditionTotal","description":"Sum of `computed_value` for all measurements of one condition.\n\n`total` is 0 and `measurement_count` is 0 for conditions with no\nmeasurements (LEFT JOIN in the rollup query — those rows still\nappear so the frontend can show \"0 SF\" instead of an empty cell).\n`pending_count` identifies measurements excluded from the sum while\nthey await calibration."},"ConditionVisibilityResponse":{"properties":{"hidden_condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Hidden Condition Ids"}},"type":"object","required":["hidden_condition_ids"],"title":"ConditionVisibilityResponse"},"ConfirmPageVerificationResponse":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"status":{"type":"string","const":"confirmed","title":"Status"},"confirmed_at":{"type":"string","format":"date-time","title":"Confirmed At"},"correction_summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Correction Summary"}},"type":"object","required":["page_id","status","confirmed_at","correction_summary"],"title":"ConfirmPageVerificationResponse"},"ConfirmPdfMarkupMappingRequest":{"properties":{"source_start":{"type":"integer","minimum":1.0,"title":"Source Start"},"target_start":{"type":"integer","minimum":1.0,"title":"Target Start"},"count":{"type":"integer","maximum":2000.0,"minimum":1.0,"title":"Count"}},"additionalProperties":false,"type":"object","required":["source_start","target_start","count"],"title":"ConfirmPdfMarkupMappingRequest"},"ConnectorMapping":{"properties":{"match":{"$ref":"#/components/schemas/MatchConfig"},"placements":{"items":{"oneOf":[{"$ref":"#/components/schemas/FixedCellPlacement"},{"$ref":"#/components/schemas/ListRegionPlacement"},{"$ref":"#/components/schemas/SectionInsertPlacement"},{"$ref":"#/components/schemas/SectionGridPlacement"}],"discriminator":{"propertyName":"kind","mapping":{"fixed_cell":"#/components/schemas/FixedCellPlacement","list_region":"#/components/schemas/ListRegionPlacement","section_grid":"#/components/schemas/SectionGridPlacement","section_insert":"#/components/schemas/SectionInsertPlacement"}}},"type":"array","title":"Placements"}},"type":"object","title":"ConnectorMapping"},"ContextBlock":{"properties":{"type":{"type":"string","const":"context","title":"Type","default":"context"},"text":{"type":"string","title":"Text"},"context":{"$ref":"#/components/schemas/MessageContext"}},"type":"object","required":["text","context"],"title":"ContextBlock","description":"Live state block persisted with a user message.\n\nPersistence-only: exists for audit (`text` is the rendered live block\nexactly as the model saw it; `context` is the structured source).\nDeliberately absent from agent/types.py — at replay it is either\ndropped (non-final user messages) or mapped to a plain TextBlock."},"Conversation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"visibility":{"type":"string","enum":["private","project"],"title":"Visibility"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"}},"type":"object","required":["id","project_id","title","visibility","created_at","updated_at"],"title":"Conversation"},"ConversationDetail":{"properties":{"conversation":{"$ref":"#/components/schemas/Conversation"},"messages":{"items":{"$ref":"#/components/schemas/ConversationMessage"},"type":"array","title":"Messages"}},"type":"object","required":["conversation","messages"],"title":"ConversationDetail","description":"Conversation + its messages, ordered by sequence."},"ConversationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Conversation"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"ConversationListResponse"},"ConversationMessage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"sequence":{"type":"integer","title":"Sequence"},"role":{"$ref":"#/components/schemas/MessageRole"},"content":{"items":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ToolResultBlock"},{"$ref":"#/components/schemas/ContextBlock"}],"discriminator":{"propertyName":"type","mapping":{"context":"#/components/schemas/ContextBlock","text":"#/components/schemas/TextBlock","tool_result":"#/components/schemas/ToolResultBlock","tool_use":"#/components/schemas/ToolUseBlock"}}},{"$ref":"#/components/schemas/UnknownBlock"}]},"type":"array","title":"Content"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"prompt_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Version"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Tokens"},"cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Write Tokens"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","conversation_id","sequence","role","content","created_at"],"title":"ConversationMessage"},"CreateAnnotatedPdfExportRequest":{"properties":{"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"options":{"$ref":"#/components/schemas/AnnotatedPdfExportOptions"}},"additionalProperties":false,"type":"object","required":["drawing_id"],"title":"CreateAnnotatedPdfExportRequest"},"CreateAnnotationLinkRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"target_kind":{"type":"string","enum":["condition","measurement","page","url"],"title":"Target Kind"},"condition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"},"measurement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Measurement Id"},"target_page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Page Id"},"url":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Url"},"label":{"anyOf":[{"type":"string","maxLength":512,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Label"},"dest":{"anyOf":[{"$ref":"#/components/schemas/LinkDest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["target_kind"],"title":"CreateAnnotationLinkRequest"},"CreateAnnotationReplyRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"body":{"type":"string","maxLength":20000,"minLength":1,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$","title":"Body"},"parent_reply_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Reply Id"}},"additionalProperties":false,"type":"object","required":["body"],"title":"CreateAnnotationReplyRequest"},"CreateAnnotationRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"kind":{"type":"string","enum":["note","text","callout","line","polyline","rect","ellipse","polygon","ink","highlight","stamp"],"title":"Kind"},"geometry":{"oneOf":[{"$ref":"#/components/schemas/AnnotationPointGeometry-Input"},{"$ref":"#/components/schemas/AnnotationRectGeometry-Input"},{"$ref":"#/components/schemas/AnnotationCalloutGeometry-Input"},{"$ref":"#/components/schemas/AnnotationPolylineGeometry-Input"},{"$ref":"#/components/schemas/AnnotationPolygonGeometry-Input"},{"$ref":"#/components/schemas/AnnotationInkGeometry-Input"},{"$ref":"#/components/schemas/AnnotationQuadsGeometry-Input"}],"title":"Geometry","discriminator":{"propertyName":"type","mapping":{"callout":"#/components/schemas/AnnotationCalloutGeometry-Input","ink":"#/components/schemas/AnnotationInkGeometry-Input","point":"#/components/schemas/AnnotationPointGeometry-Input","polygon":"#/components/schemas/AnnotationPolygonGeometry-Input","polyline":"#/components/schemas/AnnotationPolylineGeometry-Input","quads":"#/components/schemas/AnnotationQuadsGeometry-Input","rect":"#/components/schemas/AnnotationRectGeometry-Input"}}},"style":{"$ref":"#/components/schemas/AnnotationStyle-Input"},"subject":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Subject"},"contents":{"anyOf":[{"type":"string","maxLength":20000,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Contents"},"visibility":{"type":"string","enum":["private","project"],"title":"Visibility","default":"project"}},"additionalProperties":false,"type":"object","required":["page_id","kind","geometry"],"title":"CreateAnnotationRequest"},"CreateAttachmentRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"filename":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[^/\\\\\\x00-\\x1f\\x7f]+$","title":"Filename"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp"],"title":"Content Type"},"byte_size":{"type":"integer","maximum":10485760.0,"exclusiveMinimum":0.0,"title":"Byte Size"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Sha256"}},"additionalProperties":false,"type":"object","required":["filename","content_type","byte_size","sha256"],"title":"CreateAttachmentRequest"},"CreateAttachmentResponse":{"properties":{"attachment":{"$ref":"#/components/schemas/AnnotationAttachment"},"upload_url":{"type":"string","title":"Upload Url"},"annotation":{"$ref":"#/components/schemas/Annotation"}},"additionalProperties":false,"type":"object","required":["attachment","upload_url","annotation"],"title":"CreateAttachmentResponse"},"CreateBidAreasRequest":{"properties":{"names":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Names"},"parent_bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Bid Area Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["names"],"title":"CreateBidAreasRequest"},"CreateBidAreasResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BidArea"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CreateBidAreasResponse"},"CreateConditionLibraryFolderRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateConditionLibraryFolderRequest"},"CreateConditionRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"geometry_kind":{"type":"string","enum":["count","linear","area"],"title":"Geometry Kind"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#FF0000"},"config":{"$ref":"#/components/schemas/ConditionConfig"},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateDerivation"},"type":"array"},{"type":"null"}],"title":"Derivations"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"layer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Layer Id"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"}},"additionalProperties":false,"type":"object","required":["name","geometry_kind"],"title":"CreateConditionRequest"},"CreateConditionTemplateRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"geometry_kind":{"type":"string","enum":["count","linear","area"],"title":"Geometry Kind"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#FF0000"},"config":{"$ref":"#/components/schemas/ConditionConfig"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateDerivation"},"type":"array"},{"type":"null"}],"title":"Derivations"}},"additionalProperties":false,"type":"object","required":["name","geometry_kind"],"title":"CreateConditionTemplateRequest"},"CreateConversationRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"}},"type":"object","required":["project_id"],"title":"CreateConversationRequest"},"CreateDerivation":{"properties":{"result_type":{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"],"title":"Result Type"},"uom":{"anyOf":[{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"]},{"type":"null"}],"title":"Uom"},"respects_backouts":{"type":"boolean","title":"Respects Backouts","default":true},"respects_attachments":{"type":"boolean","title":"Respects Attachments","default":true}},"additionalProperties":false,"type":"object","required":["result_type"],"title":"CreateDerivation","description":"Derivation payload on create/update. `id` and `ordinal` are\nserver-assigned."},"CreateDrawingRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},"type":"object","required":["name"],"title":"CreateDrawingRequest"},"CreateExtensionRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"variables":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/NumericVariable"},{"$ref":"#/components/schemas/TextVariable"},{"$ref":"#/components/schemas/CheckboxVariable"},{"$ref":"#/components/schemas/DropdownVariable"},{"$ref":"#/components/schemas/FormulaVariable"}],"discriminator":{"propertyName":"kind","mapping":{"checkbox":"#/components/schemas/CheckboxVariable","dropdown":"#/components/schemas/DropdownVariable","formula":"#/components/schemas/FormulaVariable","numeric":"#/components/schemas/NumericVariable","text":"#/components/schemas/TextVariable"}}},"type":"array","maxItems":100},{"type":"null"}],"title":"Variables"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateExtensionRequest"},"CreateFolderRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateFolderRequest"},"CreateImportRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$","title":"Filename"},"source_kind":{"type":"string","enum":["rudus","osp","tpx"],"title":"Source Kind","default":"rudus"},"drawings":{"items":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"type":"array","maxItems":200,"title":"Drawings"}},"additionalProperties":false,"type":"object","required":["filename"],"title":"CreateImportRequest"},"CreateImportResponse":{"properties":{"import_id":{"type":"string","format":"uuid","title":"Import Id"},"uploads":{"items":{"$ref":"#/components/schemas/UploadTarget"},"type":"array","title":"Uploads"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["import_id","uploads","expires_in"],"title":"CreateImportResponse"},"CreateLayerRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateLayerRequest"},"CreateMeasurementForRevisionRequest":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"geometry":{"oneOf":[{"$ref":"#/components/schemas/PointGeometry-Input"},{"$ref":"#/components/schemas/PolylineGeometry-Input"},{"$ref":"#/components/schemas/PolygonGeometry-Input"}],"title":"Geometry","discriminator":{"propertyName":"type","mapping":{"point":"#/components/schemas/PointGeometry-Input","polygon":"#/components/schemas/PolygonGeometry-Input","polyline":"#/components/schemas/PolylineGeometry-Input"}}},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},"type":"object","required":["condition_id","page_id","geometry","revision_set_id"],"title":"CreateMeasurementForRevisionRequest","description":"HTTP create payload. The field is required; null supports revisionless fixtures."},"CreateMeasurementRequest":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"geometry":{"oneOf":[{"$ref":"#/components/schemas/PointGeometry-Input"},{"$ref":"#/components/schemas/PolylineGeometry-Input"},{"$ref":"#/components/schemas/PolygonGeometry-Input"}],"title":"Geometry","discriminator":{"propertyName":"type","mapping":{"point":"#/components/schemas/PointGeometry-Input","polygon":"#/components/schemas/PolygonGeometry-Input","polyline":"#/components/schemas/PolylineGeometry-Input"}}},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"}},"type":"object","required":["condition_id","page_id","geometry"],"title":"CreateMeasurementRequest"},"CreateOrgInviteRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"role":{"type":"string","enum":["admin","member","viewer"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"CreateOrgInviteRequest"},"CreateOrgRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateOrgRequest"},"CreatePdfMarkupImportRequest":{"properties":{"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"}},"additionalProperties":false,"type":"object","required":["drawing_id"],"title":"CreatePdfMarkupImportRequest"},"CreatePdfMarkupImportResponse":{"properties":{"import_id":{"type":"string","format":"uuid","title":"Import Id"},"upload_url":{"type":"string","title":"Upload Url"},"storage_path":{"type":"string","title":"Storage Path"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["import_id","upload_url","storage_path","expires_in"],"title":"CreatePdfMarkupImportResponse"},"CreateProjectExportRequest":{"properties":{"mode":{"type":"string","enum":["standard","verified"],"title":"Mode","default":"standard"}},"type":"object","title":"CreateProjectExportRequest"},"CreateProjectGrantRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"CreateProjectGrantRequest","description":"Internal sharing only: the grantee must already be a member of the\nproject's org. External guests arrive through project invites (PR3)."},"CreateProjectInviteRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"CreateProjectInviteRequest","description":"No `role` and no `access_level`. A project grant is admission; an external\nguest holds no org role, so there is nothing to choose (spec §3.2's ruling)."},"CreateProjectRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"status":{"$ref":"#/components/schemas/ProjectStatus","default":"bidding"}},"type":"object","required":["org_id","name"],"title":"CreateProjectRequest"},"CreateRevisionDiffExportRequest":{"properties":{"from_revision_id":{"type":"string","format":"uuid","title":"From Revision Id"},"to_revision_id":{"type":"string","format":"uuid","title":"To Revision Id"},"manifest":{"$ref":"#/components/schemas/RevisionDiffVisualManifest"},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"additionalProperties":false,"type":"object","required":["from_revision_id","to_revision_id","manifest"],"title":"CreateRevisionDiffExportRequest"},"CreateRevisionRequest":{"properties":{"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"}},"type":"object","required":["label"],"title":"CreateRevisionRequest"},"CreateRulerRequest":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x1":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X1"},"y1":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y1"},"x2":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X2"},"y2":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y2"}},"additionalProperties":false,"type":"object","required":["page_id","x1","y1","x2","y2"],"title":"CreateRulerRequest"},"CreateScaleRegionForRevisionRequest":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Height"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},"additionalProperties":false,"type":"object","required":["x","y","width","height","revision_set_id"],"title":"CreateScaleRegionForRevisionRequest"},"CreateSupportMessageRequest":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["message","bug_report"],"title":"Kind"},"body":{"type":"string","minLength":1,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$","title":"Body"},"context":{"anyOf":[{"$ref":"#/components/schemas/BugReportContext"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","kind","body"],"title":"CreateSupportMessageRequest"},"CreateZoneRegionBody":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Height"}},"additionalProperties":false,"type":"object","required":["page_id","x","y","width","height"],"title":"CreateZoneRegionBody"},"CreateZoneRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"region":{"anyOf":[{"$ref":"#/components/schemas/CreateZoneRegionBody"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"CreateZoneRequest"},"DecisionResult":{"properties":{"outcome":{"type":"string","enum":["applied","drifted","conflict","failed","noop","rejected","undone","redone"],"title":"Outcome"},"rows":{"items":{"$ref":"#/components/schemas/ActionRow"},"type":"array","title":"Rows"}},"type":"object","required":["outcome","rows"],"title":"DecisionResult"},"DeleteBidAreaResponse":{"properties":{"bid_area_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Bid Area Ids"}},"type":"object","required":["bid_area_ids"],"title":"DeleteBidAreaResponse"},"DeleteConditionResponse":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"stamped_measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Stamped Measurement Ids"},"stamped_multiplier_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Stamped Multiplier Ids"},"affected_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Affected Page Ids"}},"type":"object","required":["condition_id","stamped_measurement_ids","stamped_multiplier_ids","affected_page_ids"],"title":"DeleteConditionResponse"},"DeleteExtensionResponse":{"properties":{"extension_id":{"type":"string","format":"uuid","title":"Extension Id"}},"type":"object","required":["extension_id"],"title":"DeleteExtensionResponse"},"DeleteFolderResponse":{"properties":{"folder_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Folder Ids"},"condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Condition Ids"},"stamped_measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Stamped Measurement Ids"},"stamped_multiplier_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Stamped Multiplier Ids"},"affected_page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Affected Page Ids"}},"type":"object","required":["folder_ids","condition_ids","stamped_measurement_ids","stamped_multiplier_ids","affected_page_ids"],"title":"DeleteFolderResponse"},"DeleteLayerResponse":{"properties":{"layer_id":{"type":"string","format":"uuid","title":"Layer Id"},"reassigned_condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Reassigned Condition Ids"}},"type":"object","required":["layer_id","reassigned_condition_ids"],"title":"DeleteLayerResponse"},"DeleteRevisionResponse":{"properties":{"switched_to":{"type":"string","format":"uuid","title":"Switched To"}},"type":"object","required":["switched_to"],"title":"DeleteRevisionResponse"},"DeleteZoneRegionResponse":{"properties":{"zone_region_id":{"type":"string","format":"uuid","title":"Zone Region Id"}},"type":"object","required":["zone_region_id"],"title":"DeleteZoneRegionResponse"},"DeleteZoneResponse":{"properties":{"zone_id":{"type":"string","format":"uuid","title":"Zone Id"},"zone_region_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Zone Region Ids"}},"type":"object","required":["zone_id","zone_region_ids"],"title":"DeleteZoneResponse"},"Derivation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ordinal":{"type":"integer","minimum":1.0,"title":"Ordinal"},"result_type":{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"],"title":"Result Type"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"respects_backouts":{"type":"boolean","title":"Respects Backouts","default":true},"respects_attachments":{"type":"boolean","title":"Respects Attachments","default":true}},"additionalProperties":false,"type":"object","required":["id","ordinal","result_type","uom"],"title":"Derivation","description":"One row of `condition_derivations`."},"DerivationValue":{"properties":{"ordinal":{"type":"integer","minimum":1.0,"title":"Ordinal"},"result_type":{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"],"title":"Result Type"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"value":{"type":"number","title":"Value"}},"type":"object","required":["ordinal","result_type","uom","value"],"title":"DerivationValue","description":"One row of a measurement's `computed_derivations` JSONB array.\n\nPer docs/superpowers/specs/2026-05-21-derivation-compute-design.md and ADR-0031.\nMirrors the ordinal/result_type/uom of the parent condition's derivation;\n`value` is in the declared `uom`'s units (boundary conversion happens in\n`services/derivation_compute._to_uom`)."},"DetailScaleProposals":{"properties":{"scales":{"items":{"$ref":"#/components/schemas/StatedScale"},"type":"array","title":"Scales"}},"type":"object","required":["scales"],"title":"DetailScaleProposals","description":"Every scale a multi-scale sheet states — the stated-scales residue surface\n(RUD-633 design §7.2; the RUD-315 proposal arm retired in favour of worker-side\nsuggestions, design §7.5).\n\n`scales` is non-empty iff the page states >= 2 distinct real scales."},"Dimensions":{"properties":{"width_in":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Width In"},"thickness_in":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Thickness In"},"height_in":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Height In"},"slope":{"anyOf":[{"type":"string","pattern":"^\\d+:\\d+$"},{"type":"null"}],"title":"Slope"}},"additionalProperties":false,"type":"object","title":"Dimensions","description":"Geometric parameters. Field meaning depends on (geometry_kind, shape).\n\nCount + Circle/Square: width_in = diameter/side; height_in = vertical extrusion.\nCount + Rectangle:     width_in = x footprint; thickness_in = y footprint;\n                       height_in = vertical extrusion.\nLinear:                height_in (vertical face), thickness_in (material thickness), slope.\nArea:                  thickness_in (material thickness), slope.\n\nPer ADR-0040 and docs/superpowers/specs/2026-05-27-condition-render-dims-design.md §3.1.\nValues are decimal inches (ADR-0091); pre-existing integer payloads coerce."},"DisplayConfig":{"properties":{"name":{"type":"boolean","title":"Name","default":false},"dimension":{"type":"boolean","title":"Dimension","default":false},"pattern_while_drawing":{"type":"boolean","title":"Pattern While Drawing","default":false}},"additionalProperties":false,"type":"object","title":"DisplayConfig"},"Drawing":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"current_extraction_status":{"anyOf":[{"type":"string","enum":["pending","running","completed","failed"]},{"type":"null"}],"title":"Current Extraction Status"},"current_sheets_status":{"anyOf":[{"type":"string","enum":["pending","running","completed","failed"]},{"type":"null"}],"title":"Current Sheets Status"}},"type":"object","required":["id","project_id","name","created_at"],"title":"Drawing","description":"A drawing — one PDF set within a project."},"DrawingDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"current_extraction_status":{"anyOf":[{"type":"string","enum":["pending","running","completed","failed"]},{"type":"null"}],"title":"Current Extraction Status"},"current_sheets_status":{"anyOf":[{"type":"string","enum":["pending","running","completed","failed"]},{"type":"null"}],"title":"Current Sheets Status"},"current_extraction_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Extraction Error"},"sheets_named_count":{"type":"integer","title":"Sheets Named Count","default":0},"page_count":{"type":"integer","title":"Page Count","default":0},"scale_pending_page_count":{"type":"integer","title":"Scale Pending Page Count","default":0},"scale_applied_result_count":{"type":"integer","title":"Scale Applied Result Count","default":0},"current_extraction_is_stale":{"type":"boolean","title":"Current Extraction Is Stale","default":false},"current_extraction_analyzed":{"type":"boolean","title":"Current Extraction Analyzed","default":false}},"type":"object","required":["id","project_id","name","created_at"],"title":"DrawingDetail","description":"Extends Drawing with the latest extraction's status and error, for polling\nand failed-state retry UX.\n\n`current_extraction_status` is `None` if no extraction has been enqueued yet\n(e.g., drawing record created but `/ingest` not called).\n`current_extraction_error` is `None` unless the latest extraction is `failed`,\nin which case it carries the parser error string.\n`current_sheets_status` tracks the latest Step-3 sheet-naming run (ADR-0060),\nwhich fans out in parallel with text analysis and finishes AFTER ingest\ncompletes. The FE polls while it is non-terminal and refetches pages when it\nflips to `completed` (names arrive after `current_extraction_status`).\n`sheets_named_count` counts pages with a checkpointed naming read in the\nlatest sheets run (`metadata->'checkpoint'->'naming'` keys). It resumes\nacross redeliveries and resets to 0 when a new run starts. `page_count` is\nthe drawing's current page-row count. The ingest pill consumes both for\n\"Naming sheets X/X\".\n`current_extraction_is_stale` is True when the latest extraction is\nin-flight (`pending`/`running`) and its attempt clock (`started_at`)\nis older than the API's staleness horizon — the FE renders the\nstale-ingest retry affordance on it (RUD-152). Server-computed;\nthe FE never re-derives it.\n`scale_applied_result_count` counts autoset apply receipts\n(`page_scale_results.applied = true`) on the drawing's current pages.\nWithin a stable extraction era it is a level-triggered revision signal:\nthe web client refreshes its pages cache whenever the value changes\n(a backfill promotion or live apply materialized a scale). Across a\nre-ingest the era resets and the existing pending-count >0->0 transition\nowns the refresh instead. `scale_pending_page_count` only drives poll\ncadence. Scale-verifier v2 Plan 5 design §2.\n`current_extraction_analyzed` is True once Stage-2 analysis stamped\n`pdf_extractions.analyzed_at` on the latest extraction. It exists to\ndisambiguate `scale_pending_page_count == 0`, which the pending count\nalone cannot do: the count joins on `analyzed_at IS NOT NULL`, so it\nreads 0 both before autoset has any job in flight and after every page\nreached a terminal result. False + 0 means \"not enqueued yet\" (Stage-2\nis still running, possibly behind a larger drawing on the single\nanalyze_pdf consumer); True + 0 means \"autoset ran and every page is\nsettled\". Read-only diagnostic — it does not change what the pending\ncount means or the cadence it drives (RUD-480)."},"DrawingListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Drawing"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"DrawingListResponse"},"DropdownOption":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^o_[A-Za-z0-9]{8,16}$","title":"Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"DropdownOption"},"DropdownVariable":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^v_[A-Za-z0-9]{8,16}$","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"hide":{"type":"boolean","title":"Hide","default":false},"kind":{"type":"string","const":"dropdown","title":"Kind"},"options":{"items":{"$ref":"#/components/schemas/DropdownOption"},"type":"array","minItems":1,"title":"Options"},"default_option_id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^o_[A-Za-z0-9]{8,16}$","title":"Default Option Id"},"hide_if_not_used":{"type":"boolean","title":"Hide If Not Used","default":false},"clear_if_hidden":{"type":"boolean","title":"Clear If Hidden","default":false}},"additionalProperties":false,"type":"object","required":["id","name","kind","options","default_option_id"],"title":"DropdownVariable"},"DuplicateConditionForRevisionRequest":{"properties":{"condition":{"$ref":"#/components/schemas/CreateConditionRequest"},"condition_multiplier":{"anyOf":[{"$ref":"#/components/schemas/DuplicateConditionMultiplier"},{"type":"null"}]},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},"additionalProperties":false,"type":"object","required":["condition","revision_set_id"],"title":"DuplicateConditionForRevisionRequest"},"DuplicateConditionMultiplier":{"properties":{"factor":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Factor"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"additionalProperties":false,"type":"object","required":["factor"],"title":"DuplicateConditionMultiplier","description":"Condition-scoped multiplier folded into an atomic duplicate.\n\nfactor parity with MultiplierCreate.factor (Decimal, > 0). The client\nfolds factor 1 to a null condition_multiplier instead of sending it."},"EmptyTarget":{"properties":{"sheet":{"type":"string","title":"Sheet"},"cell":{"type":"string","title":"Cell"},"expected_key":{"type":"string","title":"Expected Key"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"}},"type":"object","required":["sheet","cell","expected_key","uom"],"title":"EmptyTarget"},"EntityRef":{"properties":{"kind":{"type":"string","enum":["condition","measurement","drawing"],"title":"Kind"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["kind","file_id","label"],"title":"EntityRef"},"ExportTemplate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"original_filename":{"type":"string","title":"Original Filename"}},"type":"object","required":["id","name","original_filename"],"title":"ExportTemplate"},"Extension":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"name":{"type":"string","title":"Name"},"variables":{"items":{"oneOf":[{"$ref":"#/components/schemas/NumericVariable"},{"$ref":"#/components/schemas/TextVariable"},{"$ref":"#/components/schemas/CheckboxVariable"},{"$ref":"#/components/schemas/DropdownVariable"},{"$ref":"#/components/schemas/FormulaVariable"}],"discriminator":{"propertyName":"kind","mapping":{"checkbox":"#/components/schemas/CheckboxVariable","dropdown":"#/components/schemas/DropdownVariable","formula":"#/components/schemas/FormulaVariable","numeric":"#/components/schemas/NumericVariable","text":"#/components/schemas/TextVariable"}}},"type":"array","maxItems":100,"title":"Variables"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","owner_id","name","created_at","updated_at"],"title":"Extension"},"ExtensionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Extension"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"ExtensionListResponse"},"Extraction":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"status":{"type":"string","enum":["pending","running","completed","failed"],"title":"Status"},"parser_version":{"type":"string","title":"Parser Version"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","drawing_id","status","parser_version","started_at"],"title":"Extraction","description":"One parsing run on a drawing's PDF — lineage per ADR-0004."},"FindSimilarCandidate":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"score":{"type":"number","title":"Score"}},"type":"object","required":["x","y","score"],"title":"FindSimilarCandidate","description":"One S-layer candidate position, PDF user-space."},"FindSimilarResponse":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/FindSimilarCandidate"},"type":"array","title":"Candidates"}},"type":"object","required":["candidates"],"title":"FindSimilarResponse","description":"Ranked, filtered candidates for a find-similar invocation."},"FixedCellPlacement":{"properties":{"kind":{"type":"string","const":"fixed_cell","title":"Kind","default":"fixed_cell"},"sheet":{"type":"string","title":"Sheet"},"cell":{"type":"string","title":"Cell"},"match_key":{"$ref":"#/components/schemas/MatchKey"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"result_type":{"anyOf":[{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"]},{"type":"null"}],"title":"Result Type"}},"type":"object","required":["sheet","cell","match_key","uom"],"title":"FixedCellPlacement"},"FlagPageVerificationRequest":{"properties":{"flagged":{"type":"boolean","title":"Flagged"}},"type":"object","required":["flagged"],"title":"FlagPageVerificationRequest"},"FlagPageVerificationResponse":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"color_ambiguity_flagged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Color Ambiguity Flagged At"}},"type":"object","required":["page_id","color_ambiguity_flagged_at"],"title":"FlagPageVerificationResponse"},"Folder":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"number","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","parent_folder_id","name","sort_order","created_at"],"title":"Folder"},"FolderListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"FolderListResponse"},"FormulaOverwrite":{"properties":{"sheet":{"type":"string","title":"Sheet"},"cell":{"type":"string","title":"Cell"},"previous_formula":{"type":"string","title":"Previous Formula"}},"type":"object","required":["sheet","cell","previous_formula"],"title":"FormulaOverwrite"},"FormulaVariable":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^v_[A-Za-z0-9]{8,16}$","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"hide":{"type":"boolean","title":"Hide","default":false},"kind":{"type":"string","const":"formula","title":"Kind"},"expression":{"type":"string","maxLength":2000,"title":"Expression","default":""},"unit":{"anyOf":[{"type":"string","enum":["inches","feet","yards","miles","millimeters","centimeters","meters","kilometers"]},{"type":"string","enum":["sq_inches","sq_feet","sq_yards","sq_miles","sq_mm","sq_cm","sq_meters","sq_km","acres","hectares"]},{"type":"string","enum":["cu_inches","cu_feet","cu_yards","cu_meters","us_fl_oz","us_pints","us_quarts","us_gallons","milliliters","liters","uk_fl_oz","uk_pints","uk_quarts","uk_gallons"]},{"type":"string","const":"each"},{"type":"null"}],"title":"Unit"},"decimal_places":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Decimal Places","default":2},"hide_if_zero":{"type":"boolean","title":"Hide If Zero","default":false}},"additionalProperties":false,"type":"object","required":["id","name","kind"],"title":"FormulaVariable"},"FromLibraryRequest":{"properties":{"template_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"minItems":1,"title":"Template Ids"},"target_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Folder Id"}},"additionalProperties":false,"type":"object","required":["template_ids"],"title":"FromLibraryRequest"},"FromLibraryResponse":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/Condition"},"type":"array","title":"Conditions"},"created_folder_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Created Folder Ids"}},"additionalProperties":false,"type":"object","required":["conditions","created_folder_ids"],"title":"FromLibraryResponse"},"GridAlignment-Input":{"properties":{"origin":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2,"title":"Origin"},"angle_deg":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Angle Deg","default":"0"}},"type":"object","required":["origin"],"title":"GridAlignment","description":"Rebar-grid pose for an area measurement (spec 2026-07-13 §5.2).\n\nStored inside geometry JSONB — additive, no DDL (ADR-0097 precedent).\nangle_deg is CCW-positive PDF user-space, normalized to [0, 180): a line\nfamily has 180° symmetry, unlike marker glyphs' [0, 360). New normalizer —\nborrows only the round-then-normalize technique from ADR-0097."},"GridAlignment-Output":{"properties":{"origin":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2,"title":"Origin"},"angle_deg":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Angle Deg","default":"0"}},"type":"object","required":["origin"],"title":"GridAlignment","description":"Rebar-grid pose for an area measurement (spec 2026-07-13 §5.2).\n\nStored inside geometry JSONB — additive, no DDL (ADR-0097 precedent).\nangle_deg is CCW-positive PDF user-space, normalized to [0, 180): a line\nfamily has 180° symmetry, unlike marker glyphs' [0, 360). New normalizer —\nborrows only the round-then-normalize technique from ADR-0097."},"GridColumn":{"properties":{"column":{"type":"string","title":"Column"},"source":{"type":"string","enum":["derivation","dimension","name","size_string","const"],"title":"Source"},"uom":{"anyOf":[{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"]},{"type":"null"}],"title":"Uom"},"result_type":{"anyOf":[{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"]},{"type":"null"}],"title":"Result Type"},"dimension":{"anyOf":[{"type":"string","enum":["width_in","thickness_in","height_in"]},{"type":"null"}],"title":"Dimension"},"unit":{"type":"string","enum":["in","ft"],"title":"Unit","default":"in"},"const_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Const Value"}},"type":"object","required":["column","source"],"title":"GridColumn","description":"One column write per grid row in a SectionGridPlacement.\n\n``source`` selects what lands in the cell:\n- ``derivation``: the condition's summed value for ``uom``.\n- ``dimension``: the condition's ``dimensions.<dimension>`` (inches),\n  converted to feet when ``unit == \"ft\"``.\n- ``name``: the condition's display name.\n- ``size_string``: a \"WxH\" string built from the condition's dimensions.\n- ``const``: the fixed ``const_value``."},"GridSpacing":{"properties":{"x_in":{"type":"integer","minimum":0.0,"title":"X In"},"y_in":{"type":"integer","minimum":0.0,"title":"Y In"}},"additionalProperties":false,"type":"object","required":["x_in","y_in"],"title":"GridSpacing"},"HelpMessageRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/HelpTurn"},"type":"array","maxItems":40,"minItems":1,"title":"Messages"},"pathname":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Pathname"}},"type":"object","required":["messages"],"title":"HelpMessageRequest"},"HelpTurn":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":8000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"HelpTurn"},"ImageRefPart":{"properties":{"type":{"type":"string","const":"image_ref","title":"Type","default":"image_ref"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"region":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},{"type":"null"}],"title":"Region"},"purpose":{"type":"string","enum":["page","tile","region"],"title":"Purpose","default":"page"}},"type":"object","required":["page_id"],"title":"ImageRefPart","description":"Persisted image reference nested inside a tool_result only.\n\nRollback caveat: pre-change code cannot parse rows whose tool_result\ncontent is a list, even though image_ref is not a top-level block type."},"Import":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"source_kind":{"type":"string","enum":["rudus","osp","tpx"],"title":"Source Kind"},"status":{"type":"string","enum":["uploading","converting","ready_for_plan_review","applying_plan","validating","creating_graph","ingesting_pdfs","calibrating","creating_takeoff","inserting_measurements","inserting_annotations","verifying","ready_for_review","confirmed","failed","reverting","reverted"],"title":"Status"},"storage_path":{"type":"string","title":"Storage Path"},"progress":{"additionalProperties":true,"type":"object","title":"Progress"},"report":{"additionalProperties":true,"type":"object","title":"Report"},"plan":{"anyOf":[{"$ref":"#/components/schemas/ImportPlan"},{"type":"null"}]},"skips":{"anyOf":[{"$ref":"#/components/schemas/SkipRecord"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","source_kind","status","storage_path","created_at","updated_at"],"title":"Import"},"ImportListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Import"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ImportListResponse"},"ImportPlan":{"properties":{"summary":{"$ref":"#/components/schemas/PlanSummary"},"auto_fixed":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array","title":"Auto Fixed"},"warnings":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array","title":"Warnings"},"errors":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array","title":"Errors"}},"type":"object","required":["summary"],"title":"ImportPlan"},"ImportReview":{"properties":{"import_id":{"type":"string","format":"uuid","title":"Import Id"},"source_kind":{"type":"string","enum":["rudus","osp","tpx"],"title":"Source Kind"},"report":{"$ref":"#/components/schemas/ReviewReport"},"skipped_issues":{"items":{"$ref":"#/components/schemas/PlanIssue"},"type":"array","title":"Skipped Issues"},"condition_targets":{"items":{"$ref":"#/components/schemas/ConditionTarget"},"type":"array","title":"Condition Targets"},"page_targets":{"items":{"$ref":"#/components/schemas/PageTarget"},"type":"array","title":"Page Targets"}},"type":"object","required":["import_id","source_kind","report"],"title":"ImportReview"},"ImportReviewResponse":{"properties":{"review":{"anyOf":[{"$ref":"#/components/schemas/ImportReview"},{"type":"null"}]}},"type":"object","title":"ImportReviewResponse"},"ImportRowReport":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"action":{"type":"string","enum":["create","skip_exists","skip_name_conflict","error"],"title":"Action"},"blocking_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Blocking Template Id"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"additionalProperties":false,"type":"object","required":["row_number","action"],"title":"ImportRowReport"},"ImportSummary":{"properties":{"templates_created":{"type":"integer","title":"Templates Created","default":0},"templates_skipped":{"type":"integer","title":"Templates Skipped","default":0},"folders_created":{"type":"integer","title":"Folders Created","default":0},"rows_in_error":{"type":"integer","title":"Rows In Error","default":0},"warnings":{"type":"integer","title":"Warnings","default":0},"unresolved_references":{"type":"integer","title":"Unresolved References","default":0}},"additionalProperties":false,"type":"object","title":"ImportSummary"},"IngestResponse":{"properties":{"extraction":{"$ref":"#/components/schemas/Extraction"},"created":{"type":"boolean","title":"Created"}},"type":"object","required":["extraction","created"],"title":"IngestResponse","description":"Response to POST /api/v1/drawings/{id}/ingest.\n\nReturns the same shape whether the call newly enqueued the work\n(`created=True`) or returned an already-in-flight extraction\n(`created=False`). Idempotent at the DB level via the partial\nunique index `uq_pdf_extractions_in_flight`."},"InviteAccepted":{"properties":{"kind":{"type":"string","enum":["org","project"],"title":"Kind"},"email":{"type":"string","title":"Email"},"created_account":{"type":"boolean","title":"Created Account"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["kind","email","created_account"],"title":"InviteAccepted"},"InvitePreview":{"properties":{"kind":{"type":"string","enum":["org","project"],"title":"Kind"},"email":{"type":"string","title":"Email"},"org_name":{"type":"string","title":"Org Name"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"account_exists":{"type":"boolean","title":"Account Exists","description":"Whether the invited email already has an account. This is not an open account-existence oracle: preview returns it only after a valid, unexpired, unrevoked bearer invite token has already disclosed the same email."}},"type":"object","required":["kind","email","org_name","account_exists"],"title":"InvitePreview","description":"One preview for both invite kinds, discriminated by `kind` (spec §9).\n\nDeliberately one model with a discriminant and a nullable sibling rather than\nan annotated union: FastAPI inlines an anonymous union into the OpenAPI\ndocument, so `components.schemas.InvitePreview` would stop existing and every\nTypeScript consumer would change name for no behavioural gain."},"KeptTemplate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"row_version":{"type":"integer","title":"Row Version"}},"additionalProperties":false,"type":"object","required":["id","name","row_version"],"title":"KeptTemplate"},"Layer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"number","title":"Sort Order"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"condition_count":{"type":"integer","title":"Condition Count","default":0},"measurement_count":{"type":"integer","title":"Measurement Count","default":0}},"type":"object","required":["id","project_id","name","sort_order","is_default","created_at"],"title":"Layer"},"LayerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Layer"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"LayerListResponse"},"LayerVisibilityResponse":{"properties":{"hidden_layer_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Hidden Layer Ids"}},"type":"object","required":["hidden_layer_ids"],"title":"LayerVisibilityResponse"},"LibraryAssetsImportReport":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"assets_sha256":{"type":"string","title":"Assets Sha256"},"summary":{"$ref":"#/components/schemas/LibraryAssetsSummary"},"items":{"items":{"$ref":"#/components/schemas/AssetItemReport"},"type":"array","title":"Items","default":[]}},"additionalProperties":false,"type":"object","required":["dry_run","assets_sha256","summary"],"title":"LibraryAssetsImportReport"},"LibraryAssetsSummary":{"properties":{"extensions_created":{"type":"integer","title":"Extensions Created","default":0},"extensions_skipped":{"type":"integer","title":"Extensions Skipped","default":0},"phase_codes_created":{"type":"integer","title":"Phase Codes Created","default":0},"phase_codes_skipped":{"type":"integer","title":"Phase Codes Skipped","default":0},"warnings":{"type":"integer","title":"Warnings","default":0}},"additionalProperties":false,"type":"object","title":"LibraryAssetsSummary"},"LibraryImportListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LibraryImportRecord"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items","next_cursor"],"title":"LibraryImportListResponse"},"LibraryImportRecord":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","title":"Filename"},"sheet_sha256":{"type":"string","title":"Sheet Sha256"},"schema_version":{"type":"integer","title":"Schema Version"},"summary":{"$ref":"#/components/schemas/ImportSummary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"reverted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reverted At"},"reverted_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reverted By"},"templates_remaining":{"type":"integer","title":"Templates Remaining"}},"additionalProperties":false,"type":"object","required":["id","filename","sheet_sha256","schema_version","summary","created_at","created_by","reverted_at","reverted_by","templates_remaining"],"title":"LibraryImportRecord"},"LibraryImportReport":{"properties":{"import_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Import Id"},"dry_run":{"type":"boolean","title":"Dry Run"},"sheet_sha256":{"type":"string","title":"Sheet Sha256"},"schema_version":{"type":"integer","title":"Schema Version"},"summary":{"$ref":"#/components/schemas/ImportSummary"},"file_errors":{"items":{"type":"string"},"type":"array","title":"File Errors","default":[]},"file_warnings":{"items":{"type":"string"},"type":"array","title":"File Warnings","default":[]},"rows":{"items":{"$ref":"#/components/schemas/ImportRowReport"},"type":"array","title":"Rows","default":[]},"created_folder_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Created Folder Ids","default":[]},"folders_to_create":{"items":{"type":"string"},"type":"array","title":"Folders To Create","default":[]}},"additionalProperties":false,"type":"object","required":["import_id","dry_run","sheet_sha256","schema_version","summary"],"title":"LibraryImportReport"},"LineSegmentListResponse":{"properties":{"segments":{"items":{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":4,"minItems":4},"type":"array","title":"Segments"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["segments"],"title":"LineSegmentListResponse","description":"Straight-line segments from a page's vector geometry blob (stroked or filled paths).\n\nCandidate geometry for takeoff autocomplete (spec\n2026-07-02-line-autocomplete-design.md). Each entry is\n(x1, y1, x2, y2) in PDF user-space — the same coordinate space as\nmeasurement geometry. Empty when the page has no geometry blob\n(raster sheet, pre-geometry ingest) or the blob is unavailable.\n`truncated` is true when the server cap dropped segments."},"LinkDest":{"properties":{"rect":{"$ref":"#/components/schemas/LinkDestRect"},"zoom":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Zoom"}},"additionalProperties":false,"type":"object","required":["rect"],"title":"LinkDest"},"LinkDestRect":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"w":{"type":"number","exclusiveMinimum":0.0,"title":"W"},"h":{"type":"number","exclusiveMinimum":0.0,"title":"H"}},"additionalProperties":false,"type":"object","required":["x","y","w","h"],"title":"LinkDestRect"},"LinkNav":{"properties":{"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"page_number":{"type":"integer","title":"Page Number"}},"additionalProperties":false,"type":"object","required":["drawing_id","page_id","page_number"],"title":"LinkNav"},"LinkWriteResponse":{"properties":{"link":{"$ref":"#/components/schemas/AnnotationLink"},"annotation":{"$ref":"#/components/schemas/Annotation"}},"additionalProperties":false,"type":"object","required":["link","annotation"],"title":"LinkWriteResponse"},"ListRegionPlacement":{"properties":{"kind":{"type":"string","const":"list_region","title":"Kind","default":"list_region"},"sheet":{"type":"string","title":"Sheet"},"start_row":{"type":"integer","minimum":1.0,"title":"Start Row"},"key_column":{"type":"string","title":"Key Column"},"key_type":{"type":"string","enum":["code","name"],"title":"Key Type"},"columns":{"additionalProperties":{"type":"string"},"type":"object","title":"Columns"},"on_unmatched_template_row":{"type":"string","enum":["leave","clear"],"title":"On Unmatched Template Row","default":"leave"},"on_extra_quantity":{"type":"string","enum":["append","ignore"],"title":"On Extra Quantity","default":"append"}},"type":"object","required":["sheet","start_row","key_column","key_type","columns"],"title":"ListRegionPlacement"},"MappingProposal":{"properties":{"placements":{"items":{"$ref":"#/components/schemas/ProposedPlacement"},"type":"array","title":"Placements"},"unplaced_quantities":{"items":{"$ref":"#/components/schemas/UnplacedQuantity"},"type":"array","title":"Unplaced Quantities"},"target_sheets":{"items":{"type":"string"},"type":"array","title":"Target Sheets"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"MappingProposal"},"MatchConfig":{"properties":{"strategy":{"type":"string","const":"code_then_name","title":"Strategy","default":"code_then_name"},"name_match":{"type":"string","const":"normalized_exact","title":"Name Match","default":"normalized_exact"}},"type":"object","title":"MatchConfig"},"MatchKey":{"properties":{"type":{"type":"string","enum":["code","name"],"title":"Type"},"value":{"type":"string","title":"Value"}},"type":"object","required":["type","value"],"title":"MatchKey"},"MatchedPlacement":{"properties":{"key_type":{"type":"string","enum":["code","name"],"title":"Key Type"},"key":{"type":"string","title":"Key"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"value":{"type":"number","title":"Value"},"sheet":{"type":"string","title":"Sheet"},"cell":{"type":"string","title":"Cell"},"result_type":{"anyOf":[{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"]},{"type":"null"}],"title":"Result Type"}},"type":"object","required":["key_type","key","uom","value","sheet","cell"],"title":"MatchedPlacement"},"MatchingConflict":{"properties":{"sheet_number":{"type":"string","title":"Sheet Number"},"page_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Page Ids"}},"type":"object","required":["sheet_number","page_ids"],"title":"MatchingConflict"},"MatchingDraftResponse":{"properties":{"draft":{"$ref":"#/components/schemas/RevisionDraft"},"plan":{"$ref":"#/components/schemas/MatchingPlan"},"naming":{"$ref":"#/components/schemas/NamingStatus"},"proposed":{"type":"boolean","title":"Proposed"}},"type":"object","required":["draft","plan","naming","proposed"],"title":"MatchingDraftResponse"},"MatchingPlan":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/MatchingPlanMatch"},"type":"array","title":"Matches"},"new_pages":{"items":{"type":"string","format":"uuid"},"type":"array","title":"New Pages"},"removed_identities":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Removed Identities"},"carried_import":{"type":"boolean","title":"Carried Import"},"conflicts":{"items":{"$ref":"#/components/schemas/MatchingConflict"},"type":"array","title":"Conflicts"}},"type":"object","required":["matches","new_pages","removed_identities","carried_import","conflicts"],"title":"MatchingPlan"},"MatchingPlanMatch":{"properties":{"new_page_id":{"type":"string","format":"uuid","title":"New Page Id"},"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"kind":{"type":"string","enum":["number","title","manual"],"title":"Kind"},"import_takeoff":{"type":"boolean","title":"Import Takeoff"},"transform":{"anyOf":[{"$ref":"#/components/schemas/MatchingTransform"},{"type":"null"}]}},"type":"object","required":["new_page_id","page_identity_id","kind","import_takeoff","transform"],"title":"MatchingPlanMatch"},"MatchingTransform":{"properties":{"tx":{"type":"number","title":"Tx"},"ty":{"type":"number","title":"Ty"},"scale":{"type":"number","title":"Scale"},"rotation":{"type":"number","title":"Rotation"}},"type":"object","required":["tx","ty","scale","rotation"],"title":"MatchingTransform"},"Measurement":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"scale_region_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scale Region Id"},"geometry":{"oneOf":[{"$ref":"#/components/schemas/PointGeometry-Output"},{"$ref":"#/components/schemas/PolylineGeometry-Output"},{"$ref":"#/components/schemas/PolygonGeometry-Output"}],"title":"Geometry","discriminator":{"propertyName":"type","mapping":{"point":"#/components/schemas/PointGeometry-Output","polygon":"#/components/schemas/PolygonGeometry-Output","polyline":"#/components/schemas/PolylineGeometry-Output"}}},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"computed_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Computed Value"},"computed_derivations":{"items":{"$ref":"#/components/schemas/DerivationValue"},"type":"array","title":"Computed Derivations"},"effective_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Effective Multiplier","default":"1"},"extension_values":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Extension Values"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"},"ambiguous":{"type":"boolean","title":"Ambiguous","default":false},"link_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Link Group Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","condition_id","page_id","geometry","computed_value","created_at"],"title":"Measurement"},"MeasurementListEnvelope":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MeasurementListEnvelope","description":"Every measurement PATCH returns this: one item for an ordinary\nmeasurement, N in member id order for a link group (RUD-263 spec §7.1).\n\nOne stable envelope rather than two shapes — pre-launch, the clean break\nbeats a compat shim that every future caller would have to remember."},"MeasurementListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"MeasurementListResponse"},"MeasurementZoneAttributions":{"properties":{"measurement_id":{"type":"string","format":"uuid","title":"Measurement Id"},"covered_fraction":{"type":"number","title":"Covered Fraction"},"items":{"items":{"$ref":"#/components/schemas/ZoneAttributionItem"},"type":"array","title":"Items"}},"type":"object","required":["measurement_id","covered_fraction","items"],"title":"MeasurementZoneAttributions"},"MessageContext":{"properties":{"active_page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Page Id"},"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/AnnotationContextItem"},{"$ref":"#/components/schemas/RegionContextItem"}],"discriminator":{"propertyName":"kind","mapping":{"annotation":"#/components/schemas/AnnotationContextItem","region":"#/components/schemas/RegionContextItem"}}},"type":"array","title":"Items","default":[]},"ui_state":{"anyOf":[{"$ref":"#/components/schemas/UiState"},{"type":"null"}]}},"type":"object","title":"MessageContext"},"MessageRole":{"type":"string","enum":["user","assistant","tool"],"title":"MessageRole"},"Multiplier":{"properties":{"scope":{"type":"string","enum":["condition","page","zone","measurement"],"title":"Scope"},"condition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"measurement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Measurement Id"},"x":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y"},"width":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Height"},"factor":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Factor"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"allocations":{"items":{"$ref":"#/components/schemas/MultiplierAllocation"},"type":"array","title":"Allocations"},"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"source":{"type":"string","enum":["manual","ai"],"title":"Source"},"status":{"type":"string","enum":["proposed","confirmed","dismissed"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["scope","factor","id","project_id","source","status","created_at","updated_at"],"title":"Multiplier"},"MultiplierAllocation":{"properties":{"bid_area_id":{"type":"string","format":"uuid","title":"Bid Area Id"},"repeat_count":{"type":"integer","minimum":1.0,"title":"Repeat Count"}},"type":"object","required":["bid_area_id","repeat_count"],"title":"MultiplierAllocation"},"MultiplierCreateForRevision":{"properties":{"scope":{"type":"string","enum":["condition","page","measurement"],"title":"Scope"},"condition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"measurement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Measurement Id"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Height"},"factor":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Factor"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"allocations":{"items":{"$ref":"#/components/schemas/MultiplierAllocation"},"type":"array","title":"Allocations"},"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"}},"type":"object","required":["scope","factor","revision_set_id"],"title":"MultiplierCreateForRevision"},"MultiplierUpdate":{"properties":{"factor":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Factor"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Height"},"allocations":{"anyOf":[{"items":{"$ref":"#/components/schemas/MultiplierAllocation"},"type":"array"},{"type":"null"}],"title":"Allocations"}},"type":"object","title":"MultiplierUpdate","description":"PATCH body. `allocations` omitted (None) = preserve; provided = replace."},"NamingStatus":{"properties":{"status":{"type":"string","enum":["pending","running","completed","failed","flagged"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","error"],"title":"NamingStatus"},"NumericVariable":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^v_[A-Za-z0-9]{8,16}$","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"hide":{"type":"boolean","title":"Hide","default":false},"kind":{"type":"string","const":"numeric","title":"Kind"},"default":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default","default":0.0},"unit":{"anyOf":[{"type":"string","enum":["inches","feet","yards","miles","millimeters","centimeters","meters","kilometers"]},{"type":"string","enum":["sq_inches","sq_feet","sq_yards","sq_miles","sq_mm","sq_cm","sq_meters","sq_km","acres","hectares"]},{"type":"string","enum":["cu_inches","cu_feet","cu_yards","cu_meters","us_fl_oz","us_pints","us_quarts","us_gallons","milliliters","liters","uk_fl_oz","uk_pints","uk_quarts","uk_gallons"]},{"type":"string","const":"each"},{"type":"null"}],"title":"Unit"},"decimal_places":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Decimal Places","default":2},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum"},"hide_if_zero":{"type":"boolean","title":"Hide If Zero","default":false},"hide_if_not_used":{"type":"boolean","title":"Hide If Not Used","default":false},"clear_if_hidden":{"type":"boolean","title":"Clear If Hidden","default":false}},"additionalProperties":false,"type":"object","required":["id","name","kind"],"title":"NumericVariable"},"Org":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"Org"},"OrgInvite":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"email":{"type":"string","title":"Email"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"],"title":"Status"},"role":{"type":"string","enum":["admin","member","viewer"],"title":"Role"},"invited_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invited By"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"accepted_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Accepted By"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","email","status","role","invited_by","expires_at","accepted_by","accepted_at","created_at"],"title":"OrgInvite"},"OrgInviteCreated":{"properties":{"invite":{"$ref":"#/components/schemas/OrgInvite"},"link":{"type":"string","title":"Link"}},"type":"object","required":["invite","link"],"title":"OrgInviteCreated"},"OrgInviteList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrgInvite"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"OrgInviteList"},"OrgMember":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"Role"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","email","joined_at","role","display_name"],"title":"OrgMember"},"OrgWithMembers":{"properties":{"org":{"$ref":"#/components/schemas/Org"},"members":{"items":{"$ref":"#/components/schemas/OrgMember"},"type":"array","title":"Members"},"my_role":{"type":"string","enum":["owner","admin","member","viewer"],"title":"My Role"}},"type":"object","required":["org","members","my_role"],"title":"OrgWithMembers"},"OverlayChange":{"properties":{"change_id":{"type":"string","maxLength":64,"minLength":1,"title":"Change Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id","description":"Older/base page version; geometry is in its PDF space."},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","exclusiveMinimum":0.0,"title":"Width"},"height":{"type":"number","exclusiveMinimum":0.0,"title":"Height"},"title":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Summary"},"significance":{"anyOf":[{"type":"string","enum":["substantive","administrative","cosmetic"]},{"type":"null"}],"title":"Significance"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"cloud_marked":{"type":"boolean","title":"Cloud Marked","default":false},"instances":{"anyOf":[{"items":{"$ref":"#/components/schemas/OverlayChangeInstance"},"type":"array","maxItems":50},{"type":"null"}],"title":"Instances"},"dead_ink":{"type":"integer","minimum":0.0,"title":"Dead Ink","default":0},"new_ink":{"type":"integer","minimum":0.0,"title":"New Ink","default":0}},"type":"object","required":["change_id","page_id","x","y","width","height"],"title":"OverlayChange"},"OverlayChangeInstance":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id","description":"Older/base page version; geometry is in its PDF space."},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","exclusiveMinimum":0.0,"title":"Width"},"height":{"type":"number","exclusiveMinimum":0.0,"title":"Height"}},"type":"object","required":["page_id","x","y","width","height"],"title":"OverlayChangeInstance"},"OverlayChangeSet":{"properties":{"from_revision_id":{"type":"string","format":"uuid","title":"From Revision Id"},"to_revision_id":{"type":"string","format":"uuid","title":"To Revision Id"},"fingerprint":{"type":"string","maxLength":128,"minLength":1,"title":"Fingerprint"},"status":{"type":"string","enum":["running","ready","partial"],"title":"Status"},"canceled":{"type":"boolean","title":"Canceled","default":false},"truncated":{"type":"boolean","title":"Truncated","default":false},"sheets":{"items":{"$ref":"#/components/schemas/OverlaySheetStatus"},"type":"array","maxItems":600,"title":"Sheets"},"changes":{"items":{"$ref":"#/components/schemas/OverlayChange"},"type":"array","maxItems":200,"title":"Changes"}},"type":"object","required":["from_revision_id","to_revision_id","fingerprint","status","sheets","changes"],"title":"OverlayChangeSet"},"OverlayChangeSetArtifact":{"properties":{"kind":{"type":"string","const":"overlay_change_set","title":"Kind","default":"overlay_change_set"},"version":{"type":"integer","const":2,"title":"Version","default":2},"body":{"$ref":"#/components/schemas/OverlayChangeSet"}},"type":"object","required":["body"],"title":"OverlayChangeSetArtifact"},"OverlayChangeSummary":{"properties":{"group_id":{"type":"string","title":"Group Id"},"title":{"type":"string","title":"Title","description":"Pill label, at most ~6 words."},"summary":{"type":"string","title":"Summary","description":"2-3 sentences, estimator language."},"significance":{"type":"string","enum":["substantive","administrative","cosmetic"],"title":"Significance"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["group_id","title","summary","significance","confidence"],"title":"OverlayChangeSummary","description":"One group's VLM verdict — the `group.summary` SSE event payload."},"OverlayGroupCrops":{"properties":{"group_id":{"type":"string","title":"Group Id"},"base_jpeg":{"type":"string","title":"Base Jpeg","description":"Base64 JPEG — clean crop of the OLD revision."},"overlay_jpeg":{"type":"string","title":"Overlay Jpeg","description":"Base64 JPEG — clean crop of the NEW revision."},"composite_jpeg":{"type":"string","title":"Composite Jpeg","description":"Base64 JPEG — red/blue composite crop, member boxes stroked."},"dead_ink":{"type":"integer","minimum":0.0,"title":"Dead Ink","description":"Removed-ink px at detection scale."},"new_ink":{"type":"integer","minimum":0.0,"title":"New Ink","description":"Added-ink px at detection scale."},"member_count":{"type":"integer","minimum":1.0,"title":"Member Count","description":"Engine fragments merged into this group."},"cloud_marked":{"type":"boolean","title":"Cloud Marked","default":false},"recurring_sheet_count":{"anyOf":[{"type":"integer","minimum":2.0},{"type":"null"}],"title":"Recurring Sheet Count","description":"Set when this group represents a change recurring on N sheets."}},"type":"object","required":["group_id","base_jpeg","overlay_jpeg","composite_jpeg","dead_ink","new_ink","member_count"],"title":"OverlayGroupCrops","description":"One change group's crop bundle + the stats the prompt mentions."},"OverlaySheetStatus":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id","description":"Older/base page version (alias of from_page_id)."},"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"from_page_id":{"type":"string","format":"uuid","title":"From Page Id"},"to_page_id":{"type":"string","format":"uuid","title":"To Page Id"},"status":{"type":"string","enum":["pending","diffed","summarized","misaligned","failed"],"title":"Status"},"change_count":{"type":"integer","minimum":0.0,"title":"Change Count"}},"type":"object","required":["page_id","page_identity_id","from_page_id","to_page_id","status","change_count"],"title":"OverlaySheetStatus"},"Page":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Width"},"height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Height"},"view_x0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View X0"},"view_y0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View Y0"},"view_x1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View X1"},"view_y1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View Y1"},"user_unit":{"type":"number","title":"User Unit"},"rotate":{"type":"integer","title":"Rotate"},"scale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scale"},"scale_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Scale Ratio"},"calibration":{"anyOf":[{"$ref":"#/components/schemas/CalibrationData-Output"},{"type":"null"}]},"scale_source":{"anyOf":[{"type":"string","enum":["autoset","user","import"]},{"type":"null"}],"title":"Scale Source"},"synthetic":{"type":"boolean","title":"Synthetic","default":false},"scale_suggestion":{"anyOf":[{"$ref":"#/components/schemas/PageScaleSuggestion"},{"type":"null"}]},"scale_read_count":{"type":"integer","title":"Scale Read Count","default":0},"has_takeoff":{"type":"boolean","title":"Has Takeoff"},"has_note":{"type":"boolean","title":"Has Note"},"markup_count":{"type":"integer","title":"Markup Count"},"open_markup_count":{"type":"integer","title":"Open Markup Count"}},"type":"object","required":["id","drawing_id","page_number","width","height","view_x0","view_y0","view_x1","view_y1","user_unit","rotate","has_takeoff","has_note","markup_count","open_markup_count"],"title":"Page","description":"A single sheet within a drawing."},"PageDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Width"},"height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Height"},"view_x0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View X0"},"view_y0":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View Y0"},"view_x1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View X1"},"view_y1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"View Y1"},"user_unit":{"type":"number","title":"User Unit"},"rotate":{"type":"integer","title":"Rotate"},"scale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scale"},"scale_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Scale Ratio"},"calibration":{"anyOf":[{"$ref":"#/components/schemas/CalibrationData-Output"},{"type":"null"}]},"scale_source":{"anyOf":[{"type":"string","enum":["autoset","user","import"]},{"type":"null"}],"title":"Scale Source"},"synthetic":{"type":"boolean","title":"Synthetic","default":false},"scale_suggestion":{"anyOf":[{"$ref":"#/components/schemas/PageScaleSuggestion"},{"type":"null"}]},"scale_read_count":{"type":"integer","title":"Scale Read Count","default":0},"has_takeoff":{"type":"boolean","title":"Has Takeoff"},"has_note":{"type":"boolean","title":"Has Note"},"markup_count":{"type":"integer","title":"Markup Count"},"open_markup_count":{"type":"integer","title":"Open Markup Count"},"current_extraction_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Extraction Id"},"sheet_number_source":{"anyOf":[{"type":"string","enum":["vlm","user"]},{"type":"null"}],"title":"Sheet Number Source"},"sheet_title_source":{"anyOf":[{"type":"string","enum":["vlm","user"]},{"type":"null"}],"title":"Sheet Title Source"},"text_element_count":{"type":"integer","title":"Text Element Count","default":0}},"type":"object","required":["id","drawing_id","page_number","width","height","view_x0","view_y0","view_x1","view_y1","user_unit","rotate","has_takeoff","has_note","markup_count","open_markup_count"],"title":"PageDetail","description":"Page + derived fields for the editor.\n\n`current_extraction_id` is `None` if the page hasn't been parsed yet;\n`text_element_count` is the number of text elements produced by that\ncurrent extraction (zero if unparsed)."},"PageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Page"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"PageListResponse"},"PageNote":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"body":{"type":"string","title":"Body"},"row_version":{"type":"integer","title":"Row Version"},"updated_by_name":{"type":"string","title":"Updated By Name"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["page_id","body","row_version","updated_by_name","updated_at"],"title":"PageNote"},"PageNoteResponse":{"properties":{"note":{"anyOf":[{"$ref":"#/components/schemas/PageNote"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["note"],"title":"PageNoteResponse"},"PageScaleSuggestion":{"properties":{"state":{"type":"string","enum":["verified","contradicted","unverified"],"title":"State"},"notation":{"type":"string","title":"Notation"},"ratio":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Ratio"},"measured_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Measured Ratio"}},"type":"object","required":["state","notation","ratio"],"title":"PageScaleSuggestion","description":"What the autoset detector read off this sheet, and how much we trust it.\n\nPresent whenever the current `page_scale_results` row carries exactly one\ndistinct real (non-NTS, ratio-bearing) candidate. Absent when the sheet\nstates no scale AND when it states several — presenting one of several as\n\"the sheet's scale\" would be worse than showing nothing (RUD-315).\n\n`ratio` is ADR-0024 canonical form (real inches per PDF point).\n`measured_ratio` is populated only for `contradicted`, and carries whichever\nevidence disagreed with the notation: the mean implied ratio of the persisted\nwitnesses when geometry contradicted it (ADR-0144), or the VLM's independently\nread notation when the two readers disagreed (RUD-353). Geometry takes\nprecedence — a witness-backed contradiction always reports the witnesses."},"PageTarget":{"properties":{"file_ref":{"type":"string","title":"File Ref"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"drawing_name":{"type":"string","title":"Drawing Name"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"}},"type":"object","required":["file_ref","page_id","drawing_id","drawing_name","page_number"],"title":"PageTarget"},"PageZoneAttributionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MeasurementZoneAttributions"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PageZoneAttributionsResponse"},"PdfMarkupImport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"drawing_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Drawing Id"},"storage_path":{"type":"string","title":"Storage Path"},"status":{"type":"string","enum":["uploading","inspecting","ready_for_mapping_review","ready_to_apply","applying","completed","failed","cancelled"],"title":"Status"},"progress":{"$ref":"#/components/schemas/PdfMarkupImportProgress"},"report":{"anyOf":[{"$ref":"#/components/schemas/PdfMarkupImportReport"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","storage_path","status","created_at","updated_at"],"title":"PdfMarkupImport"},"PdfMarkupImportProgress":{"properties":{"source_page_count":{"type":"integer","maximum":2000.0,"minimum":0.0,"title":"Source Page Count","default":0},"target_page_count":{"type":"integer","maximum":2000.0,"minimum":0.0,"title":"Target Page Count","default":0},"source_annotation_counts":{"items":{"type":"integer","minimum":0.0},"type":"array","maxItems":2000,"title":"Source Annotation Counts"},"proposed_mapping":{"items":{"$ref":"#/components/schemas/PdfMarkupPagePair"},"type":"array","maxItems":2000,"title":"Proposed Mapping"},"page_mapping":{"items":{"$ref":"#/components/schemas/PdfMarkupPagePair"},"type":"array","maxItems":2000,"title":"Page Mapping"},"geometry_warnings":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Geometry Warnings"}},"additionalProperties":false,"type":"object","title":"PdfMarkupImportProgress"},"PdfMarkupImportReport":{"properties":{"created":{"type":"integer","minimum":0.0,"title":"Created","default":0},"updated":{"type":"integer","minimum":0.0,"title":"Updated","default":0},"replies_created":{"type":"integer","minimum":0.0,"title":"Replies Created","default":0},"links_created":{"type":"integer","minimum":0.0,"title":"Links Created","default":0},"attachments_created":{"type":"integer","minimum":0.0,"title":"Attachments Created","default":0},"skips":{"additionalProperties":{"type":"integer","minimum":0.0},"type":"object","maxProperties":64,"title":"Skips"},"warnings":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Warnings"},"message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","title":"PdfMarkupImportReport"},"PdfMarkupPagePair":{"properties":{"source_page":{"type":"integer","minimum":1.0,"title":"Source Page"},"target_page":{"type":"integer","minimum":1.0,"title":"Target Page"}},"additionalProperties":false,"type":"object","required":["source_page","target_page"],"title":"PdfMarkupPagePair"},"PhaseCode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"description":{"type":"string","title":"Description"},"sort_order":{"type":"number","title":"Sort Order"}},"type":"object","required":["id","code","description","sort_order"],"title":"PhaseCode"},"PhaseCodeInput":{"properties":{"code":{"type":"string","maxLength":100,"minLength":1,"title":"Code"},"description":{"type":"string","maxLength":500,"title":"Description","default":""}},"additionalProperties":false,"type":"object","required":["code"],"title":"PhaseCodeInput","description":"One parsed spreadsheet row on the replace request."},"PhaseCodeListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhaseCode"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PhaseCodeListResponse"},"PhaseCodeRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","code","description"],"title":"PhaseCodeRef","description":"The phase code assigned to a condition, denormalized onto the row."},"PlaceConditionSpec":{"properties":{"source_condition_id":{"type":"string","format":"uuid","title":"Source Condition Id"},"target_condition_id":{"type":"string","format":"uuid","title":"Target Condition Id"},"scope":{"$ref":"#/components/schemas/PlacementScope"},"exemplar_measurement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Exemplar Measurement Id"}},"additionalProperties":false,"type":"object","required":["source_condition_id","target_condition_id","scope"],"title":"PlaceConditionSpec","description":"place_condition_on_markups input — targeting only, never geometry."},"PlacementScope":{"properties":{"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"},"page_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"minItems":2},{"type":"null"}],"title":"Page Ids","description":"2-10 named sheets, resolved to page ids first. One sheet is page_id; every sheet is project. The 500-placement cap is aggregate across the whole scope."},"project":{"type":"boolean","title":"Project","default":false},"measurement_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1},{"type":"null"}],"title":"Measurement Ids"}},"additionalProperties":false,"type":"object","title":"PlacementScope","description":"Exactly one selector: a page, 2-10 named pages, the whole project, or\nexplicit A markups."},"PlanIssue":{"properties":{"issue_id":{"type":"string","title":"Issue Id"},"severity":{"type":"string","enum":["error","warning"],"title":"Severity"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"refs":{"items":{"$ref":"#/components/schemas/EntityRef"},"type":"array","title":"Refs"},"skippable":{"type":"boolean","title":"Skippable","default":false}},"type":"object","required":["issue_id","severity","code","message"],"title":"PlanIssue"},"PlanSummary":{"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"extensions_matched":{"items":{"type":"string"},"type":"array","title":"Extensions Matched"},"extensions_created":{"items":{"type":"string"},"type":"array","title":"Extensions Created"},"unmapped":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Unmapped"},"converter":{"additionalProperties":true,"type":"object","title":"Converter"}},"type":"object","title":"PlanSummary"},"PointGeometry-Input":{"properties":{"type":{"type":"string","const":"point","title":"Type"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"rotation":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rotation"}},"type":"object","required":["type","x","y"],"title":"PointGeometry"},"PointGeometry-Output":{"properties":{"type":{"type":"string","const":"point","title":"Type"},"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"},"rotation":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rotation"}},"type":"object","required":["type","x","y"],"title":"PointGeometry"},"PolygonGeometry-Input":{"properties":{"type":{"type":"string","const":"polygon","title":"Type"},"points":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":500,"minItems":3,"title":"Points"},"holes":{"anyOf":[{"items":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":500,"minItems":3},"type":"array","maxItems":50},{"type":"null"}],"title":"Holes"},"grid":{"anyOf":[{"$ref":"#/components/schemas/GridAlignment-Input"},{"type":"null"}]}},"type":"object","required":["type","points"],"title":"PolygonGeometry"},"PolygonGeometry-Output":{"properties":{"type":{"type":"string","const":"polygon","title":"Type"},"points":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":500,"minItems":3,"title":"Points"},"holes":{"anyOf":[{"items":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":500,"minItems":3},"type":"array","maxItems":50},{"type":"null"}],"title":"Holes"},"grid":{"anyOf":[{"$ref":"#/components/schemas/GridAlignment-Output"},{"type":"null"}]}},"type":"object","required":["type","points"],"title":"PolygonGeometry"},"PolylineGeometry-Input":{"properties":{"type":{"type":"string","const":"polyline","title":"Type"},"points":{"items":{"prefixItems":[{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","minItems":2,"title":"Points"},"bulges":{"anyOf":[{"items":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}]},"type":"array"},{"type":"null"}],"title":"Bulges"}},"type":"object","required":["type","points"],"title":"PolylineGeometry"},"PolylineGeometry-Output":{"properties":{"type":{"type":"string","const":"polyline","title":"Type"},"points":{"items":{"prefixItems":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"type":"array","maxItems":2,"minItems":2},"type":"array","minItems":2,"title":"Points"},"bulges":{"anyOf":[{"items":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},"type":"array"},{"type":"null"}],"title":"Bulges"}},"type":"object","required":["type","points"],"title":"PolylineGeometry"},"PostMessageRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"context":{"anyOf":[{"$ref":"#/components/schemas/MessageContext"},{"type":"null"}]},"client_artifacts":{"items":{"oneOf":[{"$ref":"#/components/schemas/OverlayChangeSetArtifact"}],"discriminator":{"propertyName":"kind","mapping":{"overlay_change_set":"#/components/schemas/OverlayChangeSetArtifact"}}},"type":"array","maxItems":4,"title":"Client Artifacts"}},"type":"object","required":["content"],"title":"PostMessageRequest","description":"Body for POST /api/v1/conversations/{id}/messages.\n\nResponse is text/event-stream, not JSON, so no response model."},"Profile":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","display_name"],"title":"Profile"},"Project":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/ProjectStatus"},"can_write":{"type":"boolean","title":"Can Write"},"can_manage_sharing":{"type":"boolean","title":"Can Manage Sharing"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","can_write","can_manage_sharing","created_at","updated_at"],"title":"Project","description":"A single project — top-level container for drawings, conditions, measurements."},"ProjectExport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"mode":{"type":"string","enum":["standard","verified"],"title":"Mode"},"status":{"type":"string","enum":["pending","running","completed","failed"],"title":"Status"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","mode","status","created_at"],"title":"ProjectExport"},"ProjectExportDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["download_url"],"title":"ProjectExportDownloadResponse"},"ProjectGrant":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"granted_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Granted By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","email","display_name","granted_by","created_at"],"title":"ProjectGrant","description":"One person's admission to a restricted project.\n\nA grant is admission, not capability — what the grantee may *do* comes from\ntheir org role (spec §3.2's ruling). No `access_level` field exists."},"ProjectInvite":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"email":{"type":"string","title":"Email"},"status":{"type":"string","enum":["pending","accepted","revoked","expired"],"title":"Status"},"invited_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invited By"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"accepted_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Accepted By"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","email","status","invited_by","expires_at","accepted_by","accepted_at","created_at"],"title":"ProjectInvite"},"ProjectInviteCreated":{"properties":{"invite":{"$ref":"#/components/schemas/ProjectInvite"},"link":{"type":"string","title":"Link"}},"type":"object","required":["invite","link"],"title":"ProjectInviteCreated","description":"The invite plus its one-time link.\n\nThe link IS the delivery mechanism — PR3 ships no SMTP for project invites\n(spec §10's flow is link-first and hermetic; council ruling D2). Resend\nreturns a fresh one because it rotates the token, so the previous link is\ndead and rendering it would hand the admin a URL that no longer works."},"ProjectInviteList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectInvite"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ProjectInviteList"},"ProjectListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Project"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"ProjectListResponse","description":"Response for `GET /api/v1/projects`.\n\nNo pagination at v1 — bounded by realistic project counts. The\n`truncated` flag flips if the server-side hard cap was reached;\nthat's the signal to add cursor pagination here."},"ProjectSharing":{"properties":{"visibility":{"$ref":"#/components/schemas/ProjectVisibility"},"grants":{"items":{"$ref":"#/components/schemas/ProjectGrant"},"type":"array","title":"Grants"}},"type":"object","required":["visibility","grants"],"title":"ProjectSharing","description":"The whole sharing state of one project — what the share dialog renders."},"ProjectStatus":{"type":"string","enum":["bidding","in-progress","won","lost"],"title":"ProjectStatus","description":"Bid lifecycle states. Hyphenated 'in-progress' matches the\nenum on the DB side and the existing frontend ProjectStatus type.\nDo not rename to underscore — it would break the frontend bridge\nand the DB enum at the same time."},"ProjectVerificationResponse":{"properties":{"pages":{"items":{"$ref":"#/components/schemas/VerificationPage"},"type":"array","title":"Pages"},"counts":{"$ref":"#/components/schemas/VerificationCounts"},"flagged":{"type":"integer","title":"Flagged"}},"type":"object","required":["pages","counts","flagged"],"title":"ProjectVerificationResponse"},"ProjectVisibility":{"type":"string","enum":["org","restricted"],"title":"ProjectVisibility","description":"Mirrors the `projects.visibility` CHECK constraint (ADR-0142).\n\n`org`: every member of the owning org may read it. `restricted`: only org\nowners/admins and explicit grantees. Set only through the fenced sharing\nservice — `authenticated` holds no UPDATE grant on this column."},"ProposedPlacement":{"properties":{"placement":{"oneOf":[{"$ref":"#/components/schemas/FixedCellPlacement"},{"$ref":"#/components/schemas/ListRegionPlacement"},{"$ref":"#/components/schemas/SectionInsertPlacement"},{"$ref":"#/components/schemas/SectionGridPlacement"}],"title":"Placement","discriminator":{"propertyName":"kind","mapping":{"fixed_cell":"#/components/schemas/FixedCellPlacement","list_region":"#/components/schemas/ListRegionPlacement","section_grid":"#/components/schemas/SectionGridPlacement","section_insert":"#/components/schemas/SectionInsertPlacement"}}},"confidence":{"type":"string","enum":["high","medium","low"],"title":"Confidence"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["placement","confidence","rationale"],"title":"ProposedPlacement"},"QuantityProjection":{"properties":{"measurement_id":{"type":"string","format":"uuid","title":"Measurement Id"},"computed_value":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Computed Value"},"effective_multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Effective Multiplier"},"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"condition_name":{"type":"string","title":"Condition Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"}},"type":"object","required":["measurement_id","computed_value","effective_multiplier","condition_id","condition_name","name","bid_area_id"],"title":"QuantityProjection"},"ReadinessResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ReadinessResponse"},"ReassignMeasurementItem":{"properties":{"measurement_id":{"type":"string","format":"uuid","title":"Measurement Id"},"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"extension_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Extension Values"}},"additionalProperties":false,"type":"object","required":["measurement_id","condition_id"],"title":"ReassignMeasurementItem","description":"One measurement → target condition assignment. The forward call\nrepeats one destination; undo sends each measurement back to its own\nsource. Per docs/superpowers/specs/2026-07-13-reassign-measurement-design.md §3.1\nand ADR-0117."},"ReassignMeasurementsRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReassignMeasurementItem"},"type":"array","maxItems":500,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ReassignMeasurementsRequest"},"ReassignMeasurementsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ReassignMeasurementsResponse"},"ReconciliationReport":{"properties":{"matched":{"items":{"$ref":"#/components/schemas/MatchedPlacement"},"type":"array","title":"Matched"},"unmatched_quantities":{"items":{"$ref":"#/components/schemas/UnmatchedQuantity"},"type":"array","title":"Unmatched Quantities"},"empty_targets":{"items":{"$ref":"#/components/schemas/EmptyTarget"},"type":"array","title":"Empty Targets"},"uom_conflicts":{"items":{"$ref":"#/components/schemas/UomConflict"},"type":"array","title":"Uom Conflicts"},"fidelity_warnings":{"items":{"type":"string"},"type":"array","title":"Fidelity Warnings"},"formula_overwrites":{"items":{"$ref":"#/components/schemas/FormulaOverwrite"},"type":"array","title":"Formula Overwrites"},"matched_count":{"type":"integer","title":"Matched Count","default":0},"total_quantities":{"type":"integer","title":"Total Quantities","default":0}},"type":"object","title":"ReconciliationReport"},"RegionContextItem":{"properties":{"kind":{"type":"string","const":"region","title":"Kind","default":"region"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"},"width":{"type":"number","title":"Width"},"height":{"type":"number","title":"Height"}},"type":"object","required":["page_id","x","y","width","height"],"title":"RegionContextItem","description":"Region attached from the canvas. Coordinates are PDF user-space —\nsame units and origin as pages.width/height and text-element bboxes."},"RelinkMeasurementsRequest":{"properties":{"measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Measurement Ids"}},"additionalProperties":false,"type":"object","required":["measurement_ids"],"title":"RelinkMeasurementsRequest"},"RenameByGroup":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"current_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Current Name"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["condition_id","current_name","name"],"title":"RenameByGroup","description":"Rename an entire trace group. A group is project-wide and the client\ncannot enumerate its ids — measurements are fetched per page, and ADR-0126\nbenchmarks conditions at 5,000 measurements. One UPDATE, no cap."},"RenameByGroupResponse":{"properties":{"renamed_count":{"type":"integer","title":"Renamed Count"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["renamed_count","name"],"title":"RenameByGroupResponse","description":"Bounded by design. A 5,000-measurement group rename would otherwise\nserialize 5,000 full Measurement bodies — geometry, derivation arrays, and\nextension maps — a multi-MB response for a label change. PR2 invalidates\nevery cached page after a group rename anyway and never reads the bodies."},"RenameBySelection":{"properties":{"measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Measurement Ids"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["measurement_ids","name"],"title":"RenameBySelection","description":"Rename an explicit selection of measurements (RUD-265/266). Per\ndocs/superpowers/specs/2026-07-29-named-takeoffs-design.md §5."},"RenameBySelectionResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Measurement"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RenameBySelectionResponse"},"RenameOrgRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"RenameOrgRequest"},"ReplacePhaseCodesRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhaseCodeInput"},"type":"array","maxItems":5000,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ReplacePhaseCodesRequest"},"ReplyWriteResponse":{"properties":{"reply":{"$ref":"#/components/schemas/AnnotationReply"},"annotation":{"$ref":"#/components/schemas/Annotation"}},"type":"object","required":["reply","annotation"],"title":"ReplyWriteResponse"},"RescueAssistResult":{"properties":{"kind":{"type":"string","const":"rescue","title":"Kind","default":"rescue"},"choice":{"anyOf":[{"type":"integer"},{"type":"string","enum":["bridge","none"]}],"title":"Choice"}},"type":"object","required":["choice"],"title":"RescueAssistResult"},"RescueCandidate":{"properties":{"far_point":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Far Point"},"angle_deg":{"type":"number","title":"Angle Deg"}},"type":"object","required":["far_point","angle_deg"],"title":"RescueCandidate","description":"A continuation the tracer saw at the stop, in PDF user-space."},"RescueContext":{"properties":{"stop_point":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2,"title":"Stop Point"},"heading_deg":{"type":"number","title":"Heading Deg"},"goal_point":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Goal Point"},"candidates":{"items":{"$ref":"#/components/schemas/RescueCandidate"},"type":"array","maxItems":4,"title":"Candidates"},"bridge_point":{"anyOf":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Bridge Point"}},"type":"object","required":["stop_point","heading_deg","goal_point","candidates","bridge_point"],"title":"RescueContext"},"RestoreBidAreaRequest":{"properties":{"bid_area_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Bid Area Ids"}},"additionalProperties":false,"type":"object","required":["bid_area_ids"],"title":"RestoreBidAreaRequest"},"RestoreConditionRequest":{"properties":{"measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Measurement Ids"},"multiplier_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Multiplier Ids"}},"additionalProperties":false,"type":"object","required":["measurement_ids","multiplier_ids"],"title":"RestoreConditionRequest"},"RestoreFolderRequest":{"properties":{"folder_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Folder Ids"},"condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Condition Ids"},"measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Measurement Ids"},"multiplier_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Multiplier Ids"}},"additionalProperties":false,"type":"object","required":["folder_ids","condition_ids","measurement_ids","multiplier_ids"],"title":"RestoreFolderRequest"},"RestoreLayerRequest":{"properties":{"reassigned_condition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Reassigned Condition Ids"}},"additionalProperties":false,"type":"object","required":["reassigned_condition_ids"],"title":"RestoreLayerRequest"},"RestoreZoneRequest":{"properties":{"zone_region_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Zone Region Ids"}},"additionalProperties":false,"type":"object","required":["zone_region_ids"],"title":"RestoreZoneRequest"},"RevertImportResponse":{"properties":{"import_id":{"type":"string","format":"uuid","title":"Import Id"},"templates_deleted":{"type":"integer","title":"Templates Deleted"},"templates_kept":{"items":{"$ref":"#/components/schemas/KeptTemplate"},"type":"array","title":"Templates Kept"}},"additionalProperties":false,"type":"object","required":["import_id","templates_deleted","templates_kept"],"title":"RevertImportResponse"},"ReviewReport":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/ReviewReportLine"},"type":"array","title":"Lines"},"summary":{"$ref":"#/components/schemas/ReviewReportSummary"},"unresolved_bindings":{"items":{"type":"string"},"type":"array","title":"Unresolved Bindings"},"skipped":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportSkipped"},{"type":"null"}]},"multipliers":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportMultipliers"},{"type":"null"}]},"annotations":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportAnnotations"},{"type":"null"}]},"replies":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportReplies"},{"type":"null"}]},"links":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportLinks"},{"type":"null"}]},"attachments":{"anyOf":[{"$ref":"#/components/schemas/ReviewReportAttachments"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"ReviewReport"},"ReviewReportAnnotations":{"properties":{"expected_by_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Expected By Kind"},"actual_by_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Actual By Kind"},"matched":{"type":"boolean","title":"Matched","default":true},"inserted":{"type":"integer","title":"Inserted","default":0},"skipped_pages":{"items":{"type":"string"},"type":"array","title":"Skipped Pages"},"skipped_rows":{"type":"integer","title":"Skipped Rows","default":0}},"additionalProperties":true,"type":"object","title":"ReviewReportAnnotations","description":"The verifying stage's exact per-kind annotation reconciliation\n(stages.py report[\"annotations\"], SP6 design §7). Same `matched` caveat as\nReviewReportMultipliers: the verdict compares by (page, kind), so it can be\nFalse while the per-kind totals rendered here agree. `skipped_pages` holds\nsource-file page refs that no live page maps to, so they resolve against\nneither page_targets nor the report lines."},"ReviewReportAttachments":{"properties":{"expected_by_content_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Expected By Content Type"},"actual_by_content_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Actual By Content Type"},"matched":{"type":"boolean","title":"Matched","default":true},"inserted":{"type":"integer","title":"Inserted","default":0},"bytes_imported":{"type":"integer","title":"Bytes Imported","default":0}},"additionalProperties":true,"type":"object","title":"ReviewReportAttachments","description":"The verifying stage's exact per-content-type attachment reconciliation\n(stages.py report[\"attachments\"], RUD-183 design §9). bytes_imported sums\ncommitted rows' byte_size — uploads precede every committed row, so it is\nthe signal that the images (not just rows) came across."},"ReviewReportLine":{"properties":{"scope":{"type":"string","enum":["project","condition","sheet"],"title":"Scope"},"condition_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Ref"},"page_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Ref"},"result_key":{"type":"string","title":"Result Key"},"expected":{"type":"string","title":"Expected"},"actual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual"},"origin":{"type":"string","enum":["source","derived"],"title":"Origin"},"disposition":{"type":"string","enum":["matched","within_tolerance","mismatch","missing_in_rudus"],"title":"Disposition"},"rel_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rel Error"},"arc_affected":{"type":"boolean","title":"Arc Affected","default":false},"ambiguous_affected":{"type":"boolean","title":"Ambiguous Affected","default":false},"skip_affected":{"type":"boolean","title":"Skip Affected","default":false}},"additionalProperties":true,"type":"object","required":["scope","result_key","expected","origin","disposition"],"title":"ReviewReportLine","description":"One stored reconciliation line, as the verifying stage wrote it.\n`skip_affected` is injected post-hoc onto affected lines only — absent\nelsewhere, hence the default (spec §3.1)."},"ReviewReportLinks":{"properties":{"expected_by_target_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Expected By Target Kind"},"actual_by_target_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Actual By Target Kind"},"matched":{"type":"boolean","title":"Matched","default":true},"inserted":{"type":"integer","title":"Inserted","default":0},"flattened_to_stale":{"type":"integer","title":"Flattened To Stale","default":0}},"additionalProperties":true,"type":"object","title":"ReviewReportLinks","description":"The verifying stage's exact per-target-kind link reconciliation\n(stages.py report[\"links\"], RUD-183 design §9). Same `matched` caveat as\nReviewReportAnnotations. `flattened_to_stale` counts non-null file targets\nthat failed resolution on committed annotations — degradation, not loss;\nflatten preserves the row, so it never shows as a count mismatch."},"ReviewReportMultiplierAggregate":{"properties":{"count":{"type":"integer","title":"Count","default":0},"factor_sum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor Sum"},"repeat_count_sum":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Count Sum"}},"additionalProperties":true,"type":"object","title":"ReviewReportMultiplierAggregate","description":"One row of the multipliers block's by-scope maps. Scope rows carry\n`factor_sum`; the synthetic \"allocations\" row carries `repeat_count_sum`."},"ReviewReportMultipliers":{"properties":{"created":{"type":"integer","title":"Created","default":0},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"},"expected_by_scope":{"additionalProperties":{"$ref":"#/components/schemas/ReviewReportMultiplierAggregate"},"type":"object","title":"Expected By Scope"},"actual_by_scope":{"additionalProperties":{"$ref":"#/components/schemas/ReviewReportMultiplierAggregate"},"type":"object","title":"Actual By Scope"},"matched":{"type":"boolean","title":"Matched","default":true}},"additionalProperties":true,"type":"object","title":"ReviewReportMultipliers","description":"The verifying stage's multiplier reconciliation (stages.py\nreport[\"multipliers\"]). `matched` is the stage's whole-dict verdict — it\ncan be False while every by-scope row agrees, since equality is over the\nfull aggregate, not the rendered rows."},"ReviewReportReplies":{"properties":{"expected_by_entry_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Expected By Entry Kind"},"actual_by_entry_kind":{"additionalProperties":{"type":"integer"},"type":"object","title":"Actual By Entry Kind"},"matched":{"type":"boolean","title":"Matched","default":true},"inserted":{"type":"integer","title":"Inserted","default":0}},"additionalProperties":true,"type":"object","title":"ReviewReportReplies","description":"The verifying stage's exact per-entry-kind reply reconciliation\n(stages.py report[\"replies\"], RUD-178 design §9). Same `matched` caveat as\nReviewReportAnnotations: the verdict compares by (page, entry_kind), so it\ncan be False while the per-kind totals rendered here agree."},"ReviewReportSkipped":{"properties":{"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"refs":{"items":{"$ref":"#/components/schemas/EntityRef"},"type":"array","title":"Refs"},"dropped":{"additionalProperties":{"type":"integer"},"type":"object","title":"Dropped"}},"type":"object","title":"ReviewReportSkipped","description":"The stage's top-level plan-skips block (stages.py report[\"skipped\"]),\ndistinct from summary.skipped (no-provenance)."},"ReviewReportSummary":{"properties":{"skipped":{"type":"boolean","title":"Skipped","default":false},"arc_affected":{"type":"integer","title":"Arc Affected","default":0},"ambiguous_affected":{"type":"integer","title":"Ambiguous Affected","default":0},"matched":{"type":"integer","title":"Matched","default":0},"within_tolerance":{"type":"integer","title":"Within Tolerance","default":0},"mismatch":{"type":"integer","title":"Mismatch","default":0},"missing_in_rudus":{"type":"integer","title":"Missing In Rudus","default":0},"unchecked_actuals":{"type":"integer","title":"Unchecked Actuals","default":0}},"additionalProperties":true,"type":"object","title":"ReviewReportSummary","description":"Typed mirror of build_report's summary dict. Read the summary\nconstruction at the tail of verify.py's build_report and mirror its\nexact keys as typed fields (known members below include the\nno-provenance variant and per-disposition counts + unchecked_actuals);\nextra=\"allow\" preserves forward compatibility WITHOUT resorting to Any."},"Revision":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"label":{"type":"string","title":"Label"},"ordinal":{"type":"integer","title":"Ordinal"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"adopted_at":{"type":"string","format":"date-time","title":"Adopted At"}},"type":"object","required":["id","project_id","label","ordinal","created_at","adopted_at"],"title":"Revision","description":"One adopted drawing-revision set. Pre-PR4 every project has exactly one."},"RevisionDeleteImpact":{"properties":{"sheets_introduced":{"type":"integer","title":"Sheets Introduced"},"measurement_count":{"type":"integer","title":"Measurement Count"},"exports_referencing":{"type":"integer","title":"Exports Referencing"}},"type":"object","required":["sheets_introduced","measurement_count","exports_referencing"],"title":"RevisionDeleteImpact"},"RevisionDiffCompositeRef":{"properties":{"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"storage_key":{"type":"string","maxLength":512,"title":"Storage Key"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Sha256"},"width":{"type":"integer","maximum":8000.0,"exclusiveMinimum":0.0,"title":"Width"},"height":{"type":"integer","maximum":8000.0,"exclusiveMinimum":0.0,"title":"Height"},"byte_size":{"type":"integer","maximum":8000000.0,"exclusiveMinimum":0.0,"title":"Byte Size"}},"additionalProperties":false,"type":"object","required":["page_identity_id","storage_key","sha256","width","height","byte_size"],"title":"RevisionDiffCompositeRef"},"RevisionDiffExport":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"from_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Revision Id"},"to_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"To Revision Id"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"status":{"type":"string","title":"Status"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Report"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","options","status","created_at"],"title":"RevisionDiffExport"},"RevisionDiffExportDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["download_url"],"title":"RevisionDiffExportDownloadResponse"},"RevisionDiffManifestTransform":{"properties":{"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"matrix":{"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}],"type":"array","maxItems":6,"minItems":6,"title":"Matrix"}},"additionalProperties":false,"type":"object","required":["page_identity_id","matrix"],"title":"RevisionDiffManifestTransform"},"RevisionDiffResponse":{"properties":{"from_revision_id":{"type":"string","format":"uuid","title":"From Revision Id"},"to_revision_id":{"type":"string","format":"uuid","title":"To Revision Id"},"items":{"items":{"$ref":"#/components/schemas/RevisionTakeoffChange"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["from_revision_id","to_revision_id","items"],"title":"RevisionDiffResponse"},"RevisionDiffUploadTarget":{"properties":{"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"storage_key":{"type":"string","title":"Storage Key"},"upload_url":{"type":"string","title":"Upload Url"}},"type":"object","required":["page_identity_id","storage_key","upload_url"],"title":"RevisionDiffUploadTarget"},"RevisionDiffUploadTargetsRequest":{"properties":{"export_id":{"type":"string","format":"uuid","title":"Export Id"},"from_revision_id":{"type":"string","format":"uuid","title":"From Revision Id"},"to_revision_id":{"type":"string","format":"uuid","title":"To Revision Id"},"page_identity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":300,"title":"Page Identity Ids"}},"additionalProperties":false,"type":"object","required":["export_id","from_revision_id","to_revision_id","page_identity_ids"],"title":"RevisionDiffUploadTargetsRequest"},"RevisionDiffUploadTargetsResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/RevisionDiffUploadTarget"},"type":"array","title":"Targets"}},"type":"object","required":["targets"],"title":"RevisionDiffUploadTargetsResponse"},"RevisionDiffVisualManifest":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version"},"sweep_fingerprint":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Sweep Fingerprint"},"composites":{"items":{"$ref":"#/components/schemas/RevisionDiffCompositeRef"},"type":"array","maxItems":300,"title":"Composites"},"transforms":{"items":{"$ref":"#/components/schemas/RevisionDiffManifestTransform"},"type":"array","maxItems":300,"title":"Transforms"}},"additionalProperties":false,"type":"object","required":["schema_version","composites","transforms"],"title":"RevisionDiffVisualManifest"},"RevisionDraft":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"label":{"type":"string","title":"Label"},"row_version":{"type":"integer","title":"Row Version"},"draft_plan":{"anyOf":[{"$ref":"#/components/schemas/MatchingPlan"},{"type":"null"}]},"adoption_status":{"anyOf":[{"type":"string","enum":["pending","running","completed","failed"]},{"type":"null"}],"title":"Adoption Status"},"adoption_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adoption Error"},"adoption_progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Adoption Progress"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","label","row_version","draft_plan","adoption_status","adoption_error","adoption_progress","created_by","created_at"],"title":"RevisionDraft"},"RevisionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Revision"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RevisionListResponse"},"RevisionSheet":{"properties":{"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Width"},"height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Height"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"identity_tx":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Identity Tx"},"identity_ty":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Identity Ty"},"identity_scale":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Identity Scale"},"identity_rotation":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Identity Rotation"},"scale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scale"},"scale_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Scale Ratio"},"calibration":{"anyOf":[{"$ref":"#/components/schemas/CalibrationData-Output"},{"type":"null"}]},"scale_source":{"anyOf":[{"type":"string","enum":["autoset","user","import"]},{"type":"null"}],"title":"Scale Source"},"position":{"type":"number","title":"Position"},"sheet_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sheet Group Id"},"sheet_group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Group Name"},"sheet_group_position":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sheet Group Position"},"has_takeoff":{"type":"boolean","title":"Has Takeoff"},"has_note":{"type":"boolean","title":"Has Note"},"markup_count":{"type":"integer","title":"Markup Count"},"open_markup_count":{"type":"integer","title":"Open Markup Count"}},"type":"object","required":["page_identity_id","page_id","drawing_id","page_number","width","height","content_hash","identity_tx","identity_ty","identity_scale","identity_rotation","position","has_takeoff","has_note","markup_count","open_markup_count"],"title":"RevisionSheet","description":"One sheet of a revision's membership, across all of the project's PDFs.\n\n`page_identity_id` is the stable logical-sheet id (the `?sheet=` URL param);\n`page_id` is the page version this revision shows for it. Pre-PR4 the two\nare equal for every row, but consumers MUST map through this model, never\nassume equality. `sheet_group_*` is None until the organizer write path\nlands (PR4) — the picker renders ungrouped rows under one section.\n`identity_*` follows the page's frozen identity frame, unlike the scale\nfields below, which follow the revision membership."},"RevisionSheetListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RevisionSheet"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"RevisionSheetListResponse"},"RevisionSummary":{"properties":{"new_sheets":{"type":"integer","title":"New Sheets"},"replaced_sheets":{"type":"integer","title":"Replaced Sheets"},"removed_sheets":{"type":"integer","title":"Removed Sheets"},"carried_sheets":{"type":"integer","title":"Carried Sheets"},"takeoff_added":{"type":"integer","title":"Takeoff Added"},"takeoff_removed":{"type":"integer","title":"Takeoff Removed"},"takeoff_modified":{"type":"integer","title":"Takeoff Modified"}},"type":"object","required":["new_sheets","replaced_sheets","removed_sheets","carried_sheets","takeoff_added","takeoff_removed","takeoff_modified"],"title":"RevisionSummary"},"RevisionTakeoffChange":{"properties":{"change":{"type":"string","enum":["added","removed","modified"],"title":"Change"},"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"geometry_changed":{"type":"boolean","title":"Geometry Changed"},"from":{"anyOf":[{"$ref":"#/components/schemas/QuantityProjection"},{"type":"null"}]},"to":{"anyOf":[{"$ref":"#/components/schemas/QuantityProjection"},{"type":"null"}]}},"type":"object","required":["change","page_identity_id","sheet_number","sheet_title","geometry_changed","from","to"],"title":"RevisionTakeoffChange"},"Rounding":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"increment":{"type":"number","exclusiveMinimum":0.0,"title":"Increment","default":1.0}},"additionalProperties":false,"type":"object","title":"Rounding"},"Ruler":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x1":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X1"},"y1":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y1"},"x2":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X2"},"y2":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y2"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","page_id","x1","y1","x2","y2","created_at","updated_at"],"title":"Ruler"},"RulerListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Ruler"},"type":"array","title":"Items"}},"type":"object","title":"RulerListResponse"},"SaveConnectorRequest":{"properties":{"mapping":{"$ref":"#/components/schemas/ConnectorMapping"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["mapping"],"title":"SaveConnectorRequest"},"SaveMatchingPlanRequest":{"properties":{"plan":{"$ref":"#/components/schemas/MatchingPlan"},"row_version":{"type":"integer","minimum":1.0,"title":"Row Version"}},"type":"object","required":["plan","row_version"],"title":"SaveMatchingPlanRequest"},"SaveSheetOrganizationRequest":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/SheetOrganizationGroup"},"type":"array","title":"Groups"},"sheets":{"items":{"$ref":"#/components/schemas/SheetOrganizationSheet"},"type":"array","title":"Sheets"},"deleted_group_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Deleted Group Ids"}},"type":"object","required":["groups","sheets"],"title":"SaveSheetOrganizationRequest"},"SaveToLibraryRequest":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"SaveToLibraryRequest"},"SaveToLibraryResponse":{"properties":{"template":{"$ref":"#/components/schemas/ConditionTemplate"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"additionalProperties":false,"type":"object","required":["template","warnings"],"title":"SaveToLibraryResponse"},"SavedConnector":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"version":{"type":"integer","title":"Version"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","template_id","version","is_active"],"title":"SavedConnector"},"ScaleRegion":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"},"width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Width"},"height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Height"},"scale_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Scale Ratio"},"calibration":{"anyOf":[{"$ref":"#/components/schemas/CalibrationData-Output"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"scale_source":{"type":"string","enum":["autoset","user","import"],"title":"Scale Source"},"suggested_notation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Notation"},"suggested_ratio":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Suggested Ratio"},"prior_violated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prior Violated"}},"type":"object","required":["id","project_id","page_id","name","color","x","y","width","height","created_at","updated_at","scale_source"],"title":"ScaleRegion","description":"A single rectangular scale region on a page.\n\n`scale_ratio` / `calibration` are None until the region is calibrated; an\nuncalibrated region is inert for scale resolution (spec §5.1)."},"ScaleRegionDeleteResponse":{"properties":{"recomputed_measurement_count":{"type":"integer","title":"Recomputed Measurement Count"}},"type":"object","required":["recomputed_measurement_count"],"title":"ScaleRegionDeleteResponse"},"ScaleRegionMutationResponse":{"properties":{"region":{"$ref":"#/components/schemas/ScaleRegion"},"recomputed_measurement_count":{"type":"integer","title":"Recomputed Measurement Count"}},"type":"object","required":["region","recomputed_measurement_count"],"title":"ScaleRegionMutationResponse","description":"Returned by calibrate / edit / delete: the region (omitted on delete is\nout of scope — delete returns only the count) plus how many measurements\nwere recomputed in the same transaction."},"SectionGridPlacement":{"properties":{"kind":{"type":"string","const":"section_grid","title":"Kind","default":"section_grid"},"sheet":{"type":"string","title":"Sheet"},"match_key":{"$ref":"#/components/schemas/MatchKey"},"family":{"type":"string","enum":["area","area_multiline","area_shifted","linear_curb","count_footing","linear_footing","grade_beam","pier","slab_shifted","wall"],"title":"Family"},"start_row":{"type":"integer","minimum":7.0,"title":"Start Row"},"max_rows":{"type":"integer","minimum":1.0,"title":"Max Rows"},"columns":{"items":{"$ref":"#/components/schemas/GridColumn"},"type":"array","title":"Columns"}},"type":"object","required":["sheet","match_key","family","start_row","max_rows"],"title":"SectionGridPlacement","description":"Fill a section sheet's line-item grid, one row per matched condition.\n\nA condition matches when its normalized name OR its normalized phase-code\ndescription equals ``match_key.value`` — so a flatwork sheet is filled by a\nsame-named condition (one row) and a member sheet (e.g. Piers) is filled by\nthe many conditions sharing that phase code (one row each). Writes start at\n``start_row`` (>= 7, never the C5/D5 formula totals) up to ``max_rows``; the\nworkbook's own formulas recompute everything downstream."},"SectionInsertPlacement":{"properties":{"kind":{"type":"string","const":"section_insert","title":"Kind","default":"section_insert"},"sheet":{"type":"string","title":"Sheet"},"header_label":{"type":"string","title":"Header Label"},"key_column":{"type":"string","title":"Key Column"},"columns":{"additionalProperties":{"type":"string"},"type":"object","title":"Columns"},"codes":{"items":{"type":"string"},"type":"array","title":"Codes"},"stop_labels":{"items":{"type":"string"},"type":"array","title":"Stop Labels"}},"type":"object","required":["sheet","header_label","key_column","columns","codes"],"title":"SectionInsertPlacement","description":"Insert routed takeoff lines into a named section of a blank template.\n\nUsed to build an estimate from a template whose section line rows are empty\nstubs rather than the project's actual items. The engine locates the section\nby ``header_label`` in ``key_column``, inserts a row per routed quantity just\nbefore the section's subtotal (the first row matching a ``stop_labels`` term\nbelow the header), and keeps the subtotal/total SUM ranges correct. A\nquantity is routed here when its phase code is in ``codes``; its value lands\nin the column ``columns`` maps its UOM to."},"SetAnnotationStatusRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["accepted","rejected","completed","cancelled"]},{"type":"null"}],"title":"Status"},"row_version":{"type":"integer","title":"Row Version"}},"additionalProperties":false,"type":"object","required":["status","row_version"],"title":"SetAnnotationStatusRequest"},"SetDisplayNameRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["display_name"],"title":"SetDisplayNameRequest"},"SetLayerVisibilityRequest":{"properties":{"hidden_layer_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Hidden Layer Ids"}},"additionalProperties":false,"type":"object","required":["hidden_layer_ids"],"title":"SetLayerVisibilityRequest"},"SetPageSheetTypeRequest":{"properties":{"sheet_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sheet Type"}},"type":"object","title":"SetPageSheetTypeRequest"},"SetPageSheetTypeResponse":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"sheet_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Type"},"sheet_type_source":{"anyOf":[{"type":"string","enum":["llm","user"]},{"type":"null"}],"title":"Sheet Type Source"}},"type":"object","required":["page_id","sheet_type","sheet_type_source"],"title":"SetPageSheetTypeResponse"},"SetPageVerificationNoteRequest":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","title":"SetPageVerificationNoteRequest"},"SetPageVerificationNoteResponse":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["page_id","note"],"title":"SetPageVerificationNoteResponse"},"SetProjectVisibilityRequest":{"properties":{"visibility":{"$ref":"#/components/schemas/ProjectVisibility"}},"type":"object","required":["visibility"],"title":"SetProjectVisibilityRequest"},"SheetOrganizationGroup":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"position":{"type":"number","minimum":0.0,"title":"Position"}},"type":"object","required":["id","name","position"],"title":"SheetOrganizationGroup"},"SheetOrganizationSheet":{"properties":{"page_identity_id":{"type":"string","format":"uuid","title":"Page Identity Id"},"sheet_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sheet Group Id"},"position":{"type":"number","minimum":0.0,"title":"Position"}},"type":"object","required":["page_identity_id","sheet_group_id","position"],"title":"SheetOrganizationSheet"},"SignedDownloadResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","expires_in"],"title":"SignedDownloadResponse","description":"A short-lived signed GET URL for rendering the source PDF in the FE.\n\nDistinct from `SignedUploadResponse` because the operation, TTL, and HTTP\nmethod differ. Mint freshly on FE workspace mount and re-mint when\n`expires_in` approaches expiry."},"SignedUploadResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"storage_path":{"type":"string","title":"Storage Path"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","storage_path","expires_in"],"title":"SignedUploadResponse","description":"A short-lived signed PUT URL the browser uploads the PDF to."},"SkipRecord":{"properties":{"skip_issue_ids":{"items":{"type":"string"},"type":"array","title":"Skip Issue Ids"},"refs":{"items":{"$ref":"#/components/schemas/EntityRef"},"type":"array","title":"Refs"},"dropped":{"additionalProperties":{"type":"integer"},"type":"object","title":"Dropped"},"skip_affected":{"items":{"$ref":"#/components/schemas/SkipScope"},"type":"array","title":"Skip Affected"},"reviewed_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed Path"},"reviewed_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed Sha256"}},"type":"object","required":["skip_issue_ids","refs"],"title":"SkipRecord"},"SkipScope":{"properties":{"scope":{"type":"string","enum":["project","condition","sheet"],"title":"Scope"},"condition_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Id"},"page_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Page Id"}},"type":"object","required":["scope"],"title":"SkipScope"},"SourceSummary":{"properties":{"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"nm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nm"},"import_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Import Id"}},"additionalProperties":false,"type":"object","title":"SourceSummary","description":"Bounded import provenance safe for HTTP responses.\n\nFields are optional read-side tolerance: the import pipeline writes all\nthree, but a partial ``source`` row must never fail a list response."},"StackProposalRequest":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"spec":{"$ref":"#/components/schemas/PlaceConditionSpec"}},"additionalProperties":false,"type":"object","required":["conversation_id","spec"],"title":"StackProposalRequest","description":"POST /projects/{id}/stack-proposals body — the canvas door (spec §5).\n\nComposes (never subclasses) PlaceConditionSpec: the ledger stores the bare\nspec dump and the engine arms re-validate it with extra=\"forbid\"."},"StackProposalResponse":{"properties":{"outcome":{"type":"string","enum":["proposed","nothing_to_place"],"title":"Outcome"},"reason":{"anyOf":[{"type":"string","enum":["no_source_markups","already_placed"]},{"type":"null"}],"title":"Reason"},"receipt":{"anyOf":[{"$ref":"#/components/schemas/WriteBatchReceipt"},{"type":"null"}]},"already_placed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Already Placed"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"target_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Name"}},"type":"object","required":["outcome"],"title":"StackProposalResponse","description":"proposed → receipt carries the pending row (fresh propose also carries\nnames/counts; an idempotent replay carries ONLY the receipt — names/counts\nare not stored on the row, and outcome describes the row's existence, not\nits current status). nothing_to_place → no row was written (spec §2) and\n`reason` drives the client copy: no_source_markups (A has nothing in\nscope) vs already_placed (every A is covered)."},"StatedScale":{"properties":{"notation":{"type":"string","title":"Notation"},"ratio":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Ratio"}},"type":"object","required":["notation","ratio"],"title":"StatedScale","description":"One scale this sheet states, after the callout-artifact filter.\n\n`ratio` is ADR-0024 canonical form (real inches per PDF point)."},"SummarizeOverlayChangesRequest":{"properties":{"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number","description":"e.g. \"S1.1\"."},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"full_sheet_jpeg":{"type":"string","title":"Full Sheet Jpeg","description":"Base64 JPEG — downsampled full-sheet composite (location anchor)."},"groups":{"items":{"$ref":"#/components/schemas/OverlayGroupCrops"},"type":"array","maxItems":12,"minItems":1,"title":"Groups"}},"type":"object","required":["full_sheet_jpeg","groups"],"title":"SummarizeOverlayChangesRequest"},"SummaryCondition":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"geometry_kind":{"type":"string","enum":["count","linear","area"],"title":"Geometry Kind"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"phase_code":{"anyOf":[{"$ref":"#/components/schemas/PhaseCodeRef"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name"},"sort_order":{"type":"number","title":"Sort Order"},"layer_id":{"type":"string","format":"uuid","title":"Layer Id"},"layer_hidden":{"type":"boolean","title":"Layer Hidden"},"condition_hidden":{"type":"boolean","title":"Condition Hidden"},"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}]},"measurement_count":{"type":"integer","title":"Measurement Count"},"pending_count":{"type":"integer","title":"Pending Count","default":0},"derivations":{"items":{"$ref":"#/components/schemas/SummaryDerivation"},"type":"array","title":"Derivations"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"},"bid_area_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bid Area Path"},"zone_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Zone Id"},"zone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Name"},"trace_groups":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraceGroup"},"type":"array"},{"type":"null"}],"title":"Trace Groups"}},"type":"object","required":["condition_id","name","color","geometry_kind","sort_order","layer_id","layer_hidden","condition_hidden","measurement_count"],"title":"SummaryCondition","description":"One row in the Summary table."},"SummaryDerivation":{"properties":{"ordinal":{"type":"integer","minimum":1.0,"title":"Ordinal"},"result_type":{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"],"title":"Result Type"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"value":{"type":"number","title":"Value"},"base_value":{"type":"number","title":"Base Value"},"factor_min":{"type":"number","title":"Factor Min"},"factor_max":{"type":"number","title":"Factor Max"}},"type":"object","required":["ordinal","result_type","uom","value","base_value","factor_min","factor_max"],"title":"SummaryDerivation","description":"One rolled-up derivation value for a condition on Summary."},"SummaryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SummaryCondition"},"type":"array","title":"Items"},"total_conditions_in_project":{"type":"integer","title":"Total Conditions In Project"},"hidden_condition_count":{"type":"integer","title":"Hidden Condition Count"},"sheet_count":{"type":"integer","title":"Sheet Count"},"filtered_sheet_count":{"type":"integer","title":"Filtered Sheet Count"}},"type":"object","required":["items","total_conditions_in_project","hidden_condition_count","sheet_count","filtered_sheet_count"],"title":"SummaryResponse"},"SupportMessage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sender":{"type":"string","enum":["user","operator"],"title":"Sender"},"kind":{"type":"string","enum":["message","bug_report"],"title":"Kind"},"body":{"type":"string","title":"Body"},"context":{"anyOf":[{"$ref":"#/components/schemas/BugReportContext"},{"type":"null"}]},"delivered":{"type":"boolean","title":"Delivered"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sender","kind","body","delivered","created_at"],"title":"SupportMessage"},"SupportMessageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SupportMessage"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"SupportMessageListResponse"},"TextBlock":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"TextBlock"},"TextElement":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"extraction_id":{"type":"string","format":"uuid","title":"Extraction Id"},"content":{"type":"string","title":"Content"},"bbox_x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox X"},"bbox_y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox Y"},"bbox_width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox Width"},"bbox_height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Bbox Height"},"font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Family"},"font_size":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Font Size"},"rotation":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rotation","default":"0"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","page_id","extraction_id","content","bbox_x","bbox_y","bbox_width","bbox_height"],"title":"TextElement","description":"A single text run extracted from a page."},"TextElementListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TextElement"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"TextElementListResponse"},"TextVariable":{"properties":{"id":{"type":"string","maxLength":18,"minLength":10,"pattern":"^v_[A-Za-z0-9]{8,16}$","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":500,"title":"Description","default":""},"hide":{"type":"boolean","title":"Hide","default":false},"kind":{"type":"string","const":"text","title":"Kind"},"default":{"type":"string","maxLength":500,"title":"Default","default":""},"hide_if_zero":{"type":"boolean","title":"Hide If Zero","default":false},"hide_if_not_used":{"type":"boolean","title":"Hide If Not Used","default":false},"clear_if_hidden":{"type":"boolean","title":"Clear If Hidden","default":false}},"additionalProperties":false,"type":"object","required":["id","name","kind"],"title":"TextVariable"},"TileModule":{"properties":{"w_in":{"type":"integer","minimum":0.0,"title":"W In"},"h_in":{"type":"integer","minimum":0.0,"title":"H In"},"gap_in":{"type":"integer","minimum":0.0,"title":"Gap In"}},"additionalProperties":false,"type":"object","required":["w_in","h_in","gap_in"],"title":"TileModule"},"ToggleConditionVisibilityRequest":{"properties":{"condition_id":{"type":"string","format":"uuid","title":"Condition Id"},"hidden":{"type":"boolean","title":"Hidden"}},"additionalProperties":false,"type":"object","required":["condition_id","hidden"],"title":"ToggleConditionVisibilityRequest"},"ToggleLayerVisibilityRequest":{"properties":{"layer_id":{"type":"string","format":"uuid","title":"Layer Id"},"hidden":{"type":"boolean","title":"Hidden"}},"additionalProperties":false,"type":"object","required":["layer_id","hidden"],"title":"ToggleLayerVisibilityRequest"},"ToolResultBlock":{"properties":{"type":{"type":"string","const":"tool_result","title":"Type","default":"tool_result"},"tool_use_id":{"type":"string","title":"Tool Use Id"},"content":{"anyOf":[{"type":"string"},{"items":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageRefPart"}],"discriminator":{"propertyName":"type","mapping":{"image_ref":"#/components/schemas/ImageRefPart","text":"#/components/schemas/TextBlock"}}},"type":"array"}],"title":"Content"},"is_error":{"type":"boolean","title":"Is Error","default":false}},"type":"object","required":["tool_use_id","content"],"title":"ToolResultBlock"},"ToolUseBlock":{"properties":{"type":{"type":"string","const":"tool_use","title":"Type","default":"tool_use"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"provider_signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Signature"}},"type":"object","required":["id","name","input"],"title":"ToolUseBlock"},"TotalsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionTotal"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TotalsResponse"},"TraceGroup":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"measurement_count":{"type":"integer","title":"Measurement Count"},"pending_count":{"type":"integer","title":"Pending Count","default":0},"derivations":{"items":{"$ref":"#/components/schemas/SummaryDerivation"},"type":"array","title":"Derivations"}},"type":"object","required":["measurement_count"],"title":"TraceGroup","description":"One named subdivision of a condition's measurements (RUD-265/266).\n\nNested inside SummaryCondition, NOT emitted as a sibling row — `items`\nstays one row per condition because five of compute_summary's six\nconsumers key on that invariant. Spec §5."},"TraceGroupRef":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"measurement_count":{"type":"integer","title":"Measurement Count"}},"type":"object","required":["measurement_count"],"title":"TraceGroupRef","description":"One named subdivision of a condition's measurements, for the conditions\ntree (RUD-265/266). Project-wide by construction: `useMeasurements` is\npageId-keyed, so groups synthesized from the page cache would shuffle as the\nuser pages around. Spec §5."},"UiState":{"properties":{"active_takeoff_tool":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Active Takeoff Tool"},"active_markup_tool":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Active Markup Tool"},"selected_measurement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Selected Measurement Ids"},"selected_annotation_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Selected Annotation Ids"},"total_selected":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total Selected"}},"type":"object","title":"UiState","description":"Client canvas snapshot. Transport only: never rendered into prompts and\nstripped from the persisted ContextBlock (see rudus_api/ai/chat.py); read\nsolely by the get_ui_state tool."},"UiStateReplyRequest":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"ui_state":{"$ref":"#/components/schemas/UiState"}},"type":"object","required":["request_id","ui_state"],"title":"UiStateReplyRequest"},"UnconfirmPageVerificationResponse":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"status":{"type":"string","enum":["confirmed","corrected","failed-gate","needs-scale","auto-passed"],"title":"Status"}},"type":"object","required":["page_id","status"],"title":"UnconfirmPageVerificationResponse","description":"The page's derived status once the confirmation is withdrawn.\n\n`status` is never \"confirmed\"/\"corrected\" here: both require a non-null\n`confirmed_at`, which unconfirm has just cleared."},"UnknownBlock":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"UnknownBlock"},"UnmatchedQuantity":{"properties":{"condition_name":{"type":"string","title":"Condition Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Uom"},"value":{"type":"number","title":"Value"},"result_type":{"anyOf":[{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"]},{"type":"null"}],"title":"Result Type"}},"type":"object","required":["condition_name","uom","value"],"title":"UnmatchedQuantity"},"UnplacedQuantity":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"type":"string","title":"Name"},"uoms":{"items":{"type":"string"},"type":"array","title":"Uoms"}},"type":"object","required":["name","uoms"],"title":"UnplacedQuantity"},"UomConflict":{"properties":{"key_type":{"type":"string","enum":["code","name"],"title":"Key Type"},"key":{"type":"string","title":"Key"},"requested_uom":{"type":"string","enum":["EA","LF","IN","FT","SF","SY","CF","CY"],"title":"Requested Uom"},"result_type":{"anyOf":[{"type":"string","enum":["count","total_height","perimeter","surface_area_top_or_bottom","surface_area_top_and_bottom","surface_area_all_sides","surface_area_full","volume","length","segment_count","surface_area_single_side","surface_area_both_sides","surface_area_single_end","surface_area_both_ends","surface_area_all_side_duct","area","grid_length_visible","grid_length_x_visible","grid_length_y_visible","grid_intersection_count","tile_count_average","tile_count_visible","area_counts"]},{"type":"null"}],"title":"Result Type"}},"type":"object","required":["key_type","key","requested_uom"],"title":"UomConflict"},"UpdateAnnotationReplyRequest":{"properties":{"body":{"type":"string","maxLength":20000,"minLength":1,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$","title":"Body"}},"additionalProperties":false,"type":"object","required":["body"],"title":"UpdateAnnotationReplyRequest"},"UpdateAnnotationRequest":{"properties":{"row_version":{"type":"integer","title":"Row Version"},"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AnnotationPointGeometry-Input"},{"$ref":"#/components/schemas/AnnotationRectGeometry-Input"},{"$ref":"#/components/schemas/AnnotationCalloutGeometry-Input"},{"$ref":"#/components/schemas/AnnotationPolylineGeometry-Input"},{"$ref":"#/components/schemas/AnnotationPolygonGeometry-Input"},{"$ref":"#/components/schemas/AnnotationInkGeometry-Input"},{"$ref":"#/components/schemas/AnnotationQuadsGeometry-Input"}],"discriminator":{"propertyName":"type","mapping":{"callout":"#/components/schemas/AnnotationCalloutGeometry-Input","ink":"#/components/schemas/AnnotationInkGeometry-Input","point":"#/components/schemas/AnnotationPointGeometry-Input","polygon":"#/components/schemas/AnnotationPolygonGeometry-Input","polyline":"#/components/schemas/AnnotationPolylineGeometry-Input","quads":"#/components/schemas/AnnotationQuadsGeometry-Input","rect":"#/components/schemas/AnnotationRectGeometry-Input"}}},{"type":"null"}],"title":"Geometry"},"style":{"anyOf":[{"$ref":"#/components/schemas/AnnotationStyle-Input"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Subject"},"contents":{"anyOf":[{"type":"string","maxLength":20000,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]*$"},{"type":"null"}],"title":"Contents"},"visibility":{"anyOf":[{"type":"string","enum":["private","project"]},{"type":"null"}],"title":"Visibility"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"}},"additionalProperties":false,"type":"object","required":["row_version"],"title":"UpdateAnnotationRequest"},"UpdateBidAreaRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"parent_bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Bid Area Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"UpdateBidAreaRequest","description":"Partial update — omitted fields are left alone. `parent_bid_area_id`\nnull-vs-omitted is disambiguated via model_dump(exclude_unset=True),\nsame as UpdateFolderRequest."},"UpdateConditionLibraryFolderRequest":{"properties":{"row_version":{"type":"integer","minimum":1.0,"title":"Row Version"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["row_version"],"title":"UpdateConditionLibraryFolderRequest","description":"Partial update; omitted parent leaves it alone and explicit null moves to root."},"UpdateConditionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"config":{"anyOf":[{"$ref":"#/components/schemas/ConditionConfig"},{"type":"null"}]},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateDerivation"},"type":"array"},{"type":"null"}],"title":"Derivations"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"layer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Layer Id"},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"}},"additionalProperties":false,"type":"object","title":"UpdateConditionRequest","description":"Partial update. `geometry_kind`, `unit` deliberately absent — both\nimmutable.\n\n`folder_id` accepts an explicit `null` (move to root). The route\nlayer must use `model_dump(exclude_unset=True)` to distinguish\n\"omitted\" from \"explicit null\" before forwarding to the repo.\n\n`layer_id` is optional (\"omitted = leave alone\") but explicit null\nis rejected by the route (conditions must always have a layer; per\nADR-0026).\n\n`derivations` semantics: None → leave alone; [] → 422; non-empty list\n→ full replacement (atomic DELETE + INSERT in one transaction)."},"UpdateConditionTemplateRequest":{"properties":{"row_version":{"type":"integer","minimum":1.0,"title":"Row Version"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"shape":{"anyOf":[{"type":"string","enum":["circle","square","rectangle"]},{"type":"null"}],"title":"Shape"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"config":{"anyOf":[{"$ref":"#/components/schemas/ConditionConfig"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Notes"},"attachment_kind":{"anyOf":[{"type":"string","enum":["area","linear"]},{"type":"null"}],"title":"Attachment Kind"},"attachment_config":{"anyOf":[{"$ref":"#/components/schemas/AttachmentConfig"},{"type":"null"}]},"extension_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Extension Id"},"phase_code_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phase Code Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateDerivation"},"type":"array"},{"type":"null"}],"title":"Derivations"}},"additionalProperties":false,"type":"object","required":["row_version"],"title":"UpdateConditionTemplateRequest","description":"Partial update; omitted fields are unchanged and explicit null clears nullable fields."},"UpdateConversationRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"visibility":{"anyOf":[{"type":"string","enum":["private","project"]},{"type":"null"}],"title":"Visibility"}},"type":"object","title":"UpdateConversationRequest"},"UpdateExtensionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"variables":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/NumericVariable"},{"$ref":"#/components/schemas/TextVariable"},{"$ref":"#/components/schemas/CheckboxVariable"},{"$ref":"#/components/schemas/DropdownVariable"},{"$ref":"#/components/schemas/FormulaVariable"}],"discriminator":{"propertyName":"kind","mapping":{"checkbox":"#/components/schemas/CheckboxVariable","dropdown":"#/components/schemas/DropdownVariable","formula":"#/components/schemas/FormulaVariable","numeric":"#/components/schemas/NumericVariable","text":"#/components/schemas/TextVariable"}}},"type":"array","maxItems":100},{"type":"null"}],"title":"Variables"}},"additionalProperties":false,"type":"object","title":"UpdateExtensionRequest","description":"Partial update; route enforces fields_set non-empty."},"UpdateFolderRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"UpdateFolderRequest","description":"Partial update — fields omitted are left alone.\n\n`parent_folder_id` is intentionally `UUID | None` in both the\n'omitted' and 'explicit null' senses. The repository must use\n`model_dump(exclude_unset=True)` to tell them apart: omitted means\n'don't move'; explicit null means 'move to root'."},"UpdateLayerRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"UpdateLayerRequest","description":"Partial update. Both fields optional; at least one must be set\n(validated at the route boundary via fields_set length)."},"UpdateMeasurementRequest":{"properties":{"geometry":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/PointGeometry-Input"},{"$ref":"#/components/schemas/PolylineGeometry-Input"},{"$ref":"#/components/schemas/PolygonGeometry-Input"}],"discriminator":{"propertyName":"type","mapping":{"point":"#/components/schemas/PointGeometry-Input","polygon":"#/components/schemas/PolygonGeometry-Input","polyline":"#/components/schemas/PolylineGeometry-Input"}}},{"type":"null"}],"title":"Geometry"},"extension_values":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Extension Values"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"bid_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bid Area Id"}},"additionalProperties":false,"type":"object","title":"UpdateMeasurementRequest","description":"Partial update. Geometry triggers server-side recompute of\ncomputed_value; extension_values are validated against the\ncondition's attached extension at PATCH time.\n\n`extra=\"forbid\"` so attempts to PATCH `condition_id`, `page_id`, or\n`computed_value` get a clean 422 instead of being silently dropped."},"UpdatePageCalibrationRequest":{"properties":{"revision_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Set Id"},"calibration":{"$ref":"#/components/schemas/CalibrationData-Input"},"accepted_suggestion":{"type":"boolean","title":"Accepted Suggestion","default":false},"confirm_reduced_print":{"type":"boolean","title":"Confirm Reduced Print","default":false}},"additionalProperties":false,"type":"object","required":["revision_set_id","calibration"],"title":"UpdatePageCalibrationRequest","description":"Set or update a page's calibration.\n\nServer computes scale_ratio from the embedded CalibrationData and\nwrites both columns atomically alongside a recompute of every\nlinear/area measurement on the page."},"UpdatePageCalibrationResponse":{"properties":{"page":{"$ref":"#/components/schemas/PageDetail"},"recomputed_measurement_count":{"type":"integer","title":"Recomputed Measurement Count"}},"type":"object","required":["page","recomputed_measurement_count"],"title":"UpdatePageCalibrationResponse"},"UpdatePageRequest":{"properties":{"sheet_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Sheet Title"}},"additionalProperties":false,"type":"object","title":"UpdatePageRequest","description":"Partial update of a page's display metadata (merge semantics).\n\nOnly the fields PRESENT in the request body are written; omitted\nfields are left untouched (the server reads `model_fields_set`). A\nfield set to `null` clears that column. Each field that is provided is\nmarked `source='user'` so a later auto re-run (Step-3 sheet naming,\nADR-0060) never overwrites a manual edit. Number and title are\nindependent — editing the title leaves an extracted number intact."},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"$ref":"#/components/schemas/ProjectStatus"},{"type":"null"}]}},"type":"object","title":"UpdateProjectRequest","description":"Partial update — only fields present are changed."},"UpdateRulerRequest":{"properties":{"x1":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X1"},"y1":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y1"},"x2":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X2"},"y2":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y2"}},"additionalProperties":false,"type":"object","title":"UpdateRulerRequest"},"UpdateScaleRegionCalibrationRequest":{"properties":{"calibration":{"$ref":"#/components/schemas/CalibrationData-Input"},"accepted_suggestion":{"type":"boolean","title":"Accepted Suggestion","default":false},"confirm_reduced_print":{"type":"boolean","title":"Confirm Reduced Print","default":false}},"additionalProperties":false,"type":"object","required":["calibration"],"title":"UpdateScaleRegionCalibrationRequest","description":"Set or update a region's calibration.\n\nServer computes `scale_ratio` from the embedded CalibrationData via the\nexisting `compute_scale_ratio` and recomputes only this region's\nmeasurements, atomically (spec §5.3). Mirrors\n`UpdatePageCalibrationRequest`."},"UpdateScaleRegionRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Height"},"on_orphan":{"anyOf":[{"type":"string","enum":["snap_to_page","delete"]},{"type":"null"}],"title":"On Orphan"}},"additionalProperties":false,"type":"object","title":"UpdateScaleRegionRequest","description":"Rename (metadata-only) and/or move/resize a region.\n\nA geometry change re-resolves membership and recomputes (spec §5.4). If the\nedit would straddle or strand any measurement, the route rejects 422\n(\"scale_region_edit_would_orphan_measurements\") unless `on_orphan` selects\nan explicit resolution: 'snap_to_page' (only valid when a page scale exists)\nor 'delete'."},"UpdateZoneRegionRequest":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"width":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Width"},"height":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Height"}},"additionalProperties":false,"type":"object","required":["x","y","width","height"],"title":"UpdateZoneRegionRequest"},"UpdateZoneRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"factor":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Factor"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","title":"UpdateZoneRequest","description":"Partial update — omitted fields are left alone (folders convention)."},"UploadTarget":{"properties":{"role":{"type":"string","enum":["source","drawing"],"title":"Role"},"filename":{"type":"string","title":"Filename"},"storage_path":{"type":"string","title":"Storage Path"},"upload_url":{"type":"string","title":"Upload Url"}},"type":"object","required":["role","filename","storage_path","upload_url"],"title":"UploadTarget"},"UpsertPageNoteRequest":{"properties":{"body":{"type":"string","maxLength":10000,"title":"Body"},"row_version":{"type":"integer","minimum":0.0,"title":"Row Version"}},"additionalProperties":false,"type":"object","required":["body","row_version"],"title":"UpsertPageNoteRequest"},"VerificationCheck":{"properties":{"condition_ref":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Ref"},"condition_name":{"type":"string","title":"Condition Name"},"result_key":{"type":"string","title":"Result Key"},"printed":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Printed"},"computed":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Computed"},"delta":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Delta"},"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["condition_ref","condition_name","result_key","printed","computed","delta","ok"],"title":"VerificationCheck"},"VerificationCounts":{"properties":{"confirmed":{"type":"integer","title":"Confirmed","default":0},"corrected":{"type":"integer","title":"Corrected","default":0},"failed-gate":{"type":"integer","title":"Failed-Gate","default":0},"needs-scale":{"type":"integer","title":"Needs-Scale","default":0},"auto-passed":{"type":"integer","title":"Auto-Passed","default":0}},"type":"object","title":"VerificationCounts"},"VerificationPage":{"properties":{"page_id":{"type":"string","format":"uuid","title":"Page Id"},"drawing_id":{"type":"string","format":"uuid","title":"Drawing Id"},"drawing_name":{"type":"string","title":"Drawing Name"},"page_number":{"type":"integer","title":"Page Number"},"sheet_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Number"},"sheet_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Title"},"synthetic":{"type":"boolean","title":"Synthetic","default":false},"status":{"type":"string","enum":["confirmed","corrected","failed-gate","needs-scale","auto-passed"],"title":"Status"},"gate_status":{"type":"string","enum":["passed","needs_scale","failed"],"title":"Gate Status"},"reasons":{"items":{"$ref":"#/components/schemas/VerificationReason"},"type":"array","title":"Reasons"},"checks":{"items":{"$ref":"#/components/schemas/VerificationCheck"},"type":"array","title":"Checks"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"confirmed_source":{"anyOf":[{"type":"string","enum":["user","auto"]},{"type":"null"}],"title":"Confirmed Source"},"correction_summary":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Correction Summary"},"color_ambiguity_flagged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Color Ambiguity Flagged At"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"sheet_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Type"},"sheet_type_source":{"anyOf":[{"type":"string","enum":["llm","user"]},{"type":"null"}],"title":"Sheet Type Source"},"page_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Type"},"can_confirm":{"type":"boolean","title":"Can Confirm"},"blockers":{"items":{"$ref":"#/components/schemas/VerificationReason"},"type":"array","title":"Blockers"}},"type":"object","required":["page_id","drawing_id","drawing_name","page_number","sheet_number","sheet_title","status","gate_status","reasons","checks","confirmed_at","confirmed_source","correction_summary","color_ambiguity_flagged_at","note","sheet_type","sheet_type_source","can_confirm","blockers"],"title":"VerificationPage"},"VerificationReason":{"properties":{"code":{"type":"string","title":"Code"},"context":{"additionalProperties":true,"type":"object","title":"Context"}},"type":"object","required":["code"],"title":"VerificationReason"},"WriteBatchReceipt":{"properties":{"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"items":{"items":{"$ref":"#/components/schemas/ActionReceipt"},"type":"array","title":"Items"}},"type":"object","required":["batch_id","items"],"title":"WriteBatchReceipt"},"Zone":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"factor":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Factor"},"sort_order":{"type":"number","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"regions":{"items":{"$ref":"#/components/schemas/ZoneRegion"},"type":"array","title":"Regions"},"measurement_count":{"type":"integer","title":"Measurement Count","default":0}},"type":"object","required":["id","project_id","name","factor","sort_order","created_at"],"title":"Zone"},"ZoneAttributionItem":{"properties":{"zone_id":{"type":"string","format":"uuid","title":"Zone Id"},"fraction":{"type":"number","title":"Fraction"}},"type":"object","required":["zone_id","fraction"],"title":"ZoneAttributionItem"},"ZoneListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Zone"},"type":"array","title":"Items"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["items"],"title":"ZoneListResponse"},"ZoneRegion":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"zone_id":{"type":"string","format":"uuid","title":"Zone Id"},"page_id":{"type":"string","format":"uuid","title":"Page Id"},"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"},"width":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Width"},"height":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Height"}},"type":"object","required":["id","zone_id","page_id","x","y","width","height"],"title":"ZoneRegion"},"_AnchorAfter":{"properties":{"after_id":{"type":"string","format":"uuid","title":"After Id"}},"additionalProperties":false,"type":"object","required":["after_id"],"title":"_AnchorAfter"},"_AnchorAtEnd":{"properties":{"at_end":{"type":"boolean","const":true,"title":"At End"}},"additionalProperties":false,"type":"object","required":["at_end"],"title":"_AnchorAtEnd"},"_AnchorAtStart":{"properties":{"at_start":{"type":"boolean","const":true,"title":"At Start"}},"additionalProperties":false,"type":"object","required":["at_start"],"title":"_AnchorAtStart"},"_AnchorBefore":{"properties":{"before_id":{"type":"string","format":"uuid","title":"Before Id"}},"additionalProperties":false,"type":"object","required":["before_id"],"title":"_AnchorBefore"},"_RectShape-Input":{"properties":{"x":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Y"},"w":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"W"},"h":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"H"}},"additionalProperties":false,"type":"object","required":["x","y","w","h"],"title":"_RectShape"},"_RectShape-Output":{"properties":{"x":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"X"},"y":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Y"},"w":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"W"},"h":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"H"}},"additionalProperties":false,"type":"object","required":["x","y","w","h"],"title":"_RectShape"}}}}