{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/disclosures":{"get":{"tags":["disclosures"],"summary":"List Disclosures","operationId":"list_disclosures_disclosures_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DisclosureStatus"},{"type":"null"}],"title":"Status"}},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DisclosureResponse"},"title":"Response List Disclosures Disclosures Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["disclosures"],"summary":"Create Disclosure","operationId":"create_disclosure_disclosures_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDisclosureRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/export":{"get":{"tags":["disclosures"],"summary":"Export Disclosures","operationId":"export_disclosures_disclosures_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","xlsx"],"type":"string","default":"csv","title":"Format"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DisclosureStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Disclosures Disclosures Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/import/preview":{"post":{"tags":["disclosures"],"summary":"Preview Import","operationId":"preview_import_disclosures_import_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_preview_import_disclosures_import_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/import/commit":{"post":{"tags":["disclosures"],"summary":"Commit Import","operationId":"commit_import_disclosures_import_commit_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_commit_import_disclosures_import_commit_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportCommitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/{disclosure_id}":{"get":{"tags":["disclosures"],"summary":"Get Disclosure","operationId":"get_disclosure_disclosures__disclosure_id__get","parameters":[{"name":"disclosure_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disclosure Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["disclosures"],"summary":"Update Disclosure","operationId":"update_disclosure_disclosures__disclosure_id__patch","parameters":[{"name":"disclosure_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disclosure Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDisclosureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/{disclosure_id}/status":{"post":{"tags":["disclosures"],"summary":"Set Disclosure Status","operationId":"set_disclosure_status_disclosures__disclosure_id__status_post","parameters":[{"name":"disclosure_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disclosure Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDisclosureStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disclosures/{disclosure_id}/custom-field-values":{"post":{"tags":["disclosures"],"summary":"Set Disclosure Custom Field Values","operationId":"set_disclosure_custom_field_values_disclosures__disclosure_id__custom_field_values_post","parameters":[{"name":"disclosure_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Disclosure Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDisclosureCustomFieldValuesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-runs/{agent_run_id}/status":{"get":{"tags":["agent-runs"],"summary":"Get Agent Run Status","description":"Generic status check for any AgentRun subclass.\n\nQueries the base agent_runs table so it works for SmartDocumentAgentRun,\nReviewReportingAgentRun, FormFieldDeriverAgentRun, and any future types\nwithout per-type plumbing.","operationId":"get_agent_run_status_agent_runs__agent_run_id__status_get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatusResponse"},{"$ref":"#/components/schemas/ReportingAgentRunResult"}],"title":"Response Get Agent Run Status Agent Runs  Agent Run Id  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyze/program_types":{"get":{"tags":["analyze"],"summary":"Get Program Types","operationId":"get_program_types_analyze_program_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"propertyNames":{"$ref":"#/components/schemas/ProgramType"},"type":"object","title":"Response Get Program Types Analyze Program Types Get"}}}}}}},"/analyze/run/batch/drafting":{"post":{"tags":["analyze"],"summary":"Run Batch Drafting","operationId":"run_batch_drafting_analyze_run_batch_drafting_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericBatchAnalysisRequest_DraftingAnalysisRequest_"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"type":"string","format":"uuid"},"propertyNames":{"format":"uuid"},"type":"object"},"type":"object","title":"Response Run Batch Drafting Analyze Run Batch Drafting Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyze/run/{analysis_type}":{"post":{"tags":["analyze"],"summary":"Run Analysis","operationId":"run_analysis_analyze_run__analysis_type__post","parameters":[{"name":"analysis_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RunType"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisRequestEndpoint"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyze/run/batch/{analysis_type}":{"post":{"tags":["analyze"],"summary":"Run Batch Analysis","operationId":"run_batch_analysis_analyze_run_batch__analysis_type__post","parameters":[{"name":"analysis_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RunType"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAnalysisRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/preview-file-type-values":{"get":{"tags":["internal"],"summary":"Preview File Type Values","description":"Fetch all distinct file_type values across the entire files table and\nattempt to resolve each to a valid DocumentTypeEnum slug.\n\nUseful for auditing the file_type column before running a normalization\nbackfill. Values that cannot be resolved are listed prominently under\n``unresolved`` — those will need either a manual mapping or a new\nDocumentTypeEnum member before the backfill can proceed.","operationId":"preview_file_type_values_backfills_preview_file_type_values_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Preview File Type Values Backfills Preview File Type Values Get"}}}}}}},"/backfills/preview-ep-definition-labels":{"get":{"tags":["internal"],"summary":"Preview Ep Definition Labels","description":"Dry run for the definition label/instructions backfill (Op 1).","operationId":"preview_ep_definition_labels_backfills_preview_ep_definition_labels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"}]}}}]},"title":"Response Preview Ep Definition Labels Backfills Preview Ep Definition Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-ep-definition-labels":{"post":{"tags":["internal"],"summary":"Backfill Ep Definition Labels","description":"Seed DEFAULT_COMPLIANCE_LABELS onto definitions with no configured labels\n(never overwrites an existing custom label set), and seed\nlabel_instructions with the legacy heuristics prompt onto plain-check\ndefinitions (inherent_risk_template_id IS NULL) that have no instructions\nyet — risk-factor definitions never used the heuristics prompt, so they\nare left empty.","operationId":"backfill_ep_definition_labels_backfills_backfill_ep_definition_labels_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Ep Definition Labels Backfills Backfill Ep Definition Labels Post"}}}}}}},"/backfills/preview-ep-packet-labels":{"get":{"tags":["internal"],"summary":"Preview Ep Packet Labels","description":"Dry run for the packet label-snapshot backfill (Op 2). Run\nbackfill-ep-definition-labels first so definitions have labels to copy.","operationId":"preview_ep_packet_labels_backfills_preview_ep_packet_labels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]}}}]},"title":"Response Preview Ep Packet Labels Backfills Preview Ep Packet Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-ep-packet-labels":{"post":{"tags":["internal"],"summary":"Backfill Ep Packet Labels","description":"Copy control_strength_labels + label_instructions from the resolved\nEvidencePacketReviewTaskDefinition onto every EvidencePacket that has no\nsnapshot yet. Packets whose company has no configured definition are left\nwith an empty snapshot (matches live snapshot_packet_label_config behavior)\nand counted separately.","operationId":"backfill_ep_packet_labels_backfills_backfill_ep_packet_labels_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Ep Packet Labels Backfills Backfill Ep Packet Labels Post"}}}}}}},"/backfills/preview-ep-check-labels":{"get":{"tags":["internal"],"summary":"Preview Ep Check Labels","description":"Dry run for the requirement-check label backfill (Op 3).","operationId":"preview_ep_check_labels_backfills_preview_ep_check_labels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}}}]},"title":"Response Preview Ep Check Labels Backfills Preview Ep Check Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-ep-check-labels":{"post":{"tags":["internal"],"summary":"Backfill Ep Check Labels","description":"Translate legacy compliance/ai_compliance values onto check_label/\nai_check_label so existing rows read correctly under the new label\nsystem. The legacy enum values are lowercase/snake_case\n(``RequirementComplianceStatus``), so each is mapped onto the matching\n``DEFAULT_COMPLIANCE_LABELS`` text (or ``NO_EVIDENCE_LABEL``) via\n``_LEGACY_COMPLIANCE_TO_LABEL`` rather than written through verbatim.\nclassified_at (the new completion sentinel) is backfilled from\nmodified/created only for rows that were actually AI-classified\n(ai_compliance IS NOT NULL) — reviewer-only overrides with no AI run\notherwise wouldn't have a sentinel and stay unclassified, matching live\nbehavior.","operationId":"backfill_ep_check_labels_backfills_backfill_ep_check_labels_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Ep Check Labels Backfills Backfill Ep Check Labels Post"}}}}}}},"/backfills/preview-evidence-labels":{"get":{"tags":["internal"],"summary":"Preview Evidence Labels","description":"Combined dry run across all three label-backfill operations, writing\nnothing. See preview-ep-definition-labels / preview-ep-packet-labels /\npreview-ep-check-labels for the per-operation equivalents.","operationId":"preview_evidence_labels_backfills_preview_evidence_labels_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Evidence Labels Backfills Preview Evidence Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/preview-archived-vendor-services":{"get":{"tags":["internal"],"summary":"Preview Archived Vendor Services","description":"Dry run for the archived-vendor services backfill.","operationId":"preview_archived_vendor_services_backfills_preview_archived_vendor_services_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}]},"title":"Response Preview Archived Vendor Services Backfills Preview Archived Vendor Services Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-archived-vendor-services":{"post":{"tags":["internal"],"summary":"Backfill Archived Vendor Services","description":"Archive every active service whose vendor is archived, restoring the\nactive-service/active-vendor invariant. Soft-deleted services are included\nso the invariant holds unconditionally if one is ever undeleted. Services\narchived under a still-active vendor are left alone — that's a legitimate\nstate, so this only ever tightens, never restores.","operationId":"backfill_archived_vendor_services_backfills_backfill_archived_vendor_services_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Archived Vendor Services Backfills Backfill Archived Vendor Services Post"}}}}}}},"/backfills/preview-contract-term-seed":{"get":{"tags":["internal"],"summary":"Preview Contract Term Seed","description":"Dry run for the contract-term seed backfill.\n\nThe counts are exact (computed over the whole candidate set); ``drift`` is a\nsample capped at ``limit``, with ``truncated`` set when it was cut off — so a\nlarge tenant's response stays readable without under-reporting the scale.","operationId":"preview_contract_term_seed_backfills_preview_contract_term_seed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTermSeedPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-contract-term-seed":{"post":{"tags":["internal"],"summary":"Backfill Contract Term Seed","description":"Create term 1 for every candidate contract, copying ``effective_date`` →\n``start_date``, ``expiration_date`` → ``end_date``, and ``auto_renews``\nstraight through. Enriching a term with its notice date, notice period and\nrenewal term from the contract-sourced ``annual_key_dates`` rows is a separate\nbackfill, since that needs the key-date recurrence math.\n\n**Materializes no reminder rows** (``materialize_reminders=False``): reminders\nstart flowing at cutover, not at seed time, and a ladder per seeded term would\nbe a mass email the next morning. Those terms get their ladder the first time\nanything touches them.\n\nEach contract is written inside its own savepoint, so one whose stored dates\nviolate the term CHECK is reported in ``skipped_invalid_dates`` instead of\naborting the run.","operationId":"backfill_contract_term_seed_backfills_backfill_contract_term_seed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractTermSeedBackfillResponse"}}}}}}},"/backfills/preview-vendor-contact-workos-users":{"post":{"tags":["internal"],"summary":"Preview Vendor Contact Workos Users","description":"Dry run for the vendor-contact WorkOS backfill. Read-only on both sides:\nlists every active vendor contact, checks which already exist in the\ntarget WorkOS environment, and reports who the backfill would create.\nWrites nothing to either the app database or WorkOS.","operationId":"preview_vendor_contact_workos_users_backfills_preview_vendor_contact_workos_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWorkosCredentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorContactWorkosPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-vendor-contact-workos-users":{"post":{"tags":["internal"],"summary":"Backfill Vendor Contact Workos Users","description":"Create a WorkOS Magic Auth identity (no password — Magic Auth doesn't\nneed one) for every active vendor contact missing one in the target\nenvironment, in the same shape _ensure_workos_identity and\nprovision_workos_user use, so a backfilled contact and a lazily-created\none are indistinguishable. Names are passed so the WorkOS dashboard is\nlegible.\n\nProcesses the full contact set in a single request — this can be a long\nrequest on a large tenant. Each email is created independently under its\nown try/except, so one bad address can't strand the rest, and failures\nare collected rather than aborting the run. A re-run converges to zero\ncreates because the existence diff against WorkOS is recomputed fresh\neach time.","operationId":"backfill_vendor_contact_workos_users_backfills_backfill_vendor_contact_workos_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWorkosCredentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorContactWorkosBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/preview-legacy-submitted-document-requests":{"get":{"tags":["internal"],"summary":"Preview Legacy Submitted Document Requests","description":"Dry run for the backfill below: reports drift without writing anything.","operationId":"preview_legacy_submitted_document_requests_backfills_preview_legacy_submitted_document_requests_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}]},"title":"Response Preview Legacy Submitted Document Requests Backfills Preview Legacy Submitted Document Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-legacy-submitted-document-requests":{"post":{"tags":["internal"],"summary":"Backfill Legacy Submitted Document Requests","description":"Move every pre-review-workflow request reading SUBMITTED to FULFILLED, so\nnobody inherits a review backlog of their entire history.\n\nStatus only: no FULFILLED ``document_request_events`` row is written. The\nabsence of an event log is exactly what identifies these rows, and\nfabricating a sign-off would attribute a review to a company and a moment\nthat never happened. Consumers already tolerate this — ``_review_details``\n(backend/api/document_requests.py) reports the reviewer as absent for a\nFULFILLED row with no event.","operationId":"backfill_legacy_submitted_document_requests_backfills_backfill_legacy_submitted_document_requests_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Legacy Submitted Document Requests Backfills Backfill Legacy Submitted Document Requests Post"}}}}}}},"/backfills/preview-document-request-recipients":{"get":{"tags":["internal"],"summary":"Preview Document Request Recipients","description":"Dry run for the backfill below: reports drift without writing anything.","operationId":"preview_document_request_recipients_backfills_preview_document_request_recipients_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}]},"title":"Response Preview Document Request Recipients Backfills Preview Document Request Recipients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-document-request-recipients":{"post":{"tags":["internal"],"summary":"Backfill Document Request Recipients","description":"Give every historical ask a recipient row for the person it named.\n\nDeliberately *not* widened to every active vendor contact. A renewal the\nnightly sweep filed did email every contact while recording only the first,\nbut there is no record of who those were at the time, and promoting today's\ncontact list onto a year-old ask would start chasing people nobody addressed\nit to. Historical rows keep the one recipient they had; fanning out is a\nproperty of new asks and of the sweep from here on.","operationId":"backfill_document_request_recipients_backfills_backfill_document_request_recipients_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Document Request Recipients Backfills Backfill Document Request Recipients Post"}}}}}}},"/backfills/preview-untagged-kobalt-generated-file-versions":{"get":{"tags":["internal"],"summary":"Preview Untagged Kobalt Generated File Versions","description":"Dry run for the backfill below: reports drift without writing anything.\n\nDoubles as a standing drift detector once the backfill has run — a nonzero\ncount then means a new generator forgot to pass ``is_kobalt_generated``.","operationId":"preview_untagged_kobalt_generated_file_versions_backfills_preview_untagged_kobalt_generated_file_versions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"},{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}]},"title":"Response Preview Untagged Kobalt Generated File Versions Backfills Preview Untagged Kobalt Generated File Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backfills/backfill-untagged-kobalt-generated-file-versions":{"post":{"tags":["internal"],"summary":"Backfill Untagged Kobalt Generated File Versions","description":"Tag every historical version Kobalt produced.\n\nWrites only the flag — nothing reads it yet, so this changes no behaviour on\nits own.","operationId":"backfill_untagged_kobalt_generated_file_versions_backfills_backfill_untagged_kobalt_generated_file_versions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Backfill Untagged Kobalt Generated File Versions Backfills Backfill Untagged Kobalt Generated File Versions Post"}}}}}}},"/checklist/{checklist_id}":{"get":{"tags":["checklist"],"summary":"Get Checklist","operationId":"get_checklist_checklist__checklist_id__get","parameters":[{"name":"checklist_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checklist Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/review/{review_id}":{"get":{"tags":["checklist"],"summary":"Get Checklist By Review","operationId":"get_checklist_by_review_checklist_review__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChecklistResponse"},{"type":"null"}],"title":"Response Get Checklist By Review Checklist Review  Review Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/type/{checklist_type}":{"get":{"tags":["checklist"],"summary":"Get Checklist By Type","operationId":"get_checklist_by_type_checklist_type__checklist_type__get","parameters":[{"name":"checklist_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ChecklistType"}},{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChecklistResponse"},{"type":"null"}],"title":"Response Get Checklist By Type Checklist Type  Checklist Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-template/{review_type}/{review_stage}":{"get":{"tags":["checklist"],"summary":"Get Stage Template Checklist","operationId":"get_stage_template_checklist_checklist_stage_template__review_type___review_stage__get","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"review_stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChecklistResponse"},{"type":"null"}],"title":"Response Get Stage Template Checklist Checklist Stage Template  Review Type   Review Stage  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-instance/{review_id}/{review_stage}":{"get":{"tags":["checklist"],"summary":"Get Stage Instance Checklist","operationId":"get_stage_instance_checklist_checklist_stage_instance__review_id___review_stage__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"review_stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChecklistResponse"},{"type":"null"}],"title":"Response Get Stage Instance Checklist Checklist Stage Instance  Review Id   Review Stage  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-instances/{review_id}":{"get":{"tags":["checklist"],"summary":"Get All Stage Instance Checklists","operationId":"get_all_stage_instance_checklists_checklist_stage_instances__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChecklistResponse"},"title":"Response Get All Stage Instance Checklists Checklist Stage Instances  Review Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/{checklist_id}/items":{"post":{"tags":["checklist"],"summary":"Create Checklist Item By Id","operationId":"create_checklist_item_by_id_checklist__checklist_id__items_post","parameters":[{"name":"checklist_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checklist Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/type/{checklist_type}/items":{"post":{"tags":["checklist"],"summary":"Create Checklist Item By Type","operationId":"create_checklist_item_by_type_checklist_type__checklist_type__items_post","parameters":[{"name":"checklist_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ChecklistType"}},{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-template/{review_type}/{review_stage}/items":{"post":{"tags":["checklist"],"summary":"Create Stage Template Checklist Item","operationId":"create_stage_template_checklist_item_checklist_stage_template__review_type___review_stage__items_post","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"review_stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/items/{item_id}":{"put":{"tags":["checklist"],"summary":"Update Checklist Item","operationId":"update_checklist_item_checklist_items__item_id__put","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["checklist"],"summary":"Delete Checklist Item","operationId":"delete_checklist_item_checklist_items__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/{checklist_id}/reorder":{"put":{"tags":["checklist"],"summary":"Reorder Checklist Items By Id","operationId":"reorder_checklist_items_by_id_checklist__checklist_id__reorder_put","parameters":[{"name":"checklist_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Checklist Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemReorderRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/type/{checklist_type}/reorder":{"put":{"tags":["checklist"],"summary":"Reorder Checklist Items By Type","operationId":"reorder_checklist_items_by_type_checklist_type__checklist_type__reorder_put","parameters":[{"name":"checklist_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ChecklistType"}},{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemReorderRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-templates/{review_type}":{"get":{"tags":["checklist"],"summary":"Get All Stage Template Checklists","operationId":"get_all_stage_template_checklists_checklist_stage_templates__review_type__get","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChecklistResponse"},"title":"Response Get All Stage Template Checklists Checklist Stage Templates  Review Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checklist/stage-template/{review_type}/{review_stage}/reorder":{"put":{"tags":["checklist"],"summary":"Reorder Stage Template Checklist Items","operationId":"reorder_stage_template_checklist_items_checklist_stage_template__review_type___review_stage__reorder_put","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"review_stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistItemReorderRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/code-blocks":{"get":{"tags":["code-blocks"],"summary":"List Code Blocks","operationId":"list_code_blocks_code_blocks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CodeBlockResponse"},"type":"array","title":"Response List Code Blocks Code Blocks Get"}}}}}}},"/code-blocks/new":{"post":{"tags":["code-blocks"],"summary":"Create Code Block","operationId":"create_code_block_code_blocks_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBlockCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBlockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/code-blocks/backfill-descriptions":{"post":{"tags":["code-blocks"],"summary":"Backfill Descriptions","operationId":"backfill_descriptions_code_blocks_backfill_descriptions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillDescriptionsResponse"}}}}}}},"/code-blocks/{block_id}":{"get":{"tags":["code-blocks"],"summary":"Get Code Block","operationId":"get_code_block_code_blocks__block_id__get","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBlockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["code-blocks"],"summary":"Update Code Block","operationId":"update_code_block_code_blocks__block_id__put","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBlockCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBlockResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["code-blocks"],"summary":"Delete Code Block","operationId":"delete_code_block_code_blocks__block_id__delete","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Code Block Code Blocks  Block Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/code-blocks/{block_id}/executions":{"get":{"tags":["code-blocks"],"summary":"List Code Block Executions","operationId":"list_code_block_executions_code_blocks__block_id__executions_get","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Block Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CodeBlockExecutionResponse"},"title":"Response List Code Block Executions Code Blocks  Block Id  Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/code-blocks/vibe-code":{"post":{"tags":["code-blocks"],"summary":"Vibe Code","operationId":"vibe_code_code_blocks_vibe_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VibeCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AISuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/code-blocks/explain":{"post":{"tags":["code-blocks"],"summary":"Explain Code","operationId":"explain_code_code_blocks_explain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExplainRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AISuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/all":{"get":{"tags":["collaborative-tasks"],"summary":"List All Tasks","operationId":"list_all_tasks_collaborative_tasks_all_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OverviewTaskResponse"},"title":"Response List All Tasks Collaborative Tasks All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks":{"get":{"tags":["collaborative-tasks"],"summary":"List Tasks","operationId":"list_tasks_collaborative_tasks_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","pattern":"^(open|closed|all)$","default":"all","title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskListItemResponse"},"title":"Response List Tasks Collaborative Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/remind":{"post":{"tags":["collaborative-tasks"],"summary":"Send Vendor Reminder","operationId":"send_vendor_reminder_collaborative_tasks_remind_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCollaborativeTaskVendorReminderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"object","title":"Response Send Vendor Reminder Collaborative Tasks Remind Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/by-review/{review_id}":{"get":{"tags":["collaborative-tasks"],"summary":"List Tasks By Review","operationId":"list_tasks_by_review_collaborative_tasks_by_review__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskListItemResponse"},"title":"Response List Tasks By Review Collaborative Tasks By Review  Review Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}":{"get":{"tags":["collaborative-tasks"],"summary":"Get Task","operationId":"get_task_collaborative_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collaborative-tasks"],"summary":"Delete Task","operationId":"delete_task_collaborative_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Task Collaborative Tasks  Task Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/from-requirement":{"post":{"tags":["collaborative-tasks"],"summary":"Create Task From Requirement","operationId":"create_task_from_requirement_collaborative_tasks_from_requirement_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequirementTaskRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/for-vendor/{vendor_id}":{"post":{"tags":["collaborative-tasks"],"summary":"Create Standalone Task","operationId":"create_standalone_task_collaborative_tasks_for_vendor__vendor_id__post","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/for-review/{review_id}":{"post":{"tags":["collaborative-tasks"],"summary":"Create Review Task","operationId":"create_review_task_collaborative_tasks_for_review__review_id__post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/release":{"post":{"tags":["collaborative-tasks"],"summary":"Release Task","operationId":"release_task_collaborative_tasks__task_id__release_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Release Task Collaborative Tasks  Task Id  Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/title":{"post":{"tags":["collaborative-tasks"],"summary":"Set Task Title","operationId":"set_task_title_collaborative_tasks__task_id__title_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_task_title_collaborative_tasks__task_id__title_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Task Title Collaborative Tasks  Task Id  Title Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/description":{"post":{"tags":["collaborative-tasks"],"summary":"Set Task Description","operationId":"set_task_description_collaborative_tasks__task_id__description_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_task_description_collaborative_tasks__task_id__description_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Task Description Collaborative Tasks  Task Id  Description Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/due-date":{"post":{"tags":["collaborative-tasks"],"summary":"Set Task Due Date","operationId":"set_task_due_date_collaborative_tasks__task_id__due_date_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_task_due_date_collaborative_tasks__task_id__due_date_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Task Due Date Collaborative Tasks  Task Id  Due Date Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/participants/remediation-owners":{"post":{"tags":["collaborative-tasks"],"summary":"Set Remediation Owners","operationId":"set_remediation_owners_collaborative_tasks__task_id__participants_remediation_owners_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleParticipantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Remediation Owners Collaborative Tasks  Task Id  Participants Remediation Owners Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/participants/reviewers":{"post":{"tags":["collaborative-tasks"],"summary":"Set Reviewers","operationId":"set_reviewers_collaborative_tasks__task_id__participants_reviewers_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleParticipantsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Reviewers Collaborative Tasks  Task Id  Participants Reviewers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/participants":{"post":{"tags":["collaborative-tasks"],"summary":"Add Task Participant","operationId":"add_task_participant_collaborative_tasks__task_id__participants_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddParticipantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Add Task Participant Collaborative Tasks  Task Id  Participants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/participants/{user_id}":{"delete":{"tags":["collaborative-tasks"],"summary":"Delete Task Participant","operationId":"delete_task_participant_collaborative_tasks__task_id__participants__user_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Task Participant Collaborative Tasks  Task Id  Participants  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/visibility-scope":{"post":{"tags":["collaborative-tasks"],"summary":"Set Visibility Scope","operationId":"set_visibility_scope_collaborative_tasks__task_id__visibility_scope_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetVisibilityScopeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Visibility Scope Collaborative Tasks  Task Id  Visibility Scope Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/close":{"post":{"tags":["collaborative-tasks"],"summary":"Close Task","operationId":"close_task_collaborative_tasks__task_id__close_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Close Task Collaborative Tasks  Task Id  Close Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/status":{"post":{"tags":["collaborative-tasks"],"summary":"Set Task Status","operationId":"set_task_status_collaborative_tasks__task_id__status_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTaskStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/reopen":{"post":{"tags":["collaborative-tasks"],"summary":"Reopen Task","operationId":"reopen_task_collaborative_tasks__task_id__reopen_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReopenTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reopen Task Collaborative Tasks  Task Id  Reopen Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/events/comment":{"post":{"tags":["collaborative-tasks"],"summary":"Add Comment","operationId":"add_comment_collaborative_tasks__task_id__events_comment_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCommentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/collaborative-tasks/{task_id}/unlink-from-requirement":{"post":{"tags":["collaborative-tasks"],"summary":"Unlink Task From Requirement","operationId":"unlink_task_from_requirement_collaborative_tasks__task_id__unlink_from_requirement_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Unlink Task From Requirement Collaborative Tasks  Task Id  Unlink From Requirement Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company/name":{"get":{"tags":["company"],"summary":"Get Company Name From Id","operationId":"get_company_name_from_id_company_name_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Get Company Name From Id Company Name Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company/domains":{"get":{"tags":["company"],"summary":"Get Company Domains","operationId":"get_company_domains_company_domains_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Company Domains Company Domains Get"}}}}}}},"/company-document-settings":{"get":{"tags":["company-document-settings"],"summary":"Get Document Settings","description":"The company's document-wide policy, defaults filled in.","operationId":"get_document_settings_company_document_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDocumentSettingsResponse"}}}}}},"put":{"tags":["company-document-settings"],"summary":"Update Document Settings","description":"Replace the company's document-wide policy with the body.\n\nApplies to submissions from here on, in both directions. Turning the review\ngate on does not reach back and reopen requests already accepted, and turning\nit off leaves the ones already waiting for review where they are — those are\nstill a sign-off or a send-back away.","operationId":"update_document_settings_company_document_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDocumentSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDocumentSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company-email-settings":{"get":{"tags":["company-email-settings"],"summary":"Get Email Settings","description":"The company's email branding, or the unconfigured state.","operationId":"get_email_settings_company_email_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmailSettingsResponse"}}}}}},"put":{"tags":["company-email-settings"],"summary":"Update Email Settings","description":"Write the company's email branding, creating the row on first save.\n\nApplies to email sent from here on; mail already delivered keeps the\nbranding it was rendered with.","operationId":"update_email_settings_company_email_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmailSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmailSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company-email-settings/logo":{"post":{"tags":["company-email-settings"],"summary":"Upload Email Logo","description":"Store a logo for the header of this company's branded email.\n\nTakes effect on the next send, and only while ``use_company_icon`` is on —\nthe upload replaces the icon derived from the company website, not the\ndecision to brand at all.","operationId":"upload_email_logo_company_email_settings_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_email_logo_company_email_settings_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmailSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["company-email-settings"],"summary":"Delete Email Logo","description":"Drop the uploaded logo, falling the company's email back to its website icon.\n\nThe bytes go too rather than being retained: they are served to anyone\nholding the URL, so \"remove\" has to mean it. Already-delivered email loses\nthe image and shows the company name in its place.\n\nIdempotent, including on a company with no settings row at all.","operationId":"delete_email_logo_company_email_settings_logo_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEmailSettingsResponse"}}}}}}},"/company-notifications/preferences":{"get":{"tags":["company-notifications"],"summary":"Get Company Notification Preferences","description":"Each company-wide notification type with the company's effective configuration.","operationId":"get_company_notification_preferences_company_notifications_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyNotificationPreference"},"type":"array","title":"Response Get Company Notification Preferences Company Notifications Preferences Get"}}}}}},"put":{"tags":["company-notifications"],"summary":"Set Company Notification Preference","description":"Upsert the current company's configuration for a single notification type.","operationId":"set_company_notification_preference_company_notifications_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNotificationPreferenceUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNotificationPreference"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/business-info":{"get":{"tags":["company_research"],"summary":"Get Business Info","operationId":"get_business_info_companies__company_id__business_info_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/BusinessInfoData"},{"type":"null"}]},"title":"Response Get Business Info Companies  Company Id  Business Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/adverse-media":{"get":{"tags":["company_research"],"summary":"Get Adverse Media","description":"Screening runs already collected for a company, newest screening first.\n\nA pure DB read: no Exa call, no monitor provisioning, no config push. Opening\nthe Negative News panel is not a decision to spend anything — and the panel\npolls this every 5s while a run is in flight. Provisioning and triggering\nbelong to the write paths (vendor creation, ``POST /news/trigger``); run\nstate arrives by reconciliation — the panel's sync poll or the nightly\n``ExaMonitorSyncWorkflow``.\n\nAn unmonitored company reads as empty, which the UI shows as \"No screening\nhas run yet\" next to the button that starts one.","operationId":"get_adverse_media_companies__company_id__adverse_media_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMonitorRunResponse"},"title":"Response Get Adverse Media Companies  Company Id  Adverse Media Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/news/trigger":{"post":{"tags":["company_research"],"summary":"Trigger Company News","description":"Ask Exa to screen this company now, and return the company's runs with the\none just started among them.","operationId":"trigger_company_news_companies__company_id__news_trigger_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMonitorRunResponse"},"title":"Response Trigger Company News Companies  Company Id  News Trigger Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/adverse-media/sync":{"post":{"tags":["company_research"],"summary":"Sync Adverse Media","description":"Reconcile this company's runs with Exa, then return them.\n\nThe read path never calls Exa and webhook delivery is not a path we rely on,\nso without this a run in flight would not resolve until the nightly\n``ExaMonitorSyncWorkflow``. Kept off the read path because the cost is only\nworth it while someone is watching a run.\n\nReconciles only: a company with no monitor stays unprovisioned.","operationId":"sync_adverse_media_companies__company_id__adverse_media_sync_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMonitorRunResponse"},"title":"Response Sync Adverse Media Companies  Company Id  Adverse Media Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/research/start":{"post":{"tags":["company_research"],"summary":"Start Company Research","operationId":"start_company_research_companies__company_id__research_start_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessInfoData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contract-lifecycle-settings":{"get":{"tags":["contract-lifecycle-settings"],"summary":"Get Contract Lifecycle Settings","description":"When this company is reminded about a renewal decision, and who is.\n\nAlways concrete values: a company that has never saved gets the code defaults\nwith ``is_configured=False`` — a starting point for the form, not a policy in\nforce, since nothing is scheduled until the PUT below creates the row.","operationId":"get_contract_lifecycle_settings_contract_lifecycle_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLifecycleConfigurationResponse"}}}}}},"put":{"tags":["contract-lifecycle-settings"],"summary":"Update Contract Lifecycle Settings","description":"Replace the company's renewal reminder policy with the body.\n\n**The first save is what starts the reminders**: until this row exists the\ncompany schedules nothing (``desired_term_notifications``).\n\n**Existing terms are rescheduled, not just future ones**, because reminder\nrows are materialized when a term is written. Sent rows are untouched and\nterms with no date still ahead are left alone — see\n``resync_company_term_notifications``. Turning a date off is the same write.\n\nWho is reminded takes effect without any resync: recipients are resolved at\nsend time.","operationId":"update_contract_lifecycle_settings_contract_lifecycle_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLifecycleConfigurationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLifecycleConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contract-lifecycle-settings"],"summary":"Delete Contract Lifecycle Settings","description":"Un-enrol: drop the policy and cancel every reminder it was still to send.\n\nDeleting the row is what turns the reminders off, so this is a *policy* delete\nrather than a reset to some other schedule. The resync is the cancellation and\nreaches every unsent row in the tenant, including on terms whose dates have\npassed; ``SENT`` rows survive, here as everywhere.\n\nIdempotent, and the resync still runs for a company with no row so leftovers\nfrom an earlier policy are cleared. Returns the GET's shape.","operationId":"delete_contract_lifecycle_settings_contract_lifecycle_settings_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractLifecycleConfigurationResponse"}}}}}}},"/document-renewal-rules":{"get":{"tags":["document-renewal-rules"],"summary":"Get Renewal Rules","description":"The rules deciding which expiring documents this company chases.","operationId":"get_renewal_rules_document_renewal_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRenewalRulesResponse"}}}}}},"put":{"tags":["document-renewal-rules"],"summary":"Update Renewal Rules","description":"Replace the company's renewal rules with the set in the body.\n\nThe list is the whole configuration and its order is the precedence, so the\nbody carries every rule the company wants, the way the settings page sends\nit. A rule omitted from the list is deleted.","operationId":"update_renewal_rules_document_renewal_rules_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRenewalRulesUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRenewalRulesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-renewal-rules/eligibility":{"get":{"tags":["document-renewal-rules"],"summary":"Get Renewal Eligibility","description":"Which renewal rule, if any, currently governs one vendor's document.\n\n``document_type`` is a plain string rather than ``DocumentTypeEnum``: a\nfile whose type never resolved to a known enum member (see\n``HealthFileStack.document_type`` in ``backend/api/files.py``) sends its\nraw ``file_type`` here instead, and that should read as \"no rule\" rather\nthan a validation error.","operationId":"get_renewal_eligibility_document_renewal_rules_eligibility_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"document_type","in":"query","required":true,"schema":{"type":"string","title":"Document Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRenewalEligibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests":{"post":{"tags":["document_requests"],"summary":"Request Documents","operationId":"request_documents_document_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/company/{vendor_id}":{"get":{"tags":["document_requests"],"summary":"Get Company Document Requests","operationId":"get_company_document_requests_document_requests_company__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestForVendorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/all":{"get":{"tags":["document_requests"],"summary":"List All Document Requests","description":"Every document request this company has made, across all of its vendors.\n\nThe only view that surfaces the renewal requests the nightly sweep files on the\ncompany's behalf — those have no author to go looking for them.\n\nScoped to active vendors: an archived vendor's open requests are history, not\nworklist items. Ordered by due date, so the most overdue sort first before the\nclient applies any sort of its own.","operationId":"list_all_document_requests_document_requests_all_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentRequestStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRequestOverviewRow"},"title":"Response List All Document Requests Document Requests All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/{request_id}/fulfill":{"post":{"tags":["document_requests"],"summary":"Fulfill Document Request","operationId":"fulfill_document_request_document_requests__request_id__fulfill_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/{request_id}/request-changes":{"post":{"tags":["document_requests"],"summary":"Request Document Changes","operationId":"request_document_changes_document_requests__request_id__request_changes_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDocumentChangesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/{request_id}/cancel":{"post":{"tags":["document_requests"],"summary":"Cancel Document Request","description":"Withdraw an ask the company no longer wants answered.\n\nTerminal rather than a delete: the request, its reminders and anything the vendor\nuploaded against it stay on the record, and the portal says the ask was withdrawn\ninstead of having it vanish. The state is what stops further uploads — the vendor\nportal's fulfilment endpoint accepts only ``OPEN_FOR_VENDOR``.","operationId":"cancel_document_request_document_requests__request_id__cancel_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDocumentRequestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/{request_id}/review":{"get":{"tags":["document_requests"],"summary":"Get Document Request Review","operationId":"get_document_request_review_document_requests__request_id__review_get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/request-review":{"post":{"tags":["document_requests"],"summary":"Request Document Review","operationId":"request_document_review_document_requests_request_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestReviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/set-by-risk-level/{risk_level_id}":{"get":{"tags":["document_requests"],"summary":"Get Document Set By Risk Level","operationId":"get_document_set_by_risk_level_document_requests_set_by_risk_level__risk_level_id__get","parameters":[{"name":"risk_level_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Level Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-requests/remind":{"post":{"tags":["document_requests"],"summary":"Send Document Request Reminders","description":"Chase every recipient of the selected requests, one email each.\n\nEach person gets a single consolidated mail listing the requests they are\non, so someone named on three asks is chased once rather than three times.\n``last_reminder_sent`` is per request and stamped when *any* of its\nrecipients was reached — the record is that the request was chased, not that\na particular person heard about it.","operationId":"send_document_request_reminders_document_requests_remind_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReminderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRemindersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/sets":{"get":{"tags":["documents"],"summary":"List Document Type Sets","operationId":"list_document_type_sets_documents_sets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocumentTypeSetWithLabels"},"type":"array","title":"Response List Document Type Sets Documents Sets Get"}}}}}},"post":{"tags":["documents"],"summary":"Create Document Type Set","operationId":"create_document_type_set_documents_sets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeSetCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeSetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/sets/{set_id}":{"get":{"tags":["documents"],"summary":"Get Document Type Set","operationId":"get_document_type_set_documents_sets__set_id__get","parameters":[{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeSetWithLabels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/due-diligence-configuration":{"get":{"tags":["due-diligence-configuration"],"summary":"Get Due Diligence Configuration","description":"Get the company-level due diligence flow configuration, or null if not yet set.","operationId":"get_due_diligence_configuration_due_diligence_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DueDiligenceConfigurationResponse"},{"type":"null"}],"title":"Response Get Due Diligence Configuration Due Diligence Configuration Get"}}}}}},"put":{"tags":["due-diligence-configuration"],"summary":"Upsert Due Diligence Configuration","description":"Create or update the company-level due diligence flow configuration.\n\nOnly fields present in the request body are written; omitted fields keep\ntheir existing value (or the column default when creating a new row). This\nmakes the endpoint a partial update, so callers can send a single field\nwithout clobbering the rest.","operationId":"upsert_due_diligence_configuration_due_diligence_configuration_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueDiligenceConfigurationUpsert"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DueDiligenceConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-configuration":{"get":{"tags":["evidence-packet-configuration"],"summary":"List Evidence Packet Configurations","description":"List all evidence packet configurations for the company.","operationId":"list_evidence_packet_configurations_evidence_packet_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EvidencePacketConfigurationResponse"},"type":"array","title":"Response List Evidence Packet Configurations Evidence Packet Configuration Get"}}}}}},"post":{"tags":["evidence-packet-configuration"],"summary":"Create Evidence Packet Configuration","description":"Create a new evidence packet configuration.","operationId":"create_evidence_packet_configuration_evidence_packet_configuration_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-configuration/{packet_id}":{"get":{"tags":["evidence-packet-configuration"],"summary":"Get Evidence Packet Configuration","description":"Get a single evidence packet configuration by ID.","operationId":"get_evidence_packet_configuration_evidence_packet_configuration__packet_id__get","parameters":[{"name":"packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["evidence-packet-configuration"],"summary":"Update Evidence Packet Configuration","description":"Update an existing evidence packet configuration.","operationId":"update_evidence_packet_configuration_evidence_packet_configuration__packet_id__put","parameters":[{"name":"packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["evidence-packet-configuration"],"summary":"Delete Evidence Packet Configuration","description":"Delete an evidence packet configuration.","operationId":"delete_evidence_packet_configuration_evidence_packet_configuration__packet_id__delete","parameters":[{"name":"packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-configuration/autoselect":{"post":{"tags":["evidence-packet-configuration"],"summary":"Autoselect Evidence Packets","description":"Automatically select applicable evidence packets and scenarios for a vendor.\n\nEvaluates the applicability logic for each evidence packet and the selection\nlogic for each scenario within applicable packets, based on the vendor's\ncustom field values.","operationId":"autoselect_evidence_packets_evidence_packet_configuration_autoselect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketAutoselectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketAutoselectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-configuration/validations":{"post":{"tags":["evidence-packet-configuration"],"summary":"Create Evidence Packet","description":"Create a new evidence validation request.\n\nThis creates an EvidenceValidation record, associates it with the selected\nevidence packets, and optionally sends an email to the recipient.","operationId":"create_evidence_packet_evidence_packet_configuration_validations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}":{"get":{"tags":["evidence-packets"],"summary":"Get Evidence Packet","description":"Get an evidence packet by ID.","operationId":"get_evidence_packet_evidence_packets__evidence_packet_id__get","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/risk-areas":{"get":{"tags":["evidence-packets"],"summary":"Get Evidence Packet Risk Areas","description":"Get risk areas for an evidence packet, with associated document requests and uploaded files.\n\nEach risk area entry includes the document types requested, the document requests\n(with decline reasons if applicable), and any uploaded files linked to those requests.\n\nFor the internal reviewer (the requesting company), risk areas are limited to the\npacket sections the user may review — sections owned by other teams/people are\nhidden so they never surface as review tabs. The requestee (vendor) and\nmasquerade/`tprm.reviews.write_all` users are unaffected and see every section.\nDocument requests and uploaded files are intentionally NOT pruned, since a\nrequirement the user does own may cite a file uploaded under another section.","operationId":"get_evidence_packet_risk_areas_evidence_packets__evidence_packet_id__risk_areas_get","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketRiskAreasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/file/{file_type_slug}":{"post":{"tags":["evidence-packets"],"summary":"Upload Evidence Packet File","description":"Upload a new file for an evidence packet.\n\nThis endpoint creates a new file and associates it with the evidence packet.\nThe ``file_type_slug`` path parameter sets the document type for the file and\nmust be a valid ``DocumentTypeEnum`` slug (e.g. ``SOC2_REPORT``, ``OTHER``).\n\nIf the packet has a document request matching the provided slug, the file is\nautomatically linked to that request.","operationId":"upload_evidence_packet_file_evidence_packets__evidence_packet_id__file__file_type_slug__post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"file_type_slug","in":"path","required":true,"schema":{"type":"string","title":"File Type Slug"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_evidence_packet_file_evidence_packets__evidence_packet_id__file__file_type_slug__post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/files/link":{"post":{"tags":["evidence-packets"],"summary":"Link Existing Files To Packet","operationId":"link_existing_files_to_packet_evidence_packets__evidence_packet_id__files_link_post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkExistingFilesBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvidencePacketFileResponse"},"title":"Response Link Existing Files To Packet Evidence Packets  Evidence Packet Id  Files Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/status":{"patch":{"tags":["evidence-packets"],"summary":"Update Evidence Packet Status","description":"Update the status of an evidence packet.\n\nThis endpoint is used to mark an evidence packet as completed or cancelled.","operationId":"update_evidence_packet_status_evidence_packets__evidence_packet_id__status_patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_evidence_packet_status_evidence_packets__evidence_packet_id__status_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/requirements/{requirement_id}":{"patch":{"tags":["evidence-packets"],"summary":"Update Requirement Note","description":"Update the note on a requirement.\n\nThis endpoint only allows updating the vendor-supplied note field.","operationId":"update_requirement_note_evidence_packets__evidence_packet_id__requirements__requirement_id__patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/revalidate":{"post":{"tags":["evidence-packets"],"summary":"Revalidate Evidence Packet","description":"Re-run AI analysis on requirements against uploaded evidence.\n\nThis endpoint re-runs AI analysis on every requirement that hasn't already\nbeen finalized by a reviewer (i.e. not approved and no associated issue).\nSpawns an async Hatchet workflow that:\n1. Waits for all files to finish processing and indexing\n2. Retrieves requirements eligible for reprocessing (not approved, no issue)\n3. Uses AI to answer each requirement's question based on uploaded files\n4. Persists answers and compliance status back to the database\n\nReturns 202 Accepted immediately while the workflow runs in the background.","operationId":"revalidate_evidence_packet_evidence_packets__evidence_packet_id__revalidate_post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/files/{association_id}":{"patch":{"tags":["evidence-packets"],"summary":"Update File Document Request","description":"Update which document request a file association is linked to.\n\nThis endpoint allows re-tagging/re-classifying an uploaded file.","operationId":"update_file_document_request_evidence_packets__evidence_packet_id__files__association_id__patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"association_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Association Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFileDocumentRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["evidence-packets"],"summary":"Delete File Association","description":"Delete a file association.\n\nThis removes the association between the file and the evidence packet,\nbut does NOT delete the underlying file upload.","operationId":"delete_file_association_evidence_packets__evidence_packet_id__files__association_id__delete","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"association_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Association Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/{evidence_packet_id}/declined-documents/{document_type_slug}":{"post":{"tags":["evidence-packets"],"summary":"Upsert Declined Document","description":"Decline a document type with an optional reason.\n\nSets the ``reason`` field on the corresponding EvidencePacketDocumentRequest row.\nThe document type must already exist as a document request on this packet.","operationId":"upsert_declined_document_evidence_packets__evidence_packet_id__declined_documents__document_type_slug__post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"document_type_slug","in":"path","required":true,"schema":{"type":"string","title":"Document Type Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertDeclinedDocumentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["evidence-packets"],"summary":"Delete Declined Document","description":"Undo a declination by clearing the reason on the document request.\n\nThis allows the vendor to upload the document after having previously declined.","operationId":"delete_declined_document_evidence_packets__evidence_packet_id__declined_documents__document_type_slug__delete","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"document_type_slug","in":"path","required":true,"schema":{"type":"string","title":"Document Type Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packets/active/{vendor_id}":{"get":{"tags":["evidence-packets"],"summary":"Get Active Evidence Packet For Vendor","description":"Get the active evidence packet for a vendor, if one exists.\n\nAn \"active\" packet is one with status PENDING or IN_PROGRESS.\nReturns null if no active packet exists.\n\nThe response includes summary information suitable for display on the\nvendor homepage, including document upload count, compliance progress,\nand whether this is an internal packet (every recipient belongs to the\nsame company as the caller).","operationId":"get_active_evidence_packet_for_vendor_evidence_packets_active__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveEvidencePacketSummary"},{"type":"null"}],"title":"Response Get Active Evidence Packet For Vendor Evidence Packets Active  Vendor Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-types":{"get":{"tags":["document-types"],"summary":"Get Document Types","operationId":"get_document_types_document_types_get","parameters":[{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DocumentCategory"}},{"type":"null"}],"default":[],"title":"Categories"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"title":"Response Get Document Types Document Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document-types/classify":{"post":{"tags":["document-types"],"summary":"Classify Document Types Endpoint","operationId":"classify_document_types_endpoint_document_types_classify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyFileTypeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/FileTypeClassification"},"type":"object","title":"Response Classify Document Types Endpoint Document Types Classify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/instructions":{"patch":{"tags":["evidence-packet-drafts"],"summary":"Update Draft Instructions","description":"Update the instructions on a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"update_draft_instructions_evidence_packet_drafts__evidence_packet_id__instructions_patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_draft_instructions_evidence_packet_drafts__evidence_packet_id__instructions_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/recipients":{"put":{"tags":["evidence-packet-drafts"],"summary":"Update Packet Recipients","description":"Reconcile the recipients on an evidence packet to the provided set.\n\nEditable while DRAFT, PENDING, or IN_PROGRESS. Adding a recipient to an\nalready-sent packet emails just that new person.","operationId":"update_packet_recipients_evidence_packet_drafts__evidence_packet_id__recipients_put","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecipientsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/document-requests":{"post":{"tags":["evidence-packet-drafts"],"summary":"Add Document Request","description":"Add a document request to a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"add_document_request_evidence_packet_drafts__evidence_packet_id__document_requests_post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDocumentRequestBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/document-requests/bulk":{"post":{"tags":["evidence-packet-drafts"],"summary":"Bulk Add Document Requests","description":"Add multiple document requests to a draft evidence packet in one request.\n\nOnly allowed for packets in DRAFT status.","operationId":"bulk_add_document_requests_evidence_packet_drafts__evidence_packet_id__document_requests_bulk_post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAddDocumentRequestsBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"},"title":"Response Bulk Add Document Requests Evidence Packet Drafts  Evidence Packet Id  Document Requests Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/document-requests/{document_request_id}":{"delete":{"tags":["evidence-packet-drafts"],"summary":"Remove Document Request","description":"Remove a document request from a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"remove_document_request_evidence_packet_drafts__evidence_packet_id__document_requests__document_request_id__delete","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"document_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["evidence-packet-drafts"],"summary":"Update Document Request","description":"Update a document request (e.g., toggle required status).\n\nOnly allowed for packets in DRAFT status.","operationId":"update_document_request_evidence_packet_drafts__evidence_packet_id__document_requests__document_request_id__patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"document_request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/requirements":{"post":{"tags":["evidence-packet-drafts"],"summary":"Add Requirement","description":"Add an ad-hoc requirement (question) to a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"add_requirement_evidence_packet_drafts__evidence_packet_id__requirements_post","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRequirementBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/requirements/{requirement_id}":{"delete":{"tags":["evidence-packet-drafts"],"summary":"Remove Requirement","description":"Remove a requirement from a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"remove_requirement_evidence_packet_drafts__evidence_packet_id__requirements__requirement_id__delete","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["evidence-packet-drafts"],"summary":"Update Requirement","description":"Update the question text of an ad-hoc requirement on a draft evidence packet.\n\nOnly allowed for packets in DRAFT status.","operationId":"update_requirement_evidence_packet_drafts__evidence_packet_id__requirements__requirement_id__patch","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-packet-drafts/{evidence_packet_id}/sections":{"put":{"tags":["evidence-packet-drafts"],"summary":"Update Sections","description":"Reconcile the sections of a draft evidence packet against a desired set of blocks.\n\nAccepts a complete list of configuration block IDs that should be selected.\nThe backend idempotently:\n- Creates EvidencePacketSection rows for any block in the list that doesn't have one\n- Deletes EvidencePacketSection rows whose source block is no longer in the list\n- Adds document request rows for newly-needed document types\n- Removes document request rows that are only needed by deleted sections\n\nManually-added document requests (not claimed by any section) are always preserved.\n\nOnly allowed for packets in DRAFT status.","operationId":"update_sections_evidence_packet_drafts__evidence_packet_id__sections_put","parameters":[{"name":"evidence_packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSectionsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/vendors.csv":{"get":{"tags":["exports"],"summary":"Export Vendors Csv","operationId":"export_vendors_csv_exports_vendors_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Export Vendors Csv Exports Vendors Csv Get"}}}}}}},"/exports/services.csv":{"get":{"tags":["exports"],"summary":"Export Services Csv","operationId":"export_services_csv_exports_services_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Export Services Csv Exports Services Csv Get"}}}}}}},"/exports/users.csv":{"get":{"tags":["exports"],"summary":"Export Users Csv","operationId":"export_users_csv_exports_users_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Export Users Csv Exports Users Csv Get"}}}}}}},"/exports/issues.csv":{"get":{"tags":["exports"],"summary":"Export Issues Csv","operationId":"export_issues_csv_exports_issues_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Export Issues Csv Exports Issues Csv Get"}}}}}}},"/custom_fields/options/{field_type}":{"get":{"tags":["custom_fields"],"summary":"Get Dropdown Options","operationId":"get_dropdown_options_custom_fields_options__field_type__get","parameters":[{"name":"field_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"title":"Response Get Dropdown Options Custom Fields Options  Field Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/entity/{entity_type}":{"get":{"tags":["custom_fields"],"summary":"Get Custom Fields By Entity Type","operationId":"get_custom_fields_by_entity_type_custom_fields_entity__entity_type__get","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldEntityType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}},"title":"Response Get Custom Fields By Entity Type Custom Fields Entity  Entity Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/entity/{entity_type}/with-values":{"get":{"tags":["custom_fields"],"summary":"Get Custom Fields With Values","operationId":"get_custom_fields_with_values_custom_fields_entity__entity_type__with_values_get","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldEntityType"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCustomFieldsWithValuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/entity/{entity_type}/filter-options":{"get":{"tags":["custom_fields"],"summary":"Get Custom Field Filter Options","description":"Custom fields (and their selectable values) the entity type can be\nfiltered by. Powers the Overview table's \"Additional filters\" control.","operationId":"get_custom_field_filter_options_custom_fields_entity__entity_type__filter_options_get","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldEntityType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldFilterOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/by-id/{custom_field_id}":{"get":{"tags":["custom_fields"],"summary":"Get Custom Field By Id","operationId":"get_custom_field_by_id_custom_fields_by_id__custom_field_id__get","parameters":[{"name":"custom_field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Custom Field Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}},{"type":"null"}],"title":"Response Get Custom Field By Id Custom Fields By Id  Custom Field Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["custom_fields"],"summary":"Delete Custom Field","operationId":"delete_custom_field_custom_fields_by_id__custom_field_id__delete","parameters":[{"name":"custom_field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Custom Field Id"}},{"name":"clear_values","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Clear Values"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Custom Field Custom Fields By Id  Custom Field Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/by-id/{custom_field_id}/usage":{"get":{"tags":["custom_fields"],"summary":"Get Custom Field Usage Records","description":"The records still holding a value for this field.\n\nA field cannot be deleted while any record uses it, so the settings UI shows\nthis list to say exactly which records to clear.","operationId":"get_custom_field_usage_records_custom_fields_by_id__custom_field_id__usage_get","parameters":[{"name":"custom_field_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Custom Field Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/by-type/{field_type}":{"get":{"tags":["custom_fields"],"summary":"Get Custom Field By Type","operationId":"get_custom_field_by_type_custom_fields_by_type__field_type__get","parameters":[{"name":"field_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}},{"type":"null"}],"title":"Response Get Custom Field By Type Custom Fields By Type  Field Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields":{"put":{"tags":["custom_fields"],"summary":"Update Custom Field","operationId":"update_custom_field_custom_fields_put","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Request","discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Response Update Custom Field Custom Fields Put","discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["custom_fields"],"summary":"Create Custom Field","operationId":"create_custom_field_custom_fields_post","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Request","discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Response Create Custom Field Custom Fields Post","discriminator":{"propertyName":"custom_field_definition_type","mapping":{"DROPDOWN":"#/components/schemas/CustomFieldDropdownDefinition","FREE_TEXT":"#/components/schemas/CustomFieldFreeTextDefinition","NUMBER":"#/components/schemas/CustomFieldNumberDefinition","DATE":"#/components/schemas/CustomFieldDateDefinition","BOOLEAN":"#/components/schemas/CustomFieldBooleanDefinition","MULTISELECT":"#/components/schemas/CustomFieldMultiselectDefinition","USER":"#/components/schemas/CustomFieldUserDefinition","MULTI_USER":"#/components/schemas/CustomFieldMultiUserDefinition"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_fields/entity/{entity_type}/reorder":{"put":{"tags":["custom_fields"],"summary":"Reorder Custom Fields","description":"Reorder custom fields for an entity type.","operationId":"reorder_custom_fields_custom_fields_entity__entity_type__reorder_put","parameters":[{"name":"entity_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomFieldEntityType"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldReorderRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_field_triggers":{"get":{"tags":["custom_field_triggers"],"summary":"List Custom Field Triggers","operationId":"list_custom_field_triggers_custom_field_triggers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomFieldTriggerResponse"},"type":"array","title":"Response List Custom Field Triggers Custom Field Triggers Get"}}}}}},"post":{"tags":["custom_field_triggers"],"summary":"Create Custom Field Trigger","operationId":"create_custom_field_trigger_custom_field_triggers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomFieldTriggerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom_field_triggers/config-options":{"get":{"tags":["custom_field_triggers"],"summary":"Get Trigger Config Options","description":"Everything the creation form needs, grouped by entity and constrained so\nthe UI can only offer valid choices. Only the Vendor entity is returned today\n(its lifecycle-status field is all Layer A audits); this widens as Layer A\naudits more entities/fields.","operationId":"get_trigger_config_options_custom_field_triggers_config_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerConfigOptions"}}}}}}},"/custom_field_triggers/{trigger_id}":{"patch":{"tags":["custom_field_triggers"],"summary":"Update Custom Field Trigger","operationId":"update_custom_field_trigger_custom_field_triggers__trigger_id__patch","parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomFieldTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["custom_field_triggers"],"summary":"Delete Custom Field Trigger","operationId":"delete_custom_field_trigger_custom_field_triggers__trigger_id__delete","parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Custom Field Trigger Custom Field Triggers  Trigger Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/archive":{"post":{"tags":["files"],"summary":"Archive Document","operationId":"archive_document_files_archive_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_archive_document_files_archive_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/unarchive":{"post":{"tags":["files"],"summary":"Unarchive Document","operationId":"unarchive_document_files_unarchive_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_unarchive_document_files_unarchive_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/vendor":{"get":{"tags":["files"],"summary":"Get Files For Vendor","operationId":"get_files_for_vendor_files_vendor_get","parameters":[{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}},{"name":"file_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"default":[],"title":"File Types"}},{"name":"excluded_file_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"default":[],"title":"Excluded File Types"}},{"name":"show_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Show Archived"}},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},{"name":"include_risks","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Risks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedFilesCollectionWithAssignees"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/file/{file_id}":{"get":{"tags":["files"],"summary":"Get File","operationId":"get_file_files_file__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/metadata":{"get":{"tags":["files"],"summary":"Get Files Metadata","description":"Get metadata for multiple files by their file_ids in a single request.\n\nBatch companion to GET /files/file/{file_id}: callers that need several\nfiles (e.g. after a multi-file upload) should hit this once instead of\nfanning out one request per file, which can exhaust the DB connection pool.\nMissing/inaccessible ids are simply omitted from the response map.","operationId":"get_files_metadata_files_metadata_get","parameters":[{"name":"file_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"File Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UploadedFilesResponse"},"propertyNames":{"format":"uuid"},"title":"Response Get Files Metadata Files Metadata Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/status":{"get":{"tags":["files"],"summary":"Get Files Status","description":"Get the status and embed_state for multiple files by their upload_ids.","operationId":"get_files_status_files_status_get","parameters":[{"name":"upload_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Upload Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"minItems":2,"maxItems":2},"propertyNames":{"format":"uuid"},"title":"Response Get Files Status Files Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/run":{"get":{"tags":["files"],"summary":"Get Files For Run","operationId":"get_files_for_run_files_run_get","parameters":[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileVersions"},"title":"Response Get Files For Run Files Run Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/presigned-url":{"get":{"tags":["files"],"summary":"Create Presigned Url","operationId":"create_presigned_url_files_presigned_url_get","parameters":[{"name":"upload_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Presigned Url Files Presigned Url Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/versions":{"get":{"tags":["files"],"summary":"Get Versions","description":"Get versions for a file. Accepts exactly one of either file_id or upload_id.\nIf upload_id is provided, it will be used to resolve the corresponding file_id.","operationId":"get_versions_files_versions_get","parameters":[{"name":"file_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"}},{"name":"upload_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoredFile"},"title":"Response Get Versions Files Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/":{"post":{"tags":["files"],"summary":"Upload New Files","operationId":"upload_new_files_files__post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_new_files_files__post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/version":{"post":{"tags":["files"],"summary":"Upload Version","operationId":"upload_version_files_version_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_version_files_version_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Delete Version","description":"Soft-delete one file version. At least one non-deleted version must remain.","operationId":"delete_version_files_version_delete","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_version_files_version_delete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/review_status/update":{"post":{"tags":["files"],"summary":"Update Document Review Status","description":"Update review status for one or more documents.\nIf review_status is None, it will clear the status.","operationId":"update_document_review_status_files_review_status_update_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_document_review_status_files_review_status_update_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/project/update":{"post":{"tags":["files"],"summary":"Update Project Id","operationId":"update_project_id_files_project_update_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_project_id_files_project_update_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/document-type/update":{"post":{"tags":["files"],"summary":"Update Document Type","operationId":"update_document_type_files_document_type_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentTypeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{file_id}/filename":{"patch":{"tags":["files"],"summary":"Rename File","description":"Rename any of the company's documents — internal or a vendor's.\n\nWhat moves and what does not is in\n`docs/subsystems/file-pipeline.md#renaming-a-document`.","operationId":"rename_file_files__file_id__filename_patch","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{file_id}/risks":{"get":{"tags":["files"],"summary":"Get Document Risks","description":"Get all risks associated with a document.\n\nThis is a cross-run file surface: a document's risks can span marketing, base,\nand other run types. Reviewer-only free-text (``dismiss_note`` on any run, plus\nthe TipTap ``notes`` doc on marketing runs) is redacted for callers without write\naccess on the owning run's module, mirroring ``get_run_risks``/``get_risk_by_id``.\nThe write check runs once per distinct run type on the file, not once per risk.","operationId":"get_document_risks_files__file_id__risks_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRiskResponseWithRun"},"title":"Response Get Document Risks Files  File Id  Risks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{upload_id}/reviewer":{"post":{"tags":["files"],"summary":"Assign Reviewer","operationId":"assign_reviewer_files__upload_id__reviewer_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_assign_reviewer_files__upload_id__reviewer_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/vendor/version":{"post":{"tags":["files"],"summary":"Upload New Version","operationId":"upload_new_version_files_vendor_version_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_new_version_files_vendor_version_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{file_id}/compare-versions":{"get":{"tags":["files"],"summary":"Compare Document Versions","description":"Compare two versions of a document, showing the diff.\nIf previous_version_id is not provided, it will compare with the second most recent version.","operationId":"compare_document_versions_files__file_id__compare_versions_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"previous_version_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Previous Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/preview-url":{"get":{"tags":["files"],"summary":"Create Preview Url","operationId":"create_preview_url_files_preview_url_get","parameters":[{"name":"upload_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Preview Url Files Preview Url Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/preview-image-urls":{"get":{"tags":["files"],"summary":"Create Preview Image Urls","description":"Bulk variant of ``/preview-image-url``.\n\nReturns a mapping of ``upload_id`` -> presigned image URL for every\nrequested upload that has a generated preview image. Upload IDs without a\ngenerated image (or that don't resolve to this company) are omitted so the\nfrontend can fall back gracefully per card.","operationId":"create_preview_image_urls_files_preview_image_urls_get","parameters":[{"name":"upload_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Upload Ids"}},{"name":"variant","in":"query","required":false,"schema":{"enum":["thumbnail","preview"],"type":"string","default":"thumbnail","title":"Variant"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"title":"Response Create Preview Image Urls Files Preview Image Urls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/bulk-download":{"post":{"tags":["files"],"summary":"Bulk Download Files","description":"Zip the latest IN_USE version of each selected file and return a download URL.","operationId":"bulk_download_files_files_bulk_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_bulk_download_files_files_bulk_download_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/bulk":{"delete":{"tags":["files"],"summary":"Bulk Delete Files","operationId":"bulk_delete_files_files_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_bulk_delete_files_files_bulk_delete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{file_id}":{"delete":{"tags":["files"],"summary":"Delete File","operationId":"delete_file_files__file_id__delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/events":{"get":{"tags":["files"],"summary":"Get Recent File Events","description":"Get recent file upload events grouped by date and actor.","operationId":"get_recent_file_events_files_events_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Number of days to look back","default":30,"title":"Days"},"description":"Number of days to look back"},{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter events for specific vendor","title":"Vendor Id"},"description":"Filter events for specific vendor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DateFileEventsResponse"},"title":"Response Get Recent File Events Files Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files":{"get":{"tags":["files"],"summary":"List Files By Type","description":"List files filtered by file_type for dropdowns and selectors.\n\nWhen ``internal_only`` is set, only company-owned (non-vendor) files are\nreturned (e.g. internal policies usable for requirement extraction).","operationId":"list_files_by_type_files_get","parameters":[{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"internal_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileVersions"},"title":"Response List Files By Type Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/vendor/health":{"get":{"tags":["files"],"summary":"Get Vendor Documents Health","description":"Return file stacks for all vendor documents, with extraction data when available.","operationId":"get_vendor_documents_health_files_vendor_health_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorDocumentHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/upload/{upload_id}/health-export":{"get":{"tags":["files"],"summary":"Export Document Health","description":"Return structured document health data for PDF export.","operationId":"export_document_health_files_upload__upload_id__health_export_get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Document Health Files Upload  Upload Id  Health Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/upload/{upload_id}/expiration-date":{"patch":{"tags":["files"],"summary":"Update Expiration Date","operationId":"update_expiration_date_files_upload__upload_id__expiration_date_patch","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpirationDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/upload/{upload_id}/smart-document/re-analyze":{"post":{"tags":["files"],"summary":"Reanalyze Smart Document","operationId":"reanalyze_smart_document_files_upload__upload_id__smart_document_re_analyze_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReanalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms":{"post":{"tags":["forms"],"summary":"Create Template Form","operationId":"create_template_form_forms_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewFormRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["forms"],"summary":"Get Forms","operationId":"get_forms_forms_get","parameters":[{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Form"},"title":"Response Get Forms Forms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/response/{response_id}":{"get":{"tags":["forms"],"summary":"Get Form Response","operationId":"get_form_response_forms_response__response_id__get","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["forms"],"summary":"Update Form Response","operationId":"update_form_response_forms_response__response_id__put","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Response Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{form_id}":{"get":{"tags":["forms"],"summary":"Get Form","operationId":"get_form_forms__form_id__get","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{form_id}/response":{"post":{"tags":["forms"],"summary":"Create Form Responses","operationId":"create_form_responses_forms__form_id__response_post","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFormResponsesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/{form_id}/autofill":{"post":{"tags":["forms"],"summary":"Autofill Form Answers","operationId":"autofill_form_answers_forms__form_id__autofill_post","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutofillFormRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forms/response/{response_id}/submit":{"post":{"tags":["forms"],"summary":"Submit Form Response","operationId":"submit_form_response_forms_response__response_id__submit_post","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/intake/{template_id}/info":{"get":{"tags":["public","intake"],"summary":"Get Intake Info","operationId":"get_intake_info_public_intake__template_id__info_get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/intake/{template_id}":{"get":{"tags":["public","intake"],"summary":"Get Intake","operationId":"get_intake_public_intake__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/intake/{template_id}/validate-email":{"post":{"tags":["public","intake"],"summary":"Validate Intake Email","operationId":"validate_intake_email_public_intake__template_id__validate_email_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/IntakeValidateEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Validate Intake Email Public Intake  Template Id  Validate Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/intake/{template_id}/submit":{"post":{"tags":["public","intake"],"summary":"Submit Intake","operationId":"submit_intake_public_intake__template_id__submit_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/IntakeSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/login-provider":{"post":{"tags":["public","auth"],"summary":"Get Login Provider","description":"Public endpoint — resolves which login flow serves an email address, by\nthe login_provider_type of the company owning the email's domain, for the\nemail-first /auth page.\n\nKeyed on domain, not the user (two emails at the same domain return the\nsame answer), so it discloses a domain's login provider like any\nemail-first SSO flow, and never whether a particular user exists.","operationId":"get_login_provider_public_login_provider_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginProviderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/intakes/templates":{"get":{"tags":["intakes"],"summary":"List Intake Templates","operationId":"list_intake_templates_intakes_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IntakeTemplateSummary"},"type":"array","title":"Response List Intake Templates Intakes Templates Get"}}}}}}},"/intakes/request-templates":{"get":{"tags":["intakes"],"summary":"List Request Intake Templates","description":"Active intake templates for the company, as id+name options.\n\nUnlike ``/templates`` this carries no submission data and requires no\nelevated permission (it is gated only by the router's auth + company\nscoping), so low-access VRM users can use it to open the public intake\n(\"request a service\") form for their company.","operationId":"list_request_intake_templates_intakes_request_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IntakeTemplateOption"},"type":"array","title":"Response List Request Intake Templates Intakes Request Templates Get"}}}}}}},"/intakes/archived/submissions":{"get":{"tags":["intakes"],"summary":"List Archived Submissions","operationId":"list_archived_submissions_intakes_archived_submissions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["PENDING","REVIEWED","REJECTED","OUT_OF_SCOPE","ALL"],"type":"string","default":"PENDING","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntakeSubmissionSummary"},"title":"Response List Archived Submissions Intakes Archived Submissions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/intakes/templates/{template_id}/submissions":{"get":{"tags":["intakes"],"summary":"List Intake Submissions","operationId":"list_intake_submissions_intakes_templates__template_id__submissions_get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"status","in":"query","required":false,"schema":{"enum":["PENDING","REVIEWED","REJECTED","OUT_OF_SCOPE","ALL"],"type":"string","default":"PENDING","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntakeSubmissionSummary"},"title":"Response List Intake Submissions Intakes Templates  Template Id  Submissions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/intakes/my-submissions":{"get":{"tags":["intakes"],"summary":"List My Intake Submissions","description":"Intake submissions made by the current user (matched on submitter email).\n\nScoped to the caller's own submissions and gated only by the router's auth +\ncompany scoping (no elevated permission), so low-access VRM users can review\nthe intake forms they themselves submitted.","operationId":"list_my_intake_submissions_intakes_my_submissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IntakeSubmissionSummary"},"type":"array","title":"Response List My Intake Submissions Intakes My Submissions Get"}}}}}}},"/intakes/my-submissions/{intake_submission_id}":{"get":{"tags":["intakes"],"summary":"Get My Intake Submission","description":"Read-only detail for one of the current user's own intake submissions.\n\nLike ``/my-submissions`` this needs no elevated permission, but it is scoped\nto the caller's email so a VRM user can only ever read submissions they\nthemselves made.","operationId":"get_my_intake_submission_intakes_my_submissions__intake_submission_id__get","parameters":[{"name":"intake_submission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Intake Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmissionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/intakes/{intake_submission_id}":{"get":{"tags":["intakes"],"summary":"Get Intake Submission","operationId":"get_intake_submission_intakes__intake_submission_id__get","parameters":[{"name":"intake_submission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Intake Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmissionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["intakes"],"summary":"Update Intake Submission","operationId":"update_intake_submission_intakes__intake_submission_id__patch","parameters":[{"name":"intake_submission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Intake Submission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntakeSubmissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmissionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/google/auth":{"post":{"tags":["google"],"summary":"Validate Google Token","operationId":"validate_google_token_google_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/google/presets":{"get":{"tags":["google"],"summary":"List Marketing Presets","operationId":"list_marketing_presets_google_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/google/collateral-types":{"get":{"tags":["google"],"summary":"List Collateral Types","operationId":"list_collateral_types_google_collateral_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/google/upload":{"post":{"tags":["google"],"summary":"Upload And Analyze Google Doc","operationId":"upload_and_analyze_google_doc_google_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_and_analyze_google_doc_google_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/google/risks/{run_id}":{"get":{"tags":["google"],"summary":"Get Google Run Risks","operationId":"get_google_run_risks_google_risks__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/figma":{"get":{"tags":["integrations"],"summary":"Get Figma Integrations","operationId":"get_figma_integrations_integrations_figma_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["integrations"],"summary":"Create New Figma Integration","operationId":"create_new_figma_integration_integrations_figma_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_new_figma_integration_integrations_figma_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/figma/key":{"get":{"tags":["integrations"],"summary":"Get Figma Integration Api Key","operationId":"get_figma_integration_api_key_integrations_figma_key_get","parameters":[{"name":"integration_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/mcp/connections":{"get":{"tags":["mcp-connections"],"summary":"List Mcp Connections","operationId":"list_mcp_connections_integrations_mcp_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/McpConnectionResponse"},"type":"array","title":"Response List Mcp Connections Integrations Mcp Connections Get"}}}}}}},"/integrations/mcp/connections/{client_id}":{"delete":{"tags":["mcp-connections"],"summary":"Revoke Mcp Connection","operationId":"revoke_mcp_connection_integrations_mcp_connections__client_id__delete","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/companies":{"get":{"tags":["internal"],"summary":"Get Companies","operationId":"get_companies_internal_companies_get","parameters":[{"name":"filter_self","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Filter Self"}},{"name":"has_marketing","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Has Marketing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompaniesWithDomains"},"title":"Response Get Companies Internal Companies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/create":{"post":{"tags":["internal"],"summary":"Create Company","operationId":"create_company_internal_company_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/add_users":{"post":{"tags":["internal"],"summary":"Add Users To Company","operationId":"add_users_to_company_internal_company_add_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCompanyUsersRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/disable":{"post":{"tags":["internal"],"summary":"Disable Company","operationId":"disable_company_internal_company_disable_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_disable_company_internal_company_disable_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/revoke-sessions":{"post":{"tags":["internal"],"summary":"Revoke Company Sessions","description":"Revoke every active SuperTokens session for a company's users.\n\nUsed at the WorkOS cutover: WorkOS sessions live client-side and are\nunaffected, but a SuperTokens session survives a `login_provider_type`\nflip for up to the refresh-token lifetime (~6 days idle). Revoking forces\nthe company's users back through /auth, where the email-first router sends\nthem to their newly-assigned provider. Reversible — users simply sign in\nagain.","operationId":"revoke_company_sessions_internal_company_revoke_sessions_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_company_sessions_internal_company_revoke_sessions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/remove-user":{"post":{"tags":["internal"],"summary":"Remove Company User","description":"Soft-delete a user at a company (admin) — for offboarding someone who no\nlonger works there. Same soft delete as the tenant self-serve flow, but scoped\nby an explicit company_id rather than the caller's own company.","operationId":"remove_company_user_internal_company_remove_user_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_remove_company_user_internal_company_remove_user_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/domains":{"get":{"tags":["internal"],"summary":"List Company Domains Admin","description":"List CompanyDomain domains for a given company (admin).","operationId":"list_company_domains_admin_internal_company_domains_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/domains/add":{"post":{"tags":["internal"],"summary":"Add Company Domain Admin","operationId":"add_company_domain_admin_internal_company_domains_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_company_domain_admin_internal_company_domains_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/domains/remove":{"post":{"tags":["internal"],"summary":"Remove Company Domain Admin","description":"Remove a CompanyDomain row for a given company (admin).","operationId":"remove_company_domain_admin_internal_company_domains_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_remove_company_domain_admin_internal_company_domains_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/company/negative-news-config":{"get":{"tags":["internal"],"summary":"Get Company Negative News Config","description":"Return a company's negative news monitoring limit and subscription count.","operationId":"get_company_negative_news_config_internal_company_negative_news_config_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsConfigAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal"],"summary":"Update Company Negative News Limit","description":"Upsert a company's negative news monitoring limit (CS self-serve).","operationId":"update_company_negative_news_limit_internal_company_negative_news_config_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNegativeNewsLimitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsConfigAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/companies/{company_id}/marketing-rules":{"get":{"tags":["internal"],"summary":"List Rules","operationId":"list_rules_internal_companies__company_id__marketing_rules_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleResponse"},"title":"Response List Rules Internal Companies  Company Id  Marketing Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Create Rule","operationId":"create_rule_internal_companies__company_id__marketing_rules_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRuleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-rules/{rule_id}":{"patch":{"tags":["internal"],"summary":"Update Rule","operationId":"update_rule_internal_marketing_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-rules/{rule_id}/suppressions":{"get":{"tags":["internal"],"summary":"List Suppressions","operationId":"list_suppressions_internal_marketing_rules__rule_id__suppressions_get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SuppressedRiskResponse"},"title":"Response List Suppressions Internal Marketing Rules  Rule Id  Suppressions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/customfields":{"get":{"tags":["internal","internal-config"],"summary":"List Custom Fields","operationId":"list_custom_fields_internal_config_customfields_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldResourceResponse"},"title":"Response List Custom Fields Internal Config Customfields Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/customfields/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Custom Field","operationId":"get_custom_field_internal_config_customfields__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/companies":{"get":{"tags":["internal","internal-config"],"summary":"List Companies","operationId":"list_companies_internal_config_companies_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyResourceResponse"},"title":"Response List Companies Internal Config Companies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/companies/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Company","operationId":"get_company_internal_config_companies__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/services":{"get":{"tags":["internal","internal-config"],"summary":"List Services","operationId":"list_services_internal_config_services_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceResourceResponse"},"title":"Response List Services Internal Config Services Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/services/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Service","operationId":"get_service_internal_config_services__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/users":{"get":{"tags":["internal","internal-config"],"summary":"List Users","operationId":"list_users_internal_config_users_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResource"},"title":"Response List Users Internal Config Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/users/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get User","operationId":"get_user_internal_config_users__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/vendorcontacts":{"get":{"tags":["internal","internal-config"],"summary":"List Vendor Contacts","operationId":"list_vendor_contacts_internal_config_vendorcontacts_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorContactResourceResponse"},"title":"Response List Vendor Contacts Internal Config Vendorcontacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/vendorcontacts/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Vendor Contact","operationId":"get_vendor_contact_internal_config_vendorcontacts__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorContactResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/logicblocks":{"get":{"tags":["internal","internal-config"],"summary":"List Logic Blocks","operationId":"list_logic_blocks_internal_config_logicblocks_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LogicBlockResourceResponse"},"title":"Response List Logic Blocks Internal Config Logicblocks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/logicblocks/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Logic Block","operationId":"get_logic_block_internal_config_logicblocks__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogicBlockResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/draftingtemplates":{"get":{"tags":["internal","internal-config"],"summary":"List Drafting Templates","operationId":"list_drafting_templates_internal_config_draftingtemplates_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftingTemplateResourceResponse"},"title":"Response List Drafting Templates Internal Config Draftingtemplates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/draftingtemplates/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Drafting Template","operationId":"get_drafting_template_internal_config_draftingtemplates__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/evidencepacketconfigurations":{"get":{"tags":["internal","internal-config"],"summary":"List Evidence Packet Configurations","operationId":"list_evidence_packet_configurations_internal_config_evidencepacketconfigurations_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvidencePacketConfigurationResourceResponse"},"title":"Response List Evidence Packet Configurations Internal Config Evidencepacketconfigurations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/evidencepacketconfigurations/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Evidence Packet Configuration","operationId":"get_evidence_packet_configuration_internal_config_evidencepacketconfigurations__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketConfigurationResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/reviewconfigurations":{"get":{"tags":["internal","internal-config"],"summary":"List Review Configurations","operationId":"list_review_configurations_internal_config_reviewconfigurations_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewConfigurationResourceResponse"},"title":"Response List Review Configurations Internal Config Reviewconfigurations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/reviewconfigurations/{review_type}":{"get":{"tags":["internal","internal-config"],"summary":"Get Review Configuration","operationId":"get_review_configuration_internal_config_reviewconfigurations__review_type__get","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewConfigurationResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/riskareas":{"get":{"tags":["internal","internal-config"],"summary":"List Risk Areas","operationId":"list_risk_areas_internal_config_riskareas_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RiskAreaResourceResponse"},"title":"Response List Risk Areas Internal Config Riskareas Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/riskareas/{uid}":{"get":{"tags":["internal","internal-config"],"summary":"Get Risk Area","operationId":"get_risk_area_internal_config_riskareas__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Uid"}},{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAreaResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/combined":{"get":{"tags":["internal","internal-config"],"summary":"List Combined Resources","description":"Serialize multiple resource kinds for a namespace into one YAML stream.","operationId":"list_combined_resources_internal_config_combined_get","parameters":[{"name":"namespace","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Namespace"}},{"name":"kinds","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Kinds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/apply":{"post":{"tags":["internal","internal-config"],"summary":"Apply Resources","description":"Parse and apply (or dry-run) one or more YAML resource documents.\nAuth enforced by the parent /internal router (validate_admin_role).","operationId":"apply_resources_internal_config_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/config/dry_run":{"post":{"tags":["internal","internal-config"],"summary":"Dry Run Resources","description":"Parse and classify resources without writing anything to the database.\nIntended for LLM round-trip validation before applying via the UI.","operationId":"dry_run_resources_internal_config_dry_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/doc-type-classify":{"get":{"tags":["internal"],"summary":"Eval Classify File Types","operationId":"eval_classify_file_types_internal_evals_doc_type_classify_get","parameters":[{"name":"n","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyEvalResultItem"},"title":"Response Eval Classify File Types Internal Evals Doc Type Classify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-checks/packets":{"get":{"tags":["internal"],"summary":"List Completed Evidence Packets","description":"Return all COMPLETED evidence packets as dropdown options.\n\nEach option is labeled ``\"<requesting company> - <requestee company> - <date>\"``.","operationId":"list_completed_evidence_packets_internal_evals_requirement_checks_packets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RequirementCheckPacketOption"},"type":"array","title":"Response List Completed Evidence Packets Internal Evals Requirement Checks Packets Get"}}}}}}},"/internal/evals/requirement-checks/{packet_id}":{"get":{"tags":["internal"],"summary":"Get Requirement Checks For Packet","description":"Return requirement checks that have an answer for the given evidence packet.","operationId":"get_requirement_checks_for_packet_internal_evals_requirement_checks__packet_id__get","parameters":[{"name":"packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementCheckItem"},"title":"Response Get Requirement Checks For Packet Internal Evals Requirement Checks  Packet Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-checks/{packet_id}/reclassify":{"post":{"tags":["internal"],"summary":"Reclassify Requirement Checks","description":"Re-run compliance classification for all answered requirement checks in a packet.\n\nClassifies in batches of ``_RECLASSIFY_BATCH_SIZE`` concurrently and returns\nthe fresh compliance status, thinking block text, per-check token usage, and\naggregate statistics (total tokens, wall-clock time, input tokens per minute).","operationId":"reclassify_requirement_checks_internal_evals_requirement_checks__packet_id__reclassify_post","parameters":[{"name":"packet_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReclassifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/smart-doc-extraction/runs":{"get":{"tags":["internal"],"summary":"List Smart Doc Extraction Runs","description":"All available local eval runs, most recent first, for the run\ndropdown on the eval page. Each run id is a `<results.json>` file\nproduced by one invocation of `python -m backend.scripts.smart_doc_eval`.","operationId":"list_smart_doc_extraction_runs_internal_evals_smart_doc_extraction_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Smart Doc Extraction Runs Internal Evals Smart Doc Extraction Runs Get"}}}}}}},"/internal/evals/smart-doc-extraction":{"get":{"tags":["internal"],"summary":"Get Smart Doc Extraction Eval Results","description":"Return one local Anthropic vs. LlamaExtract eval run, merged with any\nsaved ground-truth labels and that run's reviewer field preferences.","operationId":"get_smart_doc_extraction_eval_results_internal_evals_smart_doc_extraction_get","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Defaults to the most recent run if omitted.","title":"Run Id"},"description":"Defaults to the most recent run if omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SmartDocExtractionResultItem"},"title":"Response Get Smart Doc Extraction Eval Results Internal Evals Smart Doc Extraction Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/smart-doc-extraction/label":{"post":{"tags":["internal"],"summary":"Label Smart Doc Extraction Eval Result","description":"Save a reviewer-provided ground-truth expiration date for one document.\n\nGround truth is about the underlying document, not one eval run, so it's\nshared across every run's results rather than scoped to `body.run_id`.","operationId":"label_smart_doc_extraction_eval_result_internal_evals_smart_doc_extraction_label_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartDocExtractionLabelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartDocExtractionResultItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/smart-doc-extraction/preference":{"post":{"tags":["internal"],"summary":"Set Smart Doc Extraction Field Preference","description":"Save (or clear) a reviewer's pick of which backend's field result was\nbetter for one field of one document, from the comparison pane. Picks are\naggregated into `preference_score` on the returned item and stored in a\nper-run sidecar file (`<run_id>-preferences.json`), so re-running the eval\nscript never wipes out prior human judgments for an earlier run.","operationId":"set_smart_doc_extraction_field_preference_internal_evals_smart_doc_extraction_preference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartDocExtractionPreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartDocExtractionResultItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evidence-packets/health":{"get":{"tags":["internal"],"summary":"Get Evidence Packet Health","description":"Return evidence packets that have files stuck in processing or embedding.\n\nA file is considered \"stuck\" if it has been in ``PROCESSING`` or with an\n``IN_PROGRESS``/``NOT_STARTED`` embed state for longer than\n``threshold_minutes``. Packet ``updated_at`` is intentionally not used as a\nhealth signal because packets are created up-front (often in a draft state)\nlong before the analysis workflow runs against them.","operationId":"get_evidence_packet_health_internal_evidence_packets_health_get","parameters":[{"name":"threshold_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":1440,"minimum":1,"default":30,"title":"Threshold Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/conditions/health":{"get":{"tags":["internal"],"summary":"Get Conditions Health","description":"Return all conditions (code blocks) for active companies with Monty\ntype-check results.\n\nBlocks are grouped by company and sorted: errored blocks first, then\nalphabetically by name within each company.  Companies with errors appear\nbefore companies without.","operationId":"get_conditions_health_internal_conditions_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionsHealthResponse"}}}}}}},"/internal/conditions/bulk-update":{"post":{"tags":["internal"],"summary":"Bulk Update Conditions","description":"Update code and soft_logic for multiple conditions in one request.\n\nEach item is committed independently so a failure on one row does not\nroll back the others.","operationId":"bulk_update_conditions_internal_conditions_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBulkUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBulkUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/conditions/bulk-retrain":{"post":{"tags":["internal"],"summary":"Bulk Retrain Conditions","description":"Run free_coding for each requested condition and return suggested code.\n\nResults are **not** persisted — the caller reviews suggestions and calls\nbulk-update to save them.\n\nAt most ``_BULK_RETRAIN_MAX_BLOCKS`` conditions are processed per request.\nConcurrency is bounded by a semaphore to avoid overwhelming the LLM API.","operationId":"bulk_retrain_conditions_internal_conditions_bulk_retrain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBulkRetrainRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionBulkRetrainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/files/health":{"get":{"tags":["internal"],"summary":"Get Files Health","description":"Return FileVersions rows that are stuck in processing or have\nfailed / not-started embedding, for active companies only.","operationId":"get_files_health_internal_files_health_get","parameters":[{"name":"processing_age_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":1440,"minimum":1,"default":5,"title":"Processing Age Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/files/retrigger":{"post":{"tags":["internal"],"summary":"Retrigger Files","description":"Re-trigger processing and/or embedding workflows for selected files.\n\nIf the file is already past processing (status == IN_USE), only the\nSemanticallyIndexFile workflow is triggered.  Otherwise the full\nProcessFile workflow is triggered (which chains into indexing on success).","operationId":"retrigger_files_internal_files_retrigger_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetriggerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/files/{upload_id}/download-urls":{"get":{"tags":["internal"],"summary":"Get File Download Urls","description":"Return presigned S3 download URLs for a file and its PDF version.","operationId":"get_file_download_urls_internal_files__upload_id__download_urls_get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDownloadUrls"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/files/by-ids":{"post":{"tags":["internal"],"summary":"Get Files By Ids","description":"Return FileHealthItems for the given UUIDs.\n\nAccepts both IndividualFileUpload upload_ids (returned directly) and\nFiles file_ids (resolved to the latest IndividualFileUpload).","operationId":"get_files_by_ids_internal_files_by_ids_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesByIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesHealthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-preset-proposals":{"get":{"tags":["internal"],"summary":"List Proposals","description":"Staged proposals, newest first, optionally narrowed to one customer or one state.","operationId":"list_proposals_internal_marketing_preset_proposals_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"proposal_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingPresetProposalStatus"},{"type":"null"}],"title":"Proposal Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketingPresetProposalSummary"},"title":"Response List Proposals Internal Marketing Preset Proposals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-preset-proposals/{proposal_id}":{"get":{"tags":["internal"],"summary":"Get Proposal","description":"The proposal plus everything the review page renders against it.","operationId":"get_proposal_internal_marketing_preset_proposals__proposal_id__get","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetProposalDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal"],"summary":"Update Proposal","description":"Save the reviewer's edits and per-product-line approvals.\n\nValidated the same way staging was, so a save that could not be applied is refused while the\nreviewer is still looking at the field they broke — rather than at submit time, when they have\nalready decided they are done.","operationId":"update_proposal_internal_marketing_preset_proposals__proposal_id__patch","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetProposalDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-preset-proposals/{proposal_id}/apply":{"post":{"tags":["internal"],"summary":"Apply Proposal Route","description":"Create or edit the named product lines. The one path that writes a customer's config.\n\nAll or nothing: the whole submit is one transaction, so a refusal on the fourth row leaves the\ncustomer exactly as the reviewer found them rather than four-fifths configured.","operationId":"apply_proposal_route_internal_marketing_preset_proposals__proposal_id__apply_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalApply"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppliedProductLine"},"title":"Response Apply Proposal Route Internal Marketing Preset Proposals  Proposal Id  Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-preset-proposals/{proposal_id}/discard":{"post":{"tags":["internal"],"summary":"Discard Proposal","description":"Close a proposal nobody is going to submit, so the queue means something.\n\nRetained rather than deleted: a rejected plan is as much a part of how a customer came to be\nconfigured the way they are as an accepted one. Product lines already created from it stay —\ndiscarding is a decision about the rest of the page, not an undo.","operationId":"discard_proposal_internal_marketing_preset_proposals__proposal_id__discard_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalRevisionCheck"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetProposalSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-requirement-rollout":{"get":{"tags":["internal"],"summary":"List Rollout","operationId":"list_rollout_internal_marketing_requirement_rollout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnrolledCompany"},"type":"array","title":"Response List Rollout Internal Marketing Requirement Rollout Get"}}}}}}},"/internal/companies/{company_id}/marketing-requirement-rollout":{"put":{"tags":["internal"],"summary":"Enroll","description":"Put one company in the rollout. Idempotent, so a double-click is not an error.","operationId":"enroll_internal_companies__company_id__marketing_requirement_rollout_put","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrolledCompany"},"title":"Response Enroll Internal Companies  Company Id  Marketing Requirement Rollout Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Unenroll","description":"Take one company out. Deleting the row is how the rollout is left, so this is the whole undo.\n\nTheir existing runs keep their coverage rows — those record a check that did happen — and later runs\ngo back to being judged against the standards documents.","operationId":"unenroll_internal_companies__company_id__marketing_requirement_rollout_delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrolledCompany"},"title":"Response Unenroll Internal Companies  Company Id  Marketing Requirement Rollout Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets":{"get":{"tags":["internal"],"summary":"List Company Presets","description":"List a company's live presets with their team + internal-file count (admin).\n\nSoft-deleted rows are omitted here as they are for the customer: this listing\nis what the admin page offers clone and delete from, and neither is meaningful\nfor a preset already deleted.","operationId":"list_company_presets_internal_marketing_presets_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PresetRow"},"title":"Response List Company Presets Internal Marketing Presets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets/clone-preview":{"post":{"tags":["internal"],"summary":"Preview Clone Presets","description":"Preview a source-team → target-team preset clone without writing (admin).","operationId":"preview_clone_presets_internal_marketing_presets_clone_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClonePresetsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClonePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets/clone":{"post":{"tags":["internal"],"summary":"Clone Presets","description":"Clone a team's presets to another team, appending a suffix (admin).\n\nA name that is already taken, or too long for the column, is skipped rather\nthan written, so the clone is re-runnable and one unusable name cannot cost\nthe operator the rest of the batch.","operationId":"clone_presets_internal_marketing_presets_clone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClonePresetsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets/{preset_id}":{"delete":{"tags":["internal"],"summary":"Delete Preset","description":"Soft-delete a single marketing preset (admin).\n\nSoft, not hard, for the same reason as the customer path: the row is what a\npiece of collateral's `preset_ids` resolves against, and a staff delete would\norphan those analyses just as thoroughly. `deleted_by` records the staff user.\nOnly presets that have never been used to analyze a file can be deleted; a\nused one returns 409 — see backend/helpers/marketing_presets.py for why, and\nfor what that measurement does not cover. company_id is a match-guard on the\nlookup (a stale id can't resolve to another company's preset); it is not an\naccess boundary, which is the admin gate above.","operationId":"delete_preset_internal_marketing_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets/{preset_id}/guidelines-download":{"get":{"tags":["internal"],"summary":"Download Preset Guidelines","description":"Every live marketing standard attached to one product line (admin).\n\nResolved through the same chain the requirement-applicability dashboard gathers from\n(`resolve_guideline_files`), so this always names the guidelines a real analysis would use —\nnever a company-wide list. A single guideline downloads directly (no zip needed); more than\none is bundled the same way `files.py::bulk_download_files` bundles a multi-file selection.","operationId":"download_preset_guidelines_internal_marketing_presets__preset_id__guidelines_download_get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-presets/{preset_id}/collateral-download":{"get":{"tags":["internal"],"summary":"Download Preset Collateral","description":"A sample of up to `COLLATERAL_SAMPLE_SIZE` collateral files analyzed under one product\nline (admin), zipped the same way `files.py::bulk_download_files` zips a selection.\n\n\"Analyzed under this product line\" means `marketing_collateral.preset_ids` contains it —\nstamped at analysis time (see `assign_preset_ids_to_collateral`) — not merely uploaded to the\ncompany, so this names the same population `usage_examples` counts as using the preset.\nNewest-first, so the sample is the most recently analyzed collateral rather than an arbitrary\nslice.","operationId":"download_preset_collateral_internal_marketing_presets__preset_id__collateral_download_get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-teams":{"get":{"tags":["internal"],"summary":"List Marketing Teams","description":"List a company's marketing teams (admin).","operationId":"list_marketing_teams_internal_marketing_teams_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketingTeamResponse"},"title":"Response List Marketing Teams Internal Marketing Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Create Marketing Team","description":"Create a marketing team for a company (admin).","operationId":"create_marketing_team_internal_marketing_teams_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMarketingTeamRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-teams/{team_id}":{"patch":{"tags":["internal"],"summary":"Rename Marketing Team","description":"Rename a marketing team (admin).","operationId":"rename_marketing_team_internal_marketing_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameMarketingTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-teams/company-users":{"get":{"tags":["internal"],"summary":"List Company Users With Teams","description":"List a company's active users with their marketing-team memberships (admin).","operationId":"list_company_users_with_teams_internal_marketing_teams_company_users_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyUserMembership"},"title":"Response List Company Users With Teams Internal Marketing Teams Company Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-teams/{team_id}/members":{"post":{"tags":["internal"],"summary":"Add Team Member","description":"Add a user to a marketing team (admin).","operationId":"add_team_member_internal_marketing_teams__team_id__members_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTeamMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUserMembership"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/marketing-teams/{team_id}/members/{user_id}":{"patch":{"tags":["internal"],"summary":"Set Team Member Primary","description":"Set or clear a membership as the user's primary team (admin).","operationId":"set_team_member_primary_internal_marketing_teams__team_id__members__user_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team 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/SetTeamMemberPrimaryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUserMembership"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Remove Team Member","description":"Remove a user from a marketing team (admin).","operationId":"remove_team_member_internal_marketing_teams__team_id__members__user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/masquerade":{"post":{"tags":["internal"],"summary":"Masquerade As Company","description":"Set or clear soft masquerade for the current admin user.\n\nSoft masquerade points the user at another company for read access while\nkeeping their own company_id as Kobalt Labs. Setting it first clears any\nactive hard masquerade so that exactly one masquerade mode is ever active.","operationId":"masquerade_as_company_internal_masquerade_post","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasqueradeActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/masquerade/resolve-owner":{"get":{"tags":["internal"],"summary":"Resolve Masquerade Owner","description":"Resolve the company that owns the entities referenced by ``ids``.\n\nPowers the admin-only auto-soft-masquerade suggestion: the client passes the\nUUIDs scraped from a deep-link URL and gets back the owning company (if any)\nso it can offer a one-click masquerade switch. Read-only; gated identically\nto the UUID lookup endpoint.","operationId":"resolve_masquerade_owner_internal_masquerade_resolve_owner_get","parameters":[{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasqueradeOwnerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hard-masquerade":{"post":{"tags":["internal"],"summary":"Hard Masquerade As Company","description":"Activate or deactivate hard masquerade for the current admin user.\n\nHard masquerade swaps the user's company_id to the target so writes apply to\nthat company. Activating first clears any active masquerade (soft, or a\ndifferent hard target), so exactly one masquerade mode is ever active and\nadmins can jump straight between modes/targets.","operationId":"hard_masquerade_as_company_internal_hard_masquerade_post","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MasqueradeActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hard-masquerade/status":{"get":{"tags":["internal"],"summary":"Get Hard Masquerade Status","description":"Return current hard masquerade status for the admin user.","operationId":"get_hard_masquerade_status_internal_hard_masquerade_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/hard-masquerade/eligible":{"get":{"tags":["internal"],"summary":"Get Eligible Companies","description":"Return companies with an approved, non-expired masqueradable record.","operationId":"get_eligible_companies_internal_hard_masquerade_eligible_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/hard-masquerade/propose":{"post":{"tags":["internal"],"summary":"Propose Company For Masquerade","description":"Propose a company for hard masquerade (step 1 of dual-approval).","operationId":"propose_company_for_masquerade_internal_hard_masquerade_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hard-masquerade/proposals":{"get":{"tags":["internal"],"summary":"Get Open Proposals","description":"Return open (unapproved) masquerade proposals.","operationId":"get_open_proposals_internal_hard_masquerade_proposals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/hard-masquerade/proposals/{proposal_id}/approve":{"post":{"tags":["internal"],"summary":"Approve Proposal","description":"Approve a masquerade proposal. Approver must be a different user than the proposer.","operationId":"approve_proposal_internal_hard_masquerade_proposals__proposal_id__approve_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hard-masquerade/{record_id}/revoke":{"post":{"tags":["internal"],"summary":"Revoke Masqueradable","description":"Remove a company's hard-masquerade approval.\n\nDeletes the CompanyMasqueradable record so the company is no longer eligible\nand cannot be activated until it is re-proposed and re-approved. Does not\ntouch any admin whose session is already hard-masquerading as that company;\nthey return home the normal way by deactivating.","operationId":"revoke_masqueradable_internal_hard_masquerade__record_id__revoke_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/notifications/types":{"get":{"tags":["internal"],"summary":"List Notification Types","description":"The catalog of notification types with their default and required permission.","operationId":"list_notification_types_internal_notifications_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NotificationTypeOption"},"type":"array","title":"Response List Notification Types Internal Notifications Types Get"}}}}}}},"/internal/notifications/users/{user_id}/preferences":{"get":{"tags":["internal"],"summary":"List User Notification Preferences","description":"A user's effective preference per notification type, for admin review.","operationId":"list_user_notification_preferences_internal_notifications_users__user_id__preferences_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserNotificationPreferenceRow"},"title":"Response List User Notification Preferences Internal Notifications Users  User Id  Preferences Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal"],"summary":"Set User Notification Preference","description":"Set an explicit override for a single notification type on a user.","operationId":"set_user_notification_preference_internal_notifications_users__user_id__preferences_put","parameters":[{"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/SetUserNotificationPreferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Set User Notification Preference Internal Notifications Users  User Id  Preferences Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/notifications/companies/{company_id}/preferences":{"get":{"tags":["internal"],"summary":"List Company Notification Preferences","description":"Every active user at a company and their effective preference per type.","operationId":"list_company_notification_preferences_internal_notifications_companies__company_id__preferences_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNotificationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal"],"summary":"Set Company Notification Preference","description":"Set one notification type to the same value for every user at the company.\n\nUsers who lack the permission the notification requires are skipped, so a\nbulk change never grants a notification a user can't access.","operationId":"set_company_notification_preference_internal_notifications_companies__company_id__preferences_put","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCompanyNotificationPreferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyNotificationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/overview/companies":{"get":{"tags":["internal"],"summary":"Get Company Overview","description":"Per-company TPRM signals across all companies (excludes Kobalt Labs).","operationId":"get_company_overview_internal_overview_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOverviewRow"},"type":"array","title":"Response Get Company Overview Internal Overview Companies Get"}}}}}}},"/internal/permissions":{"get":{"tags":["internal"],"summary":"Get All Permissions","description":"Get all permissions in the system, grouped by module.","operationId":"get_all_permissions_internal_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get All Permissions Internal Permissions Get"}}}}}}},"/internal/add-permission":{"post":{"tags":["internal"],"summary":"Add Permission","description":"Add a new permission to the system.\n\nDEPRECATED: permissions are now defined in code (``backend/defs/archetypes.py``\n``PERMISSION_CATALOG``) and projected into the DB by the deploy reconcile\n(``backend.scripts.sync_permissions``). Add new permissions to the catalog, not here.","operationId":"add_permission_internal_add_permission_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_permission_internal_add_permission_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Add Permission Internal Add Permission Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/permissions/cache/clear":{"post":{"tags":["internal"],"summary":"Clear Permissions Cache","description":"Clear the user permissions cache.","operationId":"clear_permissions_cache_internal_permissions_cache_clear_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Clear Permissions Cache Internal Permissions Cache Clear Post"}}}}}}},"/internal/roles/companies":{"get":{"tags":["internal"],"summary":"List Companies With Roles","description":"List companies that have at least one row in UserRoles (company_id IS NOT NULL).","operationId":"list_companies_with_roles_internal_roles_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyWithRoles"},"type":"array","title":"Response List Companies With Roles Internal Roles Companies Get"}}}}}}},"/internal/roles/user-lookup":{"get":{"tags":["internal"],"summary":"Lookup User Permissions","description":"Look up a user and return all of their roles and effective permissions.","operationId":"lookup_user_permissions_internal_roles_user_lookup_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPermissionsLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roles/matrix":{"get":{"tags":["internal"],"summary":"Get Role Permission Matrix","description":"Get a read-only matrix view of roles and their permissions, organized by module and entity.","operationId":"get_role_permission_matrix_internal_roles_matrix_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RolePermissionMatrixResponse"},{"type":"null"}],"title":"Response Get Role Permission Matrix Internal Roles Matrix Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/permissions/usage":{"get":{"tags":["internal"],"summary":"Get Permissions Usage","description":"Global view of every permission and all roles that grant it.\n\nUnlike ``/roles/matrix`` (scoped to system roles or a single company), this\naggregates role usage across all companies and system roles so a permission's\nfull footprint is visible in one place.","operationId":"get_permissions_usage_internal_permissions_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionUsageResponse"}}}}}}},"/internal/migration/overview":{"get":{"tags":["internal"],"summary":"Get Migration Overview","description":"Per-company migration status: from shared global roles to company-scoped archetype roles.\n\nA company is ``migrated`` once it has ≥1 company-scoped role, **every** company-scoped\nrole is archetype-tagged, and no user still holds a global role — the same precondition\nthat unlocks the tenant-facing per-module role editor.","operationId":"get_migration_overview_internal_migration_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationOverviewResponse"}}}}}}},"/internal/migration/companies/{company_id}/users":{"get":{"tags":["internal"],"summary":"Get Company Migration Users","description":"Active users in a company with their current role attachments, plus the company's own\nroles as move targets. Drives the \"move users onto their custom role\" flow.","operationId":"get_company_migration_users_internal_migration_companies__company_id__users_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationCompanyUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/migration/users/{user_id}/preview":{"post":{"tags":["internal"],"summary":"Preview User Role Change","description":"Effective permissions before/after adding/removing roles — no writes. Lets you see the\nimpact of moving a user onto their company role before committing.","operationId":"preview_user_role_change_internal_migration_users__user_id__preview_post","parameters":[{"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/UserRoleChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/migration/users/{user_id}/apply":{"post":{"tags":["internal"],"summary":"Apply User Role Change","description":"Move a user's role attachments: add company roles, remove (typically global) roles.\n\nDB-only by design — company-scoped archetype roles are never mirrored to SuperTokens\n(authz reads the DB; only the global ``kobalt_admin`` claim is mirrored, and this flow\nnever touches it). Invalidates the user's permission + vendor-access caches so the change\ntakes effect at once across replicas.","operationId":"apply_user_role_change_internal_migration_users__user_id__apply_post","parameters":[{"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/UserRoleChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyUserRoleChangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/migration/companies/{company_id}/bulk-assign-role":{"post":{"tags":["internal"],"summary":"Bulk Assign Role","description":"Attach one role to a batch of the company's active users in a single step.\n\nHandy for migration (put everyone on the same company role at once) and for recovery —\nselecting all users and assigning the global ``full_user`` role restores broad access after\na botched migration. Additive only: it never removes a role, so it's safe to re-run and\ndoesn't undo anything; strip stale roles afterward via the per-user move flow.\n\nThe role must be this company's own or a shared global role (never the staff\n``kobalt_admin``). DB-only like the rest of the migration flow (nothing mirrored to\nSuperTokens); caches are cleared per newly-attached user so the change takes effect at once.","operationId":"bulk_assign_role_internal_migration_companies__company_id__bulk_assign_role_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/permissions/{permission_id}":{"delete":{"tags":["internal"],"summary":"Delete Permission","description":"Delete a permission.\n\nRefuses (409) if any role still grants it, returning the list of roles so the\ncaller can prompt the user to remove it from those roles first. Pass\n``force=true`` to first clear the permission from every role that grants it\nand then delete it, all in one transaction.","operationId":"delete_permission_internal_permissions__permission_id__delete","parameters":[{"name":"permission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Permission Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePermissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roles/create":{"post":{"tags":["internal"],"summary":"Create Role","description":"Create a new role with the specified permissions.","operationId":"create_role_internal_roles_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Role Internal Roles Create Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roles/{role_id}/clone":{"post":{"tags":["internal"],"summary":"Clone Role","description":"Clone a role's permission grants into a new role in the target scope.\n\nThe clone is a fresh role (new ``role_id``) carrying a copy of the source role's\n``UserRoleToUserPermissions`` rows — users are **not** copied. Used to seed a\ncompany's own box from a General (global) role, or to copy a role between companies.","operationId":"clone_role_internal_roles__role_id__clone_post","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clone Role Internal Roles  Role Id  Clone Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roles/{role_id}/permissions":{"put":{"tags":["internal"],"summary":"Update Role Permissions","description":"Update the permissions for a role.","operationId":"update_role_permissions_internal_roles__role_id__permissions_put","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRolePermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Role Permissions Internal Roles  Role Id  Permissions Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/archetypes":{"get":{"tags":["internal"],"summary":"List Archetypes","description":"The closed, product-owned set of archetypes a role can be assigned to.","operationId":"list_archetypes_internal_archetypes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ArchetypeOption"},"type":"array","title":"Response List Archetypes Internal Archetypes Get"}}}}}}},"/internal/roles/{role_id}/archetype":{"put":{"tags":["internal"],"summary":"Update Role Archetype","description":"Set (or clear, with ``archetype: null``) a role's product-owned archetype.\n\nA company may have at most one role per archetype (enforced by a partial unique\nindex); a collision surfaces as a 409 rather than a 500.","operationId":"update_role_archetype_internal_roles__role_id__archetype_put","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleArchetypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Role Archetype Internal Roles  Role Id  Archetype Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roles/{role_id}/users":{"get":{"tags":["internal"],"summary":"Get Role Users","description":"Get all users that have a specific role.","operationId":"get_role_users_internal_roles__role_id__users_get","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Role Users Internal Roles  Role Id  Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Add Users To Role","description":"Add users to a role. Adds to both database and SuperTokens.","operationId":"add_users_to_role_internal_roles__role_id__users_post","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageRoleUsersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Users To Role Internal Roles  Role Id  Users Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Remove Users From Role","description":"Remove users from a role. Removes from both database and SuperTokens.","operationId":"remove_users_from_role_internal_roles__role_id__users_delete","parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageRoleUsersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Users From Role Internal Roles  Role Id  Users Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/users":{"get":{"tags":["internal"],"summary":"Get All Users","description":"Active users, sorted alphabetically.\n\nOptionally filter by ``company_id`` and/or a ``search`` term matched against\nfirst name, last name, and email. ``search`` caps results at ``limit`` so a\ntype-ahead picker doesn't pull the entire directory.","operationId":"get_all_users_internal_users_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get All Users Internal Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/modules":{"get":{"tags":["internal"],"summary":"Get Modules","description":"Get a list of all available modules.","operationId":"get_modules_internal_modules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Modules Internal Modules Get"}}}}}},"post":{"tags":["internal"],"summary":"Create Module","description":"Create a new permissions module (the top-level namespace for permissions).","operationId":"create_module_internal_modules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModuleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/failures":{"get":{"tags":["internal"],"summary":"Get Marketing Failures","description":"Week-over-week marketing analysis failure rates for the requested scope.\n\nScope widens or narrows with the params:\n- no `company_id`           -> all companies, breakdown by company\n- `company_id`              -> that company, breakdown by marketing team\n- `company_id` + `team_id`  -> that team, no further breakdown","operationId":"get_marketing_failures_internal_reliability_marketing_failures_get","parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":1,"default":12,"title":"Weeks"}},{"name":"sla_hours","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":2,"title":"Sla Hours"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingFailuresResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/citations/missing":{"get":{"tags":["internal"],"summary":"Get Marketing Missing Citation Risks","description":"List marketing risks with no citation whose run falls in `week_start`'s week.\n\nBacks the click-through on the weekly \"risks without citations\" chart. Uses\nthe same week bucketing (`date_trunc('week', run_time)`) and no-citation rule\nas `_citation_weekly_series`, so the rows match the clicked point's count.\nEach row carries the `file_id` to deeplink into the file's history view.","operationId":"get_marketing_missing_citation_risks_internal_reliability_marketing_citations_missing_get","parameters":[{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","description":"ISO week start (Monday) to drill into","title":"Week Start"},"description":"ISO week start (Monday) to drill into"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingCitationRisksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/runs/slowest":{"get":{"tags":["internal"],"summary":"Get Marketing Slowest Runs","description":"List the slowest marketing runs whose run falls in `week_start`'s week.\n\nBacks the click-through on the weekly run-latency chart, and answers \"which\nruns took really long, and was it waiting or working?\" -- every row breaks\nend-to-end latency into queue wait and the prep-plus-analysis span, because\nthe same ~40-minute total is a dispatch problem in one run and slow work in\nanother, and the total alone cannot tell them apart.\n\nUses the same week bucketing (`date_trunc('week', run_time)`) and the same\n`_latency_filters` population as `_run_latency_weekly_series`, so `total`\nequals the clicked point's `runs` for the same scope -- and the first row\nunder the default sort is the run behind that week's `end_to_end_max_seconds`.\nThe same survivorship caveat applies: a run that failed or is still stuck has\nno `analysis_completed_at` and cannot appear here, however long it has been\nwaiting. Each row carries `file_id` to deeplink into the file's history view.\n\nPaginated with `limit`/`offset` over the full ordered set. The sort key is\nfollowed by `run_id` as a unique tiebreaker so equal latencies cannot shuffle\nbetween pages, which would otherwise let a row appear twice or not at all.\n`total` is always the whole filtered set, not the page.","operationId":"get_marketing_slowest_runs_internal_reliability_marketing_runs_slowest_get","parameters":[{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","description":"ISO week start (Monday) to drill into","title":"Week Start"},"description":"ISO week start (Monday) to drill into"},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SlowRunSort","description":"Order by end-to-end latency (default) or by queue wait alone","default":"end_to_end"},"description":"Order by end-to-end latency (default) or by queue wait alone"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlowRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/risks":{"get":{"tags":["internal"],"summary":"Get Marketing Feedback Risks","description":"Paginated marketing risks whose run falls in `week_start`'s week, backing\nthe feedback signal & coverage drill-down.\n\nUses the same week bucketing (`date_trunc('week', run_time)`) and scope as\nthe weekly feedback series, so the list matches the clicked point. Lists all\nrisks (Kobalt-generated + reviewer-added) by default; the `flagged` /\n`outdated` / `reviewer_added` / `dismissed` / `over_flagged` / `reason`\nflags narrow the list (ANDed when combined).\nOptional `source_clause` / `short_text` / `ignore_comment` / `source_family`\n/ `disclosure` params narrow further when the admin clicks a group-by\nbucket (repeat a param to OR multiple keys for merged near-dupe clusters).\nEach row carries `file_id` to deeplink into the analysis history view and\n`dismiss_reason` (the reviewer's stated reason, when dismissed).","operationId":"get_marketing_feedback_risks_internal_reliability_marketing_feedback_risks_get","parameters":[{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","description":"ISO week start (Monday) to drill into","title":"Week Start"},"description":"ISO week start (Monday) to drill into"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"flagged","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks a reviewer flagged","default":false,"title":"Flagged"},"description":"Only risks a reviewer flagged"},{"name":"outdated","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks superseded by a re-run","default":false,"title":"Outdated"},"description":"Only risks superseded by a re-run"},{"name":"reviewer_added","in":"query","required":false,"schema":{"type":"boolean","description":"Only reviewer-added risks","default":false,"title":"Reviewer Added"},"description":"Only reviewer-added risks"},{"name":"dismissed","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks a reviewer dismissed","default":false,"title":"Dismissed"},"description":"Only risks a reviewer dismissed"},{"name":"over_flagged","in":"query","required":false,"schema":{"type":"boolean","description":"Only dismissals the reviewer marked as an over-flag / false positive (reason incorrect / out_of_scope / already_met)","default":false,"title":"Over Flagged"},"description":"Only dismissals the reviewer marked as an over-flag / false positive (reason incorrect / out_of_scope / already_met)"},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}],"description":"Only dismissals with this exact reviewer-stated reason","title":"Reason"},"description":"Only dismissals with this exact reviewer-stated reason"},{"name":"ignored","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks with an ignore comment","default":false,"title":"Ignored"},"description":"Only risks with an ignore comment"},{"name":"actioned","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks dispositioned (status set or outdated)","default":false,"title":"Actioned"},"description":"Only risks dispositioned (status set or outdated)"},{"name":"not_actioned","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks never dispositioned (no status, not outdated)","default":false,"title":"Not Actioned"},"description":"Only risks never dispositioned (no status, not outdated)"},{"name":"source_clause","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow to risks whose normalized source_clause matches any key (repeat param to OR near-dupe cluster members)","title":"Source Clause"},"description":"Narrow to risks whose normalized source_clause matches any key (repeat param to OR near-dupe cluster members)"},{"name":"short_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow to risks whose normalized short_text matches any key (repeat param to OR)","title":"Short Text"},"description":"Narrow to risks whose normalized short_text matches any key (repeat param to OR)"},{"name":"ignore_comment","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow to risks whose normalized ignore_comment matches any key (repeat param to OR)","title":"Ignore Comment"},"description":"Narrow to risks whose normalized ignore_comment matches any key (repeat param to OR)"},{"name":"source_family","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow to a coarse source-family bucket: 'Marketing standards' or 'Regulatory' (repeat param to OR)","title":"Source Family"},"description":"Narrow to a coarse source-family bucket: 'Marketing standards' or 'Regulatory' (repeat param to OR)"},{"name":"disclosure","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow to a disclosure / standards-file key parsed from source_clause (repeat param to OR near-dupe cluster members)","title":"Disclosure"},"description":"Narrow to a disclosure / standards-file key parsed from source_clause (repeat param to OR near-dupe cluster members)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRisksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/risks/groups":{"get":{"tags":["internal"],"summary":"Get Marketing Feedback Risk Groups","description":"Synchronous SQL group-by counts over the full filtered feedback week.\n\nSame week / company / team / toggle filters as\n``GET .../feedback/risks``. Aggregation is inline (no Hatchet / LLM) so the\nUI can show ranked category counts on click. ``source_family`` is a cheap\nCASE over ``source_clause`` (Marketing standards vs Regulatory).\n``disclosure`` recovers the standards filename from a structured or legacy\n``source_clause`` prefix.","operationId":"get_marketing_feedback_risk_groups_internal_reliability_marketing_feedback_risks_groups_get","parameters":[{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","description":"ISO week start (Monday) to drill into","title":"Week Start"},"description":"ISO week start (Monday) to drill into"},{"name":"dimension","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeedbackGroupDimension","description":"Group-by dimension: source_clause (default), short_text, ignore_comment, source_family, or disclosure","default":"source_clause"},"description":"Group-by dimension: source_clause (default), short_text, ignore_comment, source_family, or disclosure"},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},{"name":"flagged","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks a reviewer flagged","default":false,"title":"Flagged"},"description":"Only risks a reviewer flagged"},{"name":"outdated","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks superseded by a re-run","default":false,"title":"Outdated"},"description":"Only risks superseded by a re-run"},{"name":"reviewer_added","in":"query","required":false,"schema":{"type":"boolean","description":"Only reviewer-added risks","default":false,"title":"Reviewer Added"},"description":"Only reviewer-added risks"},{"name":"dismissed","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks a reviewer dismissed","default":false,"title":"Dismissed"},"description":"Only risks a reviewer dismissed"},{"name":"over_flagged","in":"query","required":false,"schema":{"type":"boolean","description":"Only dismissals the reviewer marked as an over-flag / false positive (reason incorrect / out_of_scope / already_met)","default":false,"title":"Over Flagged"},"description":"Only dismissals the reviewer marked as an over-flag / false positive (reason incorrect / out_of_scope / already_met)"},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}],"description":"Only dismissals with this exact reviewer-stated reason","title":"Reason"},"description":"Only dismissals with this exact reviewer-stated reason"},{"name":"ignored","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks with an ignore comment","default":false,"title":"Ignored"},"description":"Only risks with an ignore comment"},{"name":"actioned","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks dispositioned (status set or outdated)","default":false,"title":"Actioned"},"description":"Only risks dispositioned (status set or outdated)"},{"name":"not_actioned","in":"query","required":false,"schema":{"type":"boolean","description":"Only risks never dispositioned (no status, not outdated)","default":false,"title":"Not Actioned"},"description":"Only risks never dispositioned (no status, not outdated)"},{"name":"source_clause","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Narrow before aggregating (same semantics as the list endpoint; repeat param to OR)","title":"Source Clause"},"description":"Narrow before aggregating (same semantics as the list endpoint; repeat param to OR)"},{"name":"short_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Short Text"}},{"name":"ignore_comment","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Ignore Comment"}},{"name":"source_family","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Source Family"}},{"name":"disclosure","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Disclosure"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRiskGroupsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/ocr-confidence":{"get":{"tags":["internal"],"summary":"Get Marketing Ocr Confidence","description":"Week-over-week Google Document AI OCR confidence for marketing files.\n\nPoor OCR feeds wrong text to the LLM, which surfaces as bad marketing\nanalyses downstream -- this trend tells us whether OCR quality is improving\nas we tune it. Scoped to marketing collateral; optionally narrowed to a\nsingle company (mirrors the failure view's company drill-down).","operationId":"get_marketing_ocr_confidence_internal_reliability_marketing_ocr_confidence_get","parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":1,"default":12,"title":"Weeks"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingOcrConfidenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/report":{"post":{"tags":["internal"],"summary":"Post Compliance Feedback Report","description":"Enqueue compliance feedback analysis for a company (optional team).\n\nInserts a pending ``admin_compliance_feedback_reports`` row and fires\n``ComplianceFeedbackReportWorkflow`` (Hatchet). Poll\n``GET .../feedback/report/{report_id}`` until completed/failed. Same Claude\nlogic as ``python -m backend.helpers.compliance_feedback_analysis``.","operationId":"post_compliance_feedback_report_internal_reliability_marketing_feedback_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFeedbackReportRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFeedbackReportEnqueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/report/{report_id}":{"get":{"tags":["internal"],"summary":"Get Compliance Feedback Report","description":"Fetch a compliance-feedback report by id (for status polling).","operationId":"get_compliance_feedback_report_internal_reliability_marketing_feedback_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFeedbackReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/reports":{"get":{"tags":["internal"],"summary":"List Compliance Feedback Reports","description":"List recent compliance-feedback reports for a company (newest first).","operationId":"list_compliance_feedback_reports_internal_reliability_marketing_feedback_reports_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceFeedbackReportListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/feedback/report/email":{"post":{"tags":["internal"],"summary":"Email Compliance Feedback Report","description":"Email a generated compliance feedback report to Ashika / Ashi / Cece.\n\nNo Slack integration for this surface — Resend via the frontend email\nroute. Uses ``send_compliance_feedback_report_email`` with raise-on-error\nso the admin UI can surface delivery failures (unlike the best-effort\n``send_email`` helper).","operationId":"email_compliance_feedback_report_internal_reliability_marketing_feedback_report_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailComplianceFeedbackReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/marketing/client-metrics":{"get":{"tags":["internal"],"summary":"Get Marketing Client Metrics","description":"Client metrics digest for a company: one fortnight vs the one before.\n\nThe risk metrics cover four complete ISO weeks ending at `end_week`; the\nin-progress week is never included, since it always under-reads until\nreviewing catches up. Eligible uploads reviewed is reported by month instead\n-- see `_client_metrics_month_spans` for why those months end where the weeks\ndo rather than at the generation date.\n\n`team_ids` scopes the whole document. Every figure then covers those teams\ntogether, and from two teams up the document also carries a per-team drilldown\nof each of them -- summed from the same query rows as the totals, so the parts\nadd up to the whole by construction.","operationId":"get_marketing_client_metrics_internal_reliability_marketing_client_metrics_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"team_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Marketing teams to scope the digest to, repeated. Omit the parameter entirely for the whole company -- an empty value is a malformed uuid, not company-wide. The whole company is not the same as naming every team: collateral belonging to no team, and a risk raised on a file that is not marketing collateral, are only counted when no team is named. Two or more teams add a per-team drilldown of every headline metric. At most 12.","title":"Team Ids"},"description":"Marketing teams to scope the digest to, repeated. Omit the parameter entirely for the whole company -- an empty value is a malformed uuid, not company-wide. The whole company is not the same as naming every team: collateral belonging to no team, and a risk raised on a file that is not marketing collateral, are only counted when no team is named. Two or more teams add a per-team drilldown of every headline metric. At most 12."},{"name":"end_week","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Monday of the last week to include. Defaults to the most recent complete week; a mid-week date snaps back to its Monday.","title":"End Week"},"description":"Monday of the last week to include. Defaults to the most recent complete week; a mid-week date snaps back to its Monday."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientMetricsReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reviews":{"get":{"tags":["internal"],"summary":"Get Reviews For Company","description":"List reviews for an admin-chosen company, for the report-runner picker.","operationId":"get_reviews_for_company_internal_reviews_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalReviewListItem"},"title":"Response Get Reviews For Company Internal Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reports/review":{"post":{"tags":["internal"],"summary":"Create Admin Review Report","description":"Trigger a one-off reporting agent run against any existing review (including\ncompleted ones) using a template uploaded on the spot.\n\nUnlike the customer-facing `/reports/review`, this never touches the target\ncompany's `Files` table: the template and the generated DOCX/PDF live only in\nthis agent run's own S3 directory (`{company_id}/{agent_run_id}/...`).\n\n`config_variant` lets an admin try a `ReviewReportConfig` experiment (see\n`backend/analyses/reporting/review.py`) against a real review without risking\na customer-facing run — every other trigger path is hardcoded to STABLE\n(`ReviewReportAgent.execute`).","operationId":"create_admin_review_report_internal_reports_review_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_admin_review_report_internal_reports_review_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateReviewReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reports/review/{agent_run_id}/status":{"get":{"tags":["internal"],"summary":"Get Admin Review Report Status","operationId":"get_admin_review_report_status_internal_reports_review__agent_run_id__status_get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReviewReportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/companies":{"get":{"tags":["internal"],"summary":"List Companies","description":"Companies a comparison could be run for, by name.\n\nOffered on either of two grounds, and the option carries both so the surface can tell them apart:\na company with a decomposed **library**, or one with marketing standards **attached to a live\nproduct line**. The second used to be excluded on the argument that a company without a library\nhas nothing to narrow — true, but it made the dashboard unreachable for exactly the companies it\nis meant to be pointed at, because a library has to be built through this surface before it\nexists. `/preparation` builds it, so having something to decompose is now a reason to be listed.\n\nKobalt Labs' own company is excluded by default, the way every other internal drill-down\nexcludes it, but `include_kobalt` opts it back in — unlike those drill-downs this one is not\nreporting on customers, and Kobalt's tenant is where a library gets seeded to try the dashboard\nat all. `start_run` never had the exclusion, so the picker matches what the API already accepted.","operationId":"list_companies_internal_evals_requirement_applicability_companies_get","parameters":[{"name":"include_kobalt","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Kobalt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyOption"},"title":"Response List Companies Internal Evals Requirement Applicability Companies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/preparation":{"get":{"tags":["internal"],"summary":"Get Preparation","description":"Whether this collateral's guidelines have libraries yet, before a comparison is started.","operationId":"get_preparation_internal_evals_requirement_applicability_preparation_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"file_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollateralPreparation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Start Preparation","description":"Decompose the guidelines this collateral needs and that nothing has decomposed yet.\n\nDelegates to the customer route's own handler rather than restating it: that function owns a\nsavepoint per guideline, stale-run reaping, the \"a newer version is still processing\" refusal, the\nper-request batch cap and the dispatch-failure rollback — none of which is worth a second\nimplementation, and all of which a second one would drift from. `backend/api/internal/runs.py`\nreuses `backend/api/runs.py` the same way.\n\n**A guideline with a standing library is never touched.** Keyed on the library a run would gather\nfrom, not on the newest attempt: a decomposition supersedes every requirement it replaces, so\nre-running one over a library a compliance reviewer has edited retires their work. A failed retry\nabove a good library is therefore left alone — the library is what the comparison reads, and the\nretry's failure costs the run nothing.\n\n`file_ids` narrows it further, because a company's standards are not all worth decomposing: a\n70-page deposit account agreement filed as a marketing standard will yield contract clauses as\nmarketing requirements, and the operator can see the filenames before spending a pass on each.","operationId":"start_preparation_internal_evals_requirement_applicability_preparation_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareCollateralRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollateralPreparation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/collateral":{"get":{"tags":["internal"],"summary":"List Collateral","description":"This company's marketing collateral, most recently analysed first.\n\n`has_production_run` is computed here rather than left to the operator to discover after a\nminutes-long run: the comparison half of this dashboard is empty without one.","operationId":"list_collateral_internal_evals_requirement_applicability_collateral_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollateralOption"},"title":"Response List Collateral Internal Evals Requirement Applicability Collateral Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/runs":{"post":{"tags":["internal"],"summary":"Start Run","description":"Queue a comparison for one piece of collateral.\n\nRefuses up front rather than producing an empty run: with no product lines there are no\nguidelines to gather from, and the answer \"0 of 0 survived\" is indistinguishable from a working\nrun against a company with no library.","operationId":"start_run_internal_evals_requirement_applicability_runs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartApplicabilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartApplicabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal"],"summary":"List Runs","operationId":"list_runs_internal_evals_requirement_applicability_runs_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"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":{"type":"array","items":{"$ref":"#/components/schemas/ApplicabilityRunSummary"},"title":"Response List Runs Internal Evals Requirement Applicability Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/runs/{applicability_run_id}":{"get":{"tags":["internal"],"summary":"Get Run","operationId":"get_run_internal_evals_requirement_applicability_runs__applicability_run_id__get","parameters":[{"name":"applicability_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicability Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicabilityRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/runs/{applicability_run_id}/risks/{applicability_risk_id}/match":{"post":{"tags":["internal"],"summary":"Match Risk","description":"Record what a reviewer makes of one produced risk.\n\nThe *label* the surface shows — matches a flag, matches a dismissal, net-new — is not stored.\nWhat is stored is the pointer, plus a snapshot of the matched risk's summary and verdict; every\nreader resolves the label through `live_matched_verdicts`, so re-reviewing that production risk\nmoves this judgment with it rather than leaving the two disagreeing on one screen. The snapshot\nis what is left when the matched row is deleted with its file, and only then is it displayed.","operationId":"match_risk_internal_evals_requirement_applicability_runs__applicability_run_id__risks__applicability_risk_id__match_post","parameters":[{"name":"applicability_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicability Run Id"}},{"name":"applicability_risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicability Risk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchRiskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProducedRiskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirement-applicability/runs/{applicability_run_id}/comparison.csv":{"get":{"tags":["internal"],"summary":"Export Comparison","description":"One row per produced risk, with the rule it came from and the reviewer's judgment.\n\nKeyed under Kobalt Labs' own company in S3 rather than the company under study: this is an\ninternal artifact and it does not belong in a customer's export listing. The trade is that the\nrows carry that customer's guideline wording and their reviewers' notes while sitting outside\nany prefix keyed to them, so the file names the company in every row — nothing else would.","operationId":"export_comparison_internal_evals_requirement_applicability_runs__applicability_run_id__comparison_csv_get","parameters":[{"name":"applicability_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Applicability Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Comparison Internal Evals Requirement Applicability Runs  Applicability Run Id  Comparison Csv Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirements-extraction/upload":{"post":{"tags":["internal"],"summary":"Upload And Run Requirements Extraction","description":"Upload a guideline PDF and bench the extraction over it.\n\nReturns as soon as the upload exists and the run is registered; extraction takes tens of\nseconds, so it continues in the background and the run's `status` reports where it is.\n\n`document_type` types the stored file, and defaults from the profile: marketing standards for\n`marketing`, `GENERIC_POLICY` otherwise. Pass it explicitly when you know what the document is\n— the regulatory default is deliberately unopinionated about content, and `GENERIC_POLICY` is\none of the types `is_guideline_document` refuses, so re-benching that upload from the CLI needs\n`--allow-any-doc-type`. A document typed specifically does not.\n\nThe run itself is not subject to that guard: the document was uploaded expressly to be benched.","operationId":"upload_and_run_requirements_extraction_internal_evals_requirements_extraction_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_and_run_requirements_extraction_internal_evals_requirements_extraction_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAndRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirements-extraction/documents":{"get":{"tags":["internal"],"summary":"List Benchable Documents","description":"Guideline documents already in the platform, so a run can be started without uploading.\n\nDeliberately **not** scoped to the caller's company: tuning a prompt means running it over the\nguideline documents that exist, whoever they belong to. That is only acceptable because this\nrouter is not mounted outside `DEVELOPMENT` — see `backend/api/internal/__init__.py`.\n\nRestricted in SQL to the types `is_guideline_document` accepts, because the alternative is a\nlist where `limit` is spent on vendor contracts that happen to sort first and the guideline\ndocuments never appear. A guideline stored under a type that hides it here is still benchable\nby uploading it.\n\nNo text search, deliberately. The picker is a Tremor `SearchSelect`, which always filters its own\nchildren client-side with a literal substring test on the rendered label; a server-side `ILIKE`\non top of that is a second filter with different rules, and the two disagreed on any query with\nedge whitespace or a `LIKE` metacharacter — the server matched rows the client then hid, showing\nno dropdown and no reason. The whole (bounded) list goes to the client and it filters once.","operationId":"list_benchable_documents_internal_evals_requirements_extraction_documents_get","parameters":[{"name":"marketing_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only documents whose type is a marketing one.","default":false,"title":"Marketing Only"},"description":"Only documents whose type is a marketing one."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BenchableDocument"},"title":"Response List Benchable Documents Internal Evals Requirements Extraction Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirements-extraction/run":{"post":{"tags":["internal"],"summary":"Run Existing Document","description":"Bench a document already in the platform, without uploading a copy of it.\n\nThe guideline guard is not applied: a document picked by upload id was picked deliberately,\nand refusing it here would only mean re-uploading the same bytes to get past the check.","operationId":"run_existing_document_internal_evals_requirements_extraction_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunExistingDocumentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAndRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirements-extraction/runs":{"get":{"tags":["internal"],"summary":"List Requirements Extraction Runs","description":"Stored bench runs, most recent first, for the run selector.","operationId":"list_requirements_extraction_runs_internal_evals_requirements_extraction_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Requirements Extraction Runs Internal Evals Requirements Extraction Runs Get"}}}}}}},"/internal/evals/requirements-extraction":{"get":{"tags":["internal"],"summary":"Get Requirements Extraction Run","description":"One run's cases, without grounding — the case selector, and cheap enough to load eagerly.","operationId":"get_requirements_extraction_run_internal_evals_requirements_extraction_get","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Defaults to the most recent run.","title":"Run Id"},"description":"Defaults to the most recent run."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/requirements-extraction/case":{"get":{"tags":["internal"],"summary":"Get Requirements Extraction Case","description":"One case's requirements, each with the paragraph it appears to have come from.\n\nThe source PDF is downloaded once for the whole case rather than once per requirement, and\ngrounding is computed here rather than in the browser because it needs the page geometry.","operationId":"get_requirements_extraction_case_internal_evals_requirements_extraction_case_get","parameters":[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"case_id","in":"query","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewerCase"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/risk-labeling/queue":{"get":{"tags":["internal"],"summary":"Get Dismissed Risk Label Queue","description":"Unlabeled dismissed marketing risks, most recently dismissed first.\n\nA batch rather than a single row so the client can prefetch the next\ndocument and step backwards without a round trip. Already-labeled risks are\nexcluded, so two people working the queue only collide on the row they are\nboth holding — which the create route resolves with a 409.\n\n``exclude_risk_ids`` is what makes skipping work. A skip writes nothing, so\nthe row stays eligible and every later request would return it again — a\nlabeler who skipped a whole batch would cycle those rows forever and never\nreach the rest of the backlog. The caller therefore has to say what it has\nalready passed over. Bounded by ``MAX_EXCLUDED_RISK_IDS`` because it travels\nin the URL; past that the client drops its oldest entries, so a session with\nmore skips than the cap may be offered its earliest ones again.","operationId":"get_dismissed_risk_label_queue_internal_risk_labeling_queue_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict to one company; omit for every company","title":"Company Id"},"description":"Restrict to one company; omit for every company"},{"name":"exclude_risk_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Risks the caller has passed over this session; repeat the param per id. Skipping labels nothing, so without this the next batch is the same batch.","title":"Exclude Risk Ids"},"description":"Risks the caller has passed over this session; repeat the param per id. Skipping labels nothing, so without this the next batch is the same batch."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DismissedRiskToLabel"},"title":"Response Get Dismissed Risk Label Queue Internal Risk Labeling Queue Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/risk-labeling/stats":{"get":{"tags":["internal"],"summary":"Get Dismissed Risk Label Stats","description":"Progress counters behind the labeling surface.","operationId":"get_dismissed_risk_label_stats_internal_risk_labeling_stats_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissedRiskLabelStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/risk-labeling/labels":{"get":{"tags":["internal"],"summary":"List Dismissed Risk Labels","description":"Stored labels joined to their risks — the eval set, newest label first.\n\nScoped by company only, deliberately wider than the queue: a risk's\ndisposition can move after it is labeled (a re-run obsoletes it, a new rule\nsuppresses it), and narrowing this the same way would hide the row from the\none surface that offers to remove its label. So ``total`` here can exceed the\nprogress card's ``labeled``, which counts only what is still queue-eligible.","operationId":"list_dismissed_risk_labels_internal_risk_labeling_labels_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissalLabelCategory"},{"type":"null"}],"title":"Category"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissedRiskLabelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/risk-labeling/labels/{risk_id}":{"post":{"tags":["internal"],"summary":"Create Dismissed Risk Label","description":"Label one dismissed risk. 409 when it was already labeled.\n\nThe conflict comes from the UNIQUE constraint, not a preceding SELECT: two\nlabelers submitting the same row would both pass a pre-check and one would\nsilently overwrite the other.","operationId":"create_dismissed_risk_label_internal_risk_labeling_labels__risk_id__post","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissedRiskLabelRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Delete Dismissed Risk Label","description":"Remove a label, returning the risk to the queue.\n\nThe only correction path, and deliberately the only one: relabeling goes back\nthrough the queue with the document on screen, rather than editing a category\nfrom a table row where there is nothing to check the new verdict against.\nAlso what backs undo, so a mis-keyed verdict never lands in the eval set.","operationId":"delete_dismissed_risk_label_internal_risk_labeling_labels__risk_id__delete","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/companies":{"get":{"tags":["internal"],"summary":"List Companies","description":"Companies with marketing collateral in the last fortnight.\n\nRollout membership rides on every row rather than filtering the list: enrolment is not a\nprecondition for sweeping — `force_requirement_risks` puts the trial runs on the requirement\npath either way — but the operator has to see whether the company's *own* analyses are already\nthere.\n\nThe count is what `gather_cohort` would call the window total, not a looser one. See the filter\nbelow for why the two agreeing matters.","operationId":"list_companies_internal_evals_rollout_consistency_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SweepCompanyOption"},"type":"array","title":"Response List Companies Internal Evals Rollout Consistency Companies Get"}}}}}}},"/internal/evals/rollout-consistency/candidates":{"get":{"tags":["internal"],"summary":"List Candidates","description":"The collateral an operator can pick from, newest first.\n\nDeliberately *not* `gather_cohort`: that answers \"what would a window sweep do\", which is a\ndifferent question from \"what could I choose\". This one reaches further back than any sweep\nwould, reports review coverage per piece, and leaves the cap to the sweep itself.\n\n`reviewed_only` defaults on because an unreviewed cohort silently answers half the question —\nconsistency is measurable without reviewers, recall is not.","operationId":"list_candidates_internal_evals_rollout_consistency_candidates_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Window Days"}},{"name":"reviewed_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Reviewed Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SweepCandidate"},"title":"Response List Candidates Internal Evals Rollout Consistency Candidates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/preview":{"get":{"tags":["internal"],"summary":"Preview Sweep","description":"What a sweep would do, without starting one.\n\nRuns the sweep's own `gather_cohort` rather than an approximation of it: a preview that\ndisagreed with what the sweep gathers would be worse than none, and this is the number an\noperator is agreeing to when they press the button.","operationId":"preview_sweep_internal_evals_rollout_consistency_preview_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":14,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps":{"post":{"tags":["internal"],"summary":"Start Sweep","description":"Queue a sweep.","operationId":"start_sweep_internal_evals_rollout_consistency_sweeps_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSweepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSweepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal"],"summary":"List Sweeps","operationId":"list_sweeps_internal_evals_rollout_consistency_sweeps_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SweepSummary"},"title":"Response List Sweeps Internal Evals Rollout Consistency Sweeps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/abandon":{"post":{"tags":["internal"],"summary":"Abandon Sweep","description":"Stop a sweep and release the company, without waiting out Hatchet's timeouts.\n\nThe recovery path for a sweep whose worker was evicted: the row says RUNNING, nothing will move\nit, and `reap_stale_sweeps` does not touch it for nine hours — during which the company cannot\nbe swept, because the row it would clear is the one blocking the start that would clear it.","operationId":"abandon_sweep_internal_evals_rollout_consistency_sweeps__sweep_id__abandon_post","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}":{"get":{"tags":["internal"],"summary":"Get Sweep","operationId":"get_sweep_internal_evals_rollout_consistency_sweeps__sweep_id__get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/drift":{"get":{"tags":["internal"],"summary":"List Drift","description":"The individual disagreements behind the worklist.\n\nSeparate from the detail response rather than embedded in it: a sweep over a fortnight against a\nlarge library can produce thousands of drift rows, and the dashboard opens on the ranked rules —\nthe rows behind one rule are fetched when a reader opens it.","operationId":"list_drift_internal_evals_rollout_consistency_sweeps__sweep_id__drift_get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}},{"name":"requirement_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requirement Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DriftKind"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DriftRow"},"title":"Response List Drift Internal Evals Rollout Consistency Sweeps  Sweep Id  Drift Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/requirements/state":{"post":{"tags":["internal"],"summary":"Set Requirements State","description":"Enable, switch off, or remove several requirements at once.\n\n**Removal is archival.** `ARCHIVED` keeps the requirement and every version of it readable,\nwhich is the whole point on regulated compliance material — there is no hard delete here and\nadding one would break the audit trail the library exists to keep.\n\nEvery requested id gets an outcome row whether it changed or not, and one requirement's refusal\nnever fails the batch. The three refusals are the single-requirement route's own rules, applied\nper item rather than restated: a removed requirement can only be put back (writing a lesser\nstate over an archive silently downgrades a human decision), a state change that changes nothing\nis refused rather than recorded (it would invent history), and an id outside this company is\nsimply not found.\n\nEach requirement gets its own savepoint, so an unexpected failure on one leaves its siblings\napplied — the `start_decompositions` shape, for the same reason.","operationId":"set_requirements_state_internal_evals_rollout_consistency_sweeps__sweep_id__requirements_state_post","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/requirements/{requirement_id}":{"get":{"tags":["internal"],"summary":"Debug Requirement","description":"One requirement, as the thing to be judged rather than a row in a ranking.\n\nThree questions in one response, because answering them separately is what makes a reader\nguess: what does this rule say now, where in the standard did it come from, and what has it\nactually done to real collateral.","operationId":"debug_requirement_internal_evals_rollout_consistency_sweeps__sweep_id__requirements__requirement_id__get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementDebug"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/regressions/{regression_id}":{"get":{"tags":["internal"],"summary":"Compare Regression Row","description":"One baseline risk beside what the new path produced for it.\n\nBoth sides are resolved **live** from `document_risks` rather than read from the snapshot on the\nregression row. The snapshot is what the sweep saw; a reader opening this panel wants the risk\nas it stands, including any review that has happened since. The stored verdict rides along\nunchanged so the two can be compared rather than silently reconciled.","operationId":"compare_regression_row_internal_evals_rollout_consistency_sweeps__sweep_id__regressions__regression_id__get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}},{"name":"regression_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Regression Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegressionComparison"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/reviews":{"get":{"tags":["internal"],"summary":"List Reviews","description":"Staff marks on this sweep, for polling while operators go through the worklist together.\n\nSeparate from the detail response: a finished sweep's figures never change, but the marks do,\nand re-fetching the worklist every few seconds to learn who ticked a row would be the wrong\npayload for that question.","operationId":"list_reviews_internal_evals_rollout_consistency_sweeps__sweep_id__reviews_get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewMark"},"title":"Response List Reviews Internal Evals Rollout Consistency Sweeps  Sweep Id  Reviews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Set Review","description":"Mark a worklist row as reviewed, or clear the mark.\n\nFirst writer wins: a concurrent mark for the same row returns the existing one rather than\noverwriting who reviewed it. Clearing deletes the row — this is staff bookkeeping, not a\ncustomer record, so there is nothing to retain.","operationId":"set_review_internal_evals_rollout_consistency_sweeps__sweep_id__reviews_post","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewMarkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewMark"},{"type":"null"}],"title":"Response Set Review Internal Evals Rollout Consistency Sweeps  Sweep Id  Reviews Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/runs/{run_id}":{"get":{"tags":["internal"],"summary":"Get Sweep Run","description":"One run that belongs to this sweep, unscoped, for the side-by-side modal.\n\n404 unless `item_id` is an item of this sweep that named the run — the same id on another\ncompany's history, or a sibling item that reused the run for a different file, is not this\nclick's business. Findings come back with citation boxes so the PDF pane can highlight them.\nOnly this collateral's findings: a run can carry more than one upload, and boxes on another\nfile are coordinates in different bytes. Suppressed and obsolete risks are omitted — matching\nthe customer surface — and `suppressed_by_rule_id` is not in the payload, because this modal\nhas no suppression UI.\n\n**This is the whole analysis, not a summary of it.** The modal draws the product's own risk\ncards, requirement citations and all, so everything they render is served here rather than\nfetched from the customer routes: those answer for the caller's company, and staff comparing\ntwo runs of a tenant's collateral are not in it. One request per pane, no masquerade.","operationId":"get_sweep_run_internal_evals_rollout_consistency_sweeps__sweep_id__runs__run_id__get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"item_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepRunSnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/rollout-consistency/sweeps/{sweep_id}/guidelines/{file_id}":{"get":{"tags":["internal"],"summary":"Get Sweep Guideline","description":"The standards document a worklist rule came from, with its live obligations.\n\n404 unless this file has requirements for the *swept* company — an unscoped read that took\nthe caller's word for a file_id would let one company's dashboard open another's library.\nLive revisions only, including ones already switched off, so the modal can say a rule is Off.\nSuperseded (a newer generation retired it) is excluded: act on the current generation instead.","operationId":"get_sweep_guideline_internal_evals_rollout_consistency_sweeps__sweep_id__guidelines__file_id__get","parameters":[{"name":"sweep_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sweep Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"focus_requirement_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Focus Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepGuidelineDocument"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/agent-runs/paged":{"get":{"tags":["internal"],"summary":"Get Paged Agent Runs","description":"Paginated agent runs for the admin agent runs dashboard.\n\nThe window is the absolute half-open interval `[from_time, to_time)`. The\ndashboard sends the UTC instants for the edges of the operator's *local*\ncalendar days, so filtering to one past day means that day in their\ntimezone -- the boundaries cannot be inferred from a bare date here.\nA naive value is read as UTC.\n\nAn omitted or empty `agent_types` / `status` / `company_ids` means every\nvalue on that axis.\n\nThe `/runs` endpoints below still take `from_date`/`to_date` date strings,\nand so still carry the UTC-offset skew this signature removes; they back a\ndifferent dashboard and were left on the old contract deliberately.","operationId":"get_paged_agent_runs_internal_agent_runs_paged_get","parameters":[{"name":"from_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From Time"}},{"name":"to_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"To Time"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}},{"name":"agent_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AgentType"}},{"type":"null"}],"title":"Agent Types"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AgentRunStatus"}},{"type":"null"}],"title":"Status"}},{"name":"company_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Company Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPagedAgentRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/get-agent-conversation/{agent_run_id}":{"get":{"tags":["internal"],"summary":"Get Agent Conversation","description":"Fetch an agent run's conversation JSON, step groups, and a file listing.","operationId":"get_agent_conversation_internal_get_agent_conversation__agent_run_id__get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/runs/paged":{"get":{"tags":["internal"],"summary":"Get Paged Runs","description":"Get paginated runs across companies for admin dashboard.\nFilters by date range and optionally by company_ids and run_type.","operationId":"get_paged_runs_internal_runs_paged_get","parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}},{"name":"company_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Company Ids"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RunType"},{"type":"null"}],"title":"Run Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/runs/analytics":{"get":{"tags":["internal"],"summary":"Get Runs Analytics","description":"Get analytics data for runs across companies.\nReturns aggregated data for daily runs, company runs, and run types.","operationId":"get_runs_analytics_internal_runs_analytics_get","parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","title":"To Date"}},{"name":"company_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Company Ids"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RunType"},{"type":"null"}],"title":"Run Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/runs/{run_id}/rerun":{"post":{"tags":["internal"],"summary":"Rerun Analysis","description":"Re-run a marketing analysis with the same parameters as the original run.","operationId":"rerun_analysis_internal_runs__run_id__rerun_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/runs/{run_id}/results":{"get":{"tags":["internal"],"summary":"Get Run Results","description":"Get all document risks for a run as JSON. Only available for marketing and base analysis runs.","operationId":"get_run_results_internal_runs__run_id__results_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/saml/config":{"post":{"tags":["internal"],"summary":"Configure Saml","description":"Configure SAML for a company after metadata has been uploaded to BoxyHQ.","operationId":"configure_saml_internal_saml_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureSAMLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/saml/upload-metadata":{"post":{"tags":["internal"],"summary":"Upload Saml Metadata","description":"Upload SAML metadata to BoxyHQ and return client credentials.","operationId":"upload_saml_metadata_internal_saml_upload_metadata_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSAMLMetadataRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/saml/providers":{"get":{"tags":["internal"],"summary":"List Saml Providers","description":"List configured SAML providers for a company.","operationId":"list_saml_providers_internal_saml_providers_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"company_domain","in":"query","required":true,"schema":{"type":"string","description":"Domain to use when identifying the SAML tenant","title":"Company Domain"},"description":"Domain to use when identifying the SAML tenant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/saml/debug":{"get":{"tags":["internal"],"summary":"Debug Saml Config","description":"Debug SAML configuration by checking SuperTokens tenant info.","operationId":"debug_saml_config_internal_saml_debug_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"company_domain","in":"query","required":true,"schema":{"type":"string","description":"Domain to use when identifying the SAML tenant","title":"Company Domain"},"description":"Domain to use when identifying the SAML tenant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/documents":{"get":{"tags":["internal","internal-standards-extraction"],"summary":"List Standards","description":"Every marketing standard this company has, with the state of its requirement library.","operationId":"list_standards_internal_evals_standards_documents_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GuidelineSummary"},"title":"Response List Standards Internal Evals Standards Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/teams":{"get":{"tags":["internal","internal-standards-extraction"],"summary":"List Teams","description":"The teams a requirement can be scoped to — every team this company has.","operationId":"list_teams_internal_evals_standards_teams_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketingTeamOption"},"title":"Response List Teams Internal Evals Standards Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/documents/{file_id}":{"get":{"tags":["internal","internal-standards-extraction"],"summary":"Get Standard","description":"One standard's requirements, in the order they were extracted.\n\nPolled by the detail view while a decomposition runs, which is exactly when the previous library\nis still the one on screen.\n\nCarries the bulk ceiling the customer library publishes on its requirement *list* route, which\nthis console does not use — see `StaffStandardDetailResponse`.","operationId":"get_standard_internal_evals_standards_documents__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GuidelineRequirementState"}},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffStandardDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/requirements/{requirement_id}/history":{"get":{"tags":["internal","internal-standards-extraction"],"summary":"Get Requirement History","description":"Every version of this requirement, newest first.","operationId":"get_requirement_history_internal_evals_standards_requirements__requirement_id__history_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementRevisionResponse"},"title":"Response Get Requirement History Internal Evals Standards Requirements  Requirement Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/decompositions":{"post":{"tags":["internal","internal-standards-extraction"],"summary":"Start Decompositions","description":"Read one or more of this company's standards into requirements.\n\nThe named-set / `without_requirements` / `stale` scoping, the per-guideline savepoints and the\nskip reasons are all the customer handler's — see it for why the derived sets are computed as the\nrequest lands rather than taken from the client.","operationId":"start_decompositions_internal_evals_standards_decompositions_post","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDecompositionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDecompositionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/requirements/{requirement_id}":{"patch":{"tags":["internal","internal-standards-extraction"],"summary":"Update Requirement","description":"Change a requirement's wording, guidance, scope or trigger terms as a new revision.\n\nAttributed to the staff member who made it, which is the point of the console: the history says\nKobalt corrected this, not that the customer did.","operationId":"update_requirement_internal_evals_standards_requirements__requirement_id__patch","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/requirements/{requirement_id}/state":{"post":{"tags":["internal","internal-standards-extraction"],"summary":"Set Requirement State","description":"Turn one requirement off, remove it, or put it back.","operationId":"set_requirement_state_internal_evals_standards_requirements__requirement_id__state_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRequirementStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/requirements/state":{"post":{"tags":["internal","internal-standards-extraction"],"summary":"Set Requirements State Bulk","description":"Turn several requirements off, remove them, or put them back, in one press.","operationId":"set_requirements_state_bulk_internal_evals_standards_requirements_state_post","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSetRequirementStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequirementStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/evals/standards/requirements/collateral-types":{"post":{"tags":["internal","internal-standards-extraction"],"summary":"Set Requirements Collateral Types Bulk","description":"Re-scope several requirements to the collateral types they apply to, in one press.\n\nThe one handler on this router that is not a delegation, because the customer library has no such\nroute: a mis-scoped extraction is a staff problem, discovered while reading a standard beside its\nrequirements, and forty rows scoped to every collateral type is one decision rather than forty.\n\nEach requirement gets a new revision, exactly as the single-row editor writes one, so the history\nreads the same whether forty rows were corrected together or one at a time. Nothing is\noverwritten and no state changes: an off requirement stays off, re-scoped.\n\nA removed or superseded requirement is skipped with a reason rather than edited — that would\nwrite a live revision of a requirement which is not in the library, the one way an archived rule\ncomes back without anybody putting it back.\n\nThe per-item savepoint discipline is `set_requirements_state_bulk`'s, for the same reasons — see\nthe long note there: one savepoint per requirement (a lock timeout inside the driver leaves the\ntransaction ABORTED, and a later `commit()` would then be a silent ROLLBACK reported as success),\na lost race reported per item at HTTP 200, and a commit failure that means nothing was written\nanswered as a 409.","operationId":"set_requirements_collateral_types_bulk_internal_evals_standards_requirements_collateral_types_post","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The company whose library to operate on.","title":"Company Id"},"description":"The company whose library to operate on."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSetCollateralTypesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequirementEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/teams/company-users":{"get":{"tags":["internal"],"summary":"List Company Users","description":"List a company's active users (admin), for the member picker.","operationId":"list_company_users_internal_teams_company_users_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyUser-Output"},"title":"Response List Company Users Internal Teams Company Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/teams":{"get":{"tags":["internal"],"summary":"List Teams","description":"List a company's teams with their active members (admin).","operationId":"list_teams_internal_teams_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamResponse"},"title":"Response List Teams Internal Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal"],"summary":"Create Team","description":"Create a team for a company (admin).","operationId":"create_team_internal_teams_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/teams/{team_id}":{"patch":{"tags":["internal"],"summary":"Rename Team","description":"Rename a team (admin).","operationId":"rename_team_internal_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Delete Team","description":"Delete a team (admin). Memberships are removed via CASCADE.","operationId":"delete_team_internal_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/teams/{team_id}/members":{"put":{"tags":["internal"],"summary":"Set Team Members","description":"Replace a team's membership with the given set of company users (admin).","operationId":"set_team_members_internal_teams__team_id__members_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__api__internal__teams__TeamMembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/reliability/tprm/reviews":{"get":{"tags":["internal"],"summary":"Get Tprm Reliability","operationId":"get_tprm_reliability_internal_reliability_tprm_reviews_get","parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":1,"default":12,"title":"Weeks"}},{"name":"stall_days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":14,"title":"Stall Days"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TprmReliabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/files":{"get":{"tags":["internal"],"summary":"Get Files For Company","operationId":"get_files_for_company_internal_files_get","parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Files"},"title":"Response Get Files For Company Internal Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/lookup/{lookup_uuid}":{"get":{"tags":["internal"],"summary":"Lookup Uuid","description":"Lookup a UUID across common database tables and return the matching record.","operationId":"lookup_uuid_internal_lookup__lookup_uuid__get","parameters":[{"name":"lookup_uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lookup Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lookup Uuid Internal Lookup  Lookup Uuid  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/custom-fields-typestub":{"get":{"tags":["internal"],"summary":"Get Custom Fields Typestub","description":"Get the cached type stub for custom fields (both vendor and service).","operationId":"get_custom_fields_typestub_internal_custom_fields_typestub_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/marketing-analytics":{"get":{"tags":["marketing-analytics"],"summary":"Get Marketing Analytics","description":"Get marketing analytics data including document counts, risk metrics, and flag statistics.\nAll calculations are done in the backend based on existing data.","operationId":"get_marketing_analytics_marketing_analytics_get","parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date in YYYY-MM-DD format","title":"Start Date"},"description":"Start date in YYYY-MM-DD format"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date in YYYY-MM-DD format","title":"End Date"},"description":"End date in YYYY-MM-DD format"},{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"collateral_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}],"description":"Filter by collateral type","title":"Collateral Type"},"description":"Filter by collateral type"},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by marketing team","title":"Marketing Team Id"},"description":"Filter by marketing team"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-analytics/uploaders/{user_id}":{"get":{"tags":["marketing-analytics"],"summary":"Get Uploader Detail","description":"An uploader's upload-history (Activity) and flagged findings, scoped\nidentically to the aggregate dashboard.","operationId":"get_uploader_detail_marketing_analytics_uploaders__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"collateral_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}],"title":"Collateral Type"}},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploaderDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-analytics/reviewers/{user_id}":{"get":{"tags":["marketing-analytics"],"summary":"Get Reviewer Detail","description":"A reviewer's recently-reviewed collateral with per-file flagged/allowed/\ndismissed counts. Attribution is by assignment (see module docstring).","operationId":"get_reviewer_detail_marketing_analytics_reviewers__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date YYYY-MM-DD","title":"Start Date"},"description":"Start date YYYY-MM-DD"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD"},{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"collateral_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}],"title":"Collateral Type"}},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/types":{"get":{"tags":["marketing-collateral"],"summary":"List Collateral Type Definitions","description":"Every collateral type with its generic, customer-agnostic definition.","operationId":"list_collateral_type_definitions_marketing_collateral_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CollateralTypeInfo"},"type":"array","title":"Response List Collateral Type Definitions Marketing Collateral Types Get"}}}}}}},"/marketing/collateral/upload":{"post":{"tags":["marketing-collateral"],"summary":"Upload Marketing Collateral","description":"Upload marketing collateral files.\n\nCreates Files + FileVersions + MarketingCollateral rows atomically.\n\nEvery file must carry a collateral type, matching the Figma and Google\nendpoints. An untyped asset has no channel, and a rule with an explicit\n`collateral_types` scope never applies to one, so every standard is\nenforced against it at once.\n\nvendor_id selects which company on the marketing page the collateral belongs\nto — the self company, a partner, or a fintech prospect are screenable.\nDefaults to the self vendor.","operationId":"upload_marketing_collateral_marketing_collateral_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_marketing_collateral_marketing_collateral_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/version":{"post":{"tags":["marketing-collateral"],"summary":"Upload Collateral Version","description":"Upload a new version of a marketing collateral file.\n\nThe security boundary for versioning: `file_id` is chosen client-side, so\nthis authorizes on the same predicate that decided what to suggest, and an\nout-of-scope file is a 404, not a 403 — no probing for other scopes.","operationId":"upload_collateral_version_marketing_collateral_version_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_collateral_version_marketing_collateral_version_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/version-matches":{"post":{"tags":["marketing-collateral"],"summary":"Find Collateral Version Matches","description":"Existing collateral that the about-to-be-uploaded files look like\nversions of. Read-only; scoping here is a UX filter — `POST /version` is\nwhat enforces the boundary.","operationId":"find_collateral_version_matches_marketing_collateral_version_matches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollateralVersionMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollateralVersionMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/{file_id}/collateral-type":{"patch":{"tags":["marketing-collateral"],"summary":"Update File Collateral Type","description":"Update the collateral type for a marketing file","operationId":"update_file_collateral_type_marketing_collateral__file_id__collateral_type_patch","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollateralTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/{file_id}/analysis-history":{"get":{"tags":["marketing-collateral"],"summary":"Get Collateral Analysis History","description":"Marketing analysis history for a single collateral file.","operationId":"get_collateral_analysis_history_marketing_collateral__file_id__analysis_history_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/collateral/{file_id}/citation-images":{"get":{"tags":["marketing-collateral"],"summary":"Get Collateral Citation Images","description":"Pictures of the regions of this collateral that the named risks cite.\n\nBatched over risk ids the way ``/files/preview-image-urls`` is over upload ids,\nand for the same reason: the caller is a single export that wants every crop at\nonce. Risks that resolve to no picture — no grounded citation, a page the\ndocument does not have, a rendition that is not in S3 — are left out of the\nmapping, so the caller maps back over the ids it asked for.\n\nRisks are grouped by the upload they were flagged on and each group is cropped\nfrom its own rendition. Within a group they are honoured in the order asked;\nacross groups the current version comes first, because that is where a risk the\nreviewer is still looking at lives.","operationId":"get_collateral_citation_images_marketing_collateral__file_id__citation_images_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"risk_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":40,"title":"Risk Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CollateralCitationImage"},"propertyNames":{"format":"uuid"},"title":"Response Get Collateral Citation Images Marketing Collateral  File Id  Citation Images Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/documents":{"get":{"tags":["marketing-guidelines"],"summary":"List Guidelines","description":"Every marketing standard, with the state of its requirement library.\n\nThe one endpoint the guideline list polls while anything is running: it already carries each\nguideline's decomposition status, so there is never a request per row.","operationId":"list_guidelines_marketing_guidelines_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GuidelineSummary"},"type":"array","title":"Response List Guidelines Marketing Guidelines Documents Get"}}}}}}},"/marketing/guidelines/teams":{"get":{"tags":["marketing-guidelines"],"summary":"List Teams","description":"The teams a requirement can be scoped to.\n\nNot `/users/marketing/teams`, which answers \"which teams am I on\". See `MarketingTeamOption`.","operationId":"list_teams_marketing_guidelines_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketingTeamOption"},"type":"array","title":"Response List Teams Marketing Guidelines Teams Get"}}}}}}},"/marketing/guidelines/documents/{file_id}":{"get":{"tags":["marketing-guidelines"],"summary":"Get Guideline","description":"One guideline's requirements, in the order they were extracted.\n\nPolled by the detail view while a decomposition runs, which is exactly when the previous\ngeneration has just been retired — so `state` is not a convenience. Every regeneration leaves\nanother permanent generation behind, and without a filter here the payload carries all of them and\nthe browser discards most of it, on every poll. `superseded_with_human_edits` is counted separately\nso the surface can still offer to show them.\n\nCarries no presigned URL: signing is not idempotent, so a URL on a polled payload changes every\ntick and remounts the document viewer. The viewer gets its URL from `usePreviewUrl`.","operationId":"get_guideline_marketing_guidelines_documents__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GuidelineRequirementState"}},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements":{"get":{"tags":["marketing-guidelines"],"summary":"List Requirements","description":"The library, filterable, sortable, capped, and — when asked — ranked by its own record.\n\n`collateral_type` and `marketing_team_id` match a requirement whose scope is unset too, because\nan unset scope means \"applies to everything\" — filtering it out would hide the requirements that\nmost certainly do apply. `preset_id` does not; see below. `file_id` names the standards documents\nto read from — strict membership for the same reason `preset_id` is, and narrower: it answers\n\"which of *this* document's rules are misbehaving\", which is how a librarian who knows the\nstandard they are tuning reaches its rules without paging through the library.\n\n**`order` is a parameter here rather than a route of its own.** Ranking a library by how often\nreviewers dismiss what a rule produced is the same *selection* as this list, ordered differently,\nand the tuning surfaces need it with every filter above still applying. A parallel route had five\nthings silently wrong for the same rows: `max_requirements_per_state_change` absent so the bulk\ncap read zero against a server that refuses at fifty, three of the five filters dropped while\ntheir chips stayed lit, a thinner row that blanked seven fields `RequirementCard` renders,\ntruncation copy telling the reader to narrow filters when narrowing is not the remedy, and two\nquery keys `keepPreviousData` cannot span. One route keeps all five right by construction.\n\nWith `order` set, each row carries a `signal` block and rows with no checks in the window are\n**absent** — a requirement nothing has been judged against has no track record to rank. With it\nunset the query, the plan and the row are exactly what they were before: the aggregates are not\njoined, so the ordinary library list pays nothing for this.\n\n**The ranking is applied here rather than in the browser** because the response is one capped\npage of whatever matched, not a window onto an ordered list — so a client re-ordering what it was\nsent would answer \"which rules produce the most false positives\" with the worst of an arbitrary\npage, silently, on exactly the libraries where the question is worth asking.","operationId":"list_requirements_marketing_guidelines_requirements_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GuidelineRequirementState"}},{"type":"null"}],"title":"State"}},{"name":"collateral_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}],"title":"Collateral Type"}},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},{"name":"preset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Preset Id"}},{"name":"file_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"File Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RequirementSignalOrder"},{"type":"null"}],"title":"Order"}},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDirection","default":"desc"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":730,"minimum":1,"default":180,"title":"Window Days"}},{"name":"min_checked","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10,"title":"Min Checked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements/{requirement_id}":{"get":{"tags":["marketing-guidelines"],"summary":"Get Requirement","description":"One requirement's live revision, for a surface holding an id rather than the list.\n\nThe risk-triage source dialog knows a `requirement_id` from the citation it is showing, and\nediting needs the *live* revision — the citation carries the revision that was judged, which is\ndeliberately historical. Filtering the whole library down to one row would answer a one-row\nquestion with a page of them.","operationId":"get_requirement_marketing_guidelines_requirements__requirement_id__get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["marketing-guidelines"],"summary":"Update Requirement","description":"Change a requirement's wording, guidance or scope by recording a new revision.\n\nNothing already written is altered. The previous wording stays readable in the history.","operationId":"update_requirement_marketing_guidelines_requirements__requirement_id__patch","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements/{requirement_id}/history":{"get":{"tags":["marketing-guidelines"],"summary":"Get Requirement History","description":"Every version of this requirement, newest first.","operationId":"get_requirement_history_marketing_guidelines_requirements__requirement_id__history_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementRevisionResponse"},"title":"Response Get Requirement History Marketing Guidelines Requirements  Requirement Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements/state":{"post":{"tags":["marketing-guidelines"],"summary":"Set Requirements State Bulk","description":"Turn several requirements off, remove them, or put them back, in one press.\n\nThe library is long enough that the interesting selections are not one row: a search that finds\nseventeen restatements of the same enforcement note is a single decision, and making it\nseventeen times is how it does not get made.\n\n**Removal stays archival.** `ARCHIVED` keeps the requirement and every version of it readable,\nwhich is the point on regulated compliance material; there is no hard delete here.\n\nOne requirement's refusal never fails the batch, and every id gets an outcome — the three\nrefusals are `refuse_state_change`, the same function the rollout-consistency worklist uses, so\nthe two surfaces cannot drift about what a person may do to a requirement.","operationId":"set_requirements_state_bulk_marketing_guidelines_requirements_state_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSetRequirementStateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequirementStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements/{requirement_id}/state":{"post":{"tags":["marketing-guidelines"],"summary":"Set Requirement State","description":"Turn a requirement off, remove it, or put it back.\n\nRemoval is archival: the requirement and every version of it stay readable, which is the whole\npoint on regulated compliance material.","operationId":"set_requirement_state_marketing_guidelines_requirements__requirement_id__state_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRequirementStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidelineRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/requirements/{requirement_id}/downvote":{"get":{"tags":["marketing-guidelines"],"summary":"Get Requirement Downvote","description":"Whether this reviewer has downvoted the requirement, and how many unique votes it has.\n\nFetched when the source dialog opens rather than on the citations payload: those citations are\ncached for the session because a finished run's checks never change, and a vote is not a check.","operationId":"get_requirement_downvote_marketing_guidelines_requirements__requirement_id__downvote_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementDownvoteStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["marketing-guidelines"],"summary":"Downvote Requirement","description":"Record this reviewer's downvote. Idempotent.\n\nFeedback only: no number of votes switches a requirement off, and nothing about this analysis or\nany future one changes. The library reads the votes; a person decides what to do about them.","operationId":"downvote_requirement_marketing_guidelines_requirements__requirement_id__downvote_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementDownvoteStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["marketing-guidelines"],"summary":"Withdraw Requirement Downvote Route","description":"Remove this reviewer's downvote.\n\nA missing vote is still 200: un-filling twice must not 404.\n\nHard-deletes the vote row. That is the exception to A-6, not a second kind of requirement\nremoval: a downvote is a unique `(requirement, user)` signal, and withdrawing has to release\nthe unique slot. Findings and the requirement itself are untouched.","operationId":"withdraw_requirement_downvote_route_marketing_guidelines_requirements__requirement_id__downvote_delete","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementDownvoteStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/guidelines/decompositions":{"post":{"tags":["marketing-guidelines"],"summary":"Start Decompositions","description":"Queue a decomposition for each named guideline, or for a server-derived set of them.\n\nExactly one of three — `_scope_of_the_request` refuses a body that asks for more than one or\nnone. `without_requirements` and `stale` are derived here, from the database, at the moment of\nthe press: see `_standards_without_requirements` and `_standards_that_are_stale` for what each\nselects and why the client is not trusted to send the list itself.\n\nEvery guideline gets its own savepoint. A file that already has a run in flight loses the\n\"one in flight per guideline\" unique index and is reported as skipped — without the savepoint\nthat IntegrityError would abort the whole transaction and its innocent siblings would get no run\neither.","operationId":"start_decompositions_marketing_guidelines_decompositions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDecompositionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDecompositionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-presets/program-types":{"get":{"tags":["marketing-presets"],"summary":"Get Marketing Program Types","operationId":"get_marketing_program_types_marketing_presets_program_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"propertyNames":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"object","title":"Response Get Marketing Program Types Marketing Presets Program Types Get"}}}}}}},"/marketing-presets":{"post":{"tags":["marketing-presets"],"summary":"Create Marketing Preset","operationId":"create_marketing_preset_marketing_presets_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetWithLabels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["marketing-presets"],"summary":"List Marketing Presets","operationId":"list_marketing_presets_marketing_presets_get","parameters":[{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","description":"Also return soft-deleted product lines, marked `deleted`. For naming which product lines a past analysis used; not for anything that offers one to pick.","default":false,"title":"Include Deleted"},"description":"Also return soft-deleted product lines, marked `deleted`. For naming which product lines a past analysis used; not for anything that offers one to pick."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketingPresetWithLabels"},"title":"Response List Marketing Presets Marketing Presets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-presets/copy":{"post":{"tags":["marketing-presets"],"summary":"Copy Marketing Presets","description":"Copy product lines, into their own team or into another one.\n\nEvery requested copy is created: a `name_suffix` is numbered until it is\nfree (`next_available_name`), so \"Duplicate\" twice gives two copies rather\nthan silently doing nothing the second time. The created names come back\nbecause numbering can have moved them off the predictable one.\n\nA caller copying a single product line may name it outright instead, and\nthen a collision is theirs to resolve rather than the server's to work\naround: they can see and edit the name they chose.","operationId":"copy_marketing_presets_marketing_presets_copy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetCopy"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetCopyResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-presets/bulk":{"delete":{"tags":["marketing-presets"],"summary":"Delete Marketing Presets","description":"Soft-delete several product lines, none of which may ever have been used.\n\nAll or nothing, which is the single-row rule applied to a selection rather\nthan a second one: removing the rest of a selection the caller confirmed as\na whole would take out more than they can see they asked for. The list\nalready carries each row's usage, so the UI can refuse before the request;\nthis catches the selection whose counts went stale.\n\nThe rows are retained and stop appearing anywhere a product line is listed\nor picked, so deleting the same selection twice is a 404 rather than a\nsecond delete.","operationId":"delete_marketing_presets_marketing_presets_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetBulkDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["marketing-presets"],"summary":"Move Marketing Presets To Team","description":"Hand several product lines to one marketing team at once.\n\nThe same change `PUT /{preset_id}` makes to one, under the same membership\nrule, and with the same consequence: an analysis already run with a product\nline resolves its name against the live team-scoped list, so moving one\nturns those analyses into \"Unknown product line\" for anyone outside the new\nteam.","operationId":"move_marketing_presets_to_team_marketing_presets_bulk_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetBulkTeam"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-presets/{preset_id}":{"get":{"tags":["marketing-presets"],"summary":"Get Marketing Preset","operationId":"get_marketing_preset_marketing_presets__preset_id__get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetWithLabels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["marketing-presets"],"summary":"Update Marketing Preset","operationId":"update_marketing_preset_marketing_presets__preset_id__put","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingPresetWithLabels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["marketing-presets"],"summary":"Delete Marketing Preset","description":"Soft-delete a product line that has never been used to analyze a file.\n\nThe single-resource spelling of `DELETE /bulk`, which it delegates to rather\nthan repeating: two implementations of one rule drifted apart the moment the\nUI stopped calling this one, and the refusal a caller reads should not\ndepend on which URL they used.","operationId":"delete_marketing_preset_marketing_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing-presets/{preset_id}/files":{"get":{"tags":["marketing-presets"],"summary":"Get Marketing Preset Files","operationId":"get_marketing_preset_files_marketing_presets__preset_id__files_get","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StoredFile"},"title":"Response Get Marketing Preset Files Marketing Presets  Preset Id  Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-coverage/run/{run_id}":{"get":{"tags":["marketing-requirement-coverage"],"summary":"Get Run Coverage","description":"Which requirements this analysis read the collateral against, and how each came out.\n\nGrouped by standards document, because that is how a compliance reviewer holds the library in\ntheir head — \"we checked it against the brand standards and the card disclosures\" — and because\nthe document is what a citation resolves to.","operationId":"get_run_coverage_marketing_requirement_coverage_run__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequirementCoverage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-coverage/risks":{"get":{"tags":["marketing-requirement-coverage"],"summary":"Get Risk Citations","description":"The requirements each of these risks cites, rendered from the revisions that were judged.\n\nBatched over risk ids rather than one route per risk: the risk list asks about every card on\nscreen at once, and a request per card is the shape that makes a twenty-risk analysis twenty\nround trips.\n\nCapped like its sibling: an uncapped repeated query param is an `IN` list whose size the caller\nchooses. The client chunks well below this cap for a different reason — a request near it is\n~11 KB of URL, past what a default proxy will accept — so this bound is the server's own floor\nagainst a hand-made request, not the number the UI sends.\n\nThe query itself lives in `helpers/marketing_requirement_citations.py`, shared with the\nrollout-consistency run viewer, which renders these same blocks for staff without a masquerade.","operationId":"get_risk_citations_marketing_requirement_coverage_risks_get","parameters":[{"name":"risk_id","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250,"title":"Risk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RiskRequirementCitations"},"title":"Response Get Risk Citations Marketing Requirement Coverage Risks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-coverage/requirements":{"get":{"tags":["marketing-requirement-coverage"],"summary":"Get Requirement Summaries","description":"Per requirement: how often it has been checked, how it came out, and what reviewers said.\n\nOne grouped query for a whole page of the library. The per-requirement route below answers the\nsame question in full, with the collateral listed; this one is what a list can afford to ask.\n\nRequirements with no checks are **omitted** rather than returned as zeros. A row shows this strip\nonly when there is something to say, so a caller keying a map on the response gets `undefined`\nfor exactly the rows that should render nothing.","operationId":"get_requirement_summaries_marketing_requirement_coverage_requirements_get","parameters":[{"name":"requirement_id","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250,"title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementCoverageSummary"},"title":"Response Get Requirement Summaries Marketing Requirement Coverage Requirements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-coverage/requirements/{requirement_id}":{"get":{"tags":["marketing-requirement-coverage"],"summary":"Get Requirement Coverage","description":"Every piece of collateral this requirement has been checked against, and what came of it.\n\nThe pass/fail split says how often the rule fires. The verdicts say whether it was right to:\na flag is a reviewer agreeing, a dismissal bucketed as over-flagged is one telling us the rule\nproduced a false positive. Those two ratios together are what \"correctly or incorrectly scanned\"\nmeans, and they are the argument for keeping a rule, rewording it, or switching it off.","operationId":"get_requirement_coverage_marketing_requirement_coverage_requirements__requirement_id__get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCoverage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-coverage/requirements/{requirement_id}/examples":{"get":{"tags":["marketing-requirement-coverage"],"summary":"Get Requirement Examples","description":"The most recent times this requirement met collateral, with the finding and the decision.\n\nWhat the tuning surfaces read instead of guessing from counts. A rate says a rule is wrong; these\nsay *how* — the passage it fired on, the reviewer's reason, and the note they left, which is the\nonly place anybody writes down what was actually wrong with the wording.\n\n**The unit is a firing, not a finding.** One check can produce several risks — two passages, two\nfindings — so a limit counted in rows would answer \"the last five times this fired\" with five\nfindings from one asset. The checks are chosen first, with a real `LIMIT` per requested verdict,\nand their findings fetched afterwards; `findings` on each example says how many that firing\nproduced so nothing is hidden by showing one.\n\nThat shape is also what makes `truncated` true. An earlier version read a fixed budget of joined\nrows and bucketed them in Python, which meant a rule with hundreds of confirmations could starve a\nrequest for its three dismissals and answer `truncated: false` — asserting it had shown the whole\nhistory of a list it never reached.\n\n**`limit` is per requested verdict**, not per response. Asking for five with two verdicts returns\nup to ten, because the surface needs the last five dismissals *and* the confirmations on screen\ntogether: a rewording that loses the dismissals by also losing the confirmations is a regression\nthe wording alone does not show. Said out loud because \"limit 5\" returning ten is otherwise\nsomething a caller discovers.\n\n`outcome` is **repeatable, and omitting it means `FAILED`** — \"why did this fire\" is the question\nboth surfaces open with. Repeatable rather than a single value with a nullable default, because a\nnullable default has no wire spelling: `outcome=` and `outcome=null` are both enum errors, so\n\"every outcome\" would have been unaskable over HTTP and reachable only from Python.\n\nA `FAILED` check with no surviving risk is returned as `FIRED_NO_FINDING` rather than dropped. The\nfindings a check produces pass through obsolescence deduplication and, for some companies, a\nconfidence filter, and both drop dicts before anything reaches `document_risks` — so the rule a\nfire-rate ranking just put first can legitimately have fired with nothing to show. An empty\nflipper reads as the surface being broken; the answer reads as the answer.","operationId":"get_requirement_examples_marketing_requirement_coverage_requirements__requirement_id__examples_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}},{"name":"verdict","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ProductionRiskVerdict"}},{"type":"null"}],"title":"Verdict"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RequirementCheckOutcome"}},{"type":"null"}],"title":"Outcome"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementExamples"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-tuning/requirements/{requirement_id}/reviewed-collateral":{"get":{"tags":["marketing-requirement-tuning"],"summary":"List Reviewed Collateral","description":"What a test would judge, split by whether a reviewer ruled on it.\n\nExposed so the surface can say \"Test on 22 reviewed\" — and \"+ 190 nobody has triaged\" — *before*\nthe press rather than reporting it afterwards. Newest first and capped like the test itself, so\nthe numbers on the button are the numbers the test will take.","operationId":"list_reviewed_collateral_marketing_requirement_tuning_requirements__requirement_id__reviewed_collateral_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementTestScope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-tuning/requirements/{requirement_id}/tests":{"post":{"tags":["marketing-requirement-tuning"],"summary":"Start Requirement Test","description":"Judge this draft against the reviewed assets, and answer with the test to poll.\n\n202 with the rows already written, not 200 with the answer: this is twenty-odd Opus calls, one per\nasset with no shared attachment to cache, and a request that waited for them would hold a pooled\nconnection and a proxy timeout for minutes. The items come back `pending`, so the surface's first\npoll already knows the denominator rather than watching it grow.\n\nEverything the fan-out needs is resolved here and the session released before the first call — see\n`helpers/requirement_tests`.","operationId":"start_requirement_test_marketing_requirement_tuning_requirements__requirement_id__tests_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRequirementTestRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementTest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["marketing-requirement-tuning"],"summary":"List Requirement Tests","description":"This rule's recent tests, newest first — the attempts the loop is made of.\n\nReaps first, so a test abandoned by a restarted process reads as stopped rather than running. A\nread that writes, deliberately: the alternative is a row nobody can ever leave, which is worse\nthan a GET with a side effect nobody can observe except as the truth.","operationId":"list_requirement_tests_marketing_requirement_tuning_requirements__requirement_id__tests_get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementTestSummary"},"title":"Response List Requirement Tests Marketing Requirement Tuning Requirements  Requirement Id  Tests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-tuning/tests/{test_id}":{"get":{"tags":["marketing-requirement-tuning"],"summary":"Get Requirement Test","description":"One test, with every item. What the surface polls while a fan-out drains.\n\nReaps first, like the history list and for a sharper reason: **this** is the route the panel polls.\nA test abandoned mid-fan-out by a redeployed web process has no other way to leave `running`, so\nwithout this the panel polls a row that will never change — past every budget, indefinitely —\nwhile the reaper waits for somebody to open the history list.","operationId":"get_requirement_test_marketing_requirement_tuning_tests__test_id__get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementTest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketing/requirement-tuning/requirements/{requirement_id}/suggestions":{"post":{"tags":["marketing-requirement-tuning"],"summary":"Suggest Requirement","description":"Propose a rewording from this rule's own record. Writes nothing.\n\n**Awaited, unlike a test.** One call over text the route assembled — no document to attach, no\nfan-out — so it answers in a few seconds, which is the shape the surface wants: a reviewer presses\nSuggest and reads a proposal, then presses Test and watches it drain.\n\n**The evidence is read here, not accepted from the client.** The dismissals with their reasons and\nnotes, the findings to keep firing on, and the previous tests with the judge's own words. A\nclient-supplied evidence blob would be prompt-injection surface with nothing to check it against,\nand a proposal a reviewer cannot trace back to a dismissal they recognise is one they have to take\non faith.\n\nBoth sides always go in. Asking only about the dismissals produces a rule narrowed until it fires\non nothing, which scores perfectly and has stopped doing its job.\n\n**The session is closed before the call, and the call is raced.** Every field the prompt needs is\na primitive by the time `SuggestionEvidence` is built, and underneath `propose_requirement` sits\n`run_structured_with_usage`'s unlowerable budget — four attempts with 8-64s backoff on a client\nwith a ten-minute timeout. Holding a pooled connection across that, on a web engine of\n`pool_size=5, max_overflow=24, pool_timeout=5`, is how five reviewers pressing Suggest take every\nroute down for every tenant; and with no race, the request itself can outlive any proxy in front\nof it. The test path was shaped this way from the start (`helpers/requirement_tests`); this is the\nsame discipline on the awaited half.","operationId":"suggest_requirement_marketing_requirement_tuning_requirements__requirement_id__suggestions_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementSuggestion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/all":{"get":{"tags":["issues"],"summary":"List All Issues","description":"Return all issues across all companies for overview page. ``entity_type``\nscopes the list to the active view mode's relationships (e.g. only\npartners/prospects in Fintech Partners).","operationId":"list_all_issues_issues_all_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OverviewIssueResponse"},"title":"Response List All Issues Issues All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues":{"get":{"tags":["issues"],"summary":"List Issues","operationId":"list_issues_issues_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","pattern":"^(open|resolved|all)$","default":"all","title":"Status Filter"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"}},{"name":"due_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IssueListItemResponse"},"title":"Response List Issues Issues Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["issues"],"summary":"Create Issue","description":"Create an issue from a requirement check.\nSets review_id when the requirement's evidence packet is linked to a review task.","operationId":"create_issue_issues_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}":{"get":{"tags":["issues"],"summary":"Get Issue","operationId":"get_issue_issues__issue_id__get","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueListItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["issues"],"summary":"Delete Issue","description":"Delete an issue.\n\nIf the issue is linked to a requirement, the requirement's approval status\nis reset to pending and the review task completion is rechecked.","operationId":"delete_issue_issues__issue_id__delete","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/by-review/{review_id}":{"get":{"tags":["issues"],"summary":"Get Review Issues","description":"Get all issues associated with a review, including the source requirement if present.\nUses LEFT JOIN to include standalone issues without linked requirements.","operationId":"get_review_issues_issues_by_review__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewIssueResponse"},"title":"Response Get Review Issues Issues By Review  Review Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/risks":{"get":{"tags":["issues"],"summary":"Get Issue Risks","operationId":"get_issue_risks_issues__issue_id__risks_get","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRiskIssueResponse"},"title":"Response Get Issue Risks Issues  Issue Id  Risks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/resolve":{"post":{"tags":["issues"],"summary":"Resolve Issue","operationId":"resolve_issue_issues__issue_id__resolve_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_resolve_issue_issues__issue_id__resolve_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/assignee":{"post":{"tags":["issues"],"summary":"Set Issue Assignee","operationId":"set_issue_assignee_issues__issue_id__assignee_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_issue_assignee_issues__issue_id__assignee_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/due-date":{"post":{"tags":["issues"],"summary":"Set Issue Due Date","operationId":"set_issue_due_date_issues__issue_id__due_date_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_issue_due_date_issues__issue_id__due_date_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/custom-field-values":{"post":{"tags":["issues"],"summary":"Set Issue Custom Field Values","operationId":"set_issue_custom_field_values_issues__issue_id__custom_field_values_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetIssueCustomFieldValuesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/title":{"post":{"tags":["issues"],"summary":"Set Issue Title","operationId":"set_issue_title_issues__issue_id__title_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_issue_title_issues__issue_id__title_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/description":{"post":{"tags":["issues"],"summary":"Set Issue Description","operationId":"set_issue_description_issues__issue_id__description_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_issue_description_issues__issue_id__description_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/{issue_id}/severity":{"post":{"tags":["issues"],"summary":"Set Issue Severity","operationId":"set_issue_severity_issues__issue_id__severity_post","parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Issue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_set_issue_severity_issues__issue_id__severity_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/for-review/{review_id}":{"post":{"tags":["issues"],"summary":"Create Review Issue","description":"Create a standalone issue for a review (not linked to a requirement check).","operationId":"create_review_issue_issues_for_review__review_id__post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewIssueRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/for-vendor/{vendor_id}":{"post":{"tags":["issues"],"summary":"Create Standalone Issue","description":"Create a standalone issue for a vendor (not linked to a review).","operationId":"create_standalone_issue_issues_for_vendor__vendor_id__post","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewIssueRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/negative-news/all":{"get":{"tags":["negative-news"],"summary":"List Negative News","description":"Merged adverse-media hits across every monitored company the tenant works\nwith, newest first, annotated with the tenant's triage decision.\n\n``entity_type`` scopes the feed to the active view mode's relationships (e.g.\nonly partners/prospects in Fintech Partners). The vendor-scope floor further\nrestricts rows to companies the caller can access.","operationId":"list_negative_news_negative_news_all_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NegativeNewsFeedItem"},"title":"Response List Negative News Negative News All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/negative-news/export":{"post":{"tags":["negative-news"],"summary":"Export Negative News","description":"The feed as a styled Excel digest, uploaded to S3 and handed back as a\npresigned URL — the same shape every other table export returns.\n\nThe client names the rows rather than re-describing its filters. It can:\n``GET /all`` hands it the whole feed, so the rows it has filtered and sorted\nare every matching hit and only the 20 rendered are a page. That keeps the\nworkbook in the reader's own sort order, and keeps the filter rules (a\nmulti-select per column, a range over freeform ``when`` text) in one place\nrather than in a second copy here that has to agree with the browser's.\n\nRows still resolve against the caller's own feed, so a ``hit_key`` for a\ncompany they cannot see resolves to nothing. Gated like ``GET /all``.","operationId":"export_negative_news_negative_news_export_post","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsExportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/negative-news/dispositions":{"get":{"tags":["negative-news"],"summary":"List Dispositions","description":"The tenant's triage decisions for one observed company.\n\nScoped to a single vendor, unlike ``/all``, which would merge every vendor's\nruns to answer a one-vendor question. A plain side-table read that never\ntouches ``company_monitor_runs``, so it is cheap to refetch after every\ndismiss/restore.","operationId":"list_dispositions_negative_news_dispositions_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DispositionResponse"},"title":"Response List Dispositions Negative News Dispositions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["negative-news"],"summary":"Set Disposition","description":"Record the tenant's triage decision for one hit — in practice ``dismissed``\nfrom the feed; issues are created via ``/negative-news/issue``, which records\n``issue_created`` itself.\n\nA single upsert: atomic against concurrent writes, and the ``WHERE`` skips\nhits already converted to an issue so a stale dismiss can't unlink one.","operationId":"set_disposition_negative_news_dispositions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDispositionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Set Disposition Negative News Dispositions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["negative-news"],"summary":"Clear Disposition","description":"Reset a hit back to untriaged (undo a dismissal). Scoped to ``dismissed``\nrows so a stale Undo can't delete an ``issue_created`` disposition and orphan\nthe linked issue.","operationId":"clear_disposition_negative_news_dispositions_delete","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"hit_key","in":"query","required":true,"schema":{"type":"string","title":"Hit Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Clear Disposition Negative News Dispositions Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/negative-news/issue":{"post":{"tags":["negative-news"],"summary":"Create Issue From Hit","description":"Create an Issue for a hit and link it via the disposition. Idempotent\n(claim-then-fill on the unique key): a retry, double-submit, or overlap with\nthe weekly digest returns the existing issue rather than creating a second.\nUsed by the feed's bulk convert; the single-hit path opens the shared\n``IssueModal`` first so the user can edit before saving.","operationId":"create_issue_from_hit_negative_news_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueFromHitRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueFromHitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exa/webhook/monitor":{"post":{"tags":["exa"],"summary":"Exa Monitor Webhook","operationId":"exa_monitor_webhook_exa_webhook_monitor_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Exa Monitor Webhook Exa Webhook Monitor Post"}}}}}}},"/requirements/frameworks":{"get":{"tags":["requirements"],"summary":"List Frameworks","operationId":"list_frameworks_requirements_frameworks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameworksListResponse"}}}}}}},"/requirements/frameworks/{framework_id}":{"get":{"tags":["requirements"],"summary":"Get Framework","operationId":"get_framework_requirements_frameworks__framework_id__get","parameters":[{"name":"framework_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Framework Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameworkDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["requirements"],"summary":"Delete Framework Endpoint","operationId":"delete_framework_endpoint_requirements_frameworks__framework_id__delete","parameters":[{"name":"framework_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Framework Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirements/frameworks/{framework_id}/requirements":{"post":{"tags":["requirements"],"summary":"Create Regulatory Requirement","operationId":"create_regulatory_requirement_requirements_frameworks__framework_id__requirements_post","parameters":[{"name":"framework_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Framework Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRegulatoryRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameworkRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirements/frameworks/{framework_id}/requirements/{requirement_id}":{"patch":{"tags":["requirements"],"summary":"Update Regulatory Requirement","operationId":"update_regulatory_requirement_requirements_frameworks__framework_id__requirements__requirement_id__patch","parameters":[{"name":"framework_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Framework Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRegulatoryRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameworkRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["requirements"],"summary":"Delete Regulatory Requirement Endpoint","operationId":"delete_regulatory_requirement_endpoint_requirements_frameworks__framework_id__requirements__requirement_id__delete","parameters":[{"name":"framework_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Framework Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirements/frameworks/ingest-from-internal":{"post":{"tags":["requirements"],"summary":"Ingest Frameworks From Internal","description":"For each selected internal upload, create an EXTRACTING placeholder\nframework and dispatch the ingestion workflow to extract its requirements.","operationId":"ingest_frameworks_from_internal_requirements_frameworks_ingest_from_internal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromInternalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameworksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirements/instances/by-upload/{upload_id}":{"get":{"tags":["requirements"],"summary":"List Requirement Instances","operationId":"list_requirement_instances_requirements_instances_by_upload__upload_id__get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementInstancesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirements/instances/{instance_id}":{"patch":{"tags":["requirements"],"summary":"Update Requirement Instance","operationId":"update_requirement_instance_requirements_instances__instance_id__patch","parameters":[{"name":"instance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Instance Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementInstanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementInstanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regulatory-review/instances/by-upload/{upload_id}":{"get":{"tags":["regulatory-review"],"summary":"List Regulatory Review Instances","operationId":"list_regulatory_review_instances_regulatory_review_instances_by_upload__upload_id__get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatoryReviewRequirementInstancesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regulatory-review/instances/{instance_id}":{"patch":{"tags":["regulatory-review"],"summary":"Update Regulatory Review Instance","operationId":"update_regulatory_review_instance_regulatory_review_instances__instance_id__patch","parameters":[{"name":"instance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Instance Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRegulatoryReviewRequirementInstanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatoryReviewRequirementInstanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regulatory-review/instances/{instance_id}/convert-to-requirement":{"post":{"tags":["regulatory-review"],"summary":"Convert Review Instance To Requirement","operationId":"convert_review_instance_to_requirement_regulatory_review_instances__instance_id__convert_to_requirement_post","parameters":[{"name":"instance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Instance Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertRiskToRequirementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertRiskToRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pinned-companies":{"get":{"tags":["pinned-companies"],"summary":"Get Pinned Companies","description":"Get all companies pinned by the current user, filtered by accessible vendors.","operationId":"get_pinned_companies_pinned_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinnedCompaniesResponse"}}}}}}},"/pinned-companies/pin":{"post":{"tags":["pinned-companies"],"summary":"Pin Company","description":"Pin a company for the current user.","operationId":"pin_company_pinned_companies_pin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCompanyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinCompanyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pinned-companies/unpin":{"post":{"tags":["pinned-companies"],"summary":"Unpin Company","description":"Unpin a company for the current user.","operationId":"unpin_company_pinned_companies_unpin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnpinCompanyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnpinCompanyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["projects"],"summary":"List Projects","operationId":"list_projects_projects_get","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_list_projects_projects_get"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Projects"},"type":"array","title":"Response List Projects Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/":{"post":{"tags":["projects"],"summary":"Create New Project","operationId":"create_new_project_projects__post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_new_project_projects__post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"put":{"tags":["projects"],"summary":"Update Project","operationId":"update_project_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_project_projects__project_id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete Project","operationId":"delete_project_projects__project_id__delete","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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pylon/portal-login":{"get":{"tags":["pylon"],"summary":"Get Portal Login Url","description":"Return an authed deep-link into the company's Pylon support portal.","operationId":"get_portal_login_url_pylon_portal_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Get Portal Login Url Pylon Portal Login Get"}}}}}}},"/requirement-checks/by-review/{review_id}":{"get":{"tags":["requirement-checks"],"summary":"Get Requirement Checks","description":"Get all requirement checks for a review's evidence packet.\n\nOnly requirements whose section the user is allowed to review are returned;\nsections owned by other teams/people are filtered out (admins/masquerade see\nall). Counts reflect the filtered set.","operationId":"get_requirement_checks_requirement_checks_by_review__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementChecksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirement-checks/approve":{"post":{"tags":["requirement-checks"],"summary":"Approve Requirements","description":"Approve one or more requirement checks.\n\nAccepts a list of requirement IDs and sets each to APPROVED. Requirements\nthat already have an associated issue are skipped — their resolution is\nbeing tracked via the issue, and flipping them to APPROVED would orphan\nthe issue and put the row in a state where the reviewer can no longer\ncreate a fresh issue from the UI. A follow-up does not close the check,\nso those rows are still approvable.","operationId":"approve_requirements_requirement_checks_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequirementIdsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RequirementCheckResponse"},"type":"array","title":"Response Approve Requirements Requirement Checks Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirement-checks/unapprove":{"post":{"tags":["requirement-checks"],"summary":"Unapprove Requirements","description":"Unapprove one or more requirement checks (set back to pending).\n\nRequirements that have an associated issue are skipped: the row's\nresolution is driven by the issue, not by the approval flag, and\nflipping the flag would only create drift between ``approval_status``\nand ``issue_id``. To \"undo\" an issue, callers should delete the issue\ninstead. A follow-up does not close the check, so those rows can still\nbe unapproved.","operationId":"unapprove_requirements_requirement_checks_unapprove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequirementIdsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RequirementCheckResponse"},"type":"array","title":"Response Unapprove Requirements Requirement Checks Unapprove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirement-checks/{requirement_id}":{"get":{"tags":["requirement-checks"],"summary":"Get Requirement Check","description":"Get a single requirement check by ID.","operationId":"get_requirement_check_requirement_checks__requirement_id__get","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["requirement-checks"],"summary":"Update Requirement Check","description":"Update a requirement check's compliance status and/or reviewer note.\n\nAllows reviewers to override the AI-generated compliance classification\nand document their reasoning.","operationId":"update_requirement_check_requirement_checks__requirement_id__patch","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequirementCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirement-checks/{requirement_id}/feedback":{"post":{"tags":["requirement-checks"],"summary":"Submit Requirement Check Feedback","operationId":"submit_requirement_check_feedback_requirement_checks__requirement_id__feedback_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequirementCheckFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["requirement-checks"],"summary":"Delete Requirement Check Feedback","operationId":"delete_requirement_check_feedback_requirement_checks__requirement_id__feedback_delete","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requirement-checks/{requirement_id}/risk-factor":{"patch":{"tags":["requirement-checks"],"summary":"Update Risk Factor Check","description":"Set manual label overrides on a risk-factor requirement check.\n\nSets ``manual_inherent_risk_label`` and/or ``manual_control_strength_label``.\nPass ``null`` for either field to clear the reviewer override (AI suggestion takes precedence).\nReturns 400 if the check is not of type RISK_FACTOR.","operationId":"update_risk_factor_check_requirement_checks__requirement_id__risk_factor_patch","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskFactorCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/task-definitions":{"get":{"tags":["reviews"],"summary":"Get Task Definitions","operationId":"get_task_definitions_reviews_task_definitions_get","parameters":[{"name":"review_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewType"},{"type":"null"}],"title":"Review Type"}},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewTaskType"},{"type":"null"}],"title":"Task Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/ServiceIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ServiceFormReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/VendorIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionResponse"},{"$ref":"#/components/schemas/MetadataTaskDefinitionResponse"}]},"title":"Response Get Task Definitions Reviews Task Definitions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["reviews"],"summary":"Upsert Task Definition","operationId":"upsert_task_definition_reviews_task_definitions_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewTaskDefinitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ServiceFormReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/VendorIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionResponse"},{"$ref":"#/components/schemas/MetadataTaskDefinitionResponse"}],"title":"Response Upsert Task Definition Reviews Task Definitions Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/task-definitions/{review_type}/{stage}":{"get":{"tags":["reviews"],"summary":"Get Task Definition","operationId":"get_task_definition_reviews_task_definitions__review_type___stage__get","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewTaskType"},{"type":"null"}],"title":"Task Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ServiceFormReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/VendorIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionResponse"},{"$ref":"#/components/schemas/MetadataTaskDefinitionResponse"},{"type":"null"}],"title":"Response Get Task Definition Reviews Task Definitions  Review Type   Stage  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/task-definitions/{review_type}/reporting":{"post":{"tags":["reviews"],"summary":"Create Reporting Task Definition","operationId":"create_reporting_task_definition_reviews_task_definitions__review_type__reporting_post","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ServiceFormReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/VendorIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionResponse"},{"$ref":"#/components/schemas/MetadataTaskDefinitionResponse"}],"title":"Response Create Reporting Task Definition Reviews Task Definitions  Review Type  Reporting Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/task-definitions/{review_type}/reporting/{definition_id}":{"put":{"tags":["reviews"],"summary":"Update Reporting Task Definition","operationId":"update_reporting_task_definition_reviews_task_definitions__review_type__reporting__definition_id__put","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ServiceFormReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/VendorIRAReviewTaskDefinitionResponse"},{"$ref":"#/components/schemas/ReviewReportingTaskDefinitionResponse"},{"$ref":"#/components/schemas/MetadataTaskDefinitionResponse"}],"title":"Response Update Reporting Task Definition Reviews Task Definitions  Review Type  Reporting  Definition Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reviews"],"summary":"Delete Reporting Task Definition","operationId":"delete_reporting_task_definition_reviews_task_definitions__review_type__reporting__definition_id__delete","parameters":[{"name":"review_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewType"}},{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/reporting-tasks":{"get":{"tags":["reviews"],"summary":"Get Reporting Tasks","operationId":"get_reporting_tasks_reviews__review_id__reporting_tasks_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewReportingTaskStatusResponse"},"title":"Response Get Reporting Tasks Reviews  Review Id  Reporting Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/metadata-tasks":{"get":{"tags":["reviews"],"summary":"Get Metadata Tasks","description":"The review's MetadataTask, mirroring get_reporting_tasks's shape. At most\none row per review (singleton, unlike ReviewReportingTask) — returned as a\nsingle-element list so the frontend can share the reporting-tasks polling\npattern rather than a None-vs-object distinction.","operationId":"get_metadata_tasks_reviews__review_id__metadata_tasks_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetadataTaskStatusResponse"},"title":"Response Get Metadata Tasks Reviews  Review Id  Metadata Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/metadata-tasks/retry":{"post":{"tags":["reviews"],"summary":"Retry Metadata Task","description":"Retry the review's MetadataTask after its ReviewMetadataAgentRun failed.\n\nThis intentionally does *not* create a ReviewMetadataAgentRun itself —\ndispatch_metadata_run_task (review_reporting_stage_wf) is the only place\none is ever created (see the module docstring on\nbackend/tasks/review_reporting_stage.py), which is what guarantees\nmetadata can't start ahead of the reporting it may depend on. This\nendpoint only clears the failed run's agent_run_id, under the same\nrow lock dispatch_metadata_run_task uses for its own check-then-write, and\nthen re-dispatches the stage workflow so it re-evaluates the review from\nscratch — which also means a retry picks up any ReviewReportingTask\ncreated since the task was last dispatched, not just the metadata agent\nin isolation. Only retryable once the prior run reached FAILED; a\npending or completed run has nothing to retry.","operationId":"retry_metadata_task_reviews__review_id__metadata_tasks_retry_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataTaskStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/types":{"get":{"tags":["reviews"],"summary":"Get Review Types","description":"The review types this company may create, in display order.\n\nNot every type is available to every company — see\n`RESTRICTED_REVIEW_TYPE_COMPANY_IDS` for the ones that are limited, and to\nwhom.","operationId":"get_review_types_reviews_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReviewType"},"type":"array","title":"Response Get Review Types Reviews Types Get"}}}}}}},"/reviews":{"post":{"tags":["reviews"],"summary":"Create Review","operationId":"create_review_reviews_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/all":{"get":{"tags":["reviews"],"summary":"Get All Reviews","description":"Return a page of reviews for the current company, across all vendors.\n\nPowers the global Reviews table (e.g. \"what reviews are due this\nquarter\"). Search (``q``) matches the vendor name or any service name;\n``status``/``stage`` filter on the matching columns. ``assignee`` takes\nuser ids plus the ``unassigned`` sentinel for reviews with no assignee.\nMirrors ``get_reviews_for_vendor`` without the vendor filter.","operationId":"get_all_reviews_reviews_all_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ServiceReviewStatus"}},{"type":"null"}],"title":"Status"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ReviewStage"}},{"type":"null"}],"title":"Stage"}},{"name":"vendor","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Vendor"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Assignee"}},{"name":"review_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ReviewType"}},{"type":"null"}],"title":"Review Type"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Sort Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_ReviewResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/open-summary":{"get":{"tags":["reviews"],"summary":"Get Open Reviews Summary","description":"Every open review, annotated with where its current stage stands.\n\nPowers the Reviews page's open view. Distinct from ``/reviews/all``, which\nreturns the reviews themselves: each row here carries the services in scope\nplus the stage-specific progress that ``helpers/review_stage_progress.py``\nderives — a questionnaire's due date and who it is out with, the requirements\nleft to review, the reports produced. The IRA is the one per-service stage,\nand its deriver folds the review's services into a single measure rather than\nsplitting the row, since every other stage is review-level work that a\nper-service row would just repeat.\n\nOnly the initial and periodic flows and their fintech variants\n(``STANDARD_FLOW_REVIEW_TYPES``) are in scope. Inventory refresh and RM\nScorecard walk their own abbreviated stage lists, so their rows would sit in\nlanes the rest of the pipeline doesn't have and be measured by stage rules\nwritten for the diligence flow. ``review_type`` narrows within that scope, as\non ``/reviews/all``, so Vendor Management and Fintech Partners each see only\ntheir own pipeline.\n\nUnpaginated on purpose: the page groups rows by stage and needs the whole set\nto show how open work distributes across the pipeline.","operationId":"get_open_reviews_summary_reviews_open_summary_get","parameters":[{"name":"review_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ReviewType"}},{"type":"null"}],"title":"Review Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenReviewsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/assignees":{"get":{"tags":["reviews"],"summary":"Get Review Assignees","description":"Distinct users assigned to at least one of the company's reviews.\n\nPowers the Reviews \"Assigned to\" filter. Derived from the reviews rather\nthan the company roster so the options match what the column can show:\nteammates with no reviews are left out, and users who have since been\ndeactivated stay filterable while their name is still rendered.","operationId":"get_review_assignees_reviews_assignees_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssigneeOption"},"type":"array","title":"Response Get Review Assignees Reviews Assignees Get"}}}}}}},"/reviews/upcoming":{"get":{"tags":["reviews"],"summary":"Get Upcoming Reviews","description":"The company's review schedule: one row per active vendor, carrying its\nlast completed review, its inherent risk and assignees, the next assessment\ndate derived from its `review` key dates, and whether the last one went by\nunassessed.\n\nEvery active vendor is a row, not just the ones with a date scheduled —\n\"which vendors have fallen off the calendar\" is as much of the question as\n\"what is coming up\", and a vendor with no review key date has no other way\nto surface. Rows are ordered overdue-first, then soonest, then undated.\n\n``entity_type`` scopes the schedule to the active view mode's relationships,\nas on ``GET /vendors/options`` — the sibling views scope by review type, but\na row here is a vendor, so the mode's entity scope is what separates Vendor\nManagement from Fintech Partners.\n\nUnpaginated, like `GET /vendors/options` and `GET\n/thirdparties/key-dates/all`: the scope is one row per active vendor, and\nthe column the view is read by — the next assessment date — is a per-key-date\nrecurrence computed in Python, so it can't be ordered or paged in SQL.","operationId":"get_upcoming_reviews_reviews_upcoming_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpcomingReviewResponse"},"title":"Response Get Upcoming Reviews Reviews Upcoming Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/vendor/{vendor_id}":{"get":{"tags":["reviews"],"summary":"Get Reviews For Vendor","operationId":"get_reviews_for_vendor_reviews_vendor__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewResponse"},"title":"Response Get Reviews For Vendor Reviews Vendor  Vendor Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/vendor/{vendor_id}/active":{"get":{"tags":["reviews"],"summary":"Get Active Review For Vendor","operationId":"get_active_review_for_vendor_reviews_vendor__vendor_id__active_get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewResponse"},{"type":"null"}],"title":"Response Get Active Review For Vendor Reviews Vendor  Vendor Id  Active Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}":{"get":{"tags":["reviews"],"summary":"Get Review","operationId":"get_review_reviews__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["reviews"],"summary":"Update Review","operationId":"update_review_reviews__review_id__put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reviews"],"summary":"Delete Review","description":"Soft-delete a past (completed or cancelled) review.\n\nRestricted to Kobalt admins (validate_admin_role returns 404 for\neveryone else). Works during hard masquerade (company_id is swapped,\nso no write restriction applies) but not during soft masquerade,\nwhere the standard non-GET block in get_user_info rejects it. The\nrow is retained for audit/history; list and detail endpoints filter\non ``deleted_at IS NULL`` so the review disappears everywhere.","operationId":"delete_review_reviews__review_id__delete","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/progression":{"get":{"tags":["reviews"],"summary":"Get Review Progression","description":"What's keeping the review in its current stage, so the UI can show why it\nhasn't progressed (incomplete checklist item, IRA not submitted, etc.).","operationId":"get_review_progression_reviews__review_id__progression_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewProgressionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/export":{"get":{"tags":["reviews"],"summary":"Export Review","operationId":"export_review_reviews__review_id__export_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Review Reviews  Review Id  Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/complete":{"put":{"tags":["reviews"],"summary":"Complete Review","operationId":"complete_review_reviews__review_id__complete_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/cancel":{"put":{"tags":["reviews"],"summary":"Cancel Review","operationId":"cancel_review_reviews__review_id__cancel_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/{stage}/finalize":{"put":{"tags":["reviews"],"summary":"Finalize Review Stage","description":"Force-advance the review past the given stage, bypassing task completion checks.","operationId":"finalize_review_stage_reviews__review_id___stage__finalize_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"stage","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReviewStage"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/tasks":{"get":{"tags":["reviews"],"summary":"Get Review Tasks","operationId":"get_review_tasks_reviews__review_id__tasks_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"},"title":"Response Get Review Tasks Reviews  Review Id  Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-form/tasks":{"get":{"tags":["reviews"],"summary":"Get Service Form Review Tasks","operationId":"get_service_form_review_tasks_reviews__review_id__service_form_tasks_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceFormReviewTaskResponse"},"title":"Response Get Service Form Review Tasks Reviews  Review Id  Service Form Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/tasks/{task_id}":{"put":{"tags":["reviews"],"summary":"Update Review Task","operationId":"update_review_task_reviews__review_id__tasks__task_id__put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/changeset":{"put":{"tags":["reviews"],"summary":"Update Review Task Changeset","operationId":"update_review_task_changeset_reviews__review_id__service_ira_task__task_id__changeset_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldsChangesetUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/response":{"put":{"tags":["reviews"],"summary":"Update Service Ira Response","description":"Reviewer edit of a submitted IRA response. Unlike the recipient-facing\nPUT /forms/response/{id}, this is allowed after submission (internal\nreviewers only) and appends to form_response_versions, an append-only audit\nlog where each row is a complete authored state and the newest row mirrors\nthe live answers.","operationId":"update_service_ira_response_reviews__review_id__service_ira_task__task_id__response_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/response/versions":{"get":{"tags":["reviews"],"summary":"Get Service Ira Response Versions","description":"Full authored history of a task's IRA response, newest first.\n\nEach entry is a complete point-in-time state: the newest mirrors the live\nanswers (the current version), the oldest is the original submission, and\neach is attributed to its author. Until the response is first edited,\nform_response_versions has no rows for it, so the single current/original\nsubmission is synthesized from the live response.","operationId":"get_service_ira_response_versions_reviews__review_id__service_ira_task__task_id__response_versions_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormResponseVersionResponse"},"title":"Response Get Service Ira Response Versions Reviews  Review Id  Service Ira Task  Task Id  Response Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/rerun":{"post":{"tags":["reviews"],"summary":"Rerun Service Ira","description":"Re-run the Service IRA agent so the derivation reflects edited answers.\n\nThe rerun is dispatched asynchronously; the vendor-level assessment is\nforce-refreshed later, from the service agent's own completion callback\n(see `maybe_rerun_vendor_ira_agent`), so it picks up this task's actual\nnew results rather than racing ahead of them.","operationId":"rerun_service_ira_reviews__review_id__service_ira_task__task_id__rerun_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/reassign":{"post":{"tags":["reviews"],"summary":"Reassign Service Ira","description":"Cancel the outstanding IRA request and resend it to a different recipient.\nCanceled responses are excluded from scoring, so the new recipient's answers\nbecome the authoritative input once submitted.\n\nA task that skipped the questionnaire at review creation (manual_override,\nform_id null) has no outstanding request to cancel — this instead sends the\nquestionnaire for the first time, as long as the review flow has an IRA\ntemplate configured. That form-less path is also available on an\nalready-completed task, mirroring \"complete yourself\": a reviewer who set\nthe assessment manually may change their mind and send the real\nquestionnaire to the vendor after all, which reopens the task.\n\nA task with an actual form (outstanding or submitted) can only be\nreassigned while still pending — once it's completed, sending a fresh\nquestionnaire is no longer available for it.","operationId":"reassign_service_ira_reviews__review_id__service_ira_task__task_id__reassign_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReassignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/request-changes":{"post":{"tags":["reviews"],"summary":"Request Service Ira Changes","description":"Send a submitted IRA questionnaire back to its recipient to correct.\n\nReuses the same response row rather than canceling it like reassign does, so\nthe recipient's answers survive and are pre-filled when they reopen the form\n— they correct what's wrong instead of starting over. Returning it to\nWAITING_FOR_RESPONSE is what reopens the recipient-facing write path, since\n/forms/response/{id} rejects saves and re-submits on a SUBMITTED response.\n\nOnly available while the IRA stage is still open. The task itself is usually\nalready COMPLETED by then (the agent derived risk from the submission), so\nthis reopens it: leaving it complete would both read as \"Skipped\" in the task\nlist (a completed task with an unsubmitted form) and let the stage advance\nout from under the recipient.","operationId":"request_service_ira_changes_reviews__review_id__service_ira_task__task_id__request_changes_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRARequestChangesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/cancel-request":{"post":{"tags":["reviews"],"summary":"Cancel Service Ira Request","description":"Cancel the outstanding IRA request without sending a replacement.\n\nThis drops the task back to the same \"skipped questionnaire\" state as a\ntask that had manual_override set at review creation (form_id None): the\nreviewer sets inherent risk/criticality manually, and can still send a\nfresh questionnaire later via reassign if an IRA template is configured —\nso an accidental cancel is always recoverable.\n\nA task that was already manually completed (set_inherent_risk populated)\nbefore being reopened via reassign — sending the questionnaire out, then\ncanceling it — goes right back to completed, matching update_review_task's\nown rule for a form-less task. Otherwise it stays pending, same as a task\nthat's never had a risk value set.","operationId":"cancel_service_ira_request_reviews__review_id__service_ira_task__task_id__cancel_request_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/service-ira/task/{task_id}/complete":{"post":{"tags":["reviews"],"summary":"Start Service Ira Self Completion","description":"Let the reviewer fill out the IRA questionnaire themselves. Cancels any\noutstanding request and opens a blank response addressed to the reviewer,\nwhich they then fill in and submit through the normal form endpoints\n(GET/PUT /forms/response/{id}, POST /forms/response/{id}/submit) — that\nsubmit path already triggers the same scoring as a vendor submission.\n\nA task that skipped the questionnaire at review creation (manual_override,\nform_id null) has no form to reuse — this instead creates one from the\nreview flow's configured IRA template, if any. That form-less path is also\navailable on an already-completed task, mirroring \"send questionnaire\"\n(reassign): a reviewer who set the assessment manually may change their mind\nand fill out the real questionnaire after all, which reopens the task.\n\nA task with an actual form can only be self-completed while still pending —\nonce it's completed, the assessment is terminal and this is no longer\navailable for it.","operationId":"start_service_ira_self_completion_reviews__review_id__service_ira_task__task_id__complete_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TakeOverIraResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/vendor-ira-task":{"get":{"tags":["reviews"],"summary":"Get Vendor Ira Task","operationId":"get_vendor_ira_task_reviews__review_id__vendor_ira_task_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VendorIRAReviewTaskResponse"},{"type":"null"}],"title":"Response Get Vendor Ira Task Reviews  Review Id  Vendor Ira Task Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["reviews"],"summary":"Update Vendor Ira Task","operationId":"update_vendor_ira_task_reviews__review_id__vendor_ira_task_put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorIRAReviewTaskUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/tasks/{task_id}/resend-form":{"post":{"tags":["reviews"],"summary":"Resend Service Ira Form","description":"Resend the IRA questionnaire email for a service IRA task.\n\nOnly valid while the task is still open and the recipient has not yet\nsubmitted the form. Reuses the same email sent at review creation, or the\nchanges-requested one for a response that was sent back.","operationId":"resend_service_ira_form_reviews__review_id__tasks__task_id__resend_form_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceIRAReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-packet-task":{"get":{"tags":["reviews"],"summary":"Get Evidence Packet Review Task","description":"Get the evidence packet review task for a review, if one exists.\n\nA reviewer with no owned sections can still read this task (and see the\nstage); ownership is only enforced on the write actions (send/resend/approve).","operationId":"get_evidence_packet_review_task_reviews__review_id__evidence_packet_task_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvidencePacketReviewTaskResponse"},{"type":"null"}],"title":"Response Get Evidence Packet Review Task Reviews  Review Id  Evidence Packet Task Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-packet-task/{task_id}/approve":{"post":{"tags":["reviews"],"summary":"Approve Evidence Packet Review Task","description":"Approve an evidence packet review task.\n\nTransitions the draft evidence packet from DRAFT to PENDING status.\nThe draft packet must already have document requests and a recipient configured.","operationId":"approve_evidence_packet_review_task_reviews__review_id__evidence_packet_task__task_id__approve_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-packet-task/{task_id}/resend":{"post":{"tags":["reviews"],"summary":"Resend Evidence Packet Review Email","description":"Resend the due diligence packet email to the vendor contact.\n\nOnly valid once the packet has been sent (task completed) and while the\nvendor has not yet finished it. Reuses the email sent at approval time.","operationId":"resend_evidence_packet_review_email_reviews__review_id__evidence_packet_task__task_id__resend_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePacketReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task":{"get":{"tags":["reviews"],"summary":"Get Evidence Review Task","description":"Get the evidence review task for a review, if one exists.\n\nEvery reviewer can read this task and see the review stage, even if they own\nnone of the packet's sections — the modal renders an empty state for them.\nOwnership only gates the write actions (approve/close/reopen).","operationId":"get_evidence_review_task_reviews__review_id__evidence_review_task_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"},{"type":"null"}],"title":"Response Get Evidence Review Task Reviews  Review Id  Evidence Review Task Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task/{task_id}/reopen":{"post":{"tags":["reviews"],"summary":"Reopen Evidence Review Task","description":"Reopen a completed evidence review task.\n\nActive reviews keep existing requirement decisions. Finalized reviews are\nreactivated so additional documents can be added and evidence revalidated.","operationId":"reopen_evidence_review_task_reviews__review_id__evidence_review_task__task_id__reopen_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task/{task_id}/close":{"post":{"tags":["reviews"],"summary":"Close Evidence Review Task","description":"Close an evidence review task once every requirement is resolved.","operationId":"close_evidence_review_task_reviews__review_id__evidence_review_task__task_id__close_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task/{task_id}/requirements/{requirement_id}/approve":{"post":{"tags":["reviews"],"summary":"Approve Evidence Requirement","description":"Approve a requirement in an evidence review task.\n\nSets reviewer_approved to True for the requirement.","operationId":"approve_evidence_requirement_reviews__review_id__evidence_review_task__task_id__requirements__requirement_id__approve_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task/{task_id}/requirements/{requirement_id}/unapprove":{"post":{"tags":["reviews"],"summary":"Unapprove Evidence Requirement","description":"Unapprove a requirement in an evidence review task.\n\nSets reviewer_approved to False for the requirement.","operationId":"unapprove_evidence_requirement_reviews__review_id__evidence_review_task__task_id__requirements__requirement_id__unapprove_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reviews/{review_id}/evidence-review-task/{task_id}/requirements/{requirement_id}/create-issue":{"post":{"tags":["reviews"],"summary":"Create Issue For Requirement","description":"Create an issue for a non-compliant requirement.\n\nCreates an Issue record and links it to the requirement.\nReturns the task response and the created issue_id.","operationId":"create_issue_for_requirement_reviews__review_id__evidence_review_task__task_id__requirements__requirement_id__create_issue_post","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueForRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/research-runs":{"post":{"tags":["risk-assessment"],"summary":"Create Research Run","operationId":"create_research_run_risk_assessment_research_runs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResearchRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["risk-assessment"],"summary":"List Research Runs","operationId":"list_research_runs_risk_assessment_research_runs_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResearchRunSummary"},"title":"Response List Research Runs Risk Assessment Research Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/research-runs/{agent_run_id}":{"get":{"tags":["risk-assessment"],"summary":"Get Research Run","operationId":"get_research_run_risk_assessment_research_runs__agent_run_id__get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/steps/{step_id}/result":{"get":{"tags":["risk-assessment"],"summary":"Get Step Result","operationId":"get_step_result_risk_assessment_steps__step_id__result_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/artifacts/{artifact_id}":{"get":{"tags":["risk-assessment"],"summary":"Get Artifact","operationId":"get_artifact_risk_assessment_artifacts__artifact_id__get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/assessments":{"post":{"tags":["risk-assessment"],"summary":"Create Risk Assessment","description":"Create an assessment, resolve (or start) research, and dispatch the parent run.\n\nThe reuse-vs-fresh research decision lives here, not in the workflow task,\nso a Hatchet replay cannot spend tokens a second time.","operationId":"create_risk_assessment_risk_assessment_assessments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskAssessmentRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAssessmentSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["risk-assessment"],"summary":"List Risk Assessments","operationId":"list_risk_assessments_risk_assessment_assessments_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RiskAssessmentSummary"},"title":"Response List Risk Assessments Risk Assessment Assessments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/assessments/{risk_assessment_id}":{"get":{"tags":["risk-assessment"],"summary":"Get Risk Assessment","description":"The run overview in one request (F-9).\n\nCarries every factor's status, progress and rating, so a 60-factor run is\ndriven by this single poll rather than one poll per row.","operationId":"get_risk_assessment_risk_assessment_assessments__risk_assessment_id__get","parameters":[{"name":"risk_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAssessmentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/assessments/{risk_assessment_id}/export":{"get":{"tags":["risk-assessment"],"summary":"Export Risk Assessment","description":"The whole run in one payload, for the client-rendered PDF.\n\nThe overview payload above carries no rationales and no citations — they are\nthe bulk of a factor and it is polled — so the export has its own route\nrather than fattening the polled one. Citations come back in a single query\nkeyed by version, never one per factor (rule F-9).\n\nThe dossier is deliberately absent: it is the vendor research the subagents\nread, not a rating anyone signed off on.","operationId":"export_risk_assessment_risk_assessment_assessments__risk_assessment_id__export_get","parameters":[{"name":"risk_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAssessmentExport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/assessments/{risk_assessment_id}/factors/{factor_assessment_id}/run":{"post":{"tags":["risk-assessment"],"summary":"Run Factor","operationId":"run_factor_risk_assessment_assessments__risk_assessment_id__factors__factor_assessment_id__run_post","parameters":[{"name":"risk_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Assessment Id"}},{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactorAssessmentSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/factor-assessments/{factor_assessment_id}":{"get":{"tags":["risk-assessment"],"summary":"Get Factor Assessment","description":"The single polled endpoint for the factor-detail screen (F-9).\n\nRating, rationale, resolved citations, prior ratings and the whole transcript\ncome from here; step *results* stay fetch-on-demand.","operationId":"get_factor_assessment_risk_assessment_factor_assessments__factor_assessment_id__get","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactorAssessmentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["risk-assessment"],"summary":"Update Factor Rating","description":"Set or clear the reviewer's manual override.\n\nSetting a value moves `review_state` to `OVERRIDDEN` and stamps the\nreviewer; explicitly clearing it (`null`) reverts to the AI's suggestion\nand `review_state` back to `PROPOSED` — clearing is \"undo the override\",\nnot \"approve\", so it does not stamp an approval. `reviewer_note` is\nindependent of the rating and can be set on its own.","operationId":"update_factor_rating_risk_assessment_factor_assessments__factor_assessment_id__patch","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFactorRatingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactorAssessmentSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/factor-assessments/{factor_assessment_id}/approve":{"post":{"tags":["risk-assessment"],"summary":"Approve Factor","description":"Confirm the AI's suggested rating as-is.\n\nClears any manual override — approving means \"no override needed\", which\nis a distinct reviewer decision from overriding. Only valid once a factor\nhas actually rated.","operationId":"approve_factor_risk_assessment_factor_assessments__factor_assessment_id__approve_post","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactorAssessmentSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/factor-assessments/{factor_assessment_id}/unapprove":{"post":{"tags":["risk-assessment"],"summary":"Unapprove Factor","description":"Undo an approval and go back to `PROPOSED`.\n\nAlso clears attribution, mirroring `requirement_checks.py`'s\n`/unapprove`. It does not touch `manual_inherent_risk_label` — undoing an\noverride is `PATCH .../{id}` with `manual_inherent_risk_label: null`, a\ndistinct action from undoing an approval.","operationId":"unapprove_factor_risk_assessment_factor_assessments__factor_assessment_id__unapprove_post","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactorAssessmentSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/factor-assessments/{factor_assessment_id}/training-runs":{"post":{"tags":["risk-assessment"],"summary":"Start Training Run","description":"Start a \"Teach Kobalt\" run from feedback on a rating the reviewer disagrees with.\n\nWhen the suggested rating differs from the factor's current effective level,\nit is applied as a manual override here — not by the agent — so it stands\nwhether the agent succeeds, gives up, or crashes. Otherwise the run records\nfeedback only and leaves the displayed rating unchanged.","operationId":"start_training_run_risk_assessment_factor_assessments__factor_assessment_id__training_runs_post","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTrainingRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["risk-assessment"],"summary":"List Training Runs","operationId":"list_training_runs_risk_assessment_factor_assessments__factor_assessment_id__training_runs_get","parameters":[{"name":"factor_assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Factor Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainingRunSummary"},"title":"Response List Training Runs Risk Assessment Factor Assessments  Factor Assessment Id  Training Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/training-runs/{training_run_id}":{"get":{"tags":["risk-assessment"],"summary":"Get Training Run","description":"The single polled endpoint for the training panel (F-9).\n\nTrace, experiments and the proposal all come from here; step *results* stay\nfetch-on-demand through `GET /steps/{id}/result`.","operationId":"get_training_run_risk_assessment_training_runs__training_run_id__get","parameters":[{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/training-runs/{training_run_id}/accept":{"post":{"tags":["risk-assessment"],"summary":"Accept Training Run","description":"Adopt the proposed guidance, and with it the experiment that justified it.\n\nTwo things move together on purpose: the factor's active guidance (which\nchanges every future run, for **every vendor**) and this factor's displayed\nresult, which becomes the winning experiment's rating and citations. A\nrewrite the reviewer accepts without seeing its effect applied would leave\nthe page contradicting the decision.","operationId":"accept_training_run_risk_assessment_training_runs__training_run_id__accept_post","parameters":[{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/training-runs/{training_run_id}/reject":{"post":{"tags":["risk-assessment"],"summary":"Reject Training Run","description":"Discard the proposed guidance. Nothing else moves.\n\nThe experiments stay on the factor as version rows — they are part of the\naudit trail of why the rewrite was refused — but none of them is on display,\nbecause a rejected proposal never became the factor's guidance.","operationId":"reject_training_run_risk_assessment_training_runs__training_run_id__reject_post","parameters":[{"name":"training_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Training Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/events":{"get":{"tags":["risk-assessment"],"summary":"Stream Risk Assessment Events","operationId":"stream_risk_assessment_events_risk_assessment_events_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Key"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-assessment/events/poll":{"get":{"tags":["risk-assessment"],"summary":"Poll Risk Assessment Events","operationId":"poll_risk_assessment_events_risk_assessment_events_poll_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Key"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamEventsPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors/areas":{"get":{"tags":["risk-factors"],"summary":"List Risk Areas","operationId":"list_risk_areas_risk_factors_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskAreaConfigView"},"type":"array","title":"Response List Risk Areas Risk Factors Areas Get"}}}}}},"post":{"tags":["risk-factors"],"summary":"Create Risk Area","operationId":"create_risk_area_risk_factors_areas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskAreaRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAreaConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors/areas/{risk_area_id}":{"patch":{"tags":["risk-factors"],"summary":"Update Risk Area","operationId":"update_risk_area_risk_factors_areas__risk_area_id__patch","parameters":[{"name":"risk_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskAreaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAreaConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["risk-factors"],"summary":"Delete Risk Area","operationId":"delete_risk_area_risk_factors_areas__risk_area_id__delete","parameters":[{"name":"risk_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Area Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors/areas/order":{"put":{"tags":["risk-factors"],"summary":"Reorder Risk Areas","operationId":"reorder_risk_areas_risk_factors_areas_order_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRiskAreasRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RiskAreaConfigView"},"type":"array","title":"Response Reorder Risk Areas Risk Factors Areas Order Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors":{"post":{"tags":["risk-factors"],"summary":"Create Risk Factor","operationId":"create_risk_factor_risk_factors_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskFactorRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskFactorConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors/{risk_factor_id}":{"patch":{"tags":["risk-factors"],"summary":"Update Risk Factor","operationId":"update_risk_factor_risk_factors__risk_factor_id__patch","parameters":[{"name":"risk_factor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Factor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRiskFactorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskFactorConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["risk-factors"],"summary":"Delete Risk Factor","operationId":"delete_risk_factor_risk_factors__risk_factor_id__delete","parameters":[{"name":"risk_factor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Factor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk-factors/areas/{risk_area_id}/order":{"put":{"tags":["risk-factors"],"summary":"Reorder Risk Factors","description":"Set the destination area's ordered factor list.\n\nFactors currently in another area are reparented, so one call covers both a\nreorder within an area and a drag between areas.","operationId":"reorder_risk_factors_risk_factors_areas__risk_area_id__order_put","parameters":[{"name":"risk_area_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Area Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRiskFactorsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskAreaConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/review":{"post":{"tags":["reports"],"summary":"Create Review Report","operationId":"create_review_report_reports_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/review/from-task/{task_id}":{"post":{"tags":["reports"],"summary":"Generate Reporting Run From Task","description":"Create a folder (if project_name is set), a ReviewReportingAgentRun, and\ndispatch the agent run workflow for the given ReviewReportingTask row.\nThe row itself was already created at stage-transition time.","operationId":"generate_reporting_run_from_task_reports_review_from_task__task_id__post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromReportingTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/documents-consolidated-view":{"post":{"tags":["reports"],"summary":"Create Documents Consolidated View","operationId":"create_documents_consolidated_view_reports_documents_consolidated_view_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentsConsolidatedViewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/review/{agent_run_id}/status":{"get":{"tags":["reports"],"summary":"Get Review Report Status","operationId":"get_review_report_status_reports_review__agent_run_id__status_get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReportStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates":{"get":{"tags":["templates"],"summary":"List Templates","operationId":"list_templates_templates_get","parameters":[{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}],"title":"Template Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftingTemplateResponse"},"title":"Response List Templates Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/types":{"get":{"tags":["templates"],"summary":"Get Template Types","description":"Get all available template types","operationId":"get_template_types_templates_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get Template Types Templates Types Get"}}}}}}},"/templates/new":{"post":{"tags":["templates"],"summary":"Create Template","operationId":"create_template_templates_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateBase"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/from":{"post":{"tags":["templates"],"summary":"Create Template From File","operationId":"create_template_from_file_templates_from_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_template_from_file_templates_from_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/templates/{template_id}":{"get":{"tags":["templates"],"summary":"Get Template","operationId":"get_template_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["templates"],"summary":"Update Template","operationId":"update_template_templates__template_id__put","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/DraftingTemplateBase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftingTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["templates"],"summary":"Delete Template","operationId":"delete_template_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Template Templates  Template Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/timeline":{"get":{"tags":["timeline"],"summary":"Get Timeline","operationId":"get_timeline_timeline_get","parameters":[{"name":"vendor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"array","items":{"$ref":"#/components/schemas/TimelineEventPayload"}}]},"title":"Response Get Timeline Timeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/export.csv":{"get":{"tags":["tuning"],"summary":"Export Tuning Data Csv","operationId":"export_tuning_data_csv_tuning_export_csv_get","parameters":[{"name":"started_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on Reviews.started_at (ISO-8601).","title":"Started After"},"description":"Inclusive lower bound on Reviews.started_at (ISO-8601)."},{"name":"started_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive upper bound on Reviews.started_at (ISO-8601).","title":"Started Before"},"description":"Inclusive upper bound on Reviews.started_at (ISO-8601)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Tuning Data Csv Tuning Export Csv Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/reviews":{"get":{"tags":["tuning"],"summary":"Get Review Tuning Summaries","operationId":"get_review_tuning_summaries_tuning_reviews_get","parameters":[{"name":"started_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on Reviews.started_at (ISO-8601).","title":"Started After"},"description":"Inclusive lower bound on Reviews.started_at (ISO-8601)."},{"name":"started_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive upper bound on Reviews.started_at (ISO-8601).","title":"Started Before"},"description":"Inclusive upper bound on Reviews.started_at (ISO-8601)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewTuningListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/reviews/{review_id}/feedback":{"get":{"tags":["tuning"],"summary":"List Review Feedback","operationId":"list_review_feedback_tuning_reviews__review_id__feedback_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RequirementFeedbackDetail"},"title":"Response List Review Feedback Tuning Reviews  Review Id  Feedback Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/requirement-checks/{requirement_id}/test-classify":{"post":{"tags":["tuning"],"summary":"Test Classify Requirement Check","operationId":"test_classify_requirement_check_tuning_requirement_checks__requirement_id__test_classify_post","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Requirement Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TestClassifyRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestClassifyResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/control-assessments/{agent_run_id}":{"get":{"tags":["tuning"],"summary":"Get Control Assessment Trace","description":"The persisted step trace of one control-assessment run, for the thinking hover.","operationId":"get_control_assessment_trace_tuning_control_assessments__agent_run_id__get","parameters":[{"name":"agent_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlAssessmentTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/runs":{"post":{"tags":["tuning"],"summary":"Create Tuning Run","operationId":"create_tuning_run_tuning_runs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTuningRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTuningRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tuning"],"summary":"List Tuning Runs","operationId":"list_tuning_runs_tuning_runs_get","parameters":[{"name":"review_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TuningRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tuning/runs/{tuning_run_id}":{"get":{"tags":["tuning"],"summary":"Get Tuning Run","operationId":"get_tuning_run_tuning_runs__tuning_run_id__get","parameters":[{"name":"tuning_run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tuning Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TuningRunDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/batch":{"get":{"tags":["risks"],"summary":"Get Risks By Ids","description":"Fetch several risks with the same joins and floors as ``GET /risks/{id}``.\n\nBatched over risk ids the way ``/files/metadata`` is over file ids, and for\nthe same reason: the marketing analysis column mounts one card per finding\nand each card used to hit ``GET /risks/{id}``, which is one pooled\nconnection per card. Missing, other-company, and (for non-admins)\nrule-suppressed ids are left out of the mapping, so the caller maps back\nover the ids it asked for.","operationId":"get_risks_by_ids_risks_batch_get","parameters":[{"name":"risk_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":250,"title":"Risk Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentRiskIssueResponse"},"propertyNames":{"format":"uuid"},"title":"Response Get Risks By Ids Risks Batch Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/bulk/status":{"post":{"tags":["risks"],"summary":"Bulk Update Risk Status","description":"Dismiss several risks with one reason and note.\n\nRestricted to ``dismissed``: bulk flag/clear is not a product action, and\nthis path skips issue-creation and the flagged-after-ignore email that the\nsingle-risk status write still owns. TipTap seeding matches the card dismiss\nbecause both call ``apply_status_change``. When ``selection`` is present\n(Select area), the drawn box is stored as training data in the same\ntransaction; the server still does not re-hit-test geometry.","operationId":"bulk_update_risk_status_risks_bulk_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRiskStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRiskMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/bulk/ignore":{"post":{"tags":["risks"],"summary":"Bulk Update Ignore Comment","description":"Apply one ignore comment to several risks.\n\nSame company/suppression/permission guards as ``POST /risks/{id}/ignore``.\nDoes not stamp review_status — a marketer ignore never did. When\n``selection`` is present, the drawn box is stored as training data in the\nsame transaction.","operationId":"bulk_update_ignore_comment_risks_bulk_ignore_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRiskIgnoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRiskMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/{risk_id}/ignore":{"post":{"tags":["risks"],"summary":"Update Ignore Comment","operationId":"update_ignore_comment_risks__risk_id__ignore_post","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_ignore_comment_risks__risk_id__ignore_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/{risk_id}/notes":{"get":{"tags":["risks"],"summary":"Get Risk Notes","description":"Get notes for a specific risk.\n\nMarketing ``notes`` carry the reviewer's appended dismiss free-text, so they are\nreviewer-only: a **marketing** non-writer gets a blanked (``None``) doc, matching\n``redact_reviewer_free_text_for_reader`` and the ``canWrite`` gate on\n``MarketingRiskCard`` (which hides ``RiskNotes`` for non-writers). Base/\nnon-marketing Notes render to every viewer, so they are always returned.","operationId":"get_risk_notes_risks__risk_id__notes_get","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["risks"],"summary":"Update Risk Notes","description":"Update notes for a specific risk.","operationId":"update_risk_notes_risks__risk_id__notes_post","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Notes"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/{risk_id}":{"get":{"tags":["risks"],"summary":"Get Risk By Id","description":"Fetch a single risk with file join; scoped to caller company unless admin.\n\nReviewer-only free-text (``dismiss_note`` on any run, plus the TipTap ``notes``\ndoc on marketing runs) is redacted for callers without write access (marketers),\nmirroring the ``canWrite`` gating on the risk cards.","operationId":"get_risk_by_id_risks__risk_id__get","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRiskIssueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risks/{risk_id}/status":{"post":{"tags":["risks"],"summary":"Update Risk Status","description":"Update a risk's status and resolved flag.\nIf setting status to \"flag\" for a non-marketing run and there's no linked Issue yet,\ncreate an Issue and link it to the DocumentRisk.\n\nFor marketing ``dismissed``, require ``dismiss_reason``; ``other`` also\nrequires a non-empty ``dismiss_note``. TipTap ``notes`` is the source of\ntruth for reviewer text: we add a single managed ``Dismissed for: {reason}``\nseed line only while Notes are empty or still lead with that seed. A *fresh*\ndismissal's free-text note is appended as a trailing reviewer-owned paragraph;\n*editing* an existing dismissal replaces that note paragraph in place (or\nremoves it when cleared) — the client prefills the modal from ``dismiss_note``,\nso an edit never duplicates or strands a stale note. Clearing dismiss strips\nthe leading seed line and the modal-note paragraph it appended (tracked 1:1 by\n``dismiss_note``), keeping Notes consistent with the now-null ``dismiss_note``;\ngenuinely hand-authored paragraphs are preserved.","operationId":"update_risk_status_risks__risk_id__status_post","parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_risk_status_risks__risk_id__status_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run":{"get":{"tags":["run"],"summary":"Get Run By Id","operationId":"get_run_by_id_run_get","parameters":[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsWithDocuments"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/vendor":{"get":{"tags":["run"],"summary":"Get Runs For Vendor","operationId":"get_runs_for_vendor_run_vendor_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Type"}},{"name":"marketing_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Archived"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunsWithDocuments"},"title":"Response Get Runs For Vendor Run Vendor Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/archive":{"post":{"tags":["run"],"summary":"Archive Run","operationId":"archive_run_run_archive_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_archive_run_run_archive_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/":{"delete":{"tags":["run"],"summary":"Delete Run","operationId":"delete_run_run__delete","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_run_run__delete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/pdf":{"post":{"tags":["run"],"summary":"Create And Host Pdf","operationId":"create_and_host_pdf_run_pdf_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_and_host_pdf_run_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create And Host Pdf Run Pdf Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/notes":{"get":{"tags":["run"],"summary":"Get Notes","operationId":"get_notes_run_notes_get","parameters":[{"name":"run_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/update/notes":{"post":{"tags":["run"],"summary":"Update Notes","operationId":"update_notes_run_update_notes_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_notes_run_update_notes_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/update/content":{"post":{"tags":["run"],"summary":"Update Content","operationId":"update_content_run_update_content_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_content_run_update_content_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{run_id}/results":{"post":{"tags":["run"],"summary":"Update Results","operationId":"update_results_run__run_id__results_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResultsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{run_id}/share":{"post":{"tags":["run"],"summary":"Share Run","operationId":"share_run_run__run_id__share_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{run_id}/manual-risk":{"post":{"tags":["run"],"summary":"Add Manual Risk","operationId":"add_manual_risk_run__run_id__manual_risk_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddManualRiskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/run/{run_id}/risks":{"get":{"tags":["run"],"summary":"Get Run Risks","description":"Get all risks for a specific run, including those that were manually added.\nMarketing runs come back in collateral reading order (see\n`sort_risks_in_reading_order`); every other run type is newest-first, and\n`created` is included either way so the client can sort by it.\n\nReviewer-only free-text (``dismiss_note`` on any run, plus the TipTap ``notes``\ndoc on marketing runs) is redacted for callers without write access (marketers),\nmirroring the ``canWrite`` gating on the risk cards.","operationId":"get_run_risks_run__run_id__risks_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRiskIssueResponse"},"title":"Response Get Run Risks Run  Run Id  Risks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/notifications/preferences":{"get":{"tags":["settings"],"summary":"Get Notification Preferences","description":"Each product notification type with the user's effective on/off state.","operationId":"get_notification_preferences_settings_notifications_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NotificationPreference"},"type":"array","title":"Response Get Notification Preferences Settings Notifications Preferences Get"}}}}}},"post":{"tags":["settings"],"summary":"Set Notification Preference","description":"Upsert the current user's preference for a single notification type.","operationId":"set_notification_preference_settings_notifications_preferences_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Set Notification Preference Settings Notifications Preferences Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/available-roles":{"get":{"tags":["settings"],"summary":"Get Available Roles","description":"Get assignable roles: company-specific roles if they exist, otherwise the global full_user role.","operationId":"get_available_roles_settings_available_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Available Roles Settings Available Roles Get"}}}}}}},"/settings/assignable-roles":{"get":{"tags":["settings"],"summary":"Get Assignable Roles By Module","description":"Per-module role options for the user role editor.\n\n``manageable`` is true only when the company runs entirely on its own\narchetype-tagged roles — the precondition for assigning a role per module.\nA company still on global roles, or with any archetype-less custom role,\nis not manageable and the editor stays hidden.","operationId":"get_assignable_roles_by_module_settings_assignable_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Assignable Roles By Module Settings Assignable Roles Get"}}}}}}},"/settings/users/roles":{"get":{"tags":["settings"],"summary":"Get All Users Module Roles","description":"Every company user's company-scoped archetype roles, keyed by user_id.\n\nOne query for the whole table (no per-row fan-out) so the users list can\nshow each user's per-module roles inline.","operationId":"get_all_users_module_roles_settings_users_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object","title":"Response Get All Users Module Roles Settings Users Roles Get"}}}}}}},"/settings/users/{user_id}/roles":{"get":{"tags":["settings"],"summary":"Get User Module Roles","description":"The user's current company archetype-role for each module they hold one in.","operationId":"get_user_module_roles_settings_users__user_id__roles_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get User Module Roles Settings Users  User Id  Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["settings"],"summary":"Set User Module Roles","description":"Set the user's role in one or more modules, at most one role per module.\n\nEach assignment names a module and either the archetype-tagged company role\nto grant there or ``None`` to remove the user's role in that module. Only\ncompany-scoped archetype roles are touched; any global or custom role the\nuser holds is left alone. Module access follows from the archetype's module.","operationId":"set_user_module_roles_settings_users__user_id__roles_put","parameters":[{"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/UpdateUserRolesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set User Module Roles Settings Users  User Id  Roles Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/company-marketing-teams":{"get":{"tags":["settings"],"summary":"Get Company Marketing Teams","description":"Get all marketing teams for the company.","operationId":"get_company_marketing_teams_settings_company_marketing_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Company Marketing Teams Settings Company Marketing Teams Get"}}}}}}},"/settings/user/add":{"post":{"tags":["settings"],"summary":"Add Company User","description":"Validate and add a single user to the company.\n\n- Validates email domain against company domains or non-personal domains\n- Ensures user does not already exist\n- Validates provided role_id is allowed (company role or global full_user)\n- Sends welcome email asynchronously (best-effort)","operationId":"add_company_user_settings_user_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithRoleID"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/users":{"get":{"tags":["settings"],"summary":"Get Company Users","description":"Get all users in the company.","operationId":"get_company_users_settings_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Users"},"type":"array","title":"Response Get Company Users Settings Users Get"}}}}}}},"/settings/notifications/news/bulk":{"post":{"tags":["settings"],"summary":"Set Bulk News Notifications","description":"Update news notification subscriptions for multiple vendors in bulk.","operationId":"set_bulk_news_notifications_settings_notifications_news_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNewsNotificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/negative-news/config":{"get":{"tags":["settings"],"summary":"Get Negative News Config","description":"Return the tenant's negative news configuration and current subscription count.","operationId":"get_negative_news_config_settings_negative_news_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsConfigResponse"}}}}}},"post":{"tags":["settings"],"summary":"Update Negative News Config","description":"Upsert the tenant's negative news configuration (create_issues only).","operationId":"update_negative_news_config_settings_negative_news_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNegativeNewsConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativeNewsConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/negative-news/subscriptions":{"get":{"tags":["settings"],"summary":"Get Negative News Subscriptions","description":"The tenant's whole vendor catalogue for the negative news panel.\n\nUnwatched vendors included, with per-tenant subscriber counts and the\ncaller's subscribed flag. Archived and SELF rows are dropped unless still\nwatched.","operationId":"get_negative_news_subscriptions_settings_negative_news_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NegativeNewsSubscriptionItem"},"type":"array","title":"Response Get Negative News Subscriptions Settings Negative News Subscriptions Get"}}}}}}},"/settings/disclosures/generate":{"post":{"tags":["settings"],"summary":"Generate Disclosures","description":"Generate disclosure documents from an Excel file.","operationId":"generate_disclosures_settings_disclosures_generate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_disclosures_settings_disclosures_generate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDisclosuresResponse"}}}},"400":{"description":"No valid sheets; body includes invalid_sheets"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/disclosures/upload-versions":{"post":{"tags":["settings"],"summary":"Upload Disclosure Versions","description":"Upload previously-generated disclosures as new versions of existing files.\n\n`s3_key` for each item must come from a prior /disclosures/generate response;\nwe validate it points inside the company's disclosures folder before fetching.","operationId":"upload_disclosure_versions_settings_disclosures_upload_versions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDisclosureVersionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDisclosureVersionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/disclosures/upload-new":{"post":{"tags":["settings"],"summary":"Upload New Disclosures","description":"Upload unmatched generated disclosures as brand-new marketing_standards files.","operationId":"upload_new_disclosures_settings_disclosures_upload_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadNewDisclosuresRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadNewDisclosuresResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/disclosures/approaches":{"get":{"tags":["settings"],"summary":"List Disclosure Approaches","operationId":"list_disclosure_approaches_settings_disclosures_approaches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DisclosureApproachRead"},"type":"array","title":"Response List Disclosure Approaches Settings Disclosures Approaches Get"}}}}}},"post":{"tags":["settings"],"summary":"Create Disclosure Approach","operationId":"create_disclosure_approach_settings_disclosures_approaches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureApproachCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureApproachRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/disclosures/approaches/{approach_id}":{"patch":{"tags":["settings"],"summary":"Update Disclosure Approach","operationId":"update_disclosure_approach_settings_disclosures_approaches__approach_id__patch","parameters":[{"name":"approach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approach Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureApproachUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisclosureApproachRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["settings"],"summary":"Delete Disclosure Approach","operationId":"delete_disclosure_approach_settings_disclosures_approaches__approach_id__delete","parameters":[{"name":"approach_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approach Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Disclosure Approach Settings Disclosures Approaches  Approach Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support/request":{"post":{"tags":["support"],"summary":"Create Support Request","description":"Create a new support request.","operationId":"create_support_request_support_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Create Support Request Support Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams":{"get":{"tags":["teams"],"summary":"List Teams","description":"List all teams for the company, with their active members.","operationId":"list_teams_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response List Teams Teams Get"}}}}}},"post":{"tags":["teams"],"summary":"Create Team","description":"Create a new team for the company.","operationId":"create_team_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}":{"patch":{"tags":["teams"],"summary":"Rename Team","description":"Rename a team.","operationId":"rename_team_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Delete Team","description":"Delete a team. Memberships are removed via CASCADE.","operationId":"delete_team_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/teams/{team_id}/members":{"put":{"tags":["teams"],"summary":"Set Team Members","description":"Replace a team's membership with the given set of company users.","operationId":"set_team_members_teams__team_id__members_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/backend__models__pydantic__api__requests__teams__TeamMembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/permissions":{"get":{"tags":["users"],"summary":"Check If Self Has Permission","operationId":"check_if_self_has_permission_users_permissions_get","parameters":[{"name":"permission_names","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Permission Names"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Check If Self Has Permission Users Permissions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/roles":{"get":{"tags":["users"],"summary":"Get My Role Names","description":"Names of the roles assigned to the current user (e.g. \"full_user\",\n\"vendor_owner\"). A standalone read so callers (role-gated routing, profile\nmutations) don't have to thread role_names through every response that\nhappens to touch the user — see UserResponse, which intentionally omits it.","operationId":"get_my_role_names_users_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get My Role Names Users Roles Get"}}}}}}},"/users/role-archetypes":{"get":{"tags":["users"],"summary":"Get My Role Archetypes","description":"Product-owned archetype keys of the current user's roles (e.g.\n\"business_owner\"). Companion to /roles for gating that keys off a role's\nstable archetype rather than its renameable name — the My Services persona\ntreats any business-owner role as a vendor owner, whatever it is called.","operationId":"get_my_role_archetypes_users_role_archetypes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response Get My Role Archetypes Users Role Archetypes Get"}}}}}}},"/users/marketing/teams":{"get":{"tags":["users"],"summary":"Get My Marketing Teams","description":"Returns the marketing teams the current user may file work under.\n\nReads the same resolution the write paths do, so the picker offers exactly\nthe teams they will accept. The two diverge for a masquerading operator, who\nis a member of none of the tenant's teams: scoping this by membership leaves\nthe picker empty while the upload silently chooses a team for them.","operationId":"get_my_marketing_teams_users_marketing_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketingTeamMembership"},"type":"array","title":"Response Get My Marketing Teams Users Marketing Teams Get"}}}}}}},"/users/vendor":{"post":{"tags":["users"],"summary":"Create Vendor User","operationId":"create_vendor_user_users_vendor_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVendorUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/profile":{"get":{"tags":["users"],"summary":"Get User Profile","description":"Get the user's profile information.","operationId":"get_user_profile_users_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}},"put":{"tags":["users"],"summary":"Update User Profile","description":"Update the user's profile information.","operationId":"update_user_profile_users_profile_put","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_user_profile_users_profile_put"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/whats-new/last-viewed":{"put":{"tags":["users"],"summary":"Update Whats New Last Viewed","description":"Stamp the current user's Help Center 'What's New' last-viewed time to now.\n\nCalled when the user opens the What's New tab; the sidebar compares this against\nthe changelog entry dates to derive the unseen count.","operationId":"update_whats_new_last_viewed_users_whats_new_last_viewed_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsNewLastViewedResponse"}}}}}}},"/users/company":{"get":{"tags":["users"],"summary":"Get Users For Company","operationId":"get_users_for_company_users_company_get","parameters":[{"name":"filter_self","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Filter Self"}},{"name":"marketing_team_filter","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Marketing Team Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponse"},"title":"Response Get Users For Company Users Company Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"delete":{"tags":["users"],"summary":"Delete Company User","description":"Soft delete a user from the company.","operationId":"delete_company_user_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Update Company User","description":"Update a user's first name, last name, and email address.","operationId":"update_company_user_users__user_id__patch","parameters":[{"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/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/profile/picture":{"post":{"tags":["users"],"summary":"Upload Profile Picture","description":"Upload a profile picture for the current user.","operationId":"upload_profile_picture_users_profile_picture_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_profile_picture_users_profile_picture_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete Profile Picture","description":"Delete the current user's profile picture.","operationId":"delete_profile_picture_users_profile_picture_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/users/profile/picture/url":{"get":{"tags":["users"],"summary":"Get Profile Picture Url","description":"Get a presigned URL for a profile picture.","operationId":"get_profile_picture_url_users_profile_picture_url_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/profile/pictures/all":{"get":{"tags":["users"],"summary":"Get All Profile Picture Urls","description":"Get all profile picture URLs for a company.","operationId":"get_all_profile_picture_urls_users_profile_pictures_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/public/company/{company_id}":{"get":{"tags":["public"],"summary":"Get Company Public Info","description":"Public endpoint — returns basic branding info for a company.\nUsed by the vendor portal login page to show the inviting company's name and logo.","operationId":"get_company_public_info_public_company__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPublicInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/company/{company_id}/email-logo":{"get":{"tags":["public"],"summary":"Get Company Email Logo","description":"The logo this company's branded email embeds in its header.\n\nPublic and never-expiring by necessity: an `<img src>` in delivered email is\nfetched whenever the recipient opens it, by a proxy carrying no session. The\nbytes are only ever what an admin chose to put on outbound email.\n\nThe `v` in the URL is a cache-buster, not a selector: an older email's link\nstill serves the current logo rather than 404ing.","operationId":"get_company_email_logo_public_company__company_id__email_logo_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services":{"post":{"tags":["vendor_services"],"summary":"Create Vendor Service","operationId":"create_vendor_service_vendor_services_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorServiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services/all":{"get":{"tags":["vendor_services"],"summary":"Get All Services","description":"Global, paginated list of services across every vendor for the company.\n\nEach returned service is enriched with its custom field values, internal\nPOC name, and the owning vendor's display fields so the Services overview\ncan render without a follow-up fetch per service.","operationId":"get_all_services_vendor_services_all_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ServiceStatus","default":"active"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"criticality","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Criticality"}},{"name":"inherent_risk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Inherent Risk"}},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lifecycle Status"}},{"name":"vendor_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Vendor Ids"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}},{"name":"internal_poc","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Internal Poc"}},{"name":"custom_field","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field"}},{"name":"custom_field_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Text"}},{"name":"custom_field_number","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Number"}},{"name":"custom_field_date","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Date"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Sort Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_AllServicesResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services/all/export":{"get":{"tags":["vendor_services"],"summary":"Export Services","description":"Filtered, unpaginated CSV export of the Services table.\n\nHonors the same filters/search/sort as ``GET /vendor-services/all``.\nAvailable to anyone who can view the page (same gating as the list\nendpoint — no additional permission check). ``columns`` mirrors the\nColumns picker: a list of standard column ids and/or\n``custom_field:<uuid>`` entries, in the order to emit them; omitted\nexports every standard column followed by every non-canonical custom\nfield defined for services. One row per service (services don't nest).","operationId":"export_services_vendor_services_all_export_get","parameters":[{"name":"columns","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Columns"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ServiceStatus","default":"active"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"criticality","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Criticality"}},{"name":"inherent_risk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Inherent Risk"}},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lifecycle Status"}},{"name":"vendor_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Vendor Ids"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}},{"name":"internal_poc","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Internal Poc"}},{"name":"custom_field","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field"}},{"name":"custom_field_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Text"}},{"name":"custom_field_number","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Number"}},{"name":"custom_field_date","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Date"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Services Vendor Services All Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services/internal-pocs":{"get":{"tags":["vendor_services"],"summary":"Get Service Internal Pocs","description":"Distinct internal POCs across the company's services.\n\nPowers the Services \"Internal POC\" filter. Derived from the services rather\nthan the company roster so the options match what the column can show:\nteammates who are nobody's POC are left out, and users who have since been\ndeactivated stay filterable while their name is still rendered.\n\nSpans both active and archived services on purpose. Narrowing to the status\nthe list happens to be showing would drop options out from under a POC the\nuser had already checked, and `ColumnFilterMenu` only renders the options it\nis given — the stale id would keep filtering the query while becoming\nimpossible to uncheck. Same reason the other active filters don't narrow it.","operationId":"get_service_internal_pocs_vendor_services_internal_pocs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssigneeOption"},"type":"array","title":"Response Get Service Internal Pocs Vendor Services Internal Pocs Get"}}}}}}},"/vendor-services/vendor/{vendor_id}":{"get":{"tags":["vendor_services"],"summary":"Get Vendor Services","operationId":"get_vendor_services_vendor_services_vendor__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorServiceResponse"},"title":"Response Get Vendor Services Vendor Services Vendor  Vendor Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services/{service_id}":{"put":{"tags":["vendor_services"],"summary":"Update Vendor Service","operationId":"update_vendor_service_vendor_services__service_id__put","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorServiceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["vendor_services"],"summary":"Delete Vendor Service","operationId":"delete_vendor_service_vendor_services__service_id__delete","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-services/{service_id}/status":{"get":{"tags":["vendor_services"],"summary":"Get Vendor Service Status","operationId":"get_vendor_service_status_vendor_services__service_id__status_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Vendor Service Status Vendor Services  Service Id  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["vendor_services"],"summary":"Update Vendor Service Status","operationId":"update_vendor_service_status_vendor_services__service_id__status_put","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServiceStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/summary":{"get":{"tags":["analytics"],"summary":"Get Analytics Summary","description":"KPI strip: total vendors, total services, active reviews, open issues.","operationId":"get_analytics_summary_vendors_analytics_summary_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/vendors":{"get":{"tags":["analytics"],"summary":"Get Analytics Vendors","description":"Vendor breakdowns: approval, status, risk, criticality, assignee.","operationId":"get_analytics_vendors_vendors_analytics_vendors_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/services":{"get":{"tags":["analytics"],"summary":"Get Analytics Services","description":"Service breakdowns: IRA, internal POC, top vendors.","operationId":"get_analytics_services_vendors_analytics_services_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/reviews":{"get":{"tags":["analytics"],"summary":"Get Analytics Reviews","description":"Review breakdowns: active reviews by stage, open IRAs by recipient.","operationId":"get_analytics_reviews_vendors_analytics_reviews_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/issues":{"get":{"tags":["analytics"],"summary":"Get Analytics Issues","description":"Issue breakdowns: status, plus open-issue severity / company / assignee.","operationId":"get_analytics_issues_vendors_analytics_issues_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/analytics/analyst":{"get":{"tags":["analytics"],"summary":"Get Analytics Analyst","description":"Analyst \"My Work\" analytics, scoped to the calling user's own services.\n\nAggregates the analyst charts and KPI tiles server-side: the user's active\nservices bucketed by review state, the reviews covering those services\nbucketed by stage, outstanding IRAs on those services by recipient, plus the\ncount of active reviews covering those services and open issues assigned to\nthe user. The user is taken from the auth context (never a client param) so a\nviewer can only ever see their own workload. Mirrors the company-wide\ndefinitions in ``get_analytics_services`` (review state via the canonical\n``ServiceIRAReviewTask`` link) so the views can't drift.","operationId":"get_analytics_analyst_vendors_analytics_analyst_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalystAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/all":{"get":{"tags":["vendors"],"summary":"Get Vendors","operationId":"get_vendors_vendors_all_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/VendorStatus","default":"active"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lifecycle Status"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}},{"name":"inherent_risk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Inherent Risk"}},{"name":"subcontractor_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Subcontractor Ids"}},{"name":"assignee_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Assignee Ids"}},{"name":"custom_field","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field"}},{"name":"custom_field_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Text"}},{"name":"custom_field_number","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Number"}},{"name":"custom_field_date","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Date"}},{"name":"next_review_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Review From"}},{"name":"next_review_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Review To"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Sort Dir"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_GetVendorsResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/all/export":{"get":{"tags":["vendors"],"summary":"Export Vendors","description":"Filtered, unpaginated CSV export of the Overview table.\n\nHonors the same filters/search/sort as ``GET /vendors/all``. Available to\nanyone who can view the page (same gating as the list endpoint — no\nadditional permission check). ``columns`` mirrors the Columns picker:\na list of standard column ids and/or ``custom_field:<uuid>`` entries, in\nthe order to emit them; omitted exports every standard column followed by\nevery non-canonical custom field defined for vendors.","operationId":"export_vendors_vendors_all_export_get","parameters":[{"name":"columns","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Columns"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/VendorStatus","default":"active"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lifecycle Status"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}},{"name":"inherent_risk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Inherent Risk"}},{"name":"subcontractor_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Subcontractor Ids"}},{"name":"assignee_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Assignee Ids"}},{"name":"custom_field","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field"}},{"name":"custom_field_text","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Text"}},{"name":"custom_field_number","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Number"}},{"name":"custom_field_date","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Custom Field Date"}},{"name":"next_review_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Review From"}},{"name":"next_review_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Review To"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Vendors Vendors All Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/assignees":{"get":{"tags":["vendors"],"summary":"Get Vendor Assignees","description":"Distinct users assigned to at least one of the company's vendors.\n\nPowers the Overview assignee filter, whose options can no longer be derived\nfrom a single page of vendors.","operationId":"get_vendor_assignees_vendors_assignees_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssigneeOption"},"type":"array","title":"Response Get Vendor Assignees Vendors Assignees Get"}}}}}}},"/vendors/options":{"get":{"tags":["vendors"],"summary":"Get Vendor Options","description":"All active vendors with the minimal fields the intake vendor picker needs.\n\nUnpaginated on purpose: the picker fuzzy-searches the full list client-side.\nKept separate from the paginated ``/all`` so the picker isn't truncated.\n``entity_type`` scopes the list to the active view mode's relationships.","operationId":"get_vendor_options_vendors_options_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorOptionResponse"},"title":"Response Get Vendor Options Vendors Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/list":{"get":{"tags":["vendors"],"summary":"Get Vendor List","operationId":"get_vendor_list_vendors_list_get","parameters":[{"name":"self_first","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Self First"}},{"name":"entity_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EntityType"}},{"type":"null"}],"title":"Entity Types"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorListResponse"},"title":"Response Get Vendor List Vendors List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/subcontractors/available":{"get":{"tags":["vendors"],"summary":"Get Available Subcontractors","description":"Get all companies that can be selected as subcontractors.\n\nArgs:\n    assigned_only: If True, only return subcontractors currently assigned to vendors.\n                  If False (default), return all available options (active vendors + assigned subcontractors).\n\nThis includes:\n1. All active vendors for the provided company_id (when assigned_only=False)\n2. All companies that are already linked as subcontractors to any vendor","operationId":"get_available_subcontractors_vendors_subcontractors_available_get","parameters":[{"name":"assigned_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Assigned Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorListResponse"},"title":"Response Get Available Subcontractors Vendors Subcontractors Available Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/self":{"get":{"tags":["vendors"],"summary":"Get Self Vendor","operationId":"get_self_vendor_vendors_self_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/vendors/{vendor_id}":{"get":{"tags":["vendors"],"summary":"Get Vendor","operationId":"get_vendor_vendors__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVendorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/{vendor_id}/status":{"get":{"tags":["vendors"],"summary":"Get Vendor Status","operationId":"get_vendor_status_vendors__vendor_id__status_get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Vendor Status Vendors  Vendor Id  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/status":{"put":{"tags":["vendors"],"summary":"Update Vendor Status","operationId":"update_vendor_status_vendors_status_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/risk-level":{"put":{"tags":["vendors"],"summary":"Update Vendor Risk Level","operationId":"update_vendor_risk_level_vendors_risk_level_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorRiskLevelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/criticality":{"put":{"tags":["vendors"],"summary":"Update Vendor Criticality","operationId":"update_vendor_criticality_vendors_criticality_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorCriticalityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/lifecycle-status":{"put":{"tags":["vendors"],"summary":"Update Vendor Lifecycle Status","operationId":"update_vendor_lifecycle_status_vendors_lifecycle_status_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorLifecycleStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/restriction":{"put":{"tags":["vendors"],"summary":"Update Vendor Restriction","operationId":"update_vendor_restriction_vendors_restriction_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorRestrictionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/{vendor_id}/rename":{"patch":{"tags":["vendors"],"summary":"Rename Vendor","operationId":"rename_vendor_vendors__vendor_id__rename_patch","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameVendorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/add":{"post":{"tags":["vendors"],"summary":"Add Vendor","operationId":"add_vendor_vendors_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVendorRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorAddSuccess","anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Companies"},{"$ref":"#/components/schemas/VendorAddSuccess"}],"title":"Response Add Vendor Vendors Add Post"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorAddSuccess"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/update":{"post":{"tags":["vendors"],"summary":"Update Vendor","operationId":"update_vendor_vendors_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVendorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/{vendor_id}/risks/csv":{"get":{"tags":["vendors"],"summary":"Export Vendor Risks Csv","operationId":"export_vendor_risks_csv_vendors__vendor_id__risks_csv_get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Export Vendor Risks Csv Vendors  Vendor Id  Risks Csv Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/{vendor_id}/risks":{"get":{"tags":["vendors"],"summary":"Get All Vendor Risks","description":"Return all risks identified for the given vendor, regardless of whether they are shared or not.","operationId":"get_all_vendor_risks_vendors__vendor_id__risks_get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"issue_status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DocumentRiskIssueRequestTypes","default":"all"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRiskIssueResponse"},"title":"Response Get All Vendor Risks Vendors  Vendor Id  Risks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendors/subcontractors/add":{"post":{"tags":["vendors"],"summary":"Add Subcontractor","description":"Add a new subcontractor company. This creates a company entry that can be linked to vendors.\nSimilar to adding a vendor but without creating a vendor relationship.","operationId":"add_subcontractor_vendors_subcontractors_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSubcontractorRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success","anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Companies"},{"$ref":"#/components/schemas/Success"}],"title":"Response Add Subcontractor Vendors Subcontractors Add Post"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Companies"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vrm/my-services":{"get":{"tags":["vrm"],"summary":"Get My Services","description":"Service-centric VRM landing for the current user.\n\nServices are the primary entity: each service the user is the internal POC\nfor, plus every service on a vendor they are assigned to, is joined to its\nlatest review. Anything needing the user's action is flagged so the client\ncan pin it to the top \"need your attention\" band.","operationId":"get_my_services_vrm_my_services_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyServicesResponse"}}}}}}},"/vrm/my-contracts":{"get":{"tags":["vrm"],"summary":"Get My Contracts","description":"The current term of every contract in the caller's book of business.\n\nThe Contracts tab of the My Services landing: ``GET /contracts/current-terms``\nnarrowed to the vendors this user is assigned to and the services they are the\ninternal POC for (``_my_contracts_clause``) — the same book the Services tab\nlists, built by the same ``build_current_term_rows``.\n\nOwnership here is *access*, not the reminder-audience cascade\n``?assigned_to_me`` resolves: Action Required answers \"what do I owe?\", this\nanswers \"what am I responsible for?\".\n\nRead-only, gated by resource scope like the rest of this router.","operationId":"get_my_contracts_vrm_my_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ContractCurrentTermRowResponse"},"type":"array","title":"Response Get My Contracts Vrm My Contracts Get"}}}}}}},"/vrm/services/{service_id}":{"get":{"tags":["vrm"],"summary":"Get Service Detail","description":"Detail for one service the current user can access, for the My Services slide-over.\n\nAuthorized exactly like the landing list (the user must be the service's\ninternal POC or assigned to its vendor, on an active vendor). Surfaces the\nvendor's active key dates, contacts, and adverse-media summary, plus the\nservice's own criticality/inherent-risk custom-field values (mirroring the\nlanding list's badges) — while never leaking the internal-only bits\n(PCI/SOC flags, raw overview sections, vendor approval status).","operationId":"get_service_detail_vrm_services__service_id__get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-contacts/{vendor_id}":{"get":{"tags":["vendor-contacts"],"summary":"Get Vendor Contacts","description":"Get all contacts associated with a vendor.","operationId":"get_vendor_contacts_vendor_contacts__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorContactResponse"},"title":"Response Get Vendor Contacts Vendor Contacts  Vendor Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["vendor-contacts"],"summary":"Create Vendor Contact","description":"Create a new contact for a vendor. Creates the user if they don't exist,\nthen adds a VendorContacts row linking them to the vendor.","operationId":"create_vendor_contact_vendor_contacts__vendor_id__post","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVendorContactRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vendor-contacts/{vendor_id}/{user_id}":{"delete":{"tags":["vendor-contacts"],"summary":"Delete Vendor Contact","description":"Remove a contact from a vendor. Deletes only the VendorContacts row, not the user.","operationId":"delete_vendor_contact_vendor_contacts__vendor_id___user_id__delete","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["vendor-contacts"],"summary":"Update Vendor Contact","description":"Update a contact's editable fields. Both `role` and the custom field values\nare scoped to this vendor's link row, so the same person carries an\nindependent set at every vendor that lists them.","operationId":"update_vendor_contact_vendor_contacts__vendor_id___user_id__put","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor 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/UpdateVendorContactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts":{"get":{"tags":["contracts"],"summary":"List Vendor Contracts","operationId":"list_vendor_contracts_contracts_get","parameters":[{"name":"vendor_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractResponse"},"title":"Response List Vendor Contracts Contracts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contracts"],"summary":"Create Contract","operationId":"create_contract_contracts_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_contract_contracts_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/renewals":{"get":{"tags":["contracts"],"summary":"List Renewal Decisions","description":"Terms still awaiting a renewal decision, soonest deadline first.\n\nDeclared above ``GET /{contract_id}``: FastAPI matches in declaration order,\nso below it ``renewals`` parses as a contract UUID and 422s.\n\nRead-only, gated by the router's auth only — ``general.file.write`` gates\n*recording* a decision, and requiring it here would stop a user who can see\nthe contract from being told a decision is due on it.\n\nEvery filter defaults off, so unqualified this is \"every outstanding decision\nin the company\". My Services asks for both filters: its owner's queue is what\nthey were written to about and have not finished.","operationId":"list_renewal_decisions_contracts_renewals_get","parameters":[{"name":"assigned_to_me","in":"query","required":false,"schema":{"type":"boolean","description":"Only terms this user is an assignee of, resolved the same way the reminder digest resolves who to email.","default":false,"title":"Assigned To Me"},"description":"Only terms this user is an assignee of, resolved the same way the reminder digest resolves who to email."},{"name":"within_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Within Days"}},{"name":"reminded_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only terms whose reminder ladder has reached one of its dates — the decisions the assignees have already been asked about.","default":false,"title":"Reminded Only"},"description":"Only terms whose reminder ladder has reached one of its dates — the decisions the assignees have already been asked about."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractRenewalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/current-terms":{"get":{"tags":["contracts"],"summary":"List Current Contract Terms","description":"The term in force on every contract in the company, one row per contract.\n\nDeclared above ``GET /{contract_id}`` for the same reason ``/renewals`` is.\nRead-only, gated by router auth only, and unfiltered and unpaged — the surface\nreading it filters, sorts and pages client-side. Unlike ``/renewals`` it keeps\ndecided and open-ended terms.\n\nMy Services' contracts tab reads the same rows narrowed to the caller's own\nbook (``GET /vrm/my-contracts``); both build them with\n``build_current_term_rows``, so the two cannot describe a term differently.\n\nThe term each row carries is the one the contract is *in*, not the tail of its\nchain (``current_terms_for_company``). The cadence is resolved once here\nbecause both halves need it: selecting the term consults it, and serializing\nreports ``attention_due`` from it.","operationId":"list_current_contract_terms_contracts_current_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ContractCurrentTermRowResponse"},"type":"array","title":"Response List Current Contract Terms Contracts Current Terms Get"}}}}}}},"/contracts/{contract_id}":{"get":{"tags":["contracts"],"summary":"Get Contract","operationId":"get_contract_contracts__contract_id__get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contracts"],"summary":"Update Contract","operationId":"update_contract_contracts__contract_id__patch","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Delete Contract","operationId":"delete_contract_contracts__contract_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Contract Contracts  Contract Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/term-events":{"get":{"tags":["contracts"],"summary":"List Contract Term Events","description":"The contract's decision log — every record, undo and actioning.\n\nOne stream across the whole term chain rather than a route per term: it reads\nas the contract's activity, with ``term_number`` marking the chapters.\n\nRead-only, gated by router auth only, like ``/change-set``.","operationId":"list_contract_term_events_contracts__contract_id__term_events_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractTermEventResponse"},"title":"Response List Contract Term Events Contracts  Contract Id  Term Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/change-set":{"get":{"tags":["contracts"],"summary":"Get Contract Change Set","operationId":"get_contract_change_set_contracts__contract_id__change_set_get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractChangeSetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/summarize":{"post":{"tags":["contracts"],"summary":"Summarize Contract","description":"(Re-)run the contract summary agent once every document is extracted.","operationId":"summarize_contract_contracts__contract_id__summarize_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractSummarizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/term-fields/accept":{"post":{"tags":["contracts"],"summary":"Accept Contract Term Fields Endpoint","description":"Accept selected proposed term fields, writing them onto the Contract.","operationId":"accept_contract_term_fields_endpoint_contracts__contract_id__term_fields_accept_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptContractTermFieldsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/term-fields/dismiss":{"post":{"tags":["contracts"],"summary":"Dismiss Contract Term Fields Endpoint","description":"Discard selected proposed term fields; the Contract is left untouched.","operationId":"dismiss_contract_term_fields_endpoint_contracts__contract_id__term_fields_dismiss_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissContractTermFieldsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractChangeSetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/documents":{"post":{"tags":["contracts"],"summary":"Add Contract Document","operationId":"add_contract_document_contracts__contract_id__documents_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_contract_document_contracts__contract_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/documents/{file_id}/version":{"post":{"tags":["contracts"],"summary":"Upload Contract Document Version","operationId":"upload_contract_document_version_contracts__contract_id__documents__file_id__version_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_contract_document_version_contracts__contract_id__documents__file_id__version_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/documents/{file_id}":{"delete":{"tags":["contracts"],"summary":"Delete Contract Document","operationId":"delete_contract_document_contracts__contract_id__documents__file_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/documents/{file_id}/link":{"delete":{"tags":["contracts"],"summary":"Detach Contract Document","operationId":"detach_contract_document_contracts__contract_id__documents__file_id__link_delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/terms":{"post":{"tags":["contracts"],"summary":"Create Contract Term","description":"Add the contract's next term. The ordinal is assigned server-side.","operationId":"create_contract_term_contracts__contract_id__terms_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractTermRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/terms/{term_id}":{"patch":{"tags":["contracts"],"summary":"Update Contract Term","description":"Edit a term's dates or renewal settings and resync its reminders.","operationId":"update_contract_term_contracts__contract_id__terms__term_id__patch","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContractTermRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Delete Contract Term","description":"Hard-delete a term.\n\n409 rather than a soft delete when the term has a successor, a decision, or\na sent reminder: there is no ``deleted_at`` on ``contract_terms``, and the\nuser should edit the term instead of erasing evidence that a reminder went\nout.","operationId":"delete_contract_term_contracts__contract_id__terms__term_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/terms/{term_id}/decision":{"post":{"tags":["contracts"],"summary":"Record Contract Term Decision","description":"Record the term's renewal decision. **Opens no new term.**\n\nRecording is intent; ``POST .../decision/action`` is the act. Until then the\nterm keeps its dates and stays the contract's current term with the decision\non show, in front of the people who have to carry it out.\n\nDeciding does not silence the term's reminders — that is a separate action.","operationId":"record_contract_term_decision_contracts__contract_id__terms__term_id__decision_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordTermDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Undo Contract Term Decision","description":"Clear a decision that has not been actioned yet.\n\n409 once it has been: the successor exists and may have been worked on, so\nthe actioning is taken back first (`DELETE .../decision/action`) and this\nroute becomes available again. The decision survives in the term's event log\neither way.","operationId":"undo_contract_term_decision_contracts__contract_id__terms__term_id__decision_delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/terms/{term_id}/decision/action":{"post":{"tags":["contracts"],"summary":"Action Contract Term Decision","description":"Mark the recorded decision as carried out.\n\nEvery decision is actionable — an ending decision still needs somebody to\nsend the letter — but only ``RENEW`` and ``RENEGOTIATE`` open a successor,\ncreated with a start date and nothing else. Its end date comes from the\nsigned paperwork, and until it is set the term is silent by design.\n\nThe body's only field is a ``note`` saying what confirms it was carried out,\nwhich lands on the event rather than the term. The body is optional, so a\ncaller with nothing to say still actions.","operationId":"action_contract_term_decision_contracts__contract_id__terms__term_id__decision_action_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActionTermDecisionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contracts"],"summary":"Reopen Contract Term Decision","description":"Take back an actioning: the term owes its paperwork again.\n\nLeaves the decision recorded — this undoes the claim it was carried out, not\nthe call itself, and ``DELETE .../decision`` becomes available again once it\nhas run. A renewal's successor is removed, so 409 once that term has been\nworked on (its own decision, its own successor, or a sent reminder).","operationId":"reopen_contract_term_decision_contracts__contract_id__terms__term_id__decision_action_delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"term_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Term Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/services":{"post":{"tags":["contracts"],"summary":"Link Contract Services","operationId":"link_contract_services_contracts__contract_id__services_post","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkContractServicesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contracts/{contract_id}/services/{service_id}":{"delete":{"tags":["contracts"],"summary":"Unlink Contract Service","operationId":"unlink_contract_service_contracts__contract_id__services__service_id__delete","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}},{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/figma/auth":{"post":{"tags":["figma"],"summary":"Validate Figma Token","operationId":"validate_figma_token_figma_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/figma/upload":{"post":{"tags":["figma"],"summary":"Upload And Analyze Figma Frame","operationId":"upload_and_analyze_figma_frame_figma_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_and_analyze_figma_frame_figma_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/figma/risks/{run_id}":{"get":{"tags":["figma"],"summary":"Get Figma Run Risks","operationId":"get_figma_run_risks_figma_risks__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/figma/risks/{risk_id}/ignore":{"post":{"tags":["figma"],"summary":"Ignore Risk","operationId":"ignore_risk_figma_risks__risk_id__ignore_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"risk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Risk Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ignore_risk_figma_risks__risk_id__ignore_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/figma/presets":{"get":{"tags":["figma"],"summary":"List Marketing Presets","operationId":"list_marketing_presets_figma_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketingPreset"},"type":"array","title":"Response List Marketing Presets Figma Presets Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/figma/collateral-types":{"get":{"tags":["figma"],"summary":"List Collateral Types","operationId":"list_collateral_types_figma_collateral_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Collateral Types Figma Collateral Types Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/figma/oauth/start":{"get":{"tags":["figma-oauth"],"summary":"Start Figma Oauth","description":"Begin the Figma OAuth flow: stash state+PKCE, return the Figma consent URL.\n\nReturns the URL (rather than a redirect) so the FE can call this with its\nauthenticated session and then navigate the browser to Figma — a plain\nbrowser navigation to this endpoint would carry no session header.\n\nMasquerade must not reach this. It is a GET that writes, and\n`get_company_id_helper` blocks masquerade by method, so the block does not\napply: `company_id` is the *effective* company, and `/callback` upserts the\ntoken under it — a staffer connecting their own Figma account while wearing a\ncustomer's lens keys it to that customer, and cannot then DELETE it, because\nthat route *is* method-blocked. Nothing enforces this yet; the only caller is\nthe dev-only harness at `/admin/feature/figma`, which is what keeps it out of\nreach today. A real Figma UI needs an `is_any_masquerading()` refusal here and\non `/callback` first — see `_refuse_masquerade_vote` in\n`backend/api/marketing/guidelines.py` for the shape.","operationId":"start_figma_oauth_figma_oauth_start_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/figma/oauth/callback":{"get":{"tags":["figma-oauth"],"summary":"Figma Oauth Callback","description":"Figma redirects here (cross-site, no session). The user is recovered from\nthe single-use `state`; we then exchange the code and store the token.\n\nAlways lands the browser back on the connect page with a `figma=` status so\nthe UI can toast success/cancel/error instead of showing a raw 4xx/5xx.","operationId":"figma_oauth_callback_figma_oauth_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/figma/oauth/status":{"get":{"tags":["figma-oauth"],"summary":"Figma Oauth Status","operationId":"figma_oauth_status_figma_oauth_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FigmaConnectionStatus"}}}}}}},"/figma/oauth":{"delete":{"tags":["figma-oauth"],"summary":"Disconnect Figma Oauth","operationId":"disconnect_figma_oauth_figma_oauth_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/thirdparties/key-dates/vendor/{vendor_id}":{"post":{"tags":["thirdparties-key-dates"],"summary":"Create Key Date For Vendor","operationId":"create_key_date_for_vendor_thirdparties_key_dates_vendor__vendor_id__post","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Create Key Date For Vendor Thirdparties Key Dates Vendor  Vendor Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["thirdparties-key-dates"],"summary":"Get Key Dates For Vendor","operationId":"get_key_dates_for_vendor_thirdparties_key_dates_vendor__vendor_id__get","parameters":[{"name":"vendor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Vendor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyDateRow"},"title":"Response Get Key Dates For Vendor Thirdparties Key Dates Vendor  Vendor Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/run/{run_id}":{"get":{"tags":["thirdparties-key-dates"],"summary":"Get Key Dates For Run","operationId":"get_key_dates_for_run_thirdparties_key_dates_run__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractRunKeyDates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/contract/{contract_id}":{"get":{"tags":["thirdparties-key-dates"],"summary":"Get Key Dates For Contract","description":"All key dates linked to a contract, at any lifecycle status (proposed,\nactive, or superseded), so the contract page can show its full history.","operationId":"get_key_dates_for_contract_thirdparties_key_dates_contract__contract_id__get","parameters":[{"name":"contract_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contract Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyDateRow"},"title":"Response Get Key Dates For Contract Thirdparties Key Dates Contract  Contract Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/review/{review_id}":{"get":{"tags":["thirdparties-key-dates"],"summary":"Get Key Dates For Review","description":"All key dates the review-metadata agent proposed or activated for this\nreview, at any lifecycle status, so the Reporting stage's task card can\nshow and ratify them inline without a trip to the vendor's Key Dates page.","operationId":"get_key_dates_for_review_thirdparties_key_dates_review__review_id__get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyDateRow"},"title":"Response Get Key Dates For Review Thirdparties Key Dates Review  Review Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/all":{"get":{"tags":["thirdparties-key-dates"],"summary":"Get All Key Dates Grouped By Vendor","operationId":"get_all_key_dates_grouped_by_vendor_thirdparties_key_dates_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KeyDateRow"},"type":"array","title":"Response Get All Key Dates Grouped By Vendor Thirdparties Key Dates All Get"}}}}}}},"/thirdparties/key-dates/{key_date_id}":{"put":{"tags":["thirdparties-key-dates"],"summary":"Update Key Date","operationId":"update_key_date_thirdparties_key_dates__key_date_id__put","parameters":[{"name":"key_date_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Date Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKeyDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["thirdparties-key-dates"],"summary":"Delete Key Date","operationId":"delete_key_date_thirdparties_key_dates__key_date_id__delete","parameters":[{"name":"key_date_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Date Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Key Date Thirdparties Key Dates  Key Date Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/{key_date_id}/ratify":{"post":{"tags":["thirdparties-key-dates"],"summary":"Ratify Key Date","description":"Promote a PROPOSED key date to ACTIVE, scheduling reminder notifications.\n\nIf the proposal replaces an existing key date, that target is marked\nSUPERSEDED and its unsent notifications are purged.","operationId":"ratify_key_date_thirdparties_key_dates__key_date_id__ratify_post","parameters":[{"name":"key_date_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Date Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatifyKeyDateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/{key_date_id}/dismiss":{"post":{"tags":["thirdparties-key-dates"],"summary":"Dismiss Key Date","description":"Discard a PROPOSED key date (soft delete; it has no notifications).","operationId":"dismiss_key_date_thirdparties_key_dates__key_date_id__dismiss_post","parameters":[{"name":"key_date_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Date Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/{key_date_id}/notifications":{"post":{"tags":["thirdparties-key-dates"],"summary":"Upsert Notifications For Key Date","operationId":"upsert_notifications_for_key_date_thirdparties_key_dates__key_date_id__notifications_post","parameters":[{"name":"key_date_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Date Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Upsert Notifications For Key Date Thirdparties Key Dates  Key Date Id  Notifications Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thirdparties/key-dates/email-payload/{date_str}":{"get":{"tags":["thirdparties-key-dates"],"summary":"Get Email Payload For Date","operationId":"get_email_payload_for_date_thirdparties_key_dates_email_payload__date_str__get","parameters":[{"name":"date_str","in":"path","required":true,"schema":{"type":"string","title":"Date Str"}},{"name":"raise_exceptions","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Raise Exceptions"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Email Payload For Date Thirdparties Key Dates Email Payload  Date Str  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/log/":{"post":{"tags":["logging"],"summary":"Log Data","operationId":"log_data_log__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyses/soc/{run_id}/cuec-validation":{"post":{"tags":["analyses","soc"],"summary":"Create Cuec Validation From Run","operationId":"create_cuec_validation_from_run_analyses_soc__run_id__cuec_validation_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CUECValidationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CUECValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/zions/inbound":{"post":{"tags":["public","zions"],"summary":"Zions Inbound Webhook","operationId":"zions_inbound_webhook_public_zions_inbound_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Zions Inbound Webhook Public Zions Inbound Post"}}}}}}},"/mcp/consent":{"get":{"summary":"Consent Get","operationId":"consent_get_mcp_consent_get","parameters":[{"name":"rid","in":"query","required":true,"schema":{"type":"string","title":"Rid"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Consent Post","operationId":"consent_post_mcp_consent_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_consent_post_mcp_consent_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AISuggestionResponse":{"properties":{"suggested_value":{"type":"string","title":"Suggested Value"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["suggested_value","explanation"],"title":"AISuggestionResponse"},"AcceptContractTermFieldsRequest":{"properties":{"effective_date":{"type":"boolean","title":"Effective Date","default":false},"expiration_date":{"type":"boolean","title":"Expiration Date","default":false},"auto_renews":{"type":"boolean","title":"Auto Renews","default":false},"notice_period":{"type":"boolean","title":"Notice Period","default":false},"termination_notice_date":{"type":"boolean","title":"Termination Notice Date","default":false},"obligations":{"type":"boolean","title":"Obligations","default":false}},"type":"object","title":"AcceptContractTermFieldsRequest","description":"Which of the summary run's proposed term fields to write onto the Contract."},"ActionTermDecisionRequest":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"ActionTermDecisionRequest","description":"What confirms the decision was carried out — the amendment's reference,\nthe date the letter went out.\n\nNothing else: actioning is not a choice, and the next period's dates come\nfrom the signed paperwork afterwards. Optional here and required by the\ndialog, exactly like ``RecordTermDecisionRequest.reason``."},"ActiveEvidencePacketSummary":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"status":{"type":"string","title":"Status"},"documents_uploaded":{"type":"integer","title":"Documents Uploaded"},"requirements_compliant":{"type":"integer","title":"Requirements Compliant"},"requirements_total":{"type":"integer","title":"Requirements Total"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"created_at":{"type":"string","title":"Created At"},"is_internal":{"type":"boolean","title":"Is Internal"},"requestee_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee User Email"},"requestee_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee User Name"}},"type":"object","required":["request_id","status","documents_uploaded","requirements_compliant","requirements_total","due_date","created_at","is_internal"],"title":"ActiveEvidencePacketSummary","description":"Summary of an active evidence packet for display on vendor homepage.\n\nThis provides a lightweight view of the packet status without all the\ndetailed requirement/file information."},"AddCommentRequest":{"properties":{"body":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Body"},"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"},"visibility":{"$ref":"#/components/schemas/EventVisibility","default":"shared"}},"type":"object","title":"AddCommentRequest"},"AddCompanyUsersRequest":{"properties":{"company_id":{"type":"string","title":"Company Id"},"users":{"items":{"$ref":"#/components/schemas/CompanyUser-Input"},"type":"array","title":"Users"}},"type":"object","required":["company_id","users"],"title":"AddCompanyUsersRequest"},"AddDocumentRequestBody":{"properties":{"slug":{"type":"string","title":"Slug"},"required":{"type":"boolean","title":"Required","default":true}},"type":"object","required":["slug"],"title":"AddDocumentRequestBody"},"AddManualRiskRequest":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"document_clause":{"type":"string","title":"Document Clause"},"source_clause":{"type":"string","title":"Source Clause"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"}},"type":"object","required":["document_id","short_text","explanation","document_clause","source_clause","severity"],"title":"AddManualRiskRequest"},"AddParticipantRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"$ref":"#/components/schemas/ParticipantRole","default":"subscriber"}},"type":"object","required":["user_id"],"title":"AddParticipantRequest"},"AddRequirementBody":{"properties":{"question":{"type":"string","title":"Question"},"required":{"type":"boolean","title":"Required","default":true}},"type":"object","required":["question"],"title":"AddRequirementBody"},"AddSubcontractorRequest":{"properties":{"company_name":{"type":"string","title":"Company Name"},"website_url":{"type":"string","title":"Website Url"}},"type":"object","required":["company_name","website_url"],"title":"AddSubcontractorRequest"},"AddTeamMemberRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["user_id"],"title":"AddTeamMemberRequest"},"AddVendorRequest":{"properties":{"website_url":{"type":"string","title":"Website Url"},"pci_compliant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pci Compliant"},"soc_compliance":{"anyOf":[{"$ref":"#/components/schemas/VendorSOCCompliance"},{"type":"null"}]},"year_of_incorporation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Of Incorporation"},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/EntityType"},{"type":"null"}]},"next_review_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review Date"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"business_name":{"type":"string","title":"Business Name"},"assigned_user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Assigned User Ids"},"subcontractor_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subcontractor Ids","default":[]}},"type":"object","required":["website_url","business_name","assigned_user_ids"],"title":"AddVendorRequest"},"AdminCreateReviewReportResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"}},"type":"object","required":["agent_run_id"],"title":"AdminCreateReviewReportResponse"},"AdminReviewReportStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/AgentRunStatus"},"config_variant":{"$ref":"#/components/schemas/ReviewReportConfigVariant"}},"type":"object","required":["status","config_variant"],"title":"AdminReviewReportStatusResponse"},"AdverseMediaHeadline":{"properties":{"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"when":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"When"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["title","summary"],"title":"AdverseMediaHeadline","description":"A single adverse-media headline, trimmed for the requester view."},"AdverseMediaHit":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for this hit (slug or short hash)"},"title":{"type":"string","title":"Title","description":"Headline or title of the news article or event"},"summary":{"type":"string","title":"Summary","description":"2-4 sentence summary of the adverse media event"},"when":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"When","description":"Date or date range of the event (e.g. 'March 2024')"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","description":"Topic tags for the finding; see NegativeNewsTopic for the vocabulary new runs use"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"URL of the primary source article"},"is_perpetrator":{"type":"boolean","title":"Is Perpetrator","description":"True if the company is the alleged perpetrator (not just mentioned)"}},"type":"object","required":["id","title","summary","is_perpetrator"],"title":"AdverseMediaHit"},"AdverseMediaSummary":{"properties":{"hit_count":{"type":"integer","title":"Hit Count"},"latest_hits":{"items":{"$ref":"#/components/schemas/AdverseMediaHeadline"},"type":"array","title":"Latest Hits","default":[]},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"}},"type":"object","required":["hit_count"],"title":"AdverseMediaSummary","description":"Accumulated adverse-media findings for a vendor, merged across monitor runs."},"AgentRunConversationResponse":{"properties":{"files":{"additionalProperties":{"type":"string"},"type":"object","title":"Files"},"conversation":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Conversation"},"groups":{"items":{"$ref":"#/components/schemas/AgentRunStepGroupView"},"type":"array","title":"Groups"},"message_metadata":{"additionalProperties":{"$ref":"#/components/schemas/AgentRunMessageMetadata"},"type":"object","title":"Message Metadata"}},"type":"object","required":["files","conversation"],"title":"AgentRunConversationResponse"},"AgentRunListItem":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"created":{"type":"string","format":"date-time","title":"Created"},"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["agent_run_id","status","agent_type","created","company_id"],"title":"AgentRunListItem"},"AgentRunMessageMetadata":{"properties":{"group_id":{"type":"string","format":"uuid","title":"Group Id"},"duration_ms":{"type":"integer","title":"Duration Ms"},"created":{"type":"string","format":"date-time","title":"Created"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names"},"kinds":{"items":{"$ref":"#/components/schemas/AgentRunStepKind"},"type":"array","title":"Kinds"}},"type":"object","required":["group_id","duration_ms","created","model","input_tokens","output_tokens","tool_names","kinds"],"title":"AgentRunMessageMetadata","description":"Step-derived fields keyed by the Anthropic `message.id` they belong to."},"AgentRunRef":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["agent_run_id","status","started_at","finished_at","error"],"title":"AgentRunRef"},"AgentRunStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"AgentRunStatus"},"AgentRunStatusResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"status":{"$ref":"#/components/schemas/AgentRunStatus"}},"type":"object","required":["agent_run_id","agent_type","status"],"title":"AgentRunStatusResponse"},"AgentRunStepGroupView":{"properties":{"group_id":{"type":"string","format":"uuid","title":"Group Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"first_step_id":{"type":"string","format":"uuid","title":"First Step Id"},"created":{"type":"string","format":"date-time","title":"Created"},"duration_ms":{"type":"integer","title":"Duration Ms"},"step_count":{"type":"integer","title":"Step Count"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names"},"kinds":{"items":{"$ref":"#/components/schemas/AgentRunStepKind"},"type":"array","title":"Kinds"}},"type":"object","required":["group_id","message_id","first_step_id","created","duration_ms","step_count","tool_names","kinds"],"title":"AgentRunStepGroupView","description":"One assistant-turn group of `agent_run_steps`, ordered by first-step time.\n\n`duration_ms` is the gap from the previous group's first step (or the\n`agent_runs.created` timestamp for the first group) to this group's first\nstep — the time the timeline bar represents."},"AgentRunStepKind":{"type":"string","enum":["thinking","tool_call","verdict"],"title":"AgentRunStepKind","description":"One `agent_run_steps` row per unit of agent activity.\n\nVERDICT is a terminal `submit_*` step (the risk-factor subagent's rating,\nor a control-assessment's check label + answer); the research agent only\nemits THINKING/TOOL_CALL rows. A tool declares its own kind via\n`AgentTool.step_kind`, so the loop knows it before the row is written."},"AgentType":{"type":"string","enum":["form_field_deriver","service_ira","vendor_ira","review_report","smart_document","documents_consolidated_view","regulatory_review","contract_summary","review_metadata","risk_assessment_research","risk_assessment_factor","risk_factor_training","control_assessment"],"title":"AgentType"},"AllServicesResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_poc":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Internal Poc"},"internal_poc_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Poc Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"review_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Review Date"},"review_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Key Date Id"},"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date"},"termination_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Termination Key Date Id"},"status":{"$ref":"#/components/schemas/ServiceStatus","default":"active"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"runs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Runs","default":[]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"linked_contract":{"anyOf":[{"$ref":"#/components/schemas/LinkedContractSummary"},{"type":"null"}]},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"}},"type":"object","required":["service_id","company_id","vendor_company_id","name","vendor_name"],"title":"AllServicesResponse","description":"A vendor service enriched with its owning vendor's display fields.\n\nReturned by the global `/vendor-services/all` endpoint so the Services\noverview can show each service alongside its vendor without a second fetch."},"AnalysisHistoryDocument":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"created":{"type":"string","format":"date-time","title":"Created"},"aws_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Key"},"file_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_from_video":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript From Video"},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"review_status":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}]},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"}},"type":"object","required":["upload_id","file_id","filename","created"],"title":"AnalysisHistoryDocument"},"AnalysisHistoryResponse":{"properties":{"collateral":{"$ref":"#/components/schemas/AnalysisHistoryDocument"},"latest_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Latest Run Id"},"risks":{"items":{"$ref":"#/components/schemas/DocumentRiskResponse"},"type":"array","title":"Risks"}},"type":"object","required":["collateral","latest_run_id","risks"],"title":"AnalysisHistoryResponse"},"AnalysisRequestEndpoint":{"properties":{"files":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Files"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"}},"additionalProperties":true,"type":"object","required":["files","vendor_id"],"title":"AnalysisRequestEndpoint"},"AnalystAnalytics":{"properties":{"my_service_count":{"type":"integer","title":"My Service Count"},"my_active_review_count":{"type":"integer","title":"My Active Review Count"},"my_open_issue_count":{"type":"integer","title":"My Open Issue Count"},"vendor_ids":{"items":{"type":"string"},"type":"array","title":"Vendor Ids"},"services_by_review_state":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Services By Review State"},"reviews_by_stage":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Reviews By Stage"},"outstanding_iras_by_recipient":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Iras By Recipient"},"outstanding_periodic_reviews_by_vendor":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Periodic Reviews By Vendor"},"outstanding_due_diligence_packets_by_vendor":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Due Diligence Packets By Vendor"}},"type":"object","required":["my_service_count","my_active_review_count","my_open_issue_count","vendor_ids","services_by_review_state","reviews_by_stage","outstanding_iras_by_recipient","outstanding_periodic_reviews_by_vendor","outstanding_due_diligence_packets_by_vendor"],"title":"AnalystAnalytics"},"AnalyticsSummary":{"properties":{"total_vendors":{"type":"integer","title":"Total Vendors"},"total_services":{"type":"integer","title":"Total Services"},"active_reviews":{"type":"integer","title":"Active Reviews"},"open_issues":{"type":"integer","title":"Open Issues"}},"type":"object","required":["total_vendors","total_services","active_reviews","open_issues"],"title":"AnalyticsSummary"},"ApplicabilityExclusion":{"type":"string","enum":["not_active","collateral_type","marketing_team","trigger_terms"],"title":"ApplicabilityExclusion","description":"Why a candidate requirement was not evaluated against this collateral.\n\nEvery predicate is evaluated for every candidate and all the reasons that apply are recorded, so\nthese counts overlap and do not sum to the excluded total. That is the honest shape: picking a\nfirst-failure order would invent a precedence the data does not have, and a reader asking \"what\ndid the collateral-type test remove\" would get an answer that changed if the order changed."},"ApplicabilityMatchKind":{"type":"string","enum":["matches_production_risk","net_new"],"title":"ApplicabilityMatchKind","description":"A reviewer's judgment of one newly produced risk against production's risks.\n\nThe ask names three outcomes — matches a flag, matches a dismissal, net-new. Only the third is\nrecorded here: the first two are the *matched risk's* verdict, which is already stored on that\nrisk, so recording them again would let the two disagree the moment somebody re-reviews."},"ApplicabilityReport":{"properties":{"batch_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Count"},"batch_max":{"type":"integer","title":"Batch Max"},"llm_calls":{"type":"integer","title":"Llm Calls"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cache_read_input_tokens":{"type":"integer","title":"Cache Read Input Tokens"},"cache_creation_input_tokens":{"type":"integer","title":"Cache Creation Input Tokens"},"citations_returned":{"type":"integer","title":"Citations Returned"},"citations_discarded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Citations Discarded"},"citations_ungrounded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Citations Ungrounded"},"refused_answers":{"type":"integer","title":"Refused Answers"},"model":{"type":"string","title":"Model"},"temperature":{"type":"number","title":"Temperature"},"elapsed_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Elapsed Seconds"}},"type":"object","required":["batch_count","batch_max","llm_calls","input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","citations_returned","citations_discarded","citations_ungrounded","refused_answers","model","temperature","elapsed_seconds"],"title":"ApplicabilityReport","description":"The figures the run produced, all of them measured rather than assumed."},"ApplicabilityRunDetail":{"properties":{"summary":{"$ref":"#/components/schemas/ApplicabilityRunSummary"},"narrowing":{"$ref":"#/components/schemas/NarrowingSummary"},"candidates":{"items":{"$ref":"#/components/schemas/CandidateResponse"},"type":"array","title":"Candidates"},"risks":{"items":{"$ref":"#/components/schemas/ProducedRiskResponse"},"type":"array","title":"Risks"},"comparison":{"$ref":"#/components/schemas/ProductionComparison"},"report":{"$ref":"#/components/schemas/ApplicabilityReport"}},"type":"object","required":["summary","narrowing","candidates","risks","comparison","report"],"title":"ApplicabilityRunDetail"},"ApplicabilityRunStatus":{"type":"string","enum":["queued","running","succeeded","failed"],"title":"ApplicabilityRunStatus","description":"Lifecycle of one dashboard run. Mirrors `DecompositionStatus` deliberately."},"ApplicabilityRunSummary":{"properties":{"applicability_run_id":{"type":"string","format":"uuid","title":"Applicability Run Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"collateral_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collateral Filename"},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ApplicabilityRunStatus"},"stage":{"$ref":"#/components/schemas/ApplicabilityStage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"requested_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By Email"},"candidates_total":{"type":"integer","title":"Candidates Total"},"candidates_surviving":{"type":"integer","title":"Candidates Surviving"},"risks_produced":{"type":"integer","title":"Risks Produced"}},"type":"object","required":["applicability_run_id","company_id","company_name","file_id","upload_id","collateral_filename","collateral_type","status","stage","error","created","started_at","finished_at","requested_by_email","candidates_total","candidates_surviving","risks_produced"],"title":"ApplicabilityRunSummary"},"ApplicabilityStage":{"type":"string","enum":["queued","downloading","narrowing","evaluating","comparing","done"],"title":"ApplicabilityStage","description":"What the run is doing right now.\n\nCommitted *before* the work it names starts, so a watcher sees the stage currently taking the\ntime rather than the last one that finished."},"AppliedProductLine":{"properties":{"key":{"type":"string","title":"Key"},"operation":{"$ref":"#/components/schemas/MarketingPresetProposalOperation"},"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["key","operation","preset_id","name"],"title":"AppliedProductLine","description":"What one item turned into, for the confirmation on the page and over MCP."},"ApplyRequest":{"properties":{"documents":{"type":"string","title":"Documents"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["documents"],"title":"ApplyRequest","description":"Raw YAML string containing one or more resource documents."},"ApplyResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"results":{"items":{"$ref":"#/components/schemas/ResourceApplyResult"},"type":"array","title":"Results"}},"type":"object","required":["dry_run","results"],"title":"ApplyResponse"},"ApplyUserRoleChangeResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"roles":{"items":{"$ref":"#/components/schemas/MigrationUserRole"},"type":"array","title":"Roles"},"added":{"items":{"type":"string"},"type":"array","title":"Added"},"removed":{"items":{"type":"string"},"type":"array","title":"Removed"}},"type":"object","required":["user_id","roles","added","removed"],"title":"ApplyUserRoleChangeResponse"},"ApproachMappingEntry":{"properties":{"sheet_name":{"type":"string","title":"Sheet Name"},"approach":{"type":"string","title":"Approach"}},"type":"object","required":["sheet_name","approach"],"title":"ApproachMappingEntry"},"ArchetypeKey":{"type":"string","enum":["tprm_admin","business_owner","tprm_analyst","sme","view_only","collateral_admin","collateral_reviewer","collateral_submitter","policy_reviewer"],"title":"ArchetypeKey","description":"Closed, product-owned set of role identities. Stable machine keys — never renamed."},"ArchetypeOption":{"properties":{"key":{"$ref":"#/components/schemas/ArchetypeKey"},"label":{"type":"string","title":"Label"},"module":{"type":"string","title":"Module"}},"type":"object","required":["key","label","module"],"title":"ArchetypeOption","description":"A product-owned archetype the UI can assign to a role."},"ArchivedCountInfo":{"properties":{"sheet":{"type":"string","title":"Sheet"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["sheet","count"],"title":"ArchivedCountInfo"},"ArtifactKind":{"type":"string","enum":["dossier","memo"],"title":"ArtifactKind","description":"DOSSIER is the research run's output; MEMO is a per-risk-factor memo."},"ArtifactResponse":{"properties":{"artifact_id":{"type":"string","format":"uuid","title":"Artifact Id"},"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"kind":{"$ref":"#/components/schemas/ArtifactKind"},"title":{"type":"string","title":"Title"},"content_markdown":{"type":"string","title":"Content Markdown"},"sections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sections"},"created":{"type":"string","format":"date-time","title":"Created"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"source_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Count"}},"type":"object","required":["artifact_id","agent_run_id","kind","title","content_markdown","sections","created"],"title":"ArtifactResponse"},"AssigneeMode":{"type":"string","enum":["vendor_assignees","user","team"],"title":"AssigneeMode","description":"How responsibility for an entity is resolved to a set of users.\n\nNot every mode is valid for every entity — see ``ASSIGNEE_SCOPES``."},"AssigneeOption":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["user_id","name"],"title":"AssigneeOption","description":"A user who is the assignee / owner of at least one row of a list.\n\nPowers the assignee-style column filters (Overview \"Assignee\", Reviews\n\"Assigned to\", Services \"Internal POC\"). Each list derives its own options\nfrom its own rows, so the options match what the column can actually show."},"AssigneeSelectionInput":{"properties":{"mode":{"$ref":"#/components/schemas/AssigneeMode"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["mode"],"title":"AssigneeSelectionInput","description":"One entry in an entity's assignee set, as the client sends it.\n\nWhich of ``user_id`` / ``team_id`` belongs with which mode — and whether the\nmode is in the entity's scope at all — is checked by\n``helpers/assignees.py::validate_assignee_selections`` rather than here: the\nanswer depends on the entity, and one validator shared by every adopter beats\na per-request model that has to know them all."},"AssigneeSelectionResponse":{"properties":{"mode":{"$ref":"#/components/schemas/AssigneeMode"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["mode","label"],"title":"AssigneeSelectionResponse","description":"One saved entry, with the label the UI shows for it.\n\n``label`` is resolved server-side — the user's display name, the team's name,\nor the group's own wording — matching how ``DocumentTypeReference.label`` and\n``condition_name`` are already resolved, so rendering a saved set needs no\nsecond lookup."},"AutofillFormRequest":{"properties":{"question_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"string","const":"all"}],"title":"Question Ids","default":"all"},"file_upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Upload Ids"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions"}},"type":"object","required":["file_upload_ids"],"title":"AutofillFormRequest"},"BackfillDescriptionsResponse":{"properties":{"updated_count":{"type":"integer","title":"Updated Count"}},"type":"object","required":["updated_count"],"title":"BackfillDescriptionsResponse"},"BatchAnalysisRequest":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/AnalysisRequestEndpoint"},"type":"array","title":"Requests"}},"type":"object","required":["requests"],"title":"BatchAnalysisRequest"},"BatchRequirementIdsBody":{"properties":{"requirement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Requirement Ids"}},"type":"object","title":"BatchRequirementIdsBody"},"BenchCaseSummary":{"properties":{"case_id":{"type":"string","title":"Case Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"page_count":{"type":"integer","title":"Page Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"requirement_count":{"type":"integer","title":"Requirement Count","default":0},"defect_count":{"type":"integer","title":"Defect Count","default":0}},"type":"object","required":["case_id"],"title":"BenchCaseSummary"},"BenchRunSummary":{"properties":{"run_id":{"type":"string","title":"Run Id"},"model":{"type":"string","title":"Model"},"temperature":{"type":"number","title":"Temperature"},"profile":{"type":"string","title":"Profile","default":""},"resolved_doc_types":{"type":"boolean","title":"Resolved Doc Types"},"status":{"type":"string","title":"Status","default":"done"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"cases":{"items":{"$ref":"#/components/schemas/BenchCaseSummary"},"type":"array","title":"Cases","default":[]}},"type":"object","required":["run_id","model","temperature","resolved_doc_types"],"title":"BenchRunSummary"},"BenchableDocument":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"company_name":{"type":"string","title":"Company Name"},"filename":{"type":"string","title":"Filename"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"suggested_profile":{"$ref":"#/components/schemas/ExtractionProfile","default":"regulatory"}},"type":"object","required":["upload_id","company_name","filename"],"title":"BenchableDocument","description":"A document already in the platform that a run can be started on."},"Body_add_company_domain_admin_internal_company_domains_add_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["company_id","domain"],"title":"Body_add_company_domain_admin_internal_company_domains_add_post"},"Body_add_contract_document_contracts__contract_id__documents_post":{"properties":{"role":{"$ref":"#/components/schemas/ContractDocumentRole"},"parent_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent File Id"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["role","file"],"title":"Body_add_contract_document_contracts__contract_id__documents_post"},"Body_add_permission_internal_add_permission_post":{"properties":{"module_name":{"type":"string","title":"Module Name"},"object_name":{"type":"string","title":"Object Name"},"permission_name":{"type":"string","title":"Permission Name"},"description":{"type":"string","title":"Description"}},"type":"object","required":["module_name","object_name","permission_name","description"],"title":"Body_add_permission_internal_add_permission_post"},"Body_archive_document_files_archive_post":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"}},"type":"object","required":["file_ids"],"title":"Body_archive_document_files_archive_post"},"Body_archive_run_run_archive_post":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"Body_archive_run_run_archive_post"},"Body_assign_reviewer_files__upload_id__reviewer_post":{"properties":{"reviewer_id":{"type":"string","title":"Reviewer Id"}},"type":"object","required":["reviewer_id"],"title":"Body_assign_reviewer_files__upload_id__reviewer_post"},"Body_bulk_delete_files_files_bulk_delete":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"}},"type":"object","required":["file_ids"],"title":"Body_bulk_delete_files_files_bulk_delete"},"Body_bulk_download_files_files_bulk_download_post":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"}},"type":"object","required":["file_ids"],"title":"Body_bulk_download_files_files_bulk_download_post"},"Body_commit_import_disclosures_import_commit_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"confirm_archive_count":{"type":"integer","title":"Confirm Archive Count"}},"type":"object","required":["file","confirm_archive_count"],"title":"Body_commit_import_disclosures_import_commit_post"},"Body_consent_post_mcp_consent_post":{"properties":{"rid":{"type":"string","title":"Rid"},"decision":{"type":"string","title":"Decision"},"csrf_token":{"type":"string","title":"Csrf Token","default":""}},"type":"object","required":["rid","decision"],"title":"Body_consent_post_mcp_consent_post"},"Body_create_admin_review_report_internal_reports_review_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"config_variant":{"$ref":"#/components/schemas/ReviewReportConfigVariant","default":"stable"},"template":{"type":"string","format":"binary","title":"Template"}},"type":"object","required":["company_id","review_id","template"],"title":"Body_create_admin_review_report_internal_reports_review_post"},"Body_create_and_host_pdf_run_pdf_post":{"properties":{"html":{"title":"Html"},"document_type":{"type":"string","title":"Document Type"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"Id"}},"type":"object","required":["html","document_type","id"],"title":"Body_create_and_host_pdf_run_pdf_post"},"Body_create_contract_contracts_post":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"$ref":"#/components/schemas/ContractStatus","default":"active"},"service_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Service Ids","default":[]},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["vendor_id","file"],"title":"Body_create_contract_contracts_post"},"Body_create_new_figma_integration_integrations_figma_post":{"properties":{"name":{"type":"string","title":"Name"},"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["name","user_id"],"title":"Body_create_new_figma_integration_integrations_figma_post"},"Body_create_new_project_projects__post":{"properties":{"project_name":{"type":"string","title":"Project Name"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"approval_status":{"anyOf":[{"$ref":"#/components/schemas/ProjectApprovalStatus"},{"type":"null"}],"default":"review_upcoming"}},"type":"object","required":["project_name"],"title":"Body_create_new_project_projects__post"},"Body_create_template_from_file_templates_from_post":{"properties":{"name":{"type":"string","title":"Name"},"file":{"type":"string","format":"binary","title":"File"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"template_type":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}]}},"type":"object","required":["name","file"],"title":"Body_create_template_from_file_templates_from_post"},"Body_delete_run_run__delete":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"Body_delete_run_run__delete"},"Body_delete_version_files_version_delete":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"}},"type":"object","required":["upload_id"],"title":"Body_delete_version_files_version_delete"},"Body_disable_company_internal_company_disable_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["company_id"],"title":"Body_disable_company_internal_company_disable_post"},"Body_generate_disclosures_settings_disclosures_generate_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_generate_disclosures_settings_disclosures_generate_post"},"Body_ignore_risk_figma_risks__risk_id__ignore_post":{"properties":{"ignore_comment":{"type":"string","title":"Ignore Comment"}},"type":"object","required":["ignore_comment"],"title":"Body_ignore_risk_figma_risks__risk_id__ignore_post"},"Body_list_projects_projects_get":{"properties":{"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}},"type":"object","title":"Body_list_projects_projects_get"},"Body_preview_import_disclosures_import_preview_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_preview_import_disclosures_import_preview_post"},"Body_remove_company_domain_admin_internal_company_domains_remove_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"domain":{"type":"string","title":"Domain"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["company_id","domain"],"title":"Body_remove_company_domain_admin_internal_company_domains_remove_post"},"Body_remove_company_user_internal_company_remove_user_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["company_id","user_id"],"title":"Body_remove_company_user_internal_company_remove_user_post"},"Body_resolve_issue_issues__issue_id__resolve_post":{"properties":{"resolved":{"type":"boolean","title":"Resolved"}},"type":"object","required":["resolved"],"title":"Body_resolve_issue_issues__issue_id__resolve_post"},"Body_revoke_company_sessions_internal_company_revoke_sessions_post":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["company_id"],"title":"Body_revoke_company_sessions_internal_company_revoke_sessions_post"},"Body_set_issue_assignee_issues__issue_id__assignee_post":{"properties":{"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"}},"type":"object","title":"Body_set_issue_assignee_issues__issue_id__assignee_post"},"Body_set_issue_description_issues__issue_id__description_post":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"}},"type":"object","title":"Body_set_issue_description_issues__issue_id__description_post"},"Body_set_issue_due_date_issues__issue_id__due_date_post":{"properties":{"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","title":"Body_set_issue_due_date_issues__issue_id__due_date_post"},"Body_set_issue_severity_issues__issue_id__severity_post":{"properties":{"severity":{"$ref":"#/components/schemas/RiskSeverity"}},"type":"object","required":["severity"],"title":"Body_set_issue_severity_issues__issue_id__severity_post"},"Body_set_issue_title_issues__issue_id__title_post":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"Body_set_issue_title_issues__issue_id__title_post"},"Body_set_task_description_collaborative_tasks__task_id__description_post":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"}},"type":"object","title":"Body_set_task_description_collaborative_tasks__task_id__description_post"},"Body_set_task_due_date_collaborative_tasks__task_id__due_date_post":{"properties":{"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","title":"Body_set_task_due_date_collaborative_tasks__task_id__due_date_post"},"Body_set_task_title_collaborative_tasks__task_id__title_post":{"properties":{"title":{"type":"string","maxLength":256,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"Body_set_task_title_collaborative_tasks__task_id__title_post"},"Body_unarchive_document_files_unarchive_post":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"}},"type":"object","required":["file_ids"],"title":"Body_unarchive_document_files_unarchive_post"},"Body_update_content_run_update_content_post":{"properties":{"content":{"title":"Content"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["content","run_id"],"title":"Body_update_content_run_update_content_post"},"Body_update_document_review_status_files_review_status_update_post":{"properties":{"upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Upload Ids"},"review_status":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}]}},"type":"object","required":["upload_ids"],"title":"Body_update_document_review_status_files_review_status_update_post"},"Body_update_draft_instructions_evidence_packet_drafts__evidence_packet_id__instructions_patch":{"properties":{"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","title":"Body_update_draft_instructions_evidence_packet_drafts__evidence_packet_id__instructions_patch"},"Body_update_evidence_packet_status_evidence_packets__evidence_packet_id__status_patch":{"properties":{"new_status":{"$ref":"#/components/schemas/EvidencePacketStatus"}},"type":"object","required":["new_status"],"title":"Body_update_evidence_packet_status_evidence_packets__evidence_packet_id__status_patch"},"Body_update_ignore_comment_risks__risk_id__ignore_post":{"properties":{"ignore_comment":{"type":"string","title":"Ignore Comment"}},"type":"object","required":["ignore_comment"],"title":"Body_update_ignore_comment_risks__risk_id__ignore_post"},"Body_update_notes_run_update_notes_post":{"properties":{"notes":{"title":"Notes"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["notes","run_id"],"title":"Body_update_notes_run_update_notes_post"},"Body_update_project_id_files_project_update_post":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["file_ids"],"title":"Body_update_project_id_files_project_update_post"},"Body_update_project_projects__project_id__put":{"properties":{"project_name":{"type":"string","title":"Project Name"}},"type":"object","required":["project_name"],"title":"Body_update_project_projects__project_id__put"},"Body_update_risk_status_risks__risk_id__status_post":{"properties":{"status_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Value"},"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"},"dismiss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Reason"},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"}},"type":"object","title":"Body_update_risk_status_risks__risk_id__status_post"},"Body_update_user_profile_users_profile_put":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["first_name","last_name"],"title":"Body_update_user_profile_users_profile_put"},"Body_upload_and_analyze_figma_frame_figma_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"preset_id":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Preset Id"},"collateral_type":{"$ref":"#/components/schemas/MarketingCollateralType"},"context_files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Context Files","default":[]}},"type":"object","required":["file","preset_id","collateral_type"],"title":"Body_upload_and_analyze_figma_frame_figma_upload_post"},"Body_upload_and_analyze_google_doc_google_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"collateral_type":{"$ref":"#/components/schemas/MarketingCollateralType"}},"type":"object","required":["file","preset_id","collateral_type"],"title":"Body_upload_and_analyze_google_doc_google_upload_post"},"Body_upload_and_run_requirements_extraction_internal_evals_requirements_extraction_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"profile":{"$ref":"#/components/schemas/ExtractionProfile","default":"marketing"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"model":{"type":"string","title":"Model","default":"CLAUDE_4_5_OPUS"},"temperature":{"type":"number","title":"Temperature","default":0.0}},"type":"object","required":["file"],"title":"Body_upload_and_run_requirements_extraction_internal_evals_requirements_extraction_upload_post"},"Body_upload_collateral_version_marketing_collateral_version_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"string","const":""}],"title":"Collateral Type","default":""},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}},"type":"object","required":["file","file_id"],"title":"Body_upload_collateral_version_marketing_collateral_version_post"},"Body_upload_contract_document_version_contracts__contract_id__documents__file_id__version_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_contract_document_version_contracts__contract_id__documents__file_id__version_post"},"Body_upload_email_logo_company_email_settings_logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_email_logo_company_email_settings_logo_post"},"Body_upload_evidence_packet_file_evidence_packets__evidence_packet_id__file__file_type_slug__post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"requirement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requirement Id"}},"type":"object","required":["file"],"title":"Body_upload_evidence_packet_file_evidence_packets__evidence_packet_id__file__file_type_slug__post"},"Body_upload_marketing_collateral_marketing_collateral_upload_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"collateral_types":{"items":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"string","const":""}]},"type":"array","title":"Collateral Types"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}},"type":"object","required":["files","collateral_types"],"title":"Body_upload_marketing_collateral_marketing_collateral_upload_post"},"Body_upload_new_files_files__post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"document_types":{"items":{"type":"string"},"type":"array","title":"Document Types"},"projects":{"items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":""}]},"type":"array","title":"Projects"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"}},"type":"object","required":["files","document_types","projects"],"title":"Body_upload_new_files_files__post"},"Body_upload_new_version_files_vendor_version_post":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file_id","file"],"title":"Body_upload_new_version_files_vendor_version_post"},"Body_upload_profile_picture_users_profile_picture_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_profile_picture_users_profile_picture_post"},"Body_upload_version_files_version_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"file_id":{"type":"string","format":"uuid","title":"File Id"}},"type":"object","required":["file","file_id"],"title":"Body_upload_version_files_version_post"},"BoundingBox":{"properties":{"x0":{"type":"number","title":"X0"},"y0":{"type":"number","title":"Y0"},"x1":{"type":"number","title":"X1"},"y1":{"type":"number","title":"Y1"}},"type":"object","required":["x0","y0","x1","y1"],"title":"BoundingBox"},"BulkAddDocumentRequestsBody":{"properties":{"document_requests":{"items":{"$ref":"#/components/schemas/AddDocumentRequestBody"},"type":"array","title":"Document Requests"}},"type":"object","required":["document_requests"],"title":"BulkAddDocumentRequestsBody"},"BulkAssignRoleRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"},"role_id":{"type":"string","format":"uuid","title":"Role Id"}},"type":"object","required":["user_ids","role_id"],"title":"BulkAssignRoleRequest"},"BulkAssignRoleResponse":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"users_total":{"type":"integer","title":"Users Total"},"users_assigned":{"type":"integer","title":"Users Assigned"},"users_already_had":{"type":"integer","title":"Users Already Had"}},"type":"object","required":["role_id","role_name","users_total","users_assigned","users_already_had"],"title":"BulkAssignRoleResponse","description":"Result of attaching one role to a batch of the company's active users."},"BulkDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"}},"type":"object","required":["download_url"],"title":"BulkDownloadResponse","description":"Presigned URL for a ZIP of selected documents."},"BulkNewsNotificationRequest":{"properties":{"vendor_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Vendor Ids"},"subscribed":{"type":"boolean","title":"Subscribed"}},"type":"object","required":["vendor_ids","subscribed"],"title":"BulkNewsNotificationRequest","description":"Request body for bulk news notification subscription updates."},"BulkRequirementEditOutcome":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"applied":{"type":"boolean","title":"Applied"},"revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision Number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["requirement_id","applied","revision_number","reason"],"title":"BulkRequirementEditOutcome","description":"What happened to one requirement in a bulk content edit.\n\nEvery requested id gets a row whether it changed or not — an id named twice is one requirement\nand gets one row. A bulk write that silently dropped what it could not apply would leave the\ncaller unable to tell \"already that scope\" from \"refused\" from \"not this company's\", and on\ncompliance material that difference is the whole answer.\n\nA sibling of `BulkRequirementStateOutcome` rather than the same model: nothing here changes a\nrequirement's state, and a `state` field on the answer would invite a caller to read the one that\nwas carried forward as the one it just set."},"BulkRequirementEditResponse":{"properties":{"applied":{"type":"integer","title":"Applied"},"skipped":{"type":"integer","title":"Skipped"},"outcomes":{"items":{"$ref":"#/components/schemas/BulkRequirementEditOutcome"},"type":"array","title":"Outcomes"}},"type":"object","required":["applied","skipped","outcomes"],"title":"BulkRequirementEditResponse"},"BulkRequirementStateOutcome":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"applied":{"type":"boolean","title":"Applied"},"state":{"anyOf":[{"$ref":"#/components/schemas/GuidelineRequirementState"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["requirement_id","applied","state","reason"],"title":"BulkRequirementStateOutcome","description":"What happened to one requirement in a bulk state change.\n\nEvery requested id gets a row whether it changed or not — an id named twice is one requirement\nand gets one row. A bulk write that silently dropped what it could not apply would leave the\ncaller unable to tell \"already off\" from \"refused\" from \"not yours\", and on compliance material\nthat difference is the whole answer."},"BulkRequirementStateResponse":{"properties":{"applied":{"type":"integer","title":"Applied"},"skipped":{"type":"integer","title":"Skipped"},"outcomes":{"items":{"$ref":"#/components/schemas/BulkRequirementStateOutcome"},"type":"array","title":"Outcomes"}},"type":"object","required":["applied","skipped","outcomes"],"title":"BulkRequirementStateResponse"},"BulkRiskIgnoreRequest":{"properties":{"risk_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Risk Ids"},"ignore_comment":{"type":"string","title":"Ignore Comment"},"selection":{"anyOf":[{"$ref":"#/components/schemas/RiskAreaSelection"},{"type":"null"}]}},"type":"object","required":["risk_ids","ignore_comment"],"title":"BulkRiskIgnoreRequest","description":"Apply one ignore comment to several risks in one request."},"BulkRiskMutationResponse":{"properties":{"updated_count":{"type":"integer","title":"Updated Count"}},"type":"object","required":["updated_count"],"title":"BulkRiskMutationResponse","description":"How many risks a bulk dismiss or ignore actually wrote."},"BulkRiskStatusRequest":{"properties":{"risk_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Risk Ids"},"status_value":{"type":"string","title":"Status Value"},"dismiss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Reason"},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"selection":{"anyOf":[{"$ref":"#/components/schemas/RiskAreaSelection"},{"type":"null"}]}},"type":"object","required":["risk_ids","status_value"],"title":"BulkRiskStatusRequest","description":"Dismiss (or otherwise set status on) several risks in one request.\n\n``selection`` is the drawn PDF area when the client is Select area; omitted\nfor any other bulk caller. Cap and uniqueness are enforced in the handler\nso a 400 names the rule instead of a 422's error list."},"BulkSetCollateralTypesRequest":{"properties":{"requirement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Requirement Ids"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"change_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Change Note"}},"type":"object","required":["requirement_ids"],"title":"BulkSetCollateralTypesRequest","description":"Re-scope several requirements to the collateral types they apply to, in one press.\n\nThe one bulk *content* edit, and staff-only, because it is the one field whose right value is a\nproperty of the whole guideline rather than of a sentence: an extraction reads a press-release\nstandard and scopes forty requirements to every collateral type, and correcting that one row at a\ntime is how it stays wrong. Wording and guidance are per-requirement judgements and stay in the\nsingle-row editor.\n\n`None` clears the scope back to \"applies to every collateral type\", the same convention as the\nsingle-requirement edit. An empty list is refused there and refused here: it would mean a\nrequirement that applies to nothing, which is a deletion spelled as a scope.\n\nCapped at `MAX_REQUIREMENTS_PER_STATE_CHANGE`, the same ceiling the bulk state change takes and\nfor the same reason — each requirement holds a lock for the whole batch and costs a subtransaction\nid, and Postgres spills its per-backend `subxids` array past 64."},"BulkSetRequirementStateRequest":{"properties":{"requirement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Requirement Ids"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"change_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Change Note"}},"type":"object","required":["requirement_ids","state"],"title":"BulkSetRequirementStateRequest","description":"Turn several requirements off, remove them, or put them back.\n\nSame rules as the single-requirement form, which is why the state field carries the same\nrefusal: SUPERSEDED is what a newer decomposition writes, never a person.\n\nThe cap is not arbitrary. Each requirement takes a lock on the live library for the whole batch\nand costs one subtransaction id, and Postgres spills its per-backend `subxids` array past 64 —\nat which point every other backend's visibility checks start hitting `pg_subtrans`, which is a\ncluster-wide problem rather than a slow request."},"BusinessAddress":{"properties":{"street_1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street 1"},"street_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"}},"type":"object","title":"BusinessAddress"},"BusinessDetails":{"properties":{"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"business_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Activity"},"country_of_operation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Of Operation"},"founded":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Founded"}},"type":"object","title":"BusinessDetails"},"BusinessInfoData":{"properties":{"job_id":{"type":"string","title":"Job Id"},"business_name":{"type":"string","title":"Business Name"},"status":{"type":"string","title":"Status"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"contact_information":{"anyOf":[{"$ref":"#/components/schemas/ContactInformation"},{"type":"null"}]},"business_details":{"anyOf":[{"$ref":"#/components/schemas/BusinessDetails"},{"type":"null"}]},"funding_information":{"anyOf":[{"$ref":"#/components/schemas/FundingInformation"},{"type":"null"}]}},"type":"object","required":["job_id","business_name","status"],"title":"BusinessInfoData"},"CUECValidationRequest":{"properties":{"sections":{"items":{"$ref":"#/components/schemas/CUECValidationSection"},"type":"array","title":"Sections"},"file_upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Upload Ids"},"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions"},"form_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name"}},"type":"object","required":["sections","file_upload_ids"],"title":"CUECValidationRequest"},"CUECValidationResponse":{"properties":{"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"form_id":{"type":"string","format":"uuid","title":"Form Id"},"form_name":{"type":"string","title":"Form Name"},"response_id":{"type":"string","format":"uuid","title":"Response Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["vendor_company_id","form_id","form_name","response_id","run_id"],"title":"CUECValidationResponse"},"CUECValidationSection":{"properties":{"section_name":{"type":"string","title":"Section Name"},"controls":{"items":{"type":"string"},"type":"array","title":"Controls"}},"type":"object","required":["section_name","controls"],"title":"CUECValidationSection"},"CancelDocumentRequestRequest":{"properties":{"body":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Body"}},"type":"object","title":"CancelDocumentRequestRequest"},"CandidateResponse":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"guideline_file_id":{"type":"string","format":"uuid","title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"included":{"type":"boolean","title":"Included"},"exclusions":{"items":{"$ref":"#/components/schemas/ApplicabilityExclusion"},"type":"array","title":"Exclusions"},"batch_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Index"},"batch_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Key"}},"type":"object","required":["requirement_id","revision_id","guideline_file_id","guideline_filename","requirement_text","judging_guidance","state","collateral_types","trigger_terms","matched_trigger_terms","section_label","source_page","included","exclusions","batch_index","batch_key"],"title":"CandidateResponse"},"CheckedRequirement":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"requirement_text":{"type":"string","title":"Requirement Text"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"outcome":{"$ref":"#/components/schemas/RequirementCheckOutcome"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms","default":[]},"citation":{"$ref":"#/components/schemas/RequirementCitation"},"risk_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Risk Ids","default":[]}},"type":"object","required":["requirement_id","revision_id","requirement_text","outcome","citation"],"title":"CheckedRequirement","description":"One requirement, as it was judged against one piece of collateral."},"ChecklistItemCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"note_requirement":{"$ref":"#/components/schemas/ChecklistItemNoteRequirement","default":"DISABLED"},"note_helper_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note Helper Text"},"allow_not_applicable":{"type":"boolean","title":"Allow Not Applicable","default":false}},"type":"object","required":["title"],"title":"ChecklistItemCreateRequest"},"ChecklistItemNoteRequirement":{"type":"string","enum":["DISABLED","OPTIONAL","REQUIRED","REQUIRED_WHEN_NOT_APPLICABLE"],"title":"ChecklistItemNoteRequirement","description":"Whether settling an item asks the reviewer to say why."},"ChecklistItemReorderRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Item Ids"}},"type":"object","required":["item_ids"],"title":"ChecklistItemReorderRequest"},"ChecklistItemResponse":{"properties":{"checklist_item_id":{"type":"string","format":"uuid","title":"Checklist Item Id"},"checklist_id":{"type":"string","format":"uuid","title":"Checklist Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"index":{"type":"integer","title":"Index"},"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"},"assignee_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee First Name"},"assignee_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Last Name"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"note_requirement":{"$ref":"#/components/schemas/ChecklistItemNoteRequirement"},"note_helper_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Helper Text"},"allow_not_applicable":{"type":"boolean","title":"Allow Not Applicable"},"completed":{"type":"boolean","title":"Completed"},"not_applicable":{"type":"boolean","title":"Not Applicable"},"completion_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Note"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by":{"anyOf":[{"$ref":"#/components/schemas/ChecklistUser"},{"type":"null"}]}},"type":"object","required":["checklist_item_id","checklist_id","company_id","vendor_id","index","title","body","assignee","assignee_first_name","assignee_last_name","due_date","note_requirement","note_helper_text","allow_not_applicable","completed","not_applicable","completion_note","completed_at","completed_by"],"title":"ChecklistItemResponse"},"ChecklistItemSpec":{"properties":{"title":{"type":"string","maxLength":256,"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"note_requirement":{"$ref":"#/components/schemas/ChecklistItemNoteRequirement","default":"DISABLED"},"note_helper_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note Helper Text"},"allow_not_applicable":{"type":"boolean","title":"Allow Not Applicable","default":false}},"type":"object","required":["title"],"title":"ChecklistItemSpec","description":"One item of a review stage's template checklist.\n\n``assignee`` is a user *email* resolved within the namespace (the same user\nselector `CompanySpec.assignees` and `ServiceSpec.assignee` use) — the\nchecklist template stores it as the item's default assignee, which every\nreview of this type then inherits when its stage checklists are\nmaterialized.\n\nThe per-item options are defaulted so YAML written before they existed\nround-trips unchanged."},"ChecklistItemUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Completed"},"note_requirement":{"anyOf":[{"$ref":"#/components/schemas/ChecklistItemNoteRequirement"},{"type":"null"}]},"note_helper_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note Helper Text"},"allow_not_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Not Applicable"},"not_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Not Applicable"},"completion_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Note"}},"type":"object","title":"ChecklistItemUpdateRequest"},"ChecklistResponse":{"properties":{"checklist_id":{"type":"string","format":"uuid","title":"Checklist Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"},"checklist_type":{"$ref":"#/components/schemas/ChecklistType"},"review_stage":{"anyOf":[{"$ref":"#/components/schemas/ReviewStage"},{"type":"null"}]},"review_type":{"anyOf":[{"$ref":"#/components/schemas/ReviewType"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"items":{"items":{"$ref":"#/components/schemas/ChecklistItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["checklist_id","company_id","vendor_id","checklist_type","completed_at","items"],"title":"ChecklistResponse"},"ChecklistType":{"type":"string","enum":["INITIAL_REVIEW_TEMPLATE","INITIAL_REVIEW_INSTANCE","PERIODIC_REVIEW_TEMPLATE","PERIODIC_REVIEW_INSTANCE","REVIEW_STAGE_TEMPLATE","REVIEW_STAGE_INSTANCE"],"title":"ChecklistType"},"ChecklistUser":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["user_id","first_name","last_name"],"title":"ChecklistUser"},"ChoiceAnswer-Input":{"properties":{"choice":{"type":"string","title":"Choice"},"explanation":{"type":"string","title":"Explanation","default":""},"citations":{"items":{"$ref":"#/components/schemas/Citation-Input"},"type":"array","title":"Citations"},"conflicting":{"type":"boolean","title":"Conflicting","default":false}},"type":"object","required":["choice","citations"],"title":"ChoiceAnswer"},"ChoiceAnswer-Output":{"properties":{"choice":{"type":"string","title":"Choice"},"explanation":{"type":"string","title":"Explanation","default":""},"citations":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__drafting__Citation"},"type":"array","title":"Citations"},"conflicting":{"type":"boolean","title":"Conflicting","default":false}},"type":"object","required":["choice","citations"],"title":"ChoiceAnswer"},"ChooseOneQuestion":{"properties":{"question":{"type":"string","title":"Question"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context"},"score_compliance":{"type":"boolean","title":"Score Compliance","default":true},"question_id":{"type":"string","title":"Question Id"},"type":{"type":"string","const":"one","title":"Type","default":"one"}},"type":"object","required":["question","options","question_id"],"title":"ChooseOneQuestion"},"Citation-Input":{"properties":{"type":{"type":"string","title":"Type"},"cited_text":{"type":"string","title":"Cited Text"},"document_index":{"type":"integer","title":"Document Index"},"document_title":{"type":"string","title":"Document Title"},"end_page_number":{"type":"integer","title":"End Page Number"},"start_page_number":{"type":"integer","title":"Start Page Number"}},"type":"object","required":["type","cited_text","document_index","document_title","end_page_number","start_page_number"],"title":"Citation"},"CitationCoverage":{"properties":{"total_risks":{"type":"integer","title":"Total Risks"},"with_citations":{"type":"integer","title":"With Citations"},"without_citations":{"type":"integer","title":"Without Citations"},"with_citations_pct":{"type":"number","title":"With Citations Pct"}},"type":"object","required":["total_risks","with_citations","without_citations","with_citations_pct"],"title":"CitationCoverage","description":"How many risks in the current scope carry at least one citation.\n\nA risk either has citation(s) (page + clause evidence) or it does not, so\n`with_citations + without_citations == total_risks`. Counts every risk\nsurfaced by the marketing runs in the window (including ones later\nsuperseded by a re-run)."},"CitationTargetKind":{"type":"string","enum":["file_version","artifact","web","prior_review"],"title":"CitationTargetKind","description":"What is being cited.\n\nFILE_VERSION targets `file_versions.upload_id` — an immutable document\n*version*, never a filename and never `files.file_id`, so a re-upload can\nnever silently repoint an old trace at text the agent never read."},"CitationView":{"properties":{"citation_id":{"type":"string","format":"uuid","title":"Citation Id"},"target_kind":{"$ref":"#/components/schemas/CitationTargetKind"},"display_title":{"type":"string","title":"Display Title"},"locator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locator"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"},"rationale_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rationale Offset"},"paragraph_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paragraph Index"},"offset_in_paragraph":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Offset In Paragraph"},"anchor_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Text"},"step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Step Id"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"start_page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Page Number"},"end_page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Page Number"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["citation_id","target_kind","display_title","locator","quote","rationale_offset","paragraph_index","offset_in_paragraph","anchor_text","step_id","upload_id","start_page_number","end_page_number","artifact_id","url"],"title":"CitationView","description":"One structural citation, resolved for rendering.\n\nA `file_version` target carries `upload_id` (not a file_id) because that is\nwhat the document-preview hook takes, plus the page range and the verbatim\nquote the viewer highlights."},"ClassifyEvalResultItem":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"current_type":{"type":"string","title":"Current Type"},"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"score":{"type":"number","title":"Score"}},"type":"object","required":["file_id","filename","current_type","suggestion","options","score"],"title":"ClassifyEvalResultItem"},"ClassifyFileTypeRequest":{"properties":{"filenames":{"items":{"type":"string"},"type":"array","title":"Filenames"},"categories":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentCategory"},"type":"array"},{"type":"null"}],"title":"Categories"},"scope":{"$ref":"#/components/schemas/DocumentScope"}},"type":"object","required":["filenames","scope"],"title":"ClassifyFileTypeRequest"},"ClientMetricsReportResponse":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"teams":{"items":{"$ref":"#/components/schemas/ClientMetricsTeam"},"type":"array","title":"Teams"},"company_team_count":{"type":"integer","title":"Company Team Count"},"current_start":{"type":"string","format":"date","title":"Current Start"},"current_end":{"type":"string","format":"date","title":"Current End"},"prior_start":{"type":"string","format":"date","title":"Prior Start"},"markdown":{"type":"string","title":"Markdown"}},"type":"object","required":["company_id","company_name","teams","company_team_count","current_start","current_end","prior_start","markdown"],"title":"ClientMetricsReportResponse","description":"Copy-pasteable client metrics digest for one company's fortnight.\n\n``markdown`` is the whole deliverable -- summary table, weekly breakdown,\ntop submitters, the per-team drilldown, and the metric definitions --\nrendered server-side so the definitions live next to the SQL that computes\nthem."},"ClientMetricsTeam":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["team_id","name"],"title":"ClientMetricsTeam","description":"One marketing team the digest was scoped to."},"ClonePresetsRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"source_team_id":{"type":"string","format":"uuid","title":"Source Team Id"},"target_team_id":{"type":"string","format":"uuid","title":"Target Team Id"},"suffix":{"type":"string","title":"Suffix"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1},{"type":"null"}],"title":"Preset Ids"}},"type":"object","required":["company_id","source_team_id","target_team_id","suffix"],"title":"ClonePresetsRequest"},"ClonePreviewResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ClonePreviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"ClonePreviewResponse"},"ClonePreviewRow":{"properties":{"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"source_name":{"type":"string","title":"Source Name"},"new_name":{"type":"string","title":"New Name"},"file_count":{"type":"integer","title":"File Count"},"collides":{"type":"boolean","title":"Collides"},"too_long":{"type":"boolean","title":"Too Long"}},"type":"object","required":["preset_id","source_name","new_name","file_count","collides","too_long"],"title":"ClonePreviewRow"},"CloneResultResponse":{"properties":{"created":{"items":{"type":"string"},"type":"array","title":"Created"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"}},"type":"object","required":["created","skipped"],"title":"CloneResultResponse"},"CloneRoleRequest":{"properties":{"target_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Company Id"},"new_role_name":{"type":"string","title":"New Role Name"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]}},"type":"object","required":["new_role_name"],"title":"CloneRoleRequest","description":"Copy a role (its permission grants) into a new role.\n\n``target_company_id=None`` clones into the global/system scope; a UUID clones into\nthat company's own box. Powers both \"copy a General role into a company\" and\n\"copy a role between two companies\"."},"CloseTaskRequest":{"properties":{"disposition":{"$ref":"#/components/schemas/TaskDisposition"}},"type":"object","required":["disposition"],"title":"CloseTaskRequest"},"CodeBlockCreate":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"soft_logic":{"type":"string","title":"Soft Logic"}},"type":"object","required":["name","code","soft_logic"],"title":"CodeBlockCreate"},"CodeBlockExecutionResponse":{"properties":{"execution_id":{"type":"string","format":"uuid","title":"Execution Id"},"block_id":{"type":"string","format":"uuid","title":"Block Id"},"block_code":{"type":"string","title":"Block Code"},"raw_output":{"anyOf":[{},{"type":"null"}],"title":"Raw Output"},"run_target_id":{"type":"string","format":"uuid","title":"Run Target Id"},"run_target_type":{"$ref":"#/components/schemas/CodeBlockExecutionTargetType"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["execution_id","block_id","block_code","run_target_id","run_target_type","created"],"title":"CodeBlockExecutionResponse"},"CodeBlockExecutionTargetType":{"type":"string","enum":["FORM","RUN"],"title":"CodeBlockExecutionTargetType"},"CodeBlockResponse":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"soft_logic":{"type":"string","title":"Soft Logic"},"created":{"type":"string","format":"date-time","title":"Created"},"last_modified":{"type":"string","format":"date-time","title":"Last Modified"}},"type":"object","required":["block_id","company_id","name","code","soft_logic","created","last_modified"],"title":"CodeBlockResponse"},"CollateralCitationImage":{"properties":{"page_number":{"type":"integer","title":"Page Number"},"image_data_url":{"type":"string","title":"Image Data Url"},"width_px":{"type":"integer","title":"Width Px"},"height_px":{"type":"integer","title":"Height Px"}},"type":"object","required":["page_number","image_data_url","width_px","height_px"],"title":"CollateralCitationImage","description":"A picture of the region of the collateral that a risk's citation points at.\n\nInlined as a data URL rather than handed over as a presigned S3 link: the export\nis compiled to HTML in the browser and rendered to PDF by a third party, so an\nimage that is a link is an image that has to still resolve, from their network,\nat render time. It is also a crop of a document the recipient may not be entitled\nto, which is not a thing to put behind a URL that outlives the request."},"CollateralOption":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Preset Ids"},"has_production_run":{"type":"boolean","title":"Has Production Run"},"last_production_run_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Production Run Time"}},"type":"object","required":["file_id","filename","collateral_type","preset_ids","has_production_run","last_production_run_time"],"title":"CollateralOption","description":"One pickable piece of collateral, with everything needed to judge it worth running on."},"CollateralPreparation":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"collateral_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collateral Filename"},"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Preset Ids"},"unresolved_preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Unresolved Preset Ids"},"guidelines":{"items":{"$ref":"#/components/schemas/GuidelineReadiness"},"type":"array","title":"Guidelines"},"ready":{"type":"integer","title":"Ready"},"in_flight":{"type":"integer","title":"In Flight"},"failed":{"type":"integer","title":"Failed"},"never_run":{"type":"integer","title":"Never Run"},"skipped":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped","default":[]}},"type":"object","required":["company_id","file_id","collateral_filename","preset_ids","unresolved_preset_ids","guidelines","ready","in_flight","failed","never_run"],"title":"CollateralPreparation","description":"What a comparison for this collateral would gather from, and what is missing.\n\nAnswers the question the run itself cannot: a run against an undecomposed library succeeds and\nreports \"0 of 0 survived\", which is indistinguishable from a library that genuinely excludes\neverything. This says which guidelines have no library *before* anything is judged."},"CollateralTypeInfo":{"properties":{"type":{"$ref":"#/components/schemas/MarketingCollateralType"},"definition":{"type":"string","title":"Definition"}},"type":"object","required":["type","definition"],"title":"CollateralTypeInfo","description":"A collateral type plus its generic, customer-agnostic definition."},"CollateralVersionMatch":{"properties":{"key":{"type":"string","title":"Key"},"match_type":{"type":"string","enum":["identical","similar"],"title":"Match Type"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"matched_filename":{"type":"string","title":"Matched Filename"},"last_analyzed_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Analyzed Date"},"reason":{"anyOf":[{"type":"string","maxLength":280},{"type":"null"}],"title":"Reason"},"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Preset Ids"}},"type":"object","required":["key","match_type","file_id","matched_filename"],"title":"CollateralVersionMatch","description":"An existing document a dropped file appears to be a new version of.\n`identical` means byte-identical to the current version — nothing to\nversion; `similar` is the case that offers a version upload."},"CollateralVersionMatchRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/DroppedFileFingerprint"},"type":"array","maxItems":20,"title":"Files"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},"type":"object","required":["files"],"title":"CollateralVersionMatchRequest"},"CollateralVersionMatchResponse":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/CollateralVersionMatch"},"type":"array","title":"Matches"}},"type":"object","required":["matches"],"title":"CollateralVersionMatchResponse"},"Companies":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"company_website":{"type":"string","title":"Company Website"},"disabled":{"type":"boolean","title":"Disabled"}},"type":"object","required":["company_id","company_name","company_website","disabled"],"title":"Companies"},"CompaniesWithDomains":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"company_website":{"type":"string","title":"Company Website"},"disabled":{"type":"boolean","title":"Disabled"},"domains":{"items":{"type":"string"},"type":"array","title":"Domains","default":[]}},"type":"object","required":["company_id","company_name","company_website","disabled"],"title":"CompaniesWithDomains"},"CompanyDocumentSettingsResponse":{"properties":{"require_submission_review":{"type":"boolean","title":"Require Submission Review"}},"type":"object","required":["require_submission_review"],"title":"CompanyDocumentSettingsResponse","description":"The company's effective document-wide policy.\n\nAlways answers with a full policy, filling in the defaults for a company\nthat has never saved one, so the client never has a null state to interpret."},"CompanyDocumentSettingsUpdate":{"properties":{"require_submission_review":{"type":"boolean","title":"Require Submission Review"}},"type":"object","required":["require_submission_review"],"title":"CompanyDocumentSettingsUpdate","description":"Request body for the company's document-wide policy.\n\nThe whole policy, not one named switch: the settings page sends the state it\nwants, so a second switch is a field here rather than another endpoint."},"CompanyEmailSettingsResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"reply_to_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To Email"},"use_company_icon":{"type":"boolean","title":"Use Company Icon"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"custom_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Logo Url"}},"type":"object","required":["configured","reply_to_email","use_company_icon","logo_url","custom_logo_url"],"title":"CompanyEmailSettingsResponse","description":"The company's email branding, as the settings page renders it.\n\nUnlike the document-settings response this one *can* be empty — a company\nthat has never configured branding has no reply-to to invent, and the page\nneeds to know that so it presents the form as unsaved rather than as holding\na value nobody chose. ``configured`` says which state this is."},"CompanyEmailSettingsUpdate":{"properties":{"reply_to_email":{"type":"string","format":"email","title":"Reply To Email"},"use_company_icon":{"type":"boolean","title":"Use Company Icon","default":false}},"type":"object","required":["reply_to_email"],"title":"CompanyEmailSettingsUpdate","description":"Request body for the company's email branding.\n\nThe whole configuration, not one named field: the settings page sends the\nstate it wants, so a new setting is a field here rather than an endpoint."},"CompanyMonitorRunResponse":{"properties":{"company_monitor_run_id":{"type":"string","format":"uuid","title":"Company Monitor Run Id"},"state":{"type":"string","title":"State"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"results":{"items":{"$ref":"#/components/schemas/AdverseMediaHit"},"type":"array","title":"Results"},"created":{"type":"string","title":"Created"}},"type":"object","required":["company_monitor_run_id","state","created"],"title":"CompanyMonitorRunResponse"},"CompanyNotificationPreference":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["notification_type","label","description","enabled"],"title":"CompanyNotificationPreference","description":"A company-wide notification type and the company's effective configuration."},"CompanyNotificationPreferenceUpsert":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["notification_type","enabled"],"title":"CompanyNotificationPreferenceUpsert","description":"Request body for upserting the company's preference for one notification type."},"CompanyNotificationsResponse":{"properties":{"notification_types":{"items":{"$ref":"#/components/schemas/NotificationTypeOption"},"type":"array","title":"Notification Types"},"users":{"items":{"$ref":"#/components/schemas/CompanyUserNotificationPreferences"},"type":"array","title":"Users"}},"type":"object","required":["notification_types","users"],"title":"CompanyNotificationsResponse"},"CompanyOption":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"guidelines_with_library":{"type":"integer","title":"Guidelines With Library"},"guidelines_attached":{"type":"integer","title":"Guidelines Attached"}},"type":"object","required":["company_id","company_name","guidelines_with_library","guidelines_attached"],"title":"CompanyOption"},"CompanyOverviewRow":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"disabled":{"type":"boolean","title":"Disabled"},"vendor_count":{"type":"integer","title":"Vendor Count"},"open_reviews":{"type":"integer","title":"Open Reviews"},"open_issues":{"type":"integer","title":"Open Issues"}},"type":"object","required":["company_id","company_name","disabled","vendor_count","open_reviews","open_issues"],"title":"CompanyOverviewRow","description":"A company's headline review-flow counts for the fleet view."},"CompanyPublicInfoResponse":{"properties":{"company_name":{"type":"string","title":"Company Name"},"company_website":{"type":"string","title":"Company Website"}},"type":"object","required":["company_name","company_website"],"title":"CompanyPublicInfoResponse"},"CompanyResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"Company","title":"Kind","default":"Company"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/CompanySpec"}},"type":"object","required":["metadata","spec"],"title":"CompanyResourceResponse","description":"GET/list response for a Company resource (includes annotations)."},"CompanyRoleOption":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"}},"type":"object","required":["role_id","role_name"],"title":"CompanyRoleOption"},"CompanySpec":{"properties":{"company_website":{"type":"string","title":"Company Website"},"entity_type":{"$ref":"#/components/schemas/EntityType","default":"vendor"},"assignees":{"items":{"type":"string"},"type":"array","title":"Assignees"},"custom_field_values":{"items":{"$ref":"#/components/schemas/CustomFieldValueSpec"},"type":"array","title":"Custom Field Values"}},"type":"object","required":["company_website"],"title":"CompanySpec"},"CompanyUser-Input":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role_type":{"$ref":"#/components/schemas/UserRoleType"}},"type":"object","required":["email","first_name","last_name","role_type"],"title":"CompanyUser"},"CompanyUser-Output":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["user_id","first_name","last_name","email_address"],"title":"CompanyUser"},"CompanyUserMembership":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"team_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Team Ids"},"primary_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primary Team Id"}},"type":"object","required":["user_id","name","email","team_ids","primary_team_id"],"title":"CompanyUserMembership"},"CompanyUserNotificationPreferences":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"enabled":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Enabled"},"permitted":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permitted"},"scope":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]},"type":"object","title":"Scope"}},"type":"object","required":["user_id","first_name","last_name","email","enabled","permitted","scope"],"title":"CompanyUserNotificationPreferences"},"CompanyWithRoles":{"properties":{"company_id":{"type":"string","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"}},"type":"object","required":["company_id","company_name"],"title":"CompanyWithRoles","description":"Company that has at least one role in UserRoles."},"ComplianceFeedbackReportEnqueueResponse":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"status":{"$ref":"#/components/schemas/ComplianceFeedbackReportStatus","default":"pending"}},"type":"object","required":["report_id"],"title":"ComplianceFeedbackReportEnqueueResponse","description":"Returned immediately when a report job is enqueued (HTTP 202)."},"ComplianceFeedbackReportListResponse":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/ComplianceFeedbackReportResponse"},"type":"array","title":"Reports"}},"type":"object","required":["reports"],"title":"ComplianceFeedbackReportListResponse","description":"Recent compliance-feedback reports for a company (newest first)."},"ComplianceFeedbackReportRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"lookback":{"type":"string","title":"Lookback","default":"2w"},"comments_only":{"type":"boolean","title":"Comments Only","default":false},"email_on_completion":{"type":"boolean","title":"Email On Completion","default":true}},"type":"object","required":["company_id"],"title":"ComplianceFeedbackReportRequest","description":"Kick off compliance feedback analysis for a company.\n\nMirrors the CLI flags on `backend.helpers.compliance_feedback_analysis`."},"ComplianceFeedbackReportResponse":{"properties":{"report_id":{"type":"string","format":"uuid","title":"Report Id"},"status":{"$ref":"#/components/schemas/ComplianceFeedbackReportStatus"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"lookback":{"type":"string","title":"Lookback"},"comments_only":{"type":"boolean","title":"Comments Only"},"email_on_completion":{"type":"boolean","title":"Email On Completion","default":false},"cutoff":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cutoff"},"feedback_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Feedback Count"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"disposition_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition Summary"},"report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created":{"type":"string","format":"date-time","title":"Created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["report_id","status","company_id","company_name","team_id","team_name","lookback","comments_only","created"],"title":"ComplianceFeedbackReportResponse","description":"Persisted admin compliance-feedback report (pending / completed / failed).\n\nProduced asynchronously by ``ComplianceFeedbackReportWorkflow`` via\n`backend.helpers.compliance_feedback_analysis`. Result fields\n(``cutoff`` / ``feedback_count`` / ``summary`` / ``disposition_summary`` /\n``report``) are null while ``status`` is pending; ``error_message`` is set\non failure."},"ComplianceFeedbackReportStatus":{"type":"string","enum":["pending","completed","failed"],"title":"ComplianceFeedbackReportStatus","description":"Lifecycle of an admin compliance-feedback report job."},"ComplianceStatus":{"type":"string","enum":["compliant","non_compliant","partially_compliant","not_applicable"],"title":"ComplianceStatus"},"ConditionBulkRetrainRequest":{"properties":{"block_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Block Ids"}},"type":"object","required":["block_ids"],"title":"ConditionBulkRetrainRequest"},"ConditionBulkRetrainResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionBulkRetrainResultItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConditionBulkRetrainResponse"},"ConditionBulkRetrainResultItem":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"suggested_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Code"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["block_id","suggested_code","explanation","error"],"title":"ConditionBulkRetrainResultItem"},"ConditionBulkUpdateItem":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"code":{"type":"string","title":"Code"},"soft_logic":{"type":"string","title":"Soft Logic"}},"type":"object","required":["block_id","code","soft_logic"],"title":"ConditionBulkUpdateItem"},"ConditionBulkUpdateRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionBulkUpdateItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConditionBulkUpdateRequest"},"ConditionBulkUpdateResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionBulkUpdateResultItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConditionBulkUpdateResponse"},"ConditionBulkUpdateResultItem":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["block_id","success","error"],"title":"ConditionBulkUpdateResultItem"},"ConditionHealthItem":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"soft_logic":{"type":"string","title":"Soft Logic"},"selection_ref_count":{"type":"integer","title":"Selection Ref Count"},"type_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Error"}},"type":"object","required":["block_id","company_id","company_name","name","code","soft_logic","selection_ref_count","type_error"],"title":"ConditionHealthItem"},"ConditionsHealthResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConditionHealthItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConditionsHealthResponse"},"ConfigureSAMLRequest":{"properties":{"provider_name":{"type":"string","title":"Provider Name"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_domain":{"type":"string","title":"Company Domain"}},"type":"object","required":["provider_name","client_id","client_secret","company_id","company_domain"],"title":"ConfigureSAMLRequest"},"ContactInformation":{"properties":{"business_addresses":{"items":{"$ref":"#/components/schemas/BusinessAddress"},"type":"array","title":"Business Addresses"},"business_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Address"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"email_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Address"},"employee_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Count"}},"type":"object","title":"ContactInformation"},"ContractChangeSetResponse":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"summary_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Summary Run Id"},"summary_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"effective_date":{"anyOf":[{"$ref":"#/components/schemas/ProposedDate"},{"type":"null"}]},"expiration_date":{"anyOf":[{"$ref":"#/components/schemas/ProposedDate"},{"type":"null"}]},"auto_renews":{"anyOf":[{"$ref":"#/components/schemas/ProposedAutoRenew"},{"type":"null"}]},"notice_period":{"anyOf":[{"$ref":"#/components/schemas/ProposedNoticePeriod"},{"type":"null"}]},"termination_notice_date":{"anyOf":[{"$ref":"#/components/schemas/ProposedDate"},{"type":"null"}]},"obligations":{"anyOf":[{"$ref":"#/components/schemas/ProposedObligations"},{"type":"null"}]}},"type":"object","required":["contract_id"],"title":"ContractChangeSetResponse","description":"The reviewable term-field output of the latest contract summary run.\n\nTerm-field proposals stay pending until the user accepts them. Proposed key\ndates are PROPOSED ``AnnualKeyDates`` rows the user ratifies individually;\nfetch them (alongside the contract's active/superseded dates) from\n``GET /thirdparties/key-dates/contract/{contract_id}`` instead."},"ContractCurrentTermRowResponse":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"contract_title":{"type":"string","title":"Contract Title"},"contract_status":{"$ref":"#/components/schemas/ContractStatus"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"service_names":{"items":{"type":"string"},"type":"array","title":"Service Names","default":[]},"term":{"anyOf":[{"$ref":"#/components/schemas/ContractTermResponse"},{"type":"null"}]}},"type":"object","required":["contract_id","contract_title","contract_status"],"title":"ContractCurrentTermRowResponse","description":"One contract and the term currently in force on it.\n\nDistinct from ``ContractRenewalRowResponse`` in the one way that matters for\na list of *every* contract: ``term`` is optional. A contract nothing\nterm-related is known about has no term row at all, and it is precisely the\nrow a company-wide view has to show — dropping it would read as \"no renewal\nwork here\" rather than \"nobody has captured these dates\".\n\n``vendor_website`` rides along for the favicon beside the name, as the\nrequests worklist and the vendor list render it.\n\n``contract_status`` is the *agreement's* status, distinct from ``term.status``\n— the list can show both columns at once."},"ContractDeadlineKind":{"type":"string","enum":["notice","renewal"],"title":"ContractDeadlineKind","description":"Which of a term's two dates a reminder counts down to.\n\nA term has two real deadlines, not one derived deadline: the date you must\ngive notice by, and the date the agreement turns over. Each gets its own\nladder off its own cadence, because they are different distances from \"act\nnow\" — a notice deadline wants months of warning, a renewal date wants days.\n\nWho receives a row is **not** encoded here: both configured audiences get\nevery row, resolved at send time (``resolve_term_assignees``)."},"ContractDocumentResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"role":{"$ref":"#/components/schemas/ContractDocumentRole"},"filename":{"type":"string","title":"Filename"},"parent_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent File Id"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"field_groups":{"items":{"$ref":"#/components/schemas/FieldGroup"},"type":"array","title":"Field Groups","default":[]},"versions":{"items":{"$ref":"#/components/schemas/ContractDocumentVersionResponse"},"type":"array","title":"Versions","default":[]}},"type":"object","required":["file_id","contract_id","role","filename"],"title":"ContractDocumentResponse"},"ContractDocumentRole":{"type":"string","enum":["base","amendment","addendum","sow","order_form","exhibit"],"title":"ContractDocumentRole","description":"How a file relates to its parent Contract.\n\nBASE is the root/master document (at most one per contract). All other roles\nhang off the agreement via ``parent_file_id``."},"ContractDocumentVersionResponse":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"type":"string","title":"Filename"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"field_groups":{"items":{"$ref":"#/components/schemas/FieldGroup"},"type":"array","title":"Field Groups","default":[]}},"type":"object","required":["upload_id","filename","uploaded_at"],"title":"ContractDocumentVersionResponse"},"ContractLifecycleConfigurationResponse":{"properties":{"is_configured":{"type":"boolean","title":"Is Configured"},"notice_reminder_lead_days":{"items":{"type":"integer"},"type":"array","title":"Notice Reminder Lead Days"},"renewal_reminder_lead_days":{"items":{"type":"integer"},"type":"array","title":"Renewal Reminder Lead Days"},"notice_reminders_enabled":{"type":"boolean","title":"Notice Reminders Enabled","default":true},"renewal_reminders_enabled":{"type":"boolean","title":"Renewal Reminders Enabled","default":true},"default_notice_period_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Notice Period Value"},"default_notice_period_unit":{"anyOf":[{"$ref":"#/components/schemas/NoticePeriodUnit"},{"type":"null"}]},"default_renewal_term_months":{"type":"integer","title":"Default Renewal Term Months"},"assignees":{"items":{"$ref":"#/components/schemas/AssigneeSelectionResponse"},"type":"array","title":"Assignees"},"subscribers":{"items":{"$ref":"#/components/schemas/AssigneeSelectionResponse"},"type":"array","title":"Subscribers"},"available_assignee_modes":{"items":{"$ref":"#/components/schemas/AssigneeMode"},"type":"array","title":"Available Assignee Modes"},"default_assignee_mode":{"$ref":"#/components/schemas/AssigneeMode"}},"type":"object","required":["is_configured","notice_reminder_lead_days","renewal_reminder_lead_days","default_renewal_term_months","default_assignee_mode"],"title":"ContractLifecycleConfigurationResponse","description":"The company's resolved lifecycle settings.\n\nAlways concrete values: an unconfigured company gets the code defaults with\n``is_configured=False``, so the UI can render \"using defaults\" without\nnull-branching every field."},"ContractLifecycleConfigurationUpdate":{"properties":{"notice_reminder_lead_days":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Notice Reminder Lead Days"},"renewal_reminder_lead_days":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Renewal Reminder Lead Days"},"notice_reminders_enabled":{"type":"boolean","title":"Notice Reminders Enabled"},"renewal_reminders_enabled":{"type":"boolean","title":"Renewal Reminders Enabled"},"assignees":{"items":{"$ref":"#/components/schemas/AssigneeSelectionInput"},"type":"array","minItems":1,"title":"Assignees"},"subscribers":{"items":{"$ref":"#/components/schemas/AssigneeSelectionInput"},"type":"array","minItems":1,"title":"Subscribers"}},"type":"object","required":["notice_reminder_lead_days","renewal_reminder_lead_days","notice_reminders_enabled","renewal_reminders_enabled","assignees","subscribers"],"title":"ContractLifecycleConfigurationUpdate","description":"The company's renewal reminder policy, as the settings page sends it.\n\nEvery field is required: this is the whole policy, not a patch, so a save\nfrom a stale page cannot half-apply. The two ``default_*`` columns on the\ntable are **absent on purpose** — nothing reads them yet (see\n``upsert_contract_lifecycle_settings``), and a request field nothing acts on\nis a promise the product does not keep.\n\nTwo cadences and two recipient roles, on independent axes. The cadences\nbelong to the term's two *dates* — a notice deadline wants months of\nwarning, a renewal date wants days — and each date carries a switch that\nturns its ladder off for the whole company. The roles are the two groups of\npeople reminded on both, for the life of the term (unioned at send time,\nnot stored — see ``resolve_term_assignees``): the assignees own the renewal\ndecision, the subscribers are kept in the loop.\n\nThe switches are separate fields rather than an empty cadence: the ladder is\nbounded at one lead day minimum, so an empty list would be a second way to\nsay \"off\" that the CHECK rejects — and a company turning a date back on would\nhave lost the schedule it had.\n\nEach role is a *set*, so a company can name two teams and a person for one of\nthem. An empty role is a role nobody fills: it resolves to nobody rather than\nfalling back, which is why the settings page blocks the save. Which id belongs\nwith which mode — and whether the mode is in a contract's scope — is checked\nby the endpoint against the company's directory, since that needs a database."},"ContractRenewalDecision":{"type":"string","enum":["renew","renegotiate","terminate","replace"],"title":"ContractRenewalDecision","description":"What a user decided to do about a term coming up for renewal.\n\nA **fixed** set, not a per-company configurable one: it is what lets the\nemail, the API and the state machine name the same thing without snapshotting\na label onto every term.\n\nTwo behavior pairs (RENEW/RENEGOTIATE, TERMINATE/REPLACE) — same effect,\ndifferent record."},"ContractRenewalListResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ContractRenewalRowResponse"},"type":"array","title":"Rows"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["rows","total"],"title":"ContractRenewalListResponse","description":"Outstanding renewal decisions, soonest deadline first.\n\n``total`` counts the rows the filters matched, not the page — the caller\nneeds it to render a count beside a section header it has only paged part of."},"ContractRenewalRowResponse":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"contract_title":{"type":"string","title":"Contract Title"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"service_names":{"items":{"type":"string"},"type":"array","title":"Service Names","default":[]},"term":{"$ref":"#/components/schemas/ContractTermResponse"}},"type":"object","required":["contract_id","contract_title","term"],"title":"ContractRenewalRowResponse","description":"One contract awaiting a renewal decision.\n\nFlat contract/vendor labels beside the whole term, rather than a term with\nids the client then has to resolve: the surfaces that list these (the My\nServices action list, and any company-wide renewals view) render a name per\nrow and would otherwise fan out a request per contract to get one."},"ContractResponse":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/ContractStatus"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"current_term":{"anyOf":[{"$ref":"#/components/schemas/ContractTermResponse"},{"type":"null"}]},"latest_term":{"anyOf":[{"$ref":"#/components/schemas/ContractTermResponse"},{"type":"null"}]},"term_history":{"items":{"$ref":"#/components/schemas/ContractTermResponse"},"type":"array","title":"Term History","default":[]},"obligations":{"items":{"type":"string"},"type":"array","title":"Obligations","default":[]},"latest_extraction_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Latest Extraction Run Id"},"latest_summary_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Latest Summary Run Id"},"summary_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"base_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Base File Id"},"base_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Filename"},"base_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Base Upload Id"},"documents":{"items":{"$ref":"#/components/schemas/ContractDocumentResponse"},"type":"array","title":"Documents","default":[]},"services":{"items":{"$ref":"#/components/schemas/ContractServiceSummary"},"type":"array","title":"Services","default":[]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"}},"type":"object","required":["contract_id","company_id","title","status"],"title":"ContractResponse"},"ContractResult":{"properties":{"clause_version":{"type":"integer","title":"Clause Version"},"summary_version":{"type":"integer","title":"Summary Version"},"type":{"type":"string","title":"Type","default":"contract_analysis"}},"additionalProperties":true,"type":"object","required":["clause_version","summary_version"],"title":"ContractResult"},"ContractRunKeyDates":{"properties":{"key_dates":{"items":{"$ref":"#/components/schemas/KeyDateRow"},"type":"array","title":"Key Dates"},"parsed_dates":{"items":{"$ref":"#/components/schemas/ProspectiveKeyDateRow"},"type":"array","title":"Parsed Dates"}},"type":"object","required":["key_dates","parsed_dates"],"title":"ContractRunKeyDates"},"ContractServiceSummary":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["service_id","name"],"title":"ContractServiceSummary"},"ContractStatus":{"type":"string","enum":["draft","active","expired","terminated"],"title":"ContractStatus","description":"``DRAFT`` and ``TERMINATED`` are human judgments; the derivation in\n``recompute_contract_status`` overwrites neither."},"ContractSummarizeResponse":{"properties":{"enqueued":{"type":"boolean","title":"Enqueued"},"summary_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Summary Run Id"}},"type":"object","required":["enqueued"],"title":"ContractSummarizeResponse","description":"Result of (re-)triggering the contract summary agent."},"ContractTermDecisionSource":{"type":"string","enum":["user","backfill"],"title":"ContractTermDecisionSource","description":"Who recorded the decision.\n\nNo ``SYSTEM_*`` member, deliberately: **nothing but a person records a\ndecision**. A term that runs past its end date undecided stays ``OVERDUE``\nand gets surfaced rather than auto-renewed on the customer's behalf — an\ninvented decision is indistinguishable from one they made, and the renewal\nhistory is what customers audit."},"ContractTermEventActor":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["user_id","first_name","last_name"],"title":"ContractTermEventActor","description":"The user behind one decision event, shaped for the shared timeline\navatar (``TaskUser`` client-side). Absent for a backfilled or system event,\nand for one whose user row has since gone."},"ContractTermEventResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"term_id":{"type":"string","format":"uuid","title":"Term Id"},"term_number":{"type":"integer","title":"Term Number"},"action":{"$ref":"#/components/schemas/DecisionEventAction"},"decision":{"anyOf":[{"$ref":"#/components/schemas/ContractRenewalDecision"},{"type":"null"}]},"decision_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Label"},"decision_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Reason"},"decision_source":{"anyOf":[{"$ref":"#/components/schemas/ContractTermDecisionSource"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"actor":{"anyOf":[{"$ref":"#/components/schemas/ContractTermEventActor"},{"type":"null"}]},"actor_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Label"},"acted_at":{"type":"string","format":"date-time","title":"Acted At"}},"type":"object","required":["event_id","term_id","term_number","action","acted_at"],"title":"ContractTermEventResponse","description":"One line of a contract's decision log.\n\nA row of ``contract_term_decision_events``, which is a snapshot of the term\n*after* the change — so ``decision`` is NULL on an UNDONE, and an ACTIONED\nrow still carries the decision it carried out.\n\n``term_number`` rides along because the log spans a contract's whole term\nchain: without it, two renewals' events read as one undifferentiated\nstream."},"ContractTermNotificationResponse":{"properties":{"notification_id":{"type":"string","format":"uuid","title":"Notification Id"},"lead_days":{"type":"integer","title":"Lead Days"},"scheduled_for":{"type":"string","format":"date","title":"Scheduled For"},"deadline_kind":{"$ref":"#/components/schemas/ContractDeadlineKind"},"target_date":{"type":"string","format":"date","title":"Target Date"},"status":{"$ref":"#/components/schemas/ContractTermNotificationStatus"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["notification_id","lead_days","scheduled_for","deadline_kind","target_date","status"],"title":"ContractTermNotificationResponse","description":"One materialized reminder in one of a term's two countdown ladders."},"ContractTermNotificationStatus":{"type":"string","enum":["pending","sent"],"title":"ContractTermNotificationStatus","description":"Two values only: cancelling a reminder deletes the unsent row.\n\n``AnnualKeyDates`` has three overlapping \"off\" states because it kept\ncancelled rows around. The audit of *why* reminders stopped lives on the term\n(``decided_at`` / ``decided_by_user_id``), not here."},"ContractTermResponse":{"properties":{"term_id":{"type":"string","format":"uuid","title":"Term Id"},"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"term_number":{"type":"integer","title":"Term Number"},"previous_term_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Previous Term Id"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"termination_notice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Notice Date"},"notice_date_source":{"anyOf":[{"$ref":"#/components/schemas/NoticeDateSource"},{"type":"null"}]},"notice_period_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Period Value"},"notice_period_unit":{"anyOf":[{"$ref":"#/components/schemas/NoticePeriodUnit"},{"type":"null"}]},"renewal_term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Term Months"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"decision":{"anyOf":[{"$ref":"#/components/schemas/ContractRenewalDecision"},{"type":"null"}]},"decision_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Label"},"decision_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Reason"},"decision_source":{"anyOf":[{"$ref":"#/components/schemas/ContractTermDecisionSource"},{"type":"null"}]},"decided_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Decided By User Id"},"decided_by_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By Label"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"actioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actioned At"},"actioned_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actioned By User Id"},"actioned_by_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actioned By Label"},"state":{"$ref":"#/components/schemas/ContractTermState"},"status":{"$ref":"#/components/schemas/ContractTermStatus"},"decision_deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Decision Deadline"},"deadline_kind":{"anyOf":[{"$ref":"#/components/schemas/ContractDeadlineKind"},{"type":"null"}]},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining"},"in_effect":{"type":"boolean","title":"In Effect","default":false},"attention_due":{"type":"boolean","title":"Attention Due","default":false},"notice_reminders_enabled":{"type":"boolean","title":"Notice Reminders Enabled","default":true},"renewal_reminders_enabled":{"type":"boolean","title":"Renewal Reminders Enabled","default":true},"next_notice_reminder_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Notice Reminder Date"},"next_renewal_reminder_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Renewal Reminder Date"},"notifications":{"items":{"$ref":"#/components/schemas/ContractTermNotificationResponse"},"type":"array","title":"Notifications","default":[]},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"}},"type":"object","required":["term_id","contract_id","term_number","state","status"],"title":"ContractTermResponse","description":"One term period, with the state and countdown derived server-side.\n\n``state`` / ``status`` / ``decision_deadline`` / ``deadline_kind`` /\n``days_remaining`` are computed, never stored — the table, the email, and this\nresponse all read them from the same helpers so they cannot disagree."},"ContractTermSeedBackfillResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"open_ended_count":{"type":"integer","title":"Open Ended Count"},"end_date_in_past_count":{"type":"integer","title":"End Date In Past Count"},"notifications_created":{"type":"integer","title":"Notifications Created"},"skipped_invalid_dates":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skipped Invalid Dates","default":[]}},"type":"object","required":["created_count","open_ended_count","end_date_in_past_count","notifications_created"],"title":"ContractTermSeedBackfillResponse"},"ContractTermSeedCandidate":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"title":{"type":"string","title":"Title"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"end_date_in_past":{"type":"boolean","title":"End Date In Past","default":false}},"type":"object","required":["contract_id","company_id","title"],"title":"ContractTermSeedCandidate","description":"One contract the seed backfill would give a term 1.\n\nThe three date/flag fields are read off the dead ``Contract.legacy_*``\ncolumns — the only reader left — so an operator can eyeball what will be\ncopied before anything is written."},"ContractTermSeedPreviewResponse":{"properties":{"drift_count":{"type":"integer","title":"Drift Count"},"truncated":{"type":"boolean","title":"Truncated"},"open_ended_count":{"type":"integer","title":"Open Ended Count"},"end_date_in_past_count":{"type":"integer","title":"End Date In Past Count"},"drift":{"items":{"$ref":"#/components/schemas/ContractTermSeedCandidate"},"type":"array","title":"Drift"}},"type":"object","required":["drift_count","truncated","open_ended_count","end_date_in_past_count","drift"],"title":"ContractTermSeedPreviewResponse","description":"Dry run for the contract-term seed backfill. Writes nothing."},"ContractTermState":{"type":"string","enum":["open","overdue","decided","renewed","ended"],"title":"ContractTermState","description":"A term's state, **derived** — never stored.\n\nEvery value is a function of the dates and the decision, so a stored copy\nwould have to be rewritten on each transition and would drift. The predicates\nlive in ``backend.helpers.contract_terms.term_state``."},"ContractTermStatus":{"type":"string","enum":["overdue","past_notice","pending_decision","pending_action","active","terminated","replaced","renewed","renegotiated"],"title":"ContractTermStatus","description":"Where a term stands, in the one phrase a surface shows for it.\n\nA different question from ``ContractTermState``, which is the state machine's\nown vocabulary. This one tells the **two lapsed dates apart** — a notice\nwindow that closed under a term still running is a different problem from a\nterm that ran out entirely — and names outstanding work in the two halves\nsomebody acts on. ``term_status`` derives it; nothing stores it.\n\nDeclared **most urgent first**, and sorted on that order rather than on the\nlabels, so ascending puts the work at the top of a list."},"ControlAssessmentTraceResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"is_test":{"type":"boolean","title":"Is Test"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"steps":{"items":{"$ref":"#/components/schemas/StepView"},"type":"array","title":"Steps"}},"type":"object","required":["agent_run_id","status","is_test"],"title":"ControlAssessmentTraceResponse"},"ControlStrengthLabel":{"properties":{"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"hex_color":{"type":"string","title":"Hex Color","default":""}},"type":"object","required":["label","description"],"title":"ControlStrengthLabel","description":"A configurable control-strength label used for AI classification on risk-factor checks."},"ConvertRiskToRequirementRequest":{"properties":{"current_doc_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Doc Type Slug"}},"type":"object","title":"ConvertRiskToRequirementRequest"},"ConvertRiskToRequirementResponse":{"properties":{"verbatim_text":{"type":"string","title":"Verbatim Text"},"llm_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Guidelines"},"applies_to_doc_types":{"items":{"type":"string"},"type":"array","title":"Applies To Doc Types"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"}},"type":"object","required":["verbatim_text"],"title":"ConvertRiskToRequirementResponse"},"CoverageGuideline":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"counts":{"$ref":"#/components/schemas/CoverageOutcomeCounts"},"requirements":{"items":{"$ref":"#/components/schemas/CheckedRequirement"},"type":"array","title":"Requirements","default":[]}},"type":"object","required":["file_id","counts"],"title":"CoverageGuideline","description":"One standards document's contribution to a check."},"CoverageOutcomeCounts":{"properties":{"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"not_determined":{"type":"integer","title":"Not Determined","default":0}},"type":"object","title":"CoverageOutcomeCounts","description":"The three ways a checked requirement can come out, never folded into two.\n\n`not_determined` is on the wire beside the other two rather than added into either, because a\npanel that reports \"31 passed\" while ten of them were rules the model could not judge from what\nthe collateral shows is making a claim nobody measured — and the whole point of this surface is\nto be believable."},"CreateCompanyRequest":{"properties":{"company_name":{"type":"string","title":"Company Name"},"company_website":{"type":"string","title":"Company Website"},"login_provider_type":{"$ref":"#/components/schemas/LoginProviderType"},"users":{"items":{"$ref":"#/components/schemas/CompanyUser-Input"},"type":"array","title":"Users","default":[]},"company_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Domain"}},"type":"object","required":["company_name","company_website","login_provider_type"],"title":"CreateCompanyRequest"},"CreateContractTermRequest":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"termination_notice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Notice Date"},"notice_date_source":{"anyOf":[{"$ref":"#/components/schemas/NoticeDateSource"},{"type":"null"}]},"notice_period_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Period Value"},"notice_period_unit":{"anyOf":[{"$ref":"#/components/schemas/NoticePeriodUnit"},{"type":"null"}]},"renewal_term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Term Months"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"notice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notice Reminders Enabled"},"renewal_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Renewal Reminders Enabled"}},"type":"object","title":"CreateContractTermRequest","description":"The ordinal is assigned server-side (``MAX(term_number) + 1``); a client\ncannot pick it, which is what keeps the chain monotonic."},"CreateCustomFieldTriggerRequest":{"properties":{"source_custom_field_id":{"type":"string","format":"uuid","title":"Source Custom Field Id"},"trigger_option_id":{"type":"string","format":"uuid","title":"Trigger Option Id"},"target_custom_field_id":{"type":"string","format":"uuid","title":"Target Custom Field Id"},"value_source":{"$ref":"#/components/schemas/TriggerValueSource"},"value_literal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Literal"},"overwrite_policy":{"$ref":"#/components/schemas/TriggerOverwritePolicy","default":"set_if_empty"}},"type":"object","required":["source_custom_field_id","trigger_option_id","target_custom_field_id","value_source"],"title":"CreateCustomFieldTriggerRequest","description":"Create a SET_CUSTOM_FIELD trigger. Server validates all references so the\nUI can't produce a trigger that would silently never fire or write garbage."},"CreateDisclosureRequest":{"properties":{"trigger":{"type":"string","title":"Trigger"},"use_case":{"type":"string","title":"Use Case"},"copy_text":{"type":"string","title":"Copy Text"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"collateral_types":{"items":{"type":"string"},"type":"array","title":"Collateral Types"},"ai_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Trigger"},"ai_example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Example"}},"type":"object","required":["trigger","use_case","copy_text","products","collateral_types"],"title":"CreateDisclosureRequest"},"CreateDocumentsConsolidatedViewRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"template_upload_id":{"type":"string","format":"uuid","title":"Template Upload Id"},"input_upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Input Upload Ids"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["vendor_id","template_upload_id","input_upload_ids"],"title":"CreateDocumentsConsolidatedViewRequest"},"CreateFormResponsesRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/FormRequestRecipient"},"type":"array","title":"Recipients"},"question_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"string","const":"all"}],"title":"Question Ids","default":"all"},"due_date":{"type":"string","format":"date-time","title":"Due Date"}},"type":"object","required":["recipients","due_date"],"title":"CreateFormResponsesRequest"},"CreateIssueForRequirementResponse":{"properties":{"task":{"$ref":"#/components/schemas/EvidenceReviewTaskResponse"},"issue_id":{"type":"string","format":"uuid","title":"Issue Id"}},"type":"object","required":["task","issue_id"],"title":"CreateIssueForRequirementResponse"},"CreateIssueFromHitRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"hit_key":{"type":"string","title":"Hit Key"},"title":{"type":"string","title":"Title"},"severity":{"$ref":"#/components/schemas/RiskSeverity","default":"medium"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["vendor_id","hit_key","title"],"title":"CreateIssueFromHitRequest"},"CreateIssueFromHitResponse":{"properties":{"issue_id":{"type":"string","format":"uuid","title":"Issue Id"}},"type":"object","required":["issue_id"],"title":"CreateIssueFromHitResponse"},"CreateIssueRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"}},"type":"object","required":["vendor_id","requirement_id"],"title":"CreateIssueRequest","description":"Request body for creating an issue from a requirement."},"CreateIssueResponse":{"properties":{"issue_id":{"type":"string","format":"uuid","title":"Issue Id"}},"type":"object","required":["issue_id"],"title":"CreateIssueResponse","description":"Response for creating an issue."},"CreateKeyDateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"key_date_type":{"type":"string","title":"Key Date Type"},"month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Month"},"day":{"type":"integer","maximum":31.0,"minimum":1.0,"title":"Day"},"first_year":{"type":"integer","minimum":1900.0,"title":"First Year"},"interval_years":{"type":"integer","minimum":1.0,"title":"Interval Years","default":1},"lead_days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Lead Days"},"upload_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Id"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}},"type":"object","required":["key_date_type","month","day","first_year"],"title":"CreateKeyDateRequest"},"CreateMarketingTeamRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["company_id","name"],"title":"CreateMarketingTeamRequest"},"CreateModuleRequest":{"properties":{"module_name":{"type":"string","title":"Module Name"}},"type":"object","required":["module_name"],"title":"CreateModuleRequest"},"CreateRegulatoryRequirementRequest":{"properties":{"requirement_type":{"$ref":"#/components/schemas/RequirementType","default":"holistic"},"verbatim_text":{"type":"string","title":"Verbatim Text"},"llm_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Guidelines"},"applies_to_doc_types":{"items":{"type":"string"},"type":"array","title":"Applies To Doc Types"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"}},"type":"object","required":["verbatim_text"],"title":"CreateRegulatoryRequirementRequest","description":"Add a manually authored requirement to a DRAFT framework."},"CreateRequirementTaskRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"}},"type":"object","required":["vendor_id","requirement_id"],"title":"CreateRequirementTaskRequest"},"CreateResearchRunRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"}},"type":"object","required":["vendor_id"],"title":"CreateResearchRunRequest"},"CreateReviewIssueRequest":{"properties":{"title":{"type":"string","title":"Title"},"severity":{"$ref":"#/components/schemas/RiskSeverity","default":"low"},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["title"],"title":"CreateReviewIssueRequest","description":"Request body for creating a standalone issue for a review."},"CreateReviewReportRequest":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"rubric_upload_id":{"type":"string","format":"uuid","title":"Rubric Upload Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["review_id","rubric_upload_id"],"title":"CreateReviewReportRequest"},"CreateReviewReportResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"}},"type":"object","required":["agent_run_id"],"title":"CreateReviewReportResponse"},"CreateRiskAreaRequest":{"properties":{"name":{"type":"string","maxLength":256,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateRiskAreaRequest"},"CreateRiskAssessmentRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"research_agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Research Agent Run Id"},"force_research":{"type":"boolean","title":"Force Research","default":false}},"type":"object","required":["vendor_id"],"title":"CreateRiskAssessmentRequest"},"CreateRiskFactorRequest":{"properties":{"risk_area_id":{"type":"string","format":"uuid","title":"Risk Area Id"},"name":{"type":"string","maxLength":256,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assessment_guidance":{"type":"string","minLength":1,"title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"applicability_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicability Logic Id"}},"type":"object","required":["risk_area_id","name","assessment_guidance"],"title":"CreateRiskFactorRequest"},"CreateRoleRequest":{"properties":{"role_name":{"type":"string","title":"Role Name"},"permission_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Permission Ids","default":[]},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]}},"type":"object","required":["role_name"],"title":"CreateRoleRequest"},"CreateRuleRequest":{"properties":{"title":{"type":"string","title":"Title"},"guidance_text":{"type":"string","title":"Guidance Text"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"}},"type":"object","required":["title","guidance_text"],"title":"CreateRuleRequest"},"CreateTaskRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":65535},{"type":"null"}],"title":"Description"}},"type":"object","required":["title"],"title":"CreateTaskRequest"},"CreateTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"}},"type":"object","required":["task_id"],"title":"CreateTaskResponse"},"CreateTeamRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["company_id","name"],"title":"CreateTeamRequest"},"CreateTuningRunRequest":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"template_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Template Ids"}},"type":"object","required":["review_id","template_ids"],"title":"CreateTuningRunRequest"},"CreateTuningRunResponse":{"properties":{"tuning_run_id":{"type":"string","format":"uuid","title":"Tuning Run Id"},"matched_check_count":{"type":"integer","title":"Matched Check Count"},"unmatched_count":{"type":"integer","title":"Unmatched Count"},"per_template_match_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Per Template Match Counts"}},"type":"object","required":["tuning_run_id","matched_check_count","unmatched_count"],"title":"CreateTuningRunResponse"},"CreateVendorContactRequest":{"properties":{"email_address":{"type":"string","format":"email","title":"Email Address"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"role":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Role"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["email_address","first_name","last_name"],"title":"CreateVendorContactRequest"},"CreateVendorUserRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","format":"email","title":"Email Address"}},"type":"object","required":["company_id","first_name","last_name","email_address"],"title":"CreateVendorUserRequest"},"CriticalityField":{"properties":{"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"option_id":{"type":"string","title":"Option Id"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["label","hex_color","option_id","order_index"],"title":"CriticalityField"},"CustomField":{"properties":{"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"option_id":{"type":"string","title":"Option Id"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["label","hex_color","option_id","order_index"],"title":"CustomField"},"CustomFieldBooleanDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"BOOLEAN","title":"Custom Field Definition Type","default":"BOOLEAN"}},"type":"object","title":"CustomFieldBooleanDefinition"},"CustomFieldBooleanValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"BOOLEAN","title":"Type","default":"BOOLEAN"},"boolean_value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Boolean Value"}},"type":"object","title":"CustomFieldBooleanValue"},"CustomFieldDateDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"DATE","title":"Custom Field Definition Type","default":"DATE"}},"type":"object","title":"CustomFieldDateDefinition"},"CustomFieldDateValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"DATE","title":"Type","default":"DATE"},"date_value":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Value"}},"type":"object","title":"CustomFieldDateValue"},"CustomFieldDefinitionType":{"type":"string","enum":["DROPDOWN","FREE_TEXT","MULTISELECT","NUMBER","DATE","BOOLEAN","USER","MULTI_USER"],"title":"CustomFieldDefinitionType"},"CustomFieldDropdownDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"DROPDOWN","title":"Custom Field Definition Type","default":"DROPDOWN"},"options":{"items":{"$ref":"#/components/schemas/CustomFieldOptionDefinition"},"type":"array","title":"Options","default":[]}},"type":"object","title":"CustomFieldDropdownDefinition"},"CustomFieldDropdownValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"DROPDOWN","title":"Type","default":"DROPDOWN"},"option_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Option Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"}},"type":"object","title":"CustomFieldDropdownValue"},"CustomFieldEntityType":{"type":"string","enum":["VENDOR","CANONICAL","SERVICE","ISSUE","DISCLOSURE","CONTRACT","CONTACT"],"title":"CustomFieldEntityType"},"CustomFieldFilterField":{"properties":{"custom_field_id":{"type":"string","format":"uuid","title":"Custom Field Id"},"name":{"type":"string","title":"Name"},"custom_field_definition_type":{"$ref":"#/components/schemas/CustomFieldDefinitionType"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"values":{"items":{"$ref":"#/components/schemas/CustomFieldFilterValue"},"type":"array","title":"Values","default":[]}},"type":"object","required":["custom_field_id","name","custom_field_definition_type"],"title":"CustomFieldFilterField","description":"A custom field that can be filtered on, plus its selectable values."},"CustomFieldFilterOptionsResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/CustomFieldFilterField"},"type":"array","title":"Fields","default":[]}},"type":"object","title":"CustomFieldFilterOptionsResponse"},"CustomFieldFilterValue":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"}},"type":"object","required":["value","label"],"title":"CustomFieldFilterValue","description":"A single selectable value for a custom field filter.\n\n`value` is an option UUID (for dropdown/multiselect/canonical fields) or\n\"true\"/\"false\" for boolean fields."},"CustomFieldFreeTextDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"FREE_TEXT","title":"Custom Field Definition Type","default":"FREE_TEXT"}},"type":"object","title":"CustomFieldFreeTextDefinition"},"CustomFieldFreeTextValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"FREE_TEXT","title":"Type","default":"FREE_TEXT"},"text_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Value"}},"type":"object","title":"CustomFieldFreeTextValue"},"CustomFieldMultiUserDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"MULTI_USER","title":"Custom Field Definition Type","default":"MULTI_USER"}},"type":"object","title":"CustomFieldMultiUserDefinition"},"CustomFieldMultiUserValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"MULTI_USER","title":"Type","default":"MULTI_USER"},"selected_users":{"items":{"$ref":"#/components/schemas/CustomFieldUserRef"},"type":"array","title":"Selected Users","default":[]}},"type":"object","title":"CustomFieldMultiUserValue"},"CustomFieldMultiselectDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"MULTISELECT","title":"Custom Field Definition Type","default":"MULTISELECT"},"options":{"items":{"$ref":"#/components/schemas/CustomFieldOptionDefinition"},"type":"array","title":"Options","default":[]}},"type":"object","title":"CustomFieldMultiselectDefinition"},"CustomFieldMultiselectOptionValue":{"properties":{"option_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Option Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"}},"type":"object","title":"CustomFieldMultiselectOptionValue"},"CustomFieldMultiselectValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"MULTISELECT","title":"Type","default":"MULTISELECT"},"selected_options":{"items":{"$ref":"#/components/schemas/CustomFieldMultiselectOptionValue"},"type":"array","title":"Selected Options","default":[]}},"type":"object","title":"CustomFieldMultiselectValue"},"CustomFieldNumberDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"NUMBER","title":"Custom Field Definition Type","default":"NUMBER"}},"type":"object","title":"CustomFieldNumberDefinition"},"CustomFieldNumberValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"NUMBER","title":"Type","default":"NUMBER"},"number_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Value"}},"type":"object","title":"CustomFieldNumberValue"},"CustomFieldOptionDefinition":{"properties":{"option_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Option Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"}},"type":"object","title":"CustomFieldOptionDefinition"},"CustomFieldOptionSpec":{"properties":{"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"order_index":{"type":"integer","title":"Order Index","default":0}},"type":"object","required":["label"],"title":"CustomFieldOptionSpec"},"CustomFieldReorderRequest":{"properties":{"field_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Field Ids"}},"type":"object","required":["field_ids"],"title":"CustomFieldReorderRequest"},"CustomFieldResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"CustomField","title":"Kind","default":"CustomField"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/CustomFieldSpec"}},"type":"object","required":["metadata","spec"],"title":"CustomFieldResourceResponse","description":"GET/list response for a CustomField resource (includes annotations)."},"CustomFieldSpec":{"properties":{"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"string","const":"SHARED"}],"title":"Entity Type"},"definition_type":{"$ref":"#/components/schemas/CustomFieldDefinitionType"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"options":{"items":{"$ref":"#/components/schemas/CustomFieldOptionSpec"},"type":"array","title":"Options"}},"type":"object","required":["entity_type","definition_type"],"title":"CustomFieldSpec"},"CustomFieldTriggerActionType":{"type":"string","enum":["set_custom_field"],"title":"CustomFieldTriggerActionType","description":"What a trigger does — the discriminator for its typed child table.\n\nNew actions (notifications, tasks, workflows) are added as new values here\nplus their own `custom_field_trigger_<action>` child table; nothing reshapes."},"CustomFieldTriggerResponse":{"properties":{"trigger_id":{"type":"string","format":"uuid","title":"Trigger Id"},"action_type":{"$ref":"#/components/schemas/CustomFieldTriggerActionType"},"enabled":{"type":"boolean","title":"Enabled"},"source_custom_field_id":{"type":"string","format":"uuid","title":"Source Custom Field Id"},"source_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Field Name"},"trigger_option_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trigger Option Id"},"trigger_option_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Option Label"},"target_custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Custom Field Id"},"target_field_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Field Name"},"target_definition_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDefinitionType"},{"type":"null"}]},"value_source":{"anyOf":[{"$ref":"#/components/schemas/TriggerValueSource"},{"type":"null"}]},"value_literal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Literal"},"overwrite_policy":{"anyOf":[{"$ref":"#/components/schemas/TriggerOverwritePolicy"},{"type":"null"}]}},"type":"object","required":["trigger_id","action_type","enabled","source_custom_field_id"],"title":"CustomFieldTriggerResponse"},"CustomFieldType":{"type":"string","enum":["INHERENT_RISK_LEVEL","RESIDUAL_RISK_LEVEL","CRITICALITY","LIFECYCLE_STATUS"],"title":"CustomFieldType"},"CustomFieldUsageRecord":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_type":{"$ref":"#/components/schemas/CustomFieldEntityType"},"label":{"type":"string","title":"Label"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"vendor_entity_type":{"anyOf":[{"$ref":"#/components/schemas/EntityType"},{"type":"null"}]}},"type":"object","required":["entity_id","entity_type","label"],"title":"CustomFieldUsageRecord","description":"One record still holding a value for a custom field.\n\n`vendor_id` is the vendor company the record hangs off, when it has one —\nservices, issues and contracts all live under a vendor, so it is what the\nsettings UI needs to link straight to the record. Vendors themselves report\ntheir own id; disclosures have no vendor and report none.\n\n`vendor_entity_type` is that vendor's entity type (vendor vs partner /\nfintech prospect), which decides whether the record lives under the Vendor\nManagement or Fintech Partners view — the two split the same table but sit on\ndifferent routes (`/vendor/...` vs `/partner/...`), so the UI needs it to\nbuild a link into the right one."},"CustomFieldUsageResponse":{"properties":{"custom_field_id":{"type":"string","format":"uuid","title":"Custom Field Id"},"total":{"type":"integer","title":"Total"},"records":{"items":{"$ref":"#/components/schemas/CustomFieldUsageRecord"},"type":"array","title":"Records","default":[]}},"type":"object","required":["custom_field_id","total"],"title":"CustomFieldUsageResponse","description":"The records blocking a custom field's deletion.\n\n`total` counts every record with a value; `records` is capped at the\nrequested limit, so `len(records) < total` means the list was truncated."},"CustomFieldUserDefinition":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldEntityType"},{"type":"null"}]},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"custom_field_definition_type":{"type":"string","const":"USER","title":"Custom Field Definition Type","default":"USER"}},"type":"object","title":"CustomFieldUserDefinition"},"CustomFieldUserRef":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User First Name"},"user_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Last Name"},"email_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Address"}},"type":"object","title":"CustomFieldUserRef"},"CustomFieldUserValue":{"properties":{"custom_field_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Field Id"},"custom_field_type":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"type":"string","const":"USER","title":"Type","default":"USER"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User First Name"},"user_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Last Name"},"email_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Address"}},"type":"object","title":"CustomFieldUserValue"},"CustomFieldValueSpec":{"properties":{"name":{"type":"string","title":"Name"},"value":{"title":"Value"}},"type":"object","required":["name"],"title":"CustomFieldValueSpec","description":"A custom-field value expressed by field name and a scalar/list value."},"CustomFieldWithValue-Input":{"properties":{"definition":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Definition"},"value":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"},{"type":"null"}],"title":"Value"}},"type":"object","required":["definition"],"title":"CustomFieldWithValue"},"CustomFieldWithValue-Output":{"properties":{"definition":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownDefinition"},{"$ref":"#/components/schemas/CustomFieldFreeTextDefinition"},{"$ref":"#/components/schemas/CustomFieldNumberDefinition"},{"$ref":"#/components/schemas/CustomFieldDateDefinition"},{"$ref":"#/components/schemas/CustomFieldBooleanDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiselectDefinition"},{"$ref":"#/components/schemas/CustomFieldUserDefinition"},{"$ref":"#/components/schemas/CustomFieldMultiUserDefinition"}],"title":"Definition"},"value":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"},{"type":"null"}],"title":"Value"}},"type":"object","required":["definition"],"title":"CustomFieldWithValue"},"CustomFieldsChangeset":{"properties":{"before":{"items":{"$ref":"#/components/schemas/CustomFieldWithValue-Output"},"type":"array","title":"Before"},"after":{"items":{"$ref":"#/components/schemas/CustomFieldWithValue-Output"},"type":"array","title":"After"}},"type":"object","required":["before","after"],"title":"CustomFieldsChangeset"},"CustomFieldsChangesetUpdateRequest":{"properties":{"field":{"$ref":"#/components/schemas/CustomFieldWithValue-Input"}},"type":"object","required":["field"],"title":"CustomFieldsChangesetUpdateRequest"},"DateFileEventsResponse":{"properties":{"date":{"type":"string","title":"Date"},"events":{"items":{"$ref":"#/components/schemas/FileEventResponse"},"type":"array","title":"Events"}},"type":"object","required":["date","events"],"title":"DateFileEventsResponse","description":"Represents file events grouped by date."},"DecisionEventAction":{"type":"string","enum":["decision_recorded","decision_cleared","actioning_recorded","actioning_undone"],"title":"DecisionEventAction","description":"What happened on a term, for the append-only event log.\n\nThe term carries only the *current* decision, so without this a correction is\nindistinguishable from never having decided.\n\n**The prefix names what the event happened to**, because the term records two\nfacts that can each be taken back: the *decision* and the *actioning* of it.\n``DECISION_CLEARED`` leaves the term with no decision; ``ACTIONING_UNDONE``\nleaves the decision where it was and withdraws only the claim it was done."},"DecompositionSkipReason":{"type":"string","enum":["already_running","no_usable_version","not_a_marketing_standard","batch_limit","could_not_start","newer_version_processing"],"title":"DecompositionSkipReason","description":"Why a guideline named in a decomposition request did not get one."},"DecompositionStage":{"type":"string","enum":["queued","downloading","extracting","grounding","storing","done"],"title":"DecompositionStage","description":"Where a running decomposition has got to.\n\nOnly the stages a watching human can perceive. Resolving the model's channel names to\n`MarketingCollateralType` and writing the rows are both sub-second, so they are not stages —\na step that never renders is a step that misleads. `EXTRACTING` is the one that takes the minute."},"DecompositionStatus":{"type":"string","enum":["queued","running","succeeded","failed"],"title":"DecompositionStatus","description":"Lifecycle of one decomposition run."},"DecompositionSummary":{"properties":{"decomposition_id":{"type":"string","format":"uuid","title":"Decomposition Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"status":{"$ref":"#/components/schemas/DecompositionStatus"},"stage":{"$ref":"#/components/schemas/DecompositionStage"},"queue_wait_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Wait Seconds"},"requirements_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirements Total"},"requirements_written":{"type":"integer","title":"Requirements Written"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"requested_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By Email"},"superseded":{"type":"boolean","title":"Superseded"}},"type":"object","required":["decomposition_id","upload_id","status","stage","queue_wait_seconds","requirements_total","requirements_written","page_count","error","started_at","finished_at","requested_by_email","superseded"],"title":"DecompositionSummary","description":"One extraction run, and how it went.\n\n`status` is the *effective* status: a run whose worker never reported back reads as failed rather\nthan as permanently running, so the surface never offers a spinner that will not resolve."},"DeletePermissionResponse":{"properties":{"permission_id":{"type":"string","title":"Permission Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["permission_id","message"],"title":"DeletePermissionResponse"},"DiligenceStageDetail":{"properties":{"kind":{"type":"string","const":"evidence_collection","title":"Kind","default":"evidence_collection"},"state":{"type":"string","enum":["awaiting_review","analyzing","submitted","overdue","due","reviewed","not_sent"],"title":"State"},"requirements_to_review":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirements To Review"},"requirements_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirements Total"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["state"],"title":"DiligenceStageDetail","description":"Where due diligence collection stands.\n\nThe states are the stage's three holders in turn: the vendor while the packet\nis out (``due``/``overdue``, or ``not_sent`` before it goes), the analyzer\nonce it comes back (``analyzing``/``submitted``), then a reviewer\n(``awaiting_review``, then ``reviewed``). Only requirements the analyzer has\nalready answered count as review work, so a packet still out never reports a\nbacklog of checks nobody could have looked at yet."},"DisclosureApproachCreate":{"properties":{"name":{"type":"string","title":"Name"},"guidance_text":{"type":"string","title":"Guidance Text"}},"type":"object","required":["name","guidance_text"],"title":"DisclosureApproachCreate"},"DisclosureApproachRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"guidance_text":{"type":"string","title":"Guidance Text"}},"type":"object","required":["id","name","guidance_text"],"title":"DisclosureApproachRead"},"DisclosureApproachUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"guidance_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance Text"}},"type":"object","title":"DisclosureApproachUpdate"},"DisclosureDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trigger":{"type":"string","title":"Trigger"},"use_case":{"type":"string","title":"Use Case"},"copy_text":{"type":"string","title":"Copy Text"},"ai_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Trigger"},"ai_example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Example"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"collateral_types":{"items":{"type":"string"},"type":"array","title":"Collateral Types"},"status":{"$ref":"#/components/schemas/DisclosureStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"edited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited By Name"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"history":{"items":{"$ref":"#/components/schemas/DisclosureVersionResponse"},"type":"array","title":"History","default":[]}},"type":"object","required":["id","trigger","use_case","copy_text","products","collateral_types","status","created"],"title":"DisclosureDetailResponse"},"DisclosureEventType":{"type":"string","enum":["created","edited","archived","reactivated","deleted"],"title":"DisclosureEventType"},"DisclosureFieldChange":{"properties":{"field":{"type":"string","title":"Field"},"old":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Old"},"new":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"New"}},"type":"object","required":["field"],"title":"DisclosureFieldChange","description":"A single field's before/after for one version, powering the History diff view."},"DisclosureGenerationDebug":{"properties":{"raw_sheet_names":{"items":{"type":"string"},"type":"array","title":"Raw Sheet Names","default":[]},"config_sheet_name_expected":{"type":"string","title":"Config Sheet Name Expected","default":""},"config_sheet_detected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Sheet Detected"},"approach_mapping":{"items":{"$ref":"#/components/schemas/ApproachMappingEntry"},"type":"array","title":"Approach Mapping","default":[]},"sheet_application":{"items":{"$ref":"#/components/schemas/SheetApplicationEntry"},"type":"array","title":"Sheet Application","default":[]},"known_approaches":{"items":{"type":"string"},"type":"array","title":"Known Approaches","default":[]}},"type":"object","title":"DisclosureGenerationDebug","description":"Diagnostics describing how the `_Approaches` config sheet was interpreted.\n\nSurfaced on the results screen to make misconfigured workbooks easy to debug\n(e.g. config sheet not detected, sheet-name mismatch, unknown approach name)."},"DisclosureNewUploadItem":{"properties":{"filename":{"type":"string","title":"Filename"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["filename","s3_key"],"title":"DisclosureNewUploadItem"},"DisclosureNewUploadResult":{"properties":{"filename":{"type":"string","title":"Filename"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["filename"],"title":"DisclosureNewUploadResult"},"DisclosureResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"trigger":{"type":"string","title":"Trigger"},"use_case":{"type":"string","title":"Use Case"},"copy_text":{"type":"string","title":"Copy Text"},"ai_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Trigger"},"ai_example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Example"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"collateral_types":{"items":{"type":"string"},"type":"array","title":"Collateral Types"},"status":{"$ref":"#/components/schemas/DisclosureStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"edited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited By Name"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["id","trigger","use_case","copy_text","products","collateral_types","status","created"],"title":"DisclosureResponse"},"DisclosureStatus":{"type":"string","enum":["active","archived"],"title":"DisclosureStatus"},"DisclosureVersionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"version":{"type":"integer","title":"Version"},"event_type":{"$ref":"#/components/schemas/DisclosureEventType"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created":{"type":"string","format":"date-time","title":"Created"},"changes":{"items":{"$ref":"#/components/schemas/DisclosureFieldChange"},"type":"array","title":"Changes","default":[]}},"type":"object","required":["id","version","event_type","created"],"title":"DisclosureVersionResponse"},"DisclosureVersionUploadItem":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["file_id","s3_key"],"title":"DisclosureVersionUploadItem"},"DisclosureVersionUploadResult":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["file_id"],"title":"DisclosureVersionUploadResult"},"DismissContractTermFieldsRequest":{"properties":{"effective_date":{"type":"boolean","title":"Effective Date","default":false},"expiration_date":{"type":"boolean","title":"Expiration Date","default":false},"auto_renews":{"type":"boolean","title":"Auto Renews","default":false},"notice_period":{"type":"boolean","title":"Notice Period","default":false},"termination_notice_date":{"type":"boolean","title":"Termination Notice Date","default":false},"obligations":{"type":"boolean","title":"Obligations","default":false}},"type":"object","title":"DismissContractTermFieldsRequest","description":"Which of the summary run's proposed term fields to discard."},"DismissReason":{"type":"string","enum":["valid_ok","already_met","incorrect","out_of_scope","pre_approved","other"],"title":"DismissReason","description":"Why a reviewer dismissed a marketing risk (status=dismissed)."},"DismissReasonBreakdown":{"properties":{"over_flagged":{"type":"integer","title":"Over Flagged"},"accepted":{"type":"integer","title":"Accepted"},"other":{"type":"integer","title":"Other"},"by_reason":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Reason"}},"type":"object","required":["over_flagged","accepted","other","by_reason"],"title":"DismissReasonBreakdown","description":"How dismissed marketing risks split by reviewer-stated reason.\n\nA derived classification over the existing ``dismiss_reason`` column (no\nschema change; see ``backend.defs.runs.DISMISS_REASON_BUCKET``). Measured\nover Kobalt-generated, non-outdated risks a reviewer dismissed\n(``status`` in reject/dismissed) — the same population as\n``FeedbackSignalCoverage.dismissed``.\n\n- ``over_flagged`` = the analysis over-flagged (reasons: incorrect /\n  out_of_scope / already_met) — false positives to tighten rules on.\n- ``accepted`` = a real finding the reviewer accepted as fine (reasons:\n  valid_ok / pre_approved) — adjust severity/wording, not the trigger.\n- ``other`` = everything else: the ``other`` reason, a ``dismissed`` with\n  no reason, and legacy ``reject`` (which never carried a reason).\n- ``by_reason`` = per-reason counts keyed by the wire value (e.g.\n  ``\"incorrect\"``), plus a ``\"reject\"`` key for dismissals with no\n  structured reason (legacy ``reject`` / a ``dismissed`` left unspecified).\n\nSo ``over_flagged + accepted + other == sum(by_reason.values()) ==\nFeedbackSignalCoverage.dismissed``."},"DismissalLabelCategory":{"type":"string","enum":["ocr_or_av_processing","missing_file_context","bad_guideline","user_preference","compliance_officer_wrong","other"],"title":"DismissalLabelCategory","description":"Root cause a labeler assigned to a dismissed marketing risk.\n\nTwo axes in one list, which is the point. The first three say Kobalt got\nsomething wrong. ``USER_PREFERENCE`` and ``COMPLIANCE_OFFICER_WRONG`` say it\ndid not: the risk was real and correctly raised, and the dismissal is\nexplained by the reviewer either declining it deliberately or getting it\nwrong. Without those two, both land in ``OTHER`` and an eval set reads every\none of them as an unexplained false positive.\n\nStored as a plain VARCHAR (see the model), so adding a member here is a code\nchange and needs no migration."},"DismissedRiskLabelRequest":{"properties":{"category":{"$ref":"#/components/schemas/DismissalLabelCategory"},"explanation":{"type":"string","maxLength":2048,"minLength":1,"title":"Explanation"}},"type":"object","required":["category","explanation"],"title":"DismissedRiskLabelRequest","description":"A labeler's root-cause verdict on one dismissed marketing risk.\n\n``explanation`` is stripped before the length check, so a field holding only\nspaces is refused rather than stored — a blank explanation is the one thing\nthat makes a labeled row useless."},"DismissedRiskLabelRow":{"properties":{"label_id":{"type":"string","format":"uuid","title":"Label Id"},"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"category":{"$ref":"#/components/schemas/DismissalLabelCategory"},"explanation":{"type":"string","title":"Explanation"},"labeled_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labeled By"},"created":{"type":"string","format":"date-time","title":"Created"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"company_name":{"type":"string","title":"Company Name"},"filename":{"type":"string","title":"Filename"},"short_text":{"type":"string","title":"Short Text"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]}},"type":"object","required":["label_id","risk_id","category","explanation","labeled_by","created","file_id","company_name","filename","short_text","status","dismiss_reason"],"title":"DismissedRiskLabelRow","description":"One stored label joined to the risk it annotates — the eval-set row.\n\n``labeled_by`` is the admin's email, or None when the account has since been\ndeleted (the FK is SET NULL, so the label outlives them)."},"DismissedRiskLabelStats":{"properties":{"in_scope":{"type":"integer","title":"In Scope"},"labeled":{"type":"integer","title":"Labeled"},"remaining":{"type":"integer","title":"Remaining"},"labeled_by_me":{"type":"integer","title":"Labeled By Me"},"by_category":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/DismissalLabelCategory"},"type":"object","title":"By Category"}},"type":"object","required":["in_scope","labeled","remaining","labeled_by_me","by_category"],"title":"DismissedRiskLabelStats","description":"Counters behind the labeling progress display.\n\n``labeled`` counts labels whose risk is still in scope, so\n``labeled + remaining == in_scope`` holds and the progress bar cannot exceed\nits total. ``labeled_by_me`` is every label the caller has ever written, in\nscope or not — it is a personal tally, not a share of the denominator."},"DismissedRiskLabelsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"rows":{"items":{"$ref":"#/components/schemas/DismissedRiskLabelRow"},"type":"array","title":"Rows"}},"type":"object","required":["total","limit","offset","rows"],"title":"DismissedRiskLabelsResponse","description":"Paginated stored labels, newest first."},"DismissedRiskToLabel":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"filename":{"type":"string","title":"Filename"},"is_video":{"type":"boolean","title":"Is Video"},"short_text":{"type":"string","title":"Short Text"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"explanation":{"type":"string","title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"citations":{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array","title":"Citations"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"notes_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes Text"},"run_time":{"type":"string","format":"date-time","title":"Run Time"},"actioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actioned At"},"is_disclosure_related":{"type":"boolean","title":"Is Disclosure Related","default":false},"disclosure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Id"}},"type":"object","required":["risk_id","run_id","upload_id","file_id","company_id","company_name","filename","is_video","short_text","severity","explanation","remediation","document_clause","source_clause","citations","status","dismiss_reason","dismiss_note","ignore_comment","notes_text","run_time","actioned_at"],"title":"DismissedRiskToLabel","description":"One unlabeled dismissed marketing risk, with everything a labeler reads.\n\nCarries the *stored* ``status`` rather than a folded \"dismissed\" so a\npre-consolidation ``allow`` is not mistaken for a modern dismissal, and both\nreviewer free-text fields (``dismiss_note``, ``notes_text``) plus the\nmarketer's ``ignore_comment``, because reading those is the labeling step\nthat decides the verdict.\n\n``upload_id`` is the specific file version the risk was found on — the id\n``GET /files/preview-url`` and ``GET /files/presigned-url`` take. ``file_id``\ndeeplinks to the analysis-history view. ``is_video`` says the source was a\nvideo: the document the client renders is then the transcript or scene deck\nthe analysis actually read, not the video, and the labeler has to know that\nbefore reading a gap in it as a model failure."},"DispositionResponse":{"properties":{"hit_key":{"type":"string","title":"Hit Key"},"status":{"type":"string","enum":["issue_created","dismissed"],"title":"Status"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"decided_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Decided By"},"decided_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By Name"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"dismissal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Reason"},"dismissal_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Note"}},"type":"object","required":["hit_key","status","issue_id","decided_by","decided_by_name","decided_at","dismissal_reason","dismissal_note"],"title":"DispositionResponse"},"DocumentCategory":{"type":"string","enum":["tprm","marketing"],"title":"DocumentCategory"},"DocumentDiff":{"properties":{"html_diff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Diff"}},"type":"object","title":"DocumentDiff"},"DocumentRenewalEligibilityResponse":{"properties":{"matched_rule":{"anyOf":[{"$ref":"#/components/schemas/DocumentRenewalRuleResponse"},{"type":"null"}]}},"type":"object","title":"DocumentRenewalEligibilityResponse","description":"Which renewal rule, if any, currently governs one document.\n\nMirrors what ``RenewalRuleResolver.plan_for`` would decide for this\ndocument today: at most one rule ever applies (first match wins), so\nthere's nothing to show beyond that single winner, or ``None`` if the\ndocument's type is covered by no rule or every covering rule's condition\nfails for this vendor."},"DocumentRenewalRuleInput":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"},"document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEnum"},"type":"array","title":"Document Types"},"condition_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Logic Id"},"request_offset_days":{"type":"integer","maximum":365.0,"minimum":-365.0,"title":"Request Offset Days","default":0},"request_due_in_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Request Due In Days","default":30},"subscribers":{"items":{"$ref":"#/components/schemas/AssigneeSelectionInput"},"type":"array","title":"Subscribers"}},"type":"object","required":["document_types"],"title":"DocumentRenewalRuleInput","description":"One rule for chasing expiring vendor documents."},"DocumentRenewalRuleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeReference"},"type":"array","title":"Document Types"},"condition_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Condition Logic Id"},"condition_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Name"},"request_offset_days":{"type":"integer","title":"Request Offset Days"},"request_due_in_days":{"type":"integer","title":"Request Due In Days"},"subscribers":{"items":{"$ref":"#/components/schemas/AssigneeSelectionResponse"},"type":"array","title":"Subscribers"}},"type":"object","required":["id","request_offset_days","request_due_in_days"],"title":"DocumentRenewalRuleResponse","description":"One saved rule for chasing expiring vendor documents."},"DocumentRenewalRulesResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/DocumentRenewalRuleResponse"},"type":"array","title":"Rules"},"available_assignee_modes":{"items":{"$ref":"#/components/schemas/AssigneeMode"},"type":"array","title":"Available Assignee Modes"},"default_assignee_mode":{"$ref":"#/components/schemas/AssigneeMode"}},"type":"object","required":["default_assignee_mode"],"title":"DocumentRenewalRulesResponse","description":"A company's document renewal rules, in precedence order.\n\nThe first rule covering an expiring document's type whose condition holds for\nits vendor decides the schedule. An empty list means vendor outreach is off\nentirely, and nobody internally is told about an expiry either — there is no\ncompany-wide switch behind either half."},"DocumentRenewalRulesUpsert":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/DocumentRenewalRuleInput"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"DocumentRenewalRulesUpsert","description":"Request body for replacing a company's document renewal rules.\n\nThe list is the complete configuration and its order is the rules'\nprecedence — the first rule that covers a document's type and whose\ncondition holds for its vendor decides the schedule. A rule absent from the\nlist is deleted, so send the full set the way the settings page does."},"DocumentRequestActionResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"DocumentRequestActionResponse"},"DocumentRequestCreatedResponse":{"properties":{"message":{"type":"string","title":"Message"},"request_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Request Ids"},"recipient_count":{"type":"integer","title":"Recipient Count"}},"type":"object","required":["message","request_ids","recipient_count"],"title":"DocumentRequestCreatedResponse","description":"One request per document type, addressed to ``recipient_count`` people."},"DocumentRequestEventAuthor":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["user_id","first_name","last_name"],"title":"DocumentRequestEventAuthor"},"DocumentRequestEventResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"action_type":{"$ref":"#/components/schemas/DocumentRequestTimelineEntryType"},"author":{"anyOf":[{"$ref":"#/components/schemas/DocumentRequestEventAuthor"},{"type":"null"}]},"actor_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Label"},"author_company_id":{"type":"string","format":"uuid","title":"Author Company Id"},"visibility":{"$ref":"#/components/schemas/EventVisibility"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["event_id","action_type","author_company_id","visibility","created"],"title":"DocumentRequestEventResponse","description":"One line of a request's activity timeline.\n\nCarries both the rows of ``document_request_events`` and the two lines derived from\nthe request itself (the ask, and the reminders chasing it) — hence the wider\n``DocumentRequestTimelineEntryType``. A derived line has no row behind it, so its\n``event_id`` is a UUID5 of the request id: stable across refetches for the client's\nlist key, and unable to collide with a real one."},"DocumentRequestForVendorResponse":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__document_requests__DocumentRequestResponse"},"type":"array","title":"Requests"},"external_references":{"items":{"$ref":"#/components/schemas/ExternalReferenceDocumentResponse"},"type":"array","title":"External References","default":[]}},"type":"object","required":["requests"],"title":"DocumentRequestForVendorResponse"},"DocumentRequestOverviewRow":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"document_type":{"type":"string","title":"Document Type"},"document_type_label":{"type":"string","title":"Document Type Label"},"status":{"$ref":"#/components/schemas/DocumentRequestStatus"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"created":{"type":"string","format":"date-time","title":"Created"},"last_reminder_sent":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reminder Sent"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"recipients":{"items":{"$ref":"#/components/schemas/DocumentRequestRecipientSummary"},"type":"array","title":"Recipients","default":[]},"is_renewal":{"type":"boolean","title":"Is Renewal","default":false},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By Name"},"reviewed_automatically":{"type":"boolean","title":"Reviewed Automatically","default":false},"changes_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changes Requested At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"}},"type":"object","required":["request_id","vendor_id","vendor_name","document_type","document_type_label","status","due_date","created"],"title":"DocumentRequestOverviewRow","description":"One request on the company-wide list, carrying its own vendor context.\n\nThe per-vendor endpoint can leave the vendor and the document-type label implicit;\na cross-vendor list can't, so both ride on every row."},"DocumentRequestRecipient":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["email"],"title":"DocumentRequestRecipient","description":"One person on an incoming ask — either an existing user or a new address."},"DocumentRequestRecipientSummary":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","name","email"],"title":"DocumentRequestRecipientSummary","description":"One person a request was asked of, as every read surface renders them."},"DocumentRequestRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"document_types":{"items":{"type":"string"},"type":"array","title":"Document Types"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"recipients":{"items":{"$ref":"#/components/schemas/DocumentRequestRecipient"},"type":"array","minItems":1,"title":"Recipients"},"external_files":{"items":{"type":"string","format":"uuid"},"type":"array","title":"External Files","default":[]}},"type":"object","required":["vendor_id","document_types","due_date","recipients"],"title":"DocumentRequestRequest"},"DocumentRequestReviewResponse":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"status":{"$ref":"#/components/schemas/DocumentRequestStatus"},"document_type_label":{"type":"string","title":"Document Type Label"},"vendor_name":{"type":"string","title":"Vendor Name"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"is_renewal":{"type":"boolean","title":"Is Renewal"},"recipients":{"items":{"$ref":"#/components/schemas/DocumentRequestRecipientSummary"},"type":"array","title":"Recipients"},"submitted_files":{"items":{"$ref":"#/components/schemas/DocumentRequestSubmittedFile"},"type":"array","title":"Submitted Files"},"events":{"items":{"$ref":"#/components/schemas/DocumentRequestEventResponse"},"type":"array","title":"Events"}},"type":"object","required":["request_id","status","document_type_label","vendor_name","due_date","is_renewal","recipients","submitted_files","events"],"title":"DocumentRequestReviewResponse","description":"Everything the internal review drawer needs in one round trip."},"DocumentRequestStatus":{"type":"string","enum":["waiting_on_upload","submitted","changes_requested","fulfilled","supplementary","cancelled"],"title":"DocumentRequestStatus"},"DocumentRequestSubmittedFile":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"type":"string","title":"Filename"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["file_id","upload_id","filename","created"],"title":"DocumentRequestSubmittedFile"},"DocumentRequestTimelineEntryType":{"type":"string","enum":["requested","submitted","changes_requested","fulfilled","cancelled","reminder_sent"],"title":"DocumentRequestTimelineEntryType","description":"What one line of a request's activity timeline can be.\n\nA superset of ``DocumentRequestEventType``, sharing all of its values verbatim. The\nstored log only records transitions somebody performs; the ask itself and the\nreminders chasing it are columns on ``document_requests``, and the timeline reports\nthem alongside the logged events.\n\nA second enum rather than two more members on the first, because the stored\n``action_type`` is a Postgres ENUM and a derived line must never become a value\nthat column would accept."},"DocumentRiskCitation":{"properties":{"cited_text":{"type":"string","title":"Cited Text"},"start_page_number":{"type":"integer","title":"Start Page Number"},"end_page_number":{"type":"integer","title":"End Page Number"},"bounding_boxes":{"items":{"$ref":"#/components/schemas/BoundingBox"},"type":"array","title":"Bounding Boxes","default":[]}},"type":"object","required":["cited_text","start_page_number","end_page_number"],"title":"DocumentRiskCitation"},"DocumentRiskIssueRequestTypes":{"type":"string","enum":["open","resolved","all"],"title":"DocumentRiskIssueRequestTypes"},"DocumentRiskIssueResponse":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"source_clause":{"type":"string","title":"Source Clause"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"made_obsolete_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Made Obsolete By"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"notes":{"anyOf":[{},{"type":"null"}],"title":"Notes"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"suppressed_by_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suppressed By Rule Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"},"assignee_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee First Name"},"assignee_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Last Name"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["risk_id","document_id","short_text","explanation","source_clause","severity","status","made_obsolete_by","ignore_comment","run_id","created"],"title":"DocumentRiskIssueResponse"},"DocumentRiskResponse":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"source_clause":{"type":"string","title":"Source Clause"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"made_obsolete_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Made Obsolete By"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"notes":{"anyOf":[{},{"type":"null"}],"title":"Notes"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"suppressed_by_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suppressed By Rule Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"},"assignee_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee First Name"},"assignee_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Last Name"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["risk_id","document_id","short_text","explanation","source_clause","severity","status","made_obsolete_by","ignore_comment","run_id"],"title":"DocumentRiskResponse"},"DocumentRiskResponseWithRun":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"source_clause":{"type":"string","title":"Source Clause"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"made_obsolete_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Made Obsolete By"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"notes":{"anyOf":[{},{"type":"null"}],"title":"Notes"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"suppressed_by_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suppressed By Rule Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"assignee_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee Id"},"assignee_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee First Name"},"assignee_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Last Name"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"run_type":{"$ref":"#/components/schemas/RunType"},"run_time":{"type":"string","format":"date-time","title":"Run Time"}},"type":"object","required":["risk_id","document_id","short_text","explanation","source_clause","severity","status","made_obsolete_by","ignore_comment","run_id","run_type","run_time"],"title":"DocumentRiskResponseWithRun"},"DocumentScope":{"type":"string","enum":["vendor","internal"],"title":"DocumentScope"},"DocumentTypeEntryInput":{"properties":{"slug":{"$ref":"#/components/schemas/DocumentTypeEnum"},"required":{"type":"boolean","title":"Required","default":true}},"type":"object","required":["slug"],"title":"DocumentTypeEntryInput","description":"Input model for a document type with required flag."},"DocumentTypeEntryResponse":{"properties":{"slug":{"$ref":"#/components/schemas/DocumentTypeEnum"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required"}},"type":"object","required":["slug","label","required"],"title":"DocumentTypeEntryResponse","description":"Response model for a document type with required flag and label."},"DocumentTypeEnum":{"type":"string","enum":["GENERIC_POLICY","CONTRACT","QUESTIONNAIRE","MASTER_SERVICES_AGREEMENT_MSA","AML_POLICIES_AND_PROCEDURES","PRIVACY_POLICY","INSURANCE_CERTIFICATE","SOC_1_REPORT","SOC_2_REPORT","DISASTER_RECOVERY_PLAN","INFORMATION_SECURITY_POLICY","ACCEPTABLE_USE_POLICY","ACCESS_CONTROL_POLICY","DATA_CLASSIFICATION_POLICY","INCIDENT_RESPONSE_PROCEDURES","THIRD_PARTY_SECURITY_POLICY","MARKETING_MATERIAL","SOC_3_REPORT","BRIDGE_LETTER","PCI_DSS_ATTESTATION_OF_COMPLIANCE","GDPR_COMPLIANCE_STATEMENT","CCPA_COMPLIANCE_STATEMENT","HIPAA_COMPLIANCE_ATTESTATION","FFIEC_COMPLIANCE_ATTESTATION","PENETRATION_TEST_RESULTS","VULNERABILITY_SCAN_REPORTS","RISK_ASSESSMENT_REPORT","THREAT_MODELING_DOCUMENTATION","APPLICATION_SECURITY_ASSESSMENT","ISO_27001_CERTIFICATION","ISO_27701_CERTIFICATION","ISO_9001_CERTIFICATION","ISO_22301_CERTIFICATION","CSA_STAR_CERTIFICATION","HITRUST_CERTIFICATION","FEDRAMP_AUTHORIZATION","CHANGE_MANAGEMENT_POLICY","SDLC_POLICY","NETWORK_SECURITY_POLICY","DATA_SECURITY_POLICY","ENDPOINT_SECURITY_POLICY","MOBILE_DEVICE_MANAGEMENT_POLICY","PASSWORD_POLICY","ENCRYPTION_POLICY","PATCH_MANAGEMENT_POLICY","CLOUD_SECURITY_POLICY","DATA_RETENTION_POLICY","DATA_DESTRUCTION_POLICY","SYSTEM_ARCHITECTURE_OVERVIEW","SHARED_RESPONSIBILITY_MATRIX","DATA_FLOW_DIAGRAMS","SYSTEM_NETWORK_DIAGRAM","API_DOCUMENTATION","IT_ASSET_MANAGEMENT_POLICY","PHYSICAL_SECURITY_POLICY","PRODUCT_ARCHITECTURE_DOCUMENTATION","DATA_ACCESS_AND_ENCRYPTION_PROTOCOLS","LOCALIZATION_DATA_RESIDENCY_DOCUMENTATION","AUDITED_FINANCIAL_STATEMENTS","BUSINESS_CONTINUITY_PLAN","BUSINESS_IMPACT_ASSESSMENT","BCP_DR_TEST_RESULTS","CORPORATE_STRUCTURE_DOCUMENTATION","ARTICLES_OF_INCORPORATION","BUSINESS_LICENSE","TAX_COMPLIANCE_DOCUMENTATION","DNB_REPORT","REFERENCES_FROM_OTHER_FINANCIAL_INSTITUTIONS","CERTIFICATE_OF_GOOD_STANDING","W9_TAX_IDENTIFICATION_FORM","OPERATING_AGREEMENTS","BYLAWS","PARTNERSHIP_AGREEMENT","IRS_EIN_EVIDENCE","PROOF_OF_HEADQUARTERS_ADDRESS","BENEFICIAL_OWNERSHIP_DOCUMENTATION","BOARD_OF_DIRECTORS_LIST_AND_BIOS","MANAGEMENT_ORGANIZATIONAL_CHART","KEY_ROLES_LIST_AND_SUCCESSION_PLAN","FUNDING_PLAN_OR_SOURCES","LITIGATION_LIST","GOVERNMENT_REGULATOR_INQUIRIES","LEGAL_DISCLOSURES","BANK_CHARTER","FINTECH_SPONSOR_AGREEMENT","SOURCE_CODE_ESCROW_AGREEMENT","REGULATION_E_POLICY","REGULATION_Z_POLICY","OFAC_COMPLIANCE_POLICY","KYC_PROCEDURES","FAIR_LENDING_POLICY","UDAAP_COMPLIANCE_POLICY","CRA_COMPLIANCE_POLICY","GLBA_COMPLIANCE_POLICY","TCPA_TSR_POLICY","ADA_POLICY","CIP_DOCUMENTATION","CDD_EDD_ONBOARDING_PROCEDURES","SAR_ESCALATION_AND_REPORTING_PROCEDURES","AI_POLICY","AI_GOVERNANCE_DOCUMENTATION","AI_RISK_ASSESSMENT","MODEL_RISK_MANAGEMENT_POLICY","MODEL_INVENTORY","MODEL_VALIDATION_REPORT","AUDIT_POLICY","VENDOR_MANAGEMENT_POLICY","VENDOR_LIST_WITH_CUSTOMER_DATA_ACCESS","VENDOR_ONBOARDING_AND_DUE_DILIGENCE_PROCEDURE","CLOUD_PROVIDER_DUE_DILIGENCE_DOCUMENTATION","VENDOR_RISK_ASSESSMENT_EXAMPLES","REGULATORY_EXAMINATION_REPORTS","RIGHT_TO_AUDIT_CLAUSE_CONFIRMATION","PRIVACY_IMPACT_ASSESSMENT","BOARD_OR_COMMITTEE_OVERSIGHT_DOCUMENTATION","COMPLIANCE_COMMITTEE_CHARTER","BSA_AML_COMPLIANCE_OVERSIGHT_EVIDENCE","COMPLIANCE_STAFF_RESUMES_AND_JOB_DESCRIPTIONS","BOARD_COMPLIANCE_TRAINING_MATERIALS","COMPLIANCE_ESCALATION_AND_REPORTING_PROCESS","CMS_PROGRAM_OVERVIEW","REGULATORY_CHANGE_MANAGEMENT_PROCEDURE","COMPLIANCE_MONITORING_AND_TESTING_PROCEDURE","TESTING_PROCEDURES_AND_WORKSHEETS","RISK_MANAGEMENT_FRAMEWORK","GOVERNANCE_POLICY","ACH_PAYMENTS_PROGRAM_OVERVIEW","VALIDATE_IDENTITY_CLEAR","INSIDER_TRADING_POLICY","IDENTITY_THEFT_PROCEDURES","UNUSUAL_ACTIVITY_REPORT_PROCEDURES","TRANSACTION_MONITORING","FRAUD_MONITORING_METHODOLOGY","FRAUD_POLICIES_AND_PROCEDURES","PRIOR_YEAR_FRAUD_REPORTING_METRICS","BACKGROUND_CHECK_PROCEDURES","EMPLOYEE_SECURITY_AWARENESS_TRAINING_PROGRAM","CODE_OF_CONDUCT","ETHICS_POLICY","WHISTLEBLOWER_POLICY","DIVERSITY_INCLUSION_POLICY","OFFBOARDING_AND_ONBOARDING_POLICY","HUMAN_RESOURCE_SECURITY_POLICY","SEXUAL_HARASSMENT_POLICY","COMMUNICATION_DOCUMENTS","NON_DISCLOSURE_AGREEMENT_NDA","SERVICE_LEVEL_AGREEMENT_SLA","DATA_PROCESSING_AGREEMENT_DPA","BUSINESS_ASSOCIATE_AGREEMENT_BAA","INTELLECTUAL_PROPERTY_RIGHTS_DOCUMENTATION","MATERIAL_SOFTWARE_LICENSES_LIST","IMPLEMENTATION_PLAN","SUPPORT_SLA_DOCUMENTATION","OPERATIONAL_PROCEDURES_MANUAL","USER_DOCUMENTATION","TRAINING_MATERIALS","LIST_OF_SUBCONTRACTORS","AUDIT_SUMMARY_OR_REPORTS","INTERNAL_AUDIT_CHARTER","INDEPENDENT_AUDIT_REVIEW_RESULTS","AUDIT_PLAN_AND_SCHEDULE","AUDIT_REPORTING_TO_MANAGEMENT_AND_BOARD","UAT_PROCEDURES","ISSUE_MANAGEMENT_REMEDIATION_TRACKER","COMPLAINT_HANDLING","COMPLAINT_LOG_AND_ANALYSIS","COMPLAINT_RESOLUTION_ESCALATION","CUSTOMER_SUPPORT_OVERVIEW","END_USER_ONBOARDING_WORKFLOW","END_USER_TERMS_AND_FEE_DISCLOSURES","E_SIGN_POLICY","PERFORMANCE_REPORTS","EXIT_STRATEGY_OFFBOARDING_PLAN","PROJECTIONS","MARKETING_POLICY_AND_PROCEDURE","CAN_SPAM_POLICY","SOCIAL_MEDIA_POLICY","PUBLISHED_DATA_BREACH_HISTORY","ESG_REPORT","SUSTAINABILITY_POLICY","CORPORATE_SOCIAL_RESPONSIBILITY_STATEMENT","ENVIRONMENTAL_COMPLIANCE_CERTIFICATION","APPROVALS","ASSESSMENTS","MISCELLANEOUS","SIG_QUESTIONNAIRE","FINANCIALS","COMPANY_OVERVIEW","KOBALT_GENERATED_REPORT","ANNUAL_FINANCIAL_REPORT","SEC_FORM_10K","SEC_FORM_10Q","INTERNAL_GENERAL","INTERNAL_PRIVACY_POLICY","INTERNAL_AML_POLICY","INTERNAL_MARKETING_STANDARDS","REPORT_TEMPLATE","INTERNAL_INFORMATION_SECURITY_POLICY","INTERNAL_ACCESS_CONTROL_POLICY","INTERNAL_DATA_CLASSIFICATION_POLICY","INTERNAL_INCIDENT_RESPONSE_PROCEDURES","INTERNAL_THIRD_PARTY_SECURITY_POLICY","INTERNAL_RECORDS_MANAGEMENT_POLICY","INTERNAL_INFORMATION_GOVERNANCE_POLICY","INTERNAL_THIRD_PARTY_RISK_MANAGEMENT_POLICY","INTERNAL_KNOW_YOUR_COUNTERPARTY_SCREENING_GUIDELINES","INTERNAL_INCIDENT_MANAGEMENT_POLICY","INTERNAL_JURISDICTION_RATINGS","INTERNAL_ACCEPTABLE_USE_POLICY","INTERNAL_GLOSSARY","INTERNAL_INHERENT_RISK_ASSESSMENT_GUIDELINES","RISK_ASSESSMENT_GUIDELINES","KOBALT_MIGRATION"],"title":"DocumentTypeEnum"},"DocumentTypeReference":{"properties":{"slug":{"$ref":"#/components/schemas/DocumentTypeEnum"},"label":{"type":"string","title":"Label"}},"type":"object","required":["slug","label"],"title":"DocumentTypeReference","description":"A document type a rule covers.\n\nThe label is resolved here so the settings page can render a saved rule\nwithout joining it against ``GET /document-types``."},"DocumentTypeSetCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"},"document_type_slugs":{"items":{"type":"string"},"type":"array","title":"Document Type Slugs"},"custom_inherent_risk_level_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Inherent Risk Level Id"}},"type":"object","required":["name","document_type_slugs"],"title":"DocumentTypeSetCreate"},"DocumentTypeSetResponse":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"},"document_type_slugs":{"items":{"type":"string"},"type":"array","title":"Document Type Slugs"},"custom_inherent_risk_level_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Custom Inherent Risk Level Id"},"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["name","document_type_slugs","id","company_id"],"title":"DocumentTypeSetResponse"},"DocumentTypeSetWithLabels":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"document_types":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Document Types"},"custom_inherent_risk_level":{"anyOf":[{"$ref":"#/components/schemas/RiskLevelField"},{"type":"null"}]}},"type":"object","required":["id","company_id","name","description","document_types"],"title":"DocumentTypeSetWithLabels"},"DossierRef":{"properties":{"artifact_id":{"type":"string","format":"uuid","title":"Artifact Id"},"title":{"type":"string","title":"Title"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"source_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Count"}},"type":"object","required":["artifact_id","title"],"title":"DossierRef"},"DraftingAnalysisRequest":{"properties":{"files":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Files"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"additional_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Info"}},"additionalProperties":false,"type":"object","required":["files","vendor_id","template_id"],"title":"DraftingAnalysisRequest"},"DraftingResult":{"properties":{"version":{"type":"integer","title":"Version"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}],"title":"Content"},"has_citations":{"type":"boolean","title":"Has Citations","default":false},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["version","content"],"title":"DraftingResult"},"DraftingSection-Input":{"properties":{"section_name":{"type":"string","title":"Section Name"},"children":{"anyOf":[{"items":{"$ref":"#/components/schemas/DraftingSection-Input"},"type":"array"},{"items":{"type":"string"},"type":"array"}],"title":"Children"}},"type":"object","required":["section_name","children"],"title":"DraftingSection"},"DraftingSection-Output":{"properties":{"section_name":{"type":"string","title":"Section Name"},"children":{"anyOf":[{"items":{"$ref":"#/components/schemas/DraftingSection-Output"},"type":"array"},{"items":{"type":"string"},"type":"array"}],"title":"Children"}},"type":"object","required":["section_name","children"],"title":"DraftingSection"},"DraftingTemplateBase":{"properties":{"name":{"type":"string","title":"Name"},"template":{"anyOf":[{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array"},{"$ref":"#/components/schemas/DraftingSection-Input"}],"title":"Template"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"template_type":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}]},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"scoring_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scoring Logic Id"}},"type":"object","required":["name","template"],"title":"DraftingTemplateBase"},"DraftingTemplateResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"DraftingTemplate","title":"Kind","default":"DraftingTemplate"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/DraftingTemplateSpec"}},"type":"object","required":["metadata","spec"],"title":"DraftingTemplateResourceResponse","description":"GET/list response for a DraftingTemplate resource (includes annotations)."},"DraftingTemplateResponse":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"template":{"anyOf":[{"$ref":"#/components/schemas/DraftingSection-Output"},{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array"}],"title":"Template"},"from_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Upload Id"},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"scoring_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scoring Logic Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"template_type":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}]},"last_modified":{"type":"string","format":"date-time","title":"Last Modified"}},"type":"object","required":["template_id","company_id","name","template","last_modified"],"title":"DraftingTemplateResponse"},"DraftingTemplateSpec":{"properties":{"type":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}]},"template":{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array","title":"Template"}},"type":"object","title":"DraftingTemplateSpec"},"DraftingTemplateType":{"type":"string","enum":["INHERENT_RISK_ASSESSMENT","QUESTIONNAIRE","GENERAL_RISK_ASSESSMENT","INTAKE"],"title":"DraftingTemplateType"},"DraftingV3RunResults":{"properties":{"version":{"type":"integer","title":"Version","default":3},"template_name":{"type":"string","title":"Template Name"},"template_id":{"type":"string","title":"Template Id","default":""},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"content":{"items":{"$ref":"#/components/schemas/QuestionnaireSection"},"type":"array","title":"Content"},"has_citations":{"type":"boolean","title":"Has Citations","default":true}},"type":"object","required":["template_name","content"],"title":"DraftingV3RunResults"},"DriftKind":{"type":"string","enum":["presence","outcome","revision"],"title":"DriftKind","description":"Why two runs of the same collateral disagreed about one requirement.\n\nThree kinds, kept apart because they have three different fixes and one \"disagreement\" count\nwould point at none of them."},"DriftRow":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"kind":{"$ref":"#/components/schemas/DriftKind"},"outcome_a":{"anyOf":[{"$ref":"#/components/schemas/RequirementCheckOutcome"},{"type":"null"}]},"outcome_b":{"anyOf":[{"$ref":"#/components/schemas/RequirementCheckOutcome"},{"type":"null"}]},"visible_flip":{"anyOf":[{"$ref":"#/components/schemas/VisibleFlipKind"},{"type":"null"}]},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["requirement_id","guideline_file_id","guideline_filename","kind","outcome_a","outcome_b","visible_flip","matched_trigger_terms","requirement_text","filename"],"title":"DriftRow","description":"One requirement two runs disagreed about, on one piece of collateral."},"DroppedFileFingerprint":{"properties":{"key":{"type":"string","maxLength":128,"title":"Key"},"filename":{"type":"string","maxLength":256,"title":"Filename"},"content_hash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"title":"Content Hash"}},"type":"object","required":["key","filename"],"title":"DroppedFileFingerprint","description":"What the client knows about one dropped file before uploading it."},"DryRunRequest":{"properties":{"documents":{"type":"string","title":"Documents"}},"type":"object","required":["documents"],"title":"DryRunRequest","description":"Dry-run-only request: just the raw YAML documents string."},"DueDiligenceConfigurationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"upload_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Step Instructions"},"questions_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Questions Step Instructions"},"submit_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submit Step Instructions"},"require_decline_note":{"type":"boolean","title":"Require Decline Note","default":false},"disable_portal_authentication":{"type":"boolean","title":"Disable Portal Authentication","default":false},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overdue Notification Interval Days"}},"type":"object","required":["id","company_id"],"title":"DueDiligenceConfigurationResponse","description":"Company-level due diligence flow copy configuration."},"DueDiligenceConfigurationUpsert":{"properties":{"upload_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Step Instructions"},"questions_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Questions Step Instructions"},"submit_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submit Step Instructions"},"require_decline_note":{"type":"boolean","title":"Require Decline Note","default":false},"disable_portal_authentication":{"type":"boolean","title":"Disable Portal Authentication","default":false},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"}},"type":"object","title":"DueDiligenceConfigurationUpsert","description":"Payload for creating or updating the company due diligence configuration."},"EmailComplianceFeedbackReportRequest":{"properties":{"company_name":{"type":"string","title":"Company Name"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"lookback":{"type":"string","title":"Lookback"},"comments_only":{"type":"boolean","title":"Comments Only"},"feedback_count":{"type":"integer","title":"Feedback Count"},"summary":{"type":"string","title":"Summary"},"disposition_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition Summary"},"report":{"type":"string","title":"Report"}},"type":"object","required":["company_name","lookback","comments_only","feedback_count","summary","report"],"title":"EmailComplianceFeedbackReportRequest","description":"Email an already-generated compliance feedback report.\n\nRecipients are fixed (Ashika / Ashi / Cece) — see the frontend email route."},"EmbedState":{"type":"string","enum":["COMPLETED","IN_PROGRESS","NOT_STARTED","FAILED","NOT_SUPPORTED","CLEANUP_IN_PROGRESS"],"title":"EmbedState"},"EnrolledCompany":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"}},"type":"object","required":["company_id","company_name"],"title":"EnrolledCompany"},"EntityCustomFieldsWithValuesResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/CustomFieldWithValue-Output"},"type":"array","title":"Fields","default":[]}},"type":"object","title":"EntityCustomFieldsWithValuesResponse"},"EntityFailureRow":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"total":{"type":"integer","title":"Total"},"failed":{"type":"integer","title":"Failed"},"failure_pct":{"type":"number","title":"Failure Pct"},"total_risks":{"type":"integer","title":"Total Risks"},"actioned":{"type":"integer","title":"Actioned"},"actioned_pct":{"type":"number","title":"Actioned Pct"},"flagged":{"type":"integer","title":"Flagged"},"flag_rate_pct":{"type":"number","title":"Flag Rate Pct"},"with_citations":{"type":"integer","title":"With Citations"},"with_citations_pct":{"type":"number","title":"With Citations Pct"}},"type":"object","required":["id","name","total","failed","failure_pct","total_risks","actioned","actioned_pct","flagged","flag_rate_pct","with_citations","with_citations_pct"],"title":"EntityFailureRow","description":"A row in the shared drill-down breakdown (a company or a marketing team).\n\nOne row per entity carrying every scope metric, so the single \"By company /\nBy team\" table can compare them side by side and drive the page's scope:\n- SLA failures over runs (`total`/`failed`/`failure_pct`)\n- the risk-action funnel over risks: action rate\n  (`actioned_pct = actioned / total_risks`) and flag rate\n  (`flag_rate_pct = flagged / actioned`)\n- citation coverage over risks (`with_citations_pct = with_citations /\n  total_risks`)\n\nFailures and risks share no denominator -- `total`/`failed` count runs,\neverything else counts risks -- so the risk percentages are self-contained.\n\n`id` is None for the synthetic \"Unassigned\" team bucket (collateral with no\n`team_id`)."},"EntityPermissionMatrix":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"permissions":{"items":{"$ref":"#/components/schemas/PermissionMatrixEntry"},"type":"array","title":"Permissions"}},"type":"object","required":["entity_name","permissions"],"title":"EntityPermissionMatrix"},"EntityPermissionUsage":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"permissions":{"items":{"$ref":"#/components/schemas/PermissionUsageEntry"},"type":"array","title":"Permissions"}},"type":"object","required":["entity_name","permissions"],"title":"EntityPermissionUsage"},"EntityType":{"type":"string","enum":["vendor","partner","merchant","bank","fintech_prospect","loan_review","self"],"title":"EntityType"},"Error":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"Error"},"EventVisibility":{"type":"string","enum":["shared","internal"],"title":"EventVisibility"},"EvidencePacketAutoselectRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"service_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Service Ids"}},"type":"object","required":["vendor_id"],"title":"EvidencePacketAutoselectRequest","description":"Request model for autoselecting evidence packets based on vendor metadata."},"EvidencePacketAutoselectResponse":{"properties":{"selections":{"additionalProperties":{"$ref":"#/components/schemas/EvidencePacketSelectionResult"},"type":"object","title":"Selections"},"not_selected":{"items":{"type":"string"},"type":"array","title":"Not Selected"},"suggested_recipient":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRecipient"},{"type":"null"}]}},"type":"object","title":"EvidencePacketAutoselectResponse","description":"Response model for autoselect endpoint."},"EvidencePacketBlockInput":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"},"selection_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selection Logic Id"},"document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEntryInput"},"type":"array","title":"Document Types"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"rubric_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric File Id"},"vendor_response_required":{"type":"boolean","title":"Vendor Response Required","default":false}},"type":"object","title":"EvidencePacketBlockInput","description":"Input model for creating/updating a block configuration."},"EvidencePacketBlockResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"selection_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selection Logic Id"},"selection_logic_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Logic Name"},"document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEntryResponse"},"type":"array","title":"Document Types"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"rubric_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric File Id"},"vendor_response_required":{"type":"boolean","title":"Vendor Response Required","default":false}},"type":"object","required":["id"],"title":"EvidencePacketBlockResponse","description":"Response model for a block configuration."},"EvidencePacketConfigurationBlockSpec":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"},"required_document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEnum"},"type":"array","title":"Required Document Types"},"suggested_document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEnum"},"type":"array","title":"Suggested Document Types"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"selection_logic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Logic"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"}},"type":"object","title":"EvidencePacketConfigurationBlockSpec"},"EvidencePacketConfigurationCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicable Logic Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"contents":{"items":{"$ref":"#/components/schemas/EvidencePacketBlockInput"},"type":"array","title":"Contents"}},"type":"object","required":["name"],"title":"EvidencePacketConfigurationCreate"},"EvidencePacketConfigurationResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"EvidencePacketConfiguration","title":"Kind","default":"EvidencePacketConfiguration"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/EvidencePacketConfigurationSpec"}},"type":"object","required":["metadata","spec"],"title":"EvidencePacketConfigurationResourceResponse","description":"GET/list response for an EvidencePacketConfiguration resource (includes annotations)."},"EvidencePacketConfigurationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicable Logic Id"},"applicable_logic_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applicable Logic Name"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"owner_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Team Name"},"owner_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Name"},"contents":{"items":{"$ref":"#/components/schemas/EvidencePacketBlockResponse"},"type":"array","title":"Contents"}},"type":"object","required":["id","company_id","name","description"],"title":"EvidencePacketConfigurationResponse"},"EvidencePacketConfigurationSpec":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"blocks":{"items":{"$ref":"#/components/schemas/EvidencePacketConfigurationBlockSpec"},"type":"array","title":"Blocks"}},"type":"object","title":"EvidencePacketConfigurationSpec"},"EvidencePacketConfigurationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicable Logic Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"contents":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvidencePacketBlockInput"},"type":"array"},{"type":"null"}],"title":"Contents"}},"type":"object","title":"EvidencePacketConfigurationUpdate"},"EvidencePacketCreateRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"recipient":{"anyOf":[{"$ref":"#/components/schemas/EvidencePacketRequestee"},{"type":"null"}]},"document_types":{"items":{"$ref":"#/components/schemas/DocumentTypeEntryInput"},"type":"array","title":"Document Types"},"selected_block_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Selected Block Ids"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["vendor_id"],"title":"EvidencePacketCreateRequest","description":"Request model for creating an evidence packet request."},"EvidencePacketCreateResponse":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"requestee_company_id":{"type":"string","format":"uuid","title":"Requestee Company Id"},"initiated_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initiated By User Id"},"requestee_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requestee User Id"},"document_requests":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"},"type":"array","title":"Document Requests"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"selected_block_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Selected Block Ids"}},"type":"object","required":["request_id","requesting_company_id","requestee_company_id","initiated_by_user_id","requestee_user_id","instructions","due_date","status","created_at"],"title":"EvidencePacketCreateResponse","description":"Response model for evidence packet."},"EvidencePacketDetailResponse":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"requesting_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requesting Company Name"},"requestee_company_id":{"type":"string","format":"uuid","title":"Requestee Company Id"},"requestee_vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee Vendor Name"},"initiated_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initiated By User Id"},"initiated_by_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initiated By User Name"},"requestee_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee User Email"},"requestee_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee User Name"},"recipients":{"items":{"$ref":"#/components/schemas/EvidencePacketRecipientResponse"},"type":"array","title":"Recipients"},"document_requests":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"},"type":"array","title":"Document Requests"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"upload_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Step Instructions"},"questions_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Questions Step Instructions"},"submit_step_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submit Step Instructions"},"require_decline_note":{"type":"boolean","title":"Require Decline Note","default":false},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"overdue_last_notified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Overdue Last Notified At"},"status":{"$ref":"#/components/schemas/EvidencePacketStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"uploaded_files":{"items":{"$ref":"#/components/schemas/EvidencePacketFileResponse"},"type":"array","title":"Uploaded Files"},"requirements":{"items":{"$ref":"#/components/schemas/EvidenceRequirementResponse"},"type":"array","title":"Requirements"},"sections":{"items":{"$ref":"#/components/schemas/EvidencePacketSectionResponse"},"type":"array","title":"Sections"},"control_strength_labels":{"items":{"$ref":"#/components/schemas/ControlStrengthLabel"},"type":"array","title":"Control Strength Labels"}},"type":"object","required":["request_id","requesting_company_id","requestee_company_id","status","created_at","updated_at"],"title":"EvidencePacketDetailResponse","description":"Detailed response model for evidence packet, used in the collection flow.\n\nThis includes all the information needed to render the evidence collection UI.\nDocument requests are sorted by index and each row encodes whether the document\nis required or suggested, and whether it has been declined (reason is non-null)."},"EvidencePacketFileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Request Id"},"requirement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requirement Id"},"file_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type Slug"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","upload_id","file_id","filename","document_request_id","status"],"title":"EvidencePacketFileResponse","description":"Response model for a file uploaded as part of evidence packet."},"EvidencePacketFileUploadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"evidence_packet_id":{"type":"string","format":"uuid","title":"Evidence Packet Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Request Id"},"requirement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requirement Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","upload_id","file_id","evidence_packet_id","filename","document_request_id","status"],"title":"EvidencePacketFileUploadResponse","description":"Response model for file upload in evidence packet."},"EvidencePacketHealthItem":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"status":{"$ref":"#/components/schemas/EvidencePacketStatus"},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"requesting_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requesting Company Name"},"requestee_company_id":{"type":"string","format":"uuid","title":"Requestee Company Id"},"requestee_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestee Company Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"stuck_files":{"items":{"$ref":"#/components/schemas/StuckFile"},"type":"array","title":"Stuck Files"}},"type":"object","required":["request_id","status","requesting_company_id","requesting_company_name","requestee_company_id","requestee_company_name","created_at","updated_at","stuck_files"],"title":"EvidencePacketHealthItem"},"EvidencePacketHealthResponse":{"properties":{"has_stuck_files":{"items":{"$ref":"#/components/schemas/EvidencePacketHealthItem"},"type":"array","title":"Has Stuck Files"},"threshold_minutes":{"type":"integer","title":"Threshold Minutes"}},"type":"object","required":["has_stuck_files","threshold_minutes"],"title":"EvidencePacketHealthResponse"},"EvidencePacketRecipientInput":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","title":"EvidencePacketRecipientInput","description":"Either an existing ``user_id``, or ``email``/name to find-or-create a\nuser on the requesting company's domain."},"EvidencePacketRecipientResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"}},"type":"object","required":["user_id","email","name"],"title":"EvidencePacketRecipientResponse","description":"A single recipient of an evidence packet."},"EvidencePacketRequestee":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","first_name","last_name"],"title":"EvidencePacketRequestee","description":"Recipient information for evidence validation request."},"EvidencePacketReviewTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"evidence_packet_review","title":"Task Type","default":"evidence_packet_review"},"auto_approve":{"type":"boolean","title":"Auto Approve","default":false},"inherent_risk_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inherent Risk Template Id"},"control_strength_labels":{"items":{"$ref":"#/components/schemas/ControlStrengthLabel"},"type":"array","title":"Control Strength Labels","default":[]},"label_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Instructions"}},"type":"object","required":["definition_id","company_id","review_type","stage"],"title":"EvidencePacketReviewTaskDefinitionResponse"},"EvidencePacketReviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"task_type":{"$ref":"#/components/schemas/ReviewTaskType"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"evidence_packet_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Packet Id"}},"type":"object","required":["task_id","review_id","task_type","status"],"title":"EvidencePacketReviewTaskResponse"},"EvidencePacketReviewTaskSpec":{"properties":{"type":{"type":"string","const":"evidence_packet_review","title":"Type","default":"evidence_packet_review"},"auto_approve":{"type":"boolean","title":"Auto Approve","default":false},"inherent_risk_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inherent Risk Template"},"control_strength_labels":{"items":{"$ref":"#/components/schemas/ControlStrengthLabel"},"type":"array","title":"Control Strength Labels"}},"type":"object","title":"EvidencePacketReviewTaskSpec"},"EvidencePacketRiskAreaEntry":{"properties":{"risk_area_name":{"type":"string","title":"Risk Area Name"},"document_type_slugs":{"items":{"type":"string"},"type":"array","title":"Document Type Slugs"},"uploaded_files":{"items":{"$ref":"#/components/schemas/EvidencePacketFileResponse"},"type":"array","title":"Uploaded Files"},"document_requests":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse"},"type":"array","title":"Document Requests"}},"type":"object","required":["risk_area_name","document_type_slugs"],"title":"EvidencePacketRiskAreaEntry","description":"A single risk area section with its associated document requests and uploaded files."},"EvidencePacketRiskAreasResponse":{"properties":{"risk_areas":{"items":{"$ref":"#/components/schemas/EvidencePacketRiskAreaEntry"},"type":"array","title":"Risk Areas"}},"type":"object","title":"EvidencePacketRiskAreasResponse","description":"Response model listing all risk areas for an evidence packet."},"EvidencePacketSectionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"risk_area_name":{"type":"string","title":"Risk Area Name"},"documents_requested":{"items":{"type":"string"},"type":"array","title":"Documents Requested"},"rubric_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric File Id"},"source_block_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Block Id"},"vendor_response_required":{"type":"boolean","title":"Vendor Response Required","default":false},"template_requirements":{"items":{"$ref":"#/components/schemas/TemplateRequirementGroup"},"type":"array","title":"Template Requirements"}},"type":"object","required":["id","risk_area_name"],"title":"EvidencePacketSectionResponse","description":"Response model for a single section (risk area) within a draft evidence packet."},"EvidencePacketSelectionResult":{"properties":{"packet_id":{"type":"string","format":"uuid","title":"Packet Id"},"selected":{"type":"boolean","title":"Selected"},"scenarios":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Scenarios"}},"type":"object","required":["packet_id","selected"],"title":"EvidencePacketSelectionResult","description":"Result of evidence packet selection.\n\nIf `selected` is False, the packet was not applicable.\nIf `selected` is True, `scenarios` contains the selection results for each scenario."},"EvidencePacketStatus":{"type":"string","enum":["draft","pending","in_progress","completed","cancelled"],"title":"EvidencePacketStatus","description":"Status of an evidence packet request."},"EvidenceRequirementCheckType":{"type":"string","enum":["REQUIREMENT","RISK_FACTOR"],"title":"EvidenceRequirementCheckType","description":"Discriminator for the evidence_requirement_checks polymorphic hierarchy."},"EvidenceRequirementResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"evidence_packet_contents_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Packet Contents Id"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"question_id":{"type":"string","format":"uuid","title":"Question Id"},"question_index":{"type":"integer","title":"Question Index"},"question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}],"title":"Question"},"answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Answer"},"compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"ai_check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Check Label"},"classified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Classified At"},"note":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireVendorAnswer"},{"type":"null"}]},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"approval_status":{"$ref":"#/components/schemas/RequirementApprovalStatus","default":"pending"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"collaborative_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Collaborative Task Id"},"vendor_response_required":{"type":"boolean","title":"Vendor Response Required","default":false},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/RequirementCloser"},{"type":"null"}]}},"type":"object","required":["id","evidence_packet_contents_id","template_id","template_name","question_id","question_index","question","answer","compliance","note"],"title":"EvidenceRequirementResponse","description":"Response model for a requirement (question) in an evidence packet."},"EvidenceReviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"task_type":{"$ref":"#/components/schemas/ReviewTaskType"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"evidence_packet_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Packet Id"},"can_close":{"type":"boolean","title":"Can Close","default":false},"any_accessible":{"type":"boolean","title":"Any Accessible","default":true}},"type":"object","required":["task_id","review_id","task_type","status"],"title":"EvidenceReviewTaskResponse"},"ExistingProductLine":{"properties":{"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"program_types":{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array","title":"Program Types"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"marketing_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Team Name"},"internal_file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Internal File Ids"},"usage_count":{"type":"integer","title":"Usage Count"}},"additionalProperties":false,"type":"object","required":["preset_id","name","description","program_types","marketing_team_id","marketing_team_name","internal_file_ids","usage_count"],"title":"ExistingProductLine","description":"A product line as it exists today, for diffing an `update` against."},"ExplainRequest":{"properties":{"block_id":{"type":"string","format":"uuid","title":"Block Id"},"new_code":{"type":"string","title":"New Code"}},"type":"object","required":["block_id","new_code"],"title":"ExplainRequest"},"ExternalReferenceDocumentResponse":{"properties":{"reference_id":{"type":"string","format":"uuid","title":"Reference Id"},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"requestee_company_id":{"type":"string","format":"uuid","title":"Requestee Company Id"},"requested_by_user_id":{"type":"string","format":"uuid","title":"Requested By User Id"},"requestee_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requestee User Id"},"individual_file_upload_id":{"type":"string","format":"uuid","title":"Individual File Upload Id"},"filename":{"type":"string","title":"Filename"},"aws_key":{"type":"string","title":"Aws Key"}},"type":"object","required":["reference_id","requesting_company_id","requestee_company_id","requested_by_user_id","individual_file_upload_id","filename","aws_key"],"title":"ExternalReferenceDocumentResponse"},"ExtractionProfile":{"type":"string","enum":["regulatory","marketing"],"title":"ExtractionProfile","description":"Which product's guidance to extract with."},"FactorAssessmentDetail":{"properties":{"factor_assessment_id":{"type":"string","format":"uuid","title":"Factor Assessment Id"},"risk_assessment_id":{"type":"string","format":"uuid","title":"Risk Assessment Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"risk_factor":{"$ref":"#/components/schemas/FactorRef"},"risk_area":{"$ref":"#/components/schemas/RiskAreaRef"},"ordinal":{"type":"integer","title":"Ordinal"},"factor_count":{"type":"integer","title":"Factor Count"},"status":{"$ref":"#/components/schemas/RiskAssessmentFactorStatus"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"current_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Activity"},"review_state":{"$ref":"#/components/schemas/RiskFactorReviewState"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"suggested_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"manual_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"effective_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"rating_options":{"items":{"$ref":"#/components/schemas/RatingOptionView"},"type":"array","title":"Rating Options"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"citations":{"items":{"$ref":"#/components/schemas/CitationView"},"type":"array","title":"Citations"},"citation_count":{"type":"integer","title":"Citation Count"},"distinct_document_count":{"type":"integer","title":"Distinct Document Count"},"prior_reviews":{"items":{"$ref":"#/components/schemas/PriorReviewView"},"type":"array","title":"Prior Reviews"},"assessment_guidance":{"type":"string","title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"memo":{"anyOf":[{"$ref":"#/components/schemas/DossierRef"},{"type":"null"}]},"dossier":{"anyOf":[{"$ref":"#/components/schemas/DossierRef"},{"type":"null"}]},"agent_run":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRef"},{"type":"null"}]},"steps":{"items":{"$ref":"#/components/schemas/StepView"},"type":"array","title":"Steps"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"training":{"anyOf":[{"$ref":"#/components/schemas/TrainingRunSummary"},{"type":"null"}]}},"type":"object","required":["factor_assessment_id","risk_assessment_id","vendor_id","risk_factor","risk_area","ordinal","factor_count","status","progress_pct","current_activity","review_state","reviewer_name","reviewed_at","reviewer_note","suggested_rating","manual_rating","effective_rating","rationale","citation_count","distinct_document_count","assessment_guidance","rating_rubric","memo","dossier","agent_run","error","training"],"title":"FactorAssessmentDetail","description":"The single polled payload for the factor-detail screen."},"FactorAssessmentSummary":{"properties":{"factor_assessment_id":{"type":"string","format":"uuid","title":"Factor Assessment Id"},"risk_factor":{"$ref":"#/components/schemas/FactorRef"},"status":{"$ref":"#/components/schemas/RiskAssessmentFactorStatus"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"current_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Activity"},"suggested_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"manual_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"effective_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"review_state":{"$ref":"#/components/schemas/RiskFactorReviewState"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"citation_count":{"type":"integer","title":"Citation Count"},"distinct_document_count":{"type":"integer","title":"Distinct Document Count"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"}},"type":"object","required":["factor_assessment_id","risk_factor","status","progress_pct","current_activity","suggested_rating","manual_rating","effective_rating","review_state","reviewer_name","reviewed_at","citation_count","distinct_document_count","step_count","duration_ms","error","agent_run_id"],"title":"FactorAssessmentSummary","description":"One row of the run overview — no steps, no citations."},"FactorExportView":{"properties":{"factor_assessment_id":{"type":"string","format":"uuid","title":"Factor Assessment Id"},"risk_factor":{"$ref":"#/components/schemas/FactorRef"},"status":{"$ref":"#/components/schemas/RiskAssessmentFactorStatus"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"current_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Activity"},"suggested_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"manual_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"effective_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"review_state":{"$ref":"#/components/schemas/RiskFactorReviewState"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"citation_count":{"type":"integer","title":"Citation Count"},"distinct_document_count":{"type":"integer","title":"Distinct Document Count"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"risk_area_name":{"type":"string","title":"Risk Area Name"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"citations":{"items":{"$ref":"#/components/schemas/CitationView"},"type":"array","title":"Citations"}},"type":"object","required":["factor_assessment_id","risk_factor","status","progress_pct","current_activity","suggested_rating","manual_rating","effective_rating","review_state","reviewer_name","reviewed_at","citation_count","distinct_document_count","step_count","duration_ms","error","agent_run_id","risk_area_name","rationale","reviewer_note"],"title":"FactorExportView","description":"One factor as the printed export needs it: the overview row plus the\nreasoning behind it.\n\nDeliberately *not* folded into `FactorAssessmentSummary`: the rationale and\nits citations are the bulk of a factor's payload, and the run overview polls\nthat shape every few seconds for up to 60 factors (rule F-9)."},"FactorRef":{"properties":{"risk_factor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Risk Factor Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"}},"type":"object","required":["risk_factor_id","slug","name"],"title":"FactorRef"},"FailedResult":{"properties":{"status":{"type":"string","title":"Status","default":"failed"}},"type":"object","title":"FailedResult"},"FailureTotals":{"properties":{"total":{"type":"integer","title":"Total"},"failed":{"type":"integer","title":"Failed"},"failure_pct":{"type":"number","title":"Failure Pct"}},"type":"object","required":["total","failed","failure_pct"],"title":"FailureTotals","description":"Window-wide totals for the current scope (KPI cards)."},"FeedbackGroupCount":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"FeedbackGroupCount","description":"One ranked bucket from the feedback week group-by aggregate."},"FeedbackGroupDimension":{"type":"string","enum":["source_clause","short_text","ignore_comment","source_family","disclosure"],"title":"FeedbackGroupDimension","description":"Group-by dimensions for the marketing feedback week drill-down.\n\n``source_family`` is a coarse rollup derived from ``source_clause`` text\n(Marketing standards vs Regulatory) — not a stored column.\n``disclosure`` recovers a Chime DL_ID (``Disclosure CG 23`` → ``cg23``) or\nthe standards filename from a structured / legacy ``source_clause``."},"FeedbackRiskGroupsResponse":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"dimension":{"type":"string","title":"Dimension"},"total":{"type":"integer","title":"Total"},"groups":{"items":{"$ref":"#/components/schemas/FeedbackGroupCount"},"type":"array","title":"Groups"}},"type":"object","required":["week_start","dimension","total","groups"],"title":"FeedbackRiskGroupsResponse","description":"Server-side group counts over the full filtered feedback week (not just\nthe paginated list page).\n\n`dimension` is the grouping key; `groups` are ranked by count descending.\nEmpty / null values are bucketed under the literal key ``(none)``.\nFor ``dimension=disclosure``, multi-id attributions are expanded so each\nDL id gets a count (group ``total`` may exceed distinct risk rows)."},"FeedbackRiskRow":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"filename":{"type":"string","title":"Filename"},"short_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Text"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"is_outdated":{"type":"boolean","title":"Is Outdated"},"is_reviewer_added":{"type":"boolean","title":"Is Reviewer Added"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"notes_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes Text"},"run_time":{"type":"string","format":"date-time","title":"Run Time"},"is_disclosure_related":{"type":"boolean","title":"Is Disclosure Related","default":false},"disclosure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Id"}},"type":"object","required":["risk_id","run_id","file_id","company_id","company_name","filename","short_text","source_clause","severity","status","dismiss_reason","is_outdated","is_reviewer_added","ignore_comment","notes_text","run_time"],"title":"FeedbackRiskRow","description":"One risk in the feedback drill-down list for a clicked week.\n\n`status` is the reviewer's triage decision (flag/allow/reject) or None if\nunactioned; `is_outdated` = superseded by a re-run (`made_obsolete_by`);\n`is_reviewer_added` = added by a human (`created_by_user_id`), i.e. feedback\nKobalt did not capture. `ignore_comment` (non-null = the risk was ignored)\nand `notes_text` (rich-text notes flattened to plain text) back the text\nfeedback view. `source_clause` is the rule/disclosure text the analysis\ncited (often prefixed as ``{doc_type}|{filename}|{clause}`` for internal\nmarketing-standards files); `file_id` deeplinks to the analysis history view.\n`is_disclosure_related` / `disclosure_id` are set only when a real Chime\nDL attribution id was recovered (``Disclosure CG 23`` → ``cg23``;\n``Disclosure CC 17 of … and CBJ 17 of …`` → ``cc17, cbj17``) — not\nfor Marketing-standards filename / ``(unknown)`` group-by buckets.\nThe UI splits multi-id ``disclosure_id`` values into separate pills."},"FeedbackRisksResponse":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"total":{"type":"integer","title":"Total"},"disclosure_related_count":{"type":"integer","title":"Disclosure Related Count","default":0},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"rows":{"items":{"$ref":"#/components/schemas/FeedbackRiskRow"},"type":"array","title":"Rows"}},"type":"object","required":["week_start","total","limit","offset","rows"],"title":"FeedbackRisksResponse","description":"Paginated risks whose run falls in the clicked ISO week, for the feedback\nsignal & coverage drill-down.\n\n`total` is the full match count for the current filters (so the client can\npage); `disclosure_related_count` is how many of those matches cite a real\nChime DL attribution id (not filename / ``(unknown)`` — not limited to\nthe current page); `rows` is the `offset`..`offset+limit` slice."},"FeedbackSignalCoverage":{"properties":{"ai_risks":{"type":"integer","title":"Ai Risks"},"actioned":{"type":"integer","title":"Actioned"},"validated":{"type":"integer","title":"Validated"},"validated_pct":{"type":"number","title":"Validated Pct"},"flagged":{"type":"integer","title":"Flagged"},"outdated":{"type":"integer","title":"Outdated"},"allowed":{"type":"integer","title":"Allowed"},"dismissed":{"type":"integer","title":"Dismissed"},"dismiss_reasons":{"$ref":"#/components/schemas/DismissReasonBreakdown"},"over_flag_rate_pct":{"type":"number","title":"Over Flag Rate Pct"},"outdated_share_pct":{"type":"number","title":"Outdated Share Pct"},"all_risks":{"type":"integer","title":"All Risks"},"uncaptured":{"type":"integer","title":"Uncaptured"},"coverage_gap_pct":{"type":"number","title":"Coverage Gap Pct"}},"type":"object","required":["ai_risks","actioned","validated","validated_pct","flagged","outdated","allowed","dismissed","dismiss_reasons","over_flag_rate_pct","outdated_share_pct","all_risks","uncaptured","coverage_gap_pct"],"title":"FeedbackSignalCoverage","description":"Feedback signal & coverage for the current scope — a lens on Kobalt's\nown risk output, distinct from the review-quality funnel above.\n\n\"Validated\"/\"actioned\"/\"outdated\" are measured over Kobalt-generated risks\nonly (`created_by_user_id IS NULL`); the coverage gap is measured over all\nrisks so it captures reviewer-added feedback Kobalt missed.\n\n- `actioned` = Kobalt risks a reviewer dispositioned: `status` set\n  (flagged/allowed/dismissed) OR outdated (`made_obsolete_by NOT NULL`).\n- `flagged` / `allowed` / `dismissed` / `outdated` partition `actioned`\n  (they sum to it): outdated takes precedence, so `flagged`/`allowed`/\n  `dismissed` are that status AND *not* outdated, and `outdated` is every\n  outdated risk regardless of status.\n- `validated` = flagged + outdated; `validated_pct = validated / actioned`\n  — of the risks a reviewer acted on, the share kept as valid.\n- `outdated_share_pct = outdated / validated` — of validated feedback, the\n  share that was outdated rather than flagged.\n- `uncaptured` = reviewer-added risks (`created_by_user_id NOT NULL`);\n  `coverage_gap_pct = uncaptured / all_risks` — feedback Kobalt did not\n  capture.\n\nSo `flagged + allowed + dismissed + outdated == actioned`,\n`validated == flagged + outdated`, `outdated <= validated <= actioned <=\nai_risks`, and `ai_risks + uncaptured == all_risks`.\n\n`dismiss_reasons` splits `dismissed` by reviewer-stated reason (a derived\nclassification, no schema change); `over_flag_rate_pct = over_flagged /\nactioned` — the share of dispositioned risks the reviewer marked as an\nover-flag (false positive)."},"Field":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"value":{"anyOf":[{"$ref":"#/components/schemas/FieldValueText"},{"$ref":"#/components/schemas/FieldValueDate"},{"$ref":"#/components/schemas/FieldValueNumber"},{"$ref":"#/components/schemas/FieldValueMoney"},{"$ref":"#/components/schemas/FieldValueYesNo"},{"$ref":"#/components/schemas/FieldValueList"},{"$ref":"#/components/schemas/FieldValueMultiline"}],"title":"Value"},"citations":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__field_groups__Citation"},"type":"array","title":"Citations","default":[]}},"type":"object","required":["id","label","value"],"title":"Field"},"FieldDiff":{"properties":{"field_name":{"type":"string","title":"Field Name"},"before":{"title":"Before"},"after":{"title":"After"}},"type":"object","required":["field_name"],"title":"FieldDiff","description":"A single field change: what it was (before) and what it will become (after)."},"FieldGroup":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"fields":{"items":{"$ref":"#/components/schemas/Field"},"type":"array","title":"Fields"}},"type":"object","required":["id","label","fields"],"title":"FieldGroup"},"FieldValueDate":{"properties":{"kind":{"type":"string","const":"date","title":"Kind"},"value":{"type":"string","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueDate"},"FieldValueList":{"properties":{"kind":{"type":"string","const":"list","title":"Kind"},"value":{"items":{"type":"string"},"type":"array","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueList"},"FieldValueMoney":{"properties":{"kind":{"type":"string","const":"money","title":"Kind"},"value":{"type":"string","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueMoney"},"FieldValueMultiline":{"properties":{"kind":{"type":"string","const":"multiline","title":"Kind"},"value":{"type":"string","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueMultiline"},"FieldValueNumber":{"properties":{"kind":{"type":"string","const":"number","title":"Kind"},"value":{"type":"number","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueNumber"},"FieldValueText":{"properties":{"kind":{"type":"string","const":"text","title":"Kind"},"value":{"type":"string","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueText"},"FieldValueYesNo":{"properties":{"kind":{"type":"string","const":"yesno","title":"Kind"},"value":{"type":"boolean","title":"Value"}},"type":"object","required":["kind","value"],"title":"FieldValueYesNo"},"FigmaConnectionStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"figma_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Figma Email"},"needs_reconnect":{"type":"boolean","title":"Needs Reconnect","default":false},"missing_scopes":{"items":{"type":"string"},"type":"array","title":"Missing Scopes"}},"type":"object","required":["connected"],"title":"FigmaConnectionStatus","description":"Whether the current user has a usable Figma OAuth connection."},"FileDownloadUrls":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"pdf_exists":{"type":"boolean","title":"Pdf Exists"}},"type":"object","required":["upload_id","file_url","pdf_url","pdf_exists"],"title":"FileDownloadUrls"},"FileEventResponse":{"properties":{"actor":{"type":"string","title":"Actor"},"actor_type":{"type":"string","enum":["internal","vendor","unknown"],"title":"Actor Type"},"event_type":{"$ref":"#/components/schemas/FileEventType"},"filename":{"type":"string","title":"Filename"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["actor","actor_type","event_type","filename","timestamp"],"title":"FileEventResponse","description":"Represents a single file event with actor information."},"FileEventType":{"type":"string","enum":["file_created","version_uploaded"],"title":"FileEventType"},"FileHealthItem":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"status":{"$ref":"#/components/schemas/UploadedFileStatus"},"embed_state":{"anyOf":[{"$ref":"#/components/schemas/EmbedState"},{"type":"null"}]},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"},"minutes_since_uploaded":{"type":"integer","title":"Minutes Since Uploaded"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"ocr_confidence":{"anyOf":[{"$ref":"#/components/schemas/OcrConfidence"},{"type":"null"}]}},"type":"object","required":["upload_id","file_id","filename","company_id","company_name","status","embed_state","uploaded_at","minutes_since_uploaded","reasons","ocr_confidence"],"title":"FileHealthItem"},"FileTypeClassification":{"properties":{"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion"},"options":{"items":{"type":"string"},"type":"array","title":"Options"}},"type":"object","required":["suggestion","options"],"title":"FileTypeClassification"},"FileUploadResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileUploadResult"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"FileUploadResponse"},"FileUploadResult":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"}},"type":"object","required":["file_id","upload_id"],"title":"FileUploadResult"},"FileVersions":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"created":{"type":"string","format":"date-time","title":"Created"},"review_status":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}]},"aws_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Key"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/UploadedFileStatus"},{"type":"null"}]},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"transcript_from_video":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript From Video"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["upload_id","file_id","filename","created"],"title":"FileVersions"},"Files":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"file_type":{"type":"string"},"filename":{"type":"string","title":"Filename"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"created":{"type":"string","format":"date-time","title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"aws_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Key"},"num_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Pages"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"document_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Request Id"},"uploaded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uploaded By"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"has_risks":{"type":"boolean","title":"Has Risks","default":false},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"transcript_from_video":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript From Video"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"}},"type":"object","required":["file_id","file_type","filename","created"],"title":"Files"},"FilesByIdsRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"FilesByIdsRequest"},"FilesHealthResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileHealthItem"},"type":"array","title":"Items"},"processing_age_minutes":{"type":"integer","title":"Processing Age Minutes"}},"type":"object","required":["items","processing_age_minutes"],"title":"FilesHealthResponse"},"FlaggedFinding":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"severity":{"type":"string","title":"Severity"},"risk_type":{"type":"string","title":"Risk Type"},"title":{"type":"string","title":"Title"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"collateral":{"type":"string","title":"Collateral"},"date":{"type":"string","format":"date-time","title":"Date"},"assigned_reviewer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Reviewer"}},"type":"object","required":["risk_id","file_id","severity","risk_type","title","excerpt","source_clause","collateral","date","assigned_reviewer"],"title":"FlaggedFinding","description":"One flagged ignore: a risk the uploader ignored that a reviewer flagged\nanyway. Backs the uploader's \"Flagged ignores\" stat."},"FlattenedDraftingSectionV2":{"properties":{"section_name":{"type":"string","title":"Section Name"},"children":{"items":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}]},"type":"array","title":"Children"}},"type":"object","required":["section_name","children"],"title":"FlattenedDraftingSectionV2"},"Form":{"properties":{"form_id":{"type":"string","format":"uuid","title":"Form Id"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"form_name":{"type":"string","title":"Form Name"},"created":{"type":"string","format":"date-time","title":"Created"},"template":{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array","title":"Template","default":[]},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"responses":{"items":{"$ref":"#/components/schemas/FormRequestResponse"},"type":"array","title":"Responses"}},"type":"object","required":["form_id","template_id","template_name","form_name","created","requesting_company_id","responses"],"title":"Form"},"FormAnswer-Input":{"properties":{"question_id":{"type":"string","title":"Question Id"},"answers":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChoiceAnswer-Input"},"type":"array"},{"prefixItems":[{"$ref":"#/components/schemas/FreeAnswer-Input"}],"type":"array","maxItems":1,"minItems":1}],"title":"Answers"}},"type":"object","required":["question_id","answers"],"title":"FormAnswer"},"FormAnswer-Output":{"properties":{"question_id":{"type":"string","title":"Question Id"},"answers":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChoiceAnswer-Output"},"type":"array"},{"prefixItems":[{"$ref":"#/components/schemas/FreeAnswer-Output"}],"type":"array","maxItems":1,"minItems":1}],"title":"Answers"}},"type":"object","required":["question_id","answers"],"title":"FormAnswer"},"FormRequestRecipient":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","first_name","last_name"],"title":"FormRequestRecipient"},"FormRequestResponse":{"properties":{"response_id":{"type":"string","format":"uuid","title":"Response Id"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"status":{"$ref":"#/components/schemas/FormRequestStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"submitted":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted"},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"user":{"anyOf":[{"$ref":"#/components/schemas/FormRequestee"},{"type":"null"}]},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"last_reminder_sent":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reminder Sent"},"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Output"},"type":"array","title":"Response","default":[]},"question_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Question Ids"},"changes_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changes Requested At"},"changes_requested_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes Requested By Name"},"changes_requested_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes Requested Notes"}},"type":"object","required":["response_id","due_date","status","created","question_ids"],"title":"FormRequestResponse"},"FormRequestStatus":{"type":"string","enum":["WAITING_FOR_RESPONSE","SUBMITTED","CANCELED"],"title":"FormRequestStatus"},"FormRequestee":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","name","email"],"title":"FormRequestee"},"FormResponseVersionResponse":{"properties":{"version_id":{"type":"string","format":"uuid","title":"Version Id"},"form_response_id":{"type":"string","format":"uuid","title":"Form Response Id"},"edited_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Edited By"},"edited_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited By Name"},"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Output"},"type":"array","title":"Response","default":[]},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"}},"type":"object","required":["version_id","form_response_id"],"title":"FormResponseVersionResponse","description":"One authored version of an IRA response's answers (reviewer-only)."},"FrameworkDetailResponse":{"properties":{"framework_id":{"type":"string","format":"uuid","title":"Framework Id"},"name":{"type":"string","title":"Name"},"year":{"type":"integer","title":"Year"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","title":"Status"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation"},"issuing_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuing Body"},"requirements":{"items":{"$ref":"#/components/schemas/FrameworkRequirementResponse"},"type":"array","title":"Requirements"}},"type":"object","required":["framework_id","name","year","version","status"],"title":"FrameworkDetailResponse"},"FrameworkRequirementResponse":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"path":{"type":"string","title":"Path"},"depth":{"type":"integer","title":"Depth"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"requirement_type":{"type":"string","title":"Requirement Type"},"verbatim_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verbatim Text"},"llm_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Guidelines"},"applies_to_doc_types":{"items":{"type":"string"},"type":"array","title":"Applies To Doc Types"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"}},"type":"object","required":["requirement_id","path","depth","requirement_type"],"title":"FrameworkRequirementResponse"},"FrameworkResponse":{"properties":{"framework_id":{"type":"string","format":"uuid","title":"Framework Id"},"name":{"type":"string","title":"Name"},"year":{"type":"integer","title":"Year"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","title":"Status"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"citation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation"},"issuing_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuing Body"}},"type":"object","required":["framework_id","name","year","version","status"],"title":"FrameworkResponse"},"FrameworksListResponse":{"properties":{"frameworks":{"items":{"$ref":"#/components/schemas/FrameworkResponse"},"type":"array","title":"Frameworks"}},"type":"object","title":"FrameworksListResponse"},"FreeAnswer-Input":{"properties":{"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/Citation-Input"},"type":"array","title":"Citations"}},"type":"object","required":["answer","citations"],"title":"FreeAnswer"},"FreeAnswer-Output":{"properties":{"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/backend__models__pydantic__drafting__Citation"},"type":"array","title":"Citations"}},"type":"object","required":["answer","citations"],"title":"FreeAnswer"},"FreeResponseQuestion":{"properties":{"question":{"type":"string","title":"Question"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context"},"score_compliance":{"type":"boolean","title":"Score Compliance","default":false},"question_id":{"type":"string","title":"Question Id"},"type":{"type":"string","const":"free","title":"Type","default":"free"}},"type":"object","required":["question","question_id"],"title":"FreeResponseQuestion"},"FundingInformation":{"properties":{"investment_received":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investment Received"},"backed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backed By"}},"type":"object","title":"FundingInformation"},"GenerateDisclosuresResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/GeneratedDocumentResponse"},"type":"array","title":"Documents"},"skipped_sheets":{"items":{"$ref":"#/components/schemas/SkippedSheetInfo"},"type":"array","title":"Skipped Sheets","default":[]},"archived_counts":{"items":{"$ref":"#/components/schemas/ArchivedCountInfo"},"type":"array","title":"Archived Counts","default":[]},"unknown_approaches":{"items":{"type":"string"},"type":"array","title":"Unknown Approaches","default":[]},"debug":{"anyOf":[{"$ref":"#/components/schemas/DisclosureGenerationDebug"},{"type":"null"}]},"library_sync":{"anyOf":[{"$ref":"#/components/schemas/LibrarySyncResult"},{"type":"null"}]}},"type":"object","required":["documents"],"title":"GenerateDisclosuresResponse"},"GenerateFromReportingTaskResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"}},"type":"object","required":["agent_run_id","task_id"],"title":"GenerateFromReportingTaskResponse"},"GeneratedDocumentResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"download_url":{"type":"string","title":"Download Url"},"s3_key":{"type":"string","title":"S3 Key"},"matched_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched File Id"},"matched_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Filename"},"matched_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Upload Id"},"used_in_presets":{"items":{"type":"string"},"type":"array","title":"Used In Presets","default":[]}},"type":"object","required":["filename","download_url","s3_key"],"title":"GeneratedDocumentResponse"},"GenericBatchAnalysisRequest_DraftingAnalysisRequest_":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/DraftingAnalysisRequest"},"type":"array","title":"Requests"}},"type":"object","required":["requests"],"title":"GenericBatchAnalysisRequest[DraftingAnalysisRequest]"},"GetPagedAgentRunsResponse":{"properties":{"agent_runs":{"items":{"$ref":"#/components/schemas/AgentRunListItem"},"type":"array","title":"Agent Runs"},"total_count":{"type":"integer","title":"Total Count"},"companies_with_agent_runs":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Companies With Agent Runs"}},"type":"object","required":["agent_runs","total_count","companies_with_agent_runs"],"title":"GetPagedAgentRunsResponse"},"GetVendorsResponse":{"properties":{"inherent_risk_level":{"anyOf":[{"$ref":"#/components/schemas/RiskLevelField"},{"type":"null"}]},"residual_risk_level":{"anyOf":[{"$ref":"#/components/schemas/ResidualRiskLevelField"},{"type":"null"}]},"criticality":{"anyOf":[{"$ref":"#/components/schemas/CriticalityField"},{"type":"null"}]},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/EntityType"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/VendorStatus"},"is_restricted":{"type":"boolean","title":"Is Restricted","default":false},"next_review_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review Date"},"pci_compliant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pci Compliant"},"soc_compliance":{"anyOf":[{"$ref":"#/components/schemas/VendorSOCCompliance"},{"type":"null"}]},"year_of_incorporation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Of Incorporation"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"company_website":{"type":"string","title":"Company Website"},"disabled":{"type":"boolean","title":"Disabled"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"assignments":{"items":{"$ref":"#/components/schemas/VendorAssignmentResponse"},"type":"array","title":"Assignments"},"subcontractors":{"items":{"$ref":"#/components/schemas/VendorSubcontractorResponse"},"type":"array","title":"Subcontractors"},"services":{"items":{"$ref":"#/components/schemas/VendorServiceResponse"},"type":"array","title":"Services"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values"}},"type":"object","required":["status","company_id","company_name","company_website","disabled"],"title":"GetVendorsResponse"},"GroundedSpan":{"properties":{"page_number":{"type":"integer","title":"Page Number"},"boxes":{"items":{"$ref":"#/components/schemas/BoundingBox"},"type":"array","title":"Boxes","default":[]},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Text"},"matched_terms":{"items":{"type":"string"},"type":"array","title":"Matched Terms","default":[]},"score":{"type":"number","title":"Score","default":0.0},"basis":{"type":"string","title":"Basis","default":"none"},"cited_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cited Page"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"}},"type":"object","required":["page_number"],"title":"GroundedSpan","description":"Where a requirement appears to have come from, and how much to trust it."},"GuidelineDetailResponse":{"properties":{"guideline":{"$ref":"#/components/schemas/GuidelineSummary"},"requirements":{"items":{"$ref":"#/components/schemas/GuidelineRequirementResponse"},"type":"array","title":"Requirements"},"superseded_with_human_edits":{"type":"integer","title":"Superseded With Human Edits"}},"type":"object","required":["guideline","requirements","superseded_with_human_edits"],"title":"GuidelineDetailResponse"},"GuidelineReadiness":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"status":{"anyOf":[{"$ref":"#/components/schemas/DecompositionStatus"},{"type":"null"}]},"stage":{"anyOf":[{"$ref":"#/components/schemas/DecompositionStage"},{"type":"null"}]},"requirements":{"type":"integer","title":"Requirements"},"has_library":{"type":"boolean","title":"Has Library"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["file_id","filename","status","stage","requirements","has_library","error"],"title":"GuidelineReadiness","description":"One guideline this collateral's product lines put on it, and whether it has a library yet."},"GuidelineRequirementResponse":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"decomposition_id":{"type":"string","format":"uuid","title":"Decomposition Id"},"ordinal":{"type":"integer","title":"Ordinal"},"revision_number":{"type":"integer","title":"Revision Number"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"source_collateral_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Collateral Terms"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"},"unresolved_collateral_terms":{"items":{"type":"string"},"type":"array","title":"Unresolved Collateral Terms"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"citation":{"anyOf":[{"$ref":"#/components/schemas/GroundedSpan"},{"type":"null"}]},"change_kind":{"$ref":"#/components/schemas/RequirementChangeKind"},"change_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Note"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Email"},"has_human_edits":{"type":"boolean","title":"Has Human Edits"},"signal":{"anyOf":[{"$ref":"#/components/schemas/RequirementSignal"},{"type":"null"}]},"downvotes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Downvotes"}},"type":"object","required":["requirement_id","file_id","filename","decomposition_id","ordinal","revision_number","state","requirement_text","judging_guidance","collateral_types","marketing_team_ids","source_collateral_terms","trigger_terms","unresolved_collateral_terms","section_label","title","source_page","citation","change_kind","change_note","updated_at","updated_by_email","has_human_edits"],"title":"GuidelineRequirementResponse"},"GuidelineRequirementState":{"type":"string","enum":["active","disabled","archived","superseded"],"title":"GuidelineRequirementState","description":"Whether a requirement is in the working library, and if not, why not.\n\nAll four are recorded as revisions, so every one of them is reversible and readable.\n\nARCHIVED and SUPERSEDED are deliberately distinct: ARCHIVED is a person deciding this obligation\ndoes not apply to them, SUPERSEDED is a newer decomposition of the same guideline taking over. A\nregeneration must never overwrite the first with the second — that would erase a human decision."},"GuidelineSummary":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"newer_version_processing":{"type":"boolean","title":"Newer Version Processing"},"active_requirement_count":{"type":"integer","title":"Active Requirement Count"},"total_requirement_count":{"type":"integer","title":"Total Requirement Count"},"needs_requirements":{"type":"boolean","title":"Needs Requirements"},"stale":{"type":"boolean","title":"Stale"},"latest_decomposition":{"anyOf":[{"$ref":"#/components/schemas/DecompositionSummary"},{"type":"null"}]}},"type":"object","required":["file_id","filename","upload_id","newer_version_processing","active_requirement_count","total_requirement_count","needs_requirements","stale","latest_decomposition"],"title":"GuidelineSummary","description":"A marketing standards document and the state of its requirement library."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthFileStack":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"document_type":{"type":"string","title":"Document Type"},"document_type_label":{"type":"string","title":"Document Type Label"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"versions":{"items":{"$ref":"#/components/schemas/HealthFileVersion"},"type":"array","title":"Versions"}},"type":"object","required":["file_id","document_type","document_type_label","versions"],"title":"HealthFileStack"},"HealthFileVersion":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"type":"string","title":"Filename"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"},"uploaded_by":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"processing_status":{"anyOf":[{"$ref":"#/components/schemas/UploadedFileStatus"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"smart_document_type":{"anyOf":[{"$ref":"#/components/schemas/SmartDocumentType"},{"type":"null"}]},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"requirements_processing":{"type":"boolean","title":"Requirements Processing","default":false},"requirements_worst_compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"regulatory_review_processing":{"type":"boolean","title":"Regulatory Review Processing","default":false},"regulatory_review_worst_severity":{"anyOf":[{"$ref":"#/components/schemas/RiskSeverity"},{"type":"null"}]},"field_groups":{"items":{"$ref":"#/components/schemas/FieldGroup"},"type":"array","title":"Field Groups","default":[]}},"type":"object","required":["upload_id","filename","uploaded_at"],"title":"HealthFileVersion"},"HealthFolder":{"properties":{"folder_id":{"type":"string","format":"uuid","title":"Folder Id"},"folder_name":{"type":"string","title":"Folder Name"}},"type":"object","required":["folder_id","folder_name"],"title":"HealthFolder"},"ImportCommitResponse":{"properties":{"create":{"type":"integer","title":"Create","default":0},"update":{"type":"integer","title":"Update","default":0},"archive":{"type":"integer","title":"Archive","default":0},"reactivate":{"type":"integer","title":"Reactivate","default":0},"unchanged":{"type":"integer","title":"Unchanged","default":0},"warnings":{"items":{"$ref":"#/components/schemas/ImportIssue"},"type":"array","title":"Warnings","default":[]}},"type":"object","title":"ImportCommitResponse"},"ImportIssue":{"properties":{"sheet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet"},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ImportIssue","description":"A non-blocking problem: a skipped sheet or a skipped/ambiguous row. The\nimport still applies every clean row; issues are surfaced, not fatal."},"ImportPreviewResponse":{"properties":{"create":{"type":"integer","title":"Create","default":0},"update":{"type":"integer","title":"Update","default":0},"archive":{"type":"integer","title":"Archive","default":0},"reactivate":{"type":"integer","title":"Reactivate","default":0},"unchanged":{"type":"integer","title":"Unchanged","default":0},"would_archive_count":{"type":"integer","title":"Would Archive Count","default":0},"guardrail_tripped":{"type":"boolean","title":"Guardrail Tripped","default":false},"rows":{"items":{"$ref":"#/components/schemas/ImportRowDiff"},"type":"array","title":"Rows","default":[]},"warnings":{"items":{"$ref":"#/components/schemas/ImportIssue"},"type":"array","title":"Warnings","default":[]}},"type":"object","title":"ImportPreviewResponse"},"ImportRowDiff":{"properties":{"source_dl_id":{"type":"string","title":"Source Dl Id"},"trigger":{"type":"string","title":"Trigger"},"action":{"$ref":"#/components/schemas/ReconcileAction"},"changes":{"items":{"$ref":"#/components/schemas/DisclosureFieldChange"},"type":"array","title":"Changes","default":[]}},"type":"object","required":["source_dl_id","trigger","action"],"title":"ImportRowDiff","description":"One disclosure's fate in a reconcile plan, for the preview UI."},"IngestFromInternalRequest":{"properties":{"upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Upload Ids"}},"type":"object","required":["upload_ids"],"title":"IngestFromInternalRequest","description":"Create frameworks by extracting requirements from internal policy uploads."},"InherentRiskAssessmentResult":{"properties":{"version":{"type":"integer","title":"Version"},"suggested_risk_level":{"anyOf":[{"$ref":"#/components/schemas/RiskLevelField"},{"type":"null"}]},"rationale":{"type":"string","title":"Rationale"},"form_request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Request Id"},"form_response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Response Id"},"service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Id"}},"type":"object","required":["version","suggested_risk_level","rationale"],"title":"InherentRiskAssessmentResult"},"IntakeInfoResponse":{"properties":{"company_name":{"type":"string","title":"Company Name"},"template_name":{"type":"string","title":"Template Name"}},"type":"object","required":["company_name","template_name"],"title":"IntakeInfoResponse"},"IntakeResponse":{"properties":{"company_name":{"type":"string","title":"Company Name"},"template_name":{"type":"string","title":"Template Name"},"template":{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array","title":"Template"}},"type":"object","required":["company_name","template_name","template"],"title":"IntakeResponse"},"IntakeReviewer":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","name","email"],"title":"IntakeReviewer"},"IntakeSubmissionDetail":{"properties":{"intake_submission_id":{"type":"string","format":"uuid","title":"Intake Submission Id"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"original_template_id":{"type":"string","format":"uuid","title":"Original Template Id"},"template_name":{"type":"string","title":"Template Name"},"submitter_email":{"type":"string","title":"Submitter Email"},"status":{"$ref":"#/components/schemas/IntakeSubmissionStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewed_by":{"anyOf":[{"$ref":"#/components/schemas/IntakeReviewer"},{"type":"null"}]},"template_snapshot":{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array","title":"Template Snapshot"},"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Output"},"type":"array","title":"Response"},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Company Website"},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Name"}},"type":"object","required":["intake_submission_id","template_id","original_template_id","template_name","submitter_email","status","created","reviewed_at","reviewed_by","template_snapshot","response"],"title":"IntakeSubmissionDetail"},"IntakeSubmissionStatus":{"type":"string","enum":["PENDING","REVIEWED","REJECTED","OUT_OF_SCOPE"],"title":"IntakeSubmissionStatus"},"IntakeSubmissionSummary":{"properties":{"intake_submission_id":{"type":"string","format":"uuid","title":"Intake Submission Id"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"original_template_id":{"type":"string","format":"uuid","title":"Original Template Id"},"template_name":{"type":"string","title":"Template Name"},"submitter_email":{"type":"string","title":"Submitter Email"},"status":{"$ref":"#/components/schemas/IntakeSubmissionStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewed_by":{"anyOf":[{"$ref":"#/components/schemas/IntakeReviewer"},{"type":"null"}]},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Company Website"},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Name"}},"type":"object","required":["intake_submission_id","template_id","original_template_id","template_name","submitter_email","status","created","reviewed_at"],"title":"IntakeSubmissionSummary"},"IntakeSubmitRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Input"},"type":"array","title":"Response"}},"type":"object","required":["email","response"],"title":"IntakeSubmitRequest"},"IntakeSubmitResponse":{"properties":{"intake_submission_id":{"type":"string","format":"uuid","title":"Intake Submission Id"}},"type":"object","required":["intake_submission_id"],"title":"IntakeSubmitResponse"},"IntakeTemplateOption":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["template_id","name"],"title":"IntakeTemplateOption","description":"Minimal intake-template identity for opening the public intake form."},"IntakeTemplateSummary":{"properties":{"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"original_template_id":{"type":"string","format":"uuid","title":"Original Template Id"},"name":{"type":"string","title":"Name"},"pending_count":{"type":"integer","title":"Pending Count"},"reviewed_count":{"type":"integer","title":"Reviewed Count"},"rejected_count":{"type":"integer","title":"Rejected Count"},"out_of_scope_count":{"type":"integer","title":"Out Of Scope Count"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["template_id","original_template_id","name","pending_count","reviewed_count","rejected_count","out_of_scope_count","total_count"],"title":"IntakeTemplateSummary"},"IntakeValidateEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"IntakeValidateEmailRequest"},"InternalReviewListItem":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"vendor_company_name":{"type":"string","title":"Vendor Company Name"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"anyOf":[{"$ref":"#/components/schemas/ReviewStage"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ServiceReviewStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["review_id","vendor_company_id","vendor_company_name","review_type","status","started_at"],"title":"InternalReviewListItem"},"IraAssigneeActor":{"properties":{"kind":{"type":"string","const":"ira_assignee","title":"Kind","default":"ira_assignee"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"outstanding_since":{"type":"string","format":"date-time","title":"Outstanding Since"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"overdue":{"type":"boolean","title":"Overdue"}},"type":"object","required":["email","outstanding_since","overdue"],"title":"IraAssigneeActor","description":"The IRA form is assigned to someone else, who we're still waiting on."},"IraStageDetail":{"properties":{"kind":{"type":"string","const":"inherent_risk_assessment","title":"Kind","default":"inherent_risk_assessment"},"state":{"type":"string","enum":["complete","overdue","due","outstanding","not_sent"],"title":"State"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"outstanding_count":{"type":"integer","title":"Outstanding Count","default":0}},"type":"object","required":["state"],"title":"IraStageDetail","description":"Where the inherent risk assessment questionnaires stand, across the\nreview's services.\n\n``state`` is the worst of the per-service states and ``due_date`` the soonest\ndeadline carrying it, so the row measures the questionnaire that most needs\nattention rather than averaging several into something true of none."},"IssueAnalytics":{"properties":{"issues_by_status":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Issues By Status"},"issues_by_severity":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Issues By Severity"},"issues_by_company":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Issues By Company"},"issues_by_assignee":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Issues By Assignee"}},"type":"object","required":["issues_by_status","issues_by_severity","issues_by_company","issues_by_assignee"],"title":"IssueAnalytics"},"IssueDueBucket":{"type":"string","enum":["overdue","upcoming","open","resolved"],"title":"IssueDueBucket","description":"Where an issue sits against its due date.\n\nBuckets are exclusive and cover every issue: a resolved issue is RESOLVED\nwhatever its due date, and an unresolved one is OVERDUE (due before today),\nUPCOMING (due within UPCOMING_ISSUE_WINDOW_DAYS), or OPEN — which is both\n\"no due date set\" and \"due further out than the window\"."},"IssueListItemResponse":{"properties":{"issue_id":{"type":"string","format":"uuid","title":"Issue Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"created":{"type":"string","format":"date-time","title":"Created"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"assignee":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"resolved_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"source_requirement":{"anyOf":[{"$ref":"#/components/schemas/SourceRequirement"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"}},"type":"object","required":["issue_id","short_text","severity","created","resolved"],"title":"IssueListItemResponse"},"IssueUser":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["user_id","first_name","last_name"],"title":"IssueUser"},"KeyDateContractSummary":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["contract_id","title"],"title":"KeyDateContractSummary"},"KeyDateMutationResponse":{"properties":{"key_date_id":{"type":"string","format":"uuid","title":"Key Date Id"},"status":{"$ref":"#/components/schemas/KeyDateStatus"},"message":{"type":"string","title":"Message","default":"ok"}},"type":"object","required":["key_date_id","status"],"title":"KeyDateMutationResponse"},"KeyDateNotification":{"properties":{"notification_id":{"type":"string","format":"uuid","title":"Notification Id"},"lead_days":{"type":"integer","title":"Lead Days"},"scheduled_for":{"type":"string","format":"date","title":"Scheduled For"}},"type":"object","required":["notification_id","lead_days","scheduled_for"],"title":"KeyDateNotification"},"KeyDateReminderSchedule":{"properties":{"occurrence_year":{"type":"integer","title":"Occurrence Year"},"lead_days":{"items":{"type":"integer"},"type":"array","title":"Lead Days"},"sent_lead_days":{"items":{"type":"integer"},"type":"array","title":"Sent Lead Days"},"next_scheduled_for":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Scheduled For"}},"type":"object","required":["occurrence_year","lead_days","sent_lead_days"],"title":"KeyDateReminderSchedule","description":"The reminder cadence for a key date's *next* occurrence, sent reminders\nincluded.\n\n``KeyDateRow.notifications`` deliberately carries only unsent rows, so once\nthe first reminder of a cadence has gone out it can no longer describe the\nconfigured cadence (\"90, 60 & 30 days before\") or say how far through it we\nare. This can, without changing ``notifications`` — the reminder editor\nprefills from that list and ``POST /{id}/notifications`` only creates rows\nthat don't exist yet, so widening it to include sent offsets would make the\neditor propose duplicates of reminders that already went out.\n\nPopulated by ``attach_reminder_schedules`` in ``backend.helpers.key_dates``;\nunset by default because building it requires an extra query."},"KeyDateRow":{"properties":{"key_date_id":{"type":"string","format":"uuid","title":"Key Date Id"},"vendor_company_name":{"type":"string","title":"Vendor Company Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"source_type":{"anyOf":[{"$ref":"#/components/schemas/KeyDateSourceType"},{"type":"null"}]},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"status":{"$ref":"#/components/schemas/KeyDateStatus","default":"active"},"replaces_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replaces Key Date Id"},"key_date_type":{"$ref":"#/components/schemas/KeyDateType"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"month":{"type":"integer","title":"Month"},"day":{"type":"integer","title":"Day"},"first_year":{"type":"integer","title":"First Year"},"interval_years":{"type":"integer","title":"Interval Years"},"active":{"type":"boolean","title":"Active"},"contract_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Filename"},"contract":{"anyOf":[{"$ref":"#/components/schemas/KeyDateContractSummary"},{"type":"null"}]},"services":{"items":{"$ref":"#/components/schemas/KeyDateServiceSummary"},"type":"array","title":"Services","default":[]},"assignments":{"items":{"$ref":"#/components/schemas/VendorAssignmentResponse"},"type":"array","title":"Assignments","default":[]},"notifications":{"items":{"$ref":"#/components/schemas/KeyDateNotification"},"type":"array","title":"Notifications","default":[]},"next_occurrence_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Occurrence Date"},"reminder_schedule":{"anyOf":[{"$ref":"#/components/schemas/KeyDateReminderSchedule"},{"type":"null"}]}},"type":"object","required":["key_date_id","vendor_company_name","vendor_id","key_date_type","month","day","first_year","interval_years","active"],"title":"KeyDateRow"},"KeyDateServiceSummary":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["service_id","name"],"title":"KeyDateServiceSummary"},"KeyDateSourceType":{"type":"string","enum":["run","contract","review"],"title":"KeyDateSourceType","description":"What kind of entity a key date was derived from.\n\nGeneralizes the historical ``run_id`` linkage so a key date can point at a\ncontract-analysis run or a formal contract entity."},"KeyDateStatus":{"type":"string","enum":["proposed","active","superseded"],"title":"KeyDateStatus","description":"Lifecycle of a key date.\n\nDistinct from the ``AnnualKeyDates.active`` boolean, which only toggles\nnotifications on an already-real key date. An ``ACTIVE``-status key date may\nstill have ``active=False`` notifications."},"KeyDateType":{"type":"string","enum":["termination_notice","renewal","review","other"],"title":"KeyDateType"},"LabelValue":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"number","title":"Value"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["label","value"],"title":"LabelValue"},"LibrarySyncResult":{"properties":{"synced":{"type":"boolean","title":"Synced"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"create":{"type":"integer","title":"Create","default":0},"update":{"type":"integer","title":"Update","default":0},"archive":{"type":"integer","title":"Archive","default":0},"reactivate":{"type":"integer","title":"Reactivate","default":0},"unchanged":{"type":"integer","title":"Unchanged","default":0}},"type":"object","required":["synced"],"title":"LibrarySyncResult"},"LinkContractServicesRequest":{"properties":{"service_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Service Ids"}},"type":"object","required":["service_ids"],"title":"LinkContractServicesRequest"},"LinkExistingFilesBody":{"properties":{"upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Upload Ids"}},"type":"object","required":["upload_ids"],"title":"LinkExistingFilesBody"},"LinkedContractSummary":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/ContractStatus"}},"type":"object","required":["contract_id","title","status"],"title":"LinkedContractSummary"},"LogRequest":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"LogRequest"},"LogicBlockResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"LogicBlock","title":"Kind","default":"LogicBlock"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/LogicBlockSpec"}},"type":"object","required":["metadata","spec"],"title":"LogicBlockResourceResponse","description":"GET/list response for a LogicBlock resource (includes annotations)."},"LogicBlockSpec":{"properties":{"soft_logic":{"type":"string","title":"Soft Logic"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["soft_logic"],"title":"LogicBlockSpec"},"LoginProviderRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"LoginProviderRequest"},"LoginProviderResponse":{"properties":{"provider":{"anyOf":[{"$ref":"#/components/schemas/LoginProviderType"},{"type":"null"}]}},"type":"object","required":["provider"],"title":"LoginProviderResponse"},"LoginProviderType":{"type":"string","enum":["google","microsoft","saml","supertokens_saml"],"title":"LoginProviderType"},"LowSignalKind":{"type":"string","enum":["never_fires","always_fires","never_resolvable"],"title":"LowSignalKind","description":"Why a requirement told the sweep nothing.\n\nA rule that lands the same way on every piece of collateral cannot separate compliant work from\nnon-compliant work, whichever way it lands — but the three reasons want three different fixes,\nso they are not one \"useless\" bucket."},"LowSignalRule":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"state":{"anyOf":[{"$ref":"#/components/schemas/GuidelineRequirementState"},{"type":"null"}]},"kind":{"$ref":"#/components/schemas/LowSignalKind"},"checked":{"type":"integer","title":"Checked"},"passed":{"type":"integer","title":"Passed"},"failed":{"type":"integer","title":"Failed"},"not_determined":{"type":"integer","title":"Not Determined"},"collateral_count":{"type":"integer","title":"Collateral Count"}},"type":"object","required":["requirement_id","guideline_file_id","guideline_filename","requirement_text","state","kind","checked","passed","failed","not_determined","collateral_count"],"title":"LowSignalRule","description":"One requirement that landed the same way on every piece of collateral in the sweep.\n\nCounted over **both** trial runs, so a rule that disagreed with itself is mixed rather than\nlow-signal and stays out of here — that rule belongs in the drift worklist, which is about\ninstability, while this list is about rules that are perfectly stable and still say nothing."},"MainResult":{"properties":{"clauses":{"anyOf":[{},{"type":"null"}],"title":"Clauses"},"documents":{"title":"Documents"}},"type":"object","required":["documents"],"title":"MainResult"},"ManageRoleUsersRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"}},"type":"object","required":["user_ids"],"title":"ManageRoleUsersRequest"},"MarketingAnalytics":{"properties":{"documents_uploaded":{"type":"integer","title":"Documents Uploaded"},"documents_analyzed_by_kobalt":{"type":"integer","title":"Documents Analyzed By Kobalt"},"documents_with_compliance_review":{"type":"integer","title":"Documents With Compliance Review"},"documents_approved":{"type":"integer","title":"Documents Approved"},"total_risks":{"type":"integer","title":"Total Risks"},"manually_added_risks":{"type":"integer","title":"Manually Added Risks"},"risks_linked_to_internal_files":{"type":"integer","title":"Risks Linked To Internal Files"},"regulatory_risk_count":{"type":"integer","title":"Regulatory Risk Count"},"flagged_risks":{"type":"integer","title":"Flagged Risks"},"dismissed_risks":{"type":"integer","title":"Dismissed Risks"},"allowed_risks":{"type":"integer","title":"Allowed Risks"},"no_action_risks":{"type":"integer","title":"No Action Risks"},"risks_per_document":{"type":"number","title":"Risks Per Document"},"unique_uploaders":{"type":"integer","title":"Unique Uploaders"},"unique_reviewers":{"type":"integer","title":"Unique Reviewers"},"unique_users":{"type":"integer","title":"Unique Users"},"user_metrics":{"additionalProperties":{"$ref":"#/components/schemas/UserMetrics"},"type":"object","title":"User Metrics"},"reviewer_metrics":{"additionalProperties":{"$ref":"#/components/schemas/ReviewerMetrics"},"type":"object","title":"Reviewer Metrics"},"integrations_enabled":{"type":"boolean","title":"Integrations Enabled"},"collateral_by_source":{"additionalProperties":{"type":"integer"},"type":"object","title":"Collateral By Source"}},"type":"object","required":["documents_uploaded","documents_analyzed_by_kobalt","documents_with_compliance_review","documents_approved","total_risks","manually_added_risks","risks_linked_to_internal_files","regulatory_risk_count","flagged_risks","dismissed_risks","allowed_risks","no_action_risks","risks_per_document","unique_uploaders","unique_reviewers","unique_users","user_metrics","reviewer_metrics","integrations_enabled","collateral_by_source"],"title":"MarketingAnalytics"},"MarketingCollateralType":{"type":"string","enum":["Agent Call Flow","Audio","Billboard","Communications","Conversation Design","Email","Help Center Article","In-App","Mailer","Organic Social","Paid Advertising","Paid Search","Paid Social","Press Release","Procedure/Decision Tree","Support Agent Training","TV","Web","Wiki","Other"],"title":"MarketingCollateralType"},"MarketingFailuresResponse":{"properties":{"weekly":{"items":{"$ref":"#/components/schemas/WeeklyFailurePoint"},"type":"array","title":"Weekly"},"breakdown":{"items":{"$ref":"#/components/schemas/EntityFailureRow"},"type":"array","title":"Breakdown"},"totals":{"$ref":"#/components/schemas/FailureTotals"},"citations":{"$ref":"#/components/schemas/CitationCoverage"},"citation_weekly":{"items":{"$ref":"#/components/schemas/WeeklyCitationPoint"},"type":"array","title":"Citation Weekly"},"risk_actions":{"$ref":"#/components/schemas/RiskActionCoverage"},"risk_action_weekly":{"items":{"$ref":"#/components/schemas/WeeklyRiskActionPoint"},"type":"array","title":"Risk Action Weekly"},"run_latency":{"$ref":"#/components/schemas/RunLatencyTotals"},"run_latency_weekly":{"items":{"$ref":"#/components/schemas/WeeklyRunLatencyPoint"},"type":"array","title":"Run Latency Weekly"},"feedback_signal":{"$ref":"#/components/schemas/FeedbackSignalCoverage"},"feedback_signal_weekly":{"items":{"$ref":"#/components/schemas/WeeklyFeedbackSignalPoint"},"type":"array","title":"Feedback Signal Weekly"},"breakdown_level":{"type":"string","enum":["company","team","none"],"title":"Breakdown Level"},"weeks":{"type":"integer","title":"Weeks"},"sla_hours":{"type":"integer","title":"Sla Hours"}},"type":"object","required":["weekly","breakdown","totals","citations","citation_weekly","risk_actions","risk_action_weekly","run_latency","run_latency_weekly","feedback_signal","feedback_signal_weekly","breakdown_level","weeks","sla_hours"],"title":"MarketingFailuresResponse","description":"Failure trend + next-level breakdown for marketing analyses.\n\nA single response drives the failure chart (`weekly`), the KPI cards\n(`totals`), and the drill-down table (`breakdown`) for whatever scope was\nrequested, plus citation coverage (`citations` totals + `citation_weekly`\ntrend), the risk-action funnel (`risk_actions` totals +\n`risk_action_weekly` trend -- action rate and flag rate) for the risks\nthose runs surfaced, run-latency stats (`run_latency` totals +\n`run_latency_weekly` trend -- queue wait, prep + analysis, and end-to-end\ntogether), and feedback signal & coverage (`feedback_signal` totals +\n`feedback_signal_weekly` trend -- validated rate, coverage gap, outdated\nshare)."},"MarketingOcrConfidenceResponse":{"properties":{"weekly":{"items":{"$ref":"#/components/schemas/WeeklyOcrConfidencePoint"},"type":"array","title":"Weekly"},"distribution":{"$ref":"#/components/schemas/OcrConfidenceDistribution"},"totals":{"$ref":"#/components/schemas/OcrConfidenceTotals"},"weeks":{"type":"integer","title":"Weeks"}},"type":"object","required":["weekly","distribution","totals","weeks"],"title":"MarketingOcrConfidenceResponse","description":"OCR-confidence trend + distribution for processed marketing files.\n\nDrives the weekly average line (`weekly`), the KPI cards (`totals`), and the\ndistribution bars (`distribution`) on the marketing reliability page."},"MarketingPreset":{"properties":{"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["preset_id","name"],"title":"MarketingPreset"},"MarketingPresetBulkDelete":{"properties":{"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Preset Ids"}},"type":"object","required":["preset_ids"],"title":"MarketingPresetBulkDelete"},"MarketingPresetBulkTeam":{"properties":{"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Preset Ids"},"marketing_team_id":{"type":"string","format":"uuid","title":"Marketing Team Id"}},"type":"object","required":["preset_ids","marketing_team_id"],"title":"MarketingPresetBulkTeam"},"MarketingPresetCopy":{"properties":{"preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Preset Ids"},"target_marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Marketing Team Id"},"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"name_suffix":{"type":"string","maxLength":64,"minLength":1,"title":"Name Suffix","default":" (copy)"}},"type":"object","required":["preset_ids"],"title":"MarketingPresetCopy"},"MarketingPresetCopyResult":{"properties":{"created":{"items":{"type":"string"},"type":"array","title":"Created"}},"type":"object","required":["created"],"title":"MarketingPresetCopyResult"},"MarketingPresetCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"program_types":{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array","title":"Program Types"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"File Ids"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},"type":"object","required":["name","program_types"],"title":"MarketingPresetCreate"},"MarketingPresetProposalDetail":{"properties":{"proposal":{"$ref":"#/components/schemas/MarketingPresetProposalSummary"},"items":{"items":{"$ref":"#/components/schemas/ProposedProductLine"},"type":"array","title":"Items"},"program_types":{"items":{"$ref":"#/components/schemas/ProgramTypeRegulations"},"type":"array","title":"Program Types"},"existing_product_lines":{"items":{"$ref":"#/components/schemas/ExistingProductLine"},"type":"array","title":"Existing Product Lines"},"files":{"items":{"$ref":"#/components/schemas/ProposalFileOption"},"type":"array","title":"Files"},"teams":{"items":{"$ref":"#/components/schemas/ProposalTeamOption"},"type":"array","title":"Teams"}},"additionalProperties":false,"type":"object","required":["proposal","items","program_types","existing_product_lines","files","teams"],"title":"MarketingPresetProposalDetail","description":"Everything the review page needs, in one response.\n\nOne call rather than five: the page cannot render a checkbox grid without the regulation\nlist, cannot diff an `update` without the current product lines, and cannot offer a team or a\nmarketing standard without those lists — so fetching them separately only buys four more ways\nfor the page to be half-drawn."},"MarketingPresetProposalOperation":{"type":"string","enum":["create","update"],"title":"MarketingPresetProposalOperation","description":"Whether an item creates a product line or edits one that exists."},"MarketingPresetProposalStatus":{"type":"string","enum":["open","applied","discarded"],"title":"MarketingPresetProposalStatus","description":"Where a proposal is in its one-way life.\n\n`open` is the only state that accepts edits or applies. A proposal reaches `applied` when\nevery item on it has been written, so a reviewer who approves three of five rows leaves it\n`open` and comes back for the rest rather than stranding them."},"MarketingPresetProposalSummary":{"properties":{"proposal_id":{"type":"string","format":"uuid","title":"Proposal Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"title":{"type":"string","title":"Title"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"$ref":"#/components/schemas/MarketingPresetProposalStatus"},"revision":{"type":"integer","title":"Revision"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"created":{"type":"string","title":"Created"},"item_count":{"type":"integer","title":"Item Count"},"applied_count":{"type":"integer","title":"Applied Count"},"last_applied_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Applied At"},"last_applied_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Applied By Email"},"review_url":{"type":"string","title":"Review Url"}},"additionalProperties":false,"type":"object","required":["proposal_id","company_id","company_name","title","notes","status","revision","created_by_email","created","item_count","applied_count","last_applied_at","last_applied_by_email","review_url"],"title":"MarketingPresetProposalSummary","description":"A proposal without its items — the listing, and the MCP status read."},"MarketingPresetUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"program_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array"},{"type":"null"}],"title":"Program Types"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"File Ids"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"}},"type":"object","title":"MarketingPresetUpdate"},"MarketingPresetWithLabels":{"properties":{"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"name":{"type":"string","title":"Name"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"program_types":{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array","title":"Program Types"},"files":{"items":{"$ref":"#/components/schemas/StoredFile"},"type":"array","title":"Files"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"marketing_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Team Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"usage_count":{"type":"integer","title":"Usage Count"},"deleted":{"type":"boolean","title":"Deleted","default":false}},"type":"object","required":["preset_id","name","company_id","program_types","usage_count"],"title":"MarketingPresetWithLabels"},"MarketingProgramType":{"type":"string","enum":["Consumer UDAAP","UK Financial Promotions","FINRA","Reg E","Reg DD","Card Brand Rules","ECOA (Reg B)","TILA (Reg Z)","CAN-SPAM","FDIC Advertising","Fair Housing Logo","FCRA Consumer Rights","FCRA Prescreened Offers","Kansas UCCC/KMBA","Reg CC","SCRA/MLA","B2B UDAAP","Reg II","TCPA","FTC Endorsement Guides","GLBA / Privacy","Prepaid Rule","Sweepstakes & Giveaways"],"title":"MarketingProgramType"},"MarketingResult":{"properties":{"type":{"type":"string","title":"Type","default":"marketing"},"documents":{"title":"Documents"}},"type":"object","required":["documents"],"title":"MarketingResult"},"MarketingTeamMembership":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"},"is_primary":{"type":"boolean","title":"Is Primary"}},"type":"object","required":["team_id","name","is_primary"],"title":"MarketingTeamMembership"},"MarketingTeamOption":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["team_id","name"],"title":"MarketingTeamOption","description":"A team a requirement can be scoped to.\n\nEvery team the *company* has, not the caller's memberships: scoping a requirement to a team is\ncompany compliance configuration, and the person doing it — a compliance owner — is often on no\nmarketing team at all. `_validate_team_ids` accepts any of the company's teams, so offering only\nthe viewer's would leave exactly those people unable to use a scope the API would have taken."},"MarketingTeamResponse":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["team_id","name"],"title":"MarketingTeamResponse"},"MasqueradeActionResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"mode":{"anyOf":[{"$ref":"#/components/schemas/MasqueradeMode"},{"type":"null"}]},"target_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Company Id"},"target_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Company Name"}},"type":"object","required":["status","message"],"title":"MasqueradeActionResponse"},"MasqueradeMode":{"type":"string","enum":["soft","hard"],"title":"MasqueradeMode"},"MasqueradeOwnerResponse":{"properties":{"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"}},"type":"object","title":"MasqueradeOwnerResponse","description":"Owning company for a set of candidate entity UUIDs, or nulls if unresolved."},"MasqueradeStatus":{"properties":{"mode":{"$ref":"#/components/schemas/MasqueradeMode"},"target_company_id":{"type":"string","format":"uuid","title":"Target Company Id"},"target_company_name":{"type":"string","title":"Target Company Name"}},"type":"object","required":["mode","target_company_id","target_company_name"],"title":"MasqueradeStatus"},"MatchRiskRequest":{"properties":{"match_kind":{"anyOf":[{"$ref":"#/components/schemas/ApplicabilityMatchKind"},{"type":"null"}]},"matched_risk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Risk Id"},"note":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Note"}},"type":"object","required":["match_kind"],"title":"MatchRiskRequest","description":"A reviewer's judgment of one produced risk against production's risks.\n\n`matched_risk_id` is required for `MATCHES_PRODUCTION_RISK` and refused for `NET_NEW`: the two\ntogether are one decision, and letting them disagree is how a row ends up claiming a match to\nnothing. Sending `match_kind: null` clears the judgment."},"McpConnectionResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"connected_at":{"type":"string","format":"date-time","title":"Connected At"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"active_token_count":{"type":"integer","title":"Active Token Count"}},"type":"object","required":["client_id","connected_at","user_id","active_token_count"],"title":"McpConnectionResponse","description":"One connected MCP client for the caller's company.\n\nA \"connection\" is the (client_id, user_id) pair with >=1 active\n(non-revoked, unexpired) refresh token. connected_at is the EARLIEST\nissued_at across all of that pair's tokens including revoked ones — refresh\nrotates tokens, so restricting it to active rows would report the last\nrefresh rather than when the app was first authorized. user_email is\npopulated for the admin all-company view.\n\nThere is deliberately no last_used: nothing records it, and shipping a\npermanently-null field invites consumers to read it as \"never used\"."},"MetadataFieldExplanation":{"properties":{"custom_field_id":{"type":"string","format":"uuid","title":"Custom Field Id"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["custom_field_id","explanation"],"title":"MetadataFieldExplanation","description":"Rationale for one vendor custom-field change proposed by the review\nmetadata agent, keyed by the field it explains."},"MetadataTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"review_metadata","title":"Task Type","default":"review_metadata"},"instructions":{"type":"string","title":"Instructions","default":""},"set_key_dates":{"type":"boolean","title":"Set Key Dates","default":false},"set_vendor_fields":{"type":"boolean","title":"Set Vendor Fields","default":false},"auto_apply_key_dates":{"type":"boolean","title":"Auto Apply Key Dates","default":false}},"type":"object","required":["definition_id","company_id","review_type","stage"],"title":"MetadataTaskDefinitionResponse"},"MetadataTaskSpec":{"properties":{"type":{"type":"string","const":"review_metadata","title":"Type","default":"review_metadata"},"instructions":{"type":"string","title":"Instructions","default":""},"set_key_dates":{"type":"boolean","title":"Set Key Dates","default":false},"set_vendor_fields":{"type":"boolean","title":"Set Vendor Fields","default":false},"auto_apply_key_dates":{"type":"boolean","title":"Auto Apply Key Dates","default":false}},"type":"object","title":"MetadataTaskSpec","description":"``set_key_dates``/``set_vendor_fields`` are intentionally unvalidated\nhere even though a definition needs at least one to ever produce a\n``MetadataTask`` (see ``is_functional`` on the DB model) — this spec must\nalso round-trip an *existing* definition someone saved via the settings UI\none toggle at a time (e.g. instructions typed before any flag is flipped),\nand a raising validator here would break exporting that state as config."},"MetadataTaskStatusResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"instructions":{"type":"string","title":"Instructions"},"set_key_dates":{"type":"boolean","title":"Set Key Dates"},"set_vendor_fields":{"type":"boolean","title":"Set Vendor Fields"},"auto_apply_key_dates":{"type":"boolean","title":"Auto Apply Key Dates"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"custom_field_changeset":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldsChangeset"},{"type":"null"}]},"field_explanations":{"items":{"$ref":"#/components/schemas/MetadataFieldExplanation"},"type":"array","title":"Field Explanations","default":[]},"proposed_key_dates":{"items":{"$ref":"#/components/schemas/ProposedKeyDate"},"type":"array","title":"Proposed Key Dates","default":[]},"thinking":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["task_id","instructions","set_key_dates","set_vendor_fields","auto_apply_key_dates","status"],"title":"MetadataTaskStatusResponse","description":"The review's MetadataTask (singleton) returned by\nGET /reviews/{review_id}/metadata-tasks, joined to its agent run so the\nresponse carries run status, the before/after custom-field changeset for\nvisualization, and the run's rationale (per-field explanations, proposed\nkey dates, and truncated thinking)."},"MigrationCompanyRow":{"properties":{"company_id":{"type":"string","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"user_count":{"type":"integer","title":"User Count"},"users_on_global_roles":{"type":"integer","title":"Users On Global Roles"},"global_roles_in_use":{"items":{"type":"string"},"type":"array","title":"Global Roles In Use"},"unmapped_global_roles":{"items":{"type":"string"},"type":"array","title":"Unmapped Global Roles"},"company_role_count":{"type":"integer","title":"Company Role Count"},"company_roles_tagged":{"type":"integer","title":"Company Roles Tagged"},"module_coverage":{"items":{"$ref":"#/components/schemas/ModuleArchetypeCoverage"},"type":"array","title":"Module Coverage"},"has_partial_module":{"type":"boolean","title":"Has Partial Module"},"multi_module_roles":{"items":{"$ref":"#/components/schemas/MultiModuleRole"},"type":"array","title":"Multi Module Roles"},"status":{"type":"string","title":"Status"}},"type":"object","required":["company_id","company_name","user_count","users_on_global_roles","global_roles_in_use","unmapped_global_roles","company_role_count","company_roles_tagged","module_coverage","has_partial_module","multi_module_roles","status"],"title":"MigrationCompanyRow","description":"One company's migration status: old (global) roles vs. its own archetype roles."},"MigrationCompanyUsersResponse":{"properties":{"company_id":{"type":"string","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"users":{"items":{"$ref":"#/components/schemas/MigrationUserRow"},"type":"array","title":"Users"},"company_roles":{"items":{"$ref":"#/components/schemas/CompanyRoleOption"},"type":"array","title":"Company Roles"},"global_roles":{"items":{"$ref":"#/components/schemas/CompanyRoleOption"},"type":"array","title":"Global Roles"}},"type":"object","required":["company_id","company_name","users","company_roles","global_roles"],"title":"MigrationCompanyUsersResponse"},"MigrationOverviewResponse":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/MigrationCompanyRow"},"type":"array","title":"Companies"}},"type":"object","required":["companies"],"title":"MigrationOverviewResponse"},"MigrationUserRole":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"scope":{"type":"string","title":"Scope"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"}},"type":"object","required":["role_id","role_name","scope"],"title":"MigrationUserRole"},"MigrationUserRow":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"roles":{"items":{"$ref":"#/components/schemas/MigrationUserRole"},"type":"array","title":"Roles"},"on_global":{"type":"boolean","title":"On Global"}},"type":"object","required":["user_id","email","first_name","last_name","roles","on_global"],"title":"MigrationUserRow"},"MissingCitationRisk":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"filename":{"type":"string","title":"Filename"},"short_text":{"type":"string","title":"Short Text"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"run_time":{"type":"string","format":"date-time","title":"Run Time"}},"type":"object","required":["risk_id","run_id","file_id","company_id","company_name","filename","short_text","severity","run_time"],"title":"MissingCitationRisk","description":"One risk with no citation, for the weekly drill-down list.\n\n`file_id` is the `Files.file_id` used to deeplink into the marketing file\nhistory view (`/file/{file_id}/history`) where the risk can be investigated."},"MissingCitationRisksResponse":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"total":{"type":"integer","title":"Total"},"truncated":{"type":"boolean","title":"Truncated"},"risks":{"items":{"$ref":"#/components/schemas/MissingCitationRisk"},"type":"array","title":"Risks"}},"type":"object","required":["week_start","total","truncated","risks"],"title":"MissingCitationRisksResponse","description":"Risks without citations whose run falls in the clicked ISO week.\n\n`truncated` is True when more than the response cap matched, so the client\ncan say the list is partial."},"ModuleArchetypeCoverage":{"properties":{"module":{"type":"string","title":"Module"},"archetypes_present":{"type":"integer","title":"Archetypes Present"},"archetypes_total":{"type":"integer","title":"Archetypes Total"},"complete":{"type":"boolean","title":"Complete"}},"type":"object","required":["module","archetypes_present","archetypes_total","complete"],"title":"ModuleArchetypeCoverage","description":"A company's archetype coverage for one module. ``complete`` = all-or-nothing satisfied."},"ModulePermissionMatrix":{"properties":{"module_name":{"type":"string","title":"Module Name"},"entities":{"items":{"$ref":"#/components/schemas/EntityPermissionMatrix"},"type":"array","title":"Entities"}},"type":"object","required":["module_name","entities"],"title":"ModulePermissionMatrix"},"ModulePermissionUsage":{"properties":{"module_name":{"type":"string","title":"Module Name"},"entities":{"items":{"$ref":"#/components/schemas/EntityPermissionUsage"},"type":"array","title":"Entities"}},"type":"object","required":["module_name","entities"],"title":"ModulePermissionUsage"},"ModuleResponse":{"properties":{"module_id":{"type":"string","title":"Module Id"},"module_name":{"type":"string","title":"Module Name"},"message":{"type":"string","title":"Message"}},"type":"object","required":["module_id","module_name","message"],"title":"ModuleResponse"},"MultiModuleRole":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"scope":{"type":"string","title":"Scope"},"modules":{"items":{"type":"string"},"type":"array","title":"Modules"}},"type":"object","required":["role_id","role_name","scope","modules"],"title":"MultiModuleRole","description":"A role whose permissions span ≥2 product modules — a legacy role to split per module."},"MultipleChoiceQuestion":{"properties":{"question":{"type":"string","title":"Question"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context"},"score_compliance":{"type":"boolean","title":"Score Compliance","default":true},"question_id":{"type":"string","title":"Question Id"},"type":{"type":"string","const":"multiple","title":"Type","default":"multiple"}},"type":"object","required":["question","options","question_id"],"title":"MultipleChoiceQuestion"},"MyServiceRow":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"service_name":{"type":"string","title":"Service Name"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"vendor_status_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Status Label"},"vendor_status_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Status Color"},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/ServiceReviewStatus"},{"type":"null"}]},"stage":{"anyOf":[{"$ref":"#/components/schemas/ReviewStage"},{"type":"null"}]},"next_actor":{"oneOf":[{"$ref":"#/components/schemas/TprmTeamActor"},{"$ref":"#/components/schemas/YouCompleteIraActor"},{"$ref":"#/components/schemas/IraAssigneeActor"},{"$ref":"#/components/schemas/VendorContactActor"}],"title":"Next Actor","discriminator":{"propertyName":"kind","mapping":{"ira_assignee":"#/components/schemas/IraAssigneeActor","tprm_team":"#/components/schemas/TprmTeamActor","vendor_contact":"#/components/schemas/VendorContactActor","you_complete_ira":"#/components/schemas/YouCompleteIraActor"}}},"requested_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested Date"},"needs_attention":{"type":"boolean","title":"Needs Attention"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["service_id","service_name","vendor_id","next_actor","needs_attention"],"title":"MyServiceRow","description":"One service the current user is the internal POC for, joined to its latest review."},"MyServicesResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/MyServiceRow"},"type":"array","title":"Rows"},"attention_count":{"type":"integer","title":"Attention Count"}},"type":"object","required":["rows","attention_count"],"title":"MyServicesResponse"},"NarrowingSkipped":{"type":"string","enum":["collateral_type_unknown","marketing_team_unknown","collateral_text_unavailable","collateral_type_is_other"],"title":"NarrowingSkipped","description":"A narrowing test that could not run, and why.\n\nDistinct from an exclusion: nothing was excluded, and the surviving count is *un-narrowed on\nthat axis*. Recording it is the difference between \"no rule failed the collateral-type test\" and\n\"the collateral has no type, so that test never ran\" — which produce the same surviving number\nand mean opposite things."},"NarrowingSummary":{"properties":{"guidelines_considered":{"type":"integer","title":"Guidelines Considered"},"guidelines_without_rules":{"type":"integer","title":"Guidelines Without Rules"},"candidates_total":{"type":"integer","title":"Candidates Total"},"candidates_surviving":{"type":"integer","title":"Candidates Surviving"},"excluded_by":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/ApplicabilityExclusion"},"type":"object","title":"Excluded By"},"unresolved_preset_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Unresolved Preset Ids"},"skipped":{"items":{"$ref":"#/components/schemas/NarrowingSkipped"},"type":"array","title":"Skipped"}},"type":"object","required":["guidelines_considered","guidelines_without_rules","candidates_total","candidates_surviving","excluded_by","unresolved_preset_ids","skipped"],"title":"NarrowingSummary"},"NegativeNewsConfigAdminResponse":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_limit":{"type":"integer","title":"Company Limit"},"subscription_count":{"type":"integer","title":"Subscription Count"}},"type":"object","required":["company_id","company_limit","subscription_count"],"title":"NegativeNewsConfigAdminResponse","description":"A company's negative news monitoring limit and current usage."},"NegativeNewsConfigResponse":{"properties":{"create_issues":{"type":"boolean","title":"Create Issues"},"company_limit":{"type":"integer","title":"Company Limit"},"subscription_count":{"type":"integer","title":"Subscription Count"}},"type":"object","required":["create_issues","company_limit","subscription_count"],"title":"NegativeNewsConfigResponse","description":"Negative news configuration for the current tenant."},"NegativeNewsDismissReason":{"type":"string","enum":["mistaken_identity","not_material","inaccurate","other"],"title":"NegativeNewsDismissReason","description":"Why a tenant dismissed an adverse-media hit.\n\nA note is welcome on any reason; only OTHER, which says nothing on its own,\ndepends on one. Enforced here rather than in Postgres (the column is a plain\nVARCHAR) so the set can move without a migration and an unrecognized stored\nvalue reads as an odd label rather than a 500. Labels live in\nfrontend/copilot/src/constants/negativeNewsDismissReasons.ts."},"NegativeNewsExportHit":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"hit_key":{"type":"string","title":"Hit Key"}},"type":"object","required":["vendor_id","hit_key"],"title":"NegativeNewsExportHit"},"NegativeNewsExportRequest":{"properties":{"hits":{"items":{"$ref":"#/components/schemas/NegativeNewsExportHit"},"type":"array","title":"Hits"},"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Columns"},"filter_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Label"}},"type":"object","required":["hits"],"title":"NegativeNewsExportRequest"},"NegativeNewsExportResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["download_url","filename"],"title":"NegativeNewsExportResponse"},"NegativeNewsFeedItem":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Website"},"hit_key":{"type":"string","title":"Hit Key"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"when":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"When"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"topic_categories":{"items":{"$ref":"#/components/schemas/NegativeNewsTopic"},"type":"array","title":"Topic Categories"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"is_perpetrator":{"type":"boolean","title":"Is Perpetrator"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"status":{"type":"string","enum":["new","issue_created","dismissed"],"title":"Status"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"decided_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By Name"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"dismissal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Reason"},"dismissal_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Note"}},"type":"object","required":["vendor_id","vendor_name","company_website","hit_key","title","summary","when","topics","topic_categories","source_url","is_perpetrator","last_seen_at","status","issue_id","decided_by_name","decided_at","dismissal_reason","dismissal_note"],"title":"NegativeNewsFeedItem"},"NegativeNewsSubscriber":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_first_name":{"type":"string","title":"User First Name"},"user_last_name":{"type":"string","title":"User Last Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["user_id","user_first_name","user_last_name","email_address"],"title":"NegativeNewsSubscriber","description":"A teammate who receives one company's negative-news digest."},"NegativeNewsSubscriptionItem":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"company_website":{"type":"string","title":"Company Website"},"inherent_risk":{"anyOf":[{"$ref":"#/components/schemas/VendorOptionRiskSummary"},{"type":"null"}]},"criticality":{"anyOf":[{"$ref":"#/components/schemas/VendorOptionRiskSummary"},{"type":"null"}]},"assignments":{"items":{"$ref":"#/components/schemas/VendorAssignmentResponse"},"type":"array","title":"Assignments","default":[]},"subscriber_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscriber Count"},"subscribed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Subscribed"},"subscribers":{"items":{"$ref":"#/components/schemas/NegativeNewsSubscriber"},"type":"array","title":"Subscribers","default":[]}},"type":"object","required":["company_id","vendor_name","company_website"],"title":"NegativeNewsSubscriptionItem","description":"One vendor entry in the subscriptions list."},"NegativeNewsTopic":{"type":"string","enum":["cybersecurity_incident","security_vulnerability","data_privacy","service_disruption","legal_proceedings","regulatory_enforcement","antitrust_competition","financial_crime","corporate_governance","workforce","consumer_protection","intellectual_property","ai_governance","esg_ethics","geopolitical"],"title":"NegativeNewsTopic","description":"A risk domain an adverse-media finding can belong to.\n\nCase-insensitive so a model that emits \"Data Privacy\" or \"data-privacy\"\nresolves to the same member as ``data_privacy``."},"NewFormRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"template_id":{"type":"string","format":"uuid","title":"Template Id"},"form_name":{"type":"string","title":"Form Name"},"request":{"anyOf":[{"$ref":"#/components/schemas/CreateFormResponsesRequest"},{"type":"null"}]},"autofill":{"anyOf":[{"$ref":"#/components/schemas/AutofillFormRequest"},{"type":"null"}]}},"type":"object","required":["vendor_id","template_id","form_name"],"title":"NewFormRequest"},"NewUserResponse":{"properties":{"status":{"type":"string","title":"Status"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["status","user"],"title":"NewUserResponse","description":"Response body for new user creation."},"NoticeDateSource":{"type":"string","enum":["derived","extracted","manual"],"title":"NoticeDateSource","description":"Where a term's ``termination_notice_date`` came from.\n\nDrives whether moving ``end_date`` recomputes the notice date: only\n``DERIVED`` dates are recomputed, so a human-entered or document-stated\ndate is never silently overwritten."},"NoticePeriodUnit":{"type":"string","enum":["days","months"],"title":"NoticePeriodUnit","description":"Unit of a termination-notice period.\n\nMonths are not 30 days: 3 months before 2026-05-31 is 2026-02-28, while 90\ndays before it is 2026-03-02. This generates a legal deadline, so the unit\nis stored rather than normalized to days (see\n``backend.helpers.contract_terms.derive_notice_date``)."},"NotificationGroup":{"type":"string","enum":["Issues","Intake","Reviews","Key Dates","Follow Ups"],"title":"NotificationGroup","description":"Section a notification is listed under in the preference UI.\n\nNamed for the surface the notification is about, matching the sidebar, so a\nnew type joins an existing section rather than lengthening one flat list."},"NotificationPreference":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"group":{"$ref":"#/components/schemas/NotificationGroup"},"enabled":{"type":"boolean","title":"Enabled"},"supports_assigned_scope":{"type":"boolean","title":"Supports Assigned Scope","default":false},"assigned_scope_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Scope Label"},"scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]},"default_scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","label","description","group","enabled"],"title":"NotificationPreference","description":"A notification type and the user's effective on/off state for it."},"NotificationPreferenceRequest":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"enabled":{"type":"boolean","title":"Enabled"},"scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","enabled"],"title":"NotificationPreferenceRequest","description":"Request body for setting a user's preference for a notification type."},"NotificationScope":{"type":"string","enum":["all","assigned"],"title":"NotificationScope","description":"How widely a user wants to receive a (scope-supporting) notification.\n\nALL means every event of this type at the company; ASSIGNED narrows it to\nthe subset that concerns the user. What \"assigned\" resolves to is defined\nby the definition's AssignedScopeSpec.kind."},"NotificationTypeOption":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"default_enabled":{"type":"boolean","title":"Default Enabled"},"required_permission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Permission"},"supports_assigned_scope":{"type":"boolean","title":"Supports Assigned Scope"},"assigned_scope_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Scope Label"},"default_scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","label","description","default_enabled","required_permission","supports_assigned_scope","assigned_scope_label","default_scope"],"title":"NotificationTypeOption"},"OcrConfidence":{"properties":{"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"pages_processed":{"type":"integer","title":"Pages Processed"}},"type":"object","required":["avg_confidence","pages_processed"],"title":"OcrConfidence","description":"OCR confidence metrics captured during file processing.\n\nStored on ``FileVersions.ocr_confidence`` (JSONB) and computed in\n``backend.utils.ocr_confidence``. ``avg_confidence`` is the token-weighted\nmean across the whole file."},"OcrConfidenceDistribution":{"properties":{"low":{"type":"integer","title":"Low"},"medium":{"type":"integer","title":"Medium"},"high":{"type":"integer","title":"High"}},"type":"object","required":["low","medium","high"],"title":"OcrConfidenceDistribution","description":"Window-wide file counts per confidence band."},"OcrConfidenceTotals":{"properties":{"files":{"type":"integer","title":"Files"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"low_confidence_files":{"type":"integer","title":"Low Confidence Files"},"low_confidence_pct":{"type":"number","title":"Low Confidence Pct"}},"type":"object","required":["files","avg_confidence","low_confidence_files","low_confidence_pct"],"title":"OcrConfidenceTotals","description":"Window-wide OCR-confidence totals for the current scope (KPI cards)."},"OpenReviewRow":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"services":{"items":{"$ref":"#/components/schemas/ReviewServiceSummary"},"type":"array","title":"Services","default":[]},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"assigned_to_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Name"},"progress":{"$ref":"#/components/schemas/ReviewStageProgress"}},"type":"object","required":["review_id","vendor_id","review_type","started_at","progress"],"title":"OpenReviewRow","description":"One open review, as the Reviews page's open pipeline lists it.\n\nReview-grained: every stage but the IRA is review-level work, so a row per\nservice would repeat the same cell for each of them. The services in scope\nride along as a column instead, and the IRA folds its per-service state into\none measure plus the set of people its questionnaires are out with."},"OpenReviewsResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/OpenReviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"OpenReviewsResponse"},"OverviewIssueResponse":{"properties":{"issue_id":{"type":"string","format":"uuid","title":"Issue Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"created":{"type":"string","format":"date-time","title":"Created"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"assignee":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"resolved_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"source_requirement":{"anyOf":[{"$ref":"#/components/schemas/SourceRequirement"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"due_bucket":{"$ref":"#/components/schemas/IssueDueBucket"}},"type":"object","required":["issue_id","short_text","severity","created","resolved","company_id","vendor_id","vendor_name","due_bucket"],"title":"OverviewIssueResponse"},"OverviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"turn":{"anyOf":[{"$ref":"#/components/schemas/Party"},{"type":"null"}]},"internal_name":{"type":"string","title":"Internal Name"},"external_name":{"type":"string","title":"External Name"},"internal_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Website"},"external_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Website"},"created":{"type":"string","format":"date-time","title":"Created"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"disposition":{"anyOf":[{"$ref":"#/components/schemas/TaskDisposition"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"reminder_last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder Last Sent At"},"visibility_scope":{"$ref":"#/components/schemas/VisibilityScope"},"participants":{"items":{"$ref":"#/components/schemas/TaskParticipantResponse"},"type":"array","title":"Participants","default":[]},"created_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"}},"type":"object","required":["task_id","short_text","status","internal_name","external_name","created","visibility_scope","company_id","vendor_id"],"title":"OverviewTaskResponse"},"PacketRecipient":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"PacketRecipient","description":"One person a diligence packet was sent to."},"Paginated_AllServicesResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AllServicesResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"Paginated[AllServicesResponse]"},"Paginated_GetVendorsResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetVendorsResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"Paginated[GetVendorsResponse]"},"Paginated_ReviewResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"Paginated[ReviewResponse]"},"ParticipantRole":{"type":"string","enum":["remediation_owner","reviewer","subscriber"],"title":"ParticipantRole"},"ParticipantSource":{"type":"string","enum":["manual","assigned","creator","commented","mentioned"],"title":"ParticipantSource"},"Party":{"type":"string","enum":["internal","external"],"title":"Party"},"PendingResult":{"properties":{"status":{"type":"string","title":"Status","default":"pending"}},"type":"object","title":"PendingResult"},"PermissionDiffResponse":{"properties":{"before":{"items":{"type":"string"},"type":"array","title":"Before"},"after":{"items":{"type":"string"},"type":"array","title":"After"},"added":{"items":{"type":"string"},"type":"array","title":"Added"},"removed":{"items":{"type":"string"},"type":"array","title":"Removed"}},"type":"object","required":["before","after","added","removed"],"title":"PermissionDiffResponse","description":"Effective permission strings before/after a proposed role change, and the delta."},"PermissionMatrixEntry":{"properties":{"permission_id":{"type":"string","title":"Permission Id"},"permission_name":{"type":"string","title":"Permission Name"},"description":{"type":"string","title":"Description"},"roles":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Roles"}},"type":"object","required":["permission_id","permission_name","description","roles"],"title":"PermissionMatrixEntry"},"PermissionUsageEntry":{"properties":{"permission_id":{"type":"string","title":"Permission Id"},"permission_name":{"type":"string","title":"Permission Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"roles":{"items":{"$ref":"#/components/schemas/RoleUsage"},"type":"array","title":"Roles"}},"type":"object","required":["permission_id","permission_name","description","roles"],"title":"PermissionUsageEntry"},"PermissionUsageResponse":{"properties":{"modules":{"items":{"$ref":"#/components/schemas/ModulePermissionUsage"},"type":"array","title":"Modules"}},"type":"object","required":["modules"],"title":"PermissionUsageResponse"},"PinCompanyRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["company_id"],"title":"PinCompanyRequest"},"PinCompanyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PinCompanyResponse"},"PinnedCompaniesResponse":{"properties":{"pinned_companies":{"items":{"$ref":"#/components/schemas/PinnedCompany"},"type":"array","title":"Pinned Companies"}},"type":"object","required":["pinned_companies"],"title":"PinnedCompaniesResponse"},"PinnedCompany":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"company_website":{"type":"string","title":"Company Website"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},"type":"object","required":["company_id","vendor_name","company_website"],"title":"PinnedCompany"},"PrepareCollateralRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"File Ids"}},"type":"object","required":["company_id","file_id"],"title":"PrepareCollateralRequest","description":"Decompose whatever this collateral's product lines put on it and nothing has a library for."},"PresetRow":{"properties":{"preset_id":{"type":"string","format":"uuid","title":"Preset Id"},"name":{"type":"string","title":"Name"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"file_count":{"type":"integer","title":"File Count"}},"type":"object","required":["preset_id","name","team_id","team_name","file_count"],"title":"PresetRow"},"PriorReviewView":{"properties":{"rating_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Label"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"reviewer_accepted":{"type":"boolean","title":"Reviewer Accepted"}},"type":"object","required":["rating_label","closed_at","reviewer_accepted"],"title":"PriorReviewView"},"ProducedRiskResponse":{"properties":{"applicability_risk_id":{"type":"string","format":"uuid","title":"Applicability Risk Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"requirement_text":{"type":"string","title":"Requirement Text"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline Upload Id"},"requirement_citation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Requirement Citation"},"requirement_source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirement Source Page"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"batch_index":{"type":"integer","title":"Batch Index"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"anyOf":[{"$ref":"#/components/schemas/RiskSeverity"},{"type":"null"}]},"citations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Citations"},"match_kind":{"anyOf":[{"$ref":"#/components/schemas/ApplicabilityMatchKind"},{"type":"null"}]},"matched_risk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Matched Risk Id"},"matched_risk_short_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Risk Short Text"},"matched_risk_verdict":{"anyOf":[{"$ref":"#/components/schemas/ProductionRiskVerdict"},{"type":"null"}]},"match_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Note"},"matched_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched By Email"},"matched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Matched At"}},"type":"object","required":["applicability_risk_id","requirement_id","revision_id","requirement_text","guideline_filename","guideline_file_id","guideline_upload_id","requirement_citation","requirement_source_page","section_label","batch_index","short_text","explanation","remediation","severity","citations","match_kind","matched_risk_id","matched_risk_short_text","matched_risk_verdict","match_note","matched_by_email","matched_at"],"title":"ProducedRiskResponse"},"ProductionComparison":{"properties":{"production_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Production Run Id"},"production_run_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Production Run Time"},"risks_total":{"type":"integer","title":"Risks Total"},"internal_files_on_run":{"type":"integer","title":"Internal Files On Run"},"production_run_is_latest":{"type":"boolean","title":"Production Run Is Latest"},"suppressed_guideline_risks":{"type":"integer","title":"Suppressed Guideline Risks"},"guideline_risks":{"items":{"$ref":"#/components/schemas/ProductionRiskResponse"},"type":"array","title":"Guideline Risks"},"guideline_attribution_is_reliable":{"type":"boolean","title":"Guideline Attribution Is Reliable","default":false},"verdict_counts":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"type":"object","title":"Verdict Counts"}},"type":"object","required":["production_run_id","production_run_time","risks_total","internal_files_on_run","production_run_is_latest","suppressed_guideline_risks","guideline_risks","verdict_counts"],"title":"ProductionComparison"},"ProductionRiskResponse":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"short_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Text"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"severity":{"anyOf":[{"$ref":"#/components/schemas/RiskSeverity"},{"type":"null"}]},"verdict":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"dismiss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Reason"},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"reviewer_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Notes"},"superseded":{"type":"boolean","title":"Superseded"},"suppressed_by_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suppressed By Rule Id"},"is_reviewer_added":{"type":"boolean","title":"Is Reviewer Added"}},"type":"object","required":["risk_id","short_text","source_clause","severity","verdict","dismiss_reason","dismiss_note","reviewer_notes","superseded","suppressed_by_rule_id","is_reviewer_added"],"title":"ProductionRiskResponse"},"ProductionRiskVerdict":{"type":"string","enum":["flagged","dismissed_over_flagged","dismissed_accepted","dismissed_other","unreviewed"],"title":"ProductionRiskVerdict","description":"The reviewer's decision on a production risk, derived from its stored columns.\n\n`SUPERSEDED` is deliberately **not** a member: obsoletion is a property of the run, not a\ndecision by a reviewer, and a risk can be dismissed and later superseded. Collapsing them would\nthrow away the reviewer's decision — which is the thing this dashboard exists to compare\nagainst. It travels as its own boolean."},"ProgramType":{"type":"string","enum":["BSA/AML","ACH","Privacy","Lending","Internal Policies","Infosec","State Commercial Financing","B2B UDAAP","Consumer UDAAP","Disaster Recovery Best Practices","CFPB","Banking Operations","State Usury","TPRM Guidance","Yield Fund","Records Management","Payments (ETF Act)","Anti-Bribery and Corruption","Payments EMI","Anti-Trust and Anti-Competitive Behavior","Concise Language Guidelines","International Comparative Legal Guide to Securitisation","Card Brand Rules","General Policy Analysis","Consumer Lending - Federal (Non-Mortgage)","Commercial Lending - Federal","Real Estate Lending - Federal","Government Guaranteed Commercial Lending","Deposits","NYDFS 23 NYCRR 500","NIST CSF 2.0","CRI Profile","IT Frameworks"],"title":"ProgramType"},"ProgramTypeRegulations":{"properties":{"program_type":{"$ref":"#/components/schemas/MarketingProgramType"},"regulations":{"items":{"type":"string"},"type":"array","title":"Regulations"},"company_override":{"type":"boolean","title":"Company Override"}},"additionalProperties":false,"type":"object","required":["program_type","regulations","company_override"],"title":"ProgramTypeRegulations","description":"A regulation the analysis can check, and the prompt lines it checks it against."},"ProjectApprovalStatus":{"type":"string","enum":["approved","review_in_progress","review_upcoming","needs_remediation"],"title":"ProjectApprovalStatus"},"Projects":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"approval_status":{"$ref":"#/components/schemas/ProjectApprovalStatus"}},"type":"object","required":["project_id","project_name","approval_status"],"title":"Projects"},"ProposalApply":{"properties":{"keys":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","maxItems":50,"minItems":1,"title":"Keys"},"expected_revision":{"type":"integer","title":"Expected Revision"}},"additionalProperties":false,"type":"object","required":["keys","expected_revision"],"title":"ProposalApply","description":"Exactly the rows the operator means to write, named from the page they are looking at.\n\nNaming them — rather than applying whatever the row says is approved — is what catches a page\nwhose state was never saved, or was saved over by someone else: a key that isn't approved in\nthe stored proposal is refused with a message saying so, instead of quietly writing a\ndifferent set of product lines than the one on screen."},"ProposalFileOption":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"}},"additionalProperties":false,"type":"object","required":["file_id","filename"],"title":"ProposalFileOption","description":"A marketing standard the reviewer can attach."},"ProposalPatch":{"properties":{"expected_revision":{"type":"integer","title":"Expected Revision"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReviewedProductLine"},"type":"array","maxItems":50,"minItems":1},{"type":"null"}],"title":"Items"}},"additionalProperties":false,"type":"object","required":["expected_revision"],"title":"ProposalPatch","description":"A reviewer's save. Each *proposal-level* field is optional; only what is sent is changed.\n\nPer *item* the opposite holds — see `ReviewedProductLine`. `expected_revision` is the\nproposal's revision as the page rendered it; a save against a stale one is refused rather than\nmerged, so two tabs cannot overwrite each other's approvals."},"ProposalRevisionCheck":{"properties":{"expected_revision":{"type":"integer","title":"Expected Revision"}},"additionalProperties":false,"type":"object","required":["expected_revision"],"title":"ProposalRevisionCheck","description":"A body carrying only the revision the page was rendered from.\n\nUsed by discard, which changes no content but does end the review — so it has to be as\nprotected from a stale tab as a save is."},"ProposalTeamOption":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["team_id","name"],"title":"ProposalTeamOption"},"ProposeRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["company_id"],"title":"ProposeRequest"},"ProposedAutoRenew":{"properties":{"value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"accepted":{"type":"boolean","title":"Accepted","default":false}},"type":"object","title":"ProposedAutoRenew"},"ProposedDate":{"properties":{"value":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Value"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"accepted":{"type":"boolean","title":"Accepted","default":false}},"type":"object","title":"ProposedDate","description":"A single date the contract summary agent proposes for a term field.\n\n``accepted`` flips to True once the user ratifies it onto the Contract."},"ProposedKeyDate":{"properties":{"key_date_type":{"$ref":"#/components/schemas/KeyDateType"},"date":{"type":"string","format":"date","title":"Date"},"label":{"type":"string","title":"Label"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"replaces_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replaces Key Date Id"},"interval_years":{"type":"integer","title":"Interval Years","default":1}},"type":"object","required":["key_date_type","date","label"],"title":"ProposedKeyDate","description":"A key date the agent proposes. Materialized as a PROPOSED AnnualKeyDates\nrow in ``on_complete``; kept here for provenance in the run transcript."},"ProposedNoticePeriod":{"properties":{"value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"$ref":"#/components/schemas/NoticePeriodUnit"},{"type":"null"}]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"accepted":{"type":"boolean","title":"Accepted","default":false}},"type":"object","title":"ProposedNoticePeriod","description":"How much notice the documents require, as the *period* rather than the\ndeadline it implies.\n\nThe period is the rule the contract states; the deadline it lands on is\nproposed separately (``ContractSummaryChangeSet.termination_notice_date``),\nbecause the two are not always one subtraction apart. Keeping the period is\nwhat lets a deadline that *is* that subtraction follow an amended\nexpiration instead of going stale (``NoticeDateSource.DERIVED``)."},"ProposedObligations":{"properties":{"value":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Value"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"accepted":{"type":"boolean","title":"Accepted","default":false}},"type":"object","title":"ProposedObligations"},"ProposedProductLine":{"properties":{"key":{"type":"string","maxLength":64,"minLength":1,"title":"Key"},"operation":{"$ref":"#/components/schemas/MarketingPresetProposalOperation","default":"create"},"preset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preset Id"},"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"program_types":{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array","title":"Program Types"},"internal_file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":25,"title":"Internal File Ids"},"guideline_notes":{"items":{"type":"string","maxLength":500},"type":"array","maxItems":20,"title":"Guideline Notes"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"rationale":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Rationale"},"approved":{"type":"boolean","title":"Approved","default":false},"applied_preset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applied Preset Id"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ProposedProductLine","description":"One product line, as stored and as read back.\n\nEverything except `key` and `operation` is what the product line should end up looking like —\nthe same fields the customer-facing create/update accepts — so the review page is editing a\ntarget state rather than a diff, and applying it is a plain write.\n\nThis is the *stored* shape, so its fields carry defaults: it has to be able to read a row\nwritten before a field existed. The two shapes that accept input from outside\n(`ProposedProductLineDraft`, `ReviewedProductLine`) tighten that."},"ProspectiveKeyDateRow":{"properties":{"key_date_type":{"$ref":"#/components/schemas/KeyDateType"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"date":{"type":"string","format":"date","title":"Date"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key_date_type","upload_id","date","label"],"title":"ProspectiveKeyDateRow"},"QuestionType":{"type":"string","enum":["free","one","multiple"],"title":"QuestionType"},"QuestionnaireAnswer_ChoiceAnswer_":{"properties":{"question":{"type":"string","title":"Question"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"type":{"$ref":"#/components/schemas/QuestionType"},"answer":{"items":{"$ref":"#/components/schemas/ChoiceAnswer-Output"},"type":"array","title":"Answer"},"compliant":{"$ref":"#/components/schemas/ComplianceStatus","default":"not_applicable"},"vendor_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireVendorAnswer"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["question","type","answer"],"title":"QuestionnaireAnswer[ChoiceAnswer]"},"QuestionnaireAnswer_FreeAnswer_":{"properties":{"question":{"type":"string","title":"Question"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"type":{"$ref":"#/components/schemas/QuestionType"},"answer":{"items":{"$ref":"#/components/schemas/FreeAnswer-Output"},"type":"array","title":"Answer"},"compliant":{"$ref":"#/components/schemas/ComplianceStatus","default":"not_applicable"},"vendor_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireVendorAnswer"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["question","type","answer"],"title":"QuestionnaireAnswer[FreeAnswer]"},"QuestionnaireSection":{"properties":{"section_name":{"type":"string","title":"Section Name"},"responses":{"items":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"}]},"type":"array","title":"Responses"}},"type":"object","required":["section_name","responses"],"title":"QuestionnaireSection"},"QuestionnaireVendorAnswer":{"properties":{"answer":{"type":"string","title":"Answer","default":""},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"QuestionnaireVendorAnswer"},"RatifyKeyDateRequest":{"properties":{"lead_days":{"items":{"type":"integer"},"type":"array","title":"Lead Days","default":[30,60,90]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"key_date_type":{"anyOf":[{"$ref":"#/components/schemas/KeyDateType"},{"type":"null"}]},"month":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":1.0},{"type":"null"}],"title":"Month"},"day":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Day"},"first_year":{"anyOf":[{"type":"integer","minimum":1900.0},{"type":"null"}],"title":"First Year"},"interval_years":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Interval Years"}},"type":"object","title":"RatifyKeyDateRequest","description":"Reminder lead-days to schedule when ratifying a proposed key date.\n\nOptional fields let the user adjust the proposed row before it becomes a\nreal key date; when omitted, the proposed row's existing values are kept."},"RatingOptionView":{"properties":{"option_id":{"type":"string","format":"uuid","title":"Option Id"},"label":{"type":"string","title":"Label"},"position":{"type":"integer","title":"Position"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"}},"type":"object","required":["option_id","label","position","hex_color"],"title":"RatingOptionView","description":"One level of the tenant's INHERENT_RISK_LEVEL scale.\n\nThe scale is per-tenant and variable length, so the UI renders N cells from\nthis list rather than assuming five. `position` is 1-based and derived from\norder, not from `order_index`, which may be sparse."},"ReanalyzeResponse":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"}},"type":"object","required":["agent_run_id"],"title":"ReanalyzeResponse"},"ReclassifyResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ReclassifyResultItem"},"type":"array","title":"Results"},"stats":{"$ref":"#/components/schemas/ReclassifyStats"}},"type":"object","required":["results","stats"],"title":"ReclassifyResponse"},"ReclassifyResultItem":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"check_label":{"type":"string","title":"Check Label"},"thinking_text":{"type":"string","title":"Thinking Text"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"}},"type":"object","required":["requirement_id","check_label","thinking_text","input_tokens","output_tokens"],"title":"ReclassifyResultItem"},"ReclassifyStats":{"properties":{"total_checks":{"type":"integer","title":"Total Checks"},"total_input_tokens":{"type":"integer","title":"Total Input Tokens"},"total_output_tokens":{"type":"integer","title":"Total Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"elapsed_seconds":{"type":"number","title":"Elapsed Seconds"},"input_tokens_per_minute":{"type":"number","title":"Input Tokens Per Minute"}},"type":"object","required":["total_checks","total_input_tokens","total_output_tokens","total_tokens","elapsed_seconds","input_tokens_per_minute"],"title":"ReclassifyStats"},"ReconcileAction":{"type":"string","enum":["create","update","archive","reactivate","unchanged"],"title":"ReconcileAction","description":"What a workbook import does to one matched disclosure."},"RecordTermDecisionRequest":{"properties":{"decision":{"$ref":"#/components/schemas/ContractRenewalDecision"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["decision"],"title":"RecordTermDecisionRequest","description":"``decision`` is one of a fixed set, so there is no option id to look up.\n\nNo next-period dates: recording is intent, and nobody knows when the new term\nends until the amendment is signed — that lands on the successor\n``POST .../decision/action`` creates."},"ReferenceDocumentView":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["upload_id","filename"],"title":"ReferenceDocumentView","description":"A document the reviewer attached to a training request.\n\n`upload_id` rather than `file_id`, because that is what the preview hook\ntakes — the same reason `CitationView` carries it."},"RegressionComparison":{"properties":{"regression_id":{"type":"string","format":"uuid","title":"Regression Id"},"outcome":{"$ref":"#/components/schemas/RegressionOutcome"},"baseline_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseline Verdict"},"best_match_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Match Score"},"near_miss":{"type":"boolean","title":"Near Miss"},"is_net_new":{"type":"boolean","title":"Is Net New"},"before":{"anyOf":[{"$ref":"#/components/schemas/RiskDetail"},{"type":"null"}]},"after":{"anyOf":[{"$ref":"#/components/schemas/RiskDetail"},{"type":"null"}]},"near_miss_candidate":{"anyOf":[{"$ref":"#/components/schemas/RiskDetail"},{"type":"null"}]},"after_requirements":{"items":{"type":"string"},"type":"array","title":"After Requirements"}},"type":"object","required":["regression_id","outcome","baseline_verdict","best_match_score","near_miss","is_net_new","before","after","after_requirements"],"title":"RegressionComparison","description":"One baseline risk beside whatever the new path produced for it.\n\n`after` is null for a lost flag or a correctly-dropped dismissal — that absence *is* the finding,\nso it is a null rather than an empty object. `before` is null on a net-new row, which is the same\ncomparison read the other way round."},"RegressionOutcome":{"type":"string","enum":["flagged_carried","flagged_lost","dismissed_dropped","dismissed_reintroduced","unreviewed","suppressed"],"title":"RegressionOutcome","description":"What became of one baseline risk under the new path.\n\nThe reviewer's verdict on the baseline risk decides which pair applies, and the two pairs are\ndifferent questions. Losing a **flagged** risk is lost recall — a reviewer said it was real.\nReproducing a **dismissed** one is a false positive the old path's validation pass caught and\n`dedupe_findings` does not, which is the number the rollout is expected to move."},"RegressionRow":{"properties":{"regression_id":{"type":"string","format":"uuid","title":"Regression Id"},"outcome":{"$ref":"#/components/schemas/RegressionOutcome"},"baseline_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseline Verdict"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"best_match_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Match Score"},"near_miss":{"type":"boolean","title":"Near Miss"},"is_net_new":{"type":"boolean","title":"Is Net New"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"item_id":{"type":"string","format":"uuid","title":"Item Id"}},"type":"object","required":["regression_id","outcome","baseline_verdict","summary","source_clause","best_match_score","near_miss","is_net_new","filename","item_id"],"title":"RegressionRow","description":"One baseline risk, and what became of it."},"RegulatoryReviewInstanceVersionStatus":{"type":"string","enum":["found","resolved"],"title":"RegulatoryReviewInstanceVersionStatus","description":"Whether a regulatory review instance was found or resolved in a given file version."},"RegulatoryReviewRequirementInstanceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"short_text":{"type":"string","title":"Short Text"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"explanation":{"type":"string","title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"dismissed":{"type":"boolean","title":"Dismissed","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"version_status":{"anyOf":[{"$ref":"#/components/schemas/RegulatoryReviewInstanceVersionStatus"},{"type":"null"}]}},"type":"object","required":["id","upload_id","short_text","severity","explanation","created_at"],"title":"RegulatoryReviewRequirementInstanceResponse"},"RegulatoryReviewRequirementInstancesListResponse":{"properties":{"instances":{"items":{"$ref":"#/components/schemas/RegulatoryReviewRequirementInstanceResponse"},"type":"array","title":"Instances"},"is_processing":{"type":"boolean","title":"Is Processing","default":false},"has_run":{"type":"boolean","title":"Has Run","default":false}},"type":"object","title":"RegulatoryReviewRequirementInstancesListResponse"},"RemoveUserResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"RemoveUserResponse"},"RenameFileRequest":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"RenameFileRequest"},"RenameMarketingTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"RenameMarketingTeamRequest"},"RenameTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"RenameTeamRequest"},"RenameVendorRequest":{"properties":{"vendor_name":{"type":"string","title":"Vendor Name"}},"type":"object","required":["vendor_name"],"title":"RenameVendorRequest"},"ReopenTaskRequest":{"properties":{"reason":{"type":"string","maxLength":65535,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"ReopenTaskRequest"},"ReorderRiskAreasRequest":{"properties":{"risk_area_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Risk Area Ids"}},"type":"object","title":"ReorderRiskAreasRequest"},"ReorderRiskFactorsRequest":{"properties":{"risk_factor_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Risk Factor Ids"}},"type":"object","title":"ReorderRiskFactorsRequest","description":"The destination area's full ordered factor list.\n\nAccepts factors that currently live in another area, which is what makes a\ncross-area drag one call rather than a move followed by a reorder."},"ReportingAgentRunResult":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"result_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Upload Id"}},"type":"object","required":["agent_run_id","agent_type","status"],"title":"ReportingAgentRunResult"},"ReportingStageDetail":{"properties":{"kind":{"type":"string","const":"review_reporting","title":"Kind","default":"review_reporting"},"report_count":{"type":"integer","title":"Report Count"}},"type":"object","required":["report_count"],"title":"ReportingStageDetail","description":"How many reports the reporting stage has produced so far."},"RequestDocumentChangesRequest":{"properties":{"body":{"type":"string","maxLength":65535,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"RequestDocumentChangesRequest"},"RequestReviewRequest":{"properties":{"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"request_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Request Ids"}},"type":"object","required":["requesting_company_id","request_ids"],"title":"RequestReviewRequest"},"RequirementApprovalStatus":{"type":"string","enum":["pending","approved","issue_created"],"title":"RequirementApprovalStatus","description":"Approval status for an evidence requirement check."},"RequirementAttachment":{"type":"string","enum":["document","text"],"title":"RequirementAttachment","description":"How the collateral was put in front of the judge.\n\nRecorded because a verdict reached from the text layer is not the same claim as one reached from\nthe rendered page, and afterwards the two are indistinguishable. A `PASSED` on a rule about a\nlogo, a disclosure's prominence or where a footnote sits means nothing if the model only ever saw\nextracted text — and `prompt_fingerprint` cannot tell them apart, because the system prompt, the\ntool and the schema are identical either way."},"RequirementChangeKind":{"type":"string","enum":["extracted","edited","disabled","enabled","archived","restored","superseded"],"title":"RequirementChangeKind","description":"What a revision was for.\n\nRedundant with comparing a revision to its predecessor, and that is the point: the reason a\nchange was made is the part a diff cannot recover."},"RequirementCheckFeedbackResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"feedback_type":{"$ref":"#/components/schemas/RequirementCheckFeedbackType"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","feedback_type","created_at"],"title":"RequirementCheckFeedbackResponse"},"RequirementCheckFeedbackType":{"type":"string","enum":["compliance_inaccurate","answer_inaccurate","inherent_risk_inaccurate","controls_inaccurate","control_strength_inaccurate","other"],"title":"RequirementCheckFeedbackType"},"RequirementCheckItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"question_text":{"type":"string","title":"Question Text"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context"},"answer_text":{"type":"string","title":"Answer Text"},"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"}},"type":"object","required":["id","question_text","additional_context","answer_text","check_label","reviewer_note"],"title":"RequirementCheckItem"},"RequirementCheckOutcome":{"type":"string","enum":["passed","failed","not_determined"],"title":"RequirementCheckOutcome","description":"What happened when one requirement met one piece of collateral.\n\nStored rather than derived. \"We checked 34 requirements and 3 failed\" cannot be reconstructed\nfrom the risks alone: a requirement that produced no finding is indistinguishable in\n`document_risks` from one that was never evaluated, and that difference is the whole feature.\n\n**`NOT_DETERMINED` is why the model is asked to answer for every rule** rather than only to\nreport failures. Silence has two meanings — \"the collateral satisfies this\" and \"I cannot tell\nfrom what the collateral shows\" — and a panel that reads the first from the absence of a finding\nclaims a pass the model never gave. The judging contract therefore makes each rule land in\nexactly one of these three, and a rule the model omits altogether lands here too."},"RequirementCheckPacketOption":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["request_id","label"],"title":"RequirementCheckPacketOption"},"RequirementCheckResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"evidence_packet_id":{"type":"string","format":"uuid","title":"Evidence Packet Id"},"evidence_packet_section_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evidence Packet Section Id"},"risk_area_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Area Name"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"question_id":{"type":"string","format":"uuid","title":"Question Id"},"question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}],"title":"Question"},"answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Answer"},"compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"ai_compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"ai_check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Check Label"},"classified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Classified At"},"note":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireVendorAnswer"},{"type":"null"}]},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"approval_status":{"$ref":"#/components/schemas/RequirementApprovalStatus","default":"pending"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"collaborative_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Collaborative Task Id"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/RequirementCloser"},{"type":"null"}]},"feedback":{"items":{"$ref":"#/components/schemas/RequirementCheckFeedbackResponse"},"type":"array","title":"Feedback"},"check_type":{"$ref":"#/components/schemas/EvidenceRequirementCheckType","default":"REQUIREMENT"},"inherent_risk_question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"},{"type":"null"}],"title":"Inherent Risk Question"},"inherent_risk_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Inherent Risk Answer"},"suggested_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Inherent Risk Label"},"suggested_inherent_risk_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Inherent Risk Rationale"},"suggested_control_strength_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Control Strength Label"},"suggested_control_strength_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Control Strength Rationale"},"manual_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manual Inherent Risk Label"},"manual_control_strength_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manual Control Strength Label"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"}},"type":"object","required":["id","evidence_packet_id","question_id","question"],"title":"RequirementCheckResponse","description":"Response model for a single requirement check."},"RequirementChecksListResponse":{"properties":{"requirements":{"items":{"$ref":"#/components/schemas/RequirementCheckResponse"},"type":"array","title":"Requirements"},"total_count":{"type":"integer","title":"Total Count","default":0},"pending_count":{"type":"integer","title":"Pending Count","default":0},"approved_count":{"type":"integer","title":"Approved Count","default":0},"issue_created_count":{"type":"integer","title":"Issue Created Count","default":0}},"type":"object","title":"RequirementChecksListResponse","description":"Response model for a list of requirement checks."},"RequirementCitation":{"properties":{"guideline_file_id":{"type":"string","format":"uuid","title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"guideline_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline Upload Id"},"grounding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grounding"}},"type":"object","required":["guideline_file_id"],"title":"RequirementCitation","description":"Where the requirement itself sits in the standards document it came from.\n\nA serialized `GroundedSpan` plus the exact version its boxes were measured against. The version\nis the load-bearing half: the boxes are coordinates in the bytes the decomposition read, so\nresolving the document any other way draws the highlight in the wrong place on a standard that\nhas since been re-uploaded."},"RequirementCitationResponse":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"cited_text":{"type":"string","title":"Cited Text"},"start_page_number":{"type":"integer","title":"Start Page Number"},"end_page_number":{"type":"integer","title":"End Page Number"},"bounding_boxes":{"items":{"$ref":"#/components/schemas/BoundingBox"},"type":"array","title":"Bounding Boxes"}},"type":"object","required":["upload_id","cited_text","start_page_number","end_page_number"],"title":"RequirementCitationResponse"},"RequirementCloser":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","name","email"],"title":"RequirementCloser","description":"The user who closed out a requirement (approved it or created an issue)."},"RequirementComplianceStatus":{"type":"string","enum":["compliant","non_compliant","partially_compliant","no_evidence","not_applicable"],"title":"RequirementComplianceStatus","description":"Compliance status for an evidence requirement."},"RequirementCoverage":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"collateral_checked":{"type":"integer","title":"Collateral Checked","default":0},"counts":{"$ref":"#/components/schemas/CoverageOutcomeCounts","default":{"passed":0,"failed":0,"not_determined":0}},"verdicts":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"type":"object","title":"Verdicts","default":{}},"collateral":{"items":{"$ref":"#/components/schemas/RequirementCoverageCollateral"},"type":"array","title":"Collateral","default":[]}},"type":"object","required":["requirement_id"],"title":"RequirementCoverage","description":"How one requirement has fared across every piece of collateral it has been applied to."},"RequirementCoverageCollateral":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"outcome":{"$ref":"#/components/schemas/RequirementCheckOutcome"},"verdicts":{"items":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"type":"array","title":"Verdicts","default":[]},"risk_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Risk Ids","default":[]}},"type":"object","required":["run_id","file_id","checked_at","outcome"],"title":"RequirementCoverageCollateral","description":"One piece of collateral this requirement was checked against, and what came of it."},"RequirementCoverageSummary":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"collateral_checked":{"type":"integer","title":"Collateral Checked","default":0},"counts":{"$ref":"#/components/schemas/CoverageOutcomeCounts","default":{"passed":0,"failed":0,"not_determined":0}},"confirmed":{"type":"integer","title":"Confirmed","default":0},"false_positive":{"type":"integer","title":"False Positive","default":0}},"type":"object","required":["requirement_id"],"title":"RequirementCoverageSummary","description":"One requirement's record, compressed to what a row in the library can show.\n\nSeparate from `RequirementCoverage` because the library asks about every requirement on screen at\nonce — up to a page of two hundred — and the full record carries a list of collateral per\nrequirement. A page of those is a payload nobody reads and a query per row.\n\n`confirmed` and `false_positive` count only `FLAGGED` and `DISMISSED_OVER_FLAGGED`. The other\nthree verdicts are evidence of nothing: a dismissal with no structured reason, and a risk nobody\nhas looked at, would turn \"not reviewed yet\" into a verdict on the rule."},"RequirementDebug":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"revision_number":{"type":"integer","title":"Revision Number"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"},"collateral_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"provenance":{"$ref":"#/components/schemas/RequirementProvenance"},"flagged_on":{"items":{"$ref":"#/components/schemas/RequirementFlaggedOn"},"type":"array","title":"Flagged On"},"flagged_on_truncated":{"type":"boolean","title":"Flagged On Truncated","default":false},"drift":{"items":{"$ref":"#/components/schemas/DriftRow"},"type":"array","title":"Drift"},"drift_truncated":{"type":"boolean","title":"Drift Truncated","default":false}},"type":"object","required":["requirement_id","revision_id","revision_number","state","requirement_text","judging_guidance","trigger_terms","collateral_types","marketing_team_ids","provenance","flagged_on","drift"],"title":"RequirementDebug","description":"Everything needed to judge one requirement: what it says, where it came from, what it did."},"RequirementDownvoteStatus":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"downvote_count":{"type":"integer","title":"Downvote Count"},"downvoted_by_me":{"type":"boolean","title":"Downvoted By Me"},"live_state":{"$ref":"#/components/schemas/GuidelineRequirementState"}},"type":"object","required":["requirement_id","downvote_count","downvoted_by_me","live_state"],"title":"RequirementDownvoteStatus","description":"How this requirement currently stands for the calling reviewer.\n\nA vote changes nothing about the rule, so nothing here reports a state change: `live_state` is\nwhatever the library says, and it only ever moves because a person moved it."},"RequirementDraft":{"properties":{"requirement_text":{"type":"string","maxLength":8192,"minLength":1,"title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Judging Guidance"},"trigger_terms":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Trigger Terms"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"}},"type":"object","required":["requirement_text"],"title":"RequirementDraft","description":"A wording and scope nobody has saved yet.\n\nEvery field is required rather than optional-with-carry-forward, unlike the PATCH this precedes.\nA test has to judge *something specific*, and a payload that omitted the scope would silently\ninherit the live rule's — so a reviewer who had narrowed the collateral types on screen would be\nshown a result for the scope they were replacing."},"RequirementExample":{"properties":{"kind":{"$ref":"#/components/schemas/RequirementExampleKind"},"outcome":{"$ref":"#/components/schemas/RequirementCheckOutcome"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms","default":[]},"findings":{"type":"integer","title":"Findings","default":0},"citation":{"$ref":"#/components/schemas/RequirementCitation"},"risk":{"anyOf":[{"$ref":"#/components/schemas/RequirementExampleRisk"},{"type":"null"}]}},"type":"object","required":["kind","outcome","run_id","file_id","document_id","checked_at","revision_id","requirement_text","citation"],"title":"RequirementExample","description":"One time this requirement met one piece of collateral, and what came of it."},"RequirementExampleKind":{"type":"string","enum":["fired","fired_no_finding","not_fired"],"title":"RequirementExampleKind","description":"What kind of evidence one example is.\n\n`FIRED_NO_FINDING` is the one worth naming. A `FAILED` check can end with no risk at all — the\nfindings it produced pass through obsolescence deduplication and, for some companies, a\nconfidence filter, both of which drop dicts before anything reaches `document_risks`. Without a\nkind of its own, the rule a `FIRE_RATE` ranking just put first could open an empty flipper, and a\nreader would read that as the surface being broken rather than as the answer it is."},"RequirementExampleRisk":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"citations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array"},{"type":"null"}],"title":"Citations"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"dismiss_reason":{"anyOf":[{"$ref":"#/components/schemas/DismissReason"},{"type":"null"}]},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"verdict":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"actioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Actioned At"},"superseded":{"type":"boolean","title":"Superseded","default":false},"suppressed":{"type":"boolean","title":"Suppressed","default":false}},"type":"object","required":["risk_id","short_text","explanation","severity","verdict"],"title":"RequirementExampleRisk","description":"The finding one check produced, as a reviewer sees it on the card.\n\nA subset of the risk rather than the whole `DocumentRiskResponse`: this is read beside the\nrequirement being edited, so what earns its place is what the wording has to answer for — the\nclaim, the passage, the reviewer's decision and the note they left with it.\n\n`source_clause` is deliberately **not** here. It is the machine-readable routing prefix plus the\nrule, and the rule is already the subject of the page; including it would put a second, staler\ncopy of the wording beside the live one."},"RequirementExamples":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"examples":{"items":{"$ref":"#/components/schemas/RequirementExample"},"type":"array","title":"Examples","default":[]},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["requirement_id"],"title":"RequirementExamples","description":"Examples of one requirement's history, grouped by nothing — the client groups by verdict.\n\n`limit` is applied **per requested verdict**, so asking for five with two verdicts returns up to\nten rows. That is what the surface needs (the last five dismissals *and* the confirmations, on\nscreen together) and it is stated because \"limit 5\" returning ten is otherwise something a caller\ndiscovers."},"RequirementFeedbackDetail":{"properties":{"feedback_id":{"type":"string","format":"uuid","title":"Feedback Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"question":{"type":"string","title":"Question"},"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"ai_check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Check Label"},"feedback_type":{"type":"string","title":"Feedback Type"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["feedback_id","requirement_id","review_id","question","check_label","ai_check_label","feedback_type","note","created_at"],"title":"RequirementFeedbackDetail"},"RequirementFlaggedOn":{"properties":{"check_id":{"type":"string","format":"uuid","title":"Check Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"outcome":{"$ref":"#/components/schemas/RequirementCheckOutcome"},"risk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Risk Id"},"risk_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Summary"},"risk_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Severity"},"link_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Source"},"from_this_sweep":{"type":"boolean","title":"From This Sweep"},"run_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Run Time"}},"type":"object","required":["check_id","run_id","file_id","upload_id","filename","outcome","risk_id","risk_summary","risk_severity","link_source","from_this_sweep","run_time"],"title":"RequirementFlaggedOn","description":"One judgement of this requirement against one piece of collateral.\n\nA *check*, not a piece of collateral, and not a finding. Deduplication makes the risk link\nmany-to-many, so one check with two merged findings arrives as two rows — `check_id` is what\nlets a reader collapse them. Counting rows as collateral is wrong on a second axis too: a sweep\nanalyses every piece twice by design, so one asset contributes at least two checks."},"RequirementInstanceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"ai_compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"citations":{"items":{"$ref":"#/components/schemas/RequirementCitationResponse"},"type":"array","title":"Citations"}},"type":"object","required":["id","requirement_id","upload_id"],"title":"RequirementInstanceResponse"},"RequirementInstancesListResponse":{"properties":{"instances":{"items":{"$ref":"#/components/schemas/RequirementInstanceResponse"},"type":"array","title":"Instances"},"has_applicable":{"type":"boolean","title":"Has Applicable","default":false},"is_processing":{"type":"boolean","title":"Is Processing","default":false}},"type":"object","title":"RequirementInstancesListResponse"},"RequirementListResponse":{"properties":{"requirements":{"items":{"$ref":"#/components/schemas/GuidelineRequirementResponse"},"type":"array","title":"Requirements"},"truncated":{"type":"boolean","title":"Truncated"},"signal_floor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Signal Floor"},"signal_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Signal Window Days"},"max_requirements_per_state_change":{"type":"integer","title":"Max Requirements Per State Change"}},"type":"object","required":["requirements","truncated","max_requirements_per_state_change"],"title":"RequirementListResponse","description":"A page of the library.\n\n`truncated` rather than a total: counting the matches for an unanchored `ILIKE` costs the same scan\ntwice, and what a reader needs to know is that there is more, not exactly how much more."},"RequirementProvenance":{"properties":{"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"guideline_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline Upload Id"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"source_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Text"},"matched_terms":{"items":{"type":"string"},"type":"array","title":"Matched Terms"},"match_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Kind"},"boxes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Boxes"}},"type":"object","required":["guideline_file_id","guideline_filename","guideline_upload_id","section_label","title","source_page","source_text","matched_terms","match_kind","boxes"],"title":"RequirementProvenance","description":"Where in the standards document this obligation came from.\n\nThe point of the whole panel: a reviewer deciding whether a rule is worth keeping has to read\nwhat it was extracted *from*, not just what the model wrote. `source_text` is the paragraph the\ngrounding pass located; it is a lexical best guess and never a quotation, which `match_kind`\nqualifies and the surface says out loud.\n\n`score` is deliberately **not** here. It reaches 1.0 exactly when the paraphrase dropped the\ndiscriminating word, so it is highest when it is least trustworthy — surfacing it, or ordering\nanything by it, reads as confidence while measuring the opposite."},"RequirementRevisionResponse":{"properties":{"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"revision_number":{"type":"integer","title":"Revision Number"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"},"change_kind":{"$ref":"#/components/schemas/RequirementChangeKind"},"change_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Note"},"created":{"type":"string","format":"date-time","title":"Created"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"superseded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Superseded At"}},"type":"object","required":["revision_id","revision_number","state","requirement_text","judging_guidance","collateral_types","marketing_team_ids","trigger_terms","change_kind","change_note","created","created_by_email","superseded_at"],"title":"RequirementRevisionResponse","description":"One entry in a requirement's history: what it said, who changed it, and when."},"RequirementRiskCitation":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"requirement_text":{"type":"string","title":"Requirement Text"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms","default":[]},"citation":{"$ref":"#/components/schemas/RequirementCitation"},"source":{"$ref":"#/components/schemas/RequirementRiskSource","default":"model"}},"type":"object","required":["requirement_id","revision_id","requirement_text","citation"],"title":"RequirementRiskCitation","description":"One requirement a risk answers to, rendered from the revision that was actually judged."},"RequirementRiskSource":{"type":"string","enum":["model","deduped"],"title":"RequirementRiskSource","description":"How a link between a risk and a requirement came to exist.\n\n`MODEL` is the ordinary case: the batch judge named this requirement's number. `DEDUPED` marks a\nlink inherited when two findings about the same passage were merged — the risk on screen is the\nsurvivor, and without this the merged finding's requirement would look like one the model never\ncited. A reader deciding whether the citation is trustworthy needs the difference, because a\ndeduped link is one step further from what the model actually said."},"RequirementSignal":{"properties":{"collateral_checked":{"type":"integer","title":"Collateral Checked"},"checks_failed":{"type":"integer","title":"Checks Failed"},"checks_passed":{"type":"integer","title":"Checks Passed"},"checks_not_determined":{"type":"integer","title":"Checks Not Determined"},"checks_current_revision":{"type":"integer","title":"Checks Current Revision"},"verdicts":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/ProductionRiskVerdict"},"type":"object","title":"Verdicts"},"risks_superseded":{"type":"integer","title":"Risks Superseded"},"false_positive_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"False Positive Rate"},"dismissal_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dismissal Rate"},"fire_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fire Rate"}},"type":"object","required":["collateral_checked","checks_failed","checks_passed","checks_not_determined","checks_current_revision","verdicts","risks_superseded","false_positive_rate","dismissal_rate","fire_rate"],"title":"RequirementSignal","description":"One requirement's track record, as a ranked read reports it.\n\nPresent only when the list was asked for an `order`; `None` otherwise, so an ordinary library\nread pays neither the aggregate nor the payload. A row whose requirement has never been checked\nis absent from a ranked read entirely rather than carrying zeros — there is nothing to rank.\n\n**The two halves are in different units and must not be added or compared.** `collateral_checked`\nand the three `checks_*` count *checks* — one per (evaluation, requirement), which\n`uq_marketing_requirement_check_once_per_evaluation` guarantees. The `risks_*` count *risks*, and\none check can produce several, so `risks_flagged + risks_over_flagged` is not bounded by\n`checks_failed`.\n\nThe rates come from the server because the server ordered by them. A client re-deriving them\nwould be a second definition of the number the ranking was built on. `None` means no evidence,\nwhich is a different claim from `0.0`."},"RequirementSignalOrder":{"type":"string","enum":["false_positive_rate","dismissal_rate","dismissal_volume","fire_rate","fire_volume"],"title":"RequirementSignalOrder","description":"What a ranking of a company's requirements is ranked *by*.\n\nFive orders because the two surfaces ask different questions and each wants a rate and a\nvolume. A rate finds the rule that is usually wrong; a volume finds the rule that is wrong most\noften. Neither subsumes the other, and offering only one is how a screen ends up either\ndominated by rules with three data points or blind to a rule that is wrong 40% of the time on\nhundreds of assets.\n\n`FIRE_RATE` applies `MIN_CHECKED_FOR_RATE`; the two verdict rates are held down by\n`FALSE_POSITIVE_PRIOR_REVIEWS` instead, so a genuinely bad two-of-two stays visible without\ntopping the list. The two volumes need neither: a count is already its own evidence."},"RequirementStateOutcome":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"applied":{"type":"boolean","title":"Applied"},"state":{"anyOf":[{"$ref":"#/components/schemas/GuidelineRequirementState"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["requirement_id","applied","state","reason"],"title":"RequirementStateOutcome","description":"What happened to one requirement in a bulk state change.\n\nEvery requested id gets a row whether it changed or not — with the caveat that an id named twice\nis one requirement and gets one row, so `applied + skipped` counts distinct ids rather than list\nentries. A bulk write that silently dropped the ones it could not apply would leave the caller\nunable to tell \"already off\" from \"refused\" from \"not yours\"."},"RequirementStateRequest":{"properties":{"requirement_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":1000,"title":"Requirement Ids"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"change_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Note"}},"type":"object","required":["requirement_ids","state"],"title":"RequirementStateRequest","description":"A bulk enable / disable / remove across selected requirements."},"RequirementStateResponse":{"properties":{"applied":{"type":"integer","title":"Applied"},"skipped":{"type":"integer","title":"Skipped"},"outcomes":{"items":{"$ref":"#/components/schemas/RequirementStateOutcome"},"type":"array","title":"Outcomes"}},"type":"object","required":["applied","skipped","outcomes"],"title":"RequirementStateResponse"},"RequirementSuggestion":{"properties":{"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms","default":[]},"collateral_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"changes":{"items":{"type":"string"},"type":"array","title":"Changes","default":[]},"rationale":{"type":"string","title":"Rationale"},"rule_change_needed":{"type":"boolean","title":"Rule Change Needed","default":true},"dismissals_considered":{"type":"integer","title":"Dismissals Considered","default":0},"confirmations_considered":{"type":"integer","title":"Confirmations Considered","default":0},"tests_considered":{"type":"integer","title":"Tests Considered","default":0}},"type":"object","required":["requirement_text","rationale"],"title":"RequirementSuggestion","description":"A proposed rewording. Nothing is written — the reviewer applies it through the ordinary PATCH.\n\n`changes` is what the surface renders under each field it touched, as the provenance line the\ndesign asks for: *\"Added: internal ticket references exempt — from 19 dismissals as Already\naddressed\"*. One entry per field the model changed, in its own words, naming the evidence it came\nfrom. A proposal a reviewer cannot trace back to a dismissal is one they have to take on faith."},"RequirementTest":{"properties":{"test_id":{"type":"string","format":"uuid","title":"Test Id"},"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"base_revision_id":{"type":"string","format":"uuid","title":"Base Revision Id"},"status":{"$ref":"#/components/schemas/RequirementTestStatus"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms","default":[]},"collateral_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"model":{"type":"string","title":"Model"},"llm_calls":{"type":"integer","title":"Llm Calls","default":0},"totals":{"$ref":"#/components/schemas/RequirementTestTotals","default":{"total":0,"reviewed_judged":0,"agree":0,"disagree":0,"unreviewed":0,"undetermined":0,"not_considered":0,"unfinished":0,"pending":0,"omitted":0}},"items":{"items":{"$ref":"#/components/schemas/RequirementTestItem"},"type":"array","title":"Items","default":[]}},"type":"object","required":["test_id","requirement_id","base_revision_id","status","requirement_text","created","model"],"title":"RequirementTest","description":"One test: the draft, the assets, and what came of it."},"RequirementTestItem":{"properties":{"item_id":{"type":"string","format":"uuid","title":"Item Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id"},"collateral_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collateral Type"},"state":{"$ref":"#/components/schemas/RequirementTestItemState"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/RequirementCheckOutcome"},{"type":"null"}]},"excluded_by":{"items":{"$ref":"#/components/schemas/ApplicabilityExclusion"},"type":"array","title":"Excluded By","default":[]},"attachment":{"anyOf":[{"$ref":"#/components/schemas/RequirementAttachment"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"short_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Text"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"collateral_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collateral Clause"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"citations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Citations"},"baseline_outcome":{"anyOf":[{"$ref":"#/components/schemas/RequirementCheckOutcome"},{"type":"null"}]},"baseline_verdict":{"anyOf":[{"$ref":"#/components/schemas/ProductionRiskVerdict"},{"type":"null"}]},"baseline_risk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Baseline Risk Id"},"baseline_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Baseline Run Id"},"fired":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fired"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["item_id","file_id","state"],"title":"RequirementTestItem","description":"One asset in a test: what the reviewer said, what the draft did, and whether they agree."},"RequirementTestItemState":{"type":"string","enum":["pending","judged","not_considered","unfinished"],"title":"RequirementTestItemState","description":"Why one collateral in a test has the answer it has.\n\nSeparate from `RequirementCheckOutcome`, which says what the *judge* decided. These say\nwhether the judge ran at all, and the distinction is the point of the surface: a rule that no\nlonger fires because the reviewer's new trigger terms exclude the asset has not been judged\nlenient, it has been scoped away — and a reviewer editing trigger terms needs to see that rather\nthan a `PASSED` that looks like the model changing its mind."},"RequirementTestScope":{"properties":{"reviewed":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Reviewed","default":[]},"unreviewed":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Unreviewed","default":[]},"reviewed_total":{"type":"integer","title":"Reviewed Total","default":0},"unreviewed_total":{"type":"integer","title":"Unreviewed Total","default":0}},"type":"object","title":"RequirementTestScope","description":"What a press of Test would judge, before it is pressed.\n\nTwo lists rather than one, because they are two different presses: the reviewed assets are what\nmakes a result readable as agreement, and the rest are what a rule that fires too much has to be\ntried against. Both are capped like the test itself, so the numbers on screen are the numbers the\ntest will take."},"RequirementTestStatus":{"type":"string","enum":["running","succeeded","partial","failed"],"title":"RequirementTestStatus","description":"Where a test is, and how it ended.\n\n`RUNNING` is the state the request returns in: the row is written and the fan-out dispatched, so\nthe surface has something to poll from the first tick rather than a spinner with nothing behind it.\n\n`PARTIAL` is its own member rather than a flag on `SUCCEEDED`. A test where two of twenty-two\nassets never answered is a real result worth keeping — eighteen answers is the answer — but a\nsuggestion built from it has to know it is reading an incomplete picture, and a reviewer deciding\nwhether their edit worked must not be shown eighteen verdicts as if they were twenty-two."},"RequirementTestSummary":{"properties":{"test_id":{"type":"string","format":"uuid","title":"Test Id"},"status":{"$ref":"#/components/schemas/RequirementTestStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"requirement_text":{"type":"string","title":"Requirement Text"},"totals":{"$ref":"#/components/schemas/RequirementTestTotals","default":{"total":0,"reviewed_judged":0,"agree":0,"disagree":0,"unreviewed":0,"undetermined":0,"not_considered":0,"unfinished":0,"pending":0,"omitted":0}},"tests_current_revision":{"type":"boolean","title":"Tests Current Revision","default":false}},"type":"object","required":["test_id","status","created","requirement_text"],"title":"RequirementTestSummary","description":"A past test, compressed to what a history list shows.\n\nSeparate from `RequirementTest` because the panel lists the previous attempts beside the current\none, and a list of full tests is a list of item arrays nobody reads."},"RequirementTestTotals":{"properties":{"total":{"type":"integer","title":"Total","default":0},"reviewed_judged":{"type":"integer","title":"Reviewed Judged","default":0},"agree":{"type":"integer","title":"Agree","default":0},"disagree":{"type":"integer","title":"Disagree","default":0},"unreviewed":{"type":"integer","title":"Unreviewed","default":0},"undetermined":{"type":"integer","title":"Undetermined","default":0},"not_considered":{"type":"integer","title":"Not Considered","default":0},"unfinished":{"type":"integer","title":"Unfinished","default":0},"pending":{"type":"integer","title":"Pending","default":0},"omitted":{"type":"integer","title":"Omitted","default":0}},"type":"object","title":"RequirementTestTotals","description":"The sentence the surface leads with, as numbers.\n\n`agree + disagree == reviewed_judged`, and `unreviewed`, `undetermined`, `not_considered`,\n`unfinished` and `omitted` all sit outside both — so a reader can always tell what the ratio is a\nratio *of*. That is the one arithmetic property this surface cannot get wrong: a bench claiming\ntwenty of twenty-two while silently counting the nine nobody reviewed is worse than no bench."},"RequirementTuningGoal":{"type":"string","enum":["reduce_false_positives","reduce_over_firing"],"title":"RequirementTuningGoal","description":"Which way a suggested rewording should move the rule.\n\nThe two surfaces arrive with different complaints and the same rule must not be rewritten the\nsame way for both. `REDUCE_FALSE_POSITIVES` is asked to keep every finding the reviewer confirmed\nwhile losing the ones they dismissed — a narrowing that also loses the confirmations is a\nregression the reviewer cannot see from the wording alone. `REDUCE_OVER_FIRING` is asked about a\nrule that fires on nearly everything, where the fix is usually scope or trigger terms rather than\nthe obligation itself."},"RequirementType":{"type":"string","enum":["exact","conditional","holistic"],"title":"RequirementType","description":"How a requirement is evaluated.\n\nNot everything is a bright-line \"all X must Y\" rule."},"ResearchRunDetail":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"dossier":{"anyOf":[{"$ref":"#/components/schemas/DossierRef"},{"type":"null"}]},"steps":{"items":{"$ref":"#/components/schemas/StepView"},"type":"array","title":"Steps"}},"type":"object","required":["agent_run_id","vendor_id","status","created","started_at","finished_at","error","dossier"],"title":"ResearchRunDetail"},"ResearchRunSummary":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["agent_run_id","vendor_id","status","created","started_at","finished_at","error"],"title":"ResearchRunSummary"},"ResidualRiskLevelField":{"properties":{"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"option_id":{"type":"string","title":"Option Id"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["label","hex_color","option_id","order_index"],"title":"ResidualRiskLevelField"},"ResourceApplyResult":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"},"namespace":{"type":"string","format":"uuid","title":"Namespace"},"action":{"type":"string","enum":["created","updated","unchanged","invalid","error"],"title":"Action"},"uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uid"},"messages":{"items":{"type":"string"},"type":"array","title":"Messages"},"changed_fields":{"items":{"$ref":"#/components/schemas/FieldDiff"},"type":"array","title":"Changed Fields"}},"type":"object","required":["kind","name","namespace","action"],"title":"ResourceApplyResult"},"ResourceMetadataWithAnnotations":{"properties":{"name":{"type":"string","title":"Name"},"namespace":{"type":"string","format":"uuid","title":"Namespace"},"uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uid"},"annotations":{"additionalProperties":{"type":"string"},"type":"object","title":"Annotations"}},"type":"object","required":["name","namespace"],"title":"ResourceMetadataWithAnnotations","description":"Response-only metadata that also carries server-derived annotations."},"RetriggerRequest":{"properties":{"upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Upload Ids"}},"type":"object","required":["upload_ids"],"title":"RetriggerRequest"},"RetriggerResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RetriggerResultItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RetriggerResponse"},"RetriggerResultItem":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"triggered":{"type":"string","enum":["process_and_index","index_only","skipped"],"title":"Triggered"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["upload_id","triggered","reason"],"title":"RetriggerResultItem"},"ReviewAnalytics":{"properties":{"active_reviews_by_stage":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Active Reviews By Stage"},"open_ira_reviews":{"type":"integer","title":"Open Ira Reviews"},"open_ira_by_recipient":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Open Ira By Recipient"},"outstanding_initial_reviews_by_assignee":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Initial Reviews By Assignee"},"outstanding_periodic_reviews_by_assignee":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Periodic Reviews By Assignee"},"outstanding_due_diligence_packets_by_owner":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"Outstanding Due Diligence Packets By Owner"}},"type":"object","required":["active_reviews_by_stage","open_ira_reviews","open_ira_by_recipient","outstanding_initial_reviews_by_assignee","outstanding_periodic_reviews_by_assignee","outstanding_due_diligence_packets_by_owner"],"title":"ReviewAnalytics"},"ReviewConfigurationResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"ReviewConfiguration","title":"Kind","default":"ReviewConfiguration"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/ReviewConfigurationSpec"}},"type":"object","required":["metadata","spec"],"title":"ReviewConfigurationResourceResponse","description":"GET/list response for a ReviewConfiguration resource (includes annotations)."},"ReviewConfigurationSpec":{"properties":{"review_type":{"$ref":"#/components/schemas/ReviewType"},"tasks":{"items":{"oneOf":[{"$ref":"#/components/schemas/ServiceIRATaskSpec"},{"$ref":"#/components/schemas/ServiceFormTaskSpec"},{"$ref":"#/components/schemas/VendorIRATaskSpec"},{"$ref":"#/components/schemas/EvidencePacketReviewTaskSpec"},{"$ref":"#/components/schemas/ReviewReportingTaskSpec"},{"$ref":"#/components/schemas/MetadataTaskSpec"}],"discriminator":{"propertyName":"type","mapping":{"evidence_packet_review":"#/components/schemas/EvidencePacketReviewTaskSpec","review_metadata":"#/components/schemas/MetadataTaskSpec","review_reporting":"#/components/schemas/ReviewReportingTaskSpec","service_form":"#/components/schemas/ServiceFormTaskSpec","service_ira":"#/components/schemas/ServiceIRATaskSpec","vendor_ira":"#/components/schemas/VendorIRATaskSpec"}}},"type":"array","title":"Tasks"},"checklists":{"items":{"$ref":"#/components/schemas/ReviewStageChecklistSpec"},"type":"array","title":"Checklists"}},"type":"object","required":["review_type"],"title":"ReviewConfigurationSpec"},"ReviewIssueResponse":{"properties":{"issue_id":{"type":"string","format":"uuid","title":"Issue Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"severity":{"$ref":"#/components/schemas/RiskSeverity"},"created":{"type":"string","format":"date-time","title":"Created"},"resolved":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved"},"assignee":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"resolved_by":{"anyOf":[{"$ref":"#/components/schemas/IssueUser"},{"type":"null"}]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"source_requirement":{"anyOf":[{"$ref":"#/components/schemas/SourceRequirement"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"}},"type":"object","required":["issue_id","short_text","severity","created","resolved"],"title":"ReviewIssueResponse"},"ReviewMark":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"sweep_id":{"type":"string","format":"uuid","title":"Sweep Id"},"subject_kind":{"$ref":"#/components/schemas/ReviewSubjectKind"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"reviewed_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reviewed By User Id"},"reviewed_by_email":{"type":"string","title":"Reviewed By Email"},"reviewed_by_name":{"type":"string","title":"Reviewed By Name"},"reviewed_at":{"type":"string","format":"date-time","title":"Reviewed At"}},"type":"object","required":["review_id","sweep_id","subject_kind","subject_id","reviewed_by_user_id","reviewed_by_email","reviewed_by_name","reviewed_at"],"title":"ReviewMark","description":"One staff mark that a worklist row has been looked at."},"ReviewMarkRequest":{"properties":{"subject_kind":{"$ref":"#/components/schemas/ReviewSubjectKind"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"reviewed":{"type":"boolean","title":"Reviewed"}},"type":"object","required":["subject_kind","subject_id","reviewed"],"title":"ReviewMarkRequest"},"ReviewProgressionBlocker":{"properties":{"key":{"type":"string","title":"Key"},"message":{"type":"string","title":"Message"}},"type":"object","required":["key","message"],"title":"ReviewProgressionBlocker","description":"One reason the review's current stage can't advance yet."},"ReviewProgressionResponse":{"properties":{"stage":{"$ref":"#/components/schemas/ReviewStage"},"can_advance":{"type":"boolean","title":"Can Advance"},"requires_manual_finalize":{"type":"boolean","title":"Requires Manual Finalize"},"blockers":{"items":{"$ref":"#/components/schemas/ReviewProgressionBlocker"},"type":"array","title":"Blockers","default":[]}},"type":"object","required":["stage","can_advance","requires_manual_finalize"],"title":"ReviewProgressionResponse","description":"What (if anything) is blocking the review from leaving its current stage."},"ReviewReportConfigVariant":{"type":"string","enum":["stable","sonnet","no_thinking"],"title":"ReviewReportConfigVariant","description":"Which `ReviewReportConfig` an admin-triggered `review_report` run used.\n\nSTABLE is the only variant reachable from every trigger path (customer-facing\n`/reports/review`, the `review_reporting_stage_wf` task, and admin runs that\ndon't opt into an experiment) — see `ReviewReportAgent.execute`. The other\nmembers are experiment levers, selectable only from the admin report-runner,\nso a regression in one never reaches a customer's review. See\n`ReviewReportConfig.for_variant` (`backend/analyses/reporting/review.py`) for\nwhat each one actually changes."},"ReviewReportStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/AgentRunStatus"},"result_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Upload Id"}},"type":"object","required":["status"],"title":"ReviewReportStatusResponse"},"ReviewReportingTaskDefinitionRequest":{"properties":{"name":{"type":"string","title":"Name"},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"selection_logic_id":{"type":"string","format":"uuid","title":"Selection Logic Id"}},"type":"object","required":["name","selection_logic_id"],"title":"ReviewReportingTaskDefinitionRequest"},"ReviewReportingTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"review_reporting","title":"Task Type","default":"review_reporting"},"name":{"type":"string","title":"Name"},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"rubric_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Filename"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"selection_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selection Logic Id"},"selection_logic_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Logic Name"}},"type":"object","required":["definition_id","company_id","review_type","stage","name"],"title":"ReviewReportingTaskDefinitionResponse"},"ReviewReportingTaskSpec":{"properties":{"type":{"type":"string","const":"review_reporting","title":"Type","default":"review_reporting"},"name":{"type":"string","title":"Name"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"selection_logic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Logic"}},"type":"object","required":["name"],"title":"ReviewReportingTaskSpec"},"ReviewReportingTaskStatusResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"name":{"type":"string","title":"Name"},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]}},"type":"object","required":["task_id","name"],"title":"ReviewReportingTaskStatusResponse","description":"One ReviewReportingTask row returned by GET /reviews/{review_id}/reporting-tasks.\nTasks are created at stage-transition time; project_id / agent_run_id are\npopulated later when the user clicks Generate."},"ReviewRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"service_instructions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ServiceIRATaskDefinition"},"type":"array"},{"type":"null"}],"title":"Service Instructions"},"ira_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ira Template Id"},"form_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Template Id"}},"type":"object","required":["vendor_id","review_type"],"title":"ReviewRequest"},"ReviewResponse":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"status":{"$ref":"#/components/schemas/ServiceReviewStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"assigned_to_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Name"},"services":{"items":{"$ref":"#/components/schemas/ReviewServiceSummary"},"type":"array","title":"Services","default":[]},"stage_history":{"items":{"$ref":"#/components/schemas/ReviewStageEntry"},"type":"array","title":"Stage History","default":[]},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"}},"type":"object","required":["review_id","company_id","vendor_company_id","review_type","stage","status","started_at"],"title":"ReviewResponse"},"ReviewServiceSummary":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"service_name":{"type":"string","title":"Service Name"}},"type":"object","required":["service_id","service_name"],"title":"ReviewServiceSummary"},"ReviewStage":{"type":"string","enum":["inherent_risk_assessment","form_distribution","requirements_gathering","evidence_collection","review","review_reporting","completed","document_sourcing","document_review"],"title":"ReviewStage"},"ReviewStageChecklistSpec":{"properties":{"stage":{"$ref":"#/components/schemas/ReviewStage"},"items":{"items":{"$ref":"#/components/schemas/ChecklistItemSpec"},"type":"array","title":"Items"}},"type":"object","required":["stage"],"title":"ReviewStageChecklistSpec","description":"The template checklist for one stage of a review type.\n\n``items`` is **ordered**: the list order is the order reviewers see, and is\npersisted as ``ChecklistItem.index``. Applying a stage replaces its items\nwholesale, which is what makes the ordering authoritative — see\n``ReviewConfigurationSpec.checklists``."},"ReviewStageEntry":{"properties":{"stage":{"$ref":"#/components/schemas/ReviewStage"},"sequence_number":{"type":"integer","title":"Sequence Number"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["stage","sequence_number","started_at"],"title":"ReviewStageEntry"},"ReviewStageProgress":{"properties":{"stage":{"$ref":"#/components/schemas/ReviewStage"},"outstanding_with":{"$ref":"#/components/schemas/StageOutstandingWith"},"detail":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/IraStageDetail"},{"$ref":"#/components/schemas/DiligenceStageDetail"},{"$ref":"#/components/schemas/ReportingStageDetail"}],"discriminator":{"propertyName":"kind","mapping":{"evidence_collection":"#/components/schemas/DiligenceStageDetail","inherent_risk_assessment":"#/components/schemas/IraStageDetail","review_reporting":"#/components/schemas/ReportingStageDetail"}}},{"type":"null"}],"title":"Detail"},"checklist_items_remaining":{"type":"integer","title":"Checklist Items Remaining","default":0},"checklist_items_total":{"type":"integer","title":"Checklist Items Total","default":0},"stage_work_complete":{"type":"boolean","title":"Stage Work Complete","default":false}},"type":"object","required":["stage","outstanding_with"],"title":"ReviewStageProgress","description":"Where one open review stands in its current stage, and who owes the next move."},"ReviewStatus":{"type":"string","enum":["approved","review_in_progress","needs_remediation"],"title":"ReviewStatus"},"ReviewSubjectKind":{"type":"string","enum":["rule_drift","low_signal","regression","item"],"title":"ReviewSubjectKind","description":"What a collaborative review mark is attached to on one sweep.\n\nFour kinds, kept apart because a requirement can show up on both the drift worklist and the\nlow-signal list, and a mark on one is not a mark on the other. The id is the row the dashboard\nalready uses as the key: `requirement_id` for the two rule lists, `regression_id` for a baseline\nrisk, `item_id` for a piece of collateral."},"ReviewTaskDefinitionRequest":{"properties":{"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"task_type":{"anyOf":[{"$ref":"#/components/schemas/ReviewTaskType"},{"type":"null"}]},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"code_block_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Code Block Id"},"auto_approve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Approve"},"manual_inherent_risk_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Manual Inherent Risk Default"},"request_due_in_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Request Due In Days"},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"},"use_company_website_favicon":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Company Website Favicon"},"inherent_risk_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inherent Risk Template Id"},"control_strength_labels":{"anyOf":[{"items":{"$ref":"#/components/schemas/ControlStrengthLabel"},"type":"array"},{"type":"null"}],"title":"Control Strength Labels"},"label_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Instructions"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"set_key_dates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Key Dates"},"set_vendor_fields":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Vendor Fields"},"auto_apply_key_dates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Apply Key Dates"}},"type":"object","required":["review_type","stage"],"title":"ReviewTaskDefinitionRequest"},"ReviewTaskStatus":{"type":"string","enum":["pending","completed"],"title":"ReviewTaskStatus"},"ReviewTaskType":{"type":"string","enum":["service_ira","service_form","vendor_ira","evidence_packet_review","evidence_review","review_reporting","review_metadata"],"title":"ReviewTaskType"},"ReviewTuningListResponse":{"properties":{"reviews":{"items":{"$ref":"#/components/schemas/ReviewTuningSummary"},"type":"array","title":"Reviews"},"total_reviews":{"type":"integer","title":"Total Reviews","default":0},"total_requirements":{"type":"integer","title":"Total Requirements","default":0},"total_classifier_correct":{"type":"integer","title":"Total Classifier Correct","default":0},"total_classifier_overridden":{"type":"integer","title":"Total Classifier Overridden","default":0},"total_negative_feedback":{"type":"integer","title":"Total Negative Feedback","default":0}},"type":"object","title":"ReviewTuningListResponse"},"ReviewTuningSummary":{"properties":{"review_id":{"type":"string","format":"uuid","title":"Review Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"status":{"$ref":"#/components/schemas/ServiceReviewStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"total_requirements":{"type":"integer","title":"Total Requirements"},"risk_factor_count":{"type":"integer","title":"Risk Factor Count"},"classified_count":{"type":"integer","title":"Classified Count"},"classifier_correct_count":{"type":"integer","title":"Classifier Correct Count"},"classifier_overridden_count":{"type":"integer","title":"Classifier Overridden Count"},"negative_feedback_count":{"type":"integer","title":"Negative Feedback Count"}},"type":"object","required":["review_id","vendor_company_id","vendor_name","stage","status","started_at","completed_at","total_requirements","risk_factor_count","classified_count","classifier_correct_count","classifier_overridden_count","negative_feedback_count"],"title":"ReviewTuningSummary"},"ReviewType":{"type":"string","enum":["initial","periodic","inventory_refresh","initial_fintech","periodic_fintech","rm_scorecard","initial_no_ira","ira_only"],"title":"ReviewType"},"ReviewUpdateRequest":{"properties":{"stage":{"anyOf":[{"$ref":"#/components/schemas/ReviewStage"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/ServiceReviewStatus"},{"type":"null"}]},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"}},"type":"object","title":"ReviewUpdateRequest"},"ReviewedProductLine":{"properties":{"key":{"type":"string","maxLength":64,"minLength":1,"title":"Key"},"operation":{"$ref":"#/components/schemas/MarketingPresetProposalOperation","default":"create"},"preset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preset Id"},"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"program_types":{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array","title":"Program Types"},"internal_file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":25,"title":"Internal File Ids"},"guideline_notes":{"items":{"type":"string","maxLength":500},"type":"array","maxItems":20,"title":"Guideline Notes"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"rationale":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Rationale"},"approved":{"type":"boolean","title":"Approved","default":false},"applied_preset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applied Preset Id"}},"additionalProperties":false,"type":"object","required":["key","name"],"title":"ReviewedProductLine","description":"An item as saved back from the review page.\n\nEvery substantive field must be PRESENT, unlike the stored shape. A save echoes whole items, so\nan omitted `program_types` is indistinguishable from \"no regulations\" — and a shape that\ndefaults it to empty means a client sending only the fields it edited silently erases the\ncheckboxes, the attachments and the agent's reasoning, with a 200 and a bumped revision.\n\nEnforced on the incoming payload rather than by redeclaring the fields as required: the parent\nneeds its defaults (it has to read rows written before a field existed), and a subclass that\ndrops them is both a type error and a claim this class does not actually need to make — it does\nnot want different *types*, it wants the keys to be there."},"ReviewerDecision":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"uploader":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploader"},"flagged":{"type":"integer","title":"Flagged"},"allowed":{"type":"integer","title":"Allowed"},"dismissed":{"type":"integer","title":"Dismissed"},"date":{"type":"string","format":"date-time","title":"Date"}},"type":"object","required":["file_id","filename","uploader","flagged","allowed","dismissed","date"],"title":"ReviewerDecision","description":"One reviewed collateral in a reviewer's Recent-reviews timeline."},"ReviewerDetail":{"properties":{"decisions":{"items":{"$ref":"#/components/schemas/ReviewerDecision"},"type":"array","title":"Decisions"},"decisions_total":{"type":"integer","title":"Decisions Total"}},"type":"object","required":["decisions","decisions_total"],"title":"ReviewerDetail"},"ReviewerMetrics":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"documents_reviewed":{"type":"integer","title":"Documents Reviewed"},"flagged":{"type":"integer","title":"Flagged"},"allowed":{"type":"integer","title":"Allowed"},"dismissed":{"type":"integer","title":"Dismissed"}},"type":"object","required":["user_id","documents_reviewed","flagged","allowed","dismissed"],"title":"ReviewerMetrics"},"RevokeConnectionResponse":{"properties":{"revoked":{"type":"integer","title":"Revoked"}},"type":"object","required":["revoked"],"title":"RevokeConnectionResponse","description":"Result of revoking one connection: how many refresh tokens were\nflipped to revoked=True. Rows are durably revoked, not deleted."},"RevokeSessionsResponse":{"properties":{"users_targeted":{"type":"integer","title":"Users Targeted"},"sessions_revoked":{"type":"integer","title":"Sessions Revoked"}},"type":"object","required":["users_targeted","sessions_revoked"],"title":"RevokeSessionsResponse"},"RiskActionCoverage":{"properties":{"total_risks":{"type":"integer","title":"Total Risks"},"actioned":{"type":"integer","title":"Actioned"},"actioned_pct":{"type":"number","title":"Actioned Pct"},"flagged":{"type":"integer","title":"Flagged"},"flag_rate_pct":{"type":"number","title":"Flag Rate Pct"}},"type":"object","required":["total_risks","actioned","actioned_pct","flagged","flag_rate_pct"],"title":"RiskActionCoverage","description":"The risk-action funnel for the current scope: of the marketing risks\nsurfaced, how many a reviewer acted on, and of those how many were flagged.\n\nA funnel over risks: `total_risks -> actioned -> flagged`.\n\n- `actioned` = risks a reviewer decided on (status flag / allow / reject);\n  risks not yet reviewed (status NULL) are excluded.\n- `flagged` = the subset of actioned risks with status flag.\n- `actioned_pct = actioned / total_risks` -- the action rate: share of\n  surfaced risks a reviewer engaged with at all.\n- `flag_rate_pct = flagged / actioned` -- the flag rate: share of reviewed\n  risks flagged, matching the marketing analytics definition.\n\nSo `flagged <= actioned <= total_risks`."},"RiskAreaConfigView":{"properties":{"risk_area_id":{"type":"string","format":"uuid","title":"Risk Area Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"display_order":{"type":"integer","title":"Display Order"},"is_active":{"type":"boolean","title":"Is Active"},"risk_factors":{"items":{"$ref":"#/components/schemas/RiskFactorConfigView"},"type":"array","title":"Risk Factors"}},"type":"object","required":["risk_area_id","slug","name","description","display_order","is_active"],"title":"RiskAreaConfigView"},"RiskAreaRef":{"properties":{"risk_area_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Risk Area Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["risk_area_id","name"],"title":"RiskAreaRef"},"RiskAreaResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"RiskArea","title":"Kind","default":"RiskArea"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/RiskAreaSpec"}},"type":"object","required":["metadata","spec"],"title":"RiskAreaResourceResponse","description":"GET/list response for a RiskArea resource (includes annotations).\n\nDeactivated factors are included, with ``is_active: false``, so a\nGET → apply round-trip neither resurrects them nor re-reports a removal."},"RiskAreaSelection":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"page_number":{"type":"integer","minimum":1.0,"title":"Page Number"},"bounding_box":{"$ref":"#/components/schemas/BoundingBox"}},"type":"object","required":["document_id","page_number","bounding_box"],"title":"RiskAreaSelection","description":"The PDF region a reviewer drew for a bulk dismiss / ignore.\n\nCoordinates are viewer-rotated PDF points (top-left origin, ``/Rotate``\napplied) — the same space citation bounding boxes use. The server stores\nthis as training data and does not re-hit-test it."},"RiskAreaSpec":{"properties":{"slug":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"is_active":{"type":"boolean","title":"Is Active","default":true},"risk_factors":{"items":{"$ref":"#/components/schemas/RiskFactorSpec"},"type":"array","title":"Risk Factors"}},"type":"object","required":["slug"],"title":"RiskAreaSpec"},"RiskAreaWithFactors":{"properties":{"risk_area":{"$ref":"#/components/schemas/RiskAreaRef"},"display_order":{"type":"integer","title":"Display Order"},"factors":{"items":{"$ref":"#/components/schemas/FactorAssessmentSummary"},"type":"array","title":"Factors"}},"type":"object","required":["risk_area","display_order"],"title":"RiskAreaWithFactors"},"RiskAssessmentDetail":{"properties":{"risk_assessment_id":{"type":"string","format":"uuid","title":"Risk Assessment Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/RiskAssessmentStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"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"},"factor_count":{"type":"integer","title":"Factor Count"},"factors_reviewed":{"type":"integer","title":"Factors Reviewed"},"factors_rated":{"type":"integer","title":"Factors Rated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"research_agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Research Agent Run Id"},"research_run":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRef"},{"type":"null"}]},"stream_keys":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Stream Keys"},"dossier":{"anyOf":[{"$ref":"#/components/schemas/DossierRef"},{"type":"null"}]},"rating_options":{"items":{"$ref":"#/components/schemas/RatingOptionView"},"type":"array","title":"Rating Options"},"areas":{"items":{"$ref":"#/components/schemas/RiskAreaWithFactors"},"type":"array","title":"Areas"}},"type":"object","required":["risk_assessment_id","vendor_id","status","created","started_at","completed_at","factor_count","factors_reviewed","factors_rated","error","research_agent_run_id","dossier"],"title":"RiskAssessmentDetail","description":"Everything the run overview needs, in one request (rule F-9).\n\nPer-factor status/progress/rating live on the nested rows precisely so a\n60-factor run is driven by this single poll rather than 60 per-row polls."},"RiskAssessmentExport":{"properties":{"risk_assessment_id":{"type":"string","format":"uuid","title":"Risk Assessment Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/RiskAssessmentStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"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"},"factor_count":{"type":"integer","title":"Factor Count"},"factors_reviewed":{"type":"integer","title":"Factors Reviewed"},"factors_rated":{"type":"integer","title":"Factors Rated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"vendor_name":{"type":"string","title":"Vendor Name"},"exported_at":{"type":"string","format":"date-time","title":"Exported At"},"rating_options":{"items":{"$ref":"#/components/schemas/RatingOptionView"},"type":"array","title":"Rating Options"},"factors":{"items":{"$ref":"#/components/schemas/FactorExportView"},"type":"array","title":"Factors"}},"type":"object","required":["risk_assessment_id","vendor_id","status","created","started_at","completed_at","factor_count","factors_reviewed","factors_rated","error","vendor_name","exported_at"],"title":"RiskAssessmentExport","description":"The whole run, flat, for the \"Export PDF\" button.\n\nFactors carry `risk_area_name` rather than nesting under areas, mirroring\n`build_review_export_payload`'s flat requirement list: the document groups\nthem itself, and one list is what a reader-facing renderer wants.\n\nThe research dossier is **not** included — it is the vendor background the\nsubagents read, not an output a reviewer signs off on."},"RiskAssessmentFactorStatus":{"type":"string","enum":["queued","running","complete","error"],"title":"RiskAssessmentFactorStatus","description":"Lifecycle of one factor's assessment within a run.\n\nThere is no deferral state: a factor either produces a rating its rationale\ncan defend, or it errors. Missing evidence is narrated in the rationale."},"RiskAssessmentRunResult":{"properties":{"version":{"type":"integer","title":"Version","default":1},"drafting_result":{"$ref":"#/components/schemas/DraftingV3RunResults"},"assessed_risk_level":{"anyOf":[{"$ref":"#/components/schemas/RiskLevelField"},{"type":"null"}],"description":"Final assessed risk level"},"possible_risk_levels":{"items":{"$ref":"#/components/schemas/RiskLevelField"},"type":"array","title":"Possible Risk Levels","description":"Enumerated possible risk levels"},"rationale":{"type":"string","title":"Rationale","description":"Rationale for the assessed risk level"}},"type":"object","required":["drafting_result","rationale"],"title":"RiskAssessmentRunResult"},"RiskAssessmentStatus":{"type":"string","enum":["queued","running","complete","failed"],"title":"RiskAssessmentStatus","description":"Lifecycle of one whole assessment of one company."},"RiskAssessmentSummary":{"properties":{"risk_assessment_id":{"type":"string","format":"uuid","title":"Risk Assessment Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/RiskAssessmentStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"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"},"factor_count":{"type":"integer","title":"Factor Count"},"factors_reviewed":{"type":"integer","title":"Factors Reviewed"},"factors_rated":{"type":"integer","title":"Factors Rated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["risk_assessment_id","vendor_id","status","created","started_at","completed_at","factor_count","factors_reviewed","factors_rated","error"],"title":"RiskAssessmentSummary"},"RiskDetail":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"dismiss_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Reason"},"dismiss_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismiss Note"},"suppressed_by_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suppressed By Rule Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"run_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Run Time"}},"type":"object","required":["risk_id","short_text","explanation","remediation","severity","source_clause","document_clause","status","dismiss_reason","dismiss_note","suppressed_by_rule_id","filename","run_id","run_time"],"title":"RiskDetail","description":"One `document_risks` row, in full, for side-by-side reading."},"RiskFactorConfigView":{"properties":{"risk_factor_id":{"type":"string","format":"uuid","title":"Risk Factor Id"},"risk_area_id":{"type":"string","format":"uuid","title":"Risk Area Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assessment_guidance":{"type":"string","title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"applicability_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicability Logic Id"},"applicability_logic_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applicability Logic Name"},"version_number":{"type":"integer","title":"Version Number"},"display_order":{"type":"integer","title":"Display Order"},"is_active":{"type":"boolean","title":"Is Active"},"in_use":{"type":"boolean","title":"In Use"}},"type":"object","required":["risk_factor_id","risk_area_id","slug","name","description","assessment_guidance","rating_rubric","applicability_logic_id","applicability_logic_name","version_number","display_order","is_active","in_use"],"title":"RiskFactorConfigView"},"RiskFactorReviewState":{"type":"string","enum":["proposed","approved","overridden"],"title":"RiskFactorReviewState","description":"Where a human reviewer stands on the agent's proposed rating.\n\nWritten by the approval workflow (M5); until then every completed factor\nsits at PROPOSED, which is what renders the \"Kobalt proposed\" chip."},"RiskFactorSpec":{"properties":{"slug":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug"},"name":{"type":"string","maxLength":256,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assessment_guidance":{"type":"string","title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"applicability_logic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applicability Logic"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["slug","name","assessment_guidance"],"title":"RiskFactorSpec"},"RiskFactorTrainingOutcome":{"type":"string","enum":["promoted","gave_up"],"title":"RiskFactorTrainingOutcome","description":"How a `RiskFactorTrainingAgentRun` ended.\n\nBoth are terminal tool calls, not failures: an agent that cannot justify a\nrewrite is expected to GIVE_UP with questions rather than promote one."},"RiskFactorVersionStatus":{"type":"string","enum":["active","proposed","hidden","inactive"],"title":"RiskFactorVersionStatus","description":"Where one `risk_factor_versions` row stands.\n\nA factor's name and slug are permanent; its description, assessment\nguidance, rating rubric and applicability logic are versioned, so a rewrite\nnever destroys the text that produced historical ratings.\n\nACTIVE is what the next assessment run uses, and a partial unique index\n(`uq_risk_factor_versions_one_active`) enforces at most one per factor.\nHIDDEN is a training agent's working draft — created mid-run and never shown\nto a reviewer. PROPOSED is a draft the agent promoted and the reviewer has\nnot yet accepted or rejected. INACTIVE covers both \"superseded\" and\n\"rejected\"; the two are distinguishable from the training run's outcome."},"RiskFactorVersionView":{"properties":{"risk_factor_version_id":{"type":"string","format":"uuid","title":"Risk Factor Version Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/RiskFactorVersionStatus"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assessment_guidance":{"type":"string","title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"change_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Note"}},"type":"object","required":["risk_factor_version_id","version_number","status","description","assessment_guidance","rating_rubric","change_note"],"title":"RiskFactorVersionView"},"RiskLevelField":{"properties":{"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"option_id":{"type":"string","title":"Option Id"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["label","hex_color","option_id","order_index"],"title":"RiskLevelField"},"RiskRequirementCitations":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"requirements":{"items":{"$ref":"#/components/schemas/RequirementRiskCitation"},"type":"array","title":"Requirements","default":[]}},"type":"object","required":["risk_id"],"title":"RiskRequirementCitations","description":"Every requirement one risk cites. Empty for a risk from any other path."},"RiskSeverity":{"type":"string","enum":["low","medium","high"],"title":"RiskSeverity"},"RiskStatus":{"type":"string","enum":["reject","allow","flag","dismissed"],"title":"RiskStatus"},"RoleAssignment":{"properties":{"module":{"type":"string","title":"Module"},"role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Role Id"}},"type":"object","required":["module"],"title":"RoleAssignment"},"RoleListing":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]}},"type":"object","required":["role_id","role_name"],"title":"RoleListing"},"RolePermissionMatrixResponse":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/RoleListing"},"type":"array","title":"Roles"},"modules":{"items":{"$ref":"#/components/schemas/ModulePermissionMatrix"},"type":"array","title":"Modules"}},"type":"object","required":["roles","modules"],"title":"RolePermissionMatrixResponse"},"RoleUsage":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]}},"type":"object","required":["role_id","role_name","company_id","company_name"],"title":"RoleUsage","description":"A role that grants a given permission. ``company`` is None for system roles."},"RuleDrift":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"guideline_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Guideline File Id"},"guideline_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guideline Filename"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"state":{"anyOf":[{"$ref":"#/components/schemas/GuidelineRequirementState"},{"type":"null"}]},"presence_count":{"type":"integer","title":"Presence Count"},"outcome_count":{"type":"integer","title":"Outcome Count"},"revision_count":{"type":"integer","title":"Revision Count"},"total_count":{"type":"integer","title":"Total Count"},"visible_flip_count":{"type":"integer","title":"Visible Flip Count"},"collateral_affected":{"type":"integer","title":"Collateral Affected"},"matched_trigger_terms":{"items":{"type":"string"},"type":"array","title":"Matched Trigger Terms"}},"type":"object","required":["requirement_id","guideline_file_id","guideline_filename","requirement_text","state","presence_count","outcome_count","revision_count","total_count","visible_flip_count","collateral_affected","matched_trigger_terms"],"title":"RuleDrift","description":"One requirement's drift across the whole sweep — the tuning worklist, ranked.\n\n`presence_count` and `outcome_count` are kept apart rather than summed because they have\ndifferent fixes: presence drift is narrowing or a batch ceiling, outcome drift is the judging\nprompt. A combined rank would put a rule needing a trigger-term edit next to one needing a\nprompt change and say nothing about which."},"RuleEnforcement":{"type":"string","enum":["enforcing","shadow"],"title":"RuleEnforcement"},"RuleResponse":{"properties":{"rule_id":{"type":"string","format":"uuid","title":"Rule Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"title":{"type":"string","title":"Title"},"guidance_text":{"type":"string","title":"Guidance Text"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"enabled":{"type":"boolean","title":"Enabled"},"enforcement":{"$ref":"#/components/schemas/RuleEnforcement"},"source":{"$ref":"#/components/schemas/RuleSource"},"status":{"$ref":"#/components/schemas/RuleStatus"},"suppression_count":{"type":"integer","title":"Suppression Count","default":0}},"type":"object","required":["rule_id","company_id","title","guidance_text","collateral_types","marketing_team_ids","enabled","enforcement","source","status"],"title":"RuleResponse"},"RuleSource":{"type":"string","enum":["manual","ai_suggested"],"title":"RuleSource"},"RuleStatus":{"type":"string","enum":["proposed","approved","rejected"],"title":"RuleStatus"},"RunExistingDocumentRequest":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"profile":{"$ref":"#/components/schemas/ExtractionProfile","default":"marketing"},"model":{"type":"string","title":"Model","default":"CLAUDE_4_5_OPUS"},"temperature":{"type":"number","title":"Temperature","default":0.0}},"type":"object","required":["upload_id"],"title":"RunExistingDocumentRequest"},"RunLatencyTotals":{"properties":{"runs":{"type":"integer","title":"Runs"},"queue_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue P50 Seconds"},"queue_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue P95 Seconds"},"queue_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue Max Seconds"},"analysis_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis P50 Seconds"},"analysis_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis P95 Seconds"},"analysis_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis Max Seconds"},"end_to_end_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End P50 Seconds"},"end_to_end_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End P95 Seconds"},"end_to_end_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End Max Seconds"},"queued_over_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queued Over Threshold"},"queue_threshold_seconds":{"type":"integer","title":"Queue Threshold Seconds"},"excluded_inconsistent":{"type":"integer","title":"Excluded Inconsistent"}},"type":"object","required":["runs","queue_p50_seconds","queue_p95_seconds","queue_max_seconds","analysis_p50_seconds","analysis_p95_seconds","analysis_max_seconds","end_to_end_p50_seconds","end_to_end_p95_seconds","end_to_end_max_seconds","queued_over_threshold","queue_threshold_seconds","excluded_inconsistent"],"title":"RunLatencyTotals","description":"Marketing run-latency stats for the scope, split queue vs analysis.\n\nThree latencies over the same set of runs, so they decompose one journey:\n\n- `queue_*` = `analysis_started_at - run_time` -- created until a worker\n  actually began. This is dispatch/queue delay, not work.\n- `analysis_*` = `analysis_completed_at - analysis_started_at` -- **file prep\n  plus analysis**, not the analysis alone. The worker stamps\n  `analysis_started_at` before it blocks waiting for uploads to finish\n  processing, so this span can contain minutes of file-pipeline wait. A spike\n  here does not on its own implicate the analysis or the model.\n- `end_to_end_*` = `analysis_completed_at - run_time` -- what the person who\n  submitted the run waited, the two above together.\n\n**Three statistics per latency, because one is not enough.** P50 and P95\ndescribe the bulk and the tail; `queue_max_seconds` catches what percentiles\nstructurally cannot. A handful of runs stalled for hours out of a hundred\nnormal ones does not reach the 95th percentile, so P95 can sit flat across a\nweek containing a multi-hour stall while the max moves by orders of\nmagnitude. Conversely the max is one row and says nothing about how\nwidespread a delay is -- `queued_over_threshold` (runs whose queue wait\nexceeded `queue_threshold_seconds`) is the breadth signal. Read them\ntogether; each is blind to a different failure.\n\n**`queued_over_threshold` is a count and must stay one.** Every other metric\non the reliability page carries a companion percentage, so the pull to\nnormalise this one is strong -- but dividing it by `runs` inverts the ranking\nwhenever volume moves. On the incident week, breaches rose in absolute terms\nwhile the *rate* fell below the neighbouring quiet weeks, purely because run\nvolume roughly doubled. As a rate the worst week reads as the best. Report the\ncount; put the denominator beside it if context is needed.\n\nMaxima are per-column and so may come from three different runs: unlike the\npercentiles they do **not** decompose, and `queue_max + analysis_max` is no\nparticular run's end-to-end. Use the slowest-runs drill-down to see one run's\nreal split.\n\n**`runs` is the measurement denominator, and it is not the number of runs\nthat happened.** Every figure here is over successful runs carrying both\nanalysis timestamps in a consistent order. Both timestamps are written in one\nupdate when results land, so a run that failed or is still queued carries\nneither -- it contributes nothing, and its wait is not measurable at all.\nThese are survivor latencies and the true tail is worse than shown. Compare\n`runs` against the same week's `WeeklyFailurePoint.total` to see how much of\nthe week was measurable. Every latency field is null when `runs` is zero (no\nmeasurement), never zero."},"RunRequirementCoverage":{"properties":{"evaluated":{"type":"boolean","title":"Evaluated","default":false},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"guidelines_considered":{"type":"integer","title":"Guidelines Considered","default":0},"guidelines_without_library":{"type":"integer","title":"Guidelines Without Library","default":0},"candidates_total":{"type":"integer","title":"Candidates Total","default":0},"candidates_checked":{"type":"integer","title":"Candidates Checked","default":0},"counts":{"$ref":"#/components/schemas/CoverageOutcomeCounts","default":{"passed":0,"failed":0,"not_determined":0}},"exclusions":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/ApplicabilityExclusion"},"type":"object","title":"Exclusions","default":{}},"narrowing_skipped":{"items":{"$ref":"#/components/schemas/NarrowingSkipped"},"type":"array","title":"Narrowing Skipped","default":[]},"batches_skipped":{"type":"integer","title":"Batches Skipped","default":0},"attachment":{"$ref":"#/components/schemas/RequirementAttachment","default":"document"},"guidelines":{"items":{"$ref":"#/components/schemas/CoverageGuideline"},"type":"array","title":"Guidelines","default":[]}},"type":"object","required":["run_id"],"title":"RunRequirementCoverage","description":"Everything one analysis checked, and the arithmetic behind it.\n\n`evaluated` is false for every run that did not do a requirement check — a run from before the\nrollout reached this company, and every run for a company outside it. The shape is the same\neither way on purpose: a 403 or a different body keyed on the rollout would make a tenant's\nmembership of it visible from the client."},"RunStatus":{"type":"string","enum":["archived","available","deleted","pending","failed"],"title":"RunStatus"},"RunType":{"type":"string","enum":["base","soc","soc1","marketing","overview","contract_analysis","drafting","inherent_risk_assessment","risk_assessment"],"title":"RunType"},"RunsWithDocuments":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"run_time":{"type":"string","format":"date-time","title":"Run Time"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"results":{"anyOf":[{"$ref":"#/components/schemas/ContractResult"},{"$ref":"#/components/schemas/MarketingResult"},{"$ref":"#/components/schemas/SOCResult"},{"$ref":"#/components/schemas/SOC1Result"},{"$ref":"#/components/schemas/DraftingResult"},{"$ref":"#/components/schemas/MainResult"},{"$ref":"#/components/schemas/InherentRiskAssessmentResult"},{"$ref":"#/components/schemas/PendingResult"},{"$ref":"#/components/schemas/FailedResult"},{"$ref":"#/components/schemas/DraftingV3RunResults"},{"$ref":"#/components/schemas/RiskAssessmentRunResult"}],"title":"Results"},"program_type":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProgramType"},"type":"array"},{"type":"null"}],"title":"Program Type"},"marketing_program_type":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingProgramType"},"type":"array"},{"type":"null"}],"title":"Marketing Program Type"},"run_type":{"$ref":"#/components/schemas/RunType"},"status":{"anyOf":[{"$ref":"#/components/schemas/RunStatus"},{"type":"null"}]},"exported_pdf_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exported Pdf Filename"},"notes":{"anyOf":[{},{"type":"null"}],"title":"Notes"},"documents":{"items":{"$ref":"#/components/schemas/FileVersions"},"type":"array","title":"Documents"},"user_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User First Name"},"user_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Last Name"}},"type":"object","required":["run_id","run_time","company_id","vendor_id","results","run_type","documents"],"title":"RunsWithDocuments"},"SOC1Result":{"properties":{"version":{"type":"integer","title":"Version"},"soc_1_analysis":{"title":"Soc 1 Analysis"}},"type":"object","required":["version","soc_1_analysis"],"title":"SOC1Result"},"SOCResult":{"properties":{"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"soc_2_analysis":{"title":"Soc 2 Analysis"}},"type":"object","required":["soc_2_analysis"],"title":"SOCResult"},"SendCollaborativeTaskVendorReminderRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"}},"type":"object","required":["vendor_id"],"title":"SendCollaborativeTaskVendorReminderRequest"},"SendReminderRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"request_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Request Ids"}},"type":"object","required":["vendor_id","request_ids"],"title":"SendReminderRequest"},"SendRemindersResponse":{"properties":{"message":{"type":"string","title":"Message"},"reminded_request_count":{"type":"integer","title":"Reminded Request Count"},"recipients_notified":{"type":"integer","title":"Recipients Notified"}},"type":"object","required":["message","reminded_request_count","recipients_notified"],"title":"SendRemindersResponse","description":"``recipients_notified`` is people reached, not requests chased."},"ServiceAnalytics":{"properties":{"total_services":{"type":"integer","title":"Total Services"},"by_inherent_risk":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Inherent Risk"},"by_criticality":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Criticality"},"by_lifecycle_status":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Lifecycle Status"},"by_internal_poc":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Internal Poc"},"by_review_state":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Review State"}},"type":"object","required":["total_services","by_inherent_risk","by_criticality","by_lifecycle_status","by_internal_poc","by_review_state"],"title":"ServiceAnalytics"},"ServiceContact":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","email"],"title":"ServiceContact","description":"A vendor contact, shaped for the client's Avatar + name/email display."},"ServiceDetailResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"service_name":{"type":"string","title":"Service Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"key_dates":{"items":{"$ref":"#/components/schemas/VrmKeyDate"},"type":"array","title":"Key Dates","default":[]},"vendor_profile":{"$ref":"#/components/schemas/VendorProfile"},"contacts":{"items":{"$ref":"#/components/schemas/ServiceContact"},"type":"array","title":"Contacts"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["service_id","service_name","vendor_id","vendor_profile","contacts"],"title":"ServiceDetailResponse","description":"Everything the My Services detail slide-over shows for one service.\n\nAssembled (and sanitized) server-side from a new VRM-scoped endpoint, since\na low-access VRM user can't reach the TPRM service/vendor/file endpoints."},"ServiceFormReviewTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"service_form","title":"Task Type","default":"service_form"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"},"email_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Icon Url"}},"type":"object","required":["definition_id","company_id","review_type","stage"],"title":"ServiceFormReviewTaskDefinitionResponse"},"ServiceFormReviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"task_type":{"$ref":"#/components/schemas/ReviewTaskType"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"service_name":{"type":"string","title":"Service Name"},"form_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Id"},"form_status":{"anyOf":[{"$ref":"#/components/schemas/FormRequestStatus"},{"type":"null"}]},"form_recipient_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Recipient User Id"},"form_recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Recipient Email"},"form_recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Recipient Name"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"form_template_configured":{"type":"boolean","title":"Form Template Configured","default":false}},"type":"object","required":["task_id","review_id","task_type","status","service_id","service_name"],"title":"ServiceFormReviewTaskResponse"},"ServiceFormTaskSpec":{"properties":{"type":{"type":"string","const":"service_form","title":"Type","default":"service_form"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"}},"type":"object","title":"ServiceFormTaskSpec"},"ServiceIRAReassignRequest":{"properties":{"recipient":{"$ref":"#/components/schemas/FormRequestRecipient"},"due_date":{"type":"string","format":"date-time","title":"Due Date"}},"type":"object","required":["recipient","due_date"],"title":"ServiceIRAReassignRequest","description":"Cancel the outstanding IRA request and resend it to a different recipient."},"ServiceIRARequestChangesRequest":{"properties":{"body":{"type":"string","title":"Body"},"due_date":{"type":"string","format":"date-time","title":"Due Date"}},"type":"object","required":["body","due_date"],"title":"ServiceIRARequestChangesRequest","description":"Send a submitted IRA questionnaire back to its recipient for corrections."},"ServiceIRAReviewTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"service_ira","title":"Task Type","default":"service_ira"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"rubric_upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rubric Upload Id"},"rubric_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rubric Filename"},"manual_inherent_risk_default":{"type":"boolean","title":"Manual Inherent Risk Default","default":false},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"},"email_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Icon Url"},"code_block_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Code Block Id"},"code_block_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Block Name"}},"type":"object","required":["definition_id","company_id","review_type","stage"],"title":"ServiceIRAReviewTaskDefinitionResponse"},"ServiceIRAReviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"task_type":{"$ref":"#/components/schemas/ReviewTaskType"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"service_name":{"type":"string","title":"Service Name"},"starting_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Starting Inherent Risk"},"starting_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting Inherent Risk Label"},"suggested_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Inherent Risk"},"suggested_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Inherent Risk Label"},"set_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Inherent Risk"},"set_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set Inherent Risk Label"},"inherent_risk_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inherent Risk Rationale"},"starting_service_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Starting Service Criticality"},"starting_service_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting Service Criticality Label"},"suggested_service_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Service Criticality"},"suggested_service_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Service Criticality Label"},"set_service_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Service Criticality"},"set_service_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set Service Criticality Label"},"service_criticality_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Criticality Rationale"},"form_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Id"},"form_response_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Response Id"},"active_form_response_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Form Response Id"},"form_status":{"anyOf":[{"$ref":"#/components/schemas/FormRequestStatus"},{"type":"null"}]},"form_recipient_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Recipient User Id"},"form_recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Recipient Email"},"form_recipient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Recipient Name"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"overdue_last_notified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Overdue Last Notified At"},"form_changes_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Form Changes Requested At"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_status":{"anyOf":[{"$ref":"#/components/schemas/RunStatus"},{"type":"null"}]},"custom_field_changeset":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldsChangeset"},{"type":"null"}]},"answers_stale":{"type":"boolean","title":"Answers Stale","default":false},"ira_template_configured":{"type":"boolean","title":"Ira Template Configured","default":false}},"type":"object","required":["task_id","review_id","task_type","status","service_id","service_name"],"title":"ServiceIRAReviewTaskResponse"},"ServiceIRAReviewTaskUpdateRequest":{"properties":{"set_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Inherent Risk"},"set_service_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Service Criticality"},"status":{"anyOf":[{"$ref":"#/components/schemas/ReviewTaskStatus"},{"type":"null"}]}},"type":"object","title":"ServiceIRAReviewTaskUpdateRequest"},"ServiceIRATaskDefinition":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"proceed_risk_option_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Proceed Risk Option Id"},"manual_override":{"type":"boolean","title":"Manual Override","default":false},"assignee":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assignee"}},"type":"object","required":["service_id"],"title":"ServiceIRATaskDefinition"},"ServiceIRATaskSpec":{"properties":{"type":{"type":"string","const":"service_ira","title":"Type","default":"service_ira"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"manual_inherent_risk_default":{"type":"boolean","title":"Manual Inherent Risk Default","default":false},"request_due_in_days":{"type":"integer","minimum":1.0,"title":"Request Due In Days","default":5},"overdue_notification_interval_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overdue Notification Interval Days"}},"type":"object","title":"ServiceIRATaskSpec"},"ServiceResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"Service","title":"Kind","default":"Service"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/ServiceSpec"}},"type":"object","required":["metadata","spec"],"title":"ServiceResourceResponse","description":"GET/list response for a Service resource (includes annotations)."},"ServiceReviewStatus":{"type":"string","enum":["active","completed","cancelled"],"title":"ServiceReviewStatus"},"ServiceSpec":{"properties":{"vendor":{"$ref":"#/components/schemas/ServiceVendorRef"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"custom_field_values":{"items":{"$ref":"#/components/schemas/CustomFieldValueSpec"},"type":"array","title":"Custom Field Values"}},"type":"object","required":["vendor"],"title":"ServiceSpec"},"ServiceStatus":{"type":"string","enum":["active","archived"],"title":"ServiceStatus"},"ServiceVendorRef":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Website"},"company_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Uuid"}},"type":"object","title":"ServiceVendorRef","description":"Identifies a vendor by one or more of: name, company_website, company_uuid.\n\nAll provided fields are stored and used for lookup in order of precedence:\n``company_uuid`` → ``company_website`` → ``name``.\nAt least one must be supplied."},"SetCompanyNotificationPreferenceRequest":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"enabled":{"type":"boolean","title":"Enabled"},"scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","enabled"],"title":"SetCompanyNotificationPreferenceRequest"},"SetDisclosureCustomFieldValuesRequest":{"properties":{"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","title":"SetDisclosureCustomFieldValuesRequest"},"SetDisclosureStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/DisclosureStatus"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["status"],"title":"SetDisclosureStatusRequest"},"SetDispositionRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"hit_key":{"type":"string","title":"Hit Key"},"status":{"type":"string","enum":["issue_created","dismissed"],"title":"Status"},"issue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Issue Id"},"dismissal_reason":{"anyOf":[{"$ref":"#/components/schemas/NegativeNewsDismissReason"},{"type":"null"}]},"dismissal_note":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Dismissal Note"}},"type":"object","required":["vendor_id","hit_key","status"],"title":"SetDispositionRequest"},"SetIssueCustomFieldValuesRequest":{"properties":{"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","title":"SetIssueCustomFieldValuesRequest"},"SetRequirementStateRequest":{"properties":{"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"change_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Change Note"}},"type":"object","required":["state"],"title":"SetRequirementStateRequest","description":"Turn a requirement off, remove it, or put it back.\n\nSUPERSEDED is not settable: it is what a newer decomposition of the guideline does, not\nsomething a person chooses, and allowing it here would let a human forge that history. Blocking\nit here says nothing about a requirement that already *is* SUPERSEDED — that state is terminal,\nand `_live_revision_for_write` is what refuses to bring one back."},"SetRoleParticipantsRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"}},"type":"object","title":"SetRoleParticipantsRequest"},"SetTaskStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/TaskStatus"}},"type":"object","required":["status"],"title":"SetTaskStatusRequest"},"SetTeamMemberPrimaryRequest":{"properties":{"is_primary":{"type":"boolean","title":"Is Primary"}},"type":"object","required":["is_primary"],"title":"SetTeamMemberPrimaryRequest"},"SetUserNotificationPreferenceRequest":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"enabled":{"type":"boolean","title":"Enabled"},"scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","enabled"],"title":"SetUserNotificationPreferenceRequest"},"SetVisibilityScopeRequest":{"properties":{"visibility_scope":{"$ref":"#/components/schemas/VisibilityScope"}},"type":"object","required":["visibility_scope"],"title":"SetVisibilityScopeRequest"},"ShareRunRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"ShareRunRequest"},"SheetApplicationEntry":{"properties":{"sheet":{"type":"string","title":"Sheet"},"approach":{"type":"string","title":"Approach"},"status":{"type":"string","title":"Status"}},"type":"object","required":["sheet","approach","status"],"title":"SheetApplicationEntry"},"SkipReason":{"type":"string","enum":["no_product_lines","no_baseline_run","baseline_already_new_path","analysis_failed"],"title":"SkipReason","description":"Why a piece of collateral in the window was not swept.\n\nStored per item rather than filtered out of the cohort, because \"we analysed 12 of your 30\npieces\" is only meaningful beside why the other 18 were not: a cohort that silently shrank reads\nas a clean sweep of everything."},"SkippedGuideline":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"reason":{"$ref":"#/components/schemas/DecompositionSkipReason"}},"type":"object","required":["file_id","filename","reason"],"title":"SkippedGuideline"},"SkippedSheetInfo":{"properties":{"sheet":{"type":"string","title":"Sheet"},"missing_columns":{"items":{"type":"string"},"type":"array","title":"Missing Columns"}},"type":"object","required":["sheet","missing_columns"],"title":"SkippedSheetInfo","description":"A sheet that was skipped due to missing required columns (display names from CANON)."},"SlowRun":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"run_time":{"type":"string","format":"date-time","title":"Run Time"},"analysis_started_at":{"type":"string","format":"date-time","title":"Analysis Started At"},"analysis_completed_at":{"type":"string","format":"date-time","title":"Analysis Completed At"},"queue_seconds":{"type":"number","title":"Queue Seconds"},"analysis_seconds":{"type":"number","title":"Analysis Seconds"},"end_to_end_seconds":{"type":"number","title":"End To End Seconds"}},"type":"object","required":["run_id","company_id","company_name","file_id","filename","run_time","analysis_started_at","analysis_completed_at","queue_seconds","analysis_seconds","end_to_end_seconds"],"title":"SlowRun","description":"One marketing run in the slowest-runs drill-down, queue split from analysis.\n\nThe split is the point: `queue_seconds` high with `analysis_seconds` low is a\ndispatch problem, the reverse means the run itself was slow, and total latency\nalone can't tell them apart. `end_to_end_seconds` is queue + analysis.\n\n`analysis_seconds` is file prep *plus* analysis (see `RunLatencyTotals`), so a\nlarge value here still leaves the file pipeline as a candidate cause.\n\n`file_id` is the collateral `Files.file_id` used to deeplink into the\nmarketing file history view (`/file/{file_id}/history`); it is null for a run\nwith no marketing-collateral association."},"SlowRunSort":{"type":"string","enum":["end_to_end","queue"],"title":"SlowRunSort","description":"Ordering for the slowest-marketing-runs drill-down.\n\n``end_to_end`` (default) answers \"which analyses took really long?\" as the\nuser experienced it -- a run that waited 43 min and one that analysed for\n27 min both belong on that list. ``queue`` isolates the dispatch-side\ndelay when triaging a suspected queue stall."},"SlowRunsResponse":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"sort":{"$ref":"#/components/schemas/SlowRunSort"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"runs":{"items":{"$ref":"#/components/schemas/SlowRun"},"type":"array","title":"Runs"}},"type":"object","required":["week_start","sort","total","limit","offset","runs"],"title":"SlowRunsResponse","description":"Paginated slowest marketing runs whose run falls in the clicked ISO week.\n\n`total` is every run the week's latency stats were computed over -- the whole\nfiltered set, not the page -- so it equals that week's\n`WeeklyRunLatencyPoint.runs` for the same scope, and the first row under the\ndefault sort is the run behind that week's `end_to_end_max_seconds`. `runs` is\nthe `offset`..`offset+limit` slice, ordered by the sort key then `run_id` so\npaging is stable."},"SmartDocExtractionBackendResult":{"properties":{"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"},"latency_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency S"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Correct"},"field_groups":{"items":{"$ref":"#/components/schemas/FieldGroup"},"type":"array","title":"Field Groups","default":[]}},"type":"object","title":"SmartDocExtractionBackendResult"},"SmartDocExtractionLabelRequest":{"properties":{"run_id":{"type":"string","title":"Run Id"},"upload_id":{"type":"string","title":"Upload Id"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["run_id","upload_id"],"title":"SmartDocExtractionLabelRequest"},"SmartDocExtractionPreferenceRequest":{"properties":{"run_id":{"type":"string","title":"Run Id"},"upload_id":{"type":"string","title":"Upload Id"},"field_id":{"type":"string","title":"Field Id"},"preference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preference"}},"type":"object","required":["run_id","upload_id","field_id"],"title":"SmartDocExtractionPreferenceRequest"},"SmartDocExtractionResultItem":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"group":{"type":"string","title":"Group"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"smart_document_type":{"type":"string","title":"Smart Document Type"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"ground_truth_expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ground Truth Expiration Date"},"backends":{"additionalProperties":{"$ref":"#/components/schemas/SmartDocExtractionBackendResult"},"type":"object","title":"Backends"},"field_preferences":{"additionalProperties":{"type":"string"},"type":"object","title":"Field Preferences","default":{}},"preference_score":{"additionalProperties":{"type":"integer"},"type":"object","title":"Preference Score","default":{}}},"type":"object","required":["upload_id","group","smart_document_type","backends"],"title":"SmartDocExtractionResultItem"},"SmartDocumentType":{"type":"string","enum":["soc","contract","pen_test","coi","dpa","bcp","iso_27001","infosec_policy","financial_statements","subprocessor_list","pci_aoc"],"title":"SmartDocumentType"},"SortDirection":{"type":"string","enum":["asc","desc"],"title":"SortDirection","description":"Which way a sortable list is sorted.\n\nHere rather than beside any one feature because a direction is not a property of what is being\nsorted. `backend/api/vendors.py`, `reviews.py` and `vendor_services.py` each spell it as\n`Query(\"asc\", pattern=\"^(asc|desc)$\")`; the wire values match, so those can adopt this without a\nclient change, and nothing new should add a fourth spelling (`naming-semantics` N-1)."},"SourceRequirement":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"question":{"type":"string","title":"Question"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"template_section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Section"}},"type":"object","required":["requirement_id","question"],"title":"SourceRequirement","description":"The requirement that generated an issue."},"StaffStandardDetailResponse":{"properties":{"guideline":{"$ref":"#/components/schemas/GuidelineSummary"},"requirements":{"items":{"$ref":"#/components/schemas/GuidelineRequirementResponse"},"type":"array","title":"Requirements"},"superseded_with_human_edits":{"type":"integer","title":"Superseded With Human Edits"},"max_requirements_per_state_change":{"type":"integer","title":"Max Requirements Per State Change"}},"type":"object","required":["guideline","requirements","superseded_with_human_edits","max_requirements_per_state_change"],"title":"StaffStandardDetailResponse","description":"One standard's requirements, plus the ceiling the console has to respect at the tick.\n\nThe customer library learns its bulk cap from the requirement *list* route, which this console\ndoes not use — it works one document at a time, beside the document. Without the number here the\nconsole would either hardcode a copy of the server's constant or let a reader tick sixty rows and\nmeet a validation error after the press, which turns the large clean-up bulk actions exist for\ninto the one case they refuse.\n\nA subclass rather than a wrapper: the payload *is* the guideline detail, and a nested field would\nmake every reader of it reach one level deeper on the staff surface than on the customer one."},"StageOutstandingParty":{"properties":{"kind":{"type":"string","enum":["user","team","internal"],"title":"Kind","default":"user"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"StageOutstandingParty","description":"One party a stage's work is currently sitting with.\n\nA person, a team, or — for ``internal`` — the reviewing team as a body, which\nis what work neither owned nor assigned to anyone falls back to. Diligence\nsections carry an optional owner and most are left unset, so a row routinely\nmixes named owners with that fallback rather than choosing between them."},"StageOutstandingWith":{"properties":{"kind":{"type":"string","enum":["assignee","vendor","internal"],"title":"Kind"},"parties":{"items":{"$ref":"#/components/schemas/StageOutstandingParty"},"type":"array","title":"Parties","default":[]}},"type":"object","required":["kind"],"title":"StageOutstandingWith","description":"Who the review's current stage is waiting on.\n\n``internal`` is the last resort: work sitting on our side names the review's\nassignee where it has one, so a row says who to chase rather than only that\nthe ball is ours."},"StandaloneFormResponse":{"properties":{"response_id":{"type":"string","format":"uuid","title":"Response Id"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"status":{"$ref":"#/components/schemas/FormRequestStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"submitted":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted"},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"user":{"anyOf":[{"$ref":"#/components/schemas/FormRequestee"},{"type":"null"}]},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"last_reminder_sent":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reminder Sent"},"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Output"},"type":"array","title":"Response","default":[]},"question_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Question Ids"},"changes_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changes Requested At"},"changes_requested_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes Requested By Name"},"changes_requested_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes Requested Notes"},"form_id":{"type":"string","format":"uuid","title":"Form Id"},"form_name":{"type":"string","title":"Form Name"},"template":{"items":{"$ref":"#/components/schemas/FlattenedDraftingSectionV2"},"type":"array","title":"Template","default":[]},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"vendor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Name"},"template_type":{"anyOf":[{"$ref":"#/components/schemas/DraftingTemplateType"},{"type":"null"}]}},"type":"object","required":["response_id","due_date","status","created","question_ids","form_id","form_name","requesting_company_id"],"title":"StandaloneFormResponse"},"StartApplicabilityRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"},"batch_max":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Batch Max"}},"type":"object","required":["company_id","file_id"],"title":"StartApplicabilityRequest"},"StartApplicabilityResponse":{"properties":{"applicability_run_id":{"type":"string","format":"uuid","title":"Applicability Run Id"},"already_running":{"type":"boolean","title":"Already Running"}},"type":"object","required":["applicability_run_id","already_running"],"title":"StartApplicabilityResponse"},"StartDecompositionsRequest":{"properties":{"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"File Ids"},"without_requirements":{"type":"boolean","title":"Without Requirements","default":false},"stale":{"type":"boolean","title":"Stale","default":false}},"type":"object","title":"StartDecompositionsRequest","description":"Which guidelines to decompose: the ones named, the ones with no requirements, or the stale ones.\n\nExactly one of the three, which the *handler* enforces with a 400 rather than a validator here — a\n422's `detail` is a list of error objects and `apiErrorDetail` in the browser drops it for a\ngeneric message, so a rule expressed here is a rule nobody is ever told about. See\n`_scope_of_the_request` in `backend/api/marketing/guidelines.py`.\n\n`file_ids = None` used to mean every marketing standard the company has, and a single button sent\nit: one press re-read documents whose libraries were already there, retiring each of those\ngenerations. A regeneration cannot carry a person's wording edits onto the generation that\nreplaces it (`content_edited_by_a_person` exists to count what is lost), so that press destroyed\nwork by design. That unnamed whole-library shape is gone. What replaced it are two named sets the\nserver re-derives as the request lands — `without_requirements` and `stale` — so a caller cannot\nask for a whole-library re-read of *current* libraries by leaving a field out, and neither flag\ncan be widened into one without being renamed.\n\nNaming files explicitly still re-reads whatever is named, whether or not it has a library: that is\nwhat the per-document Regenerate is for — a library built from a version the document has moved\npast, or a run that failed. `stale` is the same decision as that per-row button, asked of every\nstandard that is in that state, still derived here rather than from a browser-assembled list.\n\nThe response names everything that was started and everything that was not, because the caller\ncannot otherwise tell a guideline that was skipped from one that silently failed."},"StartDecompositionsResponse":{"properties":{"started":{"items":{"$ref":"#/components/schemas/DecompositionSummary"},"type":"array","title":"Started"},"skipped":{"items":{"$ref":"#/components/schemas/SkippedGuideline"},"type":"array","title":"Skipped"}},"type":"object","required":["started","skipped"],"title":"StartDecompositionsResponse"},"StartRequirementTestRequest":{"properties":{"draft":{"$ref":"#/components/schemas/RequirementDraft"},"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":40},{"type":"null"}],"title":"File Ids"},"include_unreviewed":{"type":"boolean","title":"Include Unreviewed","default":false}},"type":"object","required":["draft"],"title":"StartRequirementTestRequest","description":"Try this draft against the assets a reviewer has already ruled on."},"StartSweepRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"window_days":{"type":"integer","title":"Window Days","default":14},"file_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"File Ids"}},"type":"object","required":["company_id"],"title":"StartSweepRequest"},"StartSweepResponse":{"properties":{"sweep_id":{"type":"string","format":"uuid","title":"Sweep Id"}},"type":"object","required":["sweep_id"],"title":"StartSweepResponse"},"StartTrainingRunRequest":{"properties":{"guidance_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance Text"},"suggested_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Inherent Risk Label"},"force_rating":{"type":"boolean","title":"Force Rating","default":false},"reference_upload_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Reference Upload Ids"},"reference_urls":{"items":{"type":"string"},"type":"array","title":"Reference Urls"}},"type":"object","title":"StartTrainingRunRequest","description":"A reviewer teaching Kobalt what a factor's guidance should have said.\n\nAt least one of `guidance_text`, a reference, or a rating must be supplied —\nan empty correction gives the agent nothing to work from. The check lives in\nthe route rather than a validator so the message can name all three."},"StatusResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"}},"type":"object","title":"StatusResponse"},"StepResultResponse":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"result":{"anyOf":[{},{"type":"null"}],"title":"Result"}},"type":"object","required":["step_id","result"],"title":"StepResultResponse"},"StepResultState":{"type":"string","enum":["ok","empty","error","timeout"],"title":"StepResultState","description":"Outcome of a TOOL_CALL step. NULL on the row means still in flight.\n\nEMPTY is distinct from ERROR: a tool that ran successfully and found\nnothing (e.g. an empty web search) is not a failure."},"StepView":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"ordinal":{"type":"integer","title":"Ordinal"},"kind":{"$ref":"#/components/schemas/AgentRunStepKind"},"group_id":{"type":"string","format":"uuid","title":"Group Id"},"tool_use_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Use Id"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"result_preview":{"anyOf":[{},{"type":"null"}],"title":"Result Preview"},"result_state":{"anyOf":[{"$ref":"#/components/schemas/StepResultState"},{"type":"null"}]},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"result_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Result Bytes"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"cited_in_verdict":{"type":"boolean","title":"Cited In Verdict","default":false},"risk_factor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Risk Factor Id"}},"type":"object","required":["step_id","ordinal","kind","group_id","tool_use_id","tool_name","input","content","result_preview","result_state","result_summary","result_bytes","model","input_tokens","output_tokens","started_at","duration_ms"],"title":"StepView"},"StoredFile":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"created":{"type":"string","format":"date-time","title":"Created"},"review_status":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}]},"aws_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Key"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/UploadedFileStatus"},{"type":"null"}]},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"transcript_from_video":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript From Video"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"num_pages":{"type":"integer","title":"Num Pages"},"file_type":{"type":"string"},"embed_state":{"anyOf":[{"$ref":"#/components/schemas/EmbedState"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["upload_id","file_id","filename","created","num_pages","file_type"],"title":"StoredFile"},"StreamEventView":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"event_type":{"type":"string","title":"Event Type"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["event_id","subject_id","event_type","payload","created"],"title":"StreamEventView"},"StreamEventsPollResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/StreamEventView"},"type":"array","title":"Events"},"now":{"type":"string","format":"date-time","title":"Now"}},"type":"object","required":["now"],"title":"StreamEventsPollResponse"},"StuckFile":{"properties":{"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"file_status":{"$ref":"#/components/schemas/UploadedFileStatus"},"embed_state":{"anyOf":[{"$ref":"#/components/schemas/EmbedState"},{"type":"null"}]},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"},"minutes_since_uploaded":{"type":"integer","title":"Minutes Since Uploaded"}},"type":"object","required":["upload_id","filename","file_status","embed_state","uploaded_at","minutes_since_uploaded"],"title":"StuckFile"},"SubmitRequirementCheckFeedbackRequest":{"properties":{"feedback_type":{"$ref":"#/components/schemas/RequirementCheckFeedbackType"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["feedback_type"],"title":"SubmitRequirementCheckFeedbackRequest"},"Success":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"Success"},"SuggestRequirementRequest":{"properties":{"draft":{"anyOf":[{"$ref":"#/components/schemas/RequirementDraft"},{"type":"null"}]},"goal":{"$ref":"#/components/schemas/RequirementTuningGoal","default":"reduce_false_positives"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"SuggestRequirementRequest","description":"Propose a rewording, from what reviewers did and what the last tests found."},"SuggestedRecipient":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","first_name","last_name"],"title":"SuggestedRecipient","description":"Suggested recipient for evidence collection, typically from vendor POC."},"SupportRequest":{"properties":{"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"}},"type":"object","required":["subject","message"],"title":"SupportRequest"},"SuppressedRiskResponse":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"short_text":{"type":"string","title":"Short Text"},"suppression_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suppression Rationale"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["risk_id","short_text","suppression_rationale","file_id","filename"],"title":"SuppressedRiskResponse"},"SweepCandidate":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"collateral_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collateral Type"},"created":{"type":"string","format":"date-time","title":"Created"},"reviewed_risks":{"type":"integer","title":"Reviewed Risks"},"flagged":{"type":"integer","title":"Flagged"},"dismissed":{"type":"integer","title":"Dismissed"},"has_baseline":{"type":"boolean","title":"Has Baseline"},"previously_swept":{"type":"boolean","title":"Previously Swept"}},"type":"object","required":["file_id","filename","collateral_type","created","reviewed_risks","flagged","dismissed","has_baseline","previously_swept"],"title":"SweepCandidate","description":"One piece of collateral an operator may pick for a sweep.\n\nCarries what the choice actually turns on: whether reviewers dispositioned its last analysis —\na sweep over collateral nobody reviewed can measure repeatability but not recall, because every\nbaseline risk scores UNREVIEWED by construction — and whether it has a baseline at all."},"SweepCompanyOption":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"rollout_enrolled":{"type":"boolean","title":"Rollout Enrolled"},"collateral_last_14_days":{"type":"integer","title":"Collateral Last 14 Days"}},"type":"object","required":["company_id","company_name","rollout_enrolled","collateral_last_14_days"],"title":"SweepCompanyOption","description":"One pickable company, with what an operator needs to judge a sweep worth starting."},"SweepDetail":{"properties":{"sweep_id":{"type":"string","format":"uuid","title":"Sweep Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"window_days":{"type":"integer","title":"Window Days"},"status":{"$ref":"#/components/schemas/SweepStatus"},"stage":{"$ref":"#/components/schemas/SweepStage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"stalled":{"type":"boolean","title":"Stalled"},"rollout_enrolled":{"type":"boolean","title":"Rollout Enrolled"},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"collateral_in_window":{"type":"integer","title":"Collateral In Window"},"collateral_considered":{"type":"integer","title":"Collateral Considered"},"collateral_analysed":{"type":"integer","title":"Collateral Analysed"},"requirement_pairs":{"type":"integer","title":"Requirement Pairs"},"requirement_pairs_agreed":{"type":"integer","title":"Requirement Pairs Agreed"},"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"visible_pairs_agreed":{"type":"integer","title":"Visible Pairs Agreed"},"visible_agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visible Agreement Rate"},"unmet_in_a_only":{"type":"integer","title":"Unmet In A Only"},"unmet_in_b_only":{"type":"integer","title":"Unmet In B Only"},"visible_flips_from_edits":{"type":"integer","title":"Visible Flips From Edits"},"presence_drift":{"type":"integer","title":"Presence Drift"},"outcome_drift":{"type":"integer","title":"Outcome Drift"},"revision_drift":{"type":"integer","title":"Revision Drift"},"batches_skipped":{"type":"integer","title":"Batches Skipped"},"flagged_carried":{"type":"integer","title":"Flagged Carried"},"flagged_lost":{"type":"integer","title":"Flagged Lost"},"flagged_recall":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flagged Recall"},"dismissed_dropped":{"type":"integer","title":"Dismissed Dropped"},"dismissed_reintroduced":{"type":"integer","title":"Dismissed Reintroduced"},"dismissed_suppression_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dismissed Suppression Rate"},"net_new":{"type":"integer","title":"Net New"},"items":{"items":{"$ref":"#/components/schemas/SweepItem"},"type":"array","title":"Items"},"low_signal":{"items":{"$ref":"#/components/schemas/LowSignalRule"},"type":"array","title":"Low Signal"},"low_signal_truncated":{"type":"boolean","title":"Low Signal Truncated"},"rule_drift":{"items":{"$ref":"#/components/schemas/RuleDrift"},"type":"array","title":"Rule Drift"},"rule_drift_truncated":{"type":"boolean","title":"Rule Drift Truncated"},"max_requirements_per_state_change":{"type":"integer","title":"Max Requirements Per State Change"},"regressions":{"items":{"$ref":"#/components/schemas/RegressionRow"},"type":"array","title":"Regressions"},"regressions_truncated":{"type":"boolean","title":"Regressions Truncated"},"reviews":{"items":{"$ref":"#/components/schemas/ReviewMark"},"type":"array","title":"Reviews"}},"type":"object","required":["sweep_id","company_id","company_name","window_days","status","stage","error","stalled","rollout_enrolled","created","started_at","finished_at","collateral_in_window","collateral_considered","collateral_analysed","requirement_pairs","requirement_pairs_agreed","agreement_rate","visible_pairs_agreed","visible_agreement_rate","unmet_in_a_only","unmet_in_b_only","visible_flips_from_edits","presence_drift","outcome_drift","revision_drift","batches_skipped","flagged_carried","flagged_lost","flagged_recall","dismissed_dropped","dismissed_reintroduced","dismissed_suppression_rate","net_new","items","low_signal","low_signal_truncated","rule_drift","rule_drift_truncated","max_requirements_per_state_change","regressions","regressions_truncated","reviews"],"title":"SweepDetail","description":"Everything one sweep produced."},"SweepGuidelineDocument":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"rules":{"items":{"$ref":"#/components/schemas/SweepGuidelineRule"},"type":"array","title":"Rules"},"rules_truncated":{"type":"boolean","title":"Rules Truncated"}},"type":"object","required":["file_id","filename","rules","rules_truncated"],"title":"SweepGuidelineDocument","description":"The standards document a low-signal (or drift) rule came from, and its live obligations."},"SweepGuidelineRule":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"revision_id":{"type":"string","format":"uuid","title":"Revision Id"},"revision_number":{"type":"integer","title":"Revision Number"},"state":{"$ref":"#/components/schemas/GuidelineRequirementState"},"requirement_text":{"type":"string","title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms"},"provenance":{"$ref":"#/components/schemas/RequirementProvenance"}},"type":"object","required":["requirement_id","revision_id","revision_number","state","requirement_text","judging_guidance","trigger_terms","provenance"],"title":"SweepGuidelineRule","description":"One live requirement on a standards document, with where in that document it came from."},"SweepItem":{"properties":{"item_id":{"type":"string","format":"uuid","title":"Item Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","format":"uuid","title":"Upload Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"run_a_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run A Id"},"run_b_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run B Id"},"baseline_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Baseline Run Id"},"trial_run_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Trial Run Company Id"},"baseline_on_same_upload":{"type":"boolean","title":"Baseline On Same Upload"},"skip_reason":{"anyOf":[{"$ref":"#/components/schemas/SkipReason"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"requirement_pairs":{"type":"integer","title":"Requirement Pairs"},"requirement_pairs_agreed":{"type":"integer","title":"Requirement Pairs Agreed"},"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"visible_pairs_agreed":{"type":"integer","title":"Visible Pairs Agreed"},"visible_agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visible Agreement Rate"},"visible_flips":{"type":"integer","title":"Visible Flips"},"flagged_lost":{"type":"integer","title":"Flagged Lost"},"dismissed_reintroduced":{"type":"integer","title":"Dismissed Reintroduced"}},"type":"object","required":["item_id","file_id","upload_id","filename","run_a_id","run_b_id","baseline_run_id","trial_run_company_id","baseline_on_same_upload","skip_reason","error","requirement_pairs","requirement_pairs_agreed","agreement_rate","visible_pairs_agreed","visible_agreement_rate","visible_flips","flagged_lost","dismissed_reintroduced"],"title":"SweepItem","description":"One piece of collateral in a sweep."},"SweepPreview":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"rollout_enrolled":{"type":"boolean","title":"Rollout Enrolled"},"window_days":{"type":"integer","title":"Window Days"},"collateral_in_window":{"type":"integer","title":"Collateral In Window"},"collateral_considered":{"type":"integer","title":"Collateral Considered"},"collateral_runnable":{"type":"integer","title":"Collateral Runnable"},"skipped":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/SkipReason"},"type":"object","title":"Skipped"},"analyses_to_run":{"type":"integer","title":"Analyses To Run"},"guidelines_ready":{"type":"integer","title":"Guidelines Ready"},"guidelines_without_library":{"type":"integer","title":"Guidelines Without Library"},"max_cohort":{"type":"integer","title":"Max Cohort"}},"type":"object","required":["company_id","company_name","rollout_enrolled","window_days","collateral_in_window","collateral_considered","collateral_runnable","skipped","analyses_to_run","guidelines_ready","guidelines_without_library","max_cohort"],"title":"SweepPreview","description":"What a sweep would do, before one is started.\n\nExists because a sweep is expensive and irreversible in the only way that matters — it writes\nreal marketing runs into the customer's history — so the cost is stated before the button, not\ndiscovered afterwards."},"SweepRunRisk":{"properties":{"risk_id":{"type":"string","format":"uuid","title":"Risk Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"short_text":{"type":"string","title":"Short Text"},"explanation":{"type":"string","title":"Explanation"},"remediation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"source_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Clause"},"document_clause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Clause"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"ignore_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ignore Comment"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"citations":{"items":{"$ref":"#/components/schemas/DocumentRiskCitation"},"type":"array","title":"Citations"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["risk_id","document_id","short_text","explanation","remediation","severity","source_clause","document_clause","status","ignore_comment","created_by_user_id","created","citations","run_id"],"title":"SweepRunRisk","description":"One finding on a sweep's baseline or trial run, for the side-by-side viewer.\n\nCarries what the product's own risk card draws, because that card is what the viewer renders —\na shape of its own here would be a second, quietly diverging answer to \"what did this run say\".\n\nDeliberately not `RiskDetail`: that shape carries `suppressed_by_rule_id`, which this surface\nhas no business exposing, and it omits the citation boxes the PDF pane needs to highlight.\nReviewer free text is *not* here: `dismiss_note` and the notes document are the reviewer's own,\nand the viewer is read-only, so nothing on screen would render them."},"SweepRunSnapshot":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"run_type":{"type":"string","title":"Run Type"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"run_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Run Time"},"risks":{"items":{"$ref":"#/components/schemas/SweepRunRisk"},"type":"array","title":"Risks"},"risks_truncated":{"type":"boolean","title":"Risks Truncated"},"requirement_citations":{"items":{"$ref":"#/components/schemas/RiskRequirementCitations"},"type":"array","title":"Requirement Citations","default":[]}},"type":"object","required":["run_id","run_type","filename","upload_id","run_time","risks","risks_truncated"],"title":"SweepRunSnapshot","description":"One run that belongs to this sweep, with the bytes and findings the modal needs."},"SweepStage":{"type":"string","enum":["queued","gathering","analysing","comparing","done"],"title":"SweepStage","description":"What the sweep is doing right now.\n\nCommitted *before* the work it names starts, so a watcher sees the stage currently taking the\ntime rather than the last one that finished. `ANALYSING` is where nearly all of it goes."},"SweepStatus":{"type":"string","enum":["queued","running","succeeded","failed"],"title":"SweepStatus","description":"Lifecycle of one sweep. Mirrors `ApplicabilityRunStatus` deliberately."},"SweepSummary":{"properties":{"sweep_id":{"type":"string","format":"uuid","title":"Sweep Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"window_days":{"type":"integer","title":"Window Days"},"status":{"$ref":"#/components/schemas/SweepStatus"},"stage":{"$ref":"#/components/schemas/SweepStage"},"stalled":{"type":"boolean","title":"Stalled"},"rollout_enrolled":{"type":"boolean","title":"Rollout Enrolled"},"created":{"type":"string","format":"date-time","title":"Created"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"collateral_analysed":{"type":"integer","title":"Collateral Analysed"},"visible_agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visible Agreement Rate"},"visible_flips":{"type":"integer","title":"Visible Flips"},"agreement_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agreement Rate"},"flagged_lost":{"type":"integer","title":"Flagged Lost"},"dismissed_reintroduced":{"type":"integer","title":"Dismissed Reintroduced"}},"type":"object","required":["sweep_id","company_id","company_name","window_days","status","stage","stalled","rollout_enrolled","created","finished_at","collateral_analysed","visible_agreement_rate","visible_flips","agreement_rate","flagged_lost","dismissed_reintroduced"],"title":"SweepSummary","description":"One row in the sweep list."},"TakeOverIraResponse":{"properties":{"form_response_id":{"type":"string","format":"uuid","title":"Form Response Id"}},"type":"object","required":["form_response_id"],"title":"TakeOverIraResponse","description":"The blank response id opened for a reviewer completing an IRA themselves."},"TaskDetailResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"turn":{"anyOf":[{"$ref":"#/components/schemas/Party"},{"type":"null"}]},"internal_name":{"type":"string","title":"Internal Name"},"external_name":{"type":"string","title":"External Name"},"internal_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Website"},"external_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Website"},"created":{"type":"string","format":"date-time","title":"Created"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"disposition":{"anyOf":[{"$ref":"#/components/schemas/TaskDisposition"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"reminder_last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder Last Sent At"},"visibility_scope":{"$ref":"#/components/schemas/VisibilityScope"},"participants":{"items":{"$ref":"#/components/schemas/TaskParticipantResponse"},"type":"array","title":"Participants","default":[]},"created_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"events":{"items":{"$ref":"#/components/schemas/TaskEventResponse"},"type":"array","title":"Events","default":[]}},"type":"object","required":["task_id","short_text","status","internal_name","external_name","created","visibility_scope","vendor_id"],"title":"TaskDetailResponse"},"TaskDisposition":{"type":"string","enum":["accepted","risk_accepted","waived","withdrawn"],"title":"TaskDisposition","description":"Why a task was closed. Set only when status == CLOSED."},"TaskEventResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"action_type":{"$ref":"#/components/schemas/TaskEventType"},"author":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"author_company_id":{"type":"string","format":"uuid","title":"Author Company Id"},"visibility":{"$ref":"#/components/schemas/EventVisibility"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"files":{"items":{"$ref":"#/components/schemas/TaskFileSummary"},"type":"array","title":"Files","default":[]},"created":{"type":"string","format":"date-time","title":"Created"},"handed_back":{"type":"boolean","title":"Handed Back","default":false}},"type":"object","required":["event_id","action_type","author_company_id","visibility","created"],"title":"TaskEventResponse"},"TaskEventType":{"type":"string","enum":["comment","evidence_added","due_date_changed","assignment_changed","status_changed","closed","reopened"],"title":"TaskEventType","description":"Discriminator for the append-only log."},"TaskFileSummary":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"}},"type":"object","required":["file_id","filename"],"title":"TaskFileSummary"},"TaskListItemResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"short_text":{"type":"string","title":"Short Text"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/TaskStatus"},"turn":{"anyOf":[{"$ref":"#/components/schemas/Party"},{"type":"null"}]},"internal_name":{"type":"string","title":"Internal Name"},"external_name":{"type":"string","title":"External Name"},"internal_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Website"},"external_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Website"},"created":{"type":"string","format":"date-time","title":"Created"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"disposition":{"anyOf":[{"$ref":"#/components/schemas/TaskDisposition"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"reminder_last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reminder Last Sent At"},"visibility_scope":{"$ref":"#/components/schemas/VisibilityScope"},"participants":{"items":{"$ref":"#/components/schemas/TaskParticipantResponse"},"type":"array","title":"Participants","default":[]},"created_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/TaskUser"},{"type":"null"}]},"review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Id"}},"type":"object","required":["task_id","short_text","status","internal_name","external_name","created","visibility_scope"],"title":"TaskListItemResponse"},"TaskParticipantResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"role":{"$ref":"#/components/schemas/ParticipantRole"},"source":{"$ref":"#/components/schemas/ParticipantSource"}},"type":"object","required":["user_id","first_name","last_name","company_id","role","source"],"title":"TaskParticipantResponse"},"TaskStatus":{"type":"string","enum":["internal_only","waiting_on_internal","waiting_on_external","closed"],"title":"TaskStatus","description":"Whose court the follow-up is in. Turn is derived from this, never stored."},"TaskUser":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["user_id","first_name","last_name"],"title":"TaskUser"},"TeamCreateRequest":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"TeamCreateRequest"},"TeamMemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["user_id","first_name","last_name","email_address"],"title":"TeamMemberResponse"},"TeamResponse":{"properties":{"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["team_id","name"],"title":"TeamResponse"},"TeamUpdateRequest":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"TeamUpdateRequest"},"TemplateRequirementGroup":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id"},"template_name":{"type":"string","title":"Template Name"},"questions":{"items":{"$ref":"#/components/schemas/TemplateSectionQuestion"},"type":"array","title":"Questions"}},"type":"object","required":["template_id","template_name"],"title":"TemplateRequirementGroup","description":"All questions from one template, grouped under the template name."},"TemplateSectionQuestion":{"properties":{"question_id":{"type":"string","title":"Question Id"},"question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}],"title":"Question"}},"type":"object","required":["question_id","question"],"title":"TemplateSectionQuestion","description":"A single question from a template, included in a section's template group."},"TestClassifyRequest":{"properties":{"question_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Override"},"criteria_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criteria Override"},"choices_override":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices Override"},"inherent_risk_question_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inherent Risk Question Override"},"inherent_risk_criteria_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inherent Risk Criteria Override"}},"type":"object","title":"TestClassifyRequest"},"TestClassifyResult":{"properties":{"requirement_id":{"type":"string","format":"uuid","title":"Requirement Id"},"check_type":{"$ref":"#/components/schemas/EvidenceRequirementCheckType","default":"REQUIREMENT"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"thinking_text":{"type":"string","title":"Thinking Text","default":""},"test_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Test Answer"},"inherent_risk":{"anyOf":[{"$ref":"#/components/schemas/TestClassifySide"},{"type":"null"}]},"control_strength":{"anyOf":[{"$ref":"#/components/schemas/TestClassifySide"},{"type":"null"}]},"steps":{"items":{"$ref":"#/components/schemas/StepView"},"type":"array","title":"Steps"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"}},"type":"object","required":["requirement_id","input_tokens","output_tokens"],"title":"TestClassifyResult"},"TestClassifySide":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"rationale":{"type":"string","title":"Rationale","default":""},"answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Answer"}},"type":"object","title":"TestClassifySide","description":"One re-classified side of a risk-factor test (inherent risk or control strength)."},"TimelineActor":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["user_id","name","email_address"],"title":"TimelineActor"},"TimelineEventPayload":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"created":{"type":"string","title":"Created"},"actor":{"$ref":"#/components/schemas/TimelineActor"},"emoji":{"type":"string","title":"Emoji"},"title":{"type":"string","title":"Title"},"subtitle":{"type":"string","title":"Subtitle"},"target_id":{"type":"string","format":"uuid","title":"Target Id"}},"type":"object","title":"TimelineEventPayload"},"TprmCompanyRow":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_name":{"type":"string","title":"Company Name"},"open_reviews":{"type":"integer","title":"Open Reviews"},"stalled_reviews":{"type":"integer","title":"Stalled Reviews"},"completed":{"type":"integer","title":"Completed"}},"type":"object","required":["company_id","company_name","open_reviews","stalled_reviews","completed"],"title":"TprmCompanyRow","description":"One company's review-flow signals for the breakdown table."},"TprmCycleTimePoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"completed":{"type":"integer","title":"Completed"},"median_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Days"}},"type":"object","required":["week_start","completed","median_days"],"title":"TprmCycleTimePoint","description":"Median days from open to completion, for reviews completed that week.\n\n`median_days` is None for weeks with no completions. Most useful scoped to\na single company (a cross-company median mixes very different review types)."},"TprmReliabilityResponse":{"properties":{"weekly":{"items":{"$ref":"#/components/schemas/TprmWeeklyPoint"},"type":"array","title":"Weekly"},"cycle_time_weekly":{"items":{"$ref":"#/components/schemas/TprmCycleTimePoint"},"type":"array","title":"Cycle Time Weekly"},"totals":{"$ref":"#/components/schemas/TprmTotals"},"breakdown":{"items":{"$ref":"#/components/schemas/TprmCompanyRow"},"type":"array","title":"Breakdown"},"breakdown_level":{"type":"string","title":"Breakdown Level"},"weeks":{"type":"integer","title":"Weeks"},"stall_days":{"type":"integer","title":"Stall Days"}},"type":"object","required":["weekly","cycle_time_weekly","totals","breakdown","breakdown_level","weeks","stall_days"],"title":"TprmReliabilityResponse"},"TprmTeamActor":{"properties":{"kind":{"type":"string","const":"tprm_team","title":"Kind","default":"tprm_team"}},"type":"object","title":"TprmTeamActor","description":"The ball is with the internal TPRM team; nothing is pending on the user."},"TprmTotals":{"properties":{"open_reviews":{"type":"integer","title":"Open Reviews"},"stalled_reviews":{"type":"integer","title":"Stalled Reviews"},"completed":{"type":"integer","title":"Completed"}},"type":"object","required":["open_reviews","stalled_reviews","completed"],"title":"TprmTotals","description":"Current backlog health for the scope (KPI cards)."},"TprmWeeklyPoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"opened":{"type":"integer","title":"Opened"},"completed":{"type":"integer","title":"Completed"}},"type":"object","required":["week_start","opened","completed"],"title":"TprmWeeklyPoint","description":"Reviews opened vs completed in one ISO week."},"TrainingExperimentView":{"properties":{"label":{"type":"string","title":"Label"},"factor_version_id":{"type":"string","format":"uuid","title":"Factor Version Id"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"status":{"$ref":"#/components/schemas/RiskAssessmentFactorStatus"},"rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"citation_count":{"type":"integer","title":"Citation Count"},"distinct_document_count":{"type":"integer","title":"Distinct Document Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["label","factor_version_id","agent_run_id","status","rating","rationale","citation_count","distinct_document_count","error"],"title":"TrainingExperimentView","description":"One re-run of the factor subagent against a draft."},"TrainingRunDetail":{"properties":{"training_run_id":{"type":"string","format":"uuid","title":"Training Run Id"},"factor_assessment_id":{"type":"string","format":"uuid","title":"Factor Assessment Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorTrainingOutcome"},{"type":"null"}]},"proposal_status":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorVersionStatus"},{"type":"null"}]},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"experiment_count":{"type":"integer","title":"Experiment Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"risk_assessment_id":{"type":"string","format":"uuid","title":"Risk Assessment Id"},"risk_factor":{"$ref":"#/components/schemas/FactorRef"},"guidance_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance Text"},"expected_rating":{"anyOf":[{"$ref":"#/components/schemas/RatingOptionView"},{"type":"null"}]},"force_rating":{"type":"boolean","title":"Force Rating"},"reference_documents":{"items":{"$ref":"#/components/schemas/ReferenceDocumentView"},"type":"array","title":"Reference Documents"},"reference_urls":{"items":{"type":"string"},"type":"array","title":"Reference Urls"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"baseline":{"anyOf":[{"$ref":"#/components/schemas/TrainingExperimentView"},{"type":"null"}]},"experiments":{"items":{"$ref":"#/components/schemas/TrainingExperimentView"},"type":"array","title":"Experiments"},"current_version":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorVersionView"},{"type":"null"}]},"proposed_version":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorVersionView"},{"type":"null"}]},"winning_experiment_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Experiment Label"},"rating_options":{"items":{"$ref":"#/components/schemas/RatingOptionView"},"type":"array","title":"Rating Options"},"agent_run":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRef"},{"type":"null"}]},"steps":{"items":{"$ref":"#/components/schemas/StepView"},"type":"array","title":"Steps"}},"type":"object","required":["training_run_id","factor_assessment_id","status","outcome","proposal_status","created","started_at","finished_at","experiment_count","error","vendor_id","risk_assessment_id","risk_factor","guidance_text","expected_rating","force_rating","message","baseline","current_version","proposed_version","winning_experiment_label","agent_run"],"title":"TrainingRunDetail","description":"The single polled payload for the training panel (F-9)."},"TrainingRunSummary":{"properties":{"training_run_id":{"type":"string","format":"uuid","title":"Training Run Id"},"factor_assessment_id":{"type":"string","format":"uuid","title":"Factor Assessment Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorTrainingOutcome"},{"type":"null"}]},"proposal_status":{"anyOf":[{"$ref":"#/components/schemas/RiskFactorVersionStatus"},{"type":"null"}]},"created":{"type":"string","format":"date-time","title":"Created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"experiment_count":{"type":"integer","title":"Experiment Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["training_run_id","factor_assessment_id","status","outcome","proposal_status","created","started_at","finished_at","experiment_count","error"],"title":"TrainingRunSummary"},"TriggerConfigOptions":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/TriggerEntityConfig"},"type":"array","title":"Entities","default":[]}},"type":"object","title":"TriggerConfigOptions"},"TriggerEntityConfig":{"properties":{"entity_type":{"$ref":"#/components/schemas/CustomFieldEntityType"},"entity_label":{"type":"string","title":"Entity Label"},"source_fields":{"items":{"$ref":"#/components/schemas/TriggerSourceFieldInfo"},"type":"array","title":"Source Fields","default":[]},"target_fields":{"items":{"$ref":"#/components/schemas/TriggerTargetFieldInfo"},"type":"array","title":"Target Fields","default":[]}},"type":"object","required":["entity_type","entity_label"],"title":"TriggerEntityConfig"},"TriggerOptionInfo":{"properties":{"option_id":{"type":"string","format":"uuid","title":"Option Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["option_id","label"],"title":"TriggerOptionInfo"},"TriggerOverwritePolicy":{"type":"string","enum":["set_if_empty","always"],"title":"TriggerOverwritePolicy","description":"Whether a SET_CUSTOM_FIELD action may overwrite an existing value."},"TriggerSourceFieldInfo":{"properties":{"custom_field_id":{"type":"string","format":"uuid","title":"Custom Field Id"},"name":{"type":"string","title":"Name"},"options":{"items":{"$ref":"#/components/schemas/TriggerOptionInfo"},"type":"array","title":"Options","default":[]}},"type":"object","required":["custom_field_id","name"],"title":"TriggerSourceFieldInfo"},"TriggerTargetFieldInfo":{"properties":{"custom_field_id":{"type":"string","format":"uuid","title":"Custom Field Id"},"name":{"type":"string","title":"Name"},"definition_type":{"$ref":"#/components/schemas/CustomFieldDefinitionType"}},"type":"object","required":["custom_field_id","name","definition_type"],"title":"TriggerTargetFieldInfo"},"TriggerValueSource":{"type":"string","enum":["current_timestamp","literal"],"title":"TriggerValueSource","description":"Where a SET_CUSTOM_FIELD action's written value comes from."},"TuningRunAccuracyStats":{"properties":{"vs_effective_label":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vs Effective Label"},"vs_effective_label_correct":{"type":"integer","title":"Vs Effective Label Correct","default":0},"vs_effective_label_total":{"type":"integer","title":"Vs Effective Label Total","default":0},"vs_manual_label":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vs Manual Label"},"vs_manual_label_correct":{"type":"integer","title":"Vs Manual Label Correct","default":0},"vs_manual_label_total":{"type":"integer","title":"Vs Manual Label Total","default":0},"baseline_vs_effective_label":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline Vs Effective Label"},"baseline_vs_effective_label_correct":{"type":"integer","title":"Baseline Vs Effective Label Correct","default":0},"baseline_vs_effective_label_total":{"type":"integer","title":"Baseline Vs Effective Label Total","default":0}},"type":"object","title":"TuningRunAccuracyStats","description":"Accuracy of a tuning run's inherent-risk labels vs ground truth."},"TuningRunCheckResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"evidence_risk_factor_check_id":{"type":"string","format":"uuid","title":"Evidence Risk Factor Check Id"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"question_id":{"type":"string","format":"uuid","title":"Question Id"},"question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}],"title":"Question"},"inherent_risk_question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"}],"title":"Inherent Risk Question"},"inherent_risk_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireAnswer_ChoiceAnswer_"},{"$ref":"#/components/schemas/QuestionnaireAnswer_FreeAnswer_"},{"type":"null"}],"title":"Inherent Risk Answer"},"suggested_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Inherent Risk Label"},"suggested_inherent_risk_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Inherent Risk Rationale"},"classified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Classified At"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"baseline_suggested_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Baseline Suggested Inherent Risk Label"},"baseline_manual_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Baseline Manual Inherent Risk Label"},"baseline_inherent_risk_question":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseQuestion"},{"$ref":"#/components/schemas/MultipleChoiceQuestion"},{"$ref":"#/components/schemas/ChooseOneQuestion"},{"type":"null"}],"title":"Baseline Inherent Risk Question"}},"type":"object","required":["id","evidence_risk_factor_check_id","template_id","template_name","question_id","question","inherent_risk_question"],"title":"TuningRunCheckResult"},"TuningRunDetailResponse":{"properties":{"tuning_run_id":{"type":"string","format":"uuid","title":"Tuning Run Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"selected_template_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Selected Template Ids"},"checks":{"items":{"$ref":"#/components/schemas/TuningRunCheckResult"},"type":"array","title":"Checks"},"accuracy":{"$ref":"#/components/schemas/TuningRunAccuracyStats"}},"type":"object","required":["tuning_run_id","review_id","status","created","completed_at","accuracy"],"title":"TuningRunDetailResponse"},"TuningRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/TuningRunSummary"},"type":"array","title":"Runs"}},"type":"object","title":"TuningRunListResponse"},"TuningRunSummary":{"properties":{"tuning_run_id":{"type":"string","format":"uuid","title":"Tuning Run Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"status":{"$ref":"#/components/schemas/AgentRunStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"template_names":{"items":{"type":"string"},"type":"array","title":"Template Names"},"check_count":{"type":"integer","title":"Check Count","default":0}},"type":"object","required":["tuning_run_id","review_id","status","created","completed_at"],"title":"TuningRunSummary"},"UnpinCompanyRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"}},"type":"object","required":["company_id"],"title":"UnpinCompanyRequest"},"UnpinCompanyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"UnpinCompanyResponse"},"UpcomingReviewResponse":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"vendor_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Website"},"inherent_risk":{"anyOf":[{"$ref":"#/components/schemas/VendorOptionRiskSummary"},{"type":"null"}]},"assignments":{"items":{"$ref":"#/components/schemas/VendorAssignmentResponse"},"type":"array","title":"Assignments","default":[]},"last_review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Review Id"},"last_review_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Review Started At"},"last_review_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Review Completed At"},"active_review_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Review Id"},"active_review_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Review Started At"},"next_assessment_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Assessment Date"},"next_assessment_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Assessment Key Date Id"},"next_assessment_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Assessment Label"},"missed_assessment_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Missed Assessment Date"},"missed_assessment_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Missed Assessment Label"}},"type":"object","required":["vendor_id","vendor_name"],"title":"UpcomingReviewResponse","description":"One vendor's review cadence — when it was last reviewed, and when it is\nnext due.\n\nA row is a *vendor*, not a review: the next assessment date comes from the\nvendor's `review`-type key dates, which exist independently of whether a\nreview has ever run. So a vendor with a scheduled date and no history is a\nreal row (every field but the date is empty), and so is one with history and\nno date scheduled."},"UpdateCollateralTypeRequest":{"properties":{"collateral_type":{"$ref":"#/components/schemas/MarketingCollateralType"}},"type":"object","required":["collateral_type"],"title":"UpdateCollateralTypeRequest","description":"Retypes an existing collateral file.\n\nNot nullable: the web app requires a type on upload, so it must not offer a\nway back to untyped afterwards. Retyping an asset that predates the\nrequirement goes through here too, which is the only in-product way to\nclear the untyped backlog."},"UpdateContractRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"$ref":"#/components/schemas/ContractStatus"},{"type":"null"}]},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"obligations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Obligations"},"custom_field_values":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"UpdateContractRequest"},"UpdateContractTermRequest":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"termination_notice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Notice Date"},"notice_date_source":{"anyOf":[{"$ref":"#/components/schemas/NoticeDateSource"},{"type":"null"}]},"notice_period_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Period Value"},"notice_period_unit":{"anyOf":[{"$ref":"#/components/schemas/NoticePeriodUnit"},{"type":"null"}]},"renewal_term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Term Months"},"auto_renews":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renews"},"notice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notice Reminders Enabled"},"renewal_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Renewal Reminders Enabled"}},"type":"object","title":"UpdateContractTermRequest","description":"Patch a term. Only fields present in the body are written.\n\nMoving ``end_date`` recomputes ``termination_notice_date`` **only** when the\nstored ``notice_date_source`` is ``DERIVED``."},"UpdateCustomFieldTriggerRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"UpdateCustomFieldTriggerRequest"},"UpdateDisclosureRequest":{"properties":{"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"copy_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Copy Text"},"products":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Products"},"collateral_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"ai_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Trigger"},"ai_example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Example"}},"type":"object","title":"UpdateDisclosureRequest"},"UpdateDocumentRequestBody":{"properties":{"required":{"type":"boolean","title":"Required"}},"type":"object","required":["required"],"title":"UpdateDocumentRequestBody"},"UpdateDocumentTypeRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"File Ids"},"document_type":{"$ref":"#/components/schemas/DocumentTypeEnum"}},"type":"object","required":["file_ids","document_type"],"title":"UpdateDocumentTypeRequest"},"UpdateExpirationDateRequest":{"properties":{"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","title":"UpdateExpirationDateRequest"},"UpdateFactorRatingRequest":{"properties":{"manual_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manual Inherent Risk Label"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"}},"type":"object","title":"UpdateFactorRatingRequest","description":"A reviewer setting or clearing their manual override.\n\n`manual_inherent_risk_label` distinguishes \"not provided\" from \"explicitly\nnull\" via `model_fields_set` (same convention as\n`UpdateRiskFactorCheckRequest`): omit the field to leave the rating\nuntouched, or pass `null` to clear the override back to the AI suggestion."},"UpdateFileDocumentRequestBody":{"properties":{"document_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Request Id"},"requirement_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Requirement Id"},"file_type_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type Slug"}},"type":"object","title":"UpdateFileDocumentRequestBody"},"UpdateFormResponseRequest":{"properties":{"response":{"items":{"$ref":"#/components/schemas/FormAnswer-Input"},"type":"array","title":"Response"}},"type":"object","required":["response"],"title":"UpdateFormResponseRequest"},"UpdateIntakeSubmissionRequest":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/IntakeSubmissionStatus"},{"type":"null"}]},"vendor_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Company Id"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"}},"type":"object","title":"UpdateIntakeSubmissionRequest"},"UpdateKeyDateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"month":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":1.0},{"type":"null"}],"title":"Month"},"day":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Day"},"first_year":{"anyOf":[{"type":"integer","minimum":1900.0},{"type":"null"}],"title":"First Year"},"interval_years":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Interval Years"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"UpdateKeyDateRequest"},"UpdateNegativeNewsConfigRequest":{"properties":{"create_issues":{"type":"boolean","title":"Create Issues"}},"type":"object","required":["create_issues"],"title":"UpdateNegativeNewsConfigRequest","description":"Request body for updating negative news configuration."},"UpdateNegativeNewsLimitRequest":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_limit":{"type":"integer","title":"Company Limit"}},"type":"object","required":["company_id","company_limit"],"title":"UpdateNegativeNewsLimitRequest","description":"Request body to set a company's negative news monitoring limit."},"UpdateNotificationsRequest":{"properties":{"lead_days":{"items":{"type":"integer"},"type":"array","title":"Lead Days"}},"type":"object","required":["lead_days"],"title":"UpdateNotificationsRequest"},"UpdateRecipientsBody":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/EvidencePacketRecipientInput"},"type":"array","title":"Recipients"}},"type":"object","required":["recipients"],"title":"UpdateRecipientsBody","description":"Full desired recipient list for a packet; replaces the existing set."},"UpdateRegulatoryRequirementRequest":{"properties":{"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"requirement_type":{"anyOf":[{"$ref":"#/components/schemas/RequirementType"},{"type":"null"}]},"verbatim_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verbatim Text"},"llm_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Guidelines"},"applies_to_doc_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applies To Doc Types"},"trigger_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trigger Terms"}},"type":"object","title":"UpdateRegulatoryRequirementRequest","description":"User edits to a requirement on a DRAFT framework."},"UpdateRegulatoryReviewRequirementInstanceRequest":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dismissed"}},"type":"object","title":"UpdateRegulatoryReviewRequirementInstanceRequest"},"UpdateRequirementBody":{"properties":{"question":{"type":"string","title":"Question"}},"type":"object","required":["question"],"title":"UpdateRequirementBody"},"UpdateRequirementCheckRequest":{"properties":{"check_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Label"},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"}},"type":"object","title":"UpdateRequirementCheckRequest","description":"Allows reviewers to manually override the AI compliance decision and add a note."},"UpdateRequirementInstanceRequest":{"properties":{"compliance":{"anyOf":[{"$ref":"#/components/schemas/RequirementComplianceStatus"},{"type":"null"}]},"reviewer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Note"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"UpdateRequirementInstanceRequest","description":"User edits to a requirement instance. `ai_compliance` is never touched."},"UpdateRequirementNoteRequest":{"properties":{"vendor_answer":{"anyOf":[{"$ref":"#/components/schemas/QuestionnaireVendorAnswer"},{"type":"null"}]}},"type":"object","title":"UpdateRequirementNoteRequest"},"UpdateRequirementRequest":{"properties":{"base_revision_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Revision Number"},"requirement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirement Text"},"judging_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judging Guidance"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"trigger_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trigger Terms"},"change_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Change Note"}},"type":"object","title":"UpdateRequirementRequest","description":"An edit to a requirement's wording, guidance or scope.\n\nOnly fields the client actually sends are applied, so an omitted field is carried forward from\nthe current revision. `collateral_types` and `marketing_team_ids` accept an explicit `null`,\nwhich clears the scope back to \"applies to everything\" — the same convention as\n`CompanyMarketingRule`. An empty list is refused: see `_validate_scope_not_empty`.\n\n`base_revision_number` is the revision the form was filled in against. It is optional only so an\nolder client is not broken by adding it; when it is sent and no longer current, the edit is\nrefused. Without it two people editing the same requirement minutes apart both succeed and the\nsecond silently discards the first — the append-only history records the loss faithfully, which\nis not the same as preventing it."},"UpdateResultsRequest":{"properties":{"risk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Risk Id"},"short_text":{"type":"string","title":"Short Text"},"status":{"anyOf":[{"$ref":"#/components/schemas/RiskStatus"},{"type":"null"}]},"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}},"type":"object","required":["short_text"],"title":"UpdateResultsRequest"},"UpdateRiskAreaRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateRiskAreaRequest","description":"All-optional PATCH. The slug is deliberately absent: it is the key a\nfactor's assessment history is looked up by, so it never changes."},"UpdateRiskFactorCheckRequest":{"properties":{"manual_inherent_risk_label":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manual Inherent Risk Label"},"manual_control_strength_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manual Control Strength Label"}},"type":"object","title":"UpdateRiskFactorCheckRequest","description":"Allows reviewers to manually override AI-suggested labels on a risk-factor check."},"UpdateRiskFactorRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"assessment_guidance":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Assessment Guidance"},"rating_rubric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating Rubric"},"applicability_logic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Applicability Logic Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateRiskFactorRequest"},"UpdateRoleArchetypeRequest":{"properties":{"archetype":{"anyOf":[{"$ref":"#/components/schemas/ArchetypeKey"},{"type":"null"}]}},"type":"object","title":"UpdateRoleArchetypeRequest"},"UpdateRolePermissionsRequest":{"properties":{"permission_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Permission Ids"}},"type":"object","required":["permission_ids"],"title":"UpdateRolePermissionsRequest"},"UpdateRuleRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"guidance_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance Text"},"collateral_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketingCollateralType"},"type":"array"},{"type":"null"}],"title":"Collateral Types"},"marketing_team_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Marketing Team Ids"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"UpdateRuleRequest"},"UpdateSectionsBody":{"properties":{"block_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Block Ids"}},"type":"object","required":["block_ids"],"title":"UpdateSectionsBody"},"UpdateServiceStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/ServiceStatus"}},"type":"object","required":["status"],"title":"UpdateServiceStatusRequest"},"UpdateUserRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["first_name","last_name","email_address"],"title":"UpdateUserRequest"},"UpdateUserRolesRequest":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/RoleAssignment"},"type":"array","title":"Assignments"}},"type":"object","required":["assignments"],"title":"UpdateUserRolesRequest"},"UpdateVendorContactRequest":{"properties":{"role":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Role"},"custom_field_values":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"UpdateVendorContactRequest","description":"The contact's whole editable surface. A replace, not a patch: an omitted\n`role` clears it, and the custom field values overwrite what is stored.\nCustom fields are the one exception — omitting them leaves the stored set\nalone, so a client whose editor has not loaded yet cannot wipe it. Each\nfield is cleared by sending it with an empty payload, not by leaving it\nout."},"UpdateVendorCriticalityRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Criticality"}},"type":"object","required":["vendor_id","criticality"],"title":"UpdateVendorCriticalityRequest"},"UpdateVendorLifecycleStatusRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"lifecycle_status":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lifecycle Status"}},"type":"object","required":["vendor_id","lifecycle_status"],"title":"UpdateVendorLifecycleStatusRequest"},"UpdateVendorRequest":{"properties":{"website_url":{"type":"string","title":"Website Url"},"pci_compliant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pci Compliant"},"soc_compliance":{"anyOf":[{"$ref":"#/components/schemas/VendorSOCCompliance"},{"type":"null"}]},"year_of_incorporation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year Of Incorporation"},"entity_type":{"anyOf":[{"$ref":"#/components/schemas/EntityType"},{"type":"null"}]},"next_review_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review Date"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"assigned_user_ids":{"items":{"type":"string"},"type":"array","title":"Assigned User Ids"},"subcontractor_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subcontractor Ids","default":[]}},"type":"object","required":["website_url","assigned_user_ids"],"title":"UpdateVendorRequest"},"UpdateVendorRestrictionRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"is_restricted":{"type":"boolean","title":"Is Restricted"}},"type":"object","required":["vendor_id","is_restricted"],"title":"UpdateVendorRestrictionRequest"},"UpdateVendorRiskLevelRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"inherent_risk_level":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inherent Risk Level"}},"type":"object","required":["vendor_id","inherent_risk_level"],"title":"UpdateVendorRiskLevelRequest"},"UpdateVendorStatusRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"status":{"$ref":"#/components/schemas/VendorStatus"},"restore_service_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Restore Service Ids","default":[]}},"type":"object","required":["vendor_id","status"],"title":"UpdateVendorStatusRequest"},"UploadActivityItem":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"source":{"type":"string","title":"Source"},"date":{"type":"string","format":"date-time","title":"Date"},"flagged_count":{"type":"integer","title":"Flagged Count"},"risk_count":{"type":"integer","title":"Risk Count"},"reviewed":{"type":"boolean","title":"Reviewed"}},"type":"object","required":["file_id","filename","source","date","flagged_count","risk_count","reviewed"],"title":"UploadActivityItem","description":"One upload event in an uploader's Activity timeline."},"UploadAndRunResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"upload_id":{"type":"string","title":"Upload Id"}},"type":"object","required":["run_id","upload_id"],"title":"UploadAndRunResponse","description":"Where to look for the run that was just started."},"UploadDisclosureVersionsRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DisclosureVersionUploadItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UploadDisclosureVersionsRequest"},"UploadDisclosureVersionsResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DisclosureVersionUploadResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"UploadDisclosureVersionsResponse"},"UploadNewDisclosuresRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DisclosureNewUploadItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UploadNewDisclosuresRequest"},"UploadNewDisclosuresResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DisclosureNewUploadResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"UploadNewDisclosuresResponse"},"UploadSAMLMetadataRequest":{"properties":{"encoded_metadata":{"type":"string","title":"Encoded Metadata"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"company_domain":{"type":"string","title":"Company Domain"},"product":{"type":"string","title":"Product","default":"Kobalt"}},"type":"object","required":["encoded_metadata","company_id","company_domain"],"title":"UploadSAMLMetadataRequest"},"UploadedFileID":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"created":{"type":"string","format":"date-time","title":"Created"}},"type":"object","required":["file_id","filename","created"],"title":"UploadedFileID"},"UploadedFileStatus":{"type":"string","enum":["processing","deleted","in_use","in_progress","failed"],"title":"UploadedFileStatus"},"UploadedFilesCollectionWithAssignees":{"properties":{"files":{"items":{"$ref":"#/components/schemas/UploadedFilesResponse"},"type":"array","title":"Files"},"folders":{"additionalProperties":{"prefixItems":[{"$ref":"#/components/schemas/Projects"},{"items":{"$ref":"#/components/schemas/UploadedFilesResponse"},"type":"array"}],"type":"array","maxItems":2,"minItems":2},"propertyNames":{"format":"uuid"},"type":"object","title":"Folders"},"file_assignees":{"additionalProperties":{"$ref":"#/components/schemas/UserResponse"},"propertyNames":{"format":"uuid"},"type":"object","title":"File Assignees"}},"type":"object","required":["files","folders","file_assignees"],"title":"UploadedFilesCollectionWithAssignees"},"UploadedFilesResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"file_type":{"type":"string"},"filename":{"type":"string","title":"Filename"},"vendor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Vendor Id"},"created":{"type":"string","format":"date-time","title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"aws_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Key"},"num_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Pages"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"document_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Request Id"},"uploaded_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uploaded By"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"has_risks":{"type":"boolean","title":"Has Risks","default":false},"collateral_type":{"anyOf":[{"$ref":"#/components/schemas/MarketingCollateralType"},{"type":"null"}]},"transcript_from_video":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript From Video"},"preset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Preset Ids"},"embed_state":{"anyOf":[{"$ref":"#/components/schemas/EmbedState"},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"status":{"anyOf":[{"$ref":"#/components/schemas/UploadedFileStatus"},{"type":"null"}]},"is_kobalt_generated":{"type":"boolean","title":"Is Kobalt Generated","default":false}},"type":"object","required":["file_id","file_type","filename","created"],"title":"UploadedFilesResponse"},"UploaderDetail":{"properties":{"uploads":{"items":{"$ref":"#/components/schemas/UploadActivityItem"},"type":"array","title":"Uploads"},"uploads_total":{"type":"integer","title":"Uploads Total"},"flagged_findings":{"items":{"$ref":"#/components/schemas/FlaggedFinding"},"type":"array","title":"Flagged Findings"},"flagged_findings_total":{"type":"integer","title":"Flagged Findings Total"}},"type":"object","required":["uploads","uploads_total","flagged_findings","flagged_findings_total"],"title":"UploaderDetail"},"UpsertDeclinedDocumentRequest":{"properties":{"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"}},"type":"object","title":"UpsertDeclinedDocumentRequest"},"UserMetrics":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"documents_uploaded":{"type":"integer","title":"Documents Uploaded"},"documents_analyzed":{"type":"integer","title":"Documents Analyzed"},"flagged_percentage":{"type":"number","title":"Flagged Percentage"},"ignored_percentage":{"type":"number","title":"Ignored Percentage"},"ignored_count":{"type":"integer","title":"Ignored Count"},"flagged_after_ignore_percentage":{"type":"number","title":"Flagged After Ignore Percentage"},"flagged_after_ignore_count":{"type":"integer","title":"Flagged After Ignore Count"},"total_risks":{"type":"integer","title":"Total Risks"},"flagged_count":{"type":"integer","title":"Flagged Count"},"allowed_count":{"type":"integer","title":"Allowed Count"},"dismissed_count":{"type":"integer","title":"Dismissed Count"}},"type":"object","required":["user_id","documents_uploaded","documents_analyzed","flagged_percentage","ignored_percentage","ignored_count","flagged_after_ignore_percentage","flagged_after_ignore_count","total_risks","flagged_count","allowed_count","dismissed_count"],"title":"UserMetrics"},"UserNotificationPreferenceRow":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"required_permission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Permission"},"permitted":{"type":"boolean","title":"Permitted"},"enabled":{"type":"boolean","title":"Enabled"},"supports_assigned_scope":{"type":"boolean","title":"Supports Assigned Scope"},"assigned_scope_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Scope Label"},"scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]},"default_scope":{"anyOf":[{"$ref":"#/components/schemas/NotificationScope"},{"type":"null"}]}},"type":"object","required":["notification_type","label","description","required_permission","permitted","enabled","supports_assigned_scope","assigned_scope_label","scope","default_scope"],"title":"UserNotificationPreferenceRow"},"UserPermissionInfo":{"properties":{"permission_id":{"type":"string","title":"Permission Id"},"module_name":{"type":"string","title":"Module Name"},"object_name":{"type":"string","title":"Object Name"},"permission_name":{"type":"string","title":"Permission Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"granted_by_roles":{"items":{"type":"string"},"type":"array","title":"Granted By Roles"}},"type":"object","required":["permission_id","module_name","object_name","permission_name","description","granted_by_roles"],"title":"UserPermissionInfo"},"UserPermissionsLookupResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"roles":{"items":{"$ref":"#/components/schemas/UserRoleInfo"},"type":"array","title":"Roles"},"permissions":{"items":{"$ref":"#/components/schemas/UserPermissionInfo"},"type":"array","title":"Permissions"}},"type":"object","required":["user_id","email","first_name","last_name","roles","permissions"],"title":"UserPermissionsLookupResponse"},"UserResource":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"User","title":"Kind","default":"User"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/UserSpec"}},"type":"object","required":["metadata","spec"],"title":"UserResource","description":"GET response for a User resource (read-only — not accepted by apply)."},"UserResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_first_name":{"type":"string","title":"User First Name"},"user_last_name":{"type":"string","title":"User Last Name"},"email_address":{"type":"string","title":"Email Address"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"masquerade_status":{"anyOf":[{"$ref":"#/components/schemas/MasqueradeStatus"},{"type":"null"}]},"whats_new_last_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whats New Last Viewed At"}},"type":"object","required":["user_id","user_first_name","user_last_name","email_address","company_id"],"title":"UserResponse"},"UserRoleChangeRequest":{"properties":{"add_role_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Add Role Ids","default":[]},"remove_role_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Remove Role Ids","default":[]}},"type":"object","title":"UserRoleChangeRequest"},"UserRoleInfo":{"properties":{"role_id":{"type":"string","title":"Role Id"},"role_name":{"type":"string","title":"Role Name"},"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"}},"type":"object","required":["role_id","role_name","company_id","company_name"],"title":"UserRoleInfo"},"UserRoleType":{"type":"string","enum":["admin","full_user","marketing"],"title":"UserRoleType","description":"User role types for admin assignment."},"UserSpec":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["first_name","last_name","email"],"title":"UserSpec","description":"Platform user within a tenant namespace."},"UserWithRoleID":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","format":"email","title":"Email Address"},"role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Role Id"},"marketing_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Marketing Team Id"},"assignments":{"anyOf":[{"items":{"$ref":"#/components/schemas/RoleAssignment"},"type":"array"},{"type":"null"}],"title":"Assignments"}},"type":"object","required":["first_name","last_name","email_address"],"title":"UserWithRoleID"},"Users":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email_address":{"type":"string","format":"email","title":"Email Address"},"roles":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Roles"},"role_names":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Role Names"},"role_archetypes":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Role Archetypes","default":[]},"user_id":{"type":"string","format":"uuid","title":"User Id"},"access_level":{"anyOf":[{"type":"string","enum":["full","limited"]},{"type":"null"}],"title":"Access Level"}},"type":"object","required":["first_name","last_name","email_address","roles","role_names","user_id"],"title":"Users"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorAddResult":{"type":"string","enum":["created","reactivated","found"],"title":"VendorAddResult"},"VendorAddSuccess":{"properties":{"message":{"type":"string","title":"Message"},"result":{"$ref":"#/components/schemas/VendorAddResult"},"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"vendor_name":{"type":"string","title":"Vendor Name"}},"type":"object","required":["message","result","vendor_id","vendor_name"],"title":"VendorAddSuccess"},"VendorAnalytics":{"properties":{"total_vendors":{"type":"integer","title":"Total Vendors"},"by_approval_status":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Approval Status"},"by_vendor_status":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Vendor Status"},"by_inherent_risk":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Inherent Risk"},"by_criticality":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Criticality"},"by_assignee":{"items":{"$ref":"#/components/schemas/LabelValue"},"type":"array","title":"By Assignee"},"unassigned_count":{"type":"integer","title":"Unassigned Count"}},"type":"object","required":["total_vendors","by_approval_status","by_vendor_status","by_inherent_risk","by_criticality","by_assignee","unassigned_count"],"title":"VendorAnalytics"},"VendorAssignmentResponse":{"properties":{"assignment_id":{"type":"string","format":"uuid","title":"Assignment Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_first_name":{"type":"string","title":"User First Name"},"user_last_name":{"type":"string","title":"User Last Name"},"email_address":{"type":"string","title":"Email Address"}},"type":"object","required":["assignment_id","vendor_company_id","user_id","user_first_name","user_last_name","email_address"],"title":"VendorAssignmentResponse"},"VendorContactActor":{"properties":{"kind":{"type":"string","const":"vendor_contact","title":"Kind","default":"vendor_contact"},"recipients":{"items":{"$ref":"#/components/schemas/PacketRecipient"},"type":"array","title":"Recipients"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"overdue":{"type":"boolean","title":"Overdue"}},"type":"object","required":["recipients","sent_at","due_date","overdue"],"title":"VendorContactActor","description":"A diligence request is out to the vendor's contacts; overdue past the threshold."},"VendorContactResourceResponse":{"properties":{"api_version":{"type":"string","const":"config.kobalt/v1","title":"Api Version","default":"config.kobalt/v1"},"kind":{"type":"string","const":"VendorContact","title":"Kind","default":"VendorContact"},"metadata":{"$ref":"#/components/schemas/ResourceMetadataWithAnnotations"},"spec":{"$ref":"#/components/schemas/VendorContactSpec"}},"type":"object","required":["metadata","spec"],"title":"VendorContactResourceResponse","description":"GET/list response for a VendorContact resource (includes annotations)."},"VendorContactResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_first_name":{"type":"string","title":"User First Name"},"user_last_name":{"type":"string","title":"User Last Name"},"email_address":{"type":"string","title":"Email Address"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"masquerade_status":{"anyOf":[{"$ref":"#/components/schemas/MasqueradeStatus"},{"type":"null"}]},"whats_new_last_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whats New Last Viewed At"},"vendor_contact_id":{"type":"string","format":"uuid","title":"Vendor Contact Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["user_id","user_first_name","user_last_name","email_address","company_id","vendor_contact_id"],"title":"VendorContactResponse"},"VendorContactSpec":{"properties":{"vendor":{"$ref":"#/components/schemas/ServiceVendorRef"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["vendor","first_name","last_name","email"],"title":"VendorContactSpec"},"VendorContactWorkosBackfillFailure":{"properties":{"email":{"type":"string","title":"Email"},"error":{"type":"string","title":"Error"}},"type":"object","required":["email","error"],"title":"VendorContactWorkosBackfillFailure"},"VendorContactWorkosBackfillResponse":{"properties":{"created_count":{"type":"integer","title":"Created Count"},"already_existed_count":{"type":"integer","title":"Already Existed Count"},"failed_count":{"type":"integer","title":"Failed Count"},"failures":{"items":{"$ref":"#/components/schemas/VendorContactWorkosBackfillFailure"},"type":"array","title":"Failures"}},"type":"object","required":["created_count","already_existed_count","failed_count","failures"],"title":"VendorContactWorkosBackfillResponse"},"VendorContactWorkosPreviewResponse":{"properties":{"vendor_contact_count":{"type":"integer","title":"Vendor Contact Count"},"already_in_workos_count":{"type":"integer","title":"Already In Workos Count"},"to_create_count":{"type":"integer","title":"To Create Count"},"to_create_emails":{"items":{"type":"string"},"type":"array","title":"To Create Emails"}},"type":"object","required":["vendor_contact_count","already_in_workos_count","to_create_count","to_create_emails"],"title":"VendorContactWorkosPreviewResponse","description":"Dry run for the vendor-contact WorkOS backfill. Writes nothing."},"VendorDocumentHealthResponse":{"properties":{"stacks":{"items":{"$ref":"#/components/schemas/HealthFileStack"},"type":"array","title":"Stacks"},"folders":{"items":{"$ref":"#/components/schemas/HealthFolder"},"type":"array","title":"Folders","default":[]}},"type":"object","required":["stacks"],"title":"VendorDocumentHealthResponse"},"VendorIRAReviewTaskDefinitionResponse":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"review_type":{"$ref":"#/components/schemas/ReviewType"},"stage":{"$ref":"#/components/schemas/ReviewStage"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"task_type":{"type":"string","const":"vendor_ira","title":"Task Type","default":"vendor_ira"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["definition_id","company_id","review_type","stage"],"title":"VendorIRAReviewTaskDefinitionResponse"},"VendorIRAReviewTaskResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"review_id":{"type":"string","format":"uuid","title":"Review Id"},"task_type":{"$ref":"#/components/schemas/ReviewTaskType"},"status":{"$ref":"#/components/schemas/ReviewTaskStatus"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"starting_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Starting Inherent Risk"},"starting_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting Inherent Risk Label"},"suggested_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Inherent Risk"},"suggested_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Inherent Risk Label"},"set_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Inherent Risk"},"set_inherent_risk_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set Inherent Risk Label"},"inherent_risk_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inherent Risk Rationale"},"starting_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Starting Criticality"},"starting_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting Criticality Label"},"suggested_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Suggested Criticality"},"suggested_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Criticality Label"},"set_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Criticality"},"set_criticality_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set Criticality Label"},"criticality_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criticality Rationale"},"agent_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Run Id"},"agent_run_status":{"anyOf":[{"$ref":"#/components/schemas/AgentRunStatus"},{"type":"null"}]},"custom_field_changeset":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldsChangeset"},{"type":"null"}]}},"type":"object","required":["task_id","review_id","task_type","status"],"title":"VendorIRAReviewTaskResponse"},"VendorIRAReviewTaskUpdateRequest":{"properties":{"set_inherent_risk":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Inherent Risk"},"set_criticality":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Criticality"},"status":{"anyOf":[{"$ref":"#/components/schemas/ReviewTaskStatus"},{"type":"null"}]}},"type":"object","title":"VendorIRAReviewTaskUpdateRequest"},"VendorIRATaskSpec":{"properties":{"type":{"type":"string","const":"vendor_ira","title":"Type","default":"vendor_ira"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","title":"VendorIRATaskSpec"},"VendorListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"company_website":{"type":"string","title":"Company Website"}},"type":"object","required":["id","name","company_website"],"title":"VendorListResponse"},"VendorOptionResponse":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"company_website":{"type":"string","title":"Company Website"},"lifecycle_status":{"anyOf":[{"$ref":"#/components/schemas/VendorOptionRiskSummary"},{"type":"null"}]},"inherent_risk":{"anyOf":[{"$ref":"#/components/schemas/VendorOptionRiskSummary"},{"type":"null"}]}},"type":"object","required":["company_id","name","company_website"],"title":"VendorOptionResponse","description":"All active vendors with the minimal fields the intake vendor picker\nneeds. Unpaginated on purpose — the picker fuzzy-searches the full list."},"VendorOptionRiskSummary":{"properties":{"option_id":{"type":"string","format":"uuid","title":"Option Id"},"label":{"type":"string","title":"Label"},"hex_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hex Color"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"}},"type":"object","required":["option_id","label"],"title":"VendorOptionRiskSummary","description":"Canonical-option fields a badge needs (inherent risk or lifecycle status)."},"VendorProfile":{"properties":{"overview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overview"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"founded_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Founded Year"},"business_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Activity"},"adverse_media":{"anyOf":[{"$ref":"#/components/schemas/AdverseMediaSummary"},{"type":"null"}]}},"type":"object","title":"VendorProfile","description":"Public, requester-friendly vendor facts.\n\nPer a deliberate product decision, this now surfaces the same\nadverse-media summary the TPRM overview shows. It still excludes the\ninternal-only bits: compliance flags (PCI/SOC), vendor approval status,\nand the raw generated-overview sections (negative-news detail, compliance\nconsiderations) never reach a VRM user. Criticality/inherent-risk are the\nservice's own custom fields, not part of this vendor profile — see\n``ServiceDetailResponse.custom_field_values``."},"VendorSOCCompliance":{"type":"string","enum":["SOC 1","SOC 2","both"],"title":"VendorSOCCompliance"},"VendorServiceRequest":{"properties":{"vendor_id":{"type":"string","format":"uuid","title":"Vendor Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_poc":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Internal Poc"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"review_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Review Date"},"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date"},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]}},"type":"object","required":["vendor_id","name"],"title":"VendorServiceRequest"},"VendorServiceResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_company_id":{"type":"string","format":"uuid","title":"Vendor Company Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_poc":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Internal Poc"},"internal_poc_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Poc Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"review_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Review Date"},"review_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Review Key Date Id"},"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date"},"termination_key_date_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Termination Key Date Id"},"status":{"$ref":"#/components/schemas/ServiceStatus","default":"active"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Modified"},"runs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Runs","default":[]},"custom_field_values":{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array","title":"Custom Field Values","default":[]},"linked_contract":{"anyOf":[{"$ref":"#/components/schemas/LinkedContractSummary"},{"type":"null"}]}},"type":"object","required":["service_id","company_id","vendor_company_id","name"],"title":"VendorServiceResponse"},"VendorServiceUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_poc":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Internal Poc"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Date"},"review_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Review Date"},"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date"},"custom_field_values":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/CustomFieldDropdownValue"},{"$ref":"#/components/schemas/CustomFieldFreeTextValue"},{"$ref":"#/components/schemas/CustomFieldNumberValue"},{"$ref":"#/components/schemas/CustomFieldDateValue"},{"$ref":"#/components/schemas/CustomFieldBooleanValue"},{"$ref":"#/components/schemas/CustomFieldMultiselectValue"},{"$ref":"#/components/schemas/CustomFieldUserValue"},{"$ref":"#/components/schemas/CustomFieldMultiUserValue"}]},"type":"array"},{"type":"null"}],"title":"Custom Field Values"}},"type":"object","title":"VendorServiceUpdateRequest"},"VendorStatus":{"type":"string","enum":["active","archived"],"title":"VendorStatus"},"VendorSubcontractorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"vendor_name":{"type":"string","title":"Vendor Name"},"company_website":{"type":"string","title":"Company Website"}},"type":"object","required":["id","company_id","vendor_name","company_website"],"title":"VendorSubcontractorResponse"},"VendorWorkosCredentials":{"properties":{"workos_api_key":{"type":"string","format":"password","title":"Workos Api Key","writeOnly":true},"workos_client_id":{"type":"string","title":"Workos Client Id"}},"type":"object","required":["workos_api_key","workos_client_id"],"title":"VendorWorkosCredentials","description":"Credentials for the *vendor* WorkOS environment, supplied per request.\n\nbackend/api/backfills.py is mounted on the main backend, whose module-level\nworkos_client is bound to the main WorkOS environment. The identities this\nbackfill creates need to land in the vendor environment instead, so the\ntarget environment's credentials travel with the request rather than\nliving in a second set of env vars on the main service (see\nhelpers/workos_auth.build_workos_client). SecretStr keeps the key out of\nlogs and out of any response that happens to echo the request body."},"VibeCodeRequest":{"properties":{"block_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Block Id"},"new_soft_logic":{"type":"string","title":"New Soft Logic"}},"type":"object","required":["new_soft_logic"],"title":"VibeCodeRequest"},"ViewerCase":{"properties":{"case_id":{"type":"string","title":"Case Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"page_count":{"type":"integer","title":"Page Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"preview_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Error"},"located_something":{"type":"boolean","title":"Located Something","default":false},"upload_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Id"},"doc_type_scope_unknown":{"type":"boolean","title":"Doc Type Scope Unknown","default":false},"extracted_nothing":{"type":"boolean","title":"Extracted Nothing","default":false},"stores_nothing":{"type":"boolean","title":"Stores Nothing","default":false},"requirements":{"items":{"$ref":"#/components/schemas/ViewerRequirement"},"type":"array","title":"Requirements","default":[]},"discarded_texts":{"items":{"type":"string"},"type":"array","title":"Discarded Texts","default":[]},"discarded_count":{"type":"integer","title":"Discarded Count","default":0}},"type":"object","required":["case_id"],"title":"ViewerCase"},"ViewerRequirement":{"properties":{"path":{"type":"string","title":"Path"},"verbatim_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verbatim Text"},"section_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Label"},"llm_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Guidelines"},"trigger_terms":{"items":{"type":"string"},"type":"array","title":"Trigger Terms","default":[]},"applies_to_doc_types":{"items":{"type":"string"},"type":"array","title":"Applies To Doc Types","default":[]},"collateral_types":{"items":{"type":"string"},"type":"array","title":"Collateral Types","default":[]},"claimed_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Claimed Page"},"hinted_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hinted Page"},"defects":{"items":{"type":"string"},"type":"array","title":"Defects","default":[]},"grounding":{"anyOf":[{"$ref":"#/components/schemas/GroundedSpan"},{"type":"null"}]}},"type":"object","required":["path"],"title":"ViewerRequirement","description":"One requirement as the database would hold it, plus where it came from.\n\n`defects` is what the write path would do to it — the same findings the bench's report prints,\ncarried here so the viewer can show them against the requirement they belong to rather than\nas a separate list a reviewer has to reconcile by hand."},"VisibilityScope":{"type":"string","enum":["vendor_wide","participants_only"],"title":"VisibilityScope"},"VisibleFlipKind":{"type":"string","enum":["unmet_in_a_only","unmet_in_b_only"],"title":"VisibleFlipKind","description":"Which way one (collateral, requirement) pair flipped *in the reviewer's view*.\n\nThe strict agreement figure counts a pair as agreeing only when both runs judged the same\nrevision of the rule and returned the identical verdict, which is the right denominator for\ntuning — `DriftKind` splits the disagreements three ways because they have three different\nfixes. It is the wrong denominator for the question a rollout decision actually turns on:\n*would the customer have seen a different report?* Met against not-conclusive reads as drift and\nchanges nothing on screen; a rule that only reached the judge in one run reads as presence drift\nand changes everything if that run found it unmet.\n\nSo this projects both sides through `RISK_RAISING_OUTCOMES` — unmet, or not — and names the two\ndirections that survive. Never summed with `DriftKind` counts: this is the same set of\ndisagreements read a second way, not more of them.\n\nNamed `A_ONLY` / `B_ONLY` rather than lost/gained on purpose. The two trial runs are the same\npath run twice in sequence, so neither is the \"after\"; and the regression half of this dashboard\nalready means something specific by a *lost* finding — a risk the customer's reviewer flagged\nthat the new path stopped producing. A skew between these two is worth a look on its own\n(one run reaching more of the library than the other), but neither direction is a verdict."},"VrmKeyDate":{"properties":{"key_date_id":{"type":"string","format":"uuid","title":"Key Date Id"},"key_date_type":{"$ref":"#/components/schemas/KeyDateType"},"label":{"type":"string","title":"Label"},"next_occurrence_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Occurrence Date"},"contract":{"anyOf":[{"$ref":"#/components/schemas/VrmKeyDateContract"},{"type":"null"}]}},"type":"object","required":["key_date_id","key_date_type","label"],"title":"VrmKeyDate","description":"An active key date for the vendor, exposing only type/label/next date\n(plus its linked contract's name, if any)."},"VrmKeyDateContract":{"properties":{"contract_id":{"type":"string","format":"uuid","title":"Contract Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["contract_id","title"],"title":"VrmKeyDateContract","description":"The contract a key date is linked to, for display only."},"WeeklyCitationPoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"total_risks":{"type":"integer","title":"Total Risks"},"with_citations":{"type":"integer","title":"With Citations"},"with_citations_pct":{"type":"number","title":"With Citations Pct"}},"type":"object","required":["week_start","total_risks","with_citations","with_citations_pct"],"title":"WeeklyCitationPoint","description":"One week in the citation-coverage trend for the current scope."},"WeeklyFailurePoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"total":{"type":"integer","title":"Total"},"failed":{"type":"integer","title":"Failed"},"failure_pct":{"type":"number","title":"Failure Pct"}},"type":"object","required":["week_start","total","failed","failure_pct"],"title":"WeeklyFailurePoint","description":"One week in the failure trend for the current scope."},"WeeklyFeedbackSignalPoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"ai_risks":{"type":"integer","title":"Ai Risks"},"actioned":{"type":"integer","title":"Actioned"},"validated":{"type":"integer","title":"Validated"},"validated_pct":{"type":"number","title":"Validated Pct"},"flagged":{"type":"integer","title":"Flagged"},"outdated":{"type":"integer","title":"Outdated"},"allowed":{"type":"integer","title":"Allowed"},"dismissed":{"type":"integer","title":"Dismissed"},"dismissed_over_flagged":{"type":"integer","title":"Dismissed Over Flagged"},"dismissed_accepted":{"type":"integer","title":"Dismissed Accepted"},"dismissed_other":{"type":"integer","title":"Dismissed Other"},"over_flag_rate_pct":{"type":"number","title":"Over Flag Rate Pct"},"outdated_share_pct":{"type":"number","title":"Outdated Share Pct"},"all_risks":{"type":"integer","title":"All Risks"},"uncaptured":{"type":"integer","title":"Uncaptured"},"coverage_gap_pct":{"type":"number","title":"Coverage Gap Pct"}},"type":"object","required":["week_start","ai_risks","actioned","validated","validated_pct","flagged","outdated","allowed","dismissed","dismissed_over_flagged","dismissed_accepted","dismissed_other","over_flag_rate_pct","outdated_share_pct","all_risks","uncaptured","coverage_gap_pct"],"title":"WeeklyFeedbackSignalPoint","description":"One week in the feedback signal & coverage trend for the current scope.\n\nRisks are bucketed by their run's ISO week (same as the failure, citation,\nand risk-action series). `dismissed_over_flagged` / `dismissed_accepted` /\n`dismissed_other` split `dismissed` into its buckets (they sum to it);\n`over_flag_rate_pct = dismissed_over_flagged / actioned`."},"WeeklyOcrConfidencePoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"files":{"type":"integer","title":"Files"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"min_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Confidence"},"low_confidence_files":{"type":"integer","title":"Low Confidence Files"}},"type":"object","required":["week_start","files","avg_confidence","min_confidence","low_confidence_files"],"title":"WeeklyOcrConfidencePoint","description":"One week in the OCR-confidence trend for the current scope.\n\n`avg_confidence` is the mean per-file confidence that week; `min_confidence`\nis the lowest per-file average that week (the worst document)."},"WeeklyRiskActionPoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"total_risks":{"type":"integer","title":"Total Risks"},"actioned":{"type":"integer","title":"Actioned"},"actioned_pct":{"type":"number","title":"Actioned Pct"},"flagged":{"type":"integer","title":"Flagged"},"flag_rate_pct":{"type":"number","title":"Flag Rate Pct"}},"type":"object","required":["week_start","total_risks","actioned","actioned_pct","flagged","flag_rate_pct"],"title":"WeeklyRiskActionPoint","description":"One week in the risk-action funnel for the current scope.\n\nRisks are bucketed by their run's ISO week (same as the failure and\ncitation series)."},"WeeklyRunLatencyPoint":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"runs":{"type":"integer","title":"Runs"},"queue_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue P50 Seconds"},"queue_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue P95 Seconds"},"queue_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Queue Max Seconds"},"analysis_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis P50 Seconds"},"analysis_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis P95 Seconds"},"analysis_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Analysis Max Seconds"},"end_to_end_p50_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End P50 Seconds"},"end_to_end_p95_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End P95 Seconds"},"end_to_end_max_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End To End Max Seconds"},"queued_over_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queued Over Threshold"}},"type":"object","required":["week_start","runs","queue_p50_seconds","queue_p95_seconds","queue_max_seconds","analysis_p50_seconds","analysis_p95_seconds","analysis_max_seconds","end_to_end_p50_seconds","end_to_end_p95_seconds","end_to_end_max_seconds","queued_over_threshold"],"title":"WeeklyRunLatencyPoint","description":"One ISO week's run-latency stats + the count they were measured over.\n\nSame semantics as `RunLatencyTotals`. `runs` is 0 and every latency field is\nnull for a week where no run carries the analysis timestamps -- which is the\nwhole history before those columns started being stamped. Clients must\nrender that as a gap, not as zero latency.\n\n`queue_max_seconds` is the load-bearing field for spotting a stall week:\nweekly P95 can hold steady across a week containing a multi-hour queue stall,\nbecause a few extreme runs among a hundred normal ones never reach the 95th\npercentile, while the max jumps by orders of magnitude and drops back the\nfollowing week.\n\n`queued_over_threshold` is null for an unmeasured week, like every other field\nhere. Do not plot it as 0: nine unmeasured weeks followed by three measured\nones would otherwise draw a flat \"no breaches\" baseline and then a rise, which\nreads as a regression rather than as the start of measurement."},"WhatsNewLastViewedResponse":{"properties":{"whats_new_last_viewed_at":{"type":"string","format":"date-time","title":"Whats New Last Viewed At"}},"type":"object","required":["whats_new_last_viewed_at"],"title":"WhatsNewLastViewedResponse","description":"The user's updated Help Center 'What's New' last-viewed time."},"YouCompleteIraActor":{"properties":{"kind":{"type":"string","const":"you_complete_ira","title":"Kind","default":"you_complete_ira"},"form_url":{"type":"string","title":"Form Url"},"outstanding_since":{"type":"string","format":"date-time","title":"Outstanding Since"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"overdue":{"type":"boolean","title":"Overdue"}},"type":"object","required":["form_url","outstanding_since","overdue"],"title":"YouCompleteIraActor","description":"The IRA form is assigned to the current user — they can open and complete it."},"backend__api__internal__teams__TeamMembersRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids","default":[]}},"type":"object","title":"TeamMembersRequest","description":"Replace the full membership of a team with this set of users."},"backend__models__pydantic__api__requests__teams__TeamMembersRequest":{"properties":{"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"}},"type":"object","title":"TeamMembersRequest","description":"Replace the full membership of a team with this set of users."},"backend__models__pydantic__api__responses__document_requests__DocumentRequestResponse":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"document_type":{"type":"string","title":"Document Type"},"due_date":{"type":"string","format":"date-time","title":"Due Date"},"status":{"$ref":"#/components/schemas/DocumentRequestStatus"},"created":{"type":"string","format":"date-time","title":"Created"},"uploaded_files":{"items":{"$ref":"#/components/schemas/UploadedFileID"},"type":"array","title":"Uploaded Files","default":[]},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"requesting_company_id":{"type":"string","format":"uuid","title":"Requesting Company Id"},"requestee_company_id":{"type":"string","format":"uuid","title":"Requestee Company Id"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"last_reminder_sent":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reminder Sent"},"recipients":{"items":{"$ref":"#/components/schemas/DocumentRequestRecipientSummary"},"type":"array","title":"Recipients","default":[]}},"type":"object","required":["request_id","document_type","due_date","status","created","requesting_company_id","requestee_company_id"],"title":"DocumentRequestResponse"},"backend__models__pydantic__api__responses__evidence_packets__DocumentRequestResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"},"index":{"type":"integer","title":"Index"}},"type":"object","required":["id","slug","label","required","decline_reason","index"],"title":"DocumentRequestResponse","description":"Response model for a single document request row in an evidence packet."},"backend__models__pydantic__drafting__Citation":{"properties":{"type":{"type":"string","title":"Type"},"cited_text":{"type":"string","title":"Cited Text"},"document_index":{"type":"integer","title":"Document Index"},"document_title":{"type":"string","title":"Document Title"},"end_page_number":{"type":"integer","title":"End Page Number"},"start_page_number":{"type":"integer","title":"Start Page Number"}},"type":"object","required":["type","cited_text","document_index","document_title","end_page_number","start_page_number"],"title":"Citation"},"backend__models__pydantic__field_groups__Citation":{"properties":{"page":{"type":"integer","title":"Page"},"content":{"type":"string","title":"Content"}},"type":"object","required":["page","content"],"title":"Citation","description":"These citations should be verbatim quotes from the document that can be found by direct text search on the given page number.\nThe"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Figma-Token"}}}}