{"openapi":"3.1.0","info":{"title":"RegRadar API","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Health","description":"Liveness probe.","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/auth/sign-in":{"post":{"tags":["auth"],"summary":"Sign In","description":"Password sign-in — the real token source. Sets the renewal cookie.","operationId":"sign_in_api_v1_auth_sign_in_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/renew":{"post":{"tags":["auth"],"summary":"Renew","description":"Silent renewal with strict rotation — reads + rotates the `rr_renewal` cookie.","operationId":"renew_api_v1_auth_renew_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}}}}},"/api/v1/auth/sign-out":{"post":{"tags":["auth"],"summary":"Sign Out","description":"Terminal sign-out of this browser — deletes its renewal row and clears the cookie.","operationId":"sign_out_api_v1_auth_sign_out_post","responses":{"204":{"description":"Successful Response"}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"Server-truth identity — resolved from the row, not the token.","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/v1/auth/password-policy":{"get":{"tags":["auth"],"summary":"Get Password Policy","description":"The password policy the SPA renders rule-by-rule. No session needed.","operationId":"get_password_policy_api_v1_auth_password_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordPolicyResponse"}}}}}}},"/api/v1/auth/invitations/{token}":{"get":{"tags":["auth"],"summary":"View Invitation","description":"What the acceptance screen renders. Terminal states -> 410 with a next step.","operationId":"view_invitation_api_v1_auth_invitations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationViewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invitations/{token}/accept":{"post":{"tags":["auth"],"summary":"Accept Invitation","description":"Complete the account and land signed in, in the inviting org.","operationId":"accept_invitation_api_v1_auth_invitations__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-reset/request":{"post":{"tags":["auth"],"summary":"Request Password Reset","description":"Request a reset link — identical 200 regardless of whether the account exists.","operationId":"request_password_reset_api_v1_auth_password_reset_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequestAcknowledged"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-reset/confirm":{"post":{"tags":["auth"],"summary":"Confirm Password Reset","description":"Set a new password, revoke all sessions, auto sign-in.","operationId":"confirm_password_reset_api_v1_auth_password_reset_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-change":{"post":{"tags":["auth"],"summary":"Change Password","description":"Change the signed-in user's password (current required; this session continues, others end).","operationId":"change_password_api_v1_auth_password_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/magic-link/request":{"post":{"tags":["auth"],"summary":"Request Magic Link","description":"Request a sign-in link — identical 200 regardless of whether the account exists.","operationId":"request_magic_link_api_v1_auth_magic_link_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequestAcknowledged"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/magic-link/exchange":{"post":{"tags":["auth"],"summary":"Exchange Magic Link","description":"Exchange a valid link for a full session, identical to password sign-in.","operationId":"exchange_magic_link_api_v1_auth_magic_link_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invitations":{"get":{"tags":["auth"],"summary":"List Invitations","description":"List the caller organisation's invitations, expiry evaluated lazily at read.","operationId":"list_invitations_api_v1_auth_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminInvitationResponse"},"type":"array","title":"Response List Invitations Api V1 Auth Invitations Get"}}}}}},"post":{"tags":["auth"],"summary":"Create Invitation","description":"Create (or re-issue a pending duplicate as) an invitation; the link is always returned.","operationId":"create_invitation_api_v1_auth_invitations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invitations/{invitation_id}/resend":{"post":{"tags":["auth"],"summary":"Resend Invitation","description":"Rotate the secret + expiry; the previous link dies instantly. Cross-org id -> 404.","operationId":"resend_invitation_api_v1_auth_invitations__invitation_id__resend_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/invitations/{invitation_id}/revoke":{"post":{"tags":["auth"],"summary":"Revoke Invitation","description":"Terminally revoke a pending invitation. Cross-org id -> 404.","operationId":"revoke_invitation_api_v1_auth_invitations__invitation_id__revoke_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/items":{"get":{"tags":["demo"],"summary":"List Items","description":"List the caller's organisation's items.","operationId":"list_items_api_v1_demo_items_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DemoItemResponse"},"type":"array","title":"Response List Items Api V1 Demo Items Get"}}}}}},"post":{"tags":["demo"],"summary":"Create Item","description":"Create an item.","operationId":"create_item_api_v1_demo_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoItemCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/items/{item_id}":{"get":{"tags":["demo"],"summary":"Get Item","description":"Fetch one item; cross-tenant id -> 404.","operationId":"get_item_api_v1_demo_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["demo"],"summary":"Delete Item","description":"Delete one item (hq_admin only).","operationId":"delete_item_api_v1_demo_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"}}}}}}},"/api/v1/demo/runs":{"post":{"tags":["demo"],"summary":"Start Run","description":"Start a batch enrichment. Inline -> 200 (completed in-request); queued -> 202 (pending).","operationId":"start_run_api_v1_demo_runs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoRunResponse"}}}}}}},"/api/v1/demo/runs/{run_id}":{"get":{"tags":["demo"],"summary":"Get Run","description":"Durable run state — the polling / self-heal read.","operationId":"get_run_api_v1_demo_runs__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/DemoRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/runs/{run_id}/events":{"get":{"tags":["demo"],"summary":"Run Events","description":"SSE live progress. Auth via `?token=` (EventSource) or bearer header; run resolved under RLS first.","operationId":"run_events_api_v1_demo_runs__run_id__events_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/dlq/stats":{"get":{"tags":["admin"],"summary":"Get Dlq Stats","description":"Dead-letter statistics (count, oldest, per-task breakdown).","operationId":"get_dlq_stats_api_v1_admin_dlq_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DlqStatsResponse"}}}}}}},"/api/v1/admin/dlq/redrive":{"post":{"tags":["admin"],"summary":"Post Dlq Redrive","description":"Chain-aware re-drive; returns a redrive_id for log correlation.","operationId":"post_dlq_redrive_api_v1_admin_dlq_redrive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DlqRedriveResponse"}}}}}}},"/api/v1/admin/organisations":{"get":{"tags":["admin-console"],"summary":"List Organisations","description":"Bounded operator list of every organisation (identity + lifecycle + first-admin status).","operationId":"list_organisations_api_v1_admin_organisations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganisationSummaryResponse"},"type":"array","title":"Response List Organisations Api V1 Admin Organisations Get"}}}}}},"post":{"tags":["admin"],"summary":"Provision Organisation","description":"Provision an organisation + its first hq_admin invitation in one transaction.","operationId":"provision_organisation_api_v1_admin_organisations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationProvisioned"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/operator-transfer":{"post":{"tags":["admin"],"summary":"Transfer Operator","description":"Move the platform-operator role to one account and take it from every other.","operationId":"transfer_operator_api_v1_admin_operator_transfer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorTransferRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/operators":{"get":{"tags":["admin"],"summary":"List Operators","description":"Every account holding the platform-operator role.","operationId":"list_operators_api_v1_admin_operators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorListResponse"}}}}}},"post":{"tags":["admin"],"summary":"Grant Operator","description":"Make a member of the operators' own organisation an operator, leaving every other operator as they are.","operationId":"grant_operator_api_v1_admin_operators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorGrantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/operators/{user_id}":{"delete":{"tags":["admin"],"summary":"Revoke Operator","description":"Take the operator role from one account; the last operator keeps it.\n\nNot instant: the role travels as a claim in the access token, re-read from the account only when the\ntoken is renewed, so a revoked operator keeps operator access until their current access token expires\n(`ACCESS_TOKEN_LIFETIME_MINUTES`, 30 by default).","operationId":"revoke_operator_api_v1_admin_operators__user_id__delete","parameters":[{"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"}}}}}}},"/api/v1/admin/organisations/{organisation_id}":{"get":{"tags":["admin-console"],"summary":"Get Organisation","description":"Bounded operator detail: administrators + bootstrap invitation only. Unknown id → 404.","operationId":"get_organisation_api_v1_admin_organisations__organisation_id__get","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/organisations/{organisation_id}/suspend":{"post":{"tags":["admin-console"],"summary":"Suspend Organisation","description":"Suspend the organisation (fail-closed everywhere). Operator-held org → 409.","operationId":"suspend_organisation_api_v1_admin_organisations__organisation_id__suspend_post","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/organisations/{organisation_id}/resume":{"post":{"tags":["admin-console"],"summary":"Resume Organisation","description":"Resume a suspended organisation — access restored.","operationId":"resume_organisation_api_v1_admin_organisations__organisation_id__resume_post","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/organisations/{organisation_id}/invitations/{invitation_id}/resend":{"post":{"tags":["admin-console"],"summary":"Resend First Admin Invitation","description":"Re-send the bootstrap first-admin invitation (fresh link; old dies). Non-bootstrap id → 404.","operationId":"resend_first_admin_invitation_api_v1_admin_organisations__organisation_id__invitations__invitation_id__resend_post","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/organisations/{organisation_id}/assessed-regulators":{"get":{"tags":["admin-console"],"summary":"Get Assessed Regulators","description":"Which regulators the organisation's assessments cover (empty = all), with the registry to choose from.","operationId":"get_assessed_regulators_api_v1_admin_organisations__organisation_id__assessed_regulators_get","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessedRegulatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-console"],"summary":"Replace Assessed Regulators","description":"Replace the list whole; a slug the registry does not hold -> 422 naming it. Unknown organisation -> 404.","operationId":"replace_assessed_regulators_api_v1_admin_organisations__organisation_id__assessed_regulators_put","parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Organisation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessedRegulatorsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessedRegulatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities/{entity_id}/profile":{"put":{"tags":["team"],"summary":"Save Entity Profile","description":"Replace one office's profile; head-office administrators only, cross-organisation id -> 404.","operationId":"save_entity_profile_api_v1_team_entities__entity_id__profile_put","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["team"],"summary":"Read Entity Profile","description":"One office's profile; absence is a state, not an error, and reading it writes nothing.","operationId":"read_entity_profile_api_v1_team_entities__entity_id__profile_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/members":{"get":{"tags":["team"],"summary":"List Members","description":"The caller organisation's roster (removed members excluded).","operationId":"list_members_api_v1_team_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterResponse"}}}}}}},"/api/v1/team/members/{user_id}":{"patch":{"tags":["team"],"summary":"Change Member","description":"Change a member's role and/or affiliate; cross-org/removed id -> 404.","operationId":"change_member_api_v1_team_members__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/MemberUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/members/{user_id}/block":{"post":{"tags":["team"],"summary":"Block Member","description":"Block a member and revoke their sessions immediately.","operationId":"block_member_api_v1_team_members__user_id__block_post","parameters":[{"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"}}}}}}},"/api/v1/team/members/{user_id}/unblock":{"post":{"tags":["team"],"summary":"Unblock Member","description":"Restore a blocked member's access.","operationId":"unblock_member_api_v1_team_members__user_id__unblock_post","parameters":[{"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"}}}}}}},"/api/v1/team/members/{user_id}/remove":{"post":{"tags":["team"],"summary":"Remove Member","description":"Remove a member from the organisation (rows kept, sessions revoked).","operationId":"remove_member_api_v1_team_members__user_id__remove_post","parameters":[{"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"}}}}}}},"/api/v1/team/affiliates":{"post":{"tags":["team"],"summary":"Create Affiliate","description":"Create an affiliate (unique name in the organisation).","operationId":"create_affiliate_api_v1_team_affiliates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/affiliates/{affiliate_id}":{"patch":{"tags":["team"],"summary":"Edit Affiliate","description":"Edit an affiliate; cross-org id -> 404, name collision -> 409.","operationId":"edit_affiliate_api_v1_team_affiliates__affiliate_id__patch","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["team"],"summary":"Delete Affiliate","description":"Delete an affiliate; 409 for the head office, or while non-removed members are attached.","operationId":"delete_affiliate_api_v1_team_affiliates__affiliate_id__delete","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities":{"get":{"tags":["team"],"summary":"List Entities","description":"The collective roster: the head office and every affiliate, with each one's profile state.","operationId":"list_entities_api_v1_team_entities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityListResponse"}}}}}}},"/api/v1/team/entities/{entity_id}/library-assessment":{"get":{"tags":["team"],"summary":"Estimate Library Assessment","description":"How many publications the pass would walk and what a call costs here; writes nothing, spends nothing.","operationId":"estimate_library_assessment_api_v1_team_entities__entity_id__library_assessment_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LibraryAssessmentMode","default":"missing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAssessmentEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities/{entity_id}/library-assessment-runs":{"post":{"tags":["team"],"summary":"Start Library Assessment","description":"Start the pass. Unavailable -> 503; no profile or one already running -> 409; queued -> 202, inline -> 200.","operationId":"start_library_assessment_api_v1_team_entities__entity_id__library_assessment_runs_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAssessmentRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAssessmentRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities/{entity_id}/library-assessment-runs/current":{"get":{"tags":["team"],"summary":"Get Current Library Assessment","description":"The in-flight run, if any — how a reloaded page rediscovers the run id it lost. 204 when idle.","operationId":"get_current_library_assessment_api_v1_team_entities__entity_id__library_assessment_runs_current_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAssessmentRunResponse"}}}},"204":{"description":"No run in flight"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities/{entity_id}/library-assessment-runs/{run_id}":{"get":{"tags":["team"],"summary":"Get Library Assessment Run","description":"Durable run state — the reconnect / self-heal read. Cross-org id, or another entity's run -> 404.","operationId":"get_library_assessment_run_api_v1_team_entities__entity_id__library_assessment_runs__run_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"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/LibraryAssessmentRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/team/entities/{entity_id}/library-assessment-runs/{run_id}/events":{"get":{"tags":["team"],"summary":"Library Assessment Events","description":"SSE live progress. Auth via `?token=` (EventSource) or bearer; the run is resolved under RLS first.","operationId":"library_assessment_events_api_v1_team_entities__entity_id__library_assessment_runs__run_id__events_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/org-profile":{"get":{"tags":["org-profile"],"summary":"Get Profile","description":"Read the organisation's remit (defaults served when no row exists).","operationId":"get_profile_api_v1_org_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRemitResponse"}}}}}},"put":{"tags":["org-profile"],"summary":"Save Profile","description":"Save the organisation's remit (admin only).","operationId":"save_profile_api_v1_org_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRemitUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRemitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/org-profile/rescore-runs":{"post":{"tags":["org-profile"],"summary":"Trigger Rescore","description":"Trigger a re-score. Unavailable -> 503; queued -> 202 pending; inline -> 200 completed.","operationId":"trigger_rescore_api_v1_org_profile_rescore_runs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescoreRunResponse"}}}}}}},"/api/v1/org-profile/rescore-runs/current":{"get":{"tags":["org-profile"],"summary":"Get Current Rescore Run","description":"The in-flight run, if any — how a reloaded page rediscovers the run id it lost.\n\nRegistered before the by-id route so `current` is never parsed as a run id. 204 when nothing is\nmoving — an idle organisation is a normal answer, not an error. RLS keeps the read tenant-scoped.","operationId":"get_current_rescore_run_api_v1_org_profile_rescore_runs_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescoreRunResponse"}}}},"204":{"description":"No run in flight"}}}},"/api/v1/org-profile/rescore-runs/{run_id}":{"get":{"tags":["org-profile"],"summary":"Get Rescore Run","description":"Durable run state — the reconnect / self-heal read. Cross-org id -> 404.","operationId":"get_rescore_run_api_v1_org_profile_rescore_runs__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/RescoreRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/org-profile/rescore-runs/{run_id}/events":{"get":{"tags":["org-profile"],"summary":"Rescore Run Events","description":"SSE live progress. Auth via `?token=` (EventSource) or bearer; run resolved under RLS first.","operationId":"rescore_run_events_api_v1_org_profile_rescore_runs__run_id__events_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/stats":{"get":{"tags":["dashboard"],"summary":"Read Dashboard Stats","description":"The visibility median, the scoped active-source count, the pool behind the first, and what was cleared.\n\nAlways 200, never 204: an organisation with nothing in scope has a defined payload — a null median\nbeside a zero qualifying count — and that is a fact about its corpus rather than an absence of one.\nA read that cannot complete raises, so a reader is never shown zeros that mean \"we could not tell\".\n\n`cleared_count` is how much of this reader's intake did not reach this screen. It is counted by the\nlibrary's own traversal, so the number and the screen its link opens describe one population.","operationId":"read_dashboard_stats_api_v1_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStatsResponse"}}}}}}},"/api/v1/dashboard/attention":{"get":{"tags":["dashboard"],"summary":"Read Attention Queue","description":"The work queue: up to five unworked publications, most relevant first.\n\nIts own endpoint rather than a field on the stats aggregate, because the landing screen's regions\nresolve independently — a slow corpus read here must not hold the two figures beside it, and each\nregion owns its own pending state.\n\nNo model call happens on this path. Everything rendered was written at enrichment time.","operationId":"read_attention_queue_api_v1_dashboard_attention_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttentionQueueResponse"}}}}}}},"/api/v1/publications":{"get":{"tags":["publications"],"summary":"List Publications","description":"One page of one intake population, newest-published-first unless sorted otherwise, with the figures.\n\nThe default is the whole intake — everything the monitored sources published, including what the\ngroup's remit never admitted, which was absent from this surface altogether before.\n\n`cleared_for_office` excludes `outside_remit` and the name says why: both are cleared rows in the\nreason vocabulary, but the remit is one decision for the whole organisation while the other three\nreasons are about one office. An unknown value is a 422 from the enum rather than a silent default.\n\n`unread`, `bookmarked`, `relevant` and `critical` are a SECOND axis, orthogonal to the population and\ncombinable with it and with each other, so \"unread among the cleared\" is a question this endpoint can\nanswer. They narrow the rows; they never move `counts.screened` or `counts.needs_us`, which are counted\nover the whole intake.\n\n`stage` is how far the organisation has got with a publication, and `sort` is the order the page is\nread in. Both were applied in the browser until now, over whichever twenty-five rows a page held —\nwhich is a filter reporting a twentieth of the answer as the answer, and, for the sort, a \"most\nrelevant\" row that read 0.30 while the Dashboard ranked the same corpus and read 0.80. An absent\n`stage` is the whole intake rather than a fourth state, so a state added later cannot silently start\ndropping rows from the unfiltered list.\n\nThe search box and the five facet chips are the reader's own narrowing, and they are answered here\nrather than in the browser because the browser now holds one page. They move `total` — how many rows\nthis question has — and deliberately do not move the figures above the list, which answer how much\nwork there is rather than how much of it matches what somebody typed.\n\n`office_ids` and `department_ids` are the head office's two entity facets: keep what at least one chosen\nentity scored relevant, and order `sort=relevant` by the highest score among the chosen (the row's\n`group_peak` names that entity). Any other reader gets 403, and an id that is not an entity of that\nkind is a 404. They narrow the rows and never move the figures, like `relevant` and `critical`.\n\nEach facet is a list because a reader may press several values of one chip, and several values of one\nchip mean \"any of these\" while two different chips mean \"both\". An empty list is nobody having\npressed that chip, never an instruction to match nothing.\n\nThe chips' own vocabularies travel back on the response — four of them on `by_source`, which already\nnames every authority in the population, and the severities on their own field. Deriving them from\nthe rows instead is what a browser holding the whole answer could afford and a page cannot.\n\n`status` is the Workflows v3 status row for the reader's own office: `to_decide`, `for_information`,\n`in_action`, `not_relevant`, `archived`, or `all` (the default, no narrowing, archived included). A\npublication sits on exactly one tab, placed by `domain/decision_rules.py`; Archived is what was decided\nNot relevant or For information, or closed, thirty days ago or more, and a Closed publication inside its\nmonth stays on In action. `status_counts` carries every tab's count under the rest of the question.\n\n`page` and `size` come from the pagination parameters; `size` is bounded, because an unbounded one is\na request to render the whole corpus and that is the cost this endpoint exists to avoid.","operationId":"list_publications_api_v1_publications_get","parameters":[{"name":"population","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LibraryPopulation","default":"everything"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread"}},{"name":"bookmarked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Bookmarked"}},{"name":"relevant","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Relevant"}},{"name":"critical","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Critical"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ScreeningState"},{"type":"null"}],"title":"Stage"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatusRowFilter","default":"all"}},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LibrarySort","default":"published"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"full_text","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Text"}},{"name":"regulator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Regulator Ids"}},{"name":"office_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Office Ids"}},{"name":"department_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Department Ids"}},{"name":"sectors","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sectors"}},{"name":"jurisdictions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Jurisdictions"}},{"name":"severities","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Severities"}},{"name":"source_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Source Types"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PublicationRowResponse_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/ids":{"get":{"tags":["publications"],"summary":"List Publication Ids","description":"Every publication the same question as `GET /publications` answers, in its order — no page, no figures.\n\n\"Select all N in this view\" on the Updates list (Workflows v3, spec §4): every bulk act is handed these\nidentifiers rather than the question, for the reason the export is (see `PublicationIdsResponse`). More\nthan the selection cap (500) is a 422, never a trim.\n\nRegistered before the `/{publication_id}` routes so the literal path is not read as an identifier.","operationId":"list_publication_ids_api_v1_publications_ids_get","parameters":[{"name":"population","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LibraryPopulation","default":"everything"}},{"name":"unread","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread"}},{"name":"bookmarked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Bookmarked"}},{"name":"relevant","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Relevant"}},{"name":"critical","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Critical"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ScreeningState"},{"type":"null"}],"title":"Stage"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/StatusRowFilter","default":"all"}},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LibrarySort","default":"published"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"full_text","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Text"}},{"name":"regulator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Regulator Ids"}},{"name":"office_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Office Ids"}},{"name":"department_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Department Ids"}},{"name":"sectors","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sectors"}},{"name":"jurisdictions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Jurisdictions"}},{"name":"severities","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Severities"}},{"name":"source_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Source Types"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/export":{"post":{"tags":["publications"],"summary":"Export Publications","description":"The publications the caller is looking at, as a spreadsheet, in the order they appear.\n\nTakes the selection rather than a filter, because the library filters in the browser over one capped\nresponse: there is no server-side filter for this to borrow, and re-implementing the facets here\nwould be a second definition of \"what you see\" over a different population. That mismatch is what\nthe removed note used to apologise for.\n\nIds the caller cannot see contribute no rows and raise nothing — naming them would confirm they\nexist somewhere else. Sign-in is the only gate; all four member roles may export. The filename's\ndate comes from the SERVER clock, so two members in different time zones download the same name, and\n`no-store` keeps a signed-in member's corpus out of any shared cache.\n\nRegistered before the `/{publication_id}` route so the literal path is not read as an identifier.","operationId":"export_publications_api_v1_publications_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationsExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/views":{"post":{"tags":["publications"],"summary":"Mark Publications Viewed","description":"Mark everything the screen is rendering as read, for the acting reader only.\n\nDeclared before the `/{publication_id}` routes on purpose: `views` would otherwise be matched as a\npublication identifier and answer 422 instead of doing the work.\n\nHanded its selection like the export, because the rendered list has been narrowed by controls this\nendpoint knows nothing about. Over the cap is a refusal, never a trim — a trim leaves rows the reader\nwatched turn grey still unread and says nothing about which — and it is the export's own 422 rather\nthan a status of this endpoint's choosing, because the two are the same act over the same bound.","operationId":"mark_publications_viewed_api_v1_publications_views_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkViewedRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/{publication_id}":{"get":{"tags":["publications"],"summary":"Get Publication","description":"The reading view for one in-scope publication. Unknown or out-of-scope id → identical 404.","operationId":"get_publication_api_v1_publications__publication_id__get","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/{publication_id}/documents/{document_id}/text":{"get":{"tags":["publications"],"summary":"Get Attached Document Text","description":"One attached document's own words, read from the authority's file. Not a summary: no model wrote it.\n\nUnknown or out-of-scope publication, a document of another publication, or a document whose file has\nnot been read into text → the same 404.","operationId":"get_attached_document_text_api_v1_publications__publication_id__documents__document_id__text_get","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachedDocumentTextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/{publication_id}/entities":{"get":{"tags":["publications"],"summary":"List Publication Entity Assessments","description":"Every office of the group beside this publication, the reader's own office first.\n\nTakes no scope and no office: a reader reaches this from a publication they can already see, and what\ncomes back is their own organisation's offices. Unknown or out-of-scope id → identical 404, the same\nanswer the detail read gives, so this cannot be used to discover that a publication exists.","operationId":"list_publication_entity_assessments_api_v1_publications__publication_id__entities_get","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationEntityAssessmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/{publication_id}/office-assessment":{"post":{"tags":["publications"],"summary":"Assess Publication For Offices","description":"Assess this publication for the offices \"Who this applies to\" shows as not assessed yet. HQ admin only.\n\nOnce per publication per organisation per day. Unknown or out-of-scope id → 404; the source's history,\noutside the remit, nothing waiting or today's press already made → 409; no pipeline → 503. Queued → 202,\ninline → 200 with the run already settled.","operationId":"assess_publication_for_offices_api_v1_publications__publication_id__office_assessment_post","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeAssessmentRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/publications/{publication_id}/view":{"post":{"tags":["publications"],"summary":"Mark Publication Viewed","description":"Idempotently record that the caller opened the publication (fire-and-forget). Unknown/out-of-scope → 404.","operationId":"mark_publication_viewed_api_v1_publications__publication_id__view_post","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports":{"get":{"tags":["assessment-reports"],"summary":"List Assessment Reports","description":"Everything the platform holds, narrowed by whatever the reader pressed.\n\nEach facet is a list because a reader may press several values of one chip: several values of one\nchip mean *any of these*, and two different chips mean *both*. An empty list is nobody having\npressed that chip, never an instruction to match nothing.\n\nThere is no default date window. A reader who has applied no dates is asking for everything held,\nand quietly answering for the last month instead would hide an authority's older output behind a\nfilter nobody set.","operationId":"list_assessment_reports_api_v1_assessment_reports_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ReportSort","default":"recency"}},{"name":"tab","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ReportTab","default":"all"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Authority"}},{"name":"report_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Report Type"}},{"name":"procedure_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Procedure Type"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Language"}},{"name":"published_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Published From"}},{"name":"published_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Published To"}},{"name":"set_changed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Set Changed"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AssessmentReportRow_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports/{report_id}":{"get":{"tags":["assessment-reports"],"summary":"Get Assessment Report","description":"One report: every fact the authority printed, its documents, and its summary or the absence of one.\n\nAn unknown id and one the reader may not see answer identically with a 404. A 403 would confirm the\nrow exists, which is the one thing the two answers must not let anybody tell apart.","operationId":"get_assessment_report_api_v1_assessment_reports__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/AssessmentReportDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports/{report_id}/documents/{document_id}/text":{"get":{"tags":["assessment-reports"],"summary":"Get Assessment Report Document Text","description":"One of the report's documents in its own words, read from the authority's file; no model wrote it.\n\nAn unknown or unseen report, a document of another report, or one not read into text → the same 404.","operationId":"get_assessment_report_document_text_api_v1_assessment_reports__report_id__documents__document_id__text_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachedDocumentTextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports/{report_id}/view":{"post":{"tags":["assessment-reports"],"summary":"Mark Assessment Report Viewed","description":"Mark one report read for this reader.\n\nIdempotent on `(user, report)`, so a second call moves no count. An unknown report id answers 404\nBEFORE any write, so a reader cannot leave a mark on something they could not open.","operationId":"mark_assessment_report_viewed_api_v1_assessment_reports__report_id__view_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports/{report_id}/notes":{"get":{"tags":["assessment-reports"],"summary":"List Assessment Report Notes","description":"Every colleague's note on this report, oldest first.\n\nVisible to the whole organisation and to no other: row-level security scopes the read, so another\norganisation's notes are simply absent. An unknown report answers 404.","operationId":"list_assessment_report_notes_api_v1_assessment_reports__report_id__notes_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":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentReportNote"},"title":"Response List Assessment Report Notes Api V1 Assessment Reports  Report Id  Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["assessment-reports"],"summary":"Add Assessment Report Note","description":"Put a note on this report as the signed-in reader. A blank or oversized body is a 422.","operationId":"add_assessment_report_note_api_v1_assessment_reports__report_id__notes_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentReportNoteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentReportNote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-reports/{report_id}/notes/{note_id}":{"patch":{"tags":["assessment-reports"],"summary":"Edit Assessment Report Note","description":"Rewrite a note. Only its author may; a colleague's note answers 403, one that is not visible 404.","operationId":"edit_assessment_report_note_api_v1_assessment_reports__report_id__notes__note_id__patch","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentReportNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentReportNote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assessment-reports"],"summary":"Delete Assessment Report Note","description":"Delete a note. Only its author may; the audit entry keeps what it said.","operationId":"delete_assessment_report_note_api_v1_assessment_reports__report_id__notes__note_id__delete","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search":{"get":{"tags":["search"],"summary":"Search","description":"Every section one query answers. `authority` narrows retrieval; `sector` filters after the merge.\n\n`surfaces` names which sections to read; omitted, it reads them all. It is a real parameter rather\nthan an always-everything response because the corpus section is the only one that costs an\nembedding: the publications library holds its own population already and asks for the other four,\nso the search box on that screen reaches the whole platform without paying for a model call.\n\nAn unknown surface name is a 422 from the enum rather than a silently dropped section — a caller\nthat misspells one must not be told the platform simply has nothing there.","operationId":"search_api_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"surfaces","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SearchSurface"}},{"type":"null"}],"title":"Surfaces"}},{"name":"authority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"}},{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask":{"post":{"tags":["ask"],"summary":"Ask","description":"Stream the grounded answer as SSE frames (prose deltas -> final, or a terminal error).","operationId":"ask_api_v1_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskStreamFrame"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask/conversations":{"get":{"tags":["ask"],"summary":"List Ask Conversations","description":"The reader's own conversations, newest first, capped.","operationId":"list_ask_conversations_api_v1_ask_conversations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskConversationListResponse"}}}}}}},"/api/v1/ask/conversations/{conversation_id}":{"get":{"tags":["ask"],"summary":"Read Ask Conversation","description":"One conversation in full, as it was read. Not owned or not found: 404, indistinguishably.","operationId":"read_ask_conversation_api_v1_ask_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ask"],"summary":"Rename Ask Conversation","description":"Rename an owned conversation. Blank or whitespace-only is refused before it reaches storage.","operationId":"rename_ask_conversation_api_v1_ask_conversations__conversation_id__patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskConversationRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskConversationSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ask"],"summary":"Delete Ask Conversation","description":"Delete an owned conversation and every exchange in it. Permanent; there is no undo.","operationId":"delete_ask_conversation_api_v1_ask_conversations__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask/compare":{"post":{"tags":["ask"],"summary":"Compare Versions","description":"Compare two versions of a document in a worker, and stream its stages and its end as SSE frames.","operationId":"compare_versions_api_v1_ask_compare_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compare_versions_api_v1_ask_compare_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskComparisonStreamFrame"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask/comparison-runs/active":{"get":{"tags":["ask"],"summary":"List Active Comparison Runs","description":"The reader's comparisons and document openings that have not ended, so a reloaded page can pick them up.","operationId":"list_active_comparison_runs_api_v1_ask_comparison_runs_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskComparisonRunListResponse"}}}}}}},"/api/v1/ask/documents":{"post":{"tags":["ask"],"summary":"Open Document","description":"Open a publication's attached document in a worker, and stream its stages and its end as SSE frames.\n\nA hidden or unknown publication, or a document of another publication → the same 404. A file the platform\nalready knows it cannot read or download, or an archive it never opens → 422. A comparison or an opening\nalready in flight → 409.","operationId":"open_document_api_v1_ask_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskDocumentOpenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskComparisonStreamFrame"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources":{"get":{"tags":["sources"],"summary":"Get Catalog","description":"The catalog screen: headline tiles + per-source rows (honest empty state when none).","operationId":"get_catalog_api_v1_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCatalogResponse"}}}}}},"post":{"tags":["sources"],"summary":"Create Source","description":"Save a reviewed proposal; born `active` (activate now) or `configured`.\n\nDuplicate URL → 409; activating an entry point that does not respond → 422 naming what came back.","operationId":"create_source_api_v1_sources_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/regulators":{"get":{"tags":["sources"],"summary":"List Regulators","description":"The regulator registry for the attribution/matching UI, each row carrying what names it.","operationId":"list_regulators_api_v1_sources_regulators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegulatorResponse"},"type":"array","title":"Response List Regulators Api V1 Sources Regulators Get"}}}}}},"post":{"tags":["sources"],"summary":"Create Regulator","description":"Register a new authority. A slug already in the registry → 409; a bad language code → 422.","operationId":"create_regulator_api_v1_sources_regulators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatorCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/regulators/{regulator_id}":{"patch":{"tags":["sources"],"summary":"Update Regulator","description":"Correct a registration. The slug is not editable — it is the key stored references are held by.","operationId":"update_regulator_api_v1_sources_regulators__regulator_id__patch","parameters":[{"name":"regulator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Regulator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatorWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegulatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sources"],"summary":"Delete Regulator","description":"Remove a registry row nothing names. Named by a source or a publication → 409; unknown → 404.","operationId":"delete_regulator_api_v1_sources_regulators__regulator_id__delete","parameters":[{"name":"regulator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Regulator Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/analyze":{"post":{"tags":["sources"],"summary":"Analyze Source Url","description":"Analyze a candidate URL into a reviewable proposal (nothing saved).\n\nA browser render plus the feed probes is tens of seconds on a heavy regulator site, and a load\nbalancer cuts the connection before that returns — so the analysis gets a durable row and the answer\nis polled: inline → 200 settled; queue → 202 pending. Unparsable URL → 422 with no row.","operationId":"analyze_source_url_api_v1_sources_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/analyses/{analysis_id}":{"get":{"tags":["sources"],"summary":"Get Source Analysis","description":"The analysis a client is waiting on. Unknown id → 404.","operationId":"get_source_analysis_api_v1_sources_analyses__analysis_id__get","parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}":{"get":{"tags":["sources"],"summary":"Get Source","description":"Full source detail. Unknown id → 404.","operationId":"get_source_api_v1_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["sources"],"summary":"Update Source","description":"Edit the source's language override. Explicit null clears it; an unrecognised code → 422.","operationId":"update_source_api_v1_sources__source_id__patch","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sources"],"summary":"Delete Source","description":"Delete a source that never produced anything. Productive → 409 naming what it holds; unknown → 404.","operationId":"delete_source_api_v1_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/pause":{"post":{"tags":["sources"],"summary":"Pause Source","description":"Pause the source — excluded from every scheduled selection; configuration untouched.","operationId":"pause_source_api_v1_sources__source_id__pause_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/resume":{"post":{"tags":["sources"],"summary":"Resume Source","description":"Resume a paused source back to active. `broken` is no longer a status a source can be in.","operationId":"resume_source_api_v1_sources__source_id__resume_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/refresh":{"post":{"tags":["sources"],"summary":"Refresh Source","description":"Manual check: inline → 200 completed; queue → 202 pending. Paused → 409; no run row created.","operationId":"refresh_source_api_v1_sources__source_id__refresh_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/retranslate":{"post":{"tags":["sources"],"summary":"Retranslate Source","description":"Re-decide translation for the source's stored publications from stored text alone — no fetch, no\nre-extract. Inline → 200 completed; queue → 202 pending. Paused → 409; no run row created.","operationId":"retranslate_source_api_v1_sources__source_id__retranslate_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/runs":{"get":{"tags":["sources"],"summary":"Get Source Runs","description":"Run history newest-first, capped at the history depth. Unknown source → 404.","operationId":"get_source_runs_api_v1_sources__source_id__runs_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IngestionRunResponse"},"title":"Response Get Source Runs Api V1 Sources  Source Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/runs/{run_id}/cancel":{"post":{"tags":["sources"],"summary":"Cancel Source Run","description":"Ask a run in flight to stop between items. A run that already finished → 409, never a quiet 200.","operationId":"cancel_source_run_api_v1_sources__source_id__runs__run_id__cancel_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}},{"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/IngestionRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sources/{source_id}/publications":{"get":{"tags":["sources"],"summary":"Get Source Publications","description":"Operator \"recent ingestions\" peek: corpus fields only, no tenant scope. Unknown source → 404.","operationId":"get_source_publications_api_v1_sources__source_id__publications_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourcePublicationPeekResponse"},"title":"Response Get Source Publications Api V1 Sources  Source Id  Publications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/radar/themes":{"get":{"tags":["radar"],"summary":"List Themes","description":"The radar's one read: the visible catalog, its header counts, and the latest run's state.\n\nNarrowed server-side to the reader's own office's watch topics (`my_topics`) and a free `search`, both\nmatched against each theme's words and its publications, so the header counts can describe the filtered\nset. Nothing to page through — the catalog is small. Sorting and grouping are the screen's own concern.","operationId":"list_themes_api_v1_radar_themes_get","parameters":[{"name":"my_topics","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"My Topics"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RadarCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/radar/themes/{theme_id}":{"get":{"tags":["radar"],"summary":"Get Theme","description":"One theme with its representative sources. Out of scope or unknown → an identical 404.","operationId":"get_theme_api_v1_radar_themes__theme_id__get","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RadarThemeDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/radar/export":{"get":{"tags":["radar"],"summary":"Export Themes","description":"The catalog on the reader's screen, filter included, as a date-stamped CSV download.\n\nRendered server-side from the same service read the screen uses, so the file's rows are exactly the\nthemes this member sees. Sign-in is the only gate — all four member roles may export. `no-store`\nbecause the file is per organisation and dated: a shared cache serving it to the next caller would be\nhanding them another organisation's view of the catalog.","operationId":"export_themes_api_v1_radar_export_get","parameters":[{"name":"my_topics","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"My Topics"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/radar/recompute":{"post":{"tags":["radar"],"summary":"Recompute","description":"Rebuild the theme catalog.\n\nInline execution answers 200 with the finished run; queued execution answers 202 with the run still\npending, which is the honest state until a worker consumes it. A recompute already in flight is\nrefused with the in-flight run attached, so the screen can start polling that one instead.","operationId":"recompute_api_v1_radar_recompute_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RadarRunSummary"}}}}}}},"/api/v1/radar/runs/latest":{"get":{"tags":["radar"],"summary":"Latest Run","description":"The run the screen polls. 204 when no recompute has ever run — not a fabricated pending row.","operationId":"latest_run_api_v1_radar_runs_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RadarRunSummary"}}}},"204":{"description":"No run yet"}}}},"/api/v1/backtest/themes":{"get":{"tags":["backtest"],"summary":"List Backtest Themes","description":"What this organisation may replay: the seeded case study first, then live cross-regulator themes.\n\nAn empty list is the honest \"nothing eligible\" state, and the screen hides the picker rather than\noffering a chooser with nothing in it.","operationId":"list_backtest_themes_api_v1_backtest_themes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestThemeListResponse"}}}}}}},"/api/v1/backtest/replay":{"get":{"tags":["backtest"],"summary":"Replay Theme","description":"Replay one theme over history.\n\nAn absent, unrecognised, stale, hidden or now-ineligible selection all resolve the same way: the first\neligible entry replays. Theme identities are disposable by design, so a link that has gone stale is\nordinary rather than exceptional. 204 means nothing at all is eligible.","operationId":"replay_theme_api_v1_backtest_replay_get","parameters":[{"name":"theme","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A catalog theme id or the case-study designation id","title":"Theme"},"description":"A catalog theme id or the case-study designation id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacktestReplayResponse"}}}},"204":{"description":"Nothing is eligible to replay"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/triage/publications/{publication_id}/push":{"post":{"tags":["triage"],"summary":"Push Publication","description":"Record a publication as pending triage for one affiliate.\n\n200 on both paths: a first push creates the record and audits it, a repeat returns the record it found\nand changes nothing. The two responses are indistinguishable on purpose — a status code that differed\nwould be a difference a caller could act on, and a silent no-op would then grow a retry loop.","operationId":"push_publication_api_v1_triage_publications__publication_id__push_post","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriagePushRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriagePushResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/triage/inbox":{"get":{"tags":["triage"],"summary":"Triage Inbox","description":"The signed-in person's own affiliate queue.\n\nAny authenticated member may ask. Whether they have a queue is decided by having an affiliate, not by\nwhich affiliate role they hold — so an affiliate member reaching this directly gets the same worklist\nas their lead, and an HQ member gets a 200 saying they have none rather than a refusal.","operationId":"triage_inbox_api_v1_triage_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageInboxResponse"}}}}}}},"/api/v1/triage/records/{record_id}/answer":{"post":{"tags":["triage"],"summary":"Answer Record","description":"Answer a pending record — only from a member of the affiliate it was pushed to, and only once.\n\nThe answer, its audit entry and (for a group-impact Relevant answer) the escalation entry are written in\nthis request's one transaction. A second answer is a 409 with the original untouched: there is no undo,\nno edit and no re-triage anywhere in the product.","operationId":"answer_record_api_v1_triage_records__record_id__answer_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/triage/dashboard":{"get":{"tags":["triage"],"summary":"Triage Dashboard","description":"The dashboard column's figures: organisation-wide for every member, from this feature's own read.","operationId":"triage_dashboard_api_v1_triage_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageDashboardResponse"}}}}}}},"/api/v1/triage/publications/{publication_id}":{"get":{"tags":["triage"],"summary":"Publication Triage","description":"Every affiliate's triage status for one publication — read-only for every member of the organisation.","operationId":"publication_triage_api_v1_triage_publications__publication_id__get","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationTriageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/triage/actions/{token}":{"get":{"tags":["triage-actions"],"summary":"View Action","description":"What the confirmation page renders. Mutates nothing, and is safe to fetch any number of times.","operationId":"view_action_api_v1_triage_actions__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/triage/actions/{token}/confirm":{"post":{"tags":["triage-actions"],"summary":"Confirm Action","description":"Record the answer the link carries. No request body — the answer is bound into the credential.\n\nThat is what stops a forwarded link recording something other than what it says on the button.","operationId":"confirm_action_api_v1_triage_actions__token__confirm_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows":{"get":{"tags":["workflows"],"summary":"List Workflows","description":"One page of the organisation-wide backlog, in the reader's order, with the organisation's own counts.\n\nThe status filter, the priority filter and the text search are answered here rather than by the\ninterface, because the interface now holds one page: a filter applied to twenty-five rows of a\nthousand narrows those twenty-five and reports it as the answer. `order` is answered here for the same\nreason: a browser can only re-order the page it happens to be holding, which is not the list.\n\n`status` repeats to mean \"any of these\", so a figure counting two statuses opens a list of both.\n`assignee=me` keeps work the reader is on, `assigned_by=me` work the reader put somebody on, and\n`office` work that reaches that office through the people on it — the attribution the oversight table\ncounts by. `overdue` names which of the two lateness rules to list by: `backlog` is the badge's,\n`oversight` the accountability figures'. `action_office` is work in that office as Workflows v3 counts it\n— the owner's office, or the people on it for a case file without an owner — and `closed_from` /\n`closed_to` keep work closed on or between those days (UTC); both are what the v3 oversight table links\nwith. An office outside the reader's organisation is a 404.\n\nThree orders. The default is the most recently updated, because a list of work is read to find out\nwhere things stand; the second is when it was raised. Both read a moment every row has. What is late is\nnot an order — it is a badge on every row and the overdue chip beside the list. The third, `urgency`,\nis for a ranking rather than a list: highest priority first, then the soonest target date (a case file\nwith no target behind every one that has one), then the oldest raised. The dashboard asks for it with\nthe open statuses and a small page, so its top rows are the most urgent across the whole backlog and\nnot across whichever page the default order put first.\n\n`counts` stays the population's own totals — the organisation's, or the people axis's — and does not\nmove when the reader narrows; `overdue` counts the filtered set, which is what the chip beside the\nlist has always meant.","operationId":"list_workflows_api_v1_workflows_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/WorkflowStatus"}},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Priority"},{"type":"null"}],"title":"Priority"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BacklogOrder","default":"recently_updated"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallerReference"},{"type":"null"}],"title":"Assignee"}},{"name":"assigned_by","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallerReference"},{"type":"null"}],"title":"Assigned By"}},{"name":"office","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Office"}},{"name":"overdue","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OverdueRule"},{"type":"null"}],"title":"Overdue"}},{"name":"action_office","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Action Office"}},{"name":"closed_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Closed From"}},{"name":"closed_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Closed To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WorkflowRow_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflows"],"summary":"Start Workflow","description":"Open a case file on a publication, under a name that says what it is for — any of the four roles.\n\nAlways 201, and always a new case file. A publication is assessed as many times as the organisation\ndecides to assess it: one document can raise a labelling change, a training obligation and a supplier\nnotification, and each is its own piece of work with its own people and its own ending.\n\nThis is deliberately not the screening decision, which answers a question about the publication itself\nand therefore converges on the one record it raised. Pressing Relevant opens the first case file;\neverything after it comes through here.","operationId":"start_workflow_api_v1_workflows_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStartRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/screening":{"post":{"tags":["workflows"],"summary":"Screen Publication","description":"Answer the first question a publication asks — does this concern us — and record it either way.\n\nOne request, because a reader pressing a button on the intake expects a record afterwards, not a\nworkflow parked in an open state that nothing distinguishes from unread. Both answers raise a case\nfile: a dismissal is a decision somebody made and has to keep a name and a moment.\n\n201 when this request raised the workflow, 200 when it converged onto one that already existed.\nPressing the answer a publication already carries changes nothing and is not an error. Any role may\nscreen; it is completing, not screening, that is reserved.\n\nRegistered before the `/{workflow_id}` read so the literal segment is not parsed as a workflow id.","operationId":"screen_publication_api_v1_workflows_screening_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowScreeningRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/inbox":{"get":{"tags":["workflows"],"summary":"Read Inbox","description":"What the caller was asked to look at, split into what is waiting on them and what they have closed.\n\nTheir own rows and nobody else's: the reader comes from the verified token and is not a parameter, so\nthere is no shape of this request that asks for somebody else's inbox.\n\nRegistered before the `/{workflow_id}` read so the literal segment is not parsed as a workflow id.","operationId":"read_inbox_api_v1_workflows_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxResponse"}}}}}}},"/api/v1/workflows/assignable-members":{"get":{"tags":["workflows"],"summary":"List Assignable Members","description":"Who the assignee picker may offer. Every member may read it — the team roster's gate is not this\nread's gate, because all four roles may assign and the response carries names only, never roster data.\n\nRegistered before the `/{workflow_id}` read on purpose: this literal segment would otherwise be parsed\nas a workflow id and answered as a validation failure instead of reaching this route.","operationId":"list_assignable_members_api_v1_workflows_assignable_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignableMembersResponse"}}}}}}},"/api/v1/workflows/{workflow_id}":{"get":{"tags":["workflows"],"summary":"Read Workflow","description":"The whole case file: the row, the form fields, the people, the thread and the history.","operationId":"read_workflow_api_v1_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workflows"],"summary":"Update Workflow","description":"Save the assessment form — every supplied field together, and one history entry naming what moved.\n\nA save that changes nothing succeeds and writes no entry. The title is accepted here and a rename is\nrecorded like any other change; a blank title is a 400.","operationId":"update_workflow_api_v1_workflows__workflow_id__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/transitions":{"post":{"tags":["workflows"],"summary":"Transition Workflow","description":"Move a workflow through its lifecycle.\n\nThe current status is read from the row under a lock, never taken from the request, so two concurrent\ncompletions cannot both succeed. An invalid pair and either blocked sign-off gate are conflicts; the\nactor rule is a refusal. All of them leave status, the completion date and the history untouched.","operationId":"transition_workflow_api_v1_workflows__workflow_id__transitions_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTransitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/assignees":{"post":{"tags":["workflows"],"summary":"Assign Workflow","description":"Add a person, or replace the role of somebody already assigned.\n\nAppend-only: there is deliberately no route that removes an assignee. Re-adding an existing person\nreplaces their role in one row and consumes no cap, so a workflow already at the cap can still gain the\nreviewer its sign-off gate needs.","operationId":"assign_workflow_api_v1_workflows__workflow_id__assignees_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAssigneeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/assignments":{"post":{"tags":["workflows"],"summary":"Assign And Send","description":"Send this publication to one or more people, with what they need to do.\n\nOne request because it is one act on the screen. Each person is put on the workflow carrying the office\nwhose copy they were sent, the note lands on the case file as a comment, and each of them is emailed a\nlink to the case file, a link to the regulator's own page, and that note. The message has nothing to\nclick that records a decision.\n\nSending nobody is refused rather than treated as an empty success.","operationId":"assign_and_send_api_v1_workflows__workflow_id__assignments_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/assignees/{user_id}/remind":{"post":{"tags":["workflows"],"summary":"Remind Assignee","description":"Send the same instruction again to somebody who has not come back on it yet.\n\nThe one act between sending and giving up. It repeats what they were sent rather than saying something\nnew — a reminder that quietly changes the ask is a second request wearing the first one's clothes — and\nit is recorded, because \"I asked twice\" is a fact about the sender as much as the recipient.\n\nRefused when they have already marked it done (nothing outstanding to remind them of) and not found\nwhen they were never sent it. Neither is an authorisation question: whoever can see the case file can\nchase what it is waiting on.","operationId":"remind_assignee_api_v1_workflows__workflow_id__assignees__user_id__remind_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow 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":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/assignees/me/done":{"post":{"tags":["workflows"],"summary":"Mark Own Assignment Done","description":"The assignee says they have finished what they were sent.\n\nTheir own row only, which is why the path says `me` and takes no user id: this is a statement about\nthe caller and could not be made about somebody else without inventing a claim. It moves nothing and\ngates nothing — completing the workflow stays one act by one person — and pressing it twice changes\nnothing and writes no second history entry.\n\nNot found when the caller has no assignment here, which is the honest answer: nothing of theirs exists\nto mark, and a refusal would imply they were owed something.","operationId":"mark_own_assignment_done_api_v1_workflows__workflow_id__assignees_me_done_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/comments":{"post":{"tags":["workflows"],"summary":"Comment On Workflow","description":"Append to the thread. Append-only — there is no edit and no delete route, and no such privilege.","operationId":"comment_on_workflow_api_v1_workflows__workflow_id__comments_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCommentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/action-items":{"post":{"tags":["workflows"],"summary":"Add Action Item","description":"Record a follow-up on this case file, owned by somebody who can be held to it.\n\nReturns the whole case file, like every other workflow mutation: one round trip leaves the screen\nconsistent rather than needing a second read to find out what the write did.","operationId":"add_action_item_api_v1_workflows__workflow_id__action_items_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/action-items/{item_id}":{"patch":{"tags":["workflows"],"summary":"Change Action Item","description":"Complete, reopen or reassign one follow-up. Exactly one of the two fields may be set.","operationId":"change_action_item_api_v1_workflows__workflow_id__action_items__item_id__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"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/ActionItemUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Remove Action Item","description":"Withdraw a follow-up from the working list.\n\nA marked removal, not a delete: the row and its attribution survive, because a compliance record\nthat can quietly lose entries is worth less than one that cannot. Answers with the case file rather\nthan 204 — the screen needs the recomposed list, and every other workflow route returns it too.","operationId":"remove_action_item_api_v1_workflows__workflow_id__action_items__item_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/control":{"put":{"tags":["workflows"],"summary":"Link Workflow Control","description":"Anchor this assessment to a control from the organisation's catalogue, or clear the anchor.\n\nPUT rather than PATCH because the link is a single value being replaced and `null` is a meaningful\nbody: clearing it is a decision the trail records, not the absence of one.","operationId":"link_workflow_control_api_v1_workflows__workflow_id__control_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowControlLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oversight":{"get":{"tags":["oversight"],"summary":"Read Oversight","description":"The five tiles, the by-affiliate table, both distributions, the triage footer and the recent pulse.\n\nRecomputed per request from stored rows: nothing here is cached and no figure is stored, so every number\ncan be re-derived from the rows behind it. A read that cannot reach its store raises — an empty screen\nmeans an organisation with no work, never an outage.","operationId":"read_oversight_api_v1_oversight_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OversightResponse"}}}}}}},"/api/v1/oversight/actions":{"get":{"tags":["oversight"],"summary":"Read Oversight Actions","description":"The Workflows v3 screen: five tiles and one row per office, for a period (default: the last 90 days).\n\nOpen, Overdue and Waiting sign-off are the work as it stands now; Closed and On-time % count work closed\nin the period; Undecided counts publications of the organisation's population that arrived in the period\nmore than five days ago and that an office has not decided; the median runs from arrival to an office's\nfirst decision, over first decisions taken in the period. A period that ends before it starts is a 422.","operationId":"read_oversight_actions_api_v1_oversight_actions_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day of the period (UTC), inclusive.","title":"From"},"description":"First day of the period (UTC), inclusive."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the period (UTC), inclusive.","title":"To"},"description":"Last day of the period (UTC), inclusive."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OversightActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oversight/export":{"get":{"tags":["oversight"],"summary":"Export Audit Pack","description":"The audit pack for a period: each publication acted on, its decisions, its actions and their sign-off.\n\nHead-office roles only. CSV is the one format rendered; asking for PDF is a 422 that says so, because no\nPDF renderer exists on the platform yet and a file that is not one would be worse than a refusal.","operationId":"export_audit_pack_api_v1_oversight_export_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day of the period (UTC), inclusive.","title":"From"},"description":"First day of the period (UTC), inclusive."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the period (UTC), inclusive.","title":"To"},"description":"Last day of the period (UTC), inclusive."},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AuditPackFormat","default":"csv"}}],"responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oversight/nudge":{"post":{"tags":["oversight"],"summary":"Nudge Office","description":"Remind whoever holds each of one office's open overdue actions — the row's Nudge button.\n\nHead-office roles only: one press mails a whole office. Each reminder is the ordinary one, recorded on its\nworkflow; anybody asked within the reminder cooldown is skipped and counted. Another organisation's office\nis a 404.","operationId":"nudge_office_api_v1_oversight_nudge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OversightNudgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OversightNudgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports":{"get":{"tags":["reports"],"summary":"List Reports","description":"Every saved view visible to the caller, grouped Organisation then Team then Personal, newest first.\n\nA read that cannot reach its store raises: an empty panel means an organisation that has saved nothing,\nnever an outage.","operationId":"list_reports_api_v1_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportListResponse"}}}}}},"post":{"tags":["reports"],"summary":"Create Report","description":"Save the library's current view. A scope above this caller's entitlement is refused, never downgraded.","operationId":"create_report_api_v1_reports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/digest":{"patch":{"tags":["reports"],"summary":"Set Report Digest","description":"Subscribe this saved view to a digest, change its cadence, or stop it.\n\nRefused for a report the caller did not create, even one they can see and even one they could delete:\nthe mail goes to the creator, so anybody else changing it would be signing somebody up for email. A\nreport outside the caller's visibility is a not-found, so the response cannot confirm it exists.","operationId":"set_report_digest_api_v1_reports__report_id__digest_patch","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportDigestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}":{"patch":{"tags":["reports"],"summary":"Update Report Filters","description":"Replace one saved view's filters with the library's current ones (\"Update view\").\n\nCreator only, like the digest and narrower than deletion: an administrator removing a shared view is\ntidying the panel, while rewriting one would change what its author's digest mails them. A report\noutside the caller's visibility is a not-found, so the response cannot confirm it exists; an\nunrecognised closed-vocabulary value is a 422 from the boundary, as on saving.","operationId":"update_report_filters_api_v1_reports__report_id__patch","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportFiltersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reports"],"summary":"Delete Report","description":"Remove one saved view. Authorised from the verified identity here, whatever the interface offered.\n\nA report outside the caller's visibility — including another member's personal report seen by an\nadministrator — is a not-found, so the response cannot confirm that it exists.","operationId":"delete_report_api_v1_reports__report_id__delete","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bookmarks":{"get":{"tags":["bookmarks"],"summary":"List Bookmarks","description":"Every flag visible to the caller, grouped Organisation then Team then Personal, newest first.\n\nA flag whose publication no longer resolves stays listed and counted in a named unavailable state; a\nread that cannot reach its store raises, so an empty panel means nothing has been flagged.","operationId":"list_bookmarks_api_v1_bookmarks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkListResponse"}}}}}}},"/api/v1/bookmarks/{publication_id}":{"put":{"tags":["bookmarks"],"summary":"Set Bookmark","description":"Flag a publication, or update the flag this caller already holds on it.\n\n200 for both, deliberately: a differing status code would tell the caller whether a flag already\nexisted, and there is nothing they could do with that.","operationId":"set_bookmark_api_v1_bookmarks__publication_id__put","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bookmarks/{bookmark_id}/status":{"patch":{"tags":["bookmarks"],"summary":"Set Bookmark Status","description":"Clear a flag, or reopen it. The owner's act alone — an administrator's reach over reports stops here.\n\nClearing never deletes: the row stays listed as the record that a flagged item was dealt with.","operationId":"set_bookmark_status_api_v1_bookmarks__bookmark_id__status_patch","parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bookmarks/{bookmark_id}":{"delete":{"tags":["bookmarks"],"summary":"Remove Bookmark","description":"Retract a flag outright. Distinct from clearing, and likewise the owner's alone.","operationId":"remove_bookmark_api_v1_bookmarks__bookmark_id__delete","parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brief":{"get":{"tags":["brief"],"summary":"Read Brief","description":"The header, the four figures, the summary, the themes, the highlights, the impact lines, the strip.\n\nA section with no data is omitted — expressed as a null or an empty list, never as placeholder content.\nA figure that is genuinely zero renders as zero.","operationId":"read_brief_api_v1_brief_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BriefResponse"}}}}}}},"/api/v1/gap-analysis/context":{"get":{"tags":["gap-analysis"],"summary":"Read Context","description":"The market checklist, its preselected pair, and the specimen dossier text — one round trip.\n\nThe list is deliberately NOT exclusion-subtracted; the comparison screen's is. Reading both for one\norganisation is how that asymmetry is proven rather than assumed.","operationId":"read_context_api_v1_gap_analysis_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GapContextResponse"}}}}}}},"/api/v1/gap-analysis/product":{"post":{"tags":["gap-analysis"],"summary":"Extract Product","description":"Reduce a dossier to a structured product profile. The documents win when both parts are sent.\n\nA dossier may be several documents of one product; they make one profile, not one each.","operationId":"extract_product_api_v1_gap_analysis_product_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_product_api_v1_gap_analysis_product_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gap-analysis/run":{"post":{"tags":["gap-analysis"],"summary":"Run Analysis","description":"Assess the product against every selected market, independently, in one blocking response.","operationId":"run_analysis_api_v1_gap_analysis_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GapRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GapMatrixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-comparison/markets":{"get":{"tags":["market-comparison"],"summary":"Read Markets","description":"The dropdown list, with the organisation's exclusions SUBTRACTED — unlike the gap picker.","operationId":"read_markets_api_v1_market_comparison_markets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonMarketsResponse"}}}}}}},"/api/v1/market-comparison/run":{"post":{"tags":["market-comparison"],"summary":"Run Comparison","description":"Compare the pair across the target sector's checklist, in one blocking response.","operationId":"run_comparison_api_v1_market_comparison_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketComparisonRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview":{"get":{"tags":["market-overview"],"summary":"Get Market Overview","description":"The board: the population figures, the register facts, and one capped population.\n\nA market with no connected register is still offered, and the population comes back as a named\nabsence rather than an empty list — a blank that says why is the difference between a pilot's\nfirst hour being useful and being four empty panels.\n\nA `custom` period needs both of its dates and a range that runs forwards; anything else is a 422\nfrom the query model rather than a window nobody meant.\n\n`substance` and `holder` narrow the records population to part of itself -- what a reader pressed on\none record to see everything else like it. They are the register identity's own FOLDED keys, never\nthe printed names, so two spellings of one firm are one filter. A key nothing matches answers with an\nempty page rather than a refusal: a register that has dropped a decided application is an ordinary\nstate, and the reader can see that it is empty.\n\n`q` is the search box. Every term must be present, and a term one slip away from a word the corpus\nholds is corrected to it, with what was typed ranked first. It narrows the list and its pager total\nand leaves the three population figures describing the whole market.","operationId":"get_market_overview_api_v1_market_overview_get","parameters":[{"name":"population","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MarketPopulation","default":"records"}},{"name":"markets","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Markets"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MarketPeriod","default":"30d"}},{"name":"period_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period From"}},{"name":"period_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period To"}},{"name":"mention_kind","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MentionKindFilter","default":"all"}},{"name":"substance","in":"query","required":false,"schema":{"type":"string","default":"","title":"Substance"}},{"name":"holder","in":"query","required":false,"schema":{"type":"string","default":"","title":"Holder"}},{"name":"mention_sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MentionSort","default":"recent"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketOverviewPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/pending":{"get":{"tags":["market-overview"],"summary":"Get Substance Pending","description":"On which latest pending lists the substance is, market by market, whatever its filing date.\n\nRead across every application register the board would show this reader, with no period: a pending\nlist drops a row once it is decided, so everything still on it is the answer. A market with no register\nis named apart, never reported as \"not pending\". Fewer than three letters is a 422.","operationId":"get_substance_pending_api_v1_market_overview_pending_get","parameters":[{"name":"substance","in":"query","required":true,"schema":{"type":"string","maxLength":120,"description":"The substance, as typed or as suggested.","title":"Substance"},"description":"The substance, as typed or as suggested."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubstancePendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/pending/substances":{"get":{"tags":["market-overview"],"summary":"Get Pending Substance Suggestions","description":"Substance names these registers hold that the typed term finds, a misspelling included.","operationId":"get_pending_substance_suggestions_api_v1_market_overview_pending_substances_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":120,"description":"The substance, as typed or as suggested.","title":"Q"},"description":"The substance, as typed or as suggested."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubstanceSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/pending/export":{"get":{"tags":["market-overview"],"summary":"Export Substance Pending","description":"The same per-market answer as an Excel workbook, so a reader can forward what they saw.","operationId":"export_substance_pending_api_v1_market_overview_pending_export_get","parameters":[{"name":"substance","in":"query","required":true,"schema":{"type":"string","maxLength":120,"description":"The substance, as typed or as suggested.","title":"Substance"},"description":"The substance, as typed or as suggested."}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/active-holders":{"get":{"tags":["market-overview"],"summary":"Get Active Holders","description":"Who filed most into this reader's registers over the default window — the landing screen's panel.\n\nTakes no parameters on purpose. The board is where a reader chooses a market and a period; this\nanswers the one question the landing screen asks, over the same scope and the same anchored window,\nand the window it used comes back on the response rather than being assumed by the screen.\n\nAlways 200. No register this reader may see is a defined answer — an empty list beside a connected\ncount of zero — and never an error, because a group that has connected no register has not failed at\nanything.","operationId":"get_active_holders_api_v1_market_overview_active_holders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveHoldersResponse"}}}}}}},"/api/v1/market-overview/insights":{"post":{"tags":["market-overview"],"summary":"Press Market Insight","description":"Compute one of the five fixed figures over the filter the screen is showing.\n\nThe figure is computed in code and the sentence beside it may be absent: the model is handed the\nfinished figure table and nothing else, so a narration that does not arrive costs the response\nnothing. An unknown chip is a 422 from the enum.","operationId":"press_market_insight_api_v1_market_overview_insights_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketInsightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketInsightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/records/{record_id}":{"get":{"tags":["market-overview"],"summary":"Get Market Record","description":"One record in full, with every field under the register's own label. Unknown or unreadable → 404.","operationId":"get_market_record_api_v1_market_overview_records__record_id__get","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":{"$ref":"#/components/schemas/ProductRecordDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/authorised/{record_id}":{"get":{"tags":["market-overview"],"summary":"Get Market Authorised Product","description":"One authorised product in full, with every field under the register's own label.\n\nIts own route rather than `/records/{id}`: an application and an authorisation are different facts with\ndifferent shapes, and a record id from the other kind of register answers 404 here exactly as an\nunknown or unreadable one does.","operationId":"get_market_authorised_product_api_v1_market_overview_authorised__record_id__get","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":{"$ref":"#/components/schemas/AuthorisedProductDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/records/{record_id}/view":{"post":{"tags":["market-overview"],"summary":"Mark Market Record Viewed","description":"Record that the caller opened this record, for the caller only. Idempotent; unreadable → 404.","operationId":"mark_market_record_viewed_api_v1_market_overview_records__record_id__view_post","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Record Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/holders/{holder_key}":{"get":{"tags":["market-overview"],"summary":"Get Market Holder","description":"One holder's whole held history. A key matching nothing this reader may see → 404.","operationId":"get_market_holder_api_v1_market_overview_holders__holder_key__get","parameters":[{"name":"holder_key","in":"path","required":true,"schema":{"type":"string","title":"Holder Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolderDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-overview/mentions/{name_key}":{"get":{"tags":["market-overview"],"summary":"Get Market Mention","description":"One named party and every publication of this reader's that named it in the period. Unknown key → 404.\n\nTakes the board's period so the panel lists the documents the row counted; a custom range is refused\nexactly as the board refuses it.","operationId":"get_market_mention_api_v1_market_overview_mentions__name_key__get","parameters":[{"name":"name_key","in":"path","required":true,"schema":{"type":"string","title":"Name Key"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MarketPeriod","default":"30d"}},{"name":"period_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period From"}},{"name":"period_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls":{"get":{"tags":["controls"],"summary":"Read Framework","description":"The screen's one read: the whole framework, its counters, every retained match, and the latest run.\n\nNo query parameters. The framework is a handful of obligations and at most a few hundred matches, so\nthere is nothing to page through and nothing worth filtering server-side; search and grouping are the\nscreen's own concern. An organisation with no controls answers 200 with zero counters and no domains —\na real state, not an error — while a read that cannot complete raises, so the two are never confused.\n\n`include_archived` is the one parameter, and it is the explicit toggle rather than a filter: it ADDS the\narchived rows and leaves every counter, coverage pill and match set computed from the live framework, so\nturning it on shows history without moving the compliance posture the screen reports.","operationId":"read_framework_api_v1_controls_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlFrameworkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["controls"],"summary":"Add Obligation","description":"Write one obligation with its controls and its entity scope.\n\nThe code is assigned here, one past the highest ever used for its prefix with archived rows counted; the\nrequest has no field for it, and none for `status` either.","operationId":"add_obligation_api_v1_controls_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationWriteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/match":{"post":{"tags":["controls"],"summary":"Trigger Match","description":"Rebuild the caller's organisation's control match set.\n\nInline execution answers 200 with the finished run; queued execution answers 202 with the run still\npending, which is the honest state until a worker consumes it. A pass already in flight is refused with\nthat run attached, so the screen can start polling it instead of starting a second one.","operationId":"trigger_match_api_v1_controls_match_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlMatchRunSummary"}}}}}}},"/api/v1/controls/runs/latest":{"get":{"tags":["controls"],"summary":"Latest Run","description":"The run the screen polls. 204 when no pass has ever run — never a fabricated pending row.","operationId":"latest_run_api_v1_controls_runs_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlMatchRunSummary"}}}},"204":{"description":"No run yet"}}}},"/api/v1/controls/{control_id}":{"patch":{"tags":["controls"],"summary":"Edit Obligation","description":"Replace an obligation's editable fields, refusing a write whose revision has moved.\n\nThe refusal names who changed it rather than reporting a constraint — the shape this area already sets\nwhere the loser of a race is told about the winner. Editing does NOT start a matching pass: the framework\nreads stale instead, because a pass is a paid, minutes-long action and five edits would start five.","operationId":"edit_obligation_api_v1_controls__control_id__patch","parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Control Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/{control_id}/archive":{"post":{"tags":["controls"],"summary":"Archive Obligation","description":"Retire an obligation. Its controls and its matches stay in the database — this is not a delete.","operationId":"archive_obligation_api_v1_controls__control_id__archive_post","parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Control Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/{control_id}/restore":{"post":{"tags":["controls"],"summary":"Restore Obligation","description":"Return an archived obligation, carrying the code it already had.","operationId":"restore_obligation_api_v1_controls__control_id__restore_post","parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Control Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObligationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import":{"post":{"tags":["controls"],"summary":"Import Documents","description":"Read text-based PDFs and start a pass per document, each turning into its own reviewable draft.\n\nSeveral documents, because a compliance library arrives as a folder of SOPs rather than as one manual —\nand several more may be started while these are still reading. One document is a batch of one and behaves\nexactly as the single upload always did, refusal for refusal.\n\nThe refusal order is the contract: the DECLARED total is refused before the body is read at all, then how\nmany files it carries, then per file the measured length and readability — measured, never inferred from a\nfile name or the declared type. A file refused this way is reported BESIDE the runs that started, because\nfour manuals reading normally must not be discarded because the fifth was a scan. A press where nothing at\nall could be read is refused outright instead, which is what keeps a single unreadable file answering 422.","operationId":"import_documents_api_v1_controls_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_documents_api_v1_controls_import_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportIntakeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/imports":{"get":{"tags":["controls"],"summary":"Read Import Queue","description":"The reader's own imports, however each ended — one row per document, newest first.\n\nDeclared before `/import/{run_id}` is irrelevant here: this is a different path, deliberately, so that a\nrun identifier can never be confused with the word for the list of them.\n\nFailures are IN this read, unlike the framework screen's waiting panel. A batch's documents end\ndifferently, and a reader who navigated away from the upload has nowhere else to learn that document three\nwas a scan.","operationId":"read_import_queue_api_v1_controls_imports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportQueueResponse"}}}}}}},"/api/v1/controls/import/{run_id}":{"get":{"tags":["controls"],"summary":"Read Import Run","description":"The run the screen polls. A run belonging to another organisation is absent, never forbidden.","operationId":"read_import_run_api_v1_controls_import__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/ImportRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import/{run_id}/dismiss":{"post":{"tags":["controls"],"summary":"Dismiss Import Run","description":"Clear a failed import off the reader's queue. POST rather than DELETE: nothing is deleted.\n\nThe run is kept — a document this customer tried to import and how the platform answered — and what the\ncall records is that the person who uploaded it has now seen that answer. Refused for a run that has not\nfailed, because the other two states have their own actions and hiding either would hide owed work.","operationId":"dismiss_import_run_api_v1_controls_import__run_id__dismiss_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import/{run_id}/draft":{"get":{"tags":["controls"],"summary":"Read Import Draft","description":"The draft a run produced. Expired or already confirmed reads as gone, with the reason.","operationId":"read_import_draft_api_v1_controls_import__run_id__draft_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/ImportDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import/drafts/{draft_id}":{"patch":{"tags":["controls"],"summary":"Edit Import Draft","description":"Persist the reader's per-row edits on the server, so a closed tab costs them nothing.","operationId":"edit_import_draft_api_v1_controls_import_drafts__draft_id__patch","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["controls"],"summary":"Discard Import Draft","description":"The reader's explicit discard. No audit entry: an abandoned draft never touched the framework.","operationId":"discard_import_draft_api_v1_controls_import_drafts__draft_id__delete","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import/drafts/{draft_id}/proposals/{proposal_id}":{"patch":{"tags":["controls"],"summary":"Edit Import Proposal","description":"One row's fields, under the DRAFT's revision. The route a keystroke reaches.\n\nAnswers with the revision alone. The client sent the row it changed and holds every other one, so\nreturning the draft would put the payload back on the wire in the other direction — which is the cost this\nroute exists to remove.\n\nA `proposal_id` the draft does not hold answers 404 rather than inserting it: that means a stale tab or a\nrow somebody removed, and an upsert here would put a proposal into the register no reading ever proposed.","operationId":"edit_import_proposal_api_v1_controls_import_drafts__draft_id__proposals__proposal_id__patch","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"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/DraftProposalEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/controls/import/drafts/{draft_id}/confirm":{"post":{"tags":["controls"],"summary":"Confirm Import Draft","description":"One transaction: the checked proposals become obligations, the replaced ones are updated in place.\n\nThe draft is consumed inside that transaction, which is what makes a second attempt an explicit refusal\nrather than a double apply.","operationId":"confirm_import_draft_api_v1_controls_import_drafts__draft_id__confirm_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit":{"get":{"tags":["audit"],"summary":"Read Audit Trail","description":"One page of the record, newest first, optionally narrowed to one kind of item and one member.\n\nThe person narrowing carries no role gate of its own, and that is deliberate: every row on this\nscreen already names its actor to every member, so filtering by one exposes nothing that was not\nalready on the page and a gate would only make the record harder to read.\n\nA read that cannot reach its store raises. An empty page means an organisation that has recorded\nnothing, never an outage: on an evidence surface \"no entries\" has to be provable rather than assumable,\nwhich is exactly what the original got wrong by degrading a failed read to an empty list.","operationId":"read_audit_trail_api_v1_audit_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AuditItemType"},{"type":"null"}],"description":"Narrow the trail to one kind of item","title":"Type"},"description":"Narrow the trail to one kind of item"},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Narrow the trail to one member","title":"Actor"},"description":"Narrow the trail to one member"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day of the period (UTC), inclusive.","title":"From"},"description":"First day of the period (UTC), inclusive."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the period (UTC), inclusive.","title":"To"},"description":"Last day of the period (UTC), inclusive."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditEntryResponse_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/export":{"get":{"tags":["audit"],"summary":"Export Audit Trail","description":"The trail the screen is showing, every entry of it rather than one page, as an Excel workbook.\n\nThe same narrowings and the same rule as the screen — every member, no role gate — because the file is\nwhat that member can already read, written down for an inspector. A period that ends before it starts is\na 422, and so is one holding more entries than one file carries: the file is never cut short.","operationId":"export_audit_trail_api_v1_audit_export_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AuditItemType"},{"type":"null"}],"description":"Narrow the trail to one kind of item","title":"Type"},"description":"Narrow the trail to one kind of item"},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Narrow the trail to one member","title":"Actor"},"description":"Narrow the trail to one member"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day of the period (UTC), inclusive.","title":"From"},"description":"First day of the period (UTC), inclusive."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the period (UTC), inclusive.","title":"To"},"description":"Last day of the period (UTC), inclusive."}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit/publications/{publication_id}":{"get":{"tags":["audit"],"summary":"Read Publication History","description":"One publication's history, newest first: its decisions and every entry about one of its workflows.\n\nThe publication page's History (Workflows v3). The same envelope and the same row as the trail, read\nwith the same rule — every member, no role gate — because it is the trail narrowed to one subject.","operationId":"read_publication_history_api_v1_audit_publications__publication_id__get","parameters":[{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Publication Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditEntryResponse_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/events":{"post":{"tags":["usage"],"summary":"Submit Usage Batch","description":"Record one flush from one browser window. All of it lands, or none of it does.\n\nThe acting member and their organisation come from the verified token; the batch carries neither and\na payload that claimed either is ignored rather than honoured.","operationId":"submit_usage_batch_api_v1_usage_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBatchRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage":{"get":{"tags":["usage"],"summary":"Read Usage Report","description":"Everything recorded since the first moment, optionally narrowed to one member.\n\nThere is no date range: the reading covers the whole record and states from when, because a rolling\nwindow would hide the onboarding weeks and those are where \"opened it once and never again\" lives.","operationId":"read_usage_report_api_v1_usage_get","parameters":[{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Narrow the whole reading to one member","title":"Actor"},"description":"Narrow the whole reading to one member"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/screening-quality":{"get":{"tags":["screening-quality"],"summary":"Read Screening Quality","description":"What the platform scored against what people decided, and every pair behind it.","operationId":"read_screening_quality_api_v1_screening_quality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningQualityResponse"}}}}}}},"/api/v1/screening-quality/export":{"get":{"tags":["screening-quality"],"summary":"Export Screening Decisions","description":"The decided pairs as a spreadsheet, for tuning work that happens outside this product.","operationId":"export_screening_decisions_api_v1_screening_quality_export_get","responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}}}}},"/api/v1/ai-spend":{"get":{"tags":["ai-spend"],"summary":"Get Period","operationId":"get_period_api_v1_ai_spend_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSpendPeriodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai-spend/rates":{"get":{"tags":["ai-spend"],"summary":"List Rates","operationId":"list_rates_api_v1_ai_spend_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiSpendRateResponse"},"type":"array","title":"Response List Rates Api V1 Ai Spend Rates Get"}}}}}},"post":{"tags":["ai-spend"],"summary":"Create Rate","operationId":"create_rate_api_v1_ai_spend_rates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSpendRateCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSpendRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai-spend/rates/{rate_id}":{"patch":{"tags":["ai-spend"],"summary":"Update Rate Amount","operationId":"update_rate_amount_api_v1_ai_spend_rates__rate_id__patch","parameters":[{"name":"rate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSpendRateAmountUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSpendRateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/source-suggestions":{"post":{"tags":["source-suggestions"],"summary":"Create Suggestion","description":"Store a suggestion as `new`. An address that is not a web address is a 422 naming the fix; a page\nalready collected, or already waiting in the organisation, is a 409 saying which.","operationId":"create_suggestion_api_v1_source_suggestions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSuggestionCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/source-suggestions/mine":{"get":{"tags":["source-suggestions"],"summary":"List My Suggestions","description":"The caller's own suggestions, newest first, each with what became of it.","operationId":"list_my_suggestions_api_v1_source_suggestions_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSuggestionListResponse"}}}}}}},"/api/v1/source-suggestions/{suggestion_id}":{"delete":{"tags":["source-suggestions"],"summary":"Withdraw Suggestion","description":"Delete one of the caller's own suggestions while it is still `new`; 409 once it is being handled.","operationId":"withdraw_suggestion_api_v1_source_suggestions__suggestion_id__delete","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Suggestion Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/source-suggestions":{"get":{"tags":["admin-source-suggestions"],"summary":"List Queue","description":"One tab of the queue — open (new and in review) or closed — newest first, with both tabs' counts.","operationId":"list_queue_api_v1_admin_source_suggestions_get","parameters":[{"name":"queue","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SuggestionQueue","default":"open"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/source-suggestions/counts":{"get":{"tags":["admin-source-suggestions"],"summary":"Queue Counts","description":"The totals alone, for the navigation badge.","operationId":"queue_counts_api_v1_admin_source_suggestions_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueCounts"}}}}}}},"/api/v1/admin/source-suggestions/{suggestion_id}":{"patch":{"tags":["admin-source-suggestions"],"summary":"Settle Suggestion","description":"Set the status. Declined needs a reason; connected and already covered need an existing source.","operationId":"settle_suggestion_api_v1_admin_source_suggestions__suggestion_id__patch","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Suggestion Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleSuggestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions":{"post":{"tags":["decisions"],"summary":"Decide","description":"Record one office's decision on a publication, replacing the one it had.\n\n`not_relevant` and `for_information` only: `action` is a 422, because an action is created through the\nAction form, which records the decision together with the work. A member decides for their own office;\nan HQ role for any office, or for the head office with `decided_for_all`, which every other office then\ninherits as \"(HQ)\" until it decides for itself. A decision already in action is a 409.","operationId":"decide_api_v1_decisions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["decisions"],"summary":"Publication Decisions","description":"Every office's effective decision on one publication, head office first. Any member may read it.","operationId":"publication_decisions_api_v1_decisions_get","parameters":[{"name":"publication_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The publication whose decisions to read","title":"Publication Id"},"description":"The publication whose decisions to read"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationDecisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/bulk":{"post":{"tags":["decisions"],"summary":"Decide In Bulk","description":"Not relevant or For information for many publications at once, with one optional reason, as one batch.\n\nEach publication is decided and audited exactly as `POST /decisions` would, in one transaction, and the\nbatch id is returned so `POST /decisions/bulk/{batch_id}/undo` can reverse it. `action` is a 422 (actions\nare created only through the assign sheet); more than 500 publications is a 422, never a trim; an unknown\npublication is a 404 and nothing is written. A publication already decided this way, or in action, is\nreported per row and left alone.\n\nDeclared before `/{decision_id}` so the literal path is not read as an identifier.","operationId":"decide_in_bulk_api_v1_decisions_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/bulk/{batch_id}/undo":{"post":{"tags":["decisions"],"summary":"Undo Bulk Decision","description":"Reverse one batch: each publication goes back to the decision the batch replaced, or to To decide.\n\nA publication whose decision somebody changed after the batch is skipped and reported `changed_since`.\nOnly the person who ran the batch may undo it (403 otherwise), and only once (409).","operationId":"undo_bulk_decision_api_v1_decisions_bulk__batch_id__undo_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUndoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/decisions/{decision_id}":{"delete":{"tags":["decisions"],"summary":"Undo Decision","description":"Undo a decision: its office returns to head office's decision for all, or to *to decide*.","operationId":"undo_decision_api_v1_decisions__decision_id__delete","parameters":[{"name":"decision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Decision Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions":{"get":{"tags":["actions"],"summary":"List My Work","description":"My work (spec §9): one page of open actions, with every tab's figure so one request renders the strip.\n\n`assignee=me` — actions the reader OWNS (not ones they contribute to); `assigned_by=me` — actions they\nstarted; `signoff=me` — submitted actions waiting for their sign-off, and for an HQ admin also those whose\nsigner has left; `office` — actions whose owner is in that office (an action's office is its owner's);\n`my_office=true` — the My office tab: the reader's own office, or every office for a head-office role;\n`overdue=true` — late by the backlog's rule. Several narrow together. Open and Submitted work only.\n\n`counts` carries the four tabs (`assigned_to_me`, `assigned_by_me`, `to_sign_off`, `my_office`) over open\nwork, unmoved by `overdue`, and `overdue` over the list asked for. `my_office` names the office the My office\ntab lists — the reader's own — or is null for a head-office role, whose My office is the whole organisation.\nAn office outside the reader's organisation is a 404.","operationId":"list_my_work_api_v1_actions_get","parameters":[{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallerReference"},{"type":"null"}],"title":"Assignee"}},{"name":"assigned_by","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallerReference"},{"type":"null"}],"title":"Assigned By"}},{"name":"signoff","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallerReference"},{"type":"null"}],"title":"Signoff"}},{"name":"overdue","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Overdue"}},{"name":"office","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Office"}},{"name":"my_office","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"My Office"}},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BacklogOrder","default":"recently_updated"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":25,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ActionRow_Customized"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["actions"],"summary":"Create Actions","description":"Create one action per entry, open at once, and record the reader's office's decision as Action.\n\nEach owner is told by email unless they assigned it to themselves. Somebody outside a head-office role may\ngive actions only to people in their own office (403). `ask_offices` needs exactly one action per asked\noffice, owned by somebody in it (422).","operationId":"create_actions_api_v1_actions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/nudge":{"post":{"tags":["actions"],"summary":"Nudge Actions","description":"Remind the owners of these open actions: ONE email per owner, listing their selected actions.\n\nAnybody who can see the actions may nudge them. A selection naming submitted or closed work is refused whole\n(409) and an unknown action is a 404 — nothing is sent either way. An owner reminded of an action within the\nhour, and the reader's own actions, are skipped and reported in `skipped` rather than mailed.","operationId":"nudge_actions_api_v1_actions_nudge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsNudgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsNudgedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/reassign":{"post":{"tags":["actions"],"summary":"Reassign Actions","description":"Give every one of these actions to one new owner, with one email to them listing what moved.\n\nEach move is exactly `PUT /actions/{id}/owner`'s — the same office rule (403), cap (422) and history entry.\nAll or nothing: one refused action stores none. The full bulk-assign sheet is a separate screen (RAD-120).","operationId":"reassign_actions_api_v1_actions_reassign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsReassignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsReassignedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/signoff/bulk":{"post":{"tags":["actions"],"summary":"Sign Off Actions","description":"Sign off several submitted actions in one request — each exactly as `POST /actions/{id}/signoff`'s Sign off.\n\nAll or nothing: an action that is not submitted (409) or that this reader may not sign off (403) refuses the\nselection, and none of it is stored. A comment, when given, is added to each action's thread.","operationId":"sign_off_actions_api_v1_actions_signoff_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsSignOffRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsSignedOffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/form":{"get":{"tags":["actions"],"summary":"Action Form","description":"The Action form's pre-fill for one publication.\n\nThe title, the suggested due date with the key-dates line it came from, the suggested priority and\nchecklist, and the owner picker in \"assigned most often first\" order. The owner is never suggested.","operationId":"action_form_api_v1_actions_form_get","parameters":[{"name":"publication_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The publication the action is created from","title":"Publication Id"},"description":"The publication the action is created from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/bulk/form":{"post":{"tags":["actions"],"summary":"Bulk Assign Form","description":"The assign sheet's pre-fill: per selected publication its title, suggested due date (with the key-dates\nline it came from) and priority, plus the owner picker in \"assigned most often first\" order.\n\nA POST because it carries the selection, up to the list's selection bound. Reads only. The owner is never\nsuggested. An unknown publication is a 404.","operationId":"bulk_assign_form_api_v1_actions_bulk_form_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignFormRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/bulk":{"post":{"tags":["actions"],"summary":"Bulk Assign","description":"Create one action per row as one batch, record each publication's decision as Action, and tell the owners.\n\nWith `notify_once` (default) each owner gets one email listing their new actions; otherwise one email per\naction. The same office rule as the Action form (403 for an owner outside a non-HQ caller's office); a\npublication named twice, or more rows than the selection bound, is a 422; an unknown publication or person\na 404. Nothing is stored when any row is refused.","operationId":"bulk_assign_api_v1_actions_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/bulk/{batch_id}/undo":{"post":{"tags":["actions"],"summary":"Undo Bulk Assign","description":"Withdraw every action of one bulk assign and put back the decisions it replaced.\n\nWithdrawn, never deleted: each action closes as not applicable and both history entries stay. Only the\nperson who ran it (403), once (409), and only while nobody has worked on any of its actions (409).","operationId":"undo_bulk_assign_api_v1_actions_bulk__batch_id__undo_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignUndoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/owner":{"put":{"tags":["actions"],"summary":"Change Action Owner","description":"Hand an action to a different owner: recorded in its history, and the new owner is emailed.","operationId":"change_action_owner_api_v1_actions__action_id__owner_put","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionOwnerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/submit":{"post":{"tags":["actions"],"summary":"Submit Action","description":"The owner submits the action as done: Done, or Not applicable with a reason; a note and a link optional.\n\nWhen the owner is also the person who signs it off, it closes at once; otherwise it waits as Submitted and\nthe signer is emailed. Only the owner may submit (403); only open work can be (409); a workflow that is\nnot an action closes with Complete instead (409). Returns the workflow as the detail read shows it.","operationId":"submit_action_api_v1_actions__action_id__submit_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/signoff":{"post":{"tags":["actions"],"summary":"Sign Off Action","description":"Sign off a submitted action (it closes) or send it back with a comment (it reopens with the owner).\n\nOnly the person who signs it off — the business owner if named, else whoever started it — or an HQ admin\nas the fallback (403). Sign-off emails whoever started it; a send-back emails the owner.","operationId":"sign_off_action_api_v1_actions__action_id__signoff_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionSignOffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/decline":{"post":{"tags":["actions"],"summary":"Decline Action","description":"The owner says the action is not theirs and suggests a colleague (\"Not mine\"); a note is optional.\n\nThe action keeps its owner until whoever assigned it answers, and they are emailed. Only the owner of an open\naction (403 / 409); one suggestion at a time (409 while one is pending). The colleague must be somebody else\n(422), still active (422), and somebody the owner could assign to themselves (403); an unknown one is 404.","operationId":"decline_action_api_v1_actions__action_id__decline_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDeclineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/decline/resolve":{"post":{"tags":["actions"],"summary":"Resolve Action Decline","description":"Answer a pending \"Not mine\": `reassign` hands it to the suggested colleague, `keep` leaves it with the owner.\n\nOnly whoever assigned the action, or an HQ admin (403); 409 when nothing is pending. Reassigning is an\nordinary change of owner — recorded, and the new owner emailed; keeping emails the owner that it stays theirs.","operationId":"resolve_action_decline_api_v1_actions__action_id__decline_resolve_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionDeclineResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/action-emails/{token}":{"get":{"tags":["action-emails"],"summary":"View Action Email","description":"What the page renders: the action and what Confirm would do.\n\nMutates nothing, and is safe to fetch any number of times — which is what a mail gateway prefetching every\nlink does.","operationId":"view_action_email_api_v1_action_emails__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionEmailLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/action-emails/{token}/confirm":{"post":{"tags":["action-emails"],"summary":"Confirm Action Email","description":"Do what the button said — submit the action as done — once.\n\nNo request body: the answer is bound into the link, so a forwarded message cannot do something other than\nwhat its button says.","operationId":"confirm_action_email_api_v1_action_emails__token__confirm_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionEmailLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/digests/recipients":{"get":{"tags":["digests"],"summary":"Digest Directory","description":"Who the To field may offer: the organisation's active members and its offices. Names only.","operationId":"digest_directory_api_v1_digests_recipients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestDirectoryResponse"}}}}}}},"/api/v1/digests/preview":{"post":{"tags":["digests"],"summary":"Preview Digest","description":"How many people the chosen recipients reach, each once, and how many have no RegRadar account.\n\nWrites nothing. A member or office outside the organisation is a 422.","operationId":"preview_digest_api_v1_digests_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/digests/send":{"post":{"tags":["digests"],"summary":"Send Digest","description":"Send the selected publications to the recipients as one read-only digest each.\n\nEach publication's decision for the sender's office becomes For information (an HQ role with\n`decided_for_all`: head office for all offices), audited like any decision; one already in action keeps its\nAction decision and is still sent. Each publication's history records who it was sent to. Recipients\nwithout an account get the title, summary and original link only. More than 500 publications is a 422,\nnever a trim; an unknown publication is a 404 and nothing is written or sent.","operationId":"send_digest_api_v1_digests_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/notification-preferences":{"get":{"tags":["me"],"summary":"Get Notification Preferences","description":"Every switchable email type and whether the caller receives it. No stored choice reads as on.","operationId":"get_notification_preferences_api_v1_me_notification_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}}}}},"put":{"tags":["me"],"summary":"Update Notification Preferences","description":"Turn email types on or off for the caller. Types left out are unchanged; a repeated type is a 422.","operationId":"update_notification_preferences_api_v1_me_notification_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionDeclineRequest":{"properties":{"suggested_user_id":{"type":"string","format":"uuid","title":"Suggested User Id"},"note":{"type":"string","maxLength":500,"title":"Note","default":""}},"type":"object","required":["suggested_user_id"],"title":"ActionDeclineRequest","description":"The owner's \"Not mine\" (spec §9): this is not theirs, and who they think it belongs to.\n\nA suggestion is required — \"not mine\" with nobody named leaves the person who assigned it nothing to do in\none click. The note is optional; blank is no note."},"ActionDeclineResolveRequest":{"properties":{"verdict":{"$ref":"#/components/schemas/DeclineVerdict"}},"type":"object","required":["verdict"],"title":"ActionDeclineResolveRequest","description":"The answer to a pending \"Not mine\": hand it to the suggested colleague, or keep it with the owner."},"ActionDeclineState":{"properties":{"declined_by":{"$ref":"#/components/schemas/ActionPersonRef"},"suggested":{"$ref":"#/components/schemas/ActionPersonRef"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"declined_at":{"type":"string","format":"date-time","title":"Declined At"}},"type":"object","required":["declined_by","suggested","note","declined_at"],"title":"ActionDeclineState","description":"An owner's pending \"Not mine\": they say it is not theirs and suggest a colleague.\n\n`declined_by` is always the current owner — a change of owner answers the suggestion and clears it."},"ActionDraft":{"properties":{"title":{"type":"string","maxLength":1000,"minLength":1,"title":"Title"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due_date_source":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Due Date Source"},"priority":{"$ref":"#/components/schemas/Priority","default":"medium"},"checklist":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Checklist"},"business_owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Business Owner User Id"},"contributor_user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"title":"Contributor User Ids"},"note":{"type":"string","maxLength":4000,"title":"Note","default":""},"suggestion_acceptance":{"$ref":"#/components/schemas/SuggestionAcceptanceRequest"}},"type":"object","required":["title","owner_user_id"],"title":"ActionDraft","description":"One action as the form confirms it. The owner is required and is always somebody the person chose."},"ActionEmailAnswer":{"type":"string","enum":["done"],"title":"ActionEmailAnswer","description":"What a tokenised button in an action's assignment email does (Workflows v3, RAD-128, spec §12).\n\nOnly the buttons that ACT carry a credential. Open is a plain link to the action — reading it needs a\nsession like any other screen — so it has no member here. Not mine is a plain link to the action's decline\nflow (RAD-129), behind the ordinary sign-in; it would join this enum only with a public page of its own, and\nthe column carries no value CHECK so that would need no migration."},"ActionEmailLinkResponse":{"properties":{"state":{"$ref":"#/components/schemas/ActionEmailState"},"answer":{"anyOf":[{"$ref":"#/components/schemas/ActionEmailAnswer"},{"type":"null"}]},"action_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Action Id"},"action_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Title"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"signs_off_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signs Off Name"},"closes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Closes"},"status":{"anyOf":[{"$ref":"#/components/schemas/WorkflowStatus"},{"type":"null"}]}},"type":"object","required":["state"],"title":"ActionEmailLinkResponse","description":"One reading of an action email link. Every field beyond `state` is set only where the state can say it.\n\n`refused` carries nothing at all. The verified states carry the action's id and title, so the page can offer\nthe action itself — opening it needs the ordinary sign-in, which is the whole of its protection."},"ActionEmailState":{"type":"string","enum":["ready","recorded","not_open","not_owner","expired","refused"],"title":"ActionEmailState","description":"What the page can report. `throttled` and `failed` are the limiter's 429 and a 5xx, never a state here."},"ActionFormMember":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"office_id":{"type":"string","format":"uuid","title":"Office Id"},"assigned_by_you":{"type":"integer","title":"Assigned By You"}},"type":"object","required":["user_id","name","office_id","assigned_by_you"],"title":"ActionFormMember","description":"One person the owner picker offers, with their office and how often the reader has assigned them."},"ActionFormOffice":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"is_department":{"type":"boolean","title":"Is Department"}},"type":"object","required":["id","name","is_head_office","is_department"],"title":"ActionFormOffice","description":"One office \"Ask several offices…\" may ask; `is_department` lets the form name a department as one."},"ActionFormPerson":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["user_id","name"],"title":"ActionFormPerson"},"ActionFormResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"suggestions":{"$ref":"#/components/schemas/ActionSuggestions"},"default_priority":{"$ref":"#/components/schemas/Priority"},"members":{"items":{"$ref":"#/components/schemas/ActionFormMember"},"type":"array","title":"Members"},"offices":{"items":{"$ref":"#/components/schemas/ActionFormOffice"},"type":"array","title":"Offices"},"reader_office_id":{"type":"string","format":"uuid","title":"Reader Office Id"},"can_assign_any_office":{"type":"boolean","title":"Can Assign Any Office"},"signs_off_by_default":{"$ref":"#/components/schemas/ActionFormPerson"},"max_assignees":{"type":"integer","title":"Max Assignees"}},"type":"object","required":["publication_id","title","suggestions","default_priority","members","offices","reader_office_id","can_assign_any_office","signs_off_by_default","max_assignees"],"title":"ActionFormResponse","description":"The Action form's pre-fill for one publication.\n\n`suggestions` is everything the form marks as suggested; the owner is never among it. `members` is the\nowner picker in its order: the people the reader assigns to most often first, then everybody else\nalphabetically — already narrowed to the reader's own office unless they may assign across offices.\n`signs_off_by_default` is the reader, because whoever starts an action signs it off unless a business\nowner is named."},"ActionItemCreateRequest":{"properties":{"body":{"type":"string","maxLength":500,"minLength":1,"title":"Body"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","required":["body","owner_user_id"],"title":"ActionItemCreateRequest","description":"Adding a follow-up. An owner is required — the block exists to answer who is doing this."},"ActionItemResponse":{"properties":{"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"},"owner_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Hint"},"priority":{"type":"string","title":"Priority"}},"type":"object","required":["title","detail","owner_hint","priority"],"title":"ActionItemResponse","description":"One recommended action from the viewer org's analysis (owner_hint optional)."},"ActionItemUpdateRequest":{"properties":{"completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Completed"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"}},"type":"object","title":"ActionItemUpdateRequest","description":"One change at a time: tick it, untick it, move it to somebody else, or set its due date.\n\nExactly one field may be set. Two would make the audit entry a guess about which act the caller\nmeant, and the trail's whole value is that it does not guess. `due_date` counts as set when it is\nPRESENT in the body, so an explicit `null` clears the date rather than reading as \"not sent\"."},"ActionLinkResponse":{"properties":{"state":{"$ref":"#/components/schemas/ActionState"},"publication_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publication Title"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"answered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered By"},"answered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered At"}},"type":"object","required":["state"],"title":"ActionLinkResponse","description":"One reading of an emailed answer link.\n\nEvery field beyond `state` is optional because each state carries only what it can honestly say: `refused`\ncarries nothing at all, since naming a cause is what would leak whether the record exists."},"ActionOutcome":{"type":"string","enum":["done","not_applicable"],"title":"ActionOutcome","description":"How an action closed (Workflows v3): the work was done, or it did not apply — which needs a reason.\n\nStored on the workflow beside the note and link that go with it; written by submit and sign-off."},"ActionOwnerRequest":{"properties":{"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"}},"type":"object","required":["owner_user_id"],"title":"ActionOwnerRequest","description":"Hand an action to a different owner."},"ActionPersonRef":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["user_id","name"],"title":"ActionPersonRef","description":"One person named on an action. Names resolve for members who have since left."},"ActionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"priority":{"$ref":"#/components/schemas/Priority"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due_date_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date Source"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"office_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Office Id"},"office_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Name"},"business_owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Business Owner User Id"},"started_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Started By User Id"},"signs_off_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Signs Off User Id"},"signs_off_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signs Off Name"},"checklist":{"items":{"type":"string"},"type":"array","title":"Checklist"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","publication_id","title","status","priority","target_date","due_date_source","owner_user_id","owner_name","office_id","office_name","business_owner_user_id","started_by_user_id","signs_off_user_id","signs_off_name","checklist","created_at"],"title":"ActionResponse","description":"One action as the form and the owner change report it back."},"ActionRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"priority":{"$ref":"#/components/schemas/Priority"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due":{"$ref":"#/components/schemas/WorkflowDue"},"publication":{"$ref":"#/components/schemas/WorkflowPublicationRef"},"owner":{"$ref":"#/components/schemas/ActionPersonRef"},"office":{"$ref":"#/components/schemas/MyWorkOffice"},"signs_off":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"signer_is_active":{"type":"boolean","title":"Signer Is Active"},"started_by":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"decline_suggested":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"yours_to_sign_off":{"type":"boolean","title":"Yours To Sign Off"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","status","priority","target_date","due","publication","owner","office","signs_off","signer_is_active","started_by","submitted_at","decline_suggested","yours_to_sign_off","updated_at"],"title":"ActionRow","description":"One action as My work lists it: what it is, whose it is, when it is due, and who signs it off.\n\n`due` is the backlog's due pair, so \"Overdue N days\" on this list and the backlog's badge are one rule\n(`is_overdue_for_backlog`: a target of today is due today, not late). `yours_to_sign_off` is\n`is_yours_to_sign_off` — the same rule the To sign off tab lists by — so the row's \"Waiting your sign-off\"\nand the tab cannot disagree. Everything the side pane can DO is read from the action's detail, not from here."},"ActionSentBackState":{"properties":{"by":{"$ref":"#/components/schemas/ActionPersonRef"},"at":{"type":"string","format":"date-time","title":"At"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["by","at","comment"],"title":"ActionSentBackState","description":"The signer's Send back the owner is working from: who sent it back, when, and what they asked for."},"ActionSignOffRequest":{"properties":{"verdict":{"$ref":"#/components/schemas/SignOffVerdict"},"comment":{"type":"string","maxLength":4000,"title":"Comment","default":""}},"type":"object","required":["verdict"],"title":"ActionSignOffRequest","description":"Answer a submitted action: sign it off, or send it back with the comment sending back requires.\n\nA comment may go with a sign-off too; it joins the action's thread either way."},"ActionState":{"type":"string","enum":["ready","recorded","answered","refused"],"title":"ActionState","description":"The outcomes the confirmation surface can report.\n\n`throttled` and `failed` are absent on purpose: neither is something this response says. A throttled\nrequest is the limiter's 429 and a failure is a 5xx, and the interface derives both from the status —\nwhich is what keeps them from ever being rendered as a refusal."},"ActionSubmitRequest":{"properties":{"outcome":{"$ref":"#/components/schemas/ActionOutcome"},"outcome_reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Outcome Reason"},"outcome_note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Outcome Note"},"outcome_link":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Outcome Link"}},"type":"object","required":["outcome"],"title":"ActionSubmitRequest","description":"Submit an action as done (spec §10): the outcome, a reason only with Not applicable, a note and a link.\n\nThe link is kept exactly as typed once it is a web address — it is usually a SharePoint path somebody\nwill paste back into a browser, and a normalised copy is not what they pasted."},"ActionSuggestions":{"properties":{"due":{"anyOf":[{"$ref":"#/components/schemas/DueDateSuggestion"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/Priority"},{"type":"null"}]},"checklist":{"items":{"type":"string"},"type":"array","title":"Checklist"}},"type":"object","required":["due","priority","checklist"],"title":"ActionSuggestions","description":"Everything the Action form pre-fills and marks as a suggestion. The owner is not among them."},"ActionsCreateRequest":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"actions":{"items":{"$ref":"#/components/schemas/ActionDraft"},"type":"array","maxItems":20,"minItems":1,"title":"Actions"},"ask_offices":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Ask Offices"}},"type":"object","required":["publication_id","actions"],"title":"ActionsCreateRequest","description":"Create one or several actions on one publication in a single confirm.\n\n`ask_offices` is \"Ask several offices…\": the offices asked whether this applies to them. Each must be\nthe office of exactly one of the actions' owners, and then every action must belong to one of them —\nthe platform never picks an owner for an office, so the caller supplies one action per office."},"ActionsCreatedResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"actions":{"items":{"$ref":"#/components/schemas/ActionResponse"},"type":"array","title":"Actions"},"decision":{"$ref":"#/components/schemas/DecisionResponse"}},"type":"object","required":["publication_id","actions","decision"],"title":"ActionsCreatedResponse","description":"What one confirm created, and the reader's office's decision as it now stands (Action)."},"ActionsNudgeRequest":{"properties":{"action_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Action Ids"}},"type":"object","required":["action_ids"],"title":"ActionsNudgeRequest","description":"Remind the owners of these open actions: one email per owner, listing their actions."},"ActionsNudgedResponse":{"properties":{"nudged":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Nudged"},"owners_nudged":{"type":"integer","title":"Owners Nudged"},"skipped":{"items":{"$ref":"#/components/schemas/NudgeSkipped"},"type":"array","title":"Skipped"}},"type":"object","required":["nudged","owners_nudged","skipped"],"title":"ActionsNudgedResponse","description":"What a nudge did: which actions were in a reminder, to how many owners, and what was left out.\n\n`owners_nudged` counts the owners a reminder was handed to the notification seam for — one message each."},"ActionsReassignRequest":{"properties":{"action_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Action Ids"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"}},"type":"object","required":["action_ids","owner_user_id"],"title":"ActionsReassignRequest","description":"Give every one of these actions to one new owner (the simple bulk Reassign; the full sheet is RAD-120)."},"ActionsReassignedResponse":{"properties":{"reassigned":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Reassigned"},"unchanged":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Unchanged"}},"type":"object","required":["reassigned","unchanged"],"title":"ActionsReassignedResponse","description":"Which actions moved to the new owner, and which already belonged to them (nothing recorded for those)."},"ActionsSignOffRequest":{"properties":{"action_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Action Ids"},"comment":{"type":"string","maxLength":4000,"title":"Comment","default":""}},"type":"object","required":["action_ids"],"title":"ActionsSignOffRequest","description":"Sign off several submitted actions at once; a comment, when given, goes on each one's thread."},"ActionsSignedOffResponse":{"properties":{"signed_off":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Signed Off"}},"type":"object","required":["signed_off"],"title":"ActionsSignedOffResponse"},"ActiveHoldersResponse":{"properties":{"holders":{"items":{"$ref":"#/components/schemas/NamedCountResponse"},"type":"array","title":"Holders"},"connected":{"type":"integer","title":"Connected"},"window_days":{"type":"integer","title":"Window Days"},"anchored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anchored At"}},"type":"object","required":["holders","connected","window_days","anchored_at"],"title":"ActiveHoldersResponse","description":"Who filed most into the connected registers over the trailing window — the landing screen's read.\n\nIts own endpoint rather than a slice of the board, because the landing screen must not pay for the\nboard's three populations to draw one list, and because the regions of that screen resolve\nindependently: a slow register read here may not hold the panels beside it.\n\nAn empty list means one of two things and the other two fields say which — no register this reader\nmay see, or nothing filed into one inside the window. Neither is reported as a quiet market."},"AdminInvitationCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},"type":"object","required":["email","role"],"title":"AdminInvitationCreateRequest","description":"An hq_admin creating an invitation (role validated against the four-value vocabulary)."},"AdminInvitationCreated":{"properties":{"invitation":{"$ref":"#/components/schemas/AdminInvitationResponse"},"link":{"type":"string","title":"Link"}},"type":"object","required":["invitation","link"],"title":"AdminInvitationCreated","description":"Create / resend response — the row plus the link (link always returned)."},"AdminInvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"},"status":{"$ref":"#/components/schemas/InvitationStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","affiliate_id","status","expires_at","created_at"],"title":"AdminInvitationResponse","description":"An invitation row as the admin surface renders it (consumes this)."},"AdministratorResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"account_status":{"$ref":"#/components/schemas/MemberDisplayStatus"}},"type":"object","required":["name","email","account_status"],"title":"AdministratorResponse","description":"An hq_admin member — the constitutional boundary of who the operator may see."},"AffiliateCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"}},"type":"object","required":["name"],"title":"AffiliateCreateRequest","description":"Create an office or a department.\n\nThe kind is chosen here and never changed. An office is one country's office and requires its country; a\ndepartment answers for every market and has none, so a country sent with one is refused rather than\nquietly dropped — a value accepted and ignored is how a department ends up believing it sits somewhere."},"AffiliateRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"}},"type":"object","required":["id","name","country"],"title":"AffiliateRef","description":"The office a member belongs to, as shown on the roster.\n\n`country` is nullable because an office may be the head office, which is created unattended and may not\nhave a declared country yet."},"AffiliateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"},"member_count":{"type":"integer","title":"Member Count"}},"type":"object","required":["id","name","country","member_count"],"title":"AffiliateResponse","description":"An office with its live non-removed member count (feeds the deletion UX + selectors).\n\n`country` is nullable for the head office, which is also the office an administrator edits through this\nshape to declare one."},"AffiliateTargetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"AffiliateTargetResponse","description":"One affiliate this publication has not been pushed to yet — a Push button waiting to be pressed."},"AffiliateUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"additionalProperties":false,"type":"object","title":"AffiliateUpdateRequest","description":"Edit an affiliate (any subset of the mutable fields).\n\nForbids extras so the kind, which is set at creation and never afterwards, is a 422 here rather than a 200\nthat changed nothing."},"AiSpendBreakdown_AiSpendModelBreakdownRow_":{"properties":{"scope":{"$ref":"#/components/schemas/SpendBreakdownScope"},"subtotal_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal Usd"},"rows":{"items":{"$ref":"#/components/schemas/AiSpendModelBreakdownRow"},"type":"array","title":"Rows"}},"type":"object","required":["scope","subtotal_usd","rows"],"title":"AiSpendBreakdown[AiSpendModelBreakdownRow]"},"AiSpendBreakdown_AiSpendOrganisationBreakdownRow_":{"properties":{"scope":{"$ref":"#/components/schemas/SpendBreakdownScope"},"subtotal_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal Usd"},"rows":{"items":{"$ref":"#/components/schemas/AiSpendOrganisationBreakdownRow"},"type":"array","title":"Rows"}},"type":"object","required":["scope","subtotal_usd","rows"],"title":"AiSpendBreakdown[AiSpendOrganisationBreakdownRow]"},"AiSpendBreakdown_AiSpendRegulatorBreakdownRow_":{"properties":{"scope":{"$ref":"#/components/schemas/SpendBreakdownScope"},"subtotal_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal Usd"},"rows":{"items":{"$ref":"#/components/schemas/AiSpendRegulatorBreakdownRow"},"type":"array","title":"Rows"}},"type":"object","required":["scope","subtotal_usd","rows"],"title":"AiSpendBreakdown[AiSpendRegulatorBreakdownRow]"},"AiSpendBreakdown_AiSpendSurfaceBreakdownRow_":{"properties":{"scope":{"$ref":"#/components/schemas/SpendBreakdownScope"},"subtotal_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal Usd"},"rows":{"items":{"$ref":"#/components/schemas/AiSpendSurfaceBreakdownRow"},"type":"array","title":"Rows"}},"type":"object","required":["scope","subtotal_usd","rows"],"title":"AiSpendBreakdown[AiSpendSurfaceBreakdownRow]"},"AiSpendDayPoint":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"tiers":{"items":{"$ref":"#/components/schemas/AiSpendTierSubtotal"},"type":"array","title":"Tiers"}},"type":"object","required":["day","tiers"],"title":"AiSpendDayPoint"},"AiSpendEdges":{"properties":{"accounting_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accounting Start"},"attempt_count":{"type":"integer","title":"Attempt Count"},"simulated_attempt_count":{"type":"integer","title":"Simulated Attempt Count"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens"},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens"},"unknown_token_count":{"type":"integer","title":"Unknown Token Count"},"estimated_token_count":{"type":"integer","title":"Estimated Token Count"},"unpriced":{"$ref":"#/components/schemas/AiSpendUnpriced"}},"type":"object","required":["accounting_start","attempt_count","simulated_attempt_count","input_tokens","output_tokens","cache_write_tokens","cache_read_tokens","unknown_token_count","estimated_token_count","unpriced"],"title":"AiSpendEdges","description":"The feature's own honest edges, as figures — `accounting_start` appears only here."},"AiSpendModelBreakdownRow":{"properties":{"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"operation":{"anyOf":[{"$ref":"#/components/schemas/SpendOperation"},{"type":"null"}]},"provider":{"$ref":"#/components/schemas/SpendProvider"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"},"attempt_count":{"type":"integer","title":"Attempt Count"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"}},"type":"object","required":["model_id","operation","provider","amount_usd","attempt_count","input_tokens","output_tokens"],"title":"AiSpendModelBreakdownRow","description":"One model on one kind of work. The pair is the row: a model choice is made per operation, so a\nper-model total alone is not a figure anybody can act on.\n\n`model_id` is null for a simulated attempt, which called no model; `operation` is null only for a\nday rolled up before the aggregate recorded it. Both absences are rendered as such rather than\ndropped, so the rows still add up to the period's total."},"AiSpendOrganisationBreakdownRow":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"organisation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organisation Name"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"}},"type":"object","required":["organisation_id","organisation_name","amount_usd"],"title":"AiSpendOrganisationBreakdownRow"},"AiSpendPeriodResponse":{"properties":{"month":{"type":"string","title":"Month"},"day_count":{"type":"integer","title":"Day Count"},"total_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Usd"},"daily_average_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Daily Average Usd"},"tiers":{"items":{"$ref":"#/components/schemas/AiSpendTierSubtotal"},"type":"array","title":"Tiers"},"daily":{"items":{"$ref":"#/components/schemas/AiSpendDayPoint"},"type":"array","title":"Daily"},"regulators":{"$ref":"#/components/schemas/AiSpendBreakdown_AiSpendRegulatorBreakdownRow_"},"organisations":{"$ref":"#/components/schemas/AiSpendBreakdown_AiSpendOrganisationBreakdownRow_"},"surfaces":{"$ref":"#/components/schemas/AiSpendBreakdown_AiSpendSurfaceBreakdownRow_"},"models":{"$ref":"#/components/schemas/AiSpendBreakdown_AiSpendModelBreakdownRow_"},"rates_in_force":{"items":{"$ref":"#/components/schemas/AiSpendRateInForce"},"type":"array","title":"Rates In Force"},"edges":{"$ref":"#/components/schemas/AiSpendEdges"}},"type":"object","required":["month","day_count","total_usd","daily_average_usd","tiers","daily","regulators","organisations","surfaces","models","rates_in_force","edges"],"title":"AiSpendPeriodResponse","description":"One calendar month's spend: totals, tiers, days, three breakdowns and the feature's own edges."},"AiSpendRateAmountUpdateRequest":{"properties":{"amount_usd":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount Usd"}},"type":"object","required":["amount_usd"],"title":"AiSpendRateAmountUpdateRequest","description":"`model_id`, `rate_kind` and `effective_from` are not editable — a different effective date is a\nnew rate, never a mutation of this one."},"AiSpendRateCreateRequest":{"properties":{"model_id":{"type":"string","title":"Model Id"},"rate_kind":{"$ref":"#/components/schemas/RateKind"},"unit":{"$ref":"#/components/schemas/RateUnit"},"amount_usd":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount Usd"},"effective_from":{"type":"string","format":"date","title":"Effective From"}},"type":"object","required":["model_id","rate_kind","unit","amount_usd","effective_from"],"title":"AiSpendRateCreateRequest"},"AiSpendRateInForce":{"properties":{"model_id":{"type":"string","title":"Model Id"},"rate_kind":{"$ref":"#/components/schemas/RateKind"},"unit":{"$ref":"#/components/schemas/RateUnit"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"},"effective_from":{"type":"string","format":"date","title":"Effective From"}},"type":"object","required":["model_id","rate_kind","unit","amount_usd","effective_from"],"title":"AiSpendRateInForce"},"AiSpendRateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model_id":{"type":"string","title":"Model Id"},"rate_kind":{"$ref":"#/components/schemas/RateKind"},"unit":{"$ref":"#/components/schemas/RateUnit"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"},"effective_from":{"type":"string","format":"date","title":"Effective From"}},"type":"object","required":["id","model_id","rate_kind","unit","amount_usd","effective_from"],"title":"AiSpendRateResponse","description":"One priced unit for one model."},"AiSpendRegulatorBreakdownRow":{"properties":{"regulator_id":{"type":"string","format":"uuid","title":"Regulator Id"},"regulator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Name"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"}},"type":"object","required":["regulator_id","regulator_name","source_id","source_name","amount_usd"],"title":"AiSpendRegulatorBreakdownRow"},"AiSpendSurfaceBreakdownRow":{"properties":{"surface":{"$ref":"#/components/schemas/SpendSurface"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"}},"type":"object","required":["surface","amount_usd"],"title":"AiSpendSurfaceBreakdownRow"},"AiSpendTierSubtotal":{"properties":{"tier":{"$ref":"#/components/schemas/SpendTier"},"amount_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Usd"}},"type":"object","required":["tier","amount_usd"],"title":"AiSpendTierSubtotal"},"AiSpendUnpriced":{"properties":{"record_count":{"type":"integer","title":"Record Count"},"model_ids":{"items":{"type":"string"},"type":"array","title":"Model Ids"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens"},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens"}},"type":"object","required":["record_count","model_ids","input_tokens","output_tokens","cache_write_tokens","cache_read_tokens"],"title":"AiSpendUnpriced","description":"What is made visible instead of a silent zero: a model with no rate in force."},"AnalyzeRequest":{"properties":{"url":{"type":"string","minLength":1,"title":"Url"}},"type":"object","required":["url"],"title":"AnalyzeRequest","description":"Run the analyzer on a candidate URL.\n\nThe URL is stripped because a pasted one carries whitespace and the two layers below disagreed about\nit: `urlparse` ignores a leading space, so the SSRF guard saw a valid https URL and passed, while the\nfetch service was handed the original string and refused it as not starting with a scheme. The\noperator then read \"could not fetch or parse that URL\" and went looking at the site."},"AnalyzerSignals":{"properties":{"html_bytes":{"type":"integer","title":"Html Bytes"},"rss_links":{"items":{"type":"string"},"type":"array","title":"Rss Links","default":[]},"js_framework_markers":{"items":{"type":"string"},"type":"array","title":"Js Framework Markers","default":[]},"visible_article_count":{"type":"integer","title":"Visible Article Count"},"response_time_ms":{"type":"integer","title":"Response Time Ms"},"page_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Template"},"page_second_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Second Index"}},"type":"object","required":["html_bytes","visible_article_count","response_time_ms"],"title":"AnalyzerSignals","description":"Deterministic page signals computed by code (never the LLM) and fed into the proposal."},"AskAssessmentReportCitation":{"properties":{"kind":{"type":"string","const":"assessment_report","title":"Kind","default":"assessment_report"},"marker":{"type":"integer","title":"Marker"},"report_id":{"type":"string","format":"uuid","title":"Report Id"},"title":{"type":"string","title":"Title"},"abbreviation":{"type":"string","title":"Abbreviation"}},"type":"object","required":["marker","report_id","title","abbreviation"],"title":"AskAssessmentReportCitation","description":"A resolved citation into an authority's assessment report, which opens on its own screen here.\n\nThe marker belongs to the `[An]` space."},"AskAuthorisedProductCitation":{"properties":{"kind":{"type":"string","const":"authorised_product","title":"Kind","default":"authorised_product"},"marker":{"type":"integer","title":"Marker"},"record_id":{"type":"string","format":"uuid","title":"Record Id"},"product_name":{"type":"string","title":"Product Name"},"abbreviation":{"type":"string","title":"Abbreviation"}},"type":"object","required":["marker","record_id","product_name","abbreviation"],"title":"AskAuthorisedProductCitation","description":"A resolved citation into a register of authorised products, which opens on the market overview.\n\nIts own kind rather than a register citation with a flag, because it opens a different panel and says\nsomething different: that a product is authorised, not that one was filed. The marker belongs to the\n`[Pn]` space."},"AskComparisonDocument":{"properties":{"label":{"type":"string","title":"Label"},"sha256":{"type":"string","title":"Sha256"}},"type":"object","required":["label","sha256"],"title":"AskComparisonDocument","description":"What identifies one version: its label and the digest of its bytes."},"AskComparisonDocuments":{"properties":{"first":{"$ref":"#/components/schemas/AskComparisonDocument"},"second":{"$ref":"#/components/schemas/AskComparisonDocument"}},"type":"object","required":["first","second"],"title":"AskComparisonDocuments"},"AskComparisonFinalEvent":{"properties":{"type":{"type":"string","const":"final","title":"Type","default":"final"},"answer":{"type":"string","title":"Answer"},"followups":{"items":{"type":"string"},"type":"array","title":"Followups"},"exchange_id":{"type":"string","format":"uuid","title":"Exchange Id"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"saved":{"type":"boolean","title":"Saved"},"comparison":{"anyOf":[{"$ref":"#/components/schemas/AskComparisonResult"},{"type":"null"}]},"document":{"anyOf":[{"$ref":"#/components/schemas/AskDocumentResult"},{"type":"null"}]}},"type":"object","required":["answer","followups","exchange_id","conversation_id","saved"],"title":"AskComparisonFinalEvent","description":"The one terminal success frame of a comparison or an opened document.\n\nIts turn is stored: `saved` is true by construction. Exactly one of `comparison` and `document` is present,\nby the run's kind."},"AskComparisonResult":{"properties":{"documents":{"$ref":"#/components/schemas/AskComparisonDocuments"},"stats":{"$ref":"#/components/schemas/ComparisonStats"},"hunks":{"items":{"$ref":"#/components/schemas/StoredHunk"},"type":"array","title":"Hunks"},"list_truncated":{"type":"boolean","title":"List Truncated"}},"type":"object","required":["documents","stats","hunks","list_truncated"],"title":"AskComparisonResult","description":"One comparison turn as a thread reads it."},"AskComparisonRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/AskComparisonRunSummary"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"AskComparisonRunListResponse"},"AskComparisonRunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/AskRunKind"},"status":{"type":"string","title":"Status"},"stage":{"anyOf":[{"$ref":"#/components/schemas/ComparisonStage"},{"type":"null"}]},"first_label":{"type":"string","title":"First Label"},"second_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Second Label"},"publication_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Publication Id"},"document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Document Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"first_pages_done":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Pages Done"},"first_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Pages Total"},"second_pages_done":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Second Pages Done"},"second_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Second Pages Total"}},"type":"object","required":["id","kind","status","stage","first_label","second_label","conversation_id","started_at"],"title":"AskComparisonRunSummary","description":"One comparison or opened document still in flight, for a reader who reloaded the page while it ran."},"AskComparisonStreamFrame":{"properties":{"progress":{"anyOf":[{"$ref":"#/components/schemas/AskProgressEvent"},{"type":"null"}]},"final":{"anyOf":[{"$ref":"#/components/schemas/AskComparisonFinalEvent"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/AskErrorEvent"},{"type":"null"}]}},"type":"object","title":"AskComparisonStreamFrame","description":"OpenAPI-only wrapper so the SPA generates a type for every frame of the comparison stream."},"AskConversationListResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/AskConversationSummary"},"type":"array","title":"Conversations"},"at_cap":{"type":"boolean","title":"At Cap"},"retention_days":{"type":"integer","title":"Retention Days"},"usage":{"$ref":"#/components/schemas/UsageAllowanceResponse"}},"type":"object","required":["conversations","at_cap","retention_days","usage"],"title":"AskConversationListResponse","description":"The reader's own conversations, newest first, capped — and what is left of today's questions."},"AskConversationRenameRequest":{"properties":{"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"AskConversationRenameRequest","description":"A rename. Blank or whitespace-only is refused by `normalise_title` and by the database `CHECK`."},"AskConversationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_active_at":{"type":"string","format":"date-time","title":"Last Active At"},"exchanges":{"items":{"$ref":"#/components/schemas/AskExchangeResponse"},"type":"array","title":"Exchanges"},"reader_office":{"$ref":"#/components/schemas/AskOffice"},"office_notice":{"anyOf":[{"$ref":"#/components/schemas/AskOfficeNotice"},{"type":"null"}]}},"type":"object","required":["id","title","created_at","last_active_at","exchanges","reader_office","office_notice"],"title":"AskConversationResponse","description":"One conversation in full: every exchange in order, as it was read."},"AskConversationSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_active_at":{"type":"string","format":"date-time","title":"Last Active At"},"exchange_count":{"type":"integer","title":"Exchange Count"}},"type":"object","required":["id","title","created_at","last_active_at","exchange_count"],"title":"AskConversationSummary","description":"One row of the reader's own list."},"AskDeltaEvent":{"properties":{"type":{"type":"string","const":"delta","title":"Type","default":"delta"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"AskDeltaEvent","description":"One increment of answer prose, released as the model produces it.\n\nSeveral arrive per answer and are concatenated in order. The FOLLOWUPS protocol line never appears\nin one, and neither does a citation or a follow-up: those are recovered from the whole text and\narrive on the terminal frame, which stays the authoritative answer."},"AskDocumentOpenRequest":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"}},"additionalProperties":false,"type":"object","required":["publication_id","document_id"],"title":"AskDocumentOpenRequest","description":"Which attached document to open: a publication and one of its documents, never an address."},"AskDocumentResult":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Total"},"chars_total":{"type":"integer","title":"Chars Total"},"chars_total_exact":{"type":"boolean","title":"Chars Total Exact"},"chars_kept":{"type":"integer","title":"Chars Kept"},"kept_share":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kept Share"},"text_cut":{"type":"boolean","title":"Text Cut"},"source":{"$ref":"#/components/schemas/DocumentTextSource"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"}},"type":"object","required":["publication_id","document_id","title","url","format","pages_total","chars_total","chars_total_exact","chars_kept","kept_share","text_cut","source","fetched_at"],"title":"AskDocumentResult","description":"One opened document as a thread reads it: what was read and how much of it questions see. Never the text."},"AskErrorEvent":{"properties":{"type":{"type":"string","const":"error","title":"Type","default":"error"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"refunded":{"type":"boolean","title":"Refunded","default":false},"allowance":{"anyOf":[{"$ref":"#/components/schemas/UsageAllowanceResponse"},{"type":"null"}]}},"type":"object","required":["code","message"],"title":"AskErrorEvent","description":"A terminal failure frame; the SPA surfaces it inline and the question stays re-askable."},"AskExchangeAnswer":{"properties":{"text":{"type":"string","title":"Text"},"answered_at":{"type":"string","format":"date-time","title":"Answered At"},"citations":{"items":{"anyOf":[{"$ref":"#/components/schemas/AskPublicationCitation"},{"$ref":"#/components/schemas/AskReferenceCitation"},{"$ref":"#/components/schemas/AskRegisterCitation"},{"$ref":"#/components/schemas/AskAuthorisedProductCitation"},{"$ref":"#/components/schemas/AskAssessmentReportCitation"}]},"type":"array","title":"Citations"},"followups":{"items":{"type":"string"},"type":"array","title":"Followups"},"impact":{"type":"boolean","title":"Impact"},"trend":{"type":"boolean","title":"Trend"},"grounding_count":{"type":"integer","title":"Grounding Count"},"simulated":{"type":"boolean","title":"Simulated"},"answered_for_entity_id":{"type":"string","format":"uuid","title":"Answered For Entity Id"},"answered_for_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered For Entity Name"}},"type":"object","required":["text","answered_at","citations","followups","impact","trend","grounding_count","simulated","answered_for_entity_id","answered_for_entity_name"],"title":"AskExchangeAnswer","description":"The stored, authoritative answer — exactly as it was shown, never re-resolved."},"AskExchangeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"seq":{"type":"integer","title":"Seq"},"question":{"type":"string","title":"Question"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"},"answer":{"anyOf":[{"$ref":"#/components/schemas/AskExchangeAnswer"},{"type":"null"}]},"comparison":{"anyOf":[{"$ref":"#/components/schemas/AskComparisonResult"},{"type":"null"}]},"document":{"anyOf":[{"$ref":"#/components/schemas/AskDocumentResult"},{"type":"null"}]}},"type":"object","required":["id","seq","question","asked_at","answer"],"title":"AskExchangeResponse","description":"One exchange as the thread reads it. `answer` is `null` for one still unanswered."},"AskFinalEvent":{"properties":{"type":{"type":"string","const":"final","title":"Type","default":"final"},"answer":{"type":"string","title":"Answer"},"citations":{"items":{"anyOf":[{"$ref":"#/components/schemas/AskPublicationCitation"},{"$ref":"#/components/schemas/AskReferenceCitation"},{"$ref":"#/components/schemas/AskRegisterCitation"},{"$ref":"#/components/schemas/AskAuthorisedProductCitation"},{"$ref":"#/components/schemas/AskAssessmentReportCitation"}]},"type":"array","title":"Citations"},"followups":{"items":{"type":"string"},"type":"array","title":"Followups"},"impact":{"type":"boolean","title":"Impact"},"trend":{"type":"boolean","title":"Trend"},"simulated":{"type":"boolean","title":"Simulated"},"grounding_count":{"type":"integer","title":"Grounding Count"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"exchange_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Exchange Id"},"saved":{"type":"boolean","title":"Saved","default":false}},"type":"object","required":["answer","citations","followups","impact","trend","simulated","grounding_count"],"title":"AskFinalEvent","description":"The one terminal success frame — the authoritative answer and its recovered structure."},"AskOffice":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["entity_id","name"],"title":"AskOffice","description":"The office a reader — or an exchange's answer — is attributed to."},"AskOfficeNotice":{"properties":{"answered_for_name":{"type":"string","title":"Answered For Name"},"reading_as_name":{"type":"string","title":"Reading As Name"}},"type":"object","required":["answered_for_name","reading_as_name"],"title":"AskOfficeNotice","description":"A statement, not a warning: the newest exchange was answered for a different office than this read."},"AskProgressEvent":{"properties":{"type":{"type":"string","const":"progress","title":"Type","default":"progress"},"stage":{"$ref":"#/components/schemas/ComparisonStage"},"first_pages_done":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Pages Done"},"first_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Pages Total"},"second_pages_done":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Second Pages Done"},"second_pages_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Second Pages Total"}},"type":"object","required":["stage"],"title":"AskProgressEvent","description":"The worker has moved on, or has read further. Each version's pages are those processed, or null when unknown."},"AskPublicationCitation":{"properties":{"kind":{"type":"string","const":"publication","title":"Kind","default":"publication"},"marker":{"type":"integer","title":"Marker"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title_en":{"type":"string","title":"Title En"},"abbreviation":{"type":"string","title":"Abbreviation"}},"type":"object","required":["marker","publication_id","title_en","abbreviation"],"title":"AskPublicationCitation","description":"A resolved citation into the corpus: the marker and the publication it points at."},"AskReferenceCitation":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"marker":{"type":"integer","title":"Marker"},"document_title":{"type":"string","title":"Document Title"},"abbreviation":{"type":"string","title":"Abbreviation"},"source_url":{"type":"string","title":"Source Url"}},"type":"object","required":["marker","document_title","abbreviation","source_url"],"title":"AskReferenceCitation","description":"A resolved citation into an authority's own guidance, which lives outside the platform.\n\nIt carries the authority's address rather than an identifier, because there is no screen here to\nlink to: the document is the authority's and the reader opens it there. The marker belongs to the\n`[Rn]` space and is not comparable with the publication marker above."},"AskRegisterCitation":{"properties":{"kind":{"type":"string","const":"register","title":"Kind","default":"register"},"marker":{"type":"integer","title":"Marker"},"record_id":{"type":"string","format":"uuid","title":"Record Id"},"product_name":{"type":"string","title":"Product Name"},"abbreviation":{"type":"string","title":"Abbreviation"}},"type":"object","required":["marker","record_id","product_name","abbreviation"],"title":"AskRegisterCitation","description":"A resolved citation into a product register: the marker and the register entry it points at.\n\nThe entry opens on the market overview, which is where the platform holds it; the register itself\npublishes no address per entry. The marker belongs to the `[Mn]` space."},"AskRequest":{"properties":{"question":{"type":"string","title":"Question"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"publication_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Publication Id"}},"type":"object","required":["question"],"title":"AskRequest","description":"A question, and which conversation it belongs to (absent for the first question of a new one)."},"AskResultRow":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"title":{"type":"string","title":"Title"},"last_active_at":{"type":"string","format":"date-time","title":"Last Active At"},"matched_in":{"$ref":"#/components/schemas/SearchMatchField"}},"type":"object","required":["conversation_id","title","last_active_at","matched_in"],"title":"AskResultRow","description":"One of the reader's OWN Ask conversations the term was found in.\n\nThe conversation rather than the exchange: a thread is what a reader reopens, and a term appearing in\nnine of its turns is still one place to go. No excerpt travels — a question and its answer are the\nreader's own words, and a search list is not where a transcript gets quoted back at them; `matched_in`\nsays which of the three texts fired, which is what they need to decide whether to open it."},"AskRunKind":{"type":"string","enum":["comparison","document"],"title":"AskRunKind","description":"What a run on the compare queue was started for.\n\nBoth take one `compare` slot, so they share one table, one in-flight rule and one stream; the kind says which\nrunner claims it and which product it leaves."},"AskStreamFrame":{"properties":{"delta":{"anyOf":[{"$ref":"#/components/schemas/AskDeltaEvent"},{"type":"null"}]},"final":{"anyOf":[{"$ref":"#/components/schemas/AskFinalEvent"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/AskErrorEvent"},{"type":"null"}]}},"type":"object","title":"AskStreamFrame","description":"OpenAPI-only wrapper so the SPA generates types for every frame payload (never returned as JSON)."},"AssessedRegulatorsResponse":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"assessed_regulators":{"items":{"type":"string"},"type":"array","title":"Assessed Regulators"},"regulators":{"items":{"$ref":"#/components/schemas/RegulatorOptionResponse"},"type":"array","title":"Regulators"}},"type":"object","required":["organisation_id","assessed_regulators","regulators"],"title":"AssessedRegulatorsResponse","description":"Which regulators one organisation's assessments cover, beside every regulator that could be chosen.\n\n`assessed_regulators` empty means every regulator is covered — the default, and today's behaviour."},"AssessedRegulatorsUpdateRequest":{"properties":{"assessed_regulators":{"items":{"type":"string"},"type":"array","title":"Assessed Regulators"}},"additionalProperties":false,"type":"object","required":["assessed_regulators"],"title":"AssessedRegulatorsUpdateRequest","description":"The full list of regulator slugs the organisation's assessments cover; empty covers every regulator."},"AssessmentAbsenceReason":{"type":"string","enum":["no_profile","outside_entity_scope","regulator_out_of_reach","source_history"],"title":"AssessmentAbsenceReason","description":"Why an office has no assessment of a publication that is nonetheless on its surface.\n\n    Four values, all states a surface must name rather than render as a blank, and all different facts:\n    `no_profile` is outstanding onboarding work somebody can close, while `outside_entity_scope` is the\n    office's own declaration working as intended. Neither may be filled with another office's assessment or\n    a fabricated score.\n\n`regulator_out_of_reach` is the third, and it exists for ONE surface: the per-office table on a\n    publication, where the head office is looking at every office at once. On a single-office surface the\n    state is unreachable — a publication whose regulator cannot reach that office is not on its surface at\n    all — which is why the reason arrived only when a screen started showing somebody else's office.\n\n    One the group's remit never admitted is no longer absent — the library renders it with\n    `ClearedReason.OUTSIDE_ORGANISATION_REMIT`, which is a decision about the whole organisation rather\n    than about this office, which is why it is not a member here."},"AssessmentAbsenceResponse":{"properties":{"reason":{"$ref":"#/components/schemas/AssessmentAbsenceReason"},"entity_name":{"type":"string","title":"Entity Name"},"can_be_closed_by":{"anyOf":[{"type":"string","const":"head_office"},{"type":"null"}],"title":"Can Be Closed By","default":"head_office"}},"type":"object","required":["reason","entity_name"],"title":"AssessmentAbsenceResponse","description":"Why this reader's office has no assessment of a publication on its surface.\n\n`no_profile` is onboarding somebody can close, `outside_entity_scope` is the office's own declaration\nworking, and `regulator_out_of_reach` (cross-office table only) is a national authority not binding that\noffice's country."},"AssessmentChannelSummary":{"properties":{"adapter":{"type":"string","title":"Adapter"},"report_type":{"$ref":"#/components/schemas/ReportType"},"language":{"type":"string","title":"Language"},"accept_pattern":{"type":"string","title":"Accept Pattern"},"coverage_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage Note"},"walk_pages_per_run":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Walk Pages Per Run"},"overview_declared":{"type":"boolean","title":"Overview Declared"},"documents_addressable":{"type":"boolean","title":"Documents Addressable"}},"type":"object","required":["adapter","report_type","language","accept_pattern","coverage_note","walk_pages_per_run","overview_declared","documents_addressable"],"title":"AssessmentChannelSummary","description":"An assessment-report channel's configuration as the operator's screens read it back.\n\nTyped rather than left in the raw `config` map, because the add-source form wrote these fields and\nthe detail screen has to show them back — including the coverage note, which is the one sentence on\nthat screen nobody but the operator could have written and which is therefore never computed.\n\nNull for every source of another kind. That absence is what the screen renders as \"this source is\nnot a channel\", rather than an empty panel that reads like a channel with nothing configured."},"AssessmentReportDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"report_type":{"$ref":"#/components/schemas/ReportType"},"report_type_label":{"type":"string","title":"Report Type Label"},"authority":{"$ref":"#/components/schemas/AuthorityRef"},"title":{"type":"string","title":"Title"},"language":{"type":"string","title":"Language"},"document_set":{"$ref":"#/components/schemas/DocumentSetResponse"},"channel":{"$ref":"#/components/schemas/ChannelRef"},"seen":{"type":"boolean","title":"Seen","default":false},"procedure_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procedure Type"},"procedure_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procedure Number"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"active_substance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Substance"},"holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"authorised_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorised At"},"source_reported_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Reported Updated At"},"summary":{"anyOf":[{"$ref":"#/components/schemas/ReportSummaryResponse"},{"type":"null"}]},"summary_absence":{"anyOf":[{"$ref":"#/components/schemas/SummaryAbsence"},{"type":"null"}]}},"type":"object","required":["id","report_type","report_type_label","authority","title","language","document_set","channel"],"title":"AssessmentReportDetail","description":"One report: its printed facts, documents, and exactly one of `summary` or `summary_absence`."},"AssessmentReportNote":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"body":{"type":"string","title":"Body"},"author_user_id":{"type":"string","format":"uuid","title":"Author User Id"},"author_name":{"type":"string","title":"Author Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"viewer_can_edit":{"type":"boolean","title":"Viewer Can Edit"}},"type":"object","required":["id","body","author_user_id","author_name","created_at","updated_at","viewer_can_edit"],"title":"AssessmentReportNote","description":"One colleague's note on a report, with who wrote it and whether this reader may change it.\n\n`viewer_can_edit` is the server's answer to \"is this reader the author\", sent so the screen holds no\nrule of its own about who may press Edit or Delete. An edited note is one whose `updated_at` has moved\npast `created_at`; the database sets both, so the screen compares them and stores no flag."},"AssessmentReportNoteRequest":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"AssessmentReportNoteRequest","description":"The text of a note, new or rewritten. Blank or oversized text is refused and stores nothing."},"AssessmentReportRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"report_type":{"$ref":"#/components/schemas/ReportType"},"authority":{"$ref":"#/components/schemas/AuthorityRef"},"title":{"type":"string","title":"Title"},"language":{"type":"string","title":"Language"},"document_count":{"type":"integer","title":"Document Count"},"summary_state":{"type":"string","enum":["written","not_attempted","failed"],"title":"Summary State"},"machine_translated":{"type":"boolean","title":"Machine Translated","default":false},"simulated":{"type":"boolean","title":"Simulated","default":false},"seen":{"type":"boolean","title":"Seen","default":false},"channel_holds_a_selection":{"type":"boolean","title":"Channel Holds A Selection","default":false},"procedure_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procedure Type"},"procedure_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procedure Number"},"holder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"active_substance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Substance"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"first_sentence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Sentence"},"document_set_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Document Set Changed At"}},"type":"object","required":["id","report_type","authority","title","language","document_count","summary_state"],"title":"AssessmentReportRow","description":"One report as the list renders it — never with a score, criticality, office or cost.\n\nA field for one would be the first step towards scoring an authority's own reasoning for one customer."},"AssignableMember":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["user_id","name"],"title":"AssignableMember","description":"One person the assignee picker may offer: the id to assign and the name to show — nothing more.\n\nDeliberately not the team roster row: no email, no role, no account status. Assignment needs a person\nto pick; everything else about them is team administration, which stays behind its own gate."},"AssignableMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/AssignableMember"},"type":"array","title":"Members"},"max_assignees":{"type":"integer","title":"Max Assignees"}},"type":"object","required":["members","max_assignees"],"title":"AssignableMembersResponse","description":"The organisation's assignable people, name-ordered — readable by every member, unlike the roster.\n\n`max_assignees` is the server's cap on people per workflow, carried here so every picker reads the one\nnumber the assign path enforces instead of keeping its own copy (the screen once said three while the\nserver allowed ten)."},"AssignmentRole":{"type":"string","enum":["owner","reviewer","contributor"],"title":"AssignmentRole","description":"Who a person is on ONE workflow — workflow-local, and unrelated to the tenancy `Role`.\n\nNever derived from and never compared with `Role`: an HQ administrator may be a workflow's\ncontributor, and an affiliate member may be its reviewer. Only one of these values carries a\nplatform consequence — an assigned `reviewer` is what a gated workflow needs before it can be\ncompleted."},"AttachedDocumentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"format":{"anyOf":[{"$ref":"#/components/schemas/DocumentFormat"},{"type":"null"}]},"text_status":{"anyOf":[{"$ref":"#/components/schemas/AttachedTextStatus"},{"type":"null"}]},"text_truncated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Text Truncated"}},"type":"object","required":["id","title","url","format","text_status","text_truncated"],"title":"AttachedDocumentResponse","description":"One document the publication's page links to; `format` is null where the address names none."},"AttachedDocumentTextResponse":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"text":{"type":"string","title":"Text"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["title","url","text","truncated"],"title":"AttachedDocumentTextResponse","description":"One attached document's own words as the shared reader recovered them. No model wrote any of it."},"AttachedTextStatus":{"type":"string","enum":["read","unreadable","too_large","unavailable","archive"],"title":"AttachedTextStatus","description":"How reading one attached document ended. Stored; `None` on the row means it was never attempted."},"AttentionQueueItem":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"amended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Amended At"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"regulator_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Country"},"language":{"type":"string","title":"Language"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"relevance":{"type":"number","title":"Relevance"},"applies_in":{"items":{"$ref":"#/components/schemas/EntityFlagResponse"},"type":"array","title":"Applies In"},"critical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critical"},"recommended_action":{"anyOf":[{"$ref":"#/components/schemas/RecommendedActionRef"},{"type":"null"}]},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["publication_id","title","published_at","amended_at","effective_at","regulator_abbreviation","regulator_country","language","severity","summary","relevance","applies_in","critical","recommended_action","simulated"],"title":"AttentionQueueItem","description":"One publication this office has not started work on, with the assessment it already holds.\n\nDeliberately carries no absence: this queue's population is the assessments the reader's own office holds\nabove the relevance threshold, so every row here has one. A publication with no assessment for this office\nis not a queue row with a blank in it — it is not queue work at all."},"AttentionQueueResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttentionQueueItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AttentionQueueResponse","description":"The work queue: at most five, most relevant first, none of them already claimed by a workflow.\n\nAn empty list is a real answer — an organisation with nothing above the relevance threshold, or with\nevery such publication already in a case file. A read that cannot complete raises instead."},"AuditEntryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"event_type":{"type":"string","title":"Event Type"},"item_type":{"anyOf":[{"$ref":"#/components/schemas/AuditItemType"},{"type":"null"}]},"actor_name":{"type":"string","title":"Actor Name"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Title"},"obligation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obligation Code"},"obligation_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obligation Title"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee Name"},"publication_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Publication Id"},"publication_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publication Title"},"office_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Name"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"type":"object","required":["id","occurred_at","event_type","item_type","actor_name","workflow_id","workflow_title","obligation_code","obligation_title","assignee_name","publication_id","publication_title","office_name","detail"],"title":"AuditEntryResponse","description":"One recorded action, as a row of the trail reads it."},"AuditItemType":{"type":"string","enum":["workflow","publication","triage","escalation","entity","obligation","assessment_report"],"title":"AuditItemType","description":"What kind of thing an audit entry concerns, as a reviewer narrows a trail by it.\n\nOne value per question a reviewer actually asks: what happened on this case file, what an\naffiliate decided, what was escalated, what was done to a publication, how the group's own offices\nwere defined, and what colleagues wrote on an authority's assessment report. A push is filed under\n`publication` rather than under `triage` because \"what happened to this publication\" is a different\nquestion from \"what did triage decide\" — the mined navigation separated the two, and two chips whose\nsets overlap cannot narrow anything, which is exactly what filing a push under both would produce.\n\n`entity` covers an office being created or edited and its profile being written. Those mutations are\ngovernance rather than casework: an office's profile decides what its members are assessed against, so\n\"who changed the basis of that team's feed, and when\" has to be a question the trail can answer on its\nown.\n\nDerived from an entry's event type rather than stored: the type is immutable, while the subject columns\nare cleared when their subject goes, which would silently reclassify a row."},"AuditPackFormat":{"type":"string","enum":["csv","pdf"],"title":"AuditPackFormat","description":"The file formats an audit pack is asked for in. Only CSV is rendered today."},"AuthorisedProductDetailResponse":{"properties":{"product":{"$ref":"#/components/schemas/AuthorisedProductRowResponse"},"standard_fields":{"items":{"$ref":"#/components/schemas/RegisterFieldResponse"},"type":"array","title":"Standard Fields"},"register_fields":{"items":{"$ref":"#/components/schemas/RegisterFieldResponse"},"type":"array","title":"Register Fields"},"source":{"$ref":"#/components/schemas/RecordSourceResponse"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"translation_simulated":{"type":"boolean","title":"Translation Simulated"}},"type":"object","required":["product","standard_fields","register_fields","source","language","translation_simulated"],"title":"AuthorisedProductDetailResponse","description":"One authorised product in full: the standard fields every register is shown with, then its own.\n\n`standard_fields` carries the same fields in the same order for every register, under English labels,\nleaving out the ones this register does not publish. `register_fields` is everything else the register\nprinted, under its own labels. Both carry the English beside the original where one is held."},"AuthorisedProductRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"type":"string","title":"External Id"},"product_name":{"type":"string","title":"Product Name"},"inn":{"type":"string","title":"Inn"},"inn_key":{"type":"string","title":"Inn Key"},"active_substance":{"type":"string","title":"Active Substance"},"strength":{"type":"string","title":"Strength"},"pharmaceutical_form":{"type":"string","title":"Pharmaceutical Form"},"holder_name":{"type":"string","title":"Holder Name"},"holder_key":{"type":"string","title":"Holder Key"},"authorisation_number":{"type":"string","title":"Authorisation Number"},"authorised_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorised At"},"authorisation_status":{"type":"string","title":"Authorisation Status"},"procedure":{"type":"string","title":"Procedure"},"atc_code":{"type":"string","title":"Atc Code"},"product_url":{"type":"string","title":"Product Url"},"authorisation_status_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorisation Status En"},"procedure_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Procedure En"},"pharmaceutical_form_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmaceutical Form En"},"product_name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name En"},"holder_name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Holder Name En"},"listing_state":{"$ref":"#/components/schemas/ListingState"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"market_codes":{"items":{"type":"string"},"type":"array","title":"Market Codes"},"register_abbreviation":{"type":"string","title":"Register Abbreviation"},"our_product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Our Product"}},"type":"object","required":["id","external_id","product_name","inn","inn_key","active_substance","strength","pharmaceutical_form","holder_name","holder_key","authorisation_number","authorised_at","authorisation_status","procedure","atc_code","product_url","listing_state","checked_at","market_codes","register_abbreviation"],"title":"AuthorisedProductRowResponse","description":"One authorised product as the board renders it, every field as its register printed it.\n\nA separate shape from the application row on purpose: an authorisation has no reference product,\nno queue position and no filing date, and an application has no grant number, status or ATC code.\nOne shape carrying both sets would put a column of empties beside every row of either kind.\n\nEmpty strings and nulls are the register's absences and are rendered as such -- a register that\nprints no status is not a register saying \"authorised\", and the screen never says otherwise."},"AuthorityRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["id","name"],"title":"AuthorityRef","description":"The authority that published a report, as every surface here names it."},"BacklogOrder":{"type":"string","enum":["recently_updated","recently_raised","urgency"],"title":"BacklogOrder","description":"Which of a case file's two moments the list is read by."},"BacktestEntry":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector Id"},"sector_label":{"type":"string","title":"Sector Label"},"source":{"type":"string","title":"Source"},"regulator_count":{"type":"integer","title":"Regulator Count"},"publication_count":{"type":"integer","title":"Publication Count"}},"type":"object","required":["id","name","sector_id","sector_label","source","regulator_count","publication_count"],"title":"BacktestEntry","description":"One selectable replay in the picker."},"BacktestReplayResponse":{"properties":{"theme_id":{"type":"string","title":"Theme Id"},"theme_name":{"type":"string","title":"Theme Name"},"sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector Id"},"sector_label":{"type":"string","title":"Sector Label"},"source":{"type":"string","title":"Source"},"publication_count":{"type":"integer","title":"Publication Count"},"regulator_count":{"type":"integer","title":"Regulator Count"},"span_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Span Start"},"span_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Span End"},"first_signal":{"anyOf":[{"$ref":"#/components/schemas/ReplayFirstSignal"},{"type":"null"}]},"consensus":{"anyOf":[{"$ref":"#/components/schemas/ReplayConsensus"},{"type":"null"}]},"lead_time_weeks":{"type":"integer","title":"Lead Time Weeks"},"lead_time_label":{"type":"string","title":"Lead Time Label"},"consensus_lead_weeks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Consensus Lead Weeks"},"post_consensus_weeks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Post Consensus Weeks"},"series":{"items":{"$ref":"#/components/schemas/ReplaySignalPoint"},"type":"array","title":"Series"},"tracks":{"items":{"$ref":"#/components/schemas/ReplayTrack"},"type":"array","title":"Tracks"},"events":{"items":{"$ref":"#/components/schemas/ReplayEventResponse"},"type":"array","title":"Events"}},"type":"object","required":["theme_id","theme_name","sector_id","sector_label","source","publication_count","regulator_count","span_start","span_end","first_signal","consensus","lead_time_weeks","lead_time_label","consensus_lead_weeks","post_consensus_weeks","series","tracks","events"],"title":"BacktestReplayResponse","description":"One theme replayed over history. Computed live; persisted nowhere."},"BacktestThemeListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/BacktestEntry"},"type":"array","title":"Entries"}},"type":"object","required":["entries"],"title":"BacktestThemeListResponse","description":"The picker's offer list — empty is the honest \"nothing eligible\" state that hides the picker."},"Body_compare_versions_api_v1_ask_compare_post":{"properties":{"first":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"First"},"second":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Second"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","title":"Body_compare_versions_api_v1_ask_compare_post"},"Body_extract_product_api_v1_gap_analysis_product_post":{"properties":{"files":{"anyOf":[{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array"},{"type":"null"}],"title":"Files"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"Body_extract_product_api_v1_gap_analysis_product_post"},"Body_import_documents_api_v1_controls_import_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_import_documents_api_v1_controls_import_post"},"BookmarkGroupResponse":{"properties":{"visibility":{"$ref":"#/components/schemas/VisibilityScope"},"count":{"type":"integer","title":"Count"},"bookmarks":{"items":{"$ref":"#/components/schemas/BookmarkResponse"},"type":"array","title":"Bookmarks"}},"type":"object","required":["visibility","count","bookmarks"],"title":"BookmarkGroupResponse","description":"One scope's section of the panel. Only non-empty groups are carried."},"BookmarkListResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/BookmarkGroupResponse"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["groups","total"],"title":"BookmarkListResponse","description":"The whole panel. `total` of zero is the panel's own empty state, never a stand-in for an outage."},"BookmarkPublicationRef":{"properties":{"available":{"type":"boolean","title":"Available"},"title_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title En"},"regulator_abbreviation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Abbreviation"},"published_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Published At"}},"type":"object","required":["available","title_en","regulator_abbreviation","published_at"],"title":"BookmarkPublicationRef","description":"What a bookmark row says about its publication, or that it could no longer be resolved.\n\nAn unresolvable publication leaves the row listed and counted with `available` false and the rest\nnull. A degraded row is a data anomaly about one flag — deliberately not a failed read, which raises."},"BookmarkResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"visibility":{"$ref":"#/components/schemas/VisibilityScope"},"status":{"$ref":"#/components/schemas/BookmarkStatus"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"is_own":{"type":"boolean","title":"Is Own"},"publication":{"$ref":"#/components/schemas/BookmarkPublicationRef"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","publication_id","visibility","status","note","created_by_name","is_own","publication","created_at"],"title":"BookmarkResponse","description":"One flag as both the panel and the flag control read it."},"BookmarkStateResponse":{"properties":{"visibility":{"$ref":"#/components/schemas/VisibilityScope"},"status":{"$ref":"#/components/schemas/BookmarkStatus"},"is_own":{"type":"boolean","title":"Is Own"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","required":["visibility","status","is_own"],"title":"BookmarkStateResponse","description":"The flag one library row shows, resolved by the own-first-else-widest rule."},"BookmarkStatus":{"type":"string","enum":["open","cleared"],"title":"BookmarkStatus","description":"Whether a flagged publication still needs attention, or has been dealt with.\n\n`cleared` is a disposition, not a deletion: the row stays listed (struck through) because \"we handled\nthis\" is part of the record. Retracting a flag entirely is a separate act by its owner."},"BookmarkStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/BookmarkStatus"}},"type":"object","required":["status"],"title":"BookmarkStatusRequest","description":"Clearing a flag, or reopening it. Owner only, enforced server-side."},"BookmarkWriteRequest":{"properties":{"visibility":{"$ref":"#/components/schemas/VisibilityScope","default":"personal"},"status":{"$ref":"#/components/schemas/BookmarkStatus","default":"open"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"BookmarkWriteRequest","description":"Flagging a publication, or re-flagging one already flagged: the same request either way."},"BriefAffiliateLine":{"properties":{"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"line":{"type":"string","title":"Line"},"attention":{"type":"boolean","title":"Attention"}},"type":"object","required":["name","country","line","attention"],"title":"BriefAffiliateLine","description":"One affiliate's line on the accountability strip, and whether it needs looking at."},"BriefCoverage":{"properties":{"sector":{"type":"string","title":"Sector"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["sector","label","count"],"title":"BriefCoverage","description":"How much of the visible corpus sits in one sector, busiest first."},"BriefHeadline":{"properties":{"tracked":{"type":"integer","title":"Tracked"},"tracked_capped":{"type":"boolean","title":"Tracked Capped"},"new_last_30_days":{"type":"integer","title":"New Last 30 Days"},"high_relevance":{"type":"integer","title":"High Relevance"},"emerging_themes":{"type":"integer","title":"Emerging Themes"}},"type":"object","required":["tracked","tracked_capped","new_last_30_days","high_relevance","emerging_themes"],"title":"BriefHeadline","description":"The four figures every other section only ever restates."},"BriefHighlight":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"country":{"type":"string","title":"Country"},"published_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Published At"},"relevance":{"type":"number","title":"Relevance"},"one_line":{"type":"string","title":"One Line"}},"type":"object","required":["id","title","regulator_abbreviation","country","published_at","relevance","one_line"],"title":"BriefHighlight","description":"One high-relevance publication, highest relevance first."},"BriefImpactLine":{"properties":{"title":{"type":"string","title":"Title"},"impact":{"type":"string","title":"Impact"}},"type":"object","required":["title","impact"],"title":"BriefImpactLine","description":"One organisational-impact line: what it is, and what it means."},"BriefResponse":{"properties":{"organisation_name":{"type":"string","title":"Organisation Name"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"headline":{"$ref":"#/components/schemas/BriefHeadline"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"themes":{"items":{"$ref":"#/components/schemas/BriefTheme"},"type":"array","title":"Themes"},"highlights":{"items":{"$ref":"#/components/schemas/BriefHighlight"},"type":"array","title":"Highlights"},"impact":{"items":{"$ref":"#/components/schemas/BriefImpactLine"},"type":"array","title":"Impact"},"workflow":{"$ref":"#/components/schemas/BriefWorkflow"},"coverage":{"items":{"$ref":"#/components/schemas/BriefCoverage"},"type":"array","title":"Coverage"}},"type":"object","required":["organisation_name","generated_at","headline","summary","themes","highlights","impact","workflow","coverage"],"title":"BriefResponse","description":"One assembled snapshot, computed on demand and identical for all four member roles."},"BriefTheme":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"horizon":{"$ref":"#/components/schemas/ThemeHorizon"},"horizon_label":{"type":"string","title":"Horizon Label"},"regulator_count":{"type":"integer","title":"Regulator Count"},"regulators":{"items":{"type":"string"},"type":"array","title":"Regulators"},"velocity":{"$ref":"#/components/schemas/ThemeVelocity"},"signal":{"type":"integer","title":"Signal"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["id","name","horizon","horizon_label","regulator_count","regulators","velocity","signal","summary"],"title":"BriefTheme","description":"One emerging theme, read through the same visible-theme composition the radar screen uses."},"BriefWorkflow":{"properties":{"open":{"type":"integer","title":"Open"},"overdue":{"type":"integer","title":"Overdue"},"high_urgency":{"type":"integer","title":"High Urgency"},"median_days_pending":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Days Pending"},"completed":{"type":"integer","title":"Completed"},"affiliates":{"items":{"$ref":"#/components/schemas/BriefAffiliateLine"},"type":"array","title":"Affiliates"}},"type":"object","required":["open","overdue","high_urgency","median_days_pending","completed","affiliates"],"title":"BriefWorkflow","description":"The accountability strip.\n\nEvery figure is read from the accountability screen's own aggregation, so a figure here and the same\nfigure there are one computation read twice rather than two computations that agree. `median_days_pending`\nis null for an organisation with no pending work — a real answer rather than a zero anyone earned."},"BulkAssignFormRequest":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Publication Ids"}},"type":"object","required":["publication_ids"],"title":"BulkAssignFormRequest","description":"The publications the assign sheet opens with — the explicit selection, never a query to re-run."},"BulkAssignFormResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/BulkAssignFormRow"},"type":"array","title":"Rows"},"default_priority":{"$ref":"#/components/schemas/Priority"},"members":{"items":{"$ref":"#/components/schemas/ActionFormMember"},"type":"array","title":"Members"},"offices":{"items":{"$ref":"#/components/schemas/ActionFormOffice"},"type":"array","title":"Offices"},"reader_office_id":{"type":"string","format":"uuid","title":"Reader Office Id"},"can_assign_any_office":{"type":"boolean","title":"Can Assign Any Office"},"signs_off_by_default":{"$ref":"#/components/schemas/ActionFormPerson"},"max_rows":{"type":"integer","title":"Max Rows"}},"type":"object","required":["rows","default_priority","members","offices","reader_office_id","can_assign_any_office","signs_off_by_default","max_rows"],"title":"BulkAssignFormResponse","description":"The assign sheet's pre-fill: one row per selected publication, in the order given, and the owner picker.\n\n`members` is the Action form's picker in the same order (most often assigned first), already narrowed to\nthe reader's office unless they may assign across offices; `offices` names the offices those members are\nin, for \"Group by Office\". `signs_off_by_default` is the reader, who signs off unless a business owner is\nchosen."},"BulkAssignFormRow":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"regulator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator"},"suggestions":{"$ref":"#/components/schemas/BulkAssignSuggestions"}},"type":"object","required":["publication_id","title","regulator","suggestions"],"title":"BulkAssignFormRow","description":"One row of the assign sheet before anybody chooses anything."},"BulkAssignRequest":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/BulkAssignRow"},"type":"array","maxItems":500,"minItems":1,"title":"Rows"},"notify_once":{"type":"boolean","title":"Notify Once","default":true},"business_owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Business Owner User Id"}},"type":"object","required":["rows"],"title":"BulkAssignRequest","description":"Create one action per publication in one confirm.\n\n`notify_once` (the default) mails each owner one message listing all their new actions; off, each action\nsends its own assignment email. `business_owner_user_id` names who signs every one of these actions off;\nnull means the person running the sheet does (decided 8 Oct 2026)."},"BulkAssignResponse":{"properties":{"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"actions":{"items":{"$ref":"#/components/schemas/BulkAssignedAction"},"type":"array","title":"Actions"},"people":{"type":"integer","title":"People"},"emails":{"type":"integer","title":"Emails"}},"type":"object","required":["batch_id","actions","people","emails"],"title":"BulkAssignResponse","description":"What one confirm created: the batch Undo withdraws, each action, and the summary the toast states.\n\n`people` is how many different owners; `emails` how many messages actually go out — one per owner with\n`notify_once`, one per action without it, never counting the person who ran it, and zero while the\ndeployment's notifications are switched off."},"BulkAssignRow":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Title"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due_date_source":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Due Date Source"},"priority":{"$ref":"#/components/schemas/Priority","default":"medium"},"suggestion_acceptance":{"$ref":"#/components/schemas/SuggestionAcceptanceRequest"}},"type":"object","required":["publication_id","owner_user_id"],"title":"BulkAssignRow","description":"One sheet row as confirmed: one action on one publication, with the owner the person chose.\n\n`title` defaults to the publication's own; `suggestion_acceptance` says what the person did with the\npre-filled due date and priority, recorded on the action's history like the Action form's."},"BulkAssignSuggestions":{"properties":{"due":{"anyOf":[{"$ref":"#/components/schemas/DueDateSuggestion"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/Priority"},{"type":"null"}]}},"type":"object","required":["due","priority"],"title":"BulkAssignSuggestions","description":"What one sheet row pre-fills and marks as suggested: the due date and the priority. Never the owner."},"BulkAssignUndoItem":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"decision":{"$ref":"#/components/schemas/BulkAssignUndoOutcome"}},"type":"object","required":["publication_id","action_id","decision"],"title":"BulkAssignUndoItem","description":"What undoing the batch did with one publication: its action withdrawn, and its decision."},"BulkAssignUndoOutcome":{"type":"string","enum":["restored","cleared","kept"],"title":"BulkAssignUndoOutcome","description":"What undoing a bulk assign did with one publication's decision, once its action was withdrawn."},"BulkAssignUndoResponse":{"properties":{"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"withdrawn":{"type":"integer","title":"Withdrawn"},"results":{"items":{"$ref":"#/components/schemas/BulkAssignUndoItem"},"type":"array","title":"Results"}},"type":"object","required":["batch_id","withdrawn","results"],"title":"BulkAssignUndoResponse","description":"Every action of the batch withdrawn, and per publication what happened to the office's decision."},"BulkAssignedAction":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_name":{"type":"string","title":"Owner Name"}},"type":"object","required":["publication_id","action_id","owner_user_id","owner_name"],"title":"BulkAssignedAction","description":"One action the sheet created."},"BulkDecisionItemResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"outcome":{"$ref":"#/components/schemas/BulkDecisionOutcome"},"decision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Decision Id"}},"type":"object","required":["publication_id","outcome","decision_id"],"title":"BulkDecisionItemResponse","description":"What the bulk decision did with one publication; `decision_id` only when it wrote one."},"BulkDecisionOutcome":{"type":"string","enum":["decided","unchanged","in_action"],"title":"BulkDecisionOutcome","description":"What a bulk decision did with one publication."},"BulkDecisionRequest":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Publication Ids"},"status":{"$ref":"#/components/schemas/DecisionStatus"},"reason":{"anyOf":[{"$ref":"#/components/schemas/NotRelevantReason"},{"type":"null"}]},"reason_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason Note"},"decided_for_all":{"type":"boolean","title":"Decided For All","default":false}},"additionalProperties":false,"type":"object","required":["publication_ids","status"],"title":"BulkDecisionRequest","description":"One Not relevant or For information for many publications at once (RAD-119), with one optional reason.\n\nHanded its selection as identifiers — the rows the reader ticked, or every row \"Select all N in this view\"\nresolved — never a query to re-run, so it can only touch what was selected. At most `BULK_DECISION_LIMIT`\n(500, the list's selection bound): more is a 422, never a trim. The office is the reader's own, or head\noffice for all offices with `decided_for_all` (HQ roles only) — the decision box's own default. `action`\nis refused: an action needs its owner, so it is only ever created through the assign sheet."},"BulkDecisionResponse":{"properties":{"batch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id"},"status":{"$ref":"#/components/schemas/DecisionStatus"},"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"decided_for_all":{"type":"boolean","title":"Decided For All"},"decided":{"type":"integer","title":"Decided"},"results":{"items":{"$ref":"#/components/schemas/BulkDecisionItemResponse"},"type":"array","title":"Results"}},"type":"object","required":["batch_id","status","affiliate_id","decided_for_all","decided","results"],"title":"BulkDecisionResponse","description":"The batch, and one result per publication in the order given.\n\n`batch_id` is what Undo reverses; null when nothing was written (every publication already said this, or\nis in action), because there is then nothing to undo."},"BulkUndoItemResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"outcome":{"$ref":"#/components/schemas/BulkUndoOutcome"}},"type":"object","required":["publication_id","outcome"],"title":"BulkUndoItemResponse","description":"What undoing the batch did with one publication."},"BulkUndoOutcome":{"type":"string","enum":["restored","cleared","changed_since"],"title":"BulkUndoOutcome","description":"What undoing a batch did with one publication."},"BulkUndoResponse":{"properties":{"batch_id":{"type":"string","format":"uuid","title":"Batch Id"},"reversed":{"type":"integer","title":"Reversed"},"changed_since":{"type":"integer","title":"Changed Since"},"results":{"items":{"$ref":"#/components/schemas/BulkUndoItemResponse"},"type":"array","title":"Results"}},"type":"object","required":["batch_id","reversed","changed_since","results"],"title":"BulkUndoResponse","description":"The batch undone, with one result per publication it had decided.\n\nA publication whose decision changed after the batch — decided again, reopened, brought back, turned into\nan action — is `changed_since` and left exactly as it is."},"CalibrationBandResponse":{"properties":{"lower":{"type":"string","title":"Lower"},"upper":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upper"},"kept":{"type":"integer","title":"Kept"},"discarded":{"type":"integer","title":"Discarded"}},"type":"object","required":["lower","upper","kept","discarded"],"title":"CalibrationBandResponse","description":"One score band, and how the people who read it ruled.\n\n`upper` is null on the top band, which is open-ended: the score is capped at 1 and writing the cap\nhere would invite a reader to think something could sit above it."},"CallerReference":{"type":"string","enum":["me"],"title":"CallerReference","description":"A list filter's way of saying \"the person asking\", which is the only person it names.\n\nThe question these filters answer is \"what is mine\", so they take no user id: `me` is resolved from\nthe verified token on the server, and the URL a reader shares means \"the reader's own\" for whoever\nopens it rather than one named colleague's."},"ChangeClass":{"type":"string","enum":["substantive","punctuation","hyphenation","spelling","renumber","fragment","reorder","moved","case","link"],"title":"ChangeClass"},"ChannelRef":{"properties":{"name":{"type":"string","title":"Name"},"coverage_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coverage Note"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"last_checked_at":{"type":"string","format":"date-time","title":"Last Checked At"},"health":{"type":"string","title":"Health"}},"type":"object","required":["name","first_seen_at","last_checked_at","health"],"title":"ChannelRef","description":"The channel this report came from, as the report page names it."},"CitationResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["publication_id","label"],"title":"CitationResponse","description":"A source link the reader can open. Present only when the publication is in that side's window."},"ClassCount":{"properties":{"change_class":{"$ref":"#/components/schemas/ChangeClass"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["change_class","count"],"title":"ClassCount"},"ClearedReason":{"type":"string","enum":["outside_organisation_remit","no_profile","outside_entity_scope","below_threshold","source_history"],"title":"ClearedReason","description":"Why a publication on the library did not reach the Dashboard for this reader.\n\nFour stages, and the vocabulary is wider than `AssessmentAbsenceReason` rather than replacing it:\nthat enum keeps its exact two values and its head-office ownership, and two of these are produced\nfrom it. A reader who sees `no_profile` sees the same fact it has always meant.\n\n`OUTSIDE_ORGANISATION_REMIT` is the one this feature exists for. It was previously not a state any\nsurface could show, because such a publication was absent from the library altogether."},"ClearedReasonOwner":{"type":"string","enum":["group","head_office","assessing_office"],"title":"ClearedReasonOwner","description":"Who can act on a cleared row, so a reader is sent to the right person rather than guessing.\n\nThe three differ by whose decision produced the row: the group declares the remit, the head office\nwrites profiles and widens an office's scope, and the office that wrote an assessment is the one\nthat can revisit its own judgement."},"ClearedReasonResponse":{"properties":{"reason":{"$ref":"#/components/schemas/ClearedReason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"can_be_closed_by":{"anyOf":[{"$ref":"#/components/schemas/ClearedReasonOwner"},{"type":"null"}]}},"type":"object","required":["reason","can_be_closed_by"],"title":"ClearedReasonResponse","description":"Why one row did not reach the Dashboard for this reader, and who can act on it.\n\nWider than `AssessmentAbsenceResponse`, not a replacement: it adds the group's remit and a below-threshold\njudgement to the two office-level reasons."},"ComparisonMarketResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"abbreviation":{"type":"string","title":"Abbreviation"},"country":{"type":"string","title":"Country"},"country_code":{"type":"string","title":"Country Code"}},"type":"object","required":["id","abbreviation","country","country_code"],"title":"ComparisonMarketResponse","description":"One side's identity for the direction headline and the table's column heading."},"ComparisonMarketsResponse":{"properties":{"markets":{"items":{"$ref":"#/components/schemas/MarketOptionResponse"},"type":"array","title":"Markets"},"comparable":{"type":"boolean","title":"Comparable"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["markets","comparable","reason"],"title":"ComparisonMarketsResponse","description":"The dropdown list, exclusion-subtracted, plus why a comparison cannot run when it cannot."},"ComparisonRowResponse":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"requirement":{"type":"string","title":"Requirement"},"home_note":{"type":"string","title":"Home Note"},"target_note":{"type":"string","title":"Target Note"},"verdict":{"$ref":"#/components/schemas/ComparisonVerdict"},"incremental_action":{"type":"string","title":"Incremental Action"},"home_citation":{"anyOf":[{"$ref":"#/components/schemas/CitationResponse"},{"type":"null"}]},"target_citation":{"anyOf":[{"$ref":"#/components/schemas/CitationResponse"},{"type":"null"}]}},"type":"object","required":["id","category","requirement","home_note","target_note","verdict","incremental_action","home_citation","target_citation"],"title":"ComparisonRowResponse","description":"One checklist requirement across the pair, with at most one citation per side."},"ComparisonStage":{"type":"string","enum":["downloading","reading","comparing","reading_first","reading_second"],"title":"ComparisonStage","description":"What the worker is doing now. Named for the work in progress, as the import's stages are."},"ComparisonStats":{"properties":{"total_changes":{"type":"integer","title":"Total Changes"},"by_class":{"items":{"$ref":"#/components/schemas/ClassCount"},"type":"array","title":"By Class"},"changed_word_share":{"type":"number","title":"Changed Word Share"},"rewritten":{"type":"boolean","title":"Rewritten"},"total_words":{"type":"integer","title":"Total Words"}},"type":"object","required":["total_changes","by_class","changed_word_share","rewritten","total_words"],"title":"ComparisonStats","description":"The figures over the WHOLE diff, counted before the stored list is capped.\n\nSo a truncated list still states how many changes there were: the cap bounds the rows kept and never a\nnumber a reader is shown."},"ComparisonVerdict":{"type":"string","enum":["new","stricter","aligned","lighter","unknown"],"title":"ComparisonVerdict","description":"One checklist requirement's delta, defined as the TARGET market relative to the HOME market.\n\n`new` — an obligation that does not exist (or is far more involved) at home; `stricter` — exists at\nhome but tighter in the target; `aligned` — broadly equivalent; `lighter` — less onerous in the\ntarget; `unknown` — cannot be judged. Coerced by `domain/market_taxonomy.coerce_verdict`, outside\nthe boundary, for the same reason as `GapStatus`."},"ConnectedRegistersResponse":{"properties":{"connected":{"type":"integer","title":"Connected"},"held_since":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Held Since"},"held_count":{"type":"integer","title":"Held Count","default":0},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"}},"type":"object","required":["connected"],"title":"ConnectedRegistersResponse","description":"What the reader's registers are, as facts rather than as a status."},"ControlCounters":{"properties":{"controls":{"type":"integer","title":"Controls"},"new_matches":{"type":"integer","title":"New Matches"},"domains":{"type":"integer","title":"Domains"}},"type":"object","required":["controls","new_matches","domains"],"title":"ControlCounters","description":"The four headline figures, reconciled with the stored rows by construction."},"ControlDomainGroup":{"properties":{"domain":{"type":"string","title":"Domain"},"no_coverage":{"type":"boolean","title":"No Coverage"},"controls":{"items":{"$ref":"#/components/schemas/ControlRow"},"type":"array","title":"Controls"}},"type":"object","required":["domain","no_coverage","controls"],"title":"ControlDomainGroup","description":"One free-text domain and the obligations inside it, ordered by code."},"ControlFrameworkResponse":{"properties":{"counters":{"$ref":"#/components/schemas/ControlCounters"},"can_match":{"type":"boolean","title":"Can Match"},"can_author":{"type":"boolean","title":"Can Author"},"staleness":{"$ref":"#/components/schemas/FrameworkStaleness"},"ai_simulated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ai Simulated"},"run":{"anyOf":[{"$ref":"#/components/schemas/ControlMatchRunSummary"},{"type":"null"}]},"pending_imports":{"items":{"$ref":"#/components/schemas/ImportQueueItem"},"type":"array","title":"Pending Imports"},"domains":{"items":{"$ref":"#/components/schemas/ControlDomainGroup"},"type":"array","title":"Domains"}},"type":"object","required":["counters","can_match","can_author","staleness","ai_simulated","run","pending_imports","domains"],"title":"ControlFrameworkResponse","description":"The screen's one read: the whole framework, its counters, every match, and the latest run."},"ControlMatchRef":{"properties":{"control_id":{"type":"string","format":"uuid","title":"Control Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"domain":{"type":"string","title":"Domain"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"relevance_percent":{"type":"integer","title":"Relevance Percent"}},"type":"object","required":["control_id","code","title","domain","owner","relevance_percent"],"title":"ControlMatchRef","description":"One obligation this publication was retained against.\n\nRetention is per obligation (its closest few publications), so an empty list means nothing retained,\nnot nothing scored."},"ControlMatchRow":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"available":{"type":"boolean","title":"Available"},"regulator_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"relevance":{"type":"string","title":"Relevance"},"relevance_percent":{"type":"integer","title":"Relevance Percent"}},"type":"object","required":["publication_id","available","regulator_code","title","relevance","relevance_percent"],"title":"ControlMatchRow","description":"One regulatory update that matched an obligation, as the panel renders it.\n\nA publication that has left the corpus arrives here as the named unavailable state: no title, no\nregulator code, no click target — and still listed, still counted. There is no stored copy of the\ntitle to fall back on, and a title the reader cannot open is worse than an explicit absence."},"ControlMatchRunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"controls_evaluated":{"type":"integer","title":"Controls Evaluated"},"publications_considered":{"type":"integer","title":"Publications Considered"},"matches_retained":{"type":"integer","title":"Matches Retained"},"controls_under_review":{"type":"integer","title":"Controls Under Review"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"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"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","trigger","controls_evaluated","publications_considered","matches_retained","controls_under_review","ai_simulated","error","started_at","finished_at","created_at"],"title":"ControlMatchRunSummary","description":"One matching pass as the screen's readout and the trigger's response.\n\nPoll-only: this row is the whole observable surface of a pass. A queued run with no worker stays\n`pending` here for as long as that remains true, which is the honest answer."},"ControlRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"}},"type":"object","required":["id","code","title"],"title":"ControlRef","description":"The control a case file is anchored to: enough to name it without reading the framework screen."},"ControlRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"match_count":{"type":"integer","title":"Match Count"},"matches":{"items":{"$ref":"#/components/schemas/ControlMatchRow"},"type":"array","title":"Matches"},"entity_scope":{"$ref":"#/components/schemas/EntityScope"},"entities":{"items":{"$ref":"#/components/schemas/ObligationEntity"},"type":"array","title":"Entities"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/ObligationProvenance"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"revision":{"type":"string","title":"Revision"}},"type":"object","required":["id","code","title","match_count","matches","entity_scope","entities","provenance","archived_at","revision"],"title":"ControlRow","description":"One standing obligation: its statement, its metadata, and what the corpus has matched against it.\n\n`title` is the obligation's whole content — one self-contained requirement. Three fields are gone with the\nflattening rather than merely hidden, because a field the interface never shows is a field that drifts:\n\n- `subject_text`, which held a second half of the text for the ported seed. There is one text now.\n- `controls_list` and `no_control`, which described a parent-and-child split this row no longer has.\n- `review_frequency`, a closed vocabulary that reached no reminder, no task and no overdue marker.\n- `status`, whose two values said exactly what `match_count` says: `under_review` meant one or more\n  retained matches, `met` meant none. The chip repeated the number beside it and read as a compliance\n  claim the platform never made."},"CoverageNote":{"properties":{"channel":{"type":"string","title":"Channel"},"note":{"type":"string","title":"Note"}},"type":"object","required":["channel","note"],"title":"CoverageNote","description":"One channel's operator-written sentence about what it carries — NEVER computed.\n\nA derived completeness figure would be a claim about an authority's catalogue only it could make."},"DashboardStatsResponse":{"properties":{"median_visibility_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Visibility Days"},"qualifying_count":{"type":"integer","title":"Qualifying Count"},"active_source_count":{"type":"integer","title":"Active Source Count"},"pool_size":{"type":"integer","title":"Pool Size"},"pool_capped":{"type":"boolean","title":"Pool Capped"},"cleared_count":{"type":"integer","title":"Cleared Count"}},"type":"object","required":["median_visibility_days","qualifying_count","active_source_count","pool_size","pool_capped","cleared_count"],"title":"DashboardStatsResponse","description":"The landing screen's two server-computed figures, plus the pool facts behind the first one."},"DecidedPublicationResponse":{"properties":{"publication_id":{"type":"string","title":"Publication Id"},"title":{"type":"string","title":"Title"},"regulator":{"type":"string","title":"Regulator"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"relevance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevance"},"decision":{"$ref":"#/components/schemas/ScreeningDecision"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"}},"type":"object","required":["publication_id","title","regulator","published_at","relevance","decision","decided_at"],"title":"DecidedPublicationResponse","description":"One labelled pair: what the platform scored, what a person ruled, and enough to find it again.\n\n`relevance` is null where the publication carried no assessment when it was judged. That is a real\nstate and never a zero — an invented input is the one thing that would spoil the dataset this\nreading exists to produce."},"DecisionRequest":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"},"decided_for_all":{"type":"boolean","title":"Decided For All","default":false},"status":{"$ref":"#/components/schemas/DecisionStatus"},"reason":{"anyOf":[{"$ref":"#/components/schemas/NotRelevantReason"},{"type":"null"}]},"reason_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason Note"},"remind_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Remind At"},"shared_with":{"items":{"$ref":"#/components/schemas/ShareTarget"},"type":"array","maxItems":50,"title":"Shared With"},"suggested":{"type":"boolean","title":"Suggested","default":false}},"additionalProperties":false,"type":"object","required":["publication_id","status"],"title":"DecisionRequest","description":"One office's decision on one publication, written for the first time or changed.\n\n`affiliate_id` null means the reader's own office. `suggested` says the decision taken is RegRadar's\nsuggestion as shown; the server stores the suggestion it refers to beside it, and refuses the claim when\nthe office has no assessment to have suggested anything, or when what it suggests is not this status."},"DecisionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"affiliate_name":{"type":"string","title":"Affiliate Name"},"status":{"$ref":"#/components/schemas/DecisionStatus"},"reason":{"anyOf":[{"$ref":"#/components/schemas/NotRelevantReason"},{"type":"null"}]},"reason_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Note"},"suggested":{"type":"boolean","title":"Suggested"},"suggestion_snapshot":{"anyOf":[{"$ref":"#/components/schemas/SuggestionSnapshot"},{"type":"null"}]},"remind_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Remind At"},"shared_with":{"items":{"$ref":"#/components/schemas/ShareTarget"},"type":"array","title":"Shared With"},"decided_for_all":{"type":"boolean","title":"Decided For All"},"decided_by_user_id":{"type":"string","format":"uuid","title":"Decided By User Id"},"decided_by_name":{"type":"string","title":"Decided By Name"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"}},"type":"object","required":["id","publication_id","affiliate_id","affiliate_name","status","reason","reason_note","suggested","suggestion_snapshot","remind_at","shared_with","decided_for_all","decided_by_user_id","decided_by_name","decided_at"],"title":"DecisionResponse","description":"A stored decision as it now stands, with who took it and the suggestion it was taken beside."},"DecisionStatus":{"type":"string","enum":["not_relevant","for_information","action"],"title":"DecisionStatus","description":"One office's decision on one publication (Workflows v3, `domain/decision_rules.py`).\n\nThree values and no fourth: *to decide* is the ABSENCE of a decision row and is never stored, so\nundoing a decision is deleting its row rather than writing a value that means \"no decision\". A stored\n\"to decide\" would have to be cleared by every path that could clear it, and would let a row claim a\ndecision nobody took."},"DeclineVerdict":{"type":"string","enum":["reassign","keep"],"title":"DeclineVerdict","description":"How the person who assigned an action answers its owner's \"Not mine\" (spec §9, RAD-129).\n\n`reassign` hands the action to the colleague the owner suggested, through the one owner-change path;\n`keep` leaves it with the owner, who is told so. Nothing else: an assigner who wants a third person changes\nthe owner the ordinary way, and that also answers the suggestion."},"DemoItemCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"DemoItemCreate","description":"Create an item."},"DemoItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"ai_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Summary"},"ai_summary_simulated":{"type":"boolean","title":"Ai Summary Simulated"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","ai_summary","ai_summary_simulated","created_at","updated_at"],"title":"DemoItemResponse","description":"A demo item. `ai_summary_simulated` drives the SPA's \"simulated\" label."},"DemoRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","status","total","done","error"],"title":"DemoRunResponse","description":"Durable run state — the polling / self-heal read."},"DigestDirectoryResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/DigestMemberOption"},"type":"array","title":"Members"},"offices":{"items":{"$ref":"#/components/schemas/DigestOfficeOption"},"type":"array","title":"Offices"}},"type":"object","required":["members","offices"],"title":"DigestDirectoryResponse","description":"Everybody a digest may be addressed to inside the organisation: active members and offices.\n\nReadable by every member, like the assignee picker's directory, and as narrow: names and offices only.\nAnybody else is typed as an address."},"DigestFrequency":{"type":"string","enum":["none","instant","daily","weekly","monthly"],"title":"DigestFrequency","description":"How often a saved view mails what has newly arrived under it.\n\nThe frequency belongs to the VIEW, not to the person: the same reader wants a recall the moment it\nlands and a market round-up once a month, and one setting per account could only ever be wrong for\none of the two.\n\n`NONE` is stored rather than left null so \"nobody asked for mail\" is a decision somebody made and can\nbe read back, not an absence that could equally mean the column was added after the row."},"DigestItemOutcome":{"type":"string","enum":["decided","unchanged","in_action"],"title":"DigestItemOutcome","description":"What sending a publication as a digest did to its decision for the sender's office."},"DigestItemResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"outcome":{"$ref":"#/components/schemas/DigestItemOutcome"},"decision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Decision Id"}},"type":"object","required":["publication_id","outcome","decision_id"],"title":"DigestItemResponse","description":"What sending did to one publication's decision: decided For information, already so, or kept in action.\n\n`decision_id` is the office's decision row, absent only when the publication is in action — its Action\ndecision is kept, and it was still sent."},"DigestMemberOption":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"office_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Office Id"}},"type":"object","required":["user_id","name","office_id"],"title":"DigestMemberOption","description":"One member the To field may offer — a name and an office, never an address or a role."},"DigestOfficeOption":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"is_department":{"type":"boolean","title":"Is Department"}},"type":"object","required":["id","name","is_head_office","is_department"],"title":"DigestOfficeOption","description":"One office the To field may offer; choosing it sends to each of its active members.\n\n`is_department` lets the field name a department as one rather than as an office."},"DigestPreviewRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/ShareTarget"},"type":"array","maxItems":50,"title":"Recipients"}},"additionalProperties":false,"type":"object","required":["recipients"],"title":"DigestPreviewRequest","description":"The recipients the send window holds so far, to count before anything is sent."},"DigestPreviewResponse":{"properties":{"recipients":{"type":"integer","title":"Recipients"},"without_account":{"type":"integer","title":"Without Account"}},"type":"object","required":["recipients","without_account"],"title":"DigestPreviewResponse","description":"How many people the digest would reach, each once, and how many of them have no RegRadar account.\n\nCounted after offices are expanded to their active members and duplicates are folded — a typed address\nthat belongs to a member counts as that member — so the warning the window shows is about real people."},"DigestSendRequest":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Publication Ids"},"recipients":{"items":{"$ref":"#/components/schemas/ShareTarget"},"type":"array","maxItems":50,"minItems":1,"title":"Recipients"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"},"decided_for_all":{"type":"boolean","title":"Decided For All","default":false}},"additionalProperties":false,"type":"object","required":["publication_ids","recipients"],"title":"DigestSendRequest","description":"Send the selected publications to these recipients as ONE read-only digest each.\n\nEach publication's decision for the sender's office becomes For information — the reader's own office, or\nhead office for all offices with `decided_for_all` (HQ roles only), the decision box's own default."},"DigestSendResponse":{"properties":{"recipients":{"type":"integer","title":"Recipients"},"without_account":{"type":"integer","title":"Without Account"},"status":{"$ref":"#/components/schemas/DecisionStatus"},"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"decided_for_all":{"type":"boolean","title":"Decided For All"},"decided":{"type":"integer","title":"Decided"},"in_action":{"type":"integer","title":"In Action"},"results":{"items":{"$ref":"#/components/schemas/DigestItemResponse"},"type":"array","title":"Results"}},"type":"object","required":["recipients","without_account","status","affiliate_id","decided_for_all","decided","in_action","results"],"title":"DigestSendResponse","description":"Who it went to, and what each publication's decision now is. The mail leaves once this commits."},"DlqRedriveResponse":{"properties":{"redrive_id":{"type":"string","title":"Redrive Id"},"redriven":{"type":"integer","title":"Redriven"}},"type":"object","required":["redrive_id","redriven"],"title":"DlqRedriveResponse","description":"The outcome of a redrive: how much was re-enqueued, under which correlation id."},"DlqStatsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"oldest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oldest"},"per_task":{"additionalProperties":{"type":"integer"},"type":"object","title":"Per Task"}},"type":"object","required":["count","oldest","per_task"],"title":"DlqStatsResponse","description":"Dead-letter statistics read from the Redis mirror."},"DocumentFormat":{"type":"string","enum":["pdf","excel","word","csv","archive"],"title":"DocumentFormat","description":"The file kinds a reader is told about; several extensions fold into one."},"DocumentRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"format":{"anyOf":[{"$ref":"#/components/schemas/DocumentFormat"},{"type":"null"}]},"is_overview":{"type":"boolean","title":"Is Overview"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"text_status":{"anyOf":[{"$ref":"#/components/schemas/AttachedTextStatus"},{"type":"null"}]},"text_truncated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Text Truncated"}},"type":"object","required":["id","title","url","format","is_overview","first_seen_at","text_status","text_truncated"],"title":"DocumentRef","description":"One document the authority lists, as a title and its own address, and how reading it ended."},"DocumentSetResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentRef"},"type":"array","title":"Documents","default":[]},"changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changed At"},"added":{"items":{"type":"string"},"type":"array","title":"Added","default":[]},"removed":{"items":{"type":"string"},"type":"array","title":"Removed","default":[]}},"type":"object","title":"DocumentSetResponse","description":"The documents, and what the last comparison found had changed.\n\n`changed_at` is when the platform found the SET differing — an observation, not a currency claim; the\nauthority's own printed date is a separate, labelled field on the report."},"DocumentTextSource":{"type":"string","enum":["downloaded","rendered","stored_copy"],"title":"DocumentTextSource","description":"Where the text a document turn is answered from came from."},"DraftConfirmRequest":{"properties":{"revision":{"type":"integer","title":"Revision"}},"additionalProperties":false,"type":"object","required":["revision"],"title":"DraftConfirmRequest","description":"Confirming carries the revision too, so a stale review cannot apply what the reader last saw."},"DraftConfirmResponse":{"properties":{"added":{"type":"integer","title":"Added"},"replaced":{"type":"integer","title":"Replaced"},"obligation_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Obligation Ids"}},"type":"object","required":["added","replaced","obligation_ids"],"title":"DraftConfirmResponse","description":"What the confirmation did, in the two counts the footer stated separately."},"DraftEditRequest":{"properties":{"revision":{"type":"integer","title":"Revision"},"proposals":{"items":{"$ref":"#/components/schemas/ObligationProposal"},"type":"array","title":"Proposals"}},"additionalProperties":false,"type":"object","required":["revision","proposals"],"title":"DraftEditRequest","description":"A STRUCTURAL edit: the whole proposal document under the draft's own revision.\n\nWhole-document because that is the shape of the edits it serves — a row removed, or every row checked or\nunchecked at once. Each is one deliberate press over the whole list, so there is nothing smaller to send.\n\nEditing ONE row's fields does not come through here. It used to, and the reason given was that a per-row\nwrite would need a per-row revision — a second concurrency rule for one feature. That was wrong: the\nrevision stays on the DRAFT either way, and the request simply carries less. It mattered once an import\nstarted producing seventy-two statements instead of thirteen obligations, because every keystroke was\nthen re-sending and re-validating seventy-two rows to change one of them."},"DraftProposalEditRequest":{"properties":{"revision":{"type":"integer","title":"Revision"},"proposal":{"$ref":"#/components/schemas/ObligationProposal"}},"additionalProperties":false,"type":"object","required":["revision","proposal"],"title":"DraftProposalEditRequest","description":"One row's fields, under the DRAFT's revision — not a revision of its own.\n\nThat is the whole point of the shape: one concurrency rule, a smaller request. The row is sent complete\nrather than as a patch of changed fields, because a partial row would make the server merge two versions\nof a proposal and the draft is the only thing holding a version number."},"DraftRevisionResponse":{"properties":{"draft_id":{"type":"string","format":"uuid","title":"Draft Id"},"revision":{"type":"integer","title":"Revision"}},"type":"object","required":["draft_id","revision"],"title":"DraftRevisionResponse","description":"What a per-row write answers with: the token the next write must echo, and nothing else.\n\nDeliberately not the draft. The client just sent the row it changed and already holds every other one, so\nreturning seventy-two of them would put the payload straight back on the wire in the other direction."},"DueDateSuggestion":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"source_line":{"type":"string","title":"Source Line"}},"type":"object","required":["date","source_line"],"title":"DueDateSuggestion","description":"A suggested due date and the key-dates line it was read from, quoted as the source."},"DueState":{"type":"string","enum":["overdue","due_soon","on_track","none"],"title":"DueState","description":"How a workflow stands against its target date. `none` means there is no target to stand against."},"EmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"EmailRequest","description":"A bare email submission (reset request, magic-link request)."},"EnrichmentResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"relevance":{"type":"number","title":"Relevance"},"relevant":{"type":"boolean","title":"Relevant"},"critical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critical"},"produced_for_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced For Country"},"simulated":{"type":"boolean","title":"Simulated"},"enriched_at":{"type":"string","format":"date-time","title":"Enriched At"},"key_terms":{"items":{"$ref":"#/components/schemas/KeyTermResponse"},"type":"array","title":"Key Terms"},"action_items":{"items":{"$ref":"#/components/schemas/ActionItemResponse"},"type":"array","title":"Action Items"}},"type":"object","required":["summary","reason","relevance","relevant","critical","produced_for_country","simulated","enriched_at","key_terms","action_items"],"title":"EnrichmentResponse","description":"The reader's own office's assessment of a publication (labelled when simulated)."},"EntityAssessmentResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_name":{"type":"string","title":"Entity Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"absence":{"anyOf":[{"$ref":"#/components/schemas/AssessmentAbsenceResponse"},{"type":"null"}]},"relevance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance"},"relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Relevant"},"critical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critical"},"produced_for_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced For Country"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"action_items":{"items":{"$ref":"#/components/schemas/ActionItemResponse"},"type":"array","title":"Action Items"},"simulated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulated"},"enriched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enriched At"}},"type":"object","required":["entity_id","entity_name","is_head_office","country","absence","relevance","relevant","critical","produced_for_country","reason","summary","action_items","simulated","enriched_at"],"title":"EntityAssessmentResponse","description":"One office of the group, and either its assessment of a publication or why it has none.\n\nEvery office is listed: a missing office cannot be told apart from one nobody set up. `absence` present\nmeans the assessment fields are null."},"EntityFlagResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_name":{"type":"string","title":"Entity Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"}},"type":"object","required":["entity_id","entity_name","is_head_office"],"title":"EntityFlagResponse","description":"Which office confirmed a publication critical; a list, because \"critical for Belgrade\" is not \"for the group\"."},"EntityKind":{"type":"string","enum":["office","department"],"title":"EntityKind","description":"What an entity is: a country office, or a department that decides for the whole group.\n\nA department (pharmacovigilance, a product-line owner) has no country because it does not sit in one:\nit is answerable for every market, so it reaches every regulator exactly as the head office does — but\nit is NOT the group, so none of the group-wide reads include it."},"EntityListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"entities":{"items":{"$ref":"#/components/schemas/EntityResponse"},"type":"array","title":"Entities"}},"type":"object","required":["count","entities"],"title":"EntityListResponse","description":"The head office and every affiliate, in one list.\n\nCollective on purpose: \"which offices still need a profile\" cannot be answered by a list that omits the\nhead office, and the head office is exactly the office most likely to be missing one after a migration."},"EntityProfileResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"present":{"type":"boolean","title":"Present"},"kind":{"type":"string","title":"Kind"},"description":{"type":"string","title":"Description"},"key_products":{"items":{"type":"string"},"type":"array","title":"Key Products"},"therapeutic_areas":{"items":{"type":"string"},"type":"array","title":"Therapeutic Areas"},"markets":{"items":{"type":"string"},"type":"array","title":"Markets"},"watch_topics":{"items":{"type":"string"},"type":"array","title":"Watch Topics"},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors"},"excluded_topics":{"items":{"type":"string"},"type":"array","title":"Excluded Topics"}},"type":"object","required":["entity_id","present","kind","description","key_products","therapeutic_areas","markets","watch_topics","sectors","excluded_topics"],"title":"EntityProfileResponse","description":"One office's profile, or the honest absence of one.\n\n`present: false` is a real state rather than an error, and reading it writes nothing. It is not the\norganisation's get-or-defaults read: a missing remit yields a documented default because it governs a\nfilter, while a missing profile refuses the assessment, because that is authored prose about an office\nand a default there would be interchangeable text presented as bespoke analysis."},"EntityProfileUpdateRequest":{"properties":{"kind":{"type":"string","title":"Kind","default":""},"description":{"type":"string","title":"Description","default":""},"key_products":{"items":{"type":"string"},"type":"array","title":"Key Products","default":[]},"therapeutic_areas":{"items":{"type":"string"},"type":"array","title":"Therapeutic Areas","default":[]},"markets":{"items":{"type":"string"},"type":"array","title":"Markets","default":[]},"watch_topics":{"items":{"type":"string"},"type":"array","title":"Watch Topics","default":[]},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors","default":[]},"excluded_topics":{"items":{"type":"string"},"type":"array","title":"Excluded Topics","default":[]}},"type":"object","title":"EntityProfileUpdateRequest","description":"Full replacement of one office's profile — the same eight fields, addressed per office.\n\n`sectors` here is the office's own declaration, which narrows the organisation's remit and can never\nwiden it. That holds by composition when a publication is assessed, not by a rule at save time: a\nvalidation here would be a second definition of the remit."},"EntityResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"},"member_count":{"type":"integer","title":"Member Count"},"has_profile":{"type":"boolean","title":"Has Profile"}},"type":"object","required":["id","name","country","is_head_office","member_count","has_profile"],"title":"EntityResponse","description":"One office on the collective roster.\n\n`country` is null only for a head office nobody has declared one for; every affiliate carries its ISO\ncode. `has_profile` is what makes the roster the one place that answers \"which offices still need a\nprofile\", and the member count includes members with no office link, because the head office is who\nthose members read as."},"EntityScope":{"type":"string","enum":["group","selected"],"title":"EntityScope","description":"Whether an obligation follows the whole group or a fixed set of offices.\n\nTwo different facts, not one list with a shortcut. `GROUP` means an office created next year picks the\nobligation up automatically; `SELECTED` is a fixed set that a new office does not join. Storing the first\nas \"all five identifiers\" gives the wrong answer the first morning a sixth office exists — silently, and in\nthe customer's favour, which is the worst direction for a compliance register to be wrong in. So `GROUP`\nstores NO scope rows at all, and the write path asserts that emptiness rather than trusting it."},"EntryPointProbe":{"properties":{"url":{"type":"string","title":"Url"},"ok":{"type":"boolean","title":"Ok"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"feed_entries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Feed Entries"}},"type":"object","required":["url","ok"],"title":"EntryPointProbe","description":"What a fetch of one proposed entry point actually found.\n\n`reason` is the operator-facing sentence for a refusal; it names the transport failure class where\nthere was one and never carries an upstream trace."},"ExtractedDissolutionResponse":{"properties":{"media":{"type":"string","title":"Media"},"method":{"type":"string","title":"Method"},"f2_vs_reference":{"type":"string","title":"F2 Vs Reference"}},"type":"object","required":["media","method","f2_vs_reference"],"title":"ExtractedDissolutionResponse","description":"The dissolution method, its media, and how similarity to the reference was shown."},"ExtractedExcipientResponse":{"properties":{"name":{"type":"string","title":"Name"},"function":{"type":"string","title":"Function"},"quantity":{"type":"string","title":"Quantity"}},"type":"object","required":["name","function","quantity"],"title":"ExtractedExcipientResponse","description":"One excipient, with its quantity exactly as the dossier writes it."},"ExtractedImpurityResponse":{"properties":{"name":{"type":"string","title":"Name"},"limit":{"type":"string","title":"Limit"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["name","limit","kind"],"title":"ExtractedImpurityResponse","description":"One impurity and its limit. `kind` is the dossier's own word, uncoerced."},"ExtractedReferenceResponse":{"properties":{"market":{"type":"string","title":"Market"},"product":{"type":"string","title":"Product"}},"type":"object","required":["market","product"],"title":"ExtractedReferenceResponse","description":"One comparator the dossier names, with the market it names it for."},"ExtractedStabilityResponse":{"properties":{"conditions":{"items":{"type":"string"},"type":"array","title":"Conditions"},"duration":{"type":"string","title":"Duration"}},"type":"object","required":["conditions","duration"],"title":"ExtractedStabilityResponse","description":"Stability as generated. Conditions stay verbatim — the climatic zone is a conclusion, not a field."},"FacetValue":{"properties":{"value":{"type":"string","title":"Value"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"FacetValue","description":"One value a chip offers, and how many reports carry it."},"FilingTrendsResponse":{"properties":{"monthly":{"items":{"$ref":"#/components/schemas/MonthlyFilingResponse"},"type":"array","title":"Monthly"},"top_references":{"items":{"$ref":"#/components/schemas/NamedCountResponse"},"type":"array","title":"Top References"},"top_holders":{"items":{"$ref":"#/components/schemas/NamedCountResponse"},"type":"array","title":"Top Holders"}},"type":"object","required":["monthly","top_references","top_holders"],"title":"FilingTrendsResponse","description":"What the window looked like over time and who shaped it.\n\nEvery figure here is a database aggregate over the WHOLE window, never over the rows the list\nreturned — so the charts do not change when the cap does, and a reader cannot read a shorter list\nas a quieter market."},"FirstAdminInvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"status":{"$ref":"#/components/schemas/InvitationStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","email","status","expires_at"],"title":"FirstAdminInvitationResponse","description":"The bootstrap (operator-issued) first-admin invitation state.\n\nThe re-send response carries the same four fields, so it reuses this model rather than declaring a\nsecond one that could drift from it."},"FrameworkStaleness":{"properties":{"is_stale":{"type":"boolean","title":"Is Stale"},"last_authored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Authored At"},"revisions_behind":{"type":"integer","title":"Revisions Behind"}},"type":"object","required":["is_stale","last_authored_at","revisions_behind"],"title":"FrameworkStaleness","description":"Whether the match set on screen predates the framework's last change.\n\nComputed on every read from two revisions. No column stores it, because a stored flag would have to be\ncleared by every path that could clear it and one missed path leaves a banner nobody can dismiss."},"GapAspectResponse":{"properties":{"id":{"type":"string","title":"Id"},"aspect":{"type":"string","title":"Aspect"},"gap_means":{"type":"string","title":"Gap Means"},"ctd_module":{"type":"string","title":"Ctd Module"},"cells":{"items":{"$ref":"#/components/schemas/GapCellResponse"},"type":"array","title":"Cells"}},"type":"object","required":["id","aspect","gap_means","ctd_module","cells"],"title":"GapAspectResponse","description":"One matrix row. `cells` omits a market entirely when the model returned nothing for it."},"GapCellResponse":{"properties":{"market_id":{"type":"string","format":"uuid","title":"Market Id"},"status":{"$ref":"#/components/schemas/GapStatus"},"rationale":{"type":"string","title":"Rationale"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"citation":{"anyOf":[{"$ref":"#/components/schemas/PassageCitationResponse"},{"type":"null"}]}},"type":"object","required":["market_id","status","rationale","action","citation"],"title":"GapCellResponse","description":"One market's verdict for one aspect. An ABSENT cell is not this with `unknown`."},"GapContextResponse":{"properties":{"markets":{"items":{"$ref":"#/components/schemas/MarketOptionResponse"},"type":"array","title":"Markets"},"preselected_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Preselected Ids"},"markets_per_run":{"type":"integer","title":"Markets Per Run"},"usage":{"$ref":"#/components/schemas/UsageAllowanceResponse"},"all_sectors_fallback":{"type":"boolean","title":"All Sectors Fallback"},"sample_dossier_text":{"type":"string","title":"Sample Dossier Text"},"sample_dossier_label":{"type":"string","title":"Sample Dossier Label"}},"type":"object","required":["markets","preselected_ids","markets_per_run","usage","all_sectors_fallback","sample_dossier_text","sample_dossier_label"],"title":"GapContextResponse","description":"The screen's one setup read: the picker, what may be selected and spent, and the specimen dossier."},"GapMarketResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"abbreviation":{"type":"string","title":"Abbreviation"},"country":{"type":"string","title":"Country"},"country_code":{"type":"string","title":"Country Code"},"pharmacopoeia":{"type":"string","title":"Pharmacopoeia"},"stability_zone":{"type":"string","title":"Stability Zone"}},"type":"object","required":["id","abbreviation","country","country_code","pharmacopoeia","stability_zone"],"title":"GapMarketResponse","description":"One assessed column's market identity and the two attributes a dossier is read against.\n\nBoth attributes are commonly EMPTY, and that is the honest state rather than a missing feature: an\nauthority accepting several reference pharmacopoeias, or spanning two climatic zones, has no single\napplicable value. They are shown beside the column rather than turned into verdicts — what a market\nrequires under each aspect is still retrieved from that authority's guidance, and cited."},"GapMatrixResponse":{"properties":{"product":{"$ref":"#/components/schemas/GapRunProduct"},"markets":{"items":{"$ref":"#/components/schemas/GapMarketResponse"},"type":"array","title":"Markets"},"aspects":{"items":{"$ref":"#/components/schemas/GapAspectResponse"},"type":"array","title":"Aspects"},"tally":{"$ref":"#/components/schemas/GapTallyResponse"},"degraded_market_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Degraded Market Ids"},"uncovered_market_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Uncovered Market Ids"},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["product","markets","aspects","tally","degraded_market_ids","uncovered_market_ids","simulated"],"title":"GapMatrixResponse","description":"One completed run. A failed run is an error status with the shared envelope, never this."},"GapRunProduct":{"properties":{"name":{"type":"string","title":"Name","default":""},"inn":{"type":"string","title":"Inn","default":""},"brand":{"type":"string","title":"Brand","default":""},"dosage_form":{"type":"string","title":"Dosage Form","default":""},"strengths":{"type":"string","title":"Strengths","default":""},"bcs_class":{"type":"string","title":"Bcs Class","default":""},"pharmacopoeia_claimed":{"type":"string","title":"Pharmacopoeia Claimed","default":""},"nitrosamine_assessment":{"type":"string","title":"Nitrosamine Assessment","default":""},"container_closure":{"type":"string","title":"Container Closure","default":""},"reference_products":{"items":{"$ref":"#/components/schemas/ExtractedReferenceResponse"},"type":"array","title":"Reference Products"},"excipients":{"items":{"$ref":"#/components/schemas/ExtractedExcipientResponse"},"type":"array","title":"Excipients"},"impurities":{"items":{"$ref":"#/components/schemas/ExtractedImpurityResponse"},"type":"array","title":"Impurities"},"dissolution":{"$ref":"#/components/schemas/ExtractedDissolutionResponse"},"stability":{"$ref":"#/components/schemas/ExtractedStabilityResponse"},"source_modules":{"items":{"type":"string"},"type":"array","title":"Source Modules"},"source_label":{"type":"string","title":"Source Label","default":""}},"type":"object","title":"GapRunProduct","description":"The reviewed product as a run receives it back: the assessment fields plus the source credit.\n\nSupplementary attributes have no field here, so they are absent by construction rather than by\nbeing dropped — a reviewer's context cannot become an assessment input by somebody widening a\nmapping later."},"GapRunRequest":{"properties":{"product":{"$ref":"#/components/schemas/GapRunProduct"},"market_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Market Ids"}},"type":"object","required":["product"],"title":"GapRunRequest","description":"A product and the markets to assess it against. Column order follows this list."},"GapStatus":{"type":"string","enum":["compliant","gap","unknown"],"title":"GapStatus","description":"One requirement's verdict for one market on the gap matrix.\n\nA display/response vocabulary only — nothing stores it. Anything the model returns outside these\nthree arrives as a raw string and is coerced to `unknown` by `domain/gap_taxonomy.coerce_status`,\noutside the AI boundary, so the rule applies identically to simulated and live output."},"GapTallyResponse":{"properties":{"compliant":{"type":"integer","title":"Compliant"},"gap":{"type":"integer","title":"Gap"},"unknown":{"type":"integer","title":"Unknown"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["compliant","gap","unknown","total"],"title":"GapTallyResponse","description":"The three counters over every POPULATED cell, plus their total — derived server-side."},"GroupPeakResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"entity_name":{"type":"string","title":"Entity Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"relevance":{"type":"number","title":"Relevance"},"relevant":{"type":"boolean","title":"Relevant"},"critical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critical"}},"type":"object","required":["entity_id","entity_name","is_head_office","relevance","relevant","critical"],"title":"GroupPeakResponse","description":"The highest score any office gave this publication, and which office gave it.\n\nOnly for a head office, and only when that office is not the reader's own. Shown beside the reader's\nown assessment — never substituted into it — and it is what that reader's library is ordered by."},"GroupRemitResponse":{"properties":{"organisation_name":{"type":"string","title":"Organisation Name"},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors"},"excluded_topics":{"items":{"type":"string"},"type":"array","title":"Excluded Topics"},"available_sectors":{"items":{"$ref":"#/components/schemas/Sector"},"type":"array","title":"Available Sectors"},"all_sectors_active":{"type":"boolean","title":"All Sectors Active"}},"type":"object","required":["organisation_name","sectors","excluded_topics","available_sectors","all_sectors_active"],"title":"GroupRemitResponse","description":"The organisation's remit as the screen renders it."},"GroupRemitUpdateRequest":{"properties":{"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors","default":["pharmaceuticals"]},"excluded_topics":{"items":{"type":"string"},"type":"array","title":"Excluded Topics","default":[]}},"type":"object","title":"GroupRemitUpdateRequest","description":"Full replacement of the remit (organisation name is read-only)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"HealthResponse","description":"Health check response body."},"HolderDetailResponse":{"properties":{"holder":{"$ref":"#/components/schemas/HolderRowResponse"},"records":{"items":{"$ref":"#/components/schemas/ProductRecordRowResponse"},"type":"array","title":"Records"},"substances":{"items":{"$ref":"#/components/schemas/HolderSubstanceResponse"},"type":"array","title":"Substances"}},"type":"object","required":["holder","records","substances"],"title":"HolderDetailResponse","description":"One holder in full: the row, every record it holds, and what it works on."},"HolderFirstRecordResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"register_abbreviation":{"type":"string","title":"Register Abbreviation"},"market_codes":{"items":{"type":"string"},"type":"array","title":"Market Codes"},"inn":{"type":"string","title":"Inn","default":""},"strength":{"type":"string","title":"Strength","default":""},"pharmaceutical_form":{"type":"string","title":"Pharmaceutical Form","default":""},"reference_product":{"type":"string","title":"Reference Product","default":""}},"type":"object","required":["id","published_at","register_abbreviation","market_codes"],"title":"HolderFirstRecordResponse","description":"The record a holder first appeared with, and the register it appeared in.\n\nThe register is named so a first application at a national authority stays distinguishable from\none at a multi-state framework — without a second definition of newness to tell them apart."},"HolderRowResponse":{"properties":{"holder_key":{"type":"string","title":"Holder Key"},"holder_name":{"type":"string","title":"Holder Name"},"first_record":{"$ref":"#/components/schemas/HolderFirstRecordResponse"},"latest_record_at":{"type":"string","format":"date-time","title":"Latest Record At"},"record_count":{"type":"integer","title":"Record Count"},"substances":{"items":{"type":"string"},"type":"array","title":"Substances"},"earliest_held_count":{"type":"integer","title":"Earliest Held Count"},"seen":{"type":"boolean","title":"Seen"}},"type":"object","required":["holder_key","holder_name","first_record","latest_record_at","record_count","substances","earliest_held_count","seen"],"title":"HolderRowResponse","description":"One marketing-authorisation holder whose first held record falls in the window."},"HolderSubstanceResponse":{"properties":{"name":{"type":"string","title":"Name"},"record_count":{"type":"integer","title":"Record Count"}},"type":"object","required":["name","record_count"],"title":"HolderSubstanceResponse","description":"One substance a holder has records for, and how many."},"HunkShape":{"type":"string","enum":["modified","deleted","inserted","moved"],"title":"HunkShape"},"ImpactArea":{"type":"string","enum":["organisational","technological","product","analytical","not_applicable"],"title":"ImpactArea","description":"Impact classification."},"ImportBounds":{"properties":{"text_truncated":{"type":"boolean","title":"Text Truncated"},"proposal_cap_reached":{"type":"boolean","title":"Proposal Cap Reached"},"proposal_cap":{"type":"integer","title":"Proposal Cap"}},"type":"object","required":["text_truncated","proposal_cap_reached","proposal_cap"],"title":"ImportBounds","description":"Which bounds this document reached. Both are reported TOGETHER when both are true.\n\nSaying only \"the first 200 in document order\" about a document that was itself cut short would leave the\ntail invisible for two reasons and accounted for once."},"ImportDraftResponse":{"properties":{"draft_id":{"type":"string","format":"uuid","title":"Draft Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"revision":{"type":"integer","title":"Revision"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"document_name":{"type":"string","title":"Document Name"},"bounds":{"$ref":"#/components/schemas/ImportBounds"},"totals":{"$ref":"#/components/schemas/ImportTotals"},"proposals":{"items":{"$ref":"#/components/schemas/ObligationProposal"},"type":"array","title":"Proposals"}},"type":"object","required":["draft_id","run_id","revision","expires_at","ai_simulated","document_name","bounds","totals","proposals"],"title":"ImportDraftResponse","description":"The reviewable draft: its proposals, its bounds, its totals, and how long it lives."},"ImportFailureKind":{"type":"string","enum":["unreadable","no_obligations","extraction_failed"],"title":"ImportFailureKind","description":"The three ways an import ends badly, kept apart because they need three different messages.\n\n`UNREADABLE` is a failure the reader fixes with a different file. `NO_OBLIGATIONS` is an honest empty result\nfrom a readable document that was never a register — dressing it as the first sends somebody hunting for a\nbetter scan. `EXTRACTION_FAILED` is neither: the platform failed, not the document, and the reader is asked\nfor the file again because no uploaded bytes are retained."},"ImportIntakeResponse":{"properties":{"started":{"items":{"$ref":"#/components/schemas/ImportRunSummary"},"type":"array","title":"Started"},"refused":{"items":{"$ref":"#/components/schemas/RefusedUploadSummary"},"type":"array","title":"Refused"}},"type":"object","required":["started","refused"],"title":"ImportIntakeResponse","description":"What one press produced: the runs now reading, and the files that never got that far.\n\nBoth halves always travel, because either alone lies about a mixed batch. The started runs without the\nrefusals hide a document the reader believes is being read; the refusals without the runs read as a failed\nupload. A press where NOTHING started is not this shape at all — it is refused outright, so that a single\nunreadable file answers exactly as it always did."},"ImportQueueItem":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"document_name":{"type":"string","title":"Document Name"},"status":{"$ref":"#/components/schemas/RunStatus"},"stage":{"anyOf":[{"$ref":"#/components/schemas/ImportStage"},{"type":"null"}]},"proposals_waiting":{"type":"integer","title":"Proposals Waiting"},"failure_kind":{"anyOf":[{"$ref":"#/components/schemas/ImportFailureKind"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"draft_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Draft Expires At"}},"type":"object","required":["run_id","document_name","status","stage","proposals_waiting","failure_kind","message","started_at","draft_expires_at"],"title":"ImportQueueItem","description":"One of the reader's OWN imports: where the reading has got to, or how it ended, and what waits.\n\nServes two filters over the same shape, and the difference between them is deliberate:\n\n- the framework screen's waiting panel takes the ones that still owe somebody work — reading now, or read\n  and unreviewed. A FAILED run is absent there: there is nothing to review and nothing to press, and\n  putting it there would need a way to dismiss it, which means per-reader state for a row that expires.\n- the queue screen takes them all, failures included, because a batch's whole point is that its documents\n  end differently — three read, one a scan, one that was never a register — and a reader who navigated away\n  from the upload has nowhere else to learn that document three failed.\n\nScoped to the reader who started it, which is why no uploader is named here any more. The field existed so\na colleague could see whose import was waiting; drafts are now private to their uploader, so on this list\nthe answer is always \"you\", and naming it would cost the framework's single read a lookup to say nothing."},"ImportQueueResponse":{"properties":{"imports":{"items":{"$ref":"#/components/schemas/ImportQueueItem"},"type":"array","title":"Imports"}},"type":"object","required":["imports"],"title":"ImportQueueResponse","description":"Everything the reader has imported lately — the queue screen's whole read."},"ImportRunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"stage":{"anyOf":[{"$ref":"#/components/schemas/ImportStage"},{"type":"null"}]},"document_name":{"type":"string","title":"Document Name"},"document_bytes":{"type":"integer","title":"Document Bytes"},"pages_read":{"type":"integer","title":"Pages Read"},"proposals_found":{"type":"integer","title":"Proposals Found"},"text_truncated":{"type":"boolean","title":"Text Truncated"},"proposal_cap_reached":{"type":"boolean","title":"Proposal Cap Reached"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"failure_kind":{"anyOf":[{"$ref":"#/components/schemas/ImportFailureKind"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"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"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","stage","document_name","document_bytes","pages_read","proposals_found","text_truncated","proposal_cap_reached","ai_simulated","failure_kind","message","started_at","finished_at","created_at"],"title":"ImportRunSummary","description":"The run the screen polls: which stage it is on, what each stage found, and how it ended.\n\n`failure_kind` is the whole point of the shape. Three values, three different sentences: a document the\nreader fixes with another file, an honest empty result about a document that was never a register, and the\nplatform failing rather than the document. Collapsing any two of them would send somebody hunting for a\nbetter scan of a perfectly good manual."},"ImportStage":{"type":"string","enum":["reading","extracting","grouping","checking"],"title":"ImportStage","description":"The four phases of a document import, in order, each one the worker actually finishes.\n\nNamed states rather than a percentage, because each is a phase that gets committed before the next begins —\nso a pass that stalls stalls visibly ON a stage instead of under a bar that keeps moving."},"ImportTotals":{"properties":{"found":{"type":"integer","title":"Found"},"selected":{"type":"integer","title":"Selected"},"implied":{"type":"integer","title":"Implied"},"categories":{"type":"integer","title":"Categories"},"replacements":{"type":"integer","title":"Replacements"}},"type":"object","required":["found","selected","implied","categories","replacements"],"title":"ImportTotals","description":"What the review footer states before the reader presses.\n\n`replacements` is stated SEPARATELY from `selected`, because a reader who has silently replaced four\nobligations they already had should have been told before pressing, not after."},"InboxAffiliateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"}},"type":"object","required":["id","name","country"],"title":"InboxAffiliateResponse","description":"Whose queue this is — resolved from the caller's own user row, never from the request."},"InboxResponse":{"properties":{"waiting":{"items":{"$ref":"#/components/schemas/InboxRow"},"type":"array","title":"Waiting"},"done":{"items":{"$ref":"#/components/schemas/InboxRow"},"type":"array","title":"Done"}},"type":"object","required":["waiting","done"],"title":"InboxResponse","description":"One person's inbox, split by whether they have come back on it yet.\n\nTwo lists rather than one with a flag, because the question a reader opens this screen with is \"what is\nwaiting on me\" and everything else is reference. Both are the caller's own rows and nobody else's."},"InboxRow":{"properties":{"workflow_id":{"type":"string","format":"uuid","title":"Workflow Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"available":{"type":"boolean","title":"Available"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"regulator_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Code"},"assigned_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned By"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"affiliate_iso_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Iso Code"},"note":{"type":"string","title":"Note"},"done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Done At"}},"type":"object","required":["workflow_id","publication_id","available","title","regulator_code","assigned_by","assigned_at","affiliate_iso_code","note","done_at"],"title":"InboxRow","description":"One thing somebody was asked to look at, as their own inbox lists it.\n\nA publication that has left the corpus arrives as the named unavailable state, the same way the\nframework panel handles it: still listed, still theirs to answer, with no title to click through to."},"IngestionRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"candidate_count":{"type":"integer","title":"Candidate Count"},"new_count":{"type":"integer","title":"New Count"},"updated_count":{"type":"integer","title":"Updated Count"},"failed_count":{"type":"integer","title":"Failed Count"},"log":{"type":"string","title":"Log"},"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"}},"type":"object","required":["id","status","trigger","candidate_count","new_count","updated_count","failed_count","log","error","started_at","finished_at"],"title":"IngestionRunResponse","description":"Durable run telemetry — the poll/diagnosis surface."},"InsightColumnResponse":{"properties":{"label":{"type":"string","title":"Label"},"numeric":{"type":"boolean","title":"Numeric","default":false}},"type":"object","required":["label"],"title":"InsightColumnResponse","description":"One column of the table behind the figure: its heading and whether it reads as a number."},"InsightFigureResponse":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"unit":{"type":"string","title":"Unit"},"claim":{"type":"string","title":"Claim","default":""}},"type":"object","required":["label","value","unit"],"title":"InsightFigureResponse","description":"The chip's answer, computed in code over the same filtered set the list shows."},"InsightRowResponse":{"properties":{"cells":{"items":{"type":"string"},"type":"array","title":"Cells"}},"type":"object","required":["cells"],"title":"InsightRowResponse","description":"One row of that table, its cells in the order the response declares its columns.\n\nCells rather than named fields, and the reason is the five chips: each asks a different question\nand its table answers with different columns — a holder's substances, a substance's holders, a\nreference product and the date it was first applied for. Named fields would mean five response\nshapes and a discriminator for a read-only table, and a grab-bag of optional fields would mean\nevery chip carrying the others' columns as nulls. The columns and the cells are produced together,\nin one place per chip, so the positional pairing cannot drift."},"IntakeCountsResponse":{"properties":{"screened":{"type":"integer","title":"Screened"},"needs_us":{"type":"integer","title":"Needs Us"},"needs_us_percent":{"type":"integer","title":"Needs Us Percent"},"cleared":{"type":"integer","title":"Cleared"},"outside_remit":{"type":"integer","title":"Outside Remit"},"unread":{"type":"integer","title":"Unread"},"bookmarked":{"type":"integer","title":"Bookmarked"},"group_screened":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Screened"},"in_review":{"type":"integer","title":"In Review"},"processed":{"type":"integer","title":"Processed"}},"type":"object","required":["screened","needs_us","needs_us_percent","cleared","outside_remit","unread","bookmarked","group_screened","in_review","processed"],"title":"IntakeCountsResponse","description":"The figures above the library — counted, never a tally of the returned rows.\n\n`screened`, `needs_us`, `cleared` and `outside_remit` cover the WHOLE intake and do not move with the\nselected population; `unread` and `bookmarked` cover the selected population, so each equals the list\nclicking it produces."},"InvitationAcceptRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"password":{"type":"string","minLength":1,"title":"Password"}},"type":"object","required":["name","password"],"title":"InvitationAcceptRequest","description":"The acceptance form — the account email comes from the invitation, not this body."},"InvitationAffiliate":{"properties":{"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"}},"type":"object","required":["name","country"],"title":"InvitationAffiliate","description":"Affiliate context shown on the acceptance screen. Null country means a department."},"InvitationResendResponse":{"properties":{"invitation":{"$ref":"#/components/schemas/FirstAdminInvitationResponse"},"link":{"type":"string","title":"Link"}},"type":"object","required":["invitation","link"],"title":"InvitationResendResponse","description":"The re-send result: the rotated invitation + its fresh shareable link."},"InvitationStatus":{"type":"string","enum":["pending","accepted","revoked","expired"],"title":"InvitationStatus","description":"Invitation state machine. Every terminal state is final —\n\nrecovery is always a fresh/re-issued invitation. Expiry is evaluated lazily and persisted\non the next touch (no sweeper job)."},"InvitationViewResponse":{"properties":{"organisation_name":{"type":"string","title":"Organisation Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"affiliate":{"anyOf":[{"$ref":"#/components/schemas/InvitationAffiliate"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"password_policy":{"$ref":"#/components/schemas/PasswordPolicyResponse"}},"type":"object","required":["organisation_name","email","role","affiliate","expires_at","password_policy"],"title":"InvitationViewResponse","description":"What the acceptance screen renders (`GET /auth/invitations/{token}`)."},"KeyTermResponse":{"properties":{"term":{"type":"string","title":"Term"},"definition":{"type":"string","title":"Definition"}},"type":"object","required":["term","definition"],"title":"KeyTermResponse","description":"One glossary entry: a term the document uses, and what it means."},"LibraryAssessmentEstimateResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"mode":{"$ref":"#/components/schemas/LibraryAssessmentMode"},"has_profile":{"type":"boolean","title":"Has Profile"},"publications":{"type":"integer","title":"Publications"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"assessment_cost_per_call":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Assessment Cost Per Call"},"explanation_cost_per_call":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Explanation Cost Per Call"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/LibraryAssessmentRefusal"},{"type":"null"}]},"refusal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal Reason"}},"type":"object","required":["entity_id","mode","has_profile","publications","model_id","assessment_cost_per_call","explanation_cost_per_call"],"title":"LibraryAssessmentEstimateResponse","description":"What assessing one entity's library would involve, shown BEFORE anything is spent.\n\n`publications` is the candidate population the pass will walk; each is one model call at most, and fewer\nwhere the entity's own scope or reach refuses it row by row. The two costs are per call in US dollars and\nare null when this environment has no history of that call or no rate for what it used — never a guessed\nfigure, because a number that looks like a price is the one thing a confirmation dialog must not carry.\n`has_profile` false means the entity cannot be assessed yet, which is a different fact from \"nothing to do\".\n`refusal` is the reason the press would be refused right now -- the same rule the start refuses by -- with\nits sentence beside it, so the screen offers no control the server would refuse."},"LibraryAssessmentMode":{"type":"string","enum":["missing","all"],"title":"LibraryAssessmentMode","description":"Which publications of the library an explicit per-entity assessment covers."},"LibraryAssessmentRefusal":{"type":"string","enum":["whole_library_not_offered","already_run_today"],"title":"LibraryAssessmentRefusal","description":"Why a customer's press cannot start an assessment of an entity's library."},"LibraryAssessmentRunRequest":{"properties":{"mode":{"$ref":"#/components/schemas/LibraryAssessmentMode"}},"additionalProperties":false,"type":"object","required":["mode"],"title":"LibraryAssessmentRunRequest","description":"Start an assessment of one entity's library."},"LibraryAssessmentRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"mode":{"$ref":"#/components/schemas/LibraryAssessmentMode"},"status":{"$ref":"#/components/schemas/RunStatus"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","affiliate_id","mode","status","total","done","error"],"title":"LibraryAssessmentRunResponse","description":"Durable state of one assessment run — the reconnect and self-heal read."},"LibraryPopulation":{"type":"string","enum":["admitted","everything","on_dashboard","cleared_for_office","outside_remit"],"title":"LibraryPopulation","description":"The populations a caller may ask the library for; mirrors `IntakePopulation`.\n\n`admitted` has no library control but the landing screen needs it: its coverage map describes what the\norganisation watches, not the whole intake. The default stays `everything`."},"LibrarySort":{"type":"string","enum":["published","recent","relevant"],"title":"LibrarySort","description":"The order the library's page is read in, and therefore which page a publication is on.\n\nThree, and they are not symmetrical. `PUBLISHED` and `RECENT` are properties of the document and\norder the whole intake; `RELEVANT` orders by a score one office produced, so a publication nobody\nassessed has no place in it and is ranked behind the entire scored population rather than tied with\nits floor. A zero is a judgement somebody made and an absent score is not one.\n\nThe two recency orders answer two different questions and neither replaces the other. `PUBLISHED`\n(\"Newest\") is when the authority put the document out — the regulator's own date, so a 2014 guidance\namended this morning stays in 2014, which is what a pharmacovigilance reader working through what is\nnew expects and is the default. `RECENT` (\"Recently changed\") is `effective_at`, the later of the\npublication and the last amendment, so that same guidance is at the top. `recent` keeps its wire\nvalue and its meaning: links and saved reports written before the pair existed reopen in exactly the\norder they were saved in rather than being silently reinterpreted.\n\nSelected over the wire, because ordering decides the page: sorting the twenty-five rows a page already\nholds ranks a twentieth of the answer and presents it as the top of it, which is how the library came\nto show 0.30 as its most relevant row while the Dashboard read 0.80 off the same corpus."},"LinkRequestAcknowledged":{"properties":{},"type":"object","title":"LinkRequestAcknowledged","description":"The reset-link and magic-link acknowledgement — an empty body, and empty on purpose.\n\nBoth requests answer 200 with this whether or not the address belongs to an account, so anything\ncarried here would have to be identical in both cases anyway. Declaring the emptiness as a shape\nkeeps the two endpoints provably indistinguishable rather than leaving the body to a hand-built\nliteral that one of them could later grow a field on."},"ListAbsence":{"properties":{"kind":{"type":"string","const":"no_channel_connected","title":"Kind"},"owner":{"type":"string","const":"platform_operator","title":"Owner"}},"type":"object","required":["kind","owner"],"title":"ListAbsence","description":"What the screen cannot answer, and whose job it is to change that.\n\nTyped, so an empty page never leaves the client guessing between \"nothing connected\" and \"no match\"."},"ListingState":{"type":"string","enum":["listed","not_listed_at_last_read","not_checked_since"],"title":"ListingState","description":"What the platform can honestly say about whether a register still lists one of its rows."},"MarkViewedRequest":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Publication Ids"}},"type":"object","required":["publication_ids"],"title":"MarkViewedRequest","description":"The publications the screen is rendering, to mark as read for the acting reader.\n\nHanded its selection like the export, because the rendered list is the client's fact. Over the\nworking-set cap is refused rather than trimmed, so no watched row is silently left unread."},"MarkedSpanResponse":{"properties":{"start":{"type":"integer","title":"Start"},"end":{"type":"integer","title":"End"}},"type":"object","required":["start","end"],"title":"MarkedSpanResponse","description":"Where one name sits inside a snippet, as two named offsets.\n\nNamed rather than a two-element list: a pair on the wire is positional, so a reader has to know\nwhich end came first and a transposition is invisible to every type on both sides. The browser used\nto check the length before trusting it, which is the same doubt written as a guard."},"MarketAbsenceReason":{"type":"string","enum":["no_register_for_market","register_outside_remit","history_shorter_than_window","nothing_published_in_period","not_extracted","not_read_yet"],"title":"MarketAbsenceReason","description":"Why a population is empty, in the reader's own terms — never a bare empty list.\n\nThe first two look identical from outside and are deliberately distinct, because only one of them\nis a question for anybody: no register connected is work for the platform operator, while a\nregister whose sector the group does not watch is the group's own remit doing what it was set to."},"MarketChipResponse":{"properties":{"country_code":{"type":"string","title":"Country Code"},"name":{"type":"string","title":"Name"},"regulator_abbreviations":{"items":{"type":"string"},"type":"array","title":"Regulator Abbreviations"},"supranational":{"type":"boolean","title":"Supranational","default":false},"registers_connected":{"type":"integer","title":"Registers Connected"},"authorisation_registers_connected":{"type":"integer","title":"Authorisation Registers Connected","default":0}},"type":"object","required":["country_code","name","regulator_abbreviations","registers_connected"],"title":"MarketChipResponse","description":"One offerable market. Carries an ISO code, never a flag glyph — the interface renders a chip."},"MarketComparisonResponse":{"properties":{"home":{"$ref":"#/components/schemas/ComparisonMarketResponse"},"target":{"$ref":"#/components/schemas/ComparisonMarketResponse"},"rows":{"items":{"$ref":"#/components/schemas/ComparisonRowResponse"},"type":"array","title":"Rows"},"counts":{"$ref":"#/components/schemas/VerdictCountsResponse"},"incremental":{"type":"integer","title":"Incremental"},"home_evidence_less":{"type":"boolean","title":"Home Evidence Less"},"target_evidence_less":{"type":"boolean","title":"Target Evidence Less"},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["home","target","rows","counts","incremental","home_evidence_less","target_evidence_less","simulated"],"title":"MarketComparisonResponse","description":"One completed comparison. `incremental` is New + Stricter, computed server-side."},"MarketComparisonRunRequest":{"properties":{"home_market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Home Market Id"},"target_market_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Market Id"}},"type":"object","title":"MarketComparisonRunRequest","description":"The pair to compare. Both are required, and they may not be the same market."},"MarketInsightChip":{"type":"string","enum":["most_active_holder","most_common_substance","least_common_substance","new_entrants","earliest_held_applications"],"title":"MarketInsightChip","description":"The five fixed questions a chip may ask. Anything else is a 422 from the enum itself.\n\n`EARLIEST_HELD_APPLICATIONS` is named for what it counts. It is deliberately not called a first\ngeneric: a register of pending applications drops a row when its procedure is decided, so the\nearliest row it holds is the earliest the platform holds and not the first ever filed."},"MarketInsightRequest":{"properties":{"chip":{"$ref":"#/components/schemas/MarketInsightChip"},"markets":{"items":{"type":"string"},"type":"array","title":"Markets"},"period":{"$ref":"#/components/schemas/MarketPeriod","default":"30d"},"period_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period From"},"period_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period To"}},"type":"object","required":["chip"],"title":"MarketInsightRequest","description":"Press one chip over the filter the screen is showing.\n\nAn enum and two filters. Nothing user-authored is in this request and there is nowhere to put any,\nwhich is what keeps this screen clear of the standing question about free text reaching a provider."},"MarketInsightResponse":{"properties":{"chip":{"$ref":"#/components/schemas/MarketInsightChip"},"figure":{"anyOf":[{"$ref":"#/components/schemas/InsightFigureResponse"},{"type":"null"}]},"columns":{"items":{"$ref":"#/components/schemas/InsightColumnResponse"},"type":"array","title":"Columns"},"rows":{"items":{"$ref":"#/components/schemas/InsightRowResponse"},"type":"array","title":"Rows"},"narration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narration"},"simulated":{"type":"boolean","title":"Simulated"},"data_version":{"type":"string","title":"Data Version"}},"type":"object","required":["chip","figure","columns","rows","narration","simulated","data_version"],"title":"MarketInsightResponse","description":"A figure, the rows behind it, and — if it arrived — one sentence about them.\n\n`narration` is nullable on purpose. The model is handed the figure table and nothing else, and the\nfigures render whether or not the sentence comes back, so the sentence can be dropped without the\nresponse losing anything."},"MarketOptionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"abbreviation":{"type":"string","title":"Abbreviation"},"country":{"type":"string","title":"Country"},"country_code":{"type":"string","title":"Country Code"},"sector":{"type":"string","title":"Sector"},"sector_label":{"type":"string","title":"Sector Label"}},"type":"object","required":["id","slug","abbreviation","country","country_code","sector","sector_label"],"title":"MarketOptionResponse","description":"One offerable market. Six fields — nothing the operator registry owns (no website, no language)."},"MarketOverviewAbsenceResponse":{"properties":{"reason":{"$ref":"#/components/schemas/MarketAbsenceReason"},"actionable_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actionable By"},"framework_markets":{"items":{"type":"string"},"type":"array","title":"Framework Markets"}},"type":"object","required":["reason"],"title":"MarketOverviewAbsenceResponse","description":"A named absence, and who can act on it.\n\nThe owner is on the wire rather than derived on the screen: two surfaces deciding for themselves\nwho a blank belongs to would eventually disagree, and a reader told to chase the wrong person is\nworse served than one told nothing."},"MarketOverviewPage":{"properties":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/ProductRecordRowResponse"},{"$ref":"#/components/schemas/HolderRowResponse"},{"$ref":"#/components/schemas/MentionRowResponse"},{"$ref":"#/components/schemas/AuthorisedProductRowResponse"}]},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"counts":{"$ref":"#/components/schemas/PopulationCountsResponse"},"registers":{"$ref":"#/components/schemas/ConnectedRegistersResponse"},"authorisation_registers":{"$ref":"#/components/schemas/ConnectedRegistersResponse"},"population":{"$ref":"#/components/schemas/MarketPopulation"},"absence":{"anyOf":[{"$ref":"#/components/schemas/MarketOverviewAbsenceResponse"},{"type":"null"}]},"markets":{"items":{"$ref":"#/components/schemas/MarketChipResponse"},"type":"array","title":"Markets"},"trends":{"anyOf":[{"$ref":"#/components/schemas/FilingTrendsResponse"},{"type":"null"}]},"anchored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anchored At"},"mention_window":{"anyOf":[{"$ref":"#/components/schemas/MentionWindowResponse"},{"type":"null"}]}},"type":"object","required":["items","total","page","size","pages","counts","registers","authorisation_registers","population","absence","markets","trends","anchored_at","mention_window"],"title":"MarketOverviewPage"},"MarketPeriod":{"type":"string","enum":["7d","30d","90d","12m","custom"],"title":"MarketPeriod","description":"The windows this screen offers. `CUSTOM` carries its own two dates from the request."},"MarketPopulation":{"type":"string","enum":["records","holders","mentions","authorised"],"title":"MarketPopulation","description":"Which of the three populations a board read is asking for.\n\nOne at a time, and the other two absent rather than empty: they are read independently and never\njoined, so returning all three would invite a reader to compare figures that were computed over\ndifferent things."},"MarketResultRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"product_name":{"type":"string","title":"Product Name"},"inn":{"type":"string","title":"Inn"},"applicant_name":{"type":"string","title":"Applicant Name"},"holder_name":{"type":"string","title":"Holder Name"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"register_abbreviation":{"type":"string","title":"Register Abbreviation"},"matched_in":{"$ref":"#/components/schemas/SearchMatchField"},"approximate":{"type":"boolean","title":"Approximate","default":false}},"type":"object","required":["id","product_name","inn","applicant_name","holder_name","published_at","register_abbreviation","matched_in"],"title":"MarketResultRow","description":"One register entry the term was found in, named the way the market overview names it.\n\nCarries the register's own words (`product_name`, `applicant_name`, `holder_name`) rather than the\nfolded keys that found it: the fold is how two spellings become one firm, not something a reader\nshould ever be shown. `register_abbreviation` is the authority's own short name, resolved from the\nscope the search already resolved rather than by a second read — spelled out rather than called\n`register`, which is a method on pydantic's own base class and would shadow it."},"MarketWithoutRegisterResponse":{"properties":{"country_code":{"type":"string","title":"Country Code"},"name":{"type":"string","title":"Name"},"supranational":{"type":"boolean","title":"Supranational"}},"type":"object","required":["country_code","name","supranational"],"title":"MarketWithoutRegisterResponse","description":"A market this reader may see that no application register speaks for."},"MeAffiliate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"entity_kind":{"$ref":"#/components/schemas/EntityKind","default":"office"}},"type":"object","required":["id","name","country"],"title":"MeAffiliate","description":"Affiliate identity + country for the `/me` view (deliberately not in the token).\n\nA department carries no country, so `country` is null exactly when `entity_kind` is a department."},"MeOrganisation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MeOrganisation","description":"Organisation identity for the `/me` view."},"MeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"organisation":{"anyOf":[{"$ref":"#/components/schemas/MeOrganisation"},{"type":"null"}]},"affiliate":{"anyOf":[{"$ref":"#/components/schemas/MeAffiliate"},{"type":"null"}]},"platform_operator":{"type":"boolean","title":"Platform Operator"},"entitled_scopes":{"items":{"$ref":"#/components/schemas/VisibilityScope"},"type":"array","title":"Entitled Scopes"}},"type":"object","required":["id","name","email","role","organisation","affiliate","platform_operator","entitled_scopes"],"title":"MeResponse","description":"Server-truth identity (`GET /auth/me`)."},"MemberDisplayStatus":{"type":"string","enum":["invited","active","blocked"],"title":"MemberDisplayStatus","description":"What the roster shows for one member — the lifecycle state with the block folded in.\n\nDistinct from `AccountStatus` on purpose. Blocking is an orthogonal timestamp, so the stored\nlifecycle state survives it; but a reader wants one word, and `blocked` is the one that matters\nwhen it applies. Merging the two into `AccountStatus` would lose the underlying state, and\nreusing `AccountStatus` for this field would make a blocked member unrepresentable."},"MemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"affiliate":{"anyOf":[{"$ref":"#/components/schemas/AffiliateRef"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/MemberDisplayStatus"},"last_sign_in":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sign In"}},"type":"object","required":["id","name","email","role","affiliate","status","last_sign_in"],"title":"MemberResponse","description":"A roster member. `status` and `last_sign_in` are derived by the service."},"MemberUpdateRequest":{"properties":{"role":{"anyOf":[{"$ref":"#/components/schemas/Role"},{"type":"null"}]},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},"type":"object","title":"MemberUpdateRequest","description":"Change a member's role and/or affiliate in one atomic act.\n\n`affiliate_id` may be sent alone (affiliate change, role unchanged). The shared role/affiliate\npairing rule is applied against the effective role.\n\n`role` is typed over the closed four-value vocabulary, so an unrecognised value is refused at the\nboundary rather than reaching a service that would have to re-decide what the vocabulary is."},"MentionDetailResponse":{"properties":{"name_key":{"type":"string","title":"Name Key"},"kind":{"$ref":"#/components/schemas/MentionKind"},"name":{"type":"string","title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"publications":{"items":{"$ref":"#/components/schemas/MentionPublicationResponse"},"type":"array","title":"Publications"}},"type":"object","required":["name_key","kind","name","role","publications"],"title":"MentionDetailResponse","description":"One named party, and every publication of the reader's that named it."},"MentionKind":{"type":"string","enum":["organisation","person","product"],"title":"MentionKind","description":"What a publication named: a body or firm, a person, or a product or substance.\n\nA property of the document rather than of any reader, which is why mentions live in the corpus\nplane beside the shared reading and carry no tenant column."},"MentionKindFilter":{"type":"string","enum":["all","organisation","person","product"],"title":"MentionKindFilter","description":"The mention facet, with its own `all` member rather than an absent value meaning everything."},"MentionPublicationResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"snippet":{"type":"string","title":"Snippet"},"marked_range":{"anyOf":[{"$ref":"#/components/schemas/MarkedSpanResponse"},{"type":"null"}]},"language":{"type":"string","title":"Language"},"language_disputed":{"type":"boolean","title":"Language Disputed"},"seen":{"type":"boolean","title":"Seen"}},"type":"object","required":["publication_id","title","regulator_abbreviation","published_at","snippet","marked_range","language","language_disputed","seen"],"title":"MentionPublicationResponse","description":"One publication that named a party, with the sentence and where the name sits inside it."},"MentionRowResponse":{"properties":{"name_key":{"type":"string","title":"Name Key"},"kind":{"$ref":"#/components/schemas/MentionKind"},"name":{"type":"string","title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"snippet":{"type":"string","title":"Snippet"},"publication_count":{"type":"integer","title":"Publication Count"},"seen":{"type":"boolean","title":"Seen"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"publication_title":{"type":"string","title":"Publication Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"language":{"type":"string","title":"Language"},"language_disputed":{"type":"boolean","title":"Language Disputed"}},"type":"object","required":["name_key","kind","name","role","snippet","publication_count","seen","published_at","publication_title","regulator_abbreviation","country_codes","language","language_disputed"],"title":"MentionRowResponse","description":"One named party, grouped across every publication that named it."},"MentionSort":{"type":"string","enum":["recent","name","mentioned"],"title":"MentionSort","description":"How the names list is ordered. Applied by the SERVER, over the whole population in the period.\n\nA sort the browser applied to one page ranked twenty-five names and labelled them the list: \"most\nrecent\" kept whatever order the page arrived in, and \"A to Z\" alphabetised a page rather than the names."},"MentionWindowResponse":{"properties":{"opens_at":{"type":"string","format":"date-time","title":"Opens At"},"closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closes At"},"anchored_at":{"type":"string","format":"date-time","title":"Anchored At"},"publications":{"type":"integer","title":"Publications"}},"type":"object","required":["opens_at","closes_at","anchored_at","publications"],"title":"MentionWindowResponse","description":"The days the names population was drawn from, and how many publications in them named anyone.\n\nThe names are measured back from NOW, unlike the register figures beside them, which are measured\nback from the last register read — see `domain/market_overview_rules.py:mention_window`. So the\ndates travel with the list, and the screen can say which days each figure describes."},"MonthlyFilingResponse":{"properties":{"month":{"type":"string","title":"Month"},"total":{"type":"integer","title":"Total"},"earliest_held":{"type":"integer","title":"Earliest Held"}},"type":"object","required":["month","total","earliest_held"],"title":"MonthlyFilingResponse","description":"One month of the window: everything filed, and how much of it led its reference product."},"MoreFromItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"type":"string","title":"Title En"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"}},"type":"object","required":["id","title_en","published_at"],"title":"MoreFromItem","description":"A compact same-regulator card in the detail \"more from\" list (in-scope only)."},"MyWorkCounts":{"properties":{"assigned_to_me":{"type":"integer","title":"Assigned To Me"},"assigned_by_me":{"type":"integer","title":"Assigned By Me"},"to_sign_off":{"type":"integer","title":"To Sign Off"},"my_office":{"type":"integer","title":"My Office"},"overdue":{"type":"integer","title":"Overdue"}},"type":"object","required":["assigned_to_me","assigned_by_me","to_sign_off","my_office","overdue"],"title":"MyWorkCounts","description":"The four tabs' figures and the overdue chip, all over open work, counted in one statement.\n\nEach tab's figure is its whole population — unmoved by the overdue narrowing, because the strip answers how\nmuch is there. `overdue` counts the list being looked at, by the backlog's rule, because the chip beside it\nanswers how much of THAT is late."},"MyWorkOffice":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyWorkOffice","description":"An office as My work names it."},"NamedCountResponse":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"},"ours":{"type":"boolean","title":"Ours","default":false}},"type":"object","required":["name","count"],"title":"NamedCountResponse","description":"One label and how many records carry it — every ranked bar list on this screen is these."},"NotRelevantReason":{"type":"string","enum":["not_our_product","not_our_market","already_covered","duplicate","other"],"title":"NotRelevantReason","description":"The optional reason chips beside a Not relevant decision. Never required (decision of 6 Oct 2026)."},"NotificationEmailType":{"type":"string","enum":["assignment","checklist_item_assigned","action_submitted","action_sent_back","action_closed","due_reminder","assigner_weekly_digest","triage_requested","escalation_raised","fyi_digest"],"title":"NotificationEmailType","description":"Every product email a person can switch off for themselves (Workflows v3, spec §12; RAD-125).\n\nOn or off per type, decided 8 Oct 2026 — no instant/digest choice. No stored row means on. The saved-view\ndigest is deliberately absent: each saved view already carries its own subscription, and a second switch\nover it would be two answers to one question. `checklist_item_assigned` is the RAD-116 message."},"NotificationPreference":{"properties":{"email_type":{"$ref":"#/components/schemas/NotificationEmailType"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["email_type","enabled"],"title":"NotificationPreference","description":"One email type and whether this person receives it."},"NotificationPreferencesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationPreference"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"NotificationPreferencesResponse","description":"Every switchable email type, in the vocabulary's order, each on unless the person turned it off."},"NotificationPreferencesUpdate":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationPreference"},"type":"array","maxItems":10,"title":"Items"}},"type":"object","required":["items"],"title":"NotificationPreferencesUpdate","description":"The switches to change. Types left out keep their current state; each type at most once."},"NudgeSkipReason":{"type":"string","enum":["too_soon","your_own"],"title":"NudgeSkipReason","description":"Why one action of a nudge was not part of any email."},"NudgeSkipped":{"properties":{"action_id":{"type":"string","format":"uuid","title":"Action Id"},"reason":{"$ref":"#/components/schemas/NudgeSkipReason"},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At"}},"type":"object","required":["action_id","reason","available_at"],"title":"NudgeSkipped"},"ObligationEditRequest":{"properties":{"title":{"type":"string","maxLength":2000,"minLength":1,"title":"Title"},"category":{"type":"string","maxLength":128,"minLength":1,"title":"Category"},"entity_scope":{"$ref":"#/components/schemas/EntityScope","default":"group"},"entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entity Ids"},"revision":{"type":"string","minLength":1,"title":"Revision"}},"additionalProperties":false,"type":"object","required":["title","category","revision"],"title":"ObligationEditRequest","description":"An edit, carrying the concurrency token the read handed out.\n\nThe token travels as the OPAQUE string the API emitted. A client that parses it into a date and\nre-serialises it loses microseconds, and the comparison then reports a fresh edit as stale — so the\ncontract is \"send back exactly what you were given\"."},"ObligationEntity":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"iso_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iso Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","iso_code","name"],"title":"ObligationEntity","description":"One office an obligation applies to, NAMED rather than counted.\n\n\"2 of 5\" tells a reader nothing they can act on: an obligation that follows a licence follows a site, and\nwhich site is the whole content of the fact."},"ObligationProposal":{"properties":{"proposal_id":{"type":"string","format":"uuid","title":"Proposal Id"},"selected":{"type":"boolean","title":"Selected"},"statement":{"type":"string","title":"Statement"},"category":{"type":"string","title":"Category"},"entity_scope":{"$ref":"#/components/schemas/EntityScope","default":"group"},"entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entity Ids"},"confidence":{"$ref":"#/components/schemas/ProposalConfidence","default":"worth_a_look"},"implied":{"type":"boolean","title":"Implied","default":false},"citation_section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation Section"},"citation_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Citation Page"},"duplicate_of_control_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Duplicate Of Control Id"},"duplicate_of_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicate Of Code"}},"additionalProperties":false,"type":"object","required":["proposal_id","selected","statement","category"],"title":"ObligationProposal","description":"One proposed obligation inside a draft — editable, checkable, and never a raw dict.\n\nThis is the stored shape as well as the wire shape: the draft's JSONB column holds a list of exactly\nthese, validated on the way in and on the way out, so nothing downstream reaches into an untyped mapping\nand guesses at a key.\n\nAn obligation is ONE statement and carries no children. `controls`, `no_control_found` and\n`review_frequency` are gone from this shape rather than merely hidden: the first two described a\nparent-and-child split the feature no longer has, and the third was a closed vocabulary nothing acted on —\na picker asking a reader to fill in a field that reached no reminder, no task and no marker.\n\n`selected` is the ONLY thing that decides what is added. `confidence` ranks the reader's attention and\n`implied` says the requirement was inferred rather than stated; neither gates anything.\n`duplicate_of_control_id` set means the proposal arrived unchecked and labelled — checking it replaces\nthat obligation rather than adding a second."},"ObligationProvenance":{"properties":{"document":{"type":"string","title":"Document"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page"}},"type":"object","required":["document","section","page"],"title":"ObligationProvenance","description":"Where an import proposed an obligation from. A citation, never an attachment."},"ObligationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"category":{"type":"string","title":"Category"},"entity_scope":{"$ref":"#/components/schemas/EntityScope"},"entities":{"items":{"$ref":"#/components/schemas/ObligationEntity"},"type":"array","title":"Entities"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/ObligationProvenance"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"revision":{"type":"string","title":"Revision"}},"type":"object","required":["id","code","title","category","entity_scope","entities","provenance","archived_at","revision"],"title":"ObligationResponse","description":"One obligation as the screen renders it after a write."},"ObligationResultRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"domain":{"type":"string","title":"Domain"},"status":{"type":"string","title":"Status"},"matched_in":{"$ref":"#/components/schemas/SearchMatchField"}},"type":"object","required":["id","code","title","domain","status","matched_in"],"title":"ObligationResultRow","description":"One live obligation the term was found in — its code, its title, and where it matched.\n\n`matched_in` carrying `document` is the one that answers a question the other surfaces cannot: it says\nthis obligation is here because the register it was imported from is named that, which is how a reader\nreaches a whole upload without the platform retaining the file."},"ObligationWriteRequest":{"properties":{"title":{"type":"string","maxLength":2000,"minLength":1,"title":"Title"},"category":{"type":"string","maxLength":128,"minLength":1,"title":"Category"},"entity_scope":{"$ref":"#/components/schemas/EntityScope","default":"group"},"entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entity Ids"}},"additionalProperties":false,"type":"object","required":["title","category"],"title":"ObligationWriteRequest","description":"What the add and edit dialogs send.\n\nDeliberately absent: `status`, because `met` / `under_review` come only from a matching pass and there is\ntherefore no field to refuse; and `code`, because it is assigned by the server one past the highest ever\nused for its prefix. A client that sends either is not refused — the fields simply do not exist here,\nwhich is a stronger guarantee than validation."},"OfficeAssessmentRefusal":{"type":"string","enum":["not_permitted","source_history","outside_remit","nothing_to_assess","already_run_today","pipeline_unavailable"],"title":"OfficeAssessmentRefusal","description":"Why this publication cannot be assessed for its waiting offices right now."},"OfficeAssessmentResponse":{"properties":{"offered":{"type":"boolean","title":"Offered"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/OfficeAssessmentRefusal"},{"type":"null"}]},"awaiting_offices":{"type":"integer","title":"Awaiting Offices"},"today_run":{"anyOf":[{"$ref":"#/components/schemas/OfficeAssessmentRunResponse"},{"type":"null"}]}},"type":"object","required":["offered","refusal","awaiting_offices","today_run"],"title":"OfficeAssessmentResponse","description":"Whether this publication can be assessed now for the offices waiting on it — the control's whole state.\n\nDecided by `domain/office_assessment_rules.py`, the same rule the write refuses by, so the screen holds no\ncondition of its own: `offered` false → no control at all; offered with a `refusal` → shown disabled with\nthat reason; no refusal → enabled. `awaiting_offices` counts the rows of this table that read \"Not assessed\nyet\". `today_run` is today's press, the one that consumed the day's allowance, when there is one."},"OfficeAssessmentRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"run_on":{"type":"string","format":"date","title":"Run On"},"status":{"$ref":"#/components/schemas/RunStatus"},"entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Entity Ids"},"assessed":{"type":"integer","title":"Assessed"},"failed":{"type":"integer","title":"Failed"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","publication_id","run_on","status","entity_ids","assessed","failed","error"],"title":"OfficeAssessmentRunResponse","description":"One press of \"assess for the waiting offices\" on a publication, and how far it has got.\n\n`entity_ids` are the offices the press asked for — the \"Not assessed yet\" rows at the moment it was made.\n`assessed` and `failed` count office units as they land; a queued press reads `pending` until a worker\ntakes it, and the screen polls this read rather than guessing when it is done."},"OfficeDecisionResponse":{"properties":{"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"affiliate_name":{"type":"string","title":"Affiliate Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"is_department":{"type":"boolean","title":"Is Department"},"status":{"anyOf":[{"$ref":"#/components/schemas/DecisionStatus"},{"type":"null"}]},"inherited":{"type":"boolean","title":"Inherited"},"decision":{"anyOf":[{"$ref":"#/components/schemas/DecisionResponse"},{"type":"null"}]},"publication_status":{"$ref":"#/components/schemas/PublicationStatus"},"closed_actions":{"type":"integer","title":"Closed Actions"},"total_actions":{"type":"integer","title":"Total Actions"},"archived":{"type":"boolean","title":"Archived"},"may_decide":{"type":"boolean","title":"May Decide"},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/SuggestionSnapshot"},{"type":"null"}]}},"type":"object","required":["affiliate_id","affiliate_name","is_head_office","is_department","status","inherited","decision","publication_status","closed_actions","total_actions","archived","may_decide","suggestion"],"title":"OfficeDecisionResponse","description":"One office's effective decision on a publication.\n\n`status` null is *to decide*. `inherited` true means the decision is head office's decision for all\noffices (\"(HQ)\"), in which case `decision` is head office's row rather than one of this office's own.\n`is_department` marks a department, which never inherits: it answers for itself.\n\n`publication_status` and the action counts are where the publication stands for this office, and\n`archived` whether it has left the default views (decided Not relevant or For information, or closed,\nthirty days ago or more) — all derived on this read, never stored. `suggestion` is RegRadar's suggestion\nto this office as it stands now, present only where `may_decide`; null there means the office has no\nassessment, and a snapshot whose own `suggestion` is null means the facts support no particular decision."},"OfficeStance":{"type":"string","enum":["relevant_here","not_relevant_here","not_asked"],"title":"OfficeStance","description":"Where a publication stands for the reader's own office, in one word, derived and never stored.\n\nOnly what this feature can derive. Later features add the states a judgement cannot produce — an\noffice asked anyway, work already open, a publication an office raised unasked — and because\nnothing here is persisted, adding them needs no migration and no backfill."},"OperatorGrantRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"OperatorGrantRequest","description":"Make a member of the operators' own organisation a platform operator."},"OperatorListResponse":{"properties":{"operators":{"items":{"$ref":"#/components/schemas/OperatorResponse"},"type":"array","title":"Operators"}},"type":"object","required":["operators"],"title":"OperatorListResponse","description":"Every account holding the platform-operator role, oldest first."},"OperatorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"}},"type":"object","required":["id","email","name","organisation_id"],"title":"OperatorResponse","description":"One account holding the platform-operator role."},"OperatorTransferRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"OperatorTransferRequest","description":"Move the platform-operator role to one account and take it from every other."},"OrganisationCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"first_admin_email":{"type":"string","format":"email","title":"First Admin Email"}},"type":"object","required":["name","first_admin_email"],"title":"OrganisationCreateRequest","description":"Operator provisioning a new organisation + its first admin."},"OrganisationDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/OrganisationStatus"},"member_count":{"type":"integer","title":"Member Count"},"administrators":{"items":{"$ref":"#/components/schemas/AdministratorResponse"},"type":"array","title":"Administrators"},"first_admin_invitation":{"anyOf":[{"$ref":"#/components/schemas/FirstAdminInvitationResponse"},{"type":"null"}]}},"type":"object","required":["id","name","status","member_count","administrators","first_admin_invitation"],"title":"OrganisationDetailResponse","description":"Bounded organisation detail: identity + lifecycle + admins + bootstrap invitation only."},"OrganisationProvisioned":{"properties":{"organisation":{"$ref":"#/components/schemas/ProvisionedOrganisation"},"invitation":{"$ref":"#/components/schemas/ProvisionedInvitation"},"link":{"type":"string","title":"Link"}},"type":"object","required":["organisation","invitation","link"],"title":"OrganisationProvisioned","description":"Bootstrap response — org + pending hq_admin invitation + acceptance link."},"OrganisationStatus":{"type":"string","enum":["active","suspended"],"title":"OrganisationStatus","description":"Whether an organisation is currently able to sign anybody in.\n\nSuspension is an orthogonal `organisations.suspended_at` timestamp, so this is the one word the\noperator console shows for it rather than a second stored column."},"OrganisationSummaryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count"},"status":{"$ref":"#/components/schemas/OrganisationStatus"},"first_admin_invitation_status":{"anyOf":[{"$ref":"#/components/schemas/InvitationStatus"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","member_count","status","first_admin_invitation_status","created_at"],"title":"OrganisationSummaryResponse","description":"One row in the console list (and the suspend/resume response)."},"OverdueRule":{"type":"string","enum":["backlog","oversight"],"title":"OverdueRule","description":"Which of the two predicates below a reader is asking by — a NAME for one, never a third rule.\n\nThe backlog's overdue chip asks by `backlog`. A figure on the oversight screen is opened as a list by\n`oversight`, because that figure was counted by the stricter rule and the list it opens has to hold\nthe same workflows: a list asked by the other rule would be a day short of the number that opened it."},"OversightActionTilesResponse":{"properties":{"open":{"type":"integer","title":"Open"},"overdue":{"type":"integer","title":"Overdue"},"awaiting_sign_off":{"type":"integer","title":"Awaiting Sign Off"},"undecided":{"type":"integer","title":"Undecided"},"median_days_to_decide":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Days To Decide"}},"type":"object","required":["open","overdue","awaiting_sign_off","undecided","median_days_to_decide"],"title":"OversightActionTilesResponse","description":"The five headline figures of the v3 screen.\n\n`open`, `overdue` and `awaiting_sign_off` are the state of the work now; `undecided` counts the\npublications undecided by at least one office, each once — not the sum of the office rows;\n`median_days_to_decide` is null when no decision was first taken in the period — nothing measured, not an\ninstant answer."},"OversightActionsResponse":{"properties":{"period":{"$ref":"#/components/schemas/OversightPeriodResponse"},"undecided_after_days":{"type":"integer","title":"Undecided After Days"},"tiles":{"$ref":"#/components/schemas/OversightActionTilesResponse"},"offices":{"items":{"$ref":"#/components/schemas/OversightOfficeRowResponse"},"type":"array","title":"Offices"}},"type":"object","required":["period","undecided_after_days","tiles","offices"],"title":"OversightActionsResponse","description":"The v3 oversight screen in one read-only response, recomputed per request from stored rows."},"OversightActivityItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"actor_name":{"type":"string","title":"Actor Name"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Title"}},"type":"object","required":["id","event_type","actor_name","occurred_at","workflow_id","workflow_title"],"title":"OversightActivityItem","description":"One line of the recent pulse.\n\n`workflow_id` and `workflow_title` are present only for the five workflow event types; the three\ntriage types carry null and the interface renders no link for them. `event_type` is a plain string so\nan entry a later feature writes still renders, as a neutral line."},"OversightAffiliateRow":{"properties":{"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"open":{"type":"integer","title":"Open"},"overdue":{"type":"integer","title":"Overdue"},"triage_pending":{"type":"integer","title":"Triage Pending"},"completed":{"type":"integer","title":"Completed"},"median_response_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Response Days"}},"type":"object","required":["affiliate_id","name","country","open","overdue","triage_pending","completed","median_response_days"],"title":"OversightAffiliateRow","description":"One affiliate's accountability row. An affiliate with no activity is a real zero row."},"OversightDistribution":{"properties":{"by_priority":{"items":{"$ref":"#/components/schemas/OversightPriorityBar"},"type":"array","title":"By Priority"},"by_status":{"items":{"$ref":"#/components/schemas/OversightStatusBar"},"type":"array","title":"By Status"}},"type":"object","required":["by_priority","by_status"],"title":"OversightDistribution","description":"Both breakdowns of the same population, so each sums to the total workflow count."},"OversightNudgeRequest":{"properties":{"office_id":{"type":"string","format":"uuid","title":"Office Id"}},"additionalProperties":false,"type":"object","required":["office_id"],"title":"OversightNudgeRequest","description":"Which office's open overdue work to chase."},"OversightNudgeResponse":{"properties":{"reminded":{"type":"integer","title":"Reminded"},"people":{"type":"integer","title":"People"},"skipped_recently_asked":{"type":"integer","title":"Skipped Recently Asked"}},"type":"object","required":["reminded","people","skipped_recently_asked"],"title":"OversightNudgeResponse","description":"What one Nudge did: reminders sent, to how many people, and how many asks were skipped as too recent."},"OversightOfficeRowResponse":{"properties":{"office_id":{"type":"string","format":"uuid","title":"Office Id"},"name":{"type":"string","title":"Name"},"is_head_office":{"type":"boolean","title":"Is Head Office"},"is_department":{"type":"boolean","title":"Is Department"},"undecided":{"type":"integer","title":"Undecided"},"open":{"type":"integer","title":"Open"},"overdue":{"type":"integer","title":"Overdue"},"awaiting_sign_off":{"type":"integer","title":"Awaiting Sign Off"},"closed":{"type":"integer","title":"Closed"},"on_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"On Time"}},"type":"object","required":["office_id","name","is_head_office","is_department","undecided","open","overdue","awaiting_sign_off","closed","on_time"],"title":"OversightOfficeRowResponse","description":"One office: its undecided publications and the actions its owners hold.\n\n`on_time` is the share (0..1) of the work closed in the period on or before its due date, work without a\ndue date left out; null when there is nothing to measure, which the screen shows as a dash. A department's\n`undecided` counts only what its own assessment found relevant, because that is all it owes a decision on."},"OversightPeriodResponse":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"}},"type":"object","required":["start","end"],"title":"OversightPeriodResponse","description":"The calendar days (UTC, inclusive) the period-bound figures were counted over, defaults applied."},"OversightPriorityBar":{"properties":{"priority":{"$ref":"#/components/schemas/Priority"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["priority","count"],"title":"OversightPriorityBar","description":"One urgency bar. Always three, even at zero."},"OversightResponse":{"properties":{"tiles":{"$ref":"#/components/schemas/OversightTilesResponse"},"affiliates":{"items":{"$ref":"#/components/schemas/OversightAffiliateRow"},"type":"array","title":"Affiliates"},"distribution":{"$ref":"#/components/schemas/OversightDistribution"},"triage":{"$ref":"#/components/schemas/OversightTriageTotals"},"recent_activity":{"items":{"$ref":"#/components/schemas/OversightActivityItem"},"type":"array","title":"Recent Activity"}},"type":"object","required":["tiles","affiliates","distribution","triage","recent_activity"],"title":"OversightResponse","description":"The whole screen in one read-only response, recomputed per request from stored rows."},"OversightStatusBar":{"properties":{"status":{"$ref":"#/components/schemas/WorkflowStatus"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["status","count"],"title":"OversightStatusBar","description":"One status bar. Always three, even at zero."},"OversightTilesResponse":{"properties":{"open":{"type":"integer","title":"Open"},"total":{"type":"integer","title":"Total"},"overdue":{"type":"integer","title":"Overdue"},"high_urgency":{"type":"integer","title":"High Urgency"},"median_pending_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Pending Days"},"average_pending_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Pending Days"},"completed":{"type":"integer","title":"Completed"}},"type":"object","required":["open","total","overdue","high_urgency","median_pending_days","average_pending_days","completed"],"title":"OversightTilesResponse","description":"The five headline figures, plus the two hints two of them carry.\n\n`total` is the Open tile's hint and `average_pending_days` the median tile's; both medians are null for\nan organisation with no workflows, which is a real answer rather than a zero anyone earned."},"OversightTriageTotals":{"properties":{"pending":{"type":"integer","title":"Pending"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["pending","total"],"title":"OversightTriageTotals","description":"The organisation's all-time triage pair, shown as the distribution panel's footer."},"Page_ActionRow_Customized":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActionRow"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"counts":{"$ref":"#/components/schemas/MyWorkCounts"},"my_office":{"anyOf":[{"$ref":"#/components/schemas/MyWorkOffice"},{"type":"null"}]}},"type":"object","required":["items","total","page","size","pages","counts","my_office"],"title":"Page[ActionRow]Customized"},"Page_AssessmentReportRow_Customized":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssessmentReportRow"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"figures":{"$ref":"#/components/schemas/ReportFiguresResponse"},"facets":{"$ref":"#/components/schemas/ReportFacetsResponse"},"tab_counts":{"$ref":"#/components/schemas/TabCounts"},"coverage_notes":{"items":{"$ref":"#/components/schemas/CoverageNote"},"type":"array","title":"Coverage Notes"},"coverage_gap_line":{"type":"string","title":"Coverage Gap Line"},"absence":{"anyOf":[{"$ref":"#/components/schemas/ListAbsence"},{"type":"null"}]}},"type":"object","required":["items","total","page","size","pages","figures","facets","tab_counts","coverage_notes","coverage_gap_line","absence"],"title":"Page[AssessmentReportRow]Customized"},"Page_AuditEntryResponse_Customized":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditEntryResponse"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[AuditEntryResponse]Customized"},"Page_PublicationRowResponse_Customized":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicationRowResponse"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"counts":{"$ref":"#/components/schemas/IntakeCountsResponse"},"by_source":{"items":{"$ref":"#/components/schemas/SourceTallyResponse"},"type":"array","title":"By Source"},"severities":{"items":{"type":"string"},"type":"array","title":"Severities"},"status_counts":{"$ref":"#/components/schemas/StatusCountsResponse"}},"type":"object","required":["items","total","page","size","pages","counts","by_source","severities","status_counts"],"title":"Page[PublicationRowResponse]Customized"},"Page_WorkflowRow_Customized":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowRow"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"},"counts":{"$ref":"#/components/schemas/WorkflowStatusCounts"},"overdue":{"type":"integer","title":"Overdue"}},"type":"object","required":["items","total","page","size","pages","counts","overdue"],"title":"Page[WorkflowRow]Customized"},"PassageCitationResponse":{"properties":{"passage_id":{"type":"string","title":"Passage Id"},"authority":{"type":"string","title":"Authority"},"document_title":{"type":"string","title":"Document Title"},"source_url":{"type":"string","title":"Source Url"}},"type":"object","required":["passage_id","authority","document_title","source_url"],"title":"PassageCitationResponse","description":"The guidance a verdict rests on. Present only when the passage was in that market's window."},"PasswordChangeRequest":{"properties":{"current_password":{"type":"string","minLength":1,"title":"Current Password"},"new_password":{"type":"string","minLength":1,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChangeRequest","description":"Logged-in password change — current password required."},"PasswordPolicyResponse":{"properties":{"min_length":{"type":"integer","title":"Min Length"},"max_length":{"type":"integer","title":"Max Length"},"rules":{"items":{"$ref":"#/components/schemas/PasswordPolicyRule"},"type":"array","title":"Rules"}},"type":"object","required":["min_length","max_length","rules"],"title":"PasswordPolicyResponse","description":"The password policy the SPA renders rule-by-rule."},"PasswordPolicyRule":{"properties":{"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"}},"type":"object","required":["key","description"],"title":"PasswordPolicyRule","description":"One rule of the served password policy."},"PasswordResetConfirmRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"},"new_password":{"type":"string","minLength":1,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"PasswordResetConfirmRequest","description":"Reset confirmation — the emailed link token plus the chosen new password."},"PendingApplicationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"product_name":{"type":"string","title":"Product Name"},"inn":{"type":"string","title":"Inn"},"active_substance":{"type":"string","title":"Active Substance"},"strength":{"type":"string","title":"Strength"},"pharmaceutical_form":{"type":"string","title":"Pharmaceutical Form"},"applicant_name":{"type":"string","title":"Applicant Name"},"holder_name":{"type":"string","title":"Holder Name"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"listing_state":{"$ref":"#/components/schemas/ListingState"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["id","product_name","inn","active_substance","strength","pharmaceutical_form","applicant_name","holder_name","published_at","listing_state","checked_at","count"],"title":"PendingApplicationResponse","description":"One application a register holds for the substance, as the register printed it."},"PendingMarketResponse":{"properties":{"country_code":{"type":"string","title":"Country Code"},"name":{"type":"string","title":"Name"},"supranational":{"type":"boolean","title":"Supranational"},"verdict":{"$ref":"#/components/schemas/PendingVerdict"},"registers":{"items":{"$ref":"#/components/schemas/PendingRegisterResponse"},"type":"array","title":"Registers"}},"type":"object","required":["country_code","name","supranational","verdict","registers"],"title":"PendingMarketResponse","description":"One market's verdict for the substance, and the registers it rests on."},"PendingRegisterResponse":{"properties":{"register_name":{"type":"string","title":"Register Name"},"register_abbreviation":{"type":"string","title":"Register Abbreviation"},"last_full_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Full Read At"},"failing":{"type":"boolean","title":"Failing"},"applications":{"items":{"$ref":"#/components/schemas/PendingApplicationResponse"},"type":"array","title":"Applications"},"more":{"type":"boolean","title":"More"}},"type":"object","required":["register_name","register_abbreviation","last_full_read_at","failing","applications","more"],"title":"PendingRegisterResponse","description":"One application register speaking for the market, and what it holds for the substance."},"PendingVerdict":{"type":"string","enum":["on_latest_list","not_confirmed","not_on_latest_list","no_register"],"title":"PendingVerdict","description":"What the platform can say about one market for one substance."},"PopulationCountsResponse":{"properties":{"records":{"type":"integer","title":"Records"},"holders":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Holders"},"mentions":{"type":"integer","title":"Mentions"},"mentions_traversed":{"type":"integer","title":"Mentions Traversed"},"mentions_publications":{"type":"integer","title":"Mentions Publications"},"earliest_held":{"type":"integer","title":"Earliest Held"},"authorised":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authorised"},"on_our_products":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"On Our Products"}},"type":"object","required":["records","holders","mentions","mentions_traversed","mentions_publications","earliest_held"],"title":"PopulationCountsResponse","description":"The figures above the board, from one read, each equal to what its own tab holds.\n\nNone of them is a tally of returned rows. `mentions_traversed` is the cost of the one figure that\ncannot be an aggregate, reported so the day the walk stops being affordable is measured rather\nthan argued about.\n\nThe last two are not populations and have no tab. They are readings OF the records population —\nhow much of it leads a queue, and how much of it touches what this reader's office sells — and\nthey sit here rather than in their own shape because they come out of the same one read."},"Priority":{"type":"string","enum":["low","medium","high"],"title":"Priority","description":"Generic priority scale."},"ProductAttributeResponse":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"}},"type":"object","required":["label","value"],"title":"ProductAttributeResponse","description":"One supplementary attribute row — context only, and never an assessment input."},"ProductProfileResponse":{"properties":{"name":{"type":"string","title":"Name"},"inn":{"type":"string","title":"Inn"},"brand":{"type":"string","title":"Brand"},"dosage_form":{"type":"string","title":"Dosage Form"},"strengths":{"type":"string","title":"Strengths"},"bcs_class":{"type":"string","title":"Bcs Class"},"pharmacopoeia_claimed":{"type":"string","title":"Pharmacopoeia Claimed"},"nitrosamine_assessment":{"type":"string","title":"Nitrosamine Assessment"},"container_closure":{"type":"string","title":"Container Closure"},"reference_products":{"items":{"$ref":"#/components/schemas/ExtractedReferenceResponse"},"type":"array","title":"Reference Products"},"excipients":{"items":{"$ref":"#/components/schemas/ExtractedExcipientResponse"},"type":"array","title":"Excipients"},"impurities":{"items":{"$ref":"#/components/schemas/ExtractedImpurityResponse"},"type":"array","title":"Impurities"},"dissolution":{"$ref":"#/components/schemas/ExtractedDissolutionResponse"},"stability":{"$ref":"#/components/schemas/ExtractedStabilityResponse"},"source_modules":{"items":{"type":"string"},"type":"array","title":"Source Modules"},"attributes":{"items":{"$ref":"#/components/schemas/ProductAttributeResponse"},"type":"array","title":"Attributes"},"source_label":{"type":"string","title":"Source Label"},"truncated":{"type":"boolean","title":"Truncated"},"low_confidence":{"type":"boolean","title":"Low Confidence"},"missing_fields":{"items":{"type":"string"},"type":"array","title":"Missing Fields"},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["name","inn","brand","dosage_form","strengths","bcs_class","pharmacopoeia_claimed","nitrosamine_assessment","container_closure","reference_products","excipients","impurities","dissolution","stability","source_modules","attributes","source_label","truncated","low_confidence","missing_fields","simulated"],"title":"ProductProfileResponse","description":"An extracted product. Absent fields are empty, never invented values."},"ProductRecordDetailResponse":{"properties":{"record":{"$ref":"#/components/schemas/ProductRecordRowResponse"},"register_fields":{"items":{"$ref":"#/components/schemas/RegisterFieldResponse"},"type":"array","title":"Register Fields"},"source":{"$ref":"#/components/schemas/RecordSourceResponse"},"reference_cohort":{"items":{"$ref":"#/components/schemas/ProductRecordRowResponse"},"type":"array","title":"Reference Cohort"}},"type":"object","required":["record","register_fields","source","reference_cohort"],"title":"ProductRecordDetailResponse","description":"One record in full: the row, every published field, its register, and the queue it sits in."},"ProductRecordRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"external_id":{"type":"string","title":"External Id"},"record_kind":{"type":"string","title":"Record Kind"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested At"},"product_name":{"type":"string","title":"Product Name"},"inn":{"type":"string","title":"Inn"},"inn_key":{"type":"string","title":"Inn Key"},"active_substance":{"type":"string","title":"Active Substance"},"strength":{"type":"string","title":"Strength"},"pharmaceutical_form":{"type":"string","title":"Pharmaceutical Form"},"reference_product":{"type":"string","title":"Reference Product"},"reference_strength":{"type":"string","title":"Reference Strength"},"reference_form":{"type":"string","title":"Reference Form"},"applicant_name":{"type":"string","title":"Applicant Name"},"holder_name":{"type":"string","title":"Holder Name"},"holder_key":{"type":"string","title":"Holder Key"},"position":{"anyOf":[{"$ref":"#/components/schemas/RecordPositionResponse"},{"type":"null"}]},"substance_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Substance Total"},"earliest_held":{"type":"boolean","title":"Earliest Held"},"listing_state":{"$ref":"#/components/schemas/ListingState"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"seen":{"type":"boolean","title":"Seen"},"market_codes":{"items":{"type":"string"},"type":"array","title":"Market Codes"},"register_abbreviation":{"type":"string","title":"Register Abbreviation"},"our_product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Our Product"}},"type":"object","required":["id","external_id","record_kind","published_at","requested_at","product_name","inn","inn_key","active_substance","strength","pharmaceutical_form","reference_product","reference_strength","reference_form","applicant_name","holder_name","holder_key","position","substance_total","earliest_held","listing_state","checked_at","seen","market_codes","register_abbreviation"],"title":"ProductRecordRowResponse","description":"One register row as the board renders it.\n\n`earliest_held` is a bool with a careful name. It says this is the earliest application the\nplatform HOLDS for its reference product — nothing here is ever called a first generic, because a\nregister that drops decided procedures cannot support that claim."},"ProposalConfidence":{"type":"string","enum":["high","worth_a_look","check_this_one"],"title":"ProposalConfidence","description":"How clearly the document stated a proposed obligation. Ranks attention and decides NOTHING.\n\nIt never gates what is added — only the reviewer's checkbox does that. Ordering the review screen by this\ninstead of by document order would sink exactly the rows the screen exists to have looked at."},"ProvisionedInvitation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/Role"},"status":{"$ref":"#/components/schemas/InvitationStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","email","role","status","expires_at"],"title":"ProvisionedInvitation","description":"The first-admin invitation created alongside the organisation."},"ProvisionedOrganisation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ProvisionedOrganisation","description":"The created organisation."},"PublicationDecisionsResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"reader_office_id":{"type":"string","format":"uuid","title":"Reader Office Id"},"can_decide_for_all":{"type":"boolean","title":"Can Decide For All"},"offices":{"items":{"$ref":"#/components/schemas/OfficeDecisionResponse"},"type":"array","title":"Offices"}},"type":"object","required":["publication_id","reader_office_id","can_decide_for_all","offices"],"title":"PublicationDecisionsResponse","description":"Every office's effective decision on one publication, head office first.\n\n`reader_office_id` is the office the reader decides for by default (`EntityScopeService.reader_office`),\nand `can_decide_for_all` whether they hold an HQ role — what the \"Deciding for\" control is built from."},"PublicationDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"type":"string","title":"Title En"},"title_original":{"type":"string","title":"Title Original"},"body_en":{"type":"string","title":"Body En"},"body_original":{"type":"string","title":"Body Original"},"language":{"type":"string","title":"Language"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"amended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Amended At"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"source_url":{"type":"string","title":"Source Url"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"translation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation Status"},"language_disputed":{"type":"boolean","title":"Language Disputed"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"regulator":{"$ref":"#/components/schemas/RegulatorRefResponse"},"tags":{"items":{"$ref":"#/components/schemas/TagResponse"},"type":"array","title":"Tags"},"enrichment":{"anyOf":[{"$ref":"#/components/schemas/EnrichmentResponse"},{"type":"null"}]},"group_peak":{"anyOf":[{"$ref":"#/components/schemas/GroupPeakResponse"},{"type":"null"}]},"absence":{"anyOf":[{"$ref":"#/components/schemas/AssessmentAbsenceResponse"},{"type":"null"}]},"viewer_count":{"type":"integer","title":"Viewer Count"},"more_from":{"items":{"$ref":"#/components/schemas/MoreFromItem"},"type":"array","title":"More From"},"control_matches":{"items":{"$ref":"#/components/schemas/ControlMatchRef"},"type":"array","title":"Control Matches"},"screening":{"$ref":"#/components/schemas/ScreeningStateResponse"},"workflows":{"items":{"$ref":"#/components/schemas/PublicationWorkflowRef"},"type":"array","title":"Workflows"},"what_changed":{"anyOf":[{"$ref":"#/components/schemas/WhatChangedResponse"},{"type":"null"}]},"documents":{"items":{"$ref":"#/components/schemas/AttachedDocumentResponse"},"type":"array","title":"Documents"},"bookmark":{"anyOf":[{"$ref":"#/components/schemas/BookmarkStateResponse"},{"type":"null"}]}},"type":"object","required":["id","title_en","title_original","body_en","body_original","language","published_at","amended_at","effective_at","first_seen_at","source_url","ai_simulated","translation_status","language_disputed","severity","regulator","tags","enrichment","group_peak","absence","viewer_count","more_from","control_matches","screening","workflows","what_changed","documents","bookmark"],"title":"PublicationDetailResponse","description":"The reading view: both-language content, corpus flags, the reader office's assessment or null, more-from."},"PublicationEntityAssessmentsResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"items":{"items":{"$ref":"#/components/schemas/EntityAssessmentResponse"},"type":"array","title":"Items"},"reach":{"$ref":"#/components/schemas/ReachChainResponse"},"office_assessment":{"$ref":"#/components/schemas/OfficeAssessmentResponse"}},"type":"object","required":["publication_id","items","reach","office_assessment"],"title":"PublicationEntityAssessmentsResponse","description":"Every office of the group beside one publication, the reader's own office first."},"PublicationIdsResponse":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Publication Ids"}},"type":"object","required":["publication_ids"],"title":"PublicationIdsResponse","description":"Every publication one library question answers, in the reader's order — what \"Select all N\" takes.\n\nA bulk act is handed these identifiers, not the question re-run when it lands: a list re-asked later can\nhold a row nobody saw (an arrival, or a row another office's decision moved onto this tab)."},"PublicationRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"type":"string","title":"Title En"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"amended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Amended At"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"language":{"type":"string","title":"Language"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"regulator":{"$ref":"#/components/schemas/RegulatorRefResponse"},"tags":{"items":{"$ref":"#/components/schemas/TagResponse"},"type":"array","title":"Tags"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"key_points":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Key Points"},"key_points_simulated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Key Points Simulated"},"relevance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance"},"relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Relevant"},"critical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critical"},"simulated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulated"},"translation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation Status"},"language_disputed":{"type":"boolean","title":"Language Disputed"},"absence":{"anyOf":[{"$ref":"#/components/schemas/AssessmentAbsenceResponse"},{"type":"null"}]},"cleared_reason":{"anyOf":[{"$ref":"#/components/schemas/ClearedReasonResponse"},{"type":"null"}]},"binds_countries":{"items":{"type":"string"},"type":"array","title":"Binds Countries"},"stance":{"$ref":"#/components/schemas/OfficeStance"},"screening":{"$ref":"#/components/schemas/ScreeningStateResponse"},"control_matches":{"items":{"$ref":"#/components/schemas/ControlMatchRef"},"type":"array","title":"Control Matches"},"flagged_by":{"items":{"$ref":"#/components/schemas/EntityFlagResponse"},"type":"array","title":"Flagged By"},"group_peak":{"anyOf":[{"$ref":"#/components/schemas/GroupPeakResponse"},{"type":"null"}]},"seen":{"type":"boolean","title":"Seen"},"viewer_count":{"type":"integer","title":"Viewer Count"},"bookmark":{"anyOf":[{"$ref":"#/components/schemas/BookmarkStateResponse"},{"type":"null"}]},"decision":{"$ref":"#/components/schemas/RowDecisionResponse"}},"type":"object","required":["id","title_en","published_at","amended_at","effective_at","first_seen_at","language","severity","regulator","tags","summary","key_points","key_points_simulated","relevance","relevant","critical","simulated","translation_status","language_disputed","absence","cleared_reason","binds_countries","stance","screening","control_matches","flagged_by","group_peak","seen","viewer_count","bookmark","decision"],"title":"PublicationRowResponse","description":"One library row: corpus fields, regulator, tags, the reader office's assessment slice and view signals."},"PublicationStatus":{"type":"string","enum":["to_decide","for_information","not_relevant","in_action","closed"],"title":"PublicationStatus","description":"A publication's status for one office. Derived on every read; never stored."},"PublicationTriageResponse":{"properties":{"records":{"items":{"$ref":"#/components/schemas/TriageRecordSummary"},"type":"array","title":"Records"},"can_push":{"type":"boolean","title":"Can Push"},"push_targets":{"items":{"$ref":"#/components/schemas/AffiliateTargetResponse"},"type":"array","title":"Push Targets"}},"type":"object","required":["records","can_push","push_targets"],"title":"PublicationTriageResponse","description":"The cross-affiliate summary for one publication: read-only for everyone, and never a responder.\n\n`records` lists every affiliate that has a record, not only the caller's own. `push_targets` is present\nonly for a caller who may push; for everyone else it is empty, because to them it would just be the\naffiliate directory."},"PublicationWorkflowRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"opened_at":{"type":"string","format":"date-time","title":"Opened At"},"opened_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened By"},"closure":{"anyOf":[{"$ref":"#/components/schemas/ScreeningClosureResponse"},{"type":"null"}]},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"withdrawn":{"type":"boolean","title":"Withdrawn"}},"type":"object","required":["id","title","status","opened_at","opened_by","closure","owner_name","target_date","withdrawn"],"title":"PublicationWorkflowRef","description":"One case file as the publication's screen lists it — enough to render it and open the right one."},"PublicationsExportRequest":{"properties":{"publication_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Publication Ids"}},"type":"object","required":["publication_ids"],"title":"PublicationsExportRequest","description":"The publications the screen is rendering, in its order; over the bound is refused, never truncated."},"QueueCounts":{"properties":{"new":{"type":"integer","title":"New"},"open":{"type":"integer","title":"Open"},"closed":{"type":"integer","title":"Closed"}},"type":"object","required":["new","open","closed"],"title":"QueueCounts","description":"The numbers the tabs and the navigation badge show."},"QueuedSuggestionResponse":{"properties":{"suggestion":{"$ref":"#/components/schemas/SourceSuggestionResponse"},"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"organisation_name":{"type":"string","title":"Organisation Name"},"suggester_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggester Name"},"suggester_email":{"type":"string","title":"Suggester Email"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"same_site_source":{"anyOf":[{"$ref":"#/components/schemas/SourceRef"},{"type":"null"}]}},"type":"object","required":["suggestion","organisation_id","organisation_name","suggester_name","suggester_email","source_id","same_site_source"],"title":"QueuedSuggestionResponse","description":"One row of the operator's queue: the suggestion as its author sees it, plus who sent it and from where."},"RadarCatalogResponse":{"properties":{"themes":{"items":{"$ref":"#/components/schemas/RadarCatalogRow"},"type":"array","title":"Themes"},"total_count":{"type":"integer","title":"Total Count"},"rising_count":{"type":"integer","title":"Rising Count"},"cross_regulator_count":{"type":"integer","title":"Cross Regulator Count"},"unfiltered_count":{"type":"integer","title":"Unfiltered Count"},"reader":{"$ref":"#/components/schemas/RadarReaderTopics"},"run":{"anyOf":[{"$ref":"#/components/schemas/RadarRunSummary"},{"type":"null"}]},"can_recompute":{"type":"boolean","title":"Can Recompute"}},"type":"object","required":["themes","total_count","rising_count","cross_regulator_count","unfiltered_count","reader","run","can_recompute"],"title":"RadarCatalogResponse","description":"The radar screen's one read: the visible catalog, its header counts and the run readout."},"RadarCatalogRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"summary":{"type":"string","title":"Summary"},"narrative":{"type":"string","title":"Narrative"},"sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector Id"},"sector_label":{"type":"string","title":"Sector Label"},"horizon":{"$ref":"#/components/schemas/ThemeHorizon"},"velocity":{"$ref":"#/components/schemas/ThemeVelocity"},"signal_score":{"type":"number","title":"Signal Score"},"signal_percent":{"type":"integer","title":"Signal Percent"},"breadth":{"type":"integer","title":"Breadth"},"publication_count":{"type":"integer","title":"Publication Count"},"growth":{"type":"number","title":"Growth"},"prevalence":{"type":"number","title":"Prevalence"},"recency":{"type":"number","title":"Recency"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"regulators":{"items":{"$ref":"#/components/schemas/RadarRegulatorRef"},"type":"array","title":"Regulators"},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"matched_topics":{"items":{"$ref":"#/components/schemas/RadarTopicMatch"},"type":"array","title":"Matched Topics"}},"type":"object","required":["id","name","summary","narrative","sector_id","sector_label","horizon","velocity","signal_score","signal_percent","breadth","publication_count","growth","prevalence","recency","ai_simulated","regulators","first_seen_at","last_seen_at","matched_topics"],"title":"RadarCatalogRow","description":"A theme as the radar screen lists it, with the reader's own topics it is about.\n\nOnly the screen's read carries this. The brief and Ask read the plain row, because which topics one office\nwatches is not a property of the theme and would mean nothing in a folded answer."},"RadarReaderTopics":{"properties":{"office_name":{"type":"string","title":"Office Name"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"}},"type":"object","required":["office_name","topics"],"title":"RadarReaderTopics","description":"The office the reader reads as and the topics it watches — what \"my topics\" narrows to."},"RadarRegulatorRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"abbreviation":{"type":"string","title":"Abbreviation"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["id","abbreviation","name","country","source_type"],"title":"RadarRegulatorRef","description":"One authority discussing a theme."},"RadarRunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"anchor_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Anchor At"},"working_set_size":{"type":"integer","title":"Working Set Size"},"cluster_count":{"type":"integer","title":"Cluster Count"},"theme_count":{"type":"integer","title":"Theme Count"},"publication_count":{"type":"integer","title":"Publication Count"},"unnamed_count":{"type":"integer","title":"Unnamed 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"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","trigger","anchor_at","working_set_size","cluster_count","theme_count","publication_count","unnamed_count","error","started_at","finished_at","created_at"],"title":"RadarRunSummary","description":"One recompute run as the screen's readout and the trigger's response.\n\nPoll-only: this row is the whole observable surface of a recompute. A queued run with no worker\nstays `pending` here for as long as that remains true, which is the honest answer."},"RadarThemeDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"summary":{"type":"string","title":"Summary"},"narrative":{"type":"string","title":"Narrative"},"sector_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector Id"},"sector_label":{"type":"string","title":"Sector Label"},"horizon":{"$ref":"#/components/schemas/ThemeHorizon"},"velocity":{"$ref":"#/components/schemas/ThemeVelocity"},"signal_score":{"type":"number","title":"Signal Score"},"signal_percent":{"type":"integer","title":"Signal Percent"},"breadth":{"type":"integer","title":"Breadth"},"publication_count":{"type":"integer","title":"Publication Count"},"growth":{"type":"number","title":"Growth"},"prevalence":{"type":"number","title":"Prevalence"},"recency":{"type":"number","title":"Recency"},"ai_simulated":{"type":"boolean","title":"Ai Simulated"},"regulators":{"items":{"$ref":"#/components/schemas/RadarRegulatorRef"},"type":"array","title":"Regulators"},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"sources":{"items":{"$ref":"#/components/schemas/RadarThemeSource"},"type":"array","title":"Sources"}},"type":"object","required":["id","name","summary","narrative","sector_id","sector_label","horizon","velocity","signal_score","signal_percent","breadth","publication_count","growth","prevalence","recency","ai_simulated","regulators","first_seen_at","last_seen_at","sources"],"title":"RadarThemeDetailResponse","description":"A theme plus its highest-closeness member publications."},"RadarThemeSource":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"closeness":{"type":"number","title":"Closeness"}},"type":"object","required":["publication_id","title","regulator_abbreviation","published_at","closeness"],"title":"RadarThemeSource","description":"A representative member publication, linking into the reading view by its id."},"RadarTopicMatch":{"properties":{"topic":{"type":"string","title":"Topic"},"source":{"anyOf":[{"$ref":"#/components/schemas/RadarThemeSource"},{"type":"null"}]}},"type":"object","required":["topic","source"],"title":"RadarTopicMatch","description":"One of the reader's watch topics a theme is about, with the place a reader can open to see why."},"RateKind":{"type":"string","enum":["input","output","cache_write","cache_read"],"title":"RateKind","description":"The four priced components of one model, each priced and edited independently."},"RateUnit":{"type":"string","enum":["per_million_tokens","per_request"],"title":"RateUnit","description":"What one rate's amount is priced per."},"ReachChainResponse":{"properties":{"sector":{"type":"string","title":"Sector"},"sector_label":{"type":"string","title":"Sector Label"},"watched":{"type":"boolean","title":"Watched"},"offices_total":{"type":"integer","title":"Offices Total"},"reached":{"type":"integer","title":"Reached"},"eligible":{"type":"integer","title":"Eligible"},"out_of_reach":{"type":"integer","title":"Out Of Reach"},"no_profile":{"type":"integer","title":"No Profile"},"outside_entity_scope":{"type":"integer","title":"Outside Entity Scope"}},"type":"object","required":["sector","sector_label","watched","offices_total","reached","eligible","out_of_reach","no_profile","outside_entity_scope"],"title":"ReachChainResponse","description":"How one publication reached this group's offices, as counts the screen turns into translated sentences.\n\nDerived with no extra read; the three buckets plus `eligible` sum to `offices_total` by construction."},"RecommendedActionRef":{"properties":{"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"},"priority":{"$ref":"#/components/schemas/Priority"}},"type":"object","required":["title","detail","priority"],"title":"RecommendedActionRef","description":"The stored recommendation a queue row shows. Absent entirely when the analysis recorded none."},"RecordPositionResponse":{"properties":{"ordinal":{"type":"integer","title":"Ordinal"},"of":{"type":"integer","title":"Of"}},"type":"object","required":["ordinal","of"],"title":"RecordPositionResponse","description":"A record's place in the queue for its reference product. Absent when it has no reference product."},"RecordSourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"record_kind":{"type":"string","title":"Record Kind"},"held_since":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Held Since"},"last_full_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Full Read At"}},"type":"object","required":["id","name","regulator_abbreviation","record_kind","held_since","last_full_read_at"],"title":"RecordSourceResponse","description":"The register a record came from, and the two dates that qualify what it says."},"RefusalSubject":{"type":"string","enum":["work","reader"],"title":"RefusalSubject","description":"Which side of the conversation a completion refusal is about.\n\nCarried ON the refusal rather than kept in a second table at the write, because a lookup table in a\ndifferent place from the order it must agree with is the duplicated definition this module exists to\nforbid: a refusal added to one and not the other would answer with the wrong HTTP status silently."},"RefusedUploadSummary":{"properties":{"file_name":{"type":"string","title":"File Name"},"kind":{"$ref":"#/components/schemas/UploadRefusalKind"}},"type":"object","required":["file_name","kind"],"title":"RefusedUploadSummary","description":"One file in the upload that never became a run, and which intake refusal it hit.\n\nA KIND rather than a sentence: the copy lives in the SPA, as it does for every other refusal in this\nfeature, so one wording change does not need a backend release."},"RegisterFieldKind":{"type":"string","enum":["substance","holder"],"title":"RegisterFieldKind","description":"What a register's own printed field turned out to be, when the platform recognised it.\n\nClosed at two members because two is what the product can DO something with: a substance narrows the\nmarket overview, a holder has a screen of its own. A register prints a dozen other fields and they\nstay what they are — the register's words under the register's label — rather than being decorated\nwith a link to nowhere."},"RegisterFieldLead":{"properties":{"kind":{"$ref":"#/components/schemas/RegisterFieldKind"},"key":{"type":"string","title":"Key"}},"type":"object","required":["kind","key"],"title":"RegisterFieldLead","description":"Where one register field's value leads, and the folded identity it leads by.\n\nThe KEY travels, never the printed spelling. A register spells one firm four ways across four years,\nand a link built from what this row happened to print would answer with a fraction of that firm's\nhistory while looking like the whole of it."},"RegisterFieldResponse":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"lead":{"anyOf":[{"$ref":"#/components/schemas/RegisterFieldLead"},{"type":"null"}]},"label_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label En"},"value_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value En"}},"type":"object","required":["label","value"],"title":"RegisterFieldResponse","description":"One field the register published, under the register's own label, verbatim and untranslated.\n\n`lead` is set only where the value folded to an identity the platform already stores — the record's\nown substance or its holder. It is the server's answer rather than the screen's, because deciding it\nmeans folding the value, and the fold has exactly one definition (`domain/register_identity.py`).\nA screen that guessed from the LABEL would be reading a register's choice of words."},"RegistryMatchBasis":{"type":"string","enum":["domain","country_code"],"title":"RegistryMatchBasis","description":"What the analyzer matched a candidate URL on. Surfaced to the operator beside the match."},"RegistryMatchResponse":{"properties":{"regulator_id":{"type":"string","format":"uuid","title":"Regulator Id"},"slug":{"type":"string","title":"Slug"},"matched_by":{"$ref":"#/components/schemas/RegistryMatchBasis"}},"type":"object","required":["regulator_id","slug","matched_by"],"title":"RegistryMatchResponse","description":"How the analyzer matched (or didn't) the candidate against the registry."},"RegulatorCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"abbreviation":{"type":"string","maxLength":32,"minLength":1,"title":"Abbreviation"},"country":{"type":"string","maxLength":128,"minLength":1,"title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Country Codes"},"scope":{"$ref":"#/components/schemas/RegulatorScope"},"language":{"type":"string","maxLength":16,"minLength":1,"title":"Language"},"sector":{"$ref":"#/components/schemas/Sector"},"website":{"type":"string","maxLength":2048,"pattern":"^https?://\\S+$","title":"Website"},"slug":{"type":"string","maxLength":64,"title":"Slug"}},"additionalProperties":false,"type":"object","required":["name","abbreviation","country","country_codes","scope","language","sector","website","slug"],"title":"RegulatorCreateRequest","description":"A new registry row: the editable fields plus the natural key, which only a create may set."},"RegulatorOptionResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"abbreviation":{"type":"string","title":"Abbreviation"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"}},"type":"object","required":["slug","abbreviation","name","country"],"title":"RegulatorOptionResponse","description":"One authority of the platform registry, as a choice on the assessed-regulators list.\n\nPlatform reference data rather than anything about the organisation, so the closed console boundary holds."},"RegulatorRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"abbreviation":{"type":"string","title":"Abbreviation"},"language":{"type":"string","title":"Language"}},"type":"object","required":["id","slug","abbreviation","language"],"title":"RegulatorRef","description":"The minimal regulator reference shown on a catalog row.\n\nCarries `language` — the regulator's own registered language — so a screen can show which language\nactually governs a source when it carries no override of its own (`SourceDetailResponse.original_language`\nis null) and dispute a wrong registration against something a reader can see, rather than a value\nhidden behind a second read of the registry."},"RegulatorRefResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"abbreviation":{"type":"string","title":"Abbreviation"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"scope":{"type":"string","title":"Scope"},"sector":{"type":"string","title":"Sector"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["slug","abbreviation","name","country","country_codes","scope","sector","source_type"],"title":"RegulatorRefResponse","description":"The regulator reference on every publication row and detail; `source_type` is derived from the slug."},"RegulatorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"abbreviation":{"type":"string","title":"Abbreviation"},"country":{"type":"string","title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"scope":{"type":"string","title":"Scope"},"language":{"type":"string","title":"Language"},"sector":{"type":"string","title":"Sector"},"website":{"type":"string","title":"Website"},"deletable":{"type":"boolean","title":"Deletable"}},"type":"object","required":["id","slug","name","abbreviation","country","country_codes","scope","language","sector","website","deletable"],"title":"RegulatorResponse","description":"A registry row for the attribution/matching UI, plus whether anything already names it.\n\n`deletable` rides on the same read the attribution picker uses, rather than on a second endpoint, so\nthe manage control offers Delete exactly where the write would succeed. It is a predicate and not a\npair of counts on purpose: the screen asks only whether the row is held, which two correlated\nEXISTS answer at a cost bounded by the registry, while exact figures over the corpus are not\nsomething an operator screen should pay for on every open. The counts a refusal names are read for\nthat one row, on the path that refuses (`REGULATOR_NOT_DELETABLE` carries them in `details`)."},"RegulatorScope":{"type":"string","enum":["national","supranational"],"title":"RegulatorScope","description":"Whether a regulator publishes for one sovereign country or a multi-state framework."},"RegulatorWriteRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"abbreviation":{"type":"string","maxLength":32,"minLength":1,"title":"Abbreviation"},"country":{"type":"string","maxLength":128,"minLength":1,"title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Country Codes"},"scope":{"$ref":"#/components/schemas/RegulatorScope"},"language":{"type":"string","maxLength":16,"minLength":1,"title":"Language"},"sector":{"$ref":"#/components/schemas/Sector"},"website":{"type":"string","maxLength":2048,"pattern":"^https?://\\S+$","title":"Website"}},"additionalProperties":false,"type":"object","required":["name","abbreviation","country","country_codes","scope","language","sector","website"],"title":"RegulatorWriteRequest","description":"The editable half of a registry row — every field a create and an edit both set.\n\n`slug` is absent on purpose, and its absence from this type IS the immutability rather than a check\nsomewhere: it is the natural key the creating migration upserts on (`ON CONFLICT (slug) DO NOTHING`,\nso a re-run would resurrect a renamed row's original) and saved-report filters store it as a soft\nreference, where a rename silently stops matching instead of failing. A wrong slug is fixed by\ndeleting the row and entering it again, which the attribution counts already gate.\n\n`scope` and `sector` are the closed platform vocabularies — an unknown value is refused as a 422 by\nthe enum itself rather than reaching storage, because `sector` tags the corpus and is what an\noffice's profile whitelists.\n\nExtras are REFUSED, and that is what turns the slug's absence into a guarantee: without it a `PATCH`\ncarrying one answered 200 with the identifier unchanged, which is indistinguishable — to whoever\nsent it — from a rename that worked. It is now a 422 that says the field does not exist here.\n\n`country_codes` is checked for SHAPE only (two upper-case letters), deliberately not for membership\nof ISO 3166 — `domain/country_codes` carries both rules side by side and the reason `EU` must pass.\nAt least one is required, because a registration carrying none can never match by country and the\nanalyzer would simply stop offering the authority it appears to have registered.\n\n`website` must carry an http(s) scheme for the same reason: the analyzer matches a candidate URL\nagainst this value's HOST, and a scheme-less string parses to no host at all — a registration that\nlooks complete and matches nothing. The platform never fetches it, so nothing stricter is warranted."},"ReplayConsensus":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"regulator_count":{"type":"integer","title":"Regulator Count"}},"type":"object","required":["date","regulator_count"],"title":"ReplayConsensus","description":"The point the running count of distinct authorities first reached the threshold."},"ReplayEventResponse":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"title":{"type":"string","title":"Title"},"excerpt":{"type":"string","title":"Excerpt"},"regulator":{"$ref":"#/components/schemas/ReplayRegulatorRef"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"is_regulator_first":{"type":"boolean","title":"Is Regulator First"}},"type":"object","required":["publication_id","title","excerpt","regulator","published_at","source_url","is_regulator_first"],"title":"ReplayEventResponse","description":"One chronological log entry — and the full content of one chart marker."},"ReplayFirstSignal":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"regulator_name":{"type":"string","title":"Regulator Name"}},"type":"object","required":["date","regulator_abbreviation","regulator_name"],"title":"ReplayFirstSignal","description":"The earliest publication on the theme."},"ReplayRegulatorRef":{"properties":{"abbreviation":{"type":"string","title":"Abbreviation"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"}},"type":"object","required":["abbreviation","name","country"],"title":"ReplayRegulatorRef","description":"The authority behind one replayed publication."},"ReplaySignalPoint":{"properties":{"month":{"type":"string","title":"Month"},"label":{"type":"string","title":"Label"},"cumulative_publications":{"type":"integer","title":"Cumulative Publications"},"cumulative_regulators":{"type":"integer","title":"Cumulative Regulators"},"added":{"type":"integer","title":"Added"}},"type":"object","required":["month","label","cumulative_publications","cumulative_regulators","added"],"title":"ReplaySignalPoint","description":"One month on the cumulative chart; every month in the span is present so the line is continuous."},"ReplayTrack":{"properties":{"regulator":{"$ref":"#/components/schemas/ReplayRegulatorRef"},"first_at":{"type":"string","format":"date-time","title":"First At"},"last_at":{"type":"string","format":"date-time","title":"Last At"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["regulator","first_at","last_at","count"],"title":"ReplayTrack","description":"One authority's involvement, in first-to-publish order."},"ReportFacetsResponse":{"properties":{"authority":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Authority","default":[]},"report_type":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Report Type","default":[]},"procedure_type":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Procedure Type","default":[]},"language":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Language","default":[]}},"type":"object","title":"ReportFacetsResponse","description":"The values each chip offers, computed over the population they filter."},"ReportFiguresResponse":{"properties":{"collected":{"type":"integer","title":"Collected"},"published_this_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Published This Week"},"document_set_changed":{"type":"integer","title":"Document Set Changed"},"channels_connected":{"type":"integer","title":"Channels Connected"},"window_anchor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Anchor"}},"type":"object","required":["collected","published_this_week","document_set_changed","channels_connected","window_anchor"],"title":"ReportFiguresResponse","description":"The four figures above the list, each over the whole population rather than over the page."},"ReportFiltersRequest":{"properties":{"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"},"sector":{"items":{"type":"string"},"type":"array","title":"Sector"},"jurisdiction":{"items":{"type":"string"},"type":"array","title":"Jurisdiction"},"regulator":{"items":{"type":"string"},"type":"array","title":"Regulator"},"type":{"items":{"$ref":"#/components/schemas/SourceType"},"type":"array","title":"Type"},"severity":{"items":{"$ref":"#/components/schemas/Severity"},"type":"array","title":"Severity"},"sort":{"anyOf":[{"$ref":"#/components/schemas/ReportSortMode"},{"type":"null"}]},"unread":{"type":"boolean","title":"Unread","default":false},"relevant":{"type":"boolean","title":"Relevant","default":false},"bookmarked":{"type":"boolean","title":"Bookmarked","default":false},"critical_only":{"type":"boolean","title":"Critical Only","default":false},"stage":{"anyOf":[{"$ref":"#/components/schemas/ScreeningState"},{"type":"null"}]},"population":{"anyOf":[{"$ref":"#/components/schemas/LibraryPopulation"},{"type":"null"}]}},"type":"object","title":"ReportFiltersRequest","description":"Every narrowing the library offers. Absent — or false — means the control was not engaged.\n\nNamed for the library's own URL parameters rather than for the columns behind them, so the request a\nreader's screen builds and the link a saved view hands back are the same vocabulary."},"ReportListingEvidence":{"properties":{"accept_pattern":{"type":"string","title":"Accept Pattern"},"matching_links":{"type":"integer","title":"Matching Links"},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"page_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Template"}},"type":"object","required":["accept_pattern","matching_links","detected_language","page_template"],"title":"ReportListingEvidence","description":"What a page of assessment reports offered, read off its own links before anything is saved.\n\nEvidence, never a decision: the operator changes the kind and the pattern on the form, and the review\nis the last moment either can be corrected."},"ReportSort":{"type":"string","enum":["recency","authority"],"title":"ReportSort","description":"How the reader asked for the population to be ordered.\n\nThe sort is the SERVER's because it orders the population rather than the page: ordering the rows a\npage already holds ranks a twentieth of what was asked for and labels it the top."},"ReportSortMode":{"type":"string","enum":["published","recent","relevant"],"title":"ReportSortMode","description":"The library's three sort orders, as a saved report stores them.\n\nMirrors the publications library's own sort vocabulary so a saved view reopens in the order it was\nsaved in. Deliberately its own enum: it is entirely unrelated to `TriageStatus.RELEVANT`, which\nhappens to share the string `relevant` while meaning a triage answer. Reusing that vocabulary here\nwould type-check and be a category error."},"ReportSummaryResponse":{"properties":{"product_indication":{"type":"string","title":"Product Indication"},"procedure_outcome":{"type":"string","title":"Procedure Outcome"},"efficacy_basis":{"type":"string","title":"Efficacy Basis"},"safety_rmp":{"type":"string","title":"Safety Rmp"},"anything_unusual":{"type":"string","title":"Anything Unusual"},"provenance":{"$ref":"#/components/schemas/SummaryProvenance"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"machine_translated":{"type":"boolean","title":"Machine Translated","default":false},"simulated":{"type":"boolean","title":"Simulated","default":false}},"type":"object","required":["product_indication","procedure_outcome","efficacy_basis","safety_rmp","anything_unusual","provenance"],"title":"ReportSummaryResponse","description":"The five headings, the document they came from, and what a reader needs to judge them."},"ReportTab":{"type":"string","enum":["all","unread"],"title":"ReportTab","description":"The strip above the list. `UNREAD` is per reader and is the one axis that is not shared."},"ReportType":{"type":"string","enum":["epar","par","ukpar","auspar","review_report"],"title":"ReportType","description":"The class of assessment report one channel yields — the authority's own name for the document.\n\nClosed at the database by a hand-written CHECK, like `record_kind` next door, because the vocabulary is\nthe set of report families the shipped channels read and a sixth name arrives with the channel that\npublishes it. The value is never derived from the authority: EMA and the MRI portal both publish under\nprocedures that print different names for the same kind of reasoning, and the channel's operator is the\none who knows which."},"RescoreRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RunStatus"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","status","total","done","error"],"title":"RescoreRunResponse","description":"Durable re-score run state — the reconnect/self-heal read."},"Role":{"type":"string","enum":["hq_admin","hq_viewer","affiliate_lead","affiliate_member"],"title":"Role","description":"The four-value tenancy role vocabulary. Verified in every token."},"RosterResponse":{"properties":{"count":{"type":"integer","title":"Count"},"email_delivery_enabled":{"type":"boolean","title":"Email Delivery Enabled"},"members":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["count","email_delivery_enabled","members"],"title":"RosterResponse","description":"The organisation's members plus the honest email-delivery capability flag."},"RowDecisionResponse":{"properties":{"tab":{"$ref":"#/components/schemas/StatusTab"},"status":{"anyOf":[{"$ref":"#/components/schemas/DecisionStatus"},{"type":"null"}]},"inherited":{"type":"boolean","title":"Inherited"},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/DecisionStatus"},{"type":"null"}]}},"type":"object","required":["tab","status","inherited","suggestion"],"title":"RowDecisionResponse","description":"Where one row stands for the reader's office on the v3 status row, and what RegRadar suggests.\n\nRead off the placement the row's counts come from, so a row cannot sit on one tab while its tag says\nanother; the full decision is `GET /decisions?publication_id=`. `status` is null on To decide, and an\n`action` one changes only through its actions. `inherited` is head office's decision for all (\"(HQ)\").\n`suggestion` is `decision_rules.suggested_decision`, null when the facts support neither or there is no\nassessment to suggest from."},"RunStatus":{"type":"string","enum":["pending","running","success","partial","failed","cancelled"],"title":"RunStatus","description":"Background-run outcomes. `pending` is the pre-consumption state (no worker, no execution)."},"RunTrigger":{"type":"string","enum":["scheduled","manual","retranslate"],"title":"RunTrigger","description":"What started an ingestion run: a scheduled tick, an operator's manual refresh, or a re-translate."},"SampleLink":{"properties":{"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"}},"type":"object","required":["url","title"],"title":"SampleLink","description":"A discovered sample link shown in the proposal (url + title only)."},"SavedReportCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"visibility":{"$ref":"#/components/schemas/VisibilityScope","default":"personal"},"filters":{"$ref":"#/components/schemas/ReportFiltersRequest","default":{"sector":[],"jurisdiction":[],"regulator":[],"type":[],"severity":[],"unread":false,"relevant":false,"bookmarked":false,"critical_only":false}},"digest":{"$ref":"#/components/schemas/DigestFrequency","default":"none"}},"type":"object","required":["name"],"title":"SavedReportCreateRequest","description":"Saving the library's current view under a name, at one of the three visibility scopes."},"SavedReportDigestRequest":{"properties":{"digest":{"$ref":"#/components/schemas/DigestFrequency"}},"type":"object","required":["digest"],"title":"SavedReportDigestRequest","description":"Changing one view's subscription. The five filter values are untouched by design."},"SavedReportFiltersRequest":{"properties":{"filters":{"$ref":"#/components/schemas/ReportFiltersRequest"}},"type":"object","required":["filters"],"title":"SavedReportFiltersRequest","description":"Replacing one view's filters with the library's current ones. Every narrowing, never a patch of one.\n\nThe same shape saving takes, so \"Update view\" stores exactly what saving the same screen as a new view\nwould have stored."},"SavedReportGroupResponse":{"properties":{"visibility":{"$ref":"#/components/schemas/VisibilityScope"},"count":{"type":"integer","title":"Count"},"reports":{"items":{"$ref":"#/components/schemas/SavedReportResponse"},"type":"array","title":"Reports"}},"type":"object","required":["visibility","count","reports"],"title":"SavedReportGroupResponse","description":"One scope's section of the panel. Only non-empty groups are carried."},"SavedReportListResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/SavedReportGroupResponse"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["groups","total"],"title":"SavedReportListResponse","description":"The whole panel. `total` of zero is the panel's own empty state, never a stand-in for an outage."},"SavedReportResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"visibility":{"$ref":"#/components/schemas/VisibilityScope"},"chips":{"items":{"type":"string"},"type":"array","title":"Chips"},"query":{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Query"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"digest":{"$ref":"#/components/schemas/DigestFrequency"},"is_own":{"type":"boolean","title":"Is Own"},"can_delete":{"type":"boolean","title":"Can Delete"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","visibility","chips","query","created_by_name","digest","is_own","can_delete","created_at"],"title":"SavedReportResponse","description":"One saved view as the panel renders it."},"ScheduleSummary":{"properties":{"freshness_hours":{"type":"integer","title":"Freshness Hours"},"tick_source_cap":{"type":"integer","title":"Tick Source Cap"},"due_now":{"type":"integer","title":"Due Now"}},"type":"object","required":["freshness_hours","tick_source_cap","due_now"],"title":"ScheduleSummary","description":"The schedule tile: freshness window, per-tick cap, and how many sources are due now."},"ScreeningClosureResponse":{"properties":{"outcome":{"$ref":"#/components/schemas/WorkflowStatus"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"}},"type":"object","required":["outcome","decided_by","decided_at"],"title":"ScreeningClosureResponse","description":"A processed publication's ending: `completed` (work done) or `not_relevant` (none owed), by whom and when."},"ScreeningDecision":{"type":"string","enum":["relevant","not_relevant"],"title":"ScreeningDecision","description":"The first answer anybody gives a publication: does this concern us at all.\n\nIts own vocabulary rather than a reuse of the workflow's statuses, because the two are different\nkinds of thing — this is what a reader pressed, and a status is where the case file ended up. It is\nalso not the affiliate triage answer, which records one office's verdict on a publication pushed to\nit; this is the organisation deciding whether to open a case file in the first place."},"ScreeningQualityResponse":{"properties":{"bands":{"items":{"$ref":"#/components/schemas/CalibrationBandResponse"},"type":"array","title":"Bands"},"decisions":{"items":{"$ref":"#/components/schemas/DecidedPublicationResponse"},"type":"array","title":"Decisions"},"unscored":{"type":"integer","title":"Unscored"},"undecided":{"type":"integer","title":"Undecided"}},"type":"object","required":["bands","decisions","unscored","undecided"],"title":"ScreeningQualityResponse","description":"The whole reading: the bands, the pairs, and what is honestly missing from both."},"ScreeningState":{"type":"string","enum":["new","in_review","processed"],"title":"ScreeningState","description":"Where a publication has got to, as the intake reports it: the workflow's state, in one word.\n\nThree, not four. `new` is the ABSENCE of a workflow rather than a stored value — a publication nobody\nhas decided about has no case file — and the two terminal states are shown as one, because a reader\nscanning the intake wants \"dealt with\", while the row beside it still has to say which of the two it\nwas. Splitting them into two tabs would ask a reader to know the difference before they can look.\n\nDistinct from `OfficeStance`, which answers what the assessment judged for one office. A publication\ncan be relevant to this office and already processed; folding the two into one word would make some\nreal combination unsayable."},"ScreeningStateResponse":{"properties":{"state":{"$ref":"#/components/schemas/ScreeningState"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_count":{"type":"integer","title":"Workflow Count"},"closure":{"anyOf":[{"$ref":"#/components/schemas/ScreeningClosureResponse"},{"type":"null"}]},"opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opened At"},"opened_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened By"},"assignee_count":{"type":"integer","title":"Assignee Count"},"done_count":{"type":"integer","title":"Done Count"}},"type":"object","required":["state","workflow_id","workflow_count","closure","opened_at","opened_by","assignee_count","done_count"],"title":"ScreeningStateResponse","description":"Where a publication has got to in the intake, derived from its case files and never stored."},"SearchMatchField":{"type":"string","enum":["title","question","answer","statement","control","document","code","product","substance","applicant","holder"],"title":"SearchMatchField","description":"Which text of a row the reader's term was found in — one closed vocabulary for every surface.\n\nCarried on the row rather than derived by the SPA, because only the query knows which of several\nmatched columns actually fired: a term in an obligation's title and a term in the document it was\nimported from are the same row on screen and two different reasons for it to be there, and a reader\ndeciding whether a result is worth opening is deciding on exactly that difference."},"SearchMatchType":{"type":"string","enum":["semantic","keyword","both","approximate"],"title":"SearchMatchType","description":"How one search result matched: by meaning, by keyword, or both.\n\n`approximate` is a keyword hit through a spelling correction: the text holds a word one slip away from\nthe one typed, not the word itself. Its own value so a surface never calls it a match on the word."},"SearchMatchingMode":{"type":"string","enum":["semantic","keyword_only","simulated"],"title":"SearchMatchingMode","description":"The disclosure truth for a whole search response.\n\n`semantic` — live embeddings worked; `keyword_only` — embeddings were unavailable and the\nsearch degraded to keyword matching (with the visible disclosure); `simulated` — offline\nsimulation mode, where the semantic path ran mechanically on deterministic simulator vectors."},"SearchRegulatorRef":{"properties":{"slug":{"type":"string","title":"Slug"},"abbreviation":{"type":"string","title":"Abbreviation"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"scope":{"type":"string","title":"Scope"},"sector":{"type":"string","title":"Sector"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["slug","abbreviation","name","country","country_codes","scope","sector","source_type"],"title":"SearchRegulatorRef","description":"The regulator reference on every search row; `slug` doubles as the Source-facet identity."},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"matching_mode":{"anyOf":[{"$ref":"#/components/schemas/SearchMatchingMode"},{"type":"null"}]},"results":{"items":{"$ref":"#/components/schemas/SearchResultRow"},"type":"array","title":"Results"},"workflows":{"items":{"$ref":"#/components/schemas/WorkflowRow"},"type":"array","title":"Workflows","default":[]},"ask":{"items":{"$ref":"#/components/schemas/AskResultRow"},"type":"array","title":"Ask","default":[]},"market":{"items":{"$ref":"#/components/schemas/MarketResultRow"},"type":"array","title":"Market","default":[]},"obligations":{"items":{"$ref":"#/components/schemas/ObligationResultRow"},"type":"array","title":"Obligations","default":[]}},"type":"object","required":["query","matching_mode","results"],"title":"SearchResponse","description":"Every section one query answers, plus the disclosure-line truth (`matching_mode`, server-side).\n\nThe corpus half (`results`) is the merged ranked list. Every other field is an additive SECTION over a\nsurface a reader can already navigate to, and each is its own list with its own count rather than rows\nfolded into one ranking — because there is no honest way to say that an obligation outranks a\nconversation, and a single list would have to pretend there is.\n\nThe **server** decides which sections are present. `surfaces` on the request selects them, and engaging\neither corpus facet empties the non-corpus sections and issues no read for them at all: a facet narrows\nthe corpus by authority and sector, and none of these rows is a corpus row — a faceted search that\nstill listed them would be answering a question nobody asked.\n\n`workflows` is not scope-filtered, for the same reason the backlog is not. `ask` is filtered to the\nreader's own conversations by the same ownership predicate the Ask screen uses. `market` is bounded by\nthe registers the reader's remit and office already admit. `obligations` is RLS-bound like every other\ntenant read."},"SearchResultRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"type":"string","title":"Title En"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"match_type":{"$ref":"#/components/schemas/SearchMatchType"},"similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity"},"regulator":{"$ref":"#/components/schemas/SearchRegulatorRef"}},"type":"object","required":["id","title_en","published_at","severity","match_type","similarity","regulator"],"title":"SearchResultRow","description":"One merged result: identity + regulator + severity + how it matched.\n\n`similarity` present ⇒ the SPA renders `round(similarity*100)% match`; absent ⇒ the `keyword` badge."},"SearchSurface":{"type":"string","enum":["publications","workflows","ask","market","obligations"],"title":"SearchSurface","description":"One searchable surface of the platform — what a caller may ask the search endpoint to cover.\n\nThe corpus half (`PUBLICATIONS`) is the only member that costs an embedding, which is why the\ncaller names what it wants rather than taking everything: the publications library issues its own\npopulation read from its own screen, and asking search for the corpus a second time would pay for\na list the reader already has.\n\nEvery other member is a keyword read over rows the reader can already reach by navigating, so the\nset is closed by what the product HAS rather than by what is cheap — a surface missing from here is\na surface the search box silently cannot see, which is the failure this enum exists to make loud."},"SectionIntent":{"type":"string","enum":["action_led","reading_led"],"title":"SectionIntent","description":"Whether a product section exists to produce something or to be read.\n\nIt decides where \"entered and produced nothing\" is a finding at all. The dashboard and the oversight\nscreen are used correctly by somebody who opens them, reads and leaves, so reporting that figure for\nthem would shout about the healthiest screens and bury the sections where it means something."},"SectionUsageResponse":{"properties":{"section":{"type":"string","title":"Section"},"intent":{"anyOf":[{"$ref":"#/components/schemas/SectionIntent"},{"type":"null"}]},"is_sequential":{"type":"boolean","title":"Is Sequential"},"visits":{"type":"integer","title":"Visits"},"people":{"type":"integer","title":"People"},"visits_with_outcome":{"type":"integer","title":"Visits With Outcome"},"visits_without_outcome":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visits Without Outcome"},"median_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Seconds"},"steps":{"items":{"$ref":"#/components/schemas/UsageStepResponse"},"type":"array","title":"Steps"}},"type":"object","required":["section","intent","is_sequential","visits","people","visits_with_outcome","visits_without_outcome","median_seconds","steps"],"title":"SectionUsageResponse","description":"One section's reading.\n\n`visits_without_outcome` is `null` rather than `0` on a section that exists to be read: the figure\ndoes not apply there, and a zero would read as everybody having succeeded."},"Sector":{"type":"string","enum":["pharmaceuticals","financial_services","food_safety","gaming"],"title":"Sector","description":"Fixed platform sector taxonomy — the scope vocabulary a profile whitelists.\n\nIdentifiers are stable data keys (they tag corpus items); display labels live frontend-side."},"SessionResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","expires_in"],"title":"SessionResponse","description":"The uniform session-establishing body. Cookie is set on the response."},"SettleSuggestionRequest":{"properties":{"status":{"$ref":"#/components/schemas/SuggestionStatus"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},"additionalProperties":false,"type":"object","required":["status"],"title":"SettleSuggestionRequest","description":"Move a suggestion to a status, with what that status needs."},"Severity":{"type":"string","enum":["low","medium","high"],"title":"Severity","description":"The only fixed tag-value vocabulary — exactly one severity tag per publication."},"ShareTarget":{"properties":{"kind":{"$ref":"#/components/schemas/ShareTargetKind"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"ShareTarget","description":"Somebody a For information decision is shared with: a member, a whole office, or a typed address.\n\nExactly one of `id` and `email` is present, decided by `kind`, so a stored entry can never name a person\nand an address at once and leave a reader guessing which of the two was meant."},"ShareTargetKind":{"type":"string","enum":["user","affiliate","email"],"title":"ShareTargetKind","description":"Who a For information decision is shared with: a member, a whole office, or a typed address."},"SignInRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"SignInRequest","description":"Password sign-in credentials."},"SignOffVerdict":{"type":"string","enum":["sign_off","send_back"],"title":"SignOffVerdict","description":"What the person signing off answers a submitted action (spec §10, decided 8 Oct 2026).\n\nTwo, not three: \"Suggest edits\" was dropped for the pilot. Sending back needs a comment, because an\nowner handed their work back without a reason has nothing to act on."},"SourceAnalysisResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"status":{"type":"string","title":"Status"},"proposal":{"anyOf":[{"$ref":"#/components/schemas/SourceProposalResponse"},{"type":"null"}]},"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"}},"type":"object","required":["id","url","status","proposal","error","started_at","finished_at"],"title":"SourceAnalysisResponse","description":"One analysis of a candidate URL — the poll surface for the add-source screen.\n\n`proposal` is declared as the proposal model rather than as stored JSON, so a row written by an\nolder shape fails validation loudly here instead of reaching the review screen half-filled. It is\nnull until the analysis succeeds, and `error` carries why when it did not: the two are never both\nabsent on a settled analysis, which is what lets the screen refuse to render an empty proposal as\nthough it were an answer."},"SourceCatalogItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"entry_point_url":{"type":"string","title":"Entry Point Url"},"strategy":{"type":"string","title":"Strategy"},"kind":{"$ref":"#/components/schemas/SourceKind"},"status":{"type":"string","title":"Status"},"regulator":{"anyOf":[{"$ref":"#/components/schemas/RegulatorRef"},{"type":"null"}]},"needs_attention":{"type":"boolean","title":"Needs Attention"},"effective_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Language"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_new_count":{"type":"integer","title":"Last New Count"},"last_updated_count":{"type":"integer","title":"Last Updated Count"},"last_failed_count":{"type":"integer","title":"Last Failed Count"},"health":{"$ref":"#/components/schemas/SourceHealth"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"last_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Reason"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"channel":{"anyOf":[{"$ref":"#/components/schemas/AssessmentChannelSummary"},{"type":"null"}]}},"type":"object","required":["id","name","entry_point_url","strategy","kind","status","regulator","needs_attention","effective_language","last_run_at","last_refreshed_at","last_run_status","last_new_count","last_updated_count","last_failed_count","health","consecutive_failures","last_failure_reason","next_attempt_at"],"title":"SourceCatalogItem","description":"One catalog row: config summary + last-run telemetry + health + needs-attention flag.\n\n`health` is computed server-side through `domain/source_health.is_failing` and sent as an explicit\nfield precisely so the client never has to re-derive it from `consecutive_failures` itself — doing\nthat would be the second definition that module's docstring forbids."},"SourceCatalogResponse":{"properties":{"tiles":{"$ref":"#/components/schemas/SourceTiles"},"sources":{"items":{"$ref":"#/components/schemas/SourceCatalogItem"},"type":"array","title":"Sources"}},"type":"object","required":["tiles","sources"],"title":"SourceCatalogResponse","description":"The catalog screen in one read: tiles + rows. Empty catalog ⇒ zeros + []."},"SourceCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"entry_point_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Entry Point Url"},"strategy":{"$ref":"#/components/schemas/SourceStrategy"},"kind":{"$ref":"#/components/schemas/SourceKind","default":"publications"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"regulator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Regulator Id"},"original_language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Original Language"},"sample_links":{"items":{"$ref":"#/components/schemas/SampleLink"},"type":"array","title":"Sample Links","default":[]},"rationale":{"type":"string","maxLength":4096,"title":"Rationale","default":""},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","default":0.0},"signals":{"anyOf":[{"$ref":"#/components/schemas/AnalyzerSignals"},{"type":"null"}]},"simulated":{"type":"boolean","title":"Simulated","default":false},"activate":{"type":"boolean","title":"Activate","default":false}},"type":"object","required":["name","entry_point_url","strategy"],"title":"SourceCreateRequest","description":"Save a reviewed (operator-editable) proposal with an explicit activate decision."},"SourceDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"entry_point_url":{"type":"string","title":"Entry Point Url"},"strategy":{"type":"string","title":"Strategy"},"kind":{"$ref":"#/components/schemas/SourceKind"},"status":{"type":"string","title":"Status"},"regulator":{"anyOf":[{"$ref":"#/components/schemas/RegulatorRef"},{"type":"null"}]},"original_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Language"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"analysis":{"additionalProperties":true,"type":"object","title":"Analysis"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_new_count":{"type":"integer","title":"Last New Count"},"last_updated_count":{"type":"integer","title":"Last Updated Count"},"last_failed_count":{"type":"integer","title":"Last Failed Count"},"health":{"$ref":"#/components/schemas/SourceHealth"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"last_failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Reason"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"deletable":{"type":"boolean","title":"Deletable"},"channel":{"anyOf":[{"$ref":"#/components/schemas/AssessmentChannelSummary"},{"type":"null"}]},"held_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Held Since"},"last_full_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Full Read At"}},"type":"object","required":["id","name","entry_point_url","strategy","kind","status","regulator","original_language","config","analysis","last_run_at","last_refreshed_at","last_run_status","last_new_count","last_updated_count","last_failed_count","health","consecutive_failures","last_failure_reason","next_attempt_at","deletable"],"title":"SourceDetailResponse","description":"Full source row: config + saved analysis context + telemetry + health + regulator."},"SourceHealth":{"type":"string","enum":["ok","failing"],"title":"SourceHealth","description":"A source's observed health, computed from `consecutive_failures` (`domain/source_health.py`).\n\nServer-computed only — never derived on the client, which is exactly the second definition that\nmodule's docstring forbids."},"SourceKind":{"type":"string","enum":["publications","product_register","assessment_reports"],"title":"SourceKind","description":"What a monitored source YIELDS — documents, rows of an official product register, or the\nassessment reports in which an authority sets out why it approved a medicine.\n\nSeparate from `SourceStrategy`, which says how a source is discovered. The two are orthogonal: a\nregister is read by a custom adapter exactly as a publication channel can be, and the difference\nthat matters downstream is the shape of what comes back. The ingestion run forks on this value\nafter the fetch, and neither the register branch nor the assessment-report branch calls any step of\nthe publication chain.\n\nImmutable after creation: a source that changed kind would be claiming its own history was a\ndifferent thing than it was."},"SourceProposalResponse":{"properties":{"name":{"type":"string","title":"Name"},"regulator_name":{"type":"string","title":"Regulator Name"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"sector":{"type":"string","title":"Sector"},"country":{"type":"string","title":"Country"},"country_codes":{"items":{"type":"string"},"type":"array","title":"Country Codes"},"scope":{"type":"string","title":"Scope"},"language":{"type":"string","title":"Language"},"strategy":{"type":"string","title":"Strategy"},"kind":{"$ref":"#/components/schemas/SourceKind"},"detected_columns":{"items":{"type":"string"},"type":"array","title":"Detected Columns"},"kind_determined":{"type":"boolean","title":"Kind Determined","default":true},"report_listing":{"anyOf":[{"$ref":"#/components/schemas/ReportListingEvidence"},{"type":"null"}]},"config":{"additionalProperties":true,"type":"object","title":"Config"},"sample_links":{"items":{"$ref":"#/components/schemas/SampleLink"},"type":"array","title":"Sample Links"},"rationale":{"type":"string","title":"Rationale"},"confidence":{"type":"number","title":"Confidence"},"signals":{"$ref":"#/components/schemas/AnalyzerSignals"},"registry_match":{"anyOf":[{"$ref":"#/components/schemas/RegistryMatchResponse"},{"type":"null"}]},"needs_new_regulator":{"type":"boolean","title":"Needs New Regulator"},"entry_point_probe":{"$ref":"#/components/schemas/EntryPointProbe"},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["name","regulator_name","regulator_abbreviation","sector","country","country_codes","scope","language","strategy","kind","detected_columns","config","sample_links","rationale","confidence","signals","registry_match","needs_new_regulator","entry_point_probe","simulated"],"title":"SourceProposalResponse","description":"The analyzer's reviewable proposal, assembled from the LLM output + deterministic evidence."},"SourcePublicationPeekResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"type":"string","title":"Title En"},"excerpt":{"type":"string","title":"Excerpt"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"language":{"type":"string","title":"Language"}},"type":"object","required":["id","title_en","excerpt","published_at","language"],"title":"SourcePublicationPeekResponse","description":"One recent-ingestion peek row — CORPUS fields ONLY (no per-tenant enrichment ever appears here)."},"SourceRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"SourceRef","description":"A source in the corpus plane, by id and name."},"SourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"entry_point_url":{"type":"string","title":"Entry Point Url"},"strategy":{"type":"string","title":"Strategy"},"kind":{"$ref":"#/components/schemas/SourceKind"},"status":{"type":"string","title":"Status"},"regulator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Regulator Id"},"original_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Language"}},"type":"object","required":["id","name","entry_point_url","strategy","kind","status","regulator_id","original_language"],"title":"SourceResponse","description":"A saved source row (create + lifecycle responses)."},"SourceStrategy":{"type":"string","enum":["rss","scrape","custom"],"title":"SourceStrategy","description":"How a source is discovered. v1's seven fetcher types collapse into the Fetcher chain + strategy."},"SourceSuggestionCreateRequest":{"properties":{"url":{"type":"string","title":"Url"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Note"},"kind":{"$ref":"#/components/schemas/SourceKind"}},"additionalProperties":false,"type":"object","required":["url","kind"],"title":"SourceSuggestionCreateRequest","description":"A page a reader asks the platform to collect, and what it should feed."},"SourceSuggestionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SourceSuggestionResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SourceSuggestionListResponse","description":"The caller's own suggestions, newest first."},"SourceSuggestionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"kind":{"$ref":"#/components/schemas/SourceKind"},"status":{"$ref":"#/components/schemas/SuggestionStatus"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"settled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Settled At"},"can_delete":{"type":"boolean","title":"Can Delete"}},"type":"object","required":["id","url","note","kind","status","decline_reason","source_name","created_at","settled_at","can_delete"],"title":"SourceSuggestionResponse","description":"One suggestion as its author sees it."},"SourceTallyResponse":{"properties":{"regulator_id":{"type":"string","format":"uuid","title":"Regulator Id"},"regulator_slug":{"type":"string","title":"Regulator Slug"},"regulator_name":{"type":"string","title":"Regulator Name"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"published":{"type":"integer","title":"Published"},"reached":{"type":"integer","title":"Reached"},"sector":{"type":"string","title":"Sector"},"country":{"type":"string","title":"Country"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["regulator_id","regulator_slug","regulator_name","regulator_abbreviation","published","reached","sector","country","source_type"],"title":"SourceTallyResponse","description":"One regulator's published count and how much of it reached the answer set; a quiet source shows zero."},"SourceTiles":{"properties":{"total":{"type":"integer","title":"Total"},"active":{"type":"integer","title":"Active"},"failing":{"type":"integer","title":"Failing"},"schedule":{"$ref":"#/components/schemas/ScheduleSummary"}},"type":"object","required":["total","active","failing","schedule"],"title":"SourceTiles","description":"Catalog headline counts. The UI flags `failing` visually only when >= 1.\n\n`failing` counts observed health (`consecutive_failures > 0`), not the retired `broken` status —\nnothing writes that status any more, so the tile's vocabulary changed to stay honest about it."},"SourceType":{"type":"string","enum":["regulator","central_bank","government","standards_body","scientific_body","association"],"title":"SourceType","description":"The fixed source-type vocabulary (ported from v1's authority-type taxonomy)."},"SourceUpdateRequest":{"properties":{"original_language":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Original Language"},"page_template":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Page Template"},"page_second_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Page Second Index"}},"additionalProperties":false,"type":"object","title":"SourceUpdateRequest","description":"Operator edits to a source: its language override, and the page template its history walk uses.\n\nExplicit `null` clears the language override and falls back to the regulator's registered language;\na code must be in the closed ISO 639-1 vocabulary (`domain/language_codes.py`) or the write is\nrefused with a 422 naming what was rejected.\n\nThe page template is editable because the analyser's detection can be wrong and a source cannot be\ndeleted once it has produced anything: without this route a bad template would be unfixable. It\nmust carry the `{page}` slot, and it addresses the pages AFTER the first — page one is always the\nentry point.\n\nExtras are REFUSED, and that is what makes the kind's immutability real rather than conventional.\nWithout it a `PATCH` carrying `kind` answered 200 with the kind unchanged — indistinguishable, to\nwhoever sent it, from a change that worked. It is now a 422 saying the field does not exist here,\nwhich is the truth: a source that changed kind would be claiming everything it has already yielded\nwas a different thing than it was."},"SpendBreakdownScope":{"type":"string","enum":["regulator","organisation","surface","model"],"title":"SpendBreakdownScope","description":"What one breakdown column reports on. Four values, each written at exactly one construction\nsite — as free text a typo there was a silent contract change that reached the generated client."},"SpendOperation":{"type":"string","enum":["corpus_ingestion","org_enrichment","org_profile_rescore","ask","search","gap_analysis","market_comparison","demo","source_config_proposal","theme_naming","control_matching","control_import","market_insight","ask_summary","reference_indexing","assessment_summary","document_comparison","ask_routing"],"title":"SpendOperation","description":"Every operation that can produce a spend record. The only thing a caller declares.\n\nTier and surface are derived from this value through `OPERATION_TIERS` and `OPERATION_SURFACES` —\nnever passed alongside it — so three of a record's five dimension fields cannot be set wrong,\nbecause nobody sets them."},"SpendProvider":{"type":"string","enum":["anthropic","openrouter","cohere","simulator"],"title":"SpendProvider","description":"Who answered the attempt — the live providers, or the simulator standing in for them.\n\n`OPENROUTER` is the gateway the corpus plane is sent to when a deployment configures one. It is\nits own member rather than a flag beside `ANTHROPIC` because it is a different bill from a\ndifferent vendor: folding the two together would leave the ledger unable to answer what moving\nthat plane actually saved, which is the one question it exists to answer."},"SpendSurface":{"type":"string","enum":["ask","search","gap_analysis","market_comparison","demo"],"title":"SpendSurface","description":"The interactive product surface a record belongs to — only set for the operations that have one."},"SpendTier":{"type":"string","enum":["corpus","tenant","interaction","demo","unattributed"],"title":"SpendTier","description":"The closed five-value classification of a spend record."},"StatusCountsResponse":{"properties":{"to_decide":{"type":"integer","title":"To Decide"},"for_information":{"type":"integer","title":"For Information"},"in_action":{"type":"integer","title":"In Action"},"not_relevant":{"type":"integer","title":"Not Relevant"},"archived":{"type":"integer","title":"Archived"},"all":{"type":"integer","title":"All"}},"type":"object","required":["to_decide","for_information","in_action","not_relevant","archived","all"],"title":"StatusCountsResponse","description":"Publications per status-row tab under every other narrowing; each equals the list its tab produces.\n\n`all` is counted, not summed. Archived is what was decided Not relevant or For information, or closed,\nthirty days ago or more (`decision_rules`)."},"StatusRowFilter":{"type":"string","enum":["to_decide","for_information","in_action","not_relevant","archived","all"],"title":"StatusRowFilter","description":"The v3 status row's tabs on the wire: `decision_rules.StatusTab` by value (a test pins them), plus `all`.\n\n`all` is the absence of the narrowing, not a sixth place, so it maps to no tab."},"StatusTab":{"type":"string","enum":["to_decide","for_information","in_action","not_relevant","archived"],"title":"StatusTab","description":"The tab of the status row a publication sits on for one office. Derived on every read; never stored.\n\nFive, because a publication is on exactly one of them; \"All\" is the absence of the narrowing, not a\nsixth place to be. There is no Closed tab: a publication whose actions are all closed stays with the\nwork (In action) until its month is up and then moves to Archived, exactly like a decided one."},"StoredHunk":{"properties":{"index":{"type":"integer","title":"Index"},"shape":{"$ref":"#/components/schemas/HunkShape"},"change_class":{"$ref":"#/components/schemas/ChangeClass"},"section":{"type":"string","title":"Section"},"old_words":{"items":{"type":"string"},"type":"array","title":"Old Words"},"new_words":{"items":{"type":"string"},"type":"array","title":"New Words"},"context_before":{"items":{"type":"string"},"type":"array","title":"Context Before"},"context_after":{"items":{"type":"string"},"type":"array","title":"Context After"},"old_lines":{"anyOf":[{"items":{"$ref":"#/components/schemas/StoredLine"},"type":"array"},{"type":"null"}],"title":"Old Lines"},"new_lines":{"anyOf":[{"items":{"$ref":"#/components/schemas/StoredLine"},"type":"array"},{"type":"null"}],"title":"New Lines"},"lines_truncated":{"type":"boolean","title":"Lines Truncated","default":false}},"type":"object","required":["index","shape","change_class","section","old_words","new_words","context_before","context_after"],"title":"StoredHunk","description":"One change as it is kept: every field of the diff's hunk, in a shape that survives a JSON column."},"StoredLine":{"properties":{"kind":{"type":"string","title":"Kind"},"segments":{"items":{"$ref":"#/components/schemas/StoredSegment"},"type":"array","title":"Segments","default":[]},"cells":{"items":{"items":{"$ref":"#/components/schemas/StoredSegment"},"type":"array"},"type":"array","title":"Cells","default":[]}},"type":"object","required":["kind"],"title":"StoredLine","description":"One line of a document beside its other version. A table row has `cells` and no `segments`."},"StoredSegment":{"properties":{"text":{"type":"string","title":"Text"},"changed":{"type":"boolean","title":"Changed"}},"type":"object","required":["text","changed"],"title":"StoredSegment"},"SubstancePendingResponse":{"properties":{"substance":{"type":"string","title":"Substance"},"markets":{"items":{"$ref":"#/components/schemas/PendingMarketResponse"},"type":"array","title":"Markets"},"markets_without_register":{"items":{"$ref":"#/components/schemas/MarketWithoutRegisterResponse"},"type":"array","title":"Markets Without Register"}},"type":"object","required":["substance","markets","markets_without_register"],"title":"SubstancePendingResponse","description":"Every market with a pending list, judged for one substance, and the markets with none."},"SubstanceSuggestionsResponse":{"properties":{"names":{"items":{"type":"string"},"type":"array","title":"Names"}},"type":"object","required":["names"],"title":"SubstanceSuggestionsResponse","description":"Substance names the registers hold that a typed term finds, a misspelling included."},"SuggestionAcceptance":{"type":"string","enum":["accepted","edited","none"],"title":"SuggestionAcceptance","description":"What the person creating an action did with one suggested value (spec §13).\n\n`accepted` is the suggestion confirmed exactly as shown; `edited` is a suggestion that was there and was\nchanged before confirming; `none` is no suggestion to accept — the field was empty or never pre-filled.\nThe share accepted unedited is a success measure, so the three must not collapse into a yes/no."},"SuggestionAcceptanceRequest":{"properties":{"due":{"$ref":"#/components/schemas/SuggestionAcceptance","default":"none"},"priority":{"$ref":"#/components/schemas/SuggestionAcceptance","default":"none"},"checklist":{"$ref":"#/components/schemas/SuggestionAcceptance","default":"none"}},"type":"object","title":"SuggestionAcceptanceRequest","description":"What the person did with each suggested value. Defaults to `none`: nothing was suggested."},"SuggestionQueue":{"type":"string","enum":["open","closed"],"title":"SuggestionQueue","description":"The operator's two tabs: still waiting on somebody, and settled."},"SuggestionQueueResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QueuedSuggestionResponse"},"type":"array","title":"Items"},"counts":{"$ref":"#/components/schemas/QueueCounts"}},"type":"object","required":["items","counts"],"title":"SuggestionQueueResponse","description":"One tab of the operator's queue, and the counts of both."},"SuggestionSnapshot":{"properties":{"relevance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Relevance"},"relevant":{"type":"boolean","title":"Relevant"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"simulated":{"type":"boolean","title":"Simulated"},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/DecisionStatus"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["relevance","relevant","reason","simulated"],"title":"SuggestionSnapshot","description":"What RegRadar's assessment for the deciding office said at the moment the decision was taken.\n\nOnly what the platform holds today: the office's relevance score, whether that score cleared the\nplatform's relevance bar (the suggestion itself — the assessment proposes relevant or not, and nothing\nfiner), the one sentence naming why, and whether the assessment was simulated. Stored with the decision\nbecause the assessment is rewritten by later runs, and \"was this RegRadar's suggestion\" must stay\nanswerable about the suggestion that was actually on screen. No assessment means no snapshot — null,\nnever a reconstructed one."},"SuggestionStatus":{"type":"string","enum":["new","in_review","connected","already_covered","declined"],"title":"SuggestionStatus","description":"Where a suggestion stands. Stored as its value; closed at the database by a CHECK."},"SummaryAbsence":{"properties":{"kind":{"type":"string","enum":["not_attempted","failed"],"title":"Kind"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"attempts":{"type":"integer","title":"Attempts","default":0},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"SummaryAbsence","description":"Why there is no summary; the two kinds never share words. `attempts` makes a repeat failure visible."},"SummaryProvenance":{"properties":{"kind":{"type":"string","enum":["overview","report_opening"],"title":"Kind"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"}},"type":"object","required":["kind","title","url"],"title":"SummaryProvenance","description":"Which document this summary was written from, rendered verbatim.\n\nIt NEVER states a fraction of the document read: the parse bound equals the truncation bound, so the\nplatform does not know the document's length and naming one would be invention."},"TabCounts":{"properties":{"all":{"type":"integer","title":"All"},"unread":{"type":"integer","title":"Unread"}},"type":"object","required":["all","unread"],"title":"TabCounts","description":"The strip's two figures. `unread` is per reader and is the one axis that is not shared."},"TagResponse":{"properties":{"label":{"type":"string","title":"Label"},"category":{"type":"string","title":"Category"}},"type":"object","required":["label","category"],"title":"TagResponse","description":"One tag: its label and category."},"ThemeHorizon":{"type":"string","enum":["adopt","trial","assess","hold"],"title":"ThemeHorizon","description":"How near a detected theme is to becoming an obligation — the radar's four concentric rings.\n\nAssigned by the first matching rule in a fixed order, innermost ring first when rendered:\n`adopt` (imminent or established) → `trial` (several regulators engaged) → `assess` (a weak\nsignal) → `hold` (stalled: stale or shrinking)."},"ThemeVelocity":{"type":"string","enum":["rising","fading","steady"],"title":"ThemeVelocity","description":"Which way a theme's growth term points: gaining, losing, or holding attention."},"TokenExchangeRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"TokenExchangeRequest","description":"A one-time link exchange (magic-link)."},"TriageAnswerRequest":{"properties":{"outcome":{"$ref":"#/components/schemas/TriageStatus"},"group_impact":{"type":"boolean","title":"Group Impact","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["outcome"],"title":"TriageAnswerRequest","description":"An affiliate's answer. Submitted in one click, with no confirmation step anywhere in the flow.\n\n`outcome` is typed as the whole vocabulary and narrowed by the service to the two reachable values, so\nthe refusal of `needs_review` is a stated domain rule rather than an accident of the type.\n`group_impact` is only valid with `relevant` and is REFUSED otherwise rather than silently dropped —\nthe caller stated an intent to escalate, and answering 200 without it would report the opposite of\nwhat was stored. The note is optional and carries no length limit."},"TriageDashboardResponse":{"properties":{"awaiting_count":{"type":"integer","title":"Awaiting Count"},"escalated_count":{"type":"integer","title":"Escalated Count"},"capped":{"type":"boolean","title":"Capped"},"count_window":{"type":"integer","title":"Count Window"},"items":{"items":{"$ref":"#/components/schemas/TriageWidgetItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["awaiting_count","escalated_count","capped","count_window","items"],"title":"TriageDashboardResponse","description":"The reserved dashboard column's figures, organisation-wide for every viewer.\n\n`awaiting_count` is deliberately not named `pending_count` like the inbox's field: both count the same\nstatus, but this one is organisation-wide and bounded by `count_window` while the inbox's is one\naffiliate's true backlog. One name for both would invite a bounded figure to be read as a total —\nwhich is what `capped` exists to disclose."},"TriageInboxResponse":{"properties":{"has_inbox":{"type":"boolean","title":"Has Inbox"},"affiliate":{"anyOf":[{"$ref":"#/components/schemas/InboxAffiliateResponse"},{"type":"null"}]},"pending_count":{"type":"integer","title":"Pending Count"},"awaiting":{"items":{"$ref":"#/components/schemas/TriageRowResponse"},"type":"array","title":"Awaiting"},"already_triaged":{"items":{"$ref":"#/components/schemas/TriageRowResponse"},"type":"array","title":"Already Triaged"}},"type":"object","required":["has_inbox","affiliate","pending_count","awaiting","already_triaged"],"title":"TriageInboxResponse","description":"One affiliate's worklist, split by whether an answer is still owed.\n\n`has_inbox` is the flag the screen branches on — never the emptiness of the lists, because an empty\nqueue and having no queue at all are different truths and a read failure is a third one that raises.\nNeither list is capped: one affiliate's pushed items is a naturally bounded set, exactly as mined."},"TriagePushRequest":{"properties":{"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"}},"type":"object","required":["affiliate_id"],"title":"TriagePushRequest","description":"Which affiliate to record the publication as pending for. The publication is the path segment."},"TriagePushResponse":{"properties":{"record":{"$ref":"#/components/schemas/TriageRecordSummary"}},"type":"object","required":["record"],"title":"TriagePushResponse","description":"The resulting record — identical whether this push created it or found it already there."},"TriageRecordSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"affiliate_id":{"type":"string","format":"uuid","title":"Affiliate Id"},"affiliate_name":{"type":"string","title":"Affiliate Name"},"status":{"$ref":"#/components/schemas/TriageStatus"},"escalated":{"type":"boolean","title":"Escalated"},"note":{"type":"string","title":"Note"},"pushed_at":{"type":"string","format":"date-time","title":"Pushed At"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"}},"type":"object","required":["id","affiliate_id","affiliate_name","status","escalated","note","pushed_at","responded_at"],"title":"TriageRecordSummary","description":"One affiliate's status for one publication — the push response and the cross-affiliate summary.\n\nCarries the affiliate's name because both surfaces read per affiliate, and the answer's note because\nthe note's stated audience is the HQ reviewer, who has no other surface to read it on."},"TriageRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"publication_title":{"type":"string","title":"Publication Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"pushed_by":{"type":"string","title":"Pushed By"},"pushed_at":{"type":"string","format":"date-time","title":"Pushed At"},"status":{"$ref":"#/components/schemas/TriageStatus"},"escalated":{"type":"boolean","title":"Escalated"},"note":{"type":"string","title":"Note"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"},"unavailable":{"type":"boolean","title":"Unavailable"}},"type":"object","required":["id","publication_id","publication_title","regulator_abbreviation","pushed_by","pushed_at","status","escalated","note","responded_at","unavailable"],"title":"TriageRowResponse","description":"One inbox row: the record's own fields plus the publication and regulator resolved from the corpus.\n\n`unavailable` is true when the record's publication did not resolve in the corpus. The title and the\nregulator are then empty and the interface renders a named unavailable state — the row still counts and\nstill lists. That is a data anomaly about one row, deliberately distinct from a failed read."},"TriageStatus":{"type":"string","enum":["pending","relevant","not_relevant","needs_review"],"title":"TriageStatus","description":"Publication triage lifecycle."},"TriageWidgetItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"publication_title":{"type":"string","title":"Publication Title"},"regulator_abbreviation":{"type":"string","title":"Regulator Abbreviation"},"affiliate_name":{"type":"string","title":"Affiliate Name"},"status":{"$ref":"#/components/schemas/TriageStatus"},"escalated":{"type":"boolean","title":"Escalated"},"pushed_at":{"type":"string","format":"date-time","title":"Pushed At"},"unavailable":{"type":"boolean","title":"Unavailable"}},"type":"object","required":["id","publication_id","publication_title","regulator_abbreviation","affiliate_name","status","escalated","pushed_at","unavailable"],"title":"TriageWidgetItemResponse","description":"One row of the dashboard's recently-pushed widget — deliberately NOT the inbox row.\n\nIt carries `affiliate_name`, because the column is organisation-wide and the reader needs to know whose\nrow it is, and it omits `pushed_by`, `note` and `responded_at`: a compact widget renders none of them,\nand shipping the note into a surface that does not show it would widen its audience for nothing."},"UploadRefusalKind":{"type":"string","enum":["too_large","unreadable"],"title":"UploadRefusalKind","description":"Why ONE file in an upload never became a run at all.\n\nDeliberately not folded into `ImportFailureKind`, which names how a run ENDED. These two refusals happen\nbefore a run row exists — they are answers about a file, not about a reading — and `ImportFailureKind`'s\nthree values are guarded as three because collapsing any of them sends somebody hunting for a better scan\nof a good manual. A fourth value there, meaning \"this never started\", would be that same collapse.\n\nPer file rather than per request, because a batch's documents fail independently: four manuals reading\nnormally must not be discarded because the fifth was a scan."},"UsageAllowanceResponse":{"properties":{"limit":{"type":"integer","title":"Limit"},"used":{"type":"integer","title":"Used"},"remaining":{"type":"integer","title":"Remaining"},"resets_at":{"type":"string","format":"date-time","title":"Resets At"}},"type":"object","required":["limit","used","remaining","resets_at"],"title":"UsageAllowanceResponse","description":"What one person has left of today for one feature, and the moment the day turns over."},"UsageBatchRequest":{"properties":{"events":{"items":{"$ref":"#/components/schemas/UsageMomentRequest"},"type":"array","maxItems":50,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"UsageBatchRequest","description":"One flush from one browser window.\n\nThe whole batch is validated before any of it is written, so an unknown pair refuses the batch\nrather than writing the rest — a sitting with a hole in the middle reads like a person who did not do\nthe thing, which is the exact conclusion this feature exists to draw correctly."},"UsageCoverageCellResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"section":{"type":"string","title":"Section"},"visits":{"type":"integer","title":"Visits"}},"type":"object","required":["user_id","section","visits"],"title":"UsageCoverageCellResponse","description":"One person against one section. Zero is a real answer and is never left out."},"UsageCoverageResponse":{"properties":{"people":{"items":{"$ref":"#/components/schemas/UsagePersonResponse"},"type":"array","title":"People"},"cells":{"items":{"$ref":"#/components/schemas/UsageCoverageCellResponse"},"type":"array","title":"Cells"}},"type":"object","required":["people","cells"],"title":"UsageCoverageResponse","description":"The grid: its rows, and a dense set of cells so the interface never has to invent a blank."},"UsageMomentRequest":{"properties":{"section":{"$ref":"#/components/schemas/UsageSection"},"action":{"type":"string","title":"Action"},"visit_id":{"type":"string","format":"uuid","title":"Visit Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"detail":{"additionalProperties":{"type":"integer"},"type":"object","title":"Detail"}},"type":"object","required":["section","action","visit_id","occurred_at"],"title":"UsageMomentRequest","description":"One recorded moment. Extra keys are ignored, identity keys among them.\n\n`section` is typed as the enum here and as a plain string on the way out, and the asymmetry is the\nsame one the audit schemas carry. Inbound it is client input against a closed vocabulary, so the\ngenerated client should hold the union and an unrecognised value should be refused at the boundary.\nOutbound it is a STORED value, and a row naming a section the product has since retired must still be\nreadable — typed as the enum it would fail response validation and take the whole reading down."},"UsagePersonResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"removed":{"type":"boolean","title":"Removed"}},"type":"object","required":["user_id","name","removed"],"title":"UsagePersonResponse","description":"One member the grid has a row for. `removed` marks somebody whose history outlived their account."},"UsageReportResponse":{"properties":{"first_recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Recorded At"},"actor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor"},"sections":{"items":{"$ref":"#/components/schemas/SectionUsageResponse"},"type":"array","title":"Sections"},"coverage":{"$ref":"#/components/schemas/UsageCoverageResponse"}},"type":"object","required":["first_recorded_at","actor","sections","coverage"],"title":"UsageReportResponse","description":"The whole reading. Counts of sittings and of people, and nothing derived from them.\n\nThere is no percentage, no average and no trend anywhere in this shape, and a guard asserts it. At\nten members a percentage is arithmetic wearing a lab coat, and a figure that looks more precise than\nits evidence is the same defect as an invented one."},"UsageSection":{"type":"string","enum":["dashboard","publications","assessment_reports","inbox","workflows","oversight","audit","screening_quality","reports","brief","search","ask","radar","backtest","gap_analysis","market_comparison","market_overview","controls","controls_import","team","entities","org_profile","account"],"title":"UsageSection","description":"The member-facing product areas, as the usage record counts them.\n\n**Not `ScopedSurface`, and the two must not be folded together.** That one names the surfaces the\ncanonical scope filter can be asked about, so it carries `exports` — which is an act, not a screen —\nand carries nothing for the team roster, the offices, the account or the audit trail, because no\nscope decision is taken on any of them. This one names places a person can be, so it carries all\nfour and does not carry `exports`. They overlap because the product has screens that are also scoped;\nthey answer different questions, and a single merged vocabulary would have to lie to one of them.\n\nA section is deliberately coarser than a route: a list and the detail pages it opens are one section.\nThe control-framework import is the single split from its parent, and it splits because its verbs are\na real sequence while the framework's are three independent acts.\n\nOperator-only screens are absent. No cross-organisation reading exists, so their counts would sit\ninside whichever tenant an operator happened to be signed into and would report platform\nadministration as if it were customer behaviour."},"UsageStepResponse":{"properties":{"action":{"type":"string","title":"Action"},"position":{"type":"integer","title":"Position"},"visits_reached":{"type":"integer","title":"Visits Reached"}},"type":"object","required":["action","position","visits_reached"],"title":"UsageStepResponse","description":"One verb of a section, and how many sittings got that far."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerdictCountsResponse":{"properties":{"new":{"type":"integer","title":"New"},"stricter":{"type":"integer","title":"Stricter"},"aligned":{"type":"integer","title":"Aligned"},"lighter":{"type":"integer","title":"Lighter"},"unknown":{"type":"integer","title":"Unknown"}},"type":"object","required":["new","stricter","aligned","lighter","unknown"],"title":"VerdictCountsResponse","description":"The five counts. They always sum to the number of rows."},"VisibilityScope":{"type":"string","enum":["personal","team","organisation"],"title":"VisibilityScope","description":"Visibility ceiling: personal < team < organisation.\n\nThe ordering itself, and every rule that reads it — entitlement, display precedence, the read\npredicate and the panel grouping — live in `domain/visibility_rules.py`. Import them from there;\nthis enum is the vocabulary alone."},"WhatChangedResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"key_points":{"items":{"type":"string"},"type":"array","title":"Key Points"},"key_dates":{"items":{"type":"string"},"type":"array","title":"Key Dates"},"key_terms":{"items":{"$ref":"#/components/schemas/KeyTermResponse"},"type":"array","title":"Key Terms"},"simulated":{"type":"boolean","title":"Simulated"}},"type":"object","required":["summary","key_points","key_dates","key_terms","simulated"],"title":"WhatChangedResponse","description":"The document's own reading, made once for the whole platform rather than per office.\n\n`key_points` are the obligations found, verbatim; empty means the document places none."},"WorkflowActionItemRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"body":{"type":"string","title":"Body"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_name":{"type":"string","title":"Owner Name"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed By Name"}},"type":"object","required":["id","body","owner_user_id","owner_name","due_date","completed_at","completed_by_name"],"title":"WorkflowActionItemRef","description":"One follow-up in the working list. Removed items are not in it at all."},"WorkflowActionState":{"properties":{"owner":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"started_by":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"signs_off":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"signer_is_active":{"type":"boolean","title":"Signer Is Active"},"signer_is_business_owner":{"type":"boolean","title":"Signer Is Business Owner"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/ActionOutcome"},{"type":"null"}]},"outcome_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome Reason"},"outcome_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome Note"},"outcome_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome Link"},"signed_off_by":{"anyOf":[{"$ref":"#/components/schemas/ActionPersonRef"},{"type":"null"}]},"signed_off_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed Off At"},"viewer_can_submit":{"type":"boolean","title":"Viewer Can Submit"},"submit_closes":{"type":"boolean","title":"Submit Closes"},"viewer_can_sign_off":{"type":"boolean","title":"Viewer Can Sign Off"},"viewer_can_send_back":{"type":"boolean","title":"Viewer Can Send Back"},"pending_decline":{"anyOf":[{"$ref":"#/components/schemas/ActionDeclineState"},{"type":"null"}]},"viewer_can_decline":{"type":"boolean","title":"Viewer Can Decline"},"viewer_can_resolve_decline":{"type":"boolean","title":"Viewer Can Resolve Decline"},"decline_candidates":{"items":{"$ref":"#/components/schemas/ActionPersonRef"},"type":"array","title":"Decline Candidates"},"sent_back":{"anyOf":[{"$ref":"#/components/schemas/ActionSentBackState"},{"type":"null"}]}},"type":"object","required":["owner","started_by","signs_off","signer_is_active","signer_is_business_owner","submitted_at","outcome","outcome_reason","outcome_note","outcome_link","signed_off_by","signed_off_at","viewer_can_submit","submit_closes","viewer_can_sign_off","viewer_can_send_back","pending_decline","viewer_can_decline","viewer_can_resolve_decline","decline_candidates","sent_back"],"title":"WorkflowActionState","description":"An action's sign-off state, and the reader's moves on it, all derived on the server.\n\nThe four `viewer_can_*` flags and `submit_closes` come from the same rules the submit and sign-off writes\nconsult (`domain/workflow_rules.py`), so the screen shows or hides its controls without holding a rule of\nits own — and a client that ignores them is still refused."},"WorkflowActivityItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"actor_name":{"type":"string","title":"Actor Name"},"subject_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Name"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"type":"object","required":["id","event_type","actor_name","subject_name","occurred_at","detail"],"title":"WorkflowActivityItem","description":"One history line, derived from this workflow's own audit entries — there is no activity table.\n\n`event_type` is a plain string rather than the frozen enum on purpose: an entry written by a later\nfeature must still render, as a neutral line, instead of failing this response's validation."},"WorkflowAssigneeRef":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"role":{"$ref":"#/components/schemas/AssignmentRole"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"},"affiliate_iso_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Iso Code"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Done At"},"remind_available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Remind Available At"}},"type":"object","required":["user_id","name","role","assigned_at","affiliate_id","affiliate_iso_code","sent_at","done_at","remind_available_at"],"title":"WorkflowAssigneeRef","description":"One person on a workflow. Names resolve for members who have since been removed."},"WorkflowAssigneeRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"$ref":"#/components/schemas/AssignmentRole","default":"contributor"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},"type":"object","required":["user_id"],"title":"WorkflowAssigneeRequest","description":"Add somebody, or replace the role of somebody already on the workflow."},"WorkflowCommentRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_name":{"type":"string","title":"Author Name"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","author_name","body","created_at"],"title":"WorkflowCommentRef","description":"One remark on the thread, oldest first in the detail response."},"WorkflowCommentRequest":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"WorkflowCommentRequest","description":"Append to the thread. A blank or whitespace-only body is refused and stores nothing."},"WorkflowControlLinkRequest":{"properties":{"control_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Control Id"}},"type":"object","title":"WorkflowControlLinkRequest","description":"Set or clear the compliance anchor. `null` clears it, which is why this is a PUT and not a PATCH."},"WorkflowDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"priority":{"$ref":"#/components/schemas/Priority"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due":{"$ref":"#/components/schemas/WorkflowDue"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"comment_count":{"type":"integer","title":"Comment Count"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"publication":{"$ref":"#/components/schemas/WorkflowPublicationRef"},"assessment":{"type":"string","title":"Assessment"},"impact_areas":{"items":{"$ref":"#/components/schemas/ImpactArea"},"type":"array","title":"Impact Areas"},"plan_created":{"type":"boolean","title":"Plan Created"},"validation_required":{"type":"boolean","title":"Validation Required"},"requires_sign_off":{"type":"boolean","title":"Requires Sign Off"},"viewer_can_complete":{"type":"boolean","title":"Viewer Can Complete"},"completion_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Blocked Reason"},"completion_blocked_subject":{"anyOf":[{"$ref":"#/components/schemas/RefusalSubject"},{"type":"null"}]},"edit_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Blocked Reason"},"assignees":{"items":{"$ref":"#/components/schemas/WorkflowAssigneeRef"},"type":"array","title":"Assignees"},"comments":{"items":{"$ref":"#/components/schemas/WorkflowCommentRef"},"type":"array","title":"Comments"},"activity":{"items":{"$ref":"#/components/schemas/WorkflowActivityItem"},"type":"array","title":"Activity"},"action_items":{"items":{"$ref":"#/components/schemas/WorkflowActionItemRef"},"type":"array","title":"Action Items"},"control":{"anyOf":[{"$ref":"#/components/schemas/ControlRef"},{"type":"null"}]},"overdue_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overdue Days"},"action":{"anyOf":[{"$ref":"#/components/schemas/WorkflowActionState"},{"type":"null"}]}},"type":"object","required":["id","title","status","priority","target_date","due","completed_at","created_at","comment_count","owner_name","publication","assessment","impact_areas","plan_created","validation_required","requires_sign_off","viewer_can_complete","completion_blocked_reason","completion_blocked_subject","edit_blocked_reason","assignees","comments","activity","action_items","control","overdue_days","action"],"title":"WorkflowDetailResponse","description":"The whole case file: the row, the form fields, the people, the thread and the history."},"WorkflowDue":{"properties":{"state":{"$ref":"#/components/schemas/DueState"},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days"}},"type":"object","required":["state","days"],"title":"WorkflowDue","description":"How a workflow stands against its target date; `days` is null when there is no target."},"WorkflowPublicationRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title En"},"regulator_abbreviation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulator Abbreviation"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["id","title_en","regulator_abbreviation","available"],"title":"WorkflowPublicationRef","description":"The publication a workflow assesses, or the named state where the corpus no longer resolves it.\n\n`available: false` is the one degraded state: the row stays listed and stays counted, and the read as\na whole still succeeds. The workflow's own title was composed when it was raised, so it can still name\nitself without this block."},"WorkflowRecipient":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},"type":"object","required":["user_id"],"title":"WorkflowRecipient","description":"One person being sent a publication, and whose office's copy they are being sent."},"WorkflowRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"priority":{"$ref":"#/components/schemas/Priority"},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"due":{"$ref":"#/components/schemas/WorkflowDue"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"comment_count":{"type":"integer","title":"Comment Count"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"publication":{"$ref":"#/components/schemas/WorkflowPublicationRef"}},"type":"object","required":["id","title","status","priority","target_date","due","completed_at","created_at","comment_count","owner_name","publication"],"title":"WorkflowRow","description":"One workflow as every list and the detail's own base report it."},"WorkflowScreeningRequest":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"decision":{"$ref":"#/components/schemas/ScreeningDecision"}},"type":"object","required":["publication_id","decision"],"title":"WorkflowScreeningRequest","description":"The first decision on a publication, taken from the intake in one act."},"WorkflowSendRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/WorkflowRecipient"},"type":"array","title":"Recipients"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["recipients"],"title":"WorkflowSendRequest","description":"Assign and send: who should look at this, and what they need to do.\n\nThe note is optional. Sending somebody a publication with nothing written is a legitimate act — the\npublication speaks for itself often enough — and an empty instruction is better than a required one\npeople fill with a full stop."},"WorkflowStartRequest":{"properties":{"publication_id":{"type":"string","format":"uuid","title":"Publication Id"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["publication_id","name"],"title":"WorkflowStartRequest","description":"Open a case file on a publication, under a name that says what it is for."},"WorkflowStatus":{"type":"string","enum":["pending","active","completed","not_relevant","submitted"],"title":"WorkflowStatus","description":"Workflow lifecycle.\n\nTwo of these are terminal and they are different facts. `completed` means the work was done;\n`not_relevant` means none was ever owed. Collapsing them would tell an auditor that a publication\nsomebody dismissed in a second had been assessed.\n\n`submitted` (Workflows v3, spec §10) is an action whose owner says it is done and which waits for the\nperson who signs it off. Still open — nobody has closed it — and reachable only through submit and\nsign-off, never through the case file's own lifecycle buttons (`domain/workflow_rules.py`)."},"WorkflowStatusCounts":{"properties":{"pending":{"type":"integer","title":"Pending"},"active":{"type":"integer","title":"Active"},"completed":{"type":"integer","title":"Completed"},"not_relevant":{"type":"integer","title":"Not Relevant"},"submitted":{"type":"integer","title":"Submitted"}},"type":"object","required":["pending","active","completed","not_relevant","submitted"],"title":"WorkflowStatusCounts","description":"The backlog's headline counts. Always organisation totals, never affected by a filter.\n\n`not_relevant` is its own figure rather than part of `completed`. Both are closed and a reader sees\nthem under one tab, but a dismissal is not an assessment and the two must never add up."},"WorkflowTransitionRequest":{"properties":{"to_status":{"$ref":"#/components/schemas/WorkflowStatus"}},"type":"object","required":["to_status"],"title":"WorkflowTransitionRequest","description":"Move a workflow. The current status is read from the locked row, never taken from the request."},"WorkflowUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Title"},"assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment"},"priority":{"anyOf":[{"$ref":"#/components/schemas/Priority"},{"type":"null"}]},"target_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Date"},"impact_areas":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Impact Areas"},"plan_created":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Plan Created"},"validation_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Validation Required"}},"type":"object","title":"WorkflowUpdateRequest","description":"Save the assessment form. Every field is optional; an absent field means \"leave alone\".\n\n`title` renames the workflow (Workflows v3 made it editable). Trimmed and bounded like a name given at\ncreation; a title of nothing but spaces is refused."}}}}