{"openapi":"3.1.0","info":{"title":"CHNLSYNC API","description":"AI-orchestrated technology brokerage backend","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/api/v1/customer/bootstrap":{"post":{"tags":["customer"],"summary":"Post Customer Bootstrap","description":"Bootstrap the current Clerk org into a CHNLSYNC customer tenant.","operationId":"post_customer_bootstrap_api_v1_customer_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBootstrapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerBootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/environment":{"get":{"tags":["customer"],"summary":"Get Customer Environment","description":"Return the tenant-scoped IT environment memory snapshot.","operationId":"get_customer_environment_api_v1_customer_environment_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEnvironmentRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/workspace":{"get":{"tags":["customer"],"summary":"Get Customer Workspace","description":"Read the organization's shared notes, folders, and discussions.","operationId":"get_customer_workspace_api_v1_customer_workspace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerWorkspaceState"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["customer"],"summary":"Patch Customer Workspace","description":"Persist one customer workspace operation with optimistic concurrency.","operationId":"patch_customer_workspace_api_v1_customer_workspace_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMutation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerWorkspaceState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/artifacts/{artifact_id}":{"get":{"tags":["customer"],"summary":"Get Customer Artifact","description":"Preview extracted text from an uploaded document owned by this tenant.","operationId":"get_customer_artifact_api_v1_customer_artifacts__artifact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerArtifactDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/discovery":{"get":{"tags":["customer"],"summary":"Get Customer Discovery","description":"Return per-lane guided discovery checklists for the tenant.","operationId":"get_customer_discovery_api_v1_customer_discovery_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDiscoveryRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/chat":{"post":{"tags":["customer"],"summary":"Post Customer Chat","description":"Run one synchronous customer advisor chat turn.","operationId":"post_customer_chat_api_v1_customer_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/chat/stream":{"post":{"tags":["customer"],"summary":"Post Customer Chat Stream","description":"Stream one advisor turn as SSE: real stage events, then the response.\n\nRuns the exact same guarded ``handle_chat_turn`` as ``POST /chat`` —\nstreaming only adds visibility, never a different trust path. Events\ntravel a per-turn state-bus channel (registered eagerly, BEFORE the turn\ntask starts, so no stage can slip into a registration gap) and concurrent\nturns — and the operator ``/api/state`` stream — never see each other's\nframes.","operationId":"post_customer_chat_stream_api_v1_customer_chat_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/artifacts":{"post":{"tags":["customer"],"summary":"Post Customer Artifact","description":"Ingest a text/file artifact into tenant-scoped environment memory.","operationId":"post_customer_artifact_api_v1_customer_artifacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerArtifactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerArtifactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/cases":{"get":{"tags":["customer"],"summary":"Get Customer Cases","description":"List all cases for the authenticated customer tenant.","operationId":"get_customer_cases_api_v1_customer_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerCaseRead"},"type":"array","title":"Response Get Customer Cases Api V1 Customer Cases Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/notifications":{"get":{"tags":["customer"],"summary":"Get Customer Notifications","description":"List buyer-visible notifications for the authenticated tenant (D2.6).","operationId":"get_customer_notifications_api_v1_customer_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNotificationRead"},"title":"Response Get Customer Notifications Api V1 Customer Notifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/notifications/mark-read":{"post":{"tags":["customer"],"summary":"Post Customer Notifications Mark Read","description":"Mark the tenant's own notifications as read (D2.6).","operationId":"post_customer_notifications_mark_read_api_v1_customer_notifications_mark_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerNotificationsMarkReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerNotificationsMarkReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/cases/{case_id}/booking-click":{"post":{"tags":["customer"],"summary":"Post Customer Case Booking Click","description":"Record that the buyer opened the review-call booking link (D2.5).","operationId":"post_customer_case_booking_click_api_v1_customer_cases__case_id__booking_click_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseBookingRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/cases/{case_id}/request-review":{"post":{"tags":["customer"],"summary":"Post Customer Case Review","description":"Ask CHNLSYNC operators to review a tenant-owned advisory case.","operationId":"post_customer_case_review_api_v1_customer_cases__case_id__request_review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseReviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/cases/{case_id}/deliverables":{"get":{"tags":["customer"],"summary":"Get Customer Case Deliverables","description":"List published deliverables for a tenant-owned case (roadmap D3).","operationId":"get_customer_case_deliverables_api_v1_customer_cases__case_id__deliverables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDeliverableSummaryRead"},"title":"Response Get Customer Case Deliverables Api V1 Customer Cases  Case Id  Deliverables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/cases/{case_id}/brief-request":{"post":{"tags":["customer"],"summary":"Post Customer Brief Request","description":"Request a Decision Brief draft for the buyer's own case (roadmap C3).\n\nFlag-gated dark; drafting only — approval and publication stay with\noperators. Flag-off, unknown, and cross-tenant cases all 404 identically.","operationId":"post_customer_brief_request_api_v1_customer_cases__case_id__brief_request_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerBriefRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/deliverables/{deliverable_id}":{"get":{"tags":["customer"],"summary":"Get Customer Deliverable","description":"Return one published deliverable for the authenticated tenant (D3).","operationId":"get_customer_deliverable_api_v1_customer_deliverables__deliverable_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDeliverableRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/deliverables/{deliverable_id}/export":{"get":{"tags":["customer"],"summary":"Export Customer Deliverable","description":"Download one published deliverable as a markdown document (roadmap 1.2).\n\nDeterministic server-side rendering of the stored (write-time-sanitized)\npayload — no model call. Same flag + non-oracle 404 behavior as the JSON\nread route.","operationId":"export_customer_deliverable_api_v1_customer_deliverables__deliverable_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/conversations":{"get":{"tags":["customer"],"summary":"Get Customer Conversations","description":"List the tenant's active advisor conversations for the thread sidebar.","operationId":"get_customer_conversations_api_v1_customer_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"enum":["active","archived"],"type":"string","default":"active","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConversationsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/conversations/{conversation_id}/messages":{"get":{"tags":["customer"],"summary":"Get Customer Conversation Messages","description":"Chronological history for one tenant-owned conversation.","operationId":"get_customer_conversation_messages_api_v1_customer_conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"asc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConversationMessagesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/conversations/{conversation_id}":{"patch":{"tags":["customer"],"summary":"Patch Customer Conversation","description":"Rename a tenant-owned conversation.","operationId":"patch_customer_conversation_api_v1_customer_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"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/ConversationRenameRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConversationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer"],"summary":"Delete Customer Conversation","description":"Soft-archive a conversation (hidden from the sidebar, kept for audit).","operationId":"delete_customer_conversation_api_v1_customer_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"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/CustomerConversationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/conversations/{conversation_id}/generate-title":{"post":{"tags":["customer"],"summary":"Post Customer Conversation Generate Title","description":"Generate a short thread title (buyer-visible: redacted + PII-scrubbed).","operationId":"post_customer_conversation_generate_title_api_v1_customer_conversations__conversation_id__generate_title_post","security":[{"HTTPBearer":[]}],"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/ConversationTitleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/messages/{message_id}/feedback":{"post":{"tags":["customer"],"summary":"Post Customer Message Feedback","description":"Record buyer thumbs feedback on one of the tenant's assistant replies.","operationId":"post_customer_message_feedback_api_v1_customer_messages__message_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/state":{"get":{"tags":["customer"],"summary":"Get Chat State","description":"Read the caller's chat preferences and company member identities.","operationId":"get_chat_state_api_v1_customer_chat_tools_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatState"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/chat-tools/preferences":{"patch":{"tags":["customer"],"summary":"Patch Chat Preferences","description":"Persist only the authenticated membership's preferences.","operationId":"patch_chat_preferences_api_v1_customer_chat_tools_preferences_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatPreferences"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatPreferences"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customer/chat-tools/search":{"get":{"tags":["customer"],"summary":"Search Customer Chats","description":"Find matching customer messages across active and archived history.","operationId":"search_customer_chats_api_v1_customer_chat_tools_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"enum":["all","active","archived"],"type":"string","default":"all","title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSearchPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/conversations/{conversation_id}/{action}":{"post":{"tags":["customer"],"summary":"Perform Chat Action","description":"Apply a tenant-scoped conversation lifecycle operation.","operationId":"perform_chat_action_api_v1_customer_chat_tools_conversations__conversation_id___action__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"action","in":"path","required":true,"schema":{"enum":["restore","delete","fork","export","share","revoke"],"type":"string","title":"Action"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatActionResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/conversations/{conversation_id}/versions/{message_id}":{"get":{"tags":["customer"],"summary":"Get Answer Versions","description":"Read persisted alternatives for an answer visible to the current company.","operationId":"get_answer_versions_api_v1_customer_chat_tools_conversations__conversation_id__versions__message_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatVersions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/conversations/{conversation_id}/shares":{"get":{"tags":["customer"],"summary":"Get Chat Shares","description":"List company-only conversation snapshots without their message bodies.","operationId":"get_chat_shares_api_v1_customer_chat_tools_conversations__conversation_id__shares_get","security":[{"HTTPBearer":[]}],"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":{"type":"array","items":{"$ref":"#/components/schemas/ChatShare"},"title":"Response Get Chat Shares Api V1 Customer Chat Tools Conversations  Conversation Id  Shares Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/conversations/{conversation_id}/shares/{share_id}":{"get":{"tags":["customer"],"summary":"Get Chat Share","description":"Read an immutable snapshot only within the authenticated company.","operationId":"get_chat_share_api_v1_customer_chat_tools_conversations__conversation_id__shares__share_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatShare"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/chat-tools/capabilities":{"get":{"tags":["customer"],"summary":"Get Chat Capabilities","description":"Advertise configured capabilities without exposing provider credentials.","operationId":"get_chat_capabilities_api_v1_customer_chat_tools_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCapabilities"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/sessions":{"post":{"tags":["customer-agent"],"summary":"Post Agent Session","description":"Create a provisional workspace on behalf of an external agent's user.","operationId":"post_agent_session_api_v1_agent_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/agent/sessions/{session_id}/chat":{"post":{"tags":["customer-agent"],"summary":"Post Agent Chat","description":"Run one advisor turn for an agent session (full trust-rail stack).","operationId":"post_agent_chat_api_v1_agent_sessions__session_id__chat_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Agent-Session-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Session-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/sessions/{session_id}/callback-request":{"post":{"tags":["customer-agent"],"summary":"Post Agent Callback Request","description":"Record a buyer-consented broker-callback request (the handoff).\n\nThe callback stays the terminal state; ``book_url`` is a soft extension\nthe assistant MAY offer. With ``agent_callback_email_enabled`` on, the\nbuyer also gets one confirmation email (claim link + booking link) as a\nbackground task after the response — never on the request path.","operationId":"post_agent_callback_request_api_v1_agent_sessions__session_id__callback_request_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-Agent-Session-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Session-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCallbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCallbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/copper-retirement":{"get":{"tags":["customer-agent"],"summary":"Get Copper Retirement","description":"Credentialed alias of the public dataset read (no LLM, no tenant).\n\nSame payload as the keyless ``GET /api/v1/copper-retirement``; only the\ntracker-link attribution differs (``ref=agent-<consumer>``).","operationId":"get_copper_retirement_api_v1_agent_copper_retirement_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopperRetirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/intake/status":{"get":{"tags":["customer-intake"],"summary":"Get Intake Status","description":"Report whether public intake is open, so callers can probe up front.\n\nDeliberately NOT gated on the intake flag (it never 404s): the dashboard\nuses it to render the closed state before showing the form instead of\nafter a doomed submit. Exposes only the flag value — no data, no writes.","operationId":"get_intake_status_api_v1_customer_intake_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeStatusResponse"}}}}}}},"/api/v1/customer/intake":{"post":{"tags":["customer-intake"],"summary":"Post Intake","description":"Create a provisional intake workspace from the public form.","operationId":"post_intake_api_v1_customer_intake_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/intake/chat":{"post":{"tags":["customer-intake"],"summary":"Post Intake Chat","description":"Run one anonymous advisor turn against a provisional workspace.","operationId":"post_intake_chat_api_v1_customer_intake_chat_post","parameters":[{"name":"X-Intake-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/intake/claim":{"post":{"tags":["customer-intake"],"summary":"Post Intake Claim","description":"Merge a provisional workspace into the signed-in Clerk tenant.\n\nDeliberately NOT gated on the intake flag: links already handed out\nmust stay claimable even if new intake closes. Auth is the signed-in\nClerk principal; possession of the claim credential is the ownership\nproof.","operationId":"post_intake_claim_api_v1_customer_intake_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerIntakeClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/copper-retirement":{"get":{"tags":["copper-retirement"],"summary":"Get Public Copper Retirement","description":"Copper-retirement programs + latest approved filings (no key required).","operationId":"get_public_copper_retirement_api_v1_copper_retirement_get","parameters":[{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopperRetirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inngest":{"get":{"summary":"Get Api Inngest","operationId":"get_api_inngest_api_inngest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Put Inngest Api","operationId":"put_inngest_api_api_inngest_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Post Inngest Api","operationId":"post_inngest_api_api_inngest_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentCallbackRequest":{"properties":{"contact_name":{"type":"string","maxLength":255,"minLength":1,"title":"Contact Name"},"contact_email":{"type":"string","maxLength":255,"minLength":3,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$","title":"Contact Email"}},"type":"object","required":["contact_name","contact_email"],"title":"AgentCallbackRequest","description":"Buyer-consented human-handoff request with contact details."},"AgentCallbackResponse":{"properties":{"status":{"type":"string","const":"received","title":"Status","default":"received"},"book_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Book Url","description":"Optional scheduling link the user may use to pick a time now. The callback is already queued; a broker reaches out either way."},"disclosure":{"type":"string","title":"Disclosure","default":"A human broker reviews every recommendation; supplier names and pricing come only after that review."}},"type":"object","title":"AgentCallbackResponse","description":"Acknowledgement that a broker callback was recorded."},"AgentChatRequest":{"properties":{"message":{"type":"string","maxLength":8000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["message"],"title":"AgentChatRequest","description":"One advisor turn asked on behalf of the agent's user."},"AgentChatResponse":{"properties":{"assistant_message":{"type":"string","title":"Assistant Message"},"follow_up_questions":{"items":{"type":"string"},"type":"array","title":"Follow Up Questions"},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"},"claim_url":{"type":"string","title":"Claim Url"},"disclosure":{"type":"string","title":"Disclosure","default":"A human broker reviews every recommendation; supplier names and pricing come only after that review."}},"type":"object","required":["assistant_message","conversation_id","claim_url"],"title":"AgentChatResponse","description":"Buyer-safe advisor reply for an external agent."},"AgentSessionCreateRequest":{"properties":{"company_name":{"type":"string","maxLength":255,"minLength":1,"title":"Company Name"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"},"site_count":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Site Count"},"current_providers":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Current Providers"},"contract_end_dates":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Contract End Dates"},"pain":{"type":"string","maxLength":4000,"minLength":1,"title":"Pain"}},"type":"object","required":["company_name","pain"],"title":"AgentSessionCreateRequest","description":"Structured environment intro an external agent submits for its user."},"AgentSessionCreateResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"session_token":{"type":"string","title":"Session Token"},"claim_url":{"type":"string","title":"Claim Url"},"environment_summary":{"type":"string","title":"Environment Summary"},"missing_info":{"items":{"type":"string"},"type":"array","title":"Missing Info"},"fact_count":{"type":"integer","title":"Fact Count","default":0},"disclosure":{"type":"string","title":"Disclosure","default":"A human broker reviews every recommendation; supplier names and pricing come only after that review."}},"type":"object","required":["session_id","session_token","claim_url","environment_summary"],"title":"AgentSessionCreateResponse","description":"Session handle returned exactly once at creation."},"ApprovedSupplierDisclosure":{"properties":{"supplier_name":{"type":"string","title":"Supplier Name"},"lane":{"type":"string","title":"Lane","default":""},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"buyer_visible_note":{"type":"string","title":"Buyer Visible Note","default":""}},"type":"object","required":["supplier_name"],"title":"ApprovedSupplierDisclosure","description":"Operator-approved supplier disclosure attached to one case (D1.7)."},"ArtifactType":{"type":"string","enum":["contract","invoice","vendor_list","topology","export","notes","other"],"title":"ArtifactType","description":"Customer-provided source material types supported in portal v1."},"BuyerBriefRequestResponse":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"status":{"type":"string","enum":["requested","already_pending"],"title":"Status"}},"type":"object","required":["case_id","status"],"title":"BuyerBriefRequestResponse","description":"Ack for a buyer-initiated Decision Brief request (roadmap C3).\n\n``requested`` = a fresh DRAFT entered the operator review lifecycle;\n``already_pending`` = an unpublished brief for the case already exists, so\nno duplicate was drafted. Publishing always remains an operator action."},"BuyerCopperExposureRead":{"properties":{"tier":{"type":"string","enum":["CRITICAL","HIGH","MEDIUM","LOW","NONE"],"title":"Tier"},"carrier_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Display"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"site_count":{"type":"integer","title":"Site Count"},"program_active":{"type":"boolean","title":"Program Active"},"shutoff_authorized_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Shutoff Authorized On"},"docket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docket"},"next_shutoff_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Next Shutoff On"},"next_docket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Docket"},"copper_signals_confirmed":{"type":"boolean","title":"Copper Signals Confirmed"},"headline":{"type":"string","title":"Headline"},"source_url":{"type":"string","title":"Source Url"},"as_of":{"type":"string","format":"date","title":"As Of"}},"type":"object","required":["tier","carrier_display","state","site_count","program_active","shutoff_authorized_on","docket","next_shutoff_on","next_docket","copper_signals_confirmed","headline","source_url","as_of"],"title":"BuyerCopperExposureRead","description":"Buyer-visible copper-retirement exposure derived from the buyer's own facts.\n\n``carrier_display`` is the buyer's own stored carrier fact (never a\nCHNLSYNC-shortlisted supplier); ``headline`` is carrier-anonymous so it can\nbe reused by any buyer-facing surface without a redaction pass."},"CaseBookingRead":{"properties":{"booking_url":{"type":"string","title":"Booking Url"},"clicked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Clicked At"}},"type":"object","required":["booking_url"],"title":"CaseBookingRead","description":"Buyer-visible booking call-to-action for an approved case (D2.5)."},"CaseDraft":{"properties":{"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"readiness_score":{"type":"integer","title":"Readiness Score"}},"type":"object","required":["readiness_score"],"title":"CaseDraft","description":"Case draft details emitted by an advisor turn."},"CaseReviewProgress":{"properties":{"stage":{"type":"string","enum":["draft","needs_info","reviewing","supplier_path_drafted","ready_for_call","closed"],"title":"Stage"},"label":{"type":"string","title":"Label"},"detail":{"type":"string","title":"Detail"},"next_action":{"type":"string","title":"Next Action"},"can_request_review":{"type":"boolean","title":"Can Request Review"}},"type":"object","required":["stage","label","detail","next_action","can_request_review"],"title":"CaseReviewProgress","description":"Buyer-safe case review progress with no internal supplier detail."},"CaseReviewRequestResponse":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"status":{"$ref":"#/components/schemas/CustomerCaseStatus"},"review_status":{"$ref":"#/components/schemas/CaseReviewStatus"},"review_prep_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Prep Event Id"},"queue_position":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Queue Position"},"next_slot_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Slot Message"}},"type":"object","required":["case_id","status","review_status"],"title":"CaseReviewRequestResponse","description":"Response returned when a customer requests CHNLSYNC review."},"CaseReviewStatus":{"type":"string","enum":["requested","in_review","approved","needs_info","rejected"],"title":"CaseReviewStatus","description":"Internal review status for a customer case."},"ChatAction":{"properties":{"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"},"include_message":{"type":"boolean","title":"Include Message","default":true},"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"share_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Share Id"}},"additionalProperties":false,"type":"object","title":"ChatAction","description":"Explicit parameters for conversation lifecycle operations."},"ChatActionResult":{"properties":{"conversation":{"anyOf":[{"$ref":"#/components/schemas/CustomerConversationRead"},{"type":"null"}]},"share":{"anyOf":[{"$ref":"#/components/schemas/ChatShare"},{"type":"null"}]},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"deleted":{"type":"boolean","title":"Deleted","default":false}},"type":"object","title":"ChatActionResult","description":"The outcome of a conversation operation."},"ChatCapabilities":{"properties":{"pdf":{"type":"boolean","title":"Pdf"},"pdf_max_bytes":{"type":"integer","title":"Pdf Max Bytes"},"text_max_chars":{"type":"integer","title":"Text Max Chars","default":50000}},"type":"object","required":["pdf","pdf_max_bytes"],"title":"ChatCapabilities","description":"Server-advertised upload support used by the customer composer."},"ChatMember":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","name","role"],"title":"ChatMember","description":"A company member's public identity; no authentication or contact secrets."},"ChatPreferences":{"properties":{"revision":{"type":"integer","minimum":0.0,"title":"Revision","default":0},"pinned":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Pinned"},"answer_length":{"type":"string","enum":["balanced","concise","detailed"],"title":"Answer Length","default":"balanced"},"instructions":{"type":"string","maxLength":2000,"title":"Instructions","default":""},"notifications":{"type":"boolean","title":"Notifications","default":true}},"additionalProperties":false,"type":"object","title":"ChatPreferences","description":"Personal preferences stored against the authenticated company membership."},"ChatSearchPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatSearchResult"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ChatSearchPage","description":"A bounded page of server-side search results."},"ChatSearchResult":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"},"title":{"type":"string","title":"Title"},"excerpt":{"type":"string","title":"Excerpt"},"status":{"type":"string","title":"Status"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["conversation_id","title","excerpt","status","updated_at"],"title":"ChatSearchResult","description":"A matching permitted message, or a matching conversation title."},"ChatShare":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"author_id":{"type":"string","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"messages":{"items":{"$ref":"#/components/schemas/CustomerMessageRead"},"type":"array","maxItems":500,"title":"Messages"}},"type":"object","required":["id","title","created_at","author_id","author_name"],"title":"ChatShare","description":"An immutable conversation snapshot available only inside its company."},"ChatState":{"properties":{"preferences":{"$ref":"#/components/schemas/ChatPreferences"},"viewer":{"$ref":"#/components/schemas/ChatMember"},"members":{"items":{"$ref":"#/components/schemas/ChatMember"},"type":"array","title":"Members"},"pinned_conversations":{"items":{"$ref":"#/components/schemas/CustomerConversationRead"},"type":"array","title":"Pinned Conversations"}},"type":"object","required":["preferences","viewer","members"],"title":"ChatState","description":"The current member's preferences and company membership context."},"ChatVersions":{"properties":{"current_id":{"type":"string","format":"uuid","title":"Current Id"},"items":{"items":{"$ref":"#/components/schemas/CustomerMessageRead"},"type":"array","title":"Items"}},"type":"object","required":["current_id","items"],"title":"ChatVersions","description":"Persisted answer alternatives linked through regeneration metadata."},"Citation":{"properties":{"source_type":{"type":"string","title":"Source Type"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"label":{"type":"string","title":"Label"},"evidence_grade":{"anyOf":[{"type":"string","enum":["your_data","vetted_catalog","industry_knowledge"]},{"type":"null"}],"title":"Evidence Grade"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"As Of"}},"type":"object","required":["source_type","label"],"title":"Citation","description":"Source citation used by a customer advisor answer.\n\nEvidence-grading fields (roadmap 1.3) are optional so citations persisted\non messages before the upgrade still parse from stored JSON."},"ConversationRenameRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"ConversationRenameRequest","description":"Buyer rename of their own conversation."},"ConversationTitleResponse":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["conversation_id","title"],"title":"ConversationTitleResponse","description":"Result of conversation title generation."},"CopperFilingRead":{"properties":{"carrier":{"type":"string","title":"Carrier"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"kind":{"type":"string","title":"Kind"},"filer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filer"},"docket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docket"},"filed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filed At"},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"retirement_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retirement Effective At"},"geography_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geography Detail"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["carrier","state","kind","filer","docket","filed_at","granted_at","retirement_effective_at","geography_detail","source_url"],"title":"CopperFilingRead","description":"One founder-approved copper-retirement filing from the copper-watch detector.\n\nPublic-filing facts only (FCC ECFS / carrier disclosure pages) — never\nprospect or buyer data. ``kind`` is the detector's notice type\n(``ecfs_application`` | ``fcc_public_notice`` | ``fcc_grant`` |\n``carrier_website_notice``)."},"CopperRetirementRecord":{"properties":{"carrier":{"type":"string","title":"Carrier"},"state":{"type":"string","title":"State"},"retirement_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Retirement Date"},"status":{"type":"string","enum":["date_filed","program_active"],"title":"Status"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["carrier","state","retirement_date","status","notes"],"title":"CopperRetirementRecord","description":"One (carrier, state) copper-retirement program entry."},"CopperRetirementResponse":{"properties":{"records":{"items":{"$ref":"#/components/schemas/CopperRetirementRecord"},"type":"array","title":"Records"},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"license":{"type":"string","title":"License","default":"CC BY 4.0"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"As-of date of the static (carrier, state) records; filings carry their own dates."},"latest_filings":{"items":{"$ref":"#/components/schemas/CopperFilingRead"},"type":"array","title":"Latest Filings","description":"Newest founder-approved filings (most recent 20, narrowed by the same filters)."}},"type":"object","required":["records","source","source_url"],"title":"CopperRetirementResponse","description":"Deterministic copper-retirement dataset slice for agent consumers."},"CustomerArtifactDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"processing_status":{"type":"string","title":"Processing Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","content","processing_status","created_at"],"title":"CustomerArtifactDetail","description":"The customer's own extracted document text, scoped to their tenant."},"CustomerArtifactRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"artifact_type":{"$ref":"#/components/schemas/ArtifactType","default":"notes"},"content":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Content"},"content_base64":{"anyOf":[{"type":"string","maxLength":8000000,"minLength":1},{"type":"null"}],"title":"Content Base64"},"original_filename":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Original Filename"},"mime_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Mime Type"},"scope":{"type":"string","enum":["company","chat"],"title":"Scope","default":"company"},"upload_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Upload Id"}},"type":"object","required":["title"],"title":"CustomerArtifactRequest","description":"Artifact intake request: extracted text (v1) or a base64 PDF (1.1).\n\nExactly one of ``content`` (client-extracted plain text) or\n``content_base64`` (a PDF document, flag-gated server-side transcription)\nmust be provided. The base64 length cap bounds request size; the decoded\nbyte cap is enforced in the service against settings."},"CustomerArtifactResponse":{"properties":{"artifact":{"$ref":"#/components/schemas/EnvironmentArtifactRead"},"environment_deltas":{"items":{"$ref":"#/components/schemas/EnvironmentFactRead"},"type":"array","title":"Environment Deltas"}},"type":"object","required":["artifact","environment_deltas"],"title":"CustomerArtifactResponse","description":"Artifact creation response including extracted facts."},"CustomerBootstrapRequest":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"}},"type":"object","title":"CustomerBootstrapRequest","description":"Optional customer bootstrap hints from the dashboard shell."},"CustomerBootstrapResponse":{"properties":{"tenant":{"$ref":"#/components/schemas/CustomerTenantRead"},"user":{"$ref":"#/components/schemas/CustomerUserRead"},"environment":{"$ref":"#/components/schemas/CustomerEnvironmentRead"}},"type":"object","required":["tenant","user","environment"],"title":"CustomerBootstrapResponse","description":"Bootstrap response returned after resolving Clerk identity to tenant."},"CustomerCaseRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"status":{"$ref":"#/components/schemas/CustomerCaseStatus"},"buyer_visible_lanes":{"items":{"type":"string"},"type":"array","title":"Buyer Visible Lanes"},"readiness_score":{"type":"integer","title":"Readiness Score"},"approved_next_steps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved Next Steps"},"approved_suppliers":{"items":{"$ref":"#/components/schemas/ApprovedSupplierDisclosure"},"type":"array","title":"Approved Suppliers"},"booking":{"anyOf":[{"$ref":"#/components/schemas/CaseBookingRead"},{"type":"null"}]},"review_progress":{"$ref":"#/components/schemas/CaseReviewProgress"},"requested_review_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested Review At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","summary","status","buyer_visible_lanes","readiness_score","review_progress","requested_review_at","created_at","updated_at"],"title":"CustomerCaseRead","description":"Customer-facing advisory case status."},"CustomerCaseStatus":{"type":"string","enum":["draft","chnlsync_reviewing","needs_info","supplier_path_drafted","ready_for_call","closed"],"title":"CustomerCaseStatus","description":"Human-gated customer advisory case lifecycle."},"CustomerChatRequest":{"properties":{"message":{"type":"string","maxLength":12000,"title":"Message","default":""},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"regenerate":{"type":"boolean","title":"Regenerate","default":false},"document_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":8,"title":"Document Ids"},"answer_length":{"type":"string","enum":["balanced","concise","detailed"],"title":"Answer Length","default":"balanced"},"response_instructions":{"type":"string","maxLength":2000,"title":"Response Instructions","default":""},"initiative_case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initiative Case Id"}},"type":"object","title":"CustomerChatRequest","description":"Customer advisor chat request.\n\n``regenerate=True`` re-answers the conversation's most recent user message:\nno new user message is persisted, ``message`` is ignored, and the prior\nassistant reply is marked superseded in the buyer view."},"CustomerChatResponse":{"properties":{"assistant_message":{"type":"string","title":"Assistant Message"},"user_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Message Id"},"assistant_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assistant Message Id","description":"Persisted id of the assistant reply, used by the portal for message feedback. None for refusal/over-cap turns that persist no assistant row."},"follow_up_questions":{"items":{"type":"string"},"type":"array","maxItems":4,"title":"Follow Up Questions","description":"Buyer-visible suggested follow-up questions. The service sets this explicitly on every new response; the default preserves compatibility with older cached/client payloads."},"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"environment_deltas":{"items":{"$ref":"#/components/schemas/EnvironmentFactRead"},"type":"array","title":"Environment Deltas"},"case_draft":{"anyOf":[{"$ref":"#/components/schemas/CaseDraft"},{"type":"null"}]},"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Citations"},"review_status":{"anyOf":[{"$ref":"#/components/schemas/CustomerCaseStatus"},{"type":"null"}]},"buyer_visible_lanes":{"items":{"type":"string"},"type":"array","title":"Buyer Visible Lanes"},"advisor_mode":{"type":"string","enum":["llm","deterministic_fallback","unavailable"],"title":"Advisor Mode","description":"Advisor runtime mode. The service sets this explicitly on every new response; the default preserves compatibility with older cached/client payloads.","default":"deterministic_fallback"},"memory_updated":{"type":"boolean","title":"Memory Updated","description":"Whether this turn wrote tenant memory. The service sets this explicitly on every new response; the default preserves compatibility with older cached/client payloads.","default":false},"review_prep_requested":{"type":"boolean","title":"Review Prep Requested","description":"True when this turn flipped the active case into CHNLSYNC review because the buyer agreed to the advisor's review offer. Signals the router to enqueue review prep (source='advisor_chat') for the case carried in ``case_draft.case_id``.","default":false},"review_booking":{"anyOf":[{"$ref":"#/components/schemas/CaseBookingRead"},{"type":"null"}],"description":"Booking CTA attached to the escalation turn (only when ``review_prep_requested`` is True and customer_escalation_booking_enabled is on) so the portal can offer the review-call scheduler at the handoff moment. The URL is operator-configured (settings.cal_com_booking_url) — never model output."},"internal_supplier_notes_hidden":{"type":"boolean","const":true,"title":"Internal Supplier Notes Hidden","default":true}},"type":"object","required":["assistant_message","conversation_id","environment_deltas","case_draft","citations","review_status","buyer_visible_lanes"],"title":"CustomerChatResponse","description":"Public advisor response shape for the customer portal."},"CustomerConversationMessagesPage":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"title":{"type":"string","title":"Title"},"items":{"items":{"$ref":"#/components/schemas/CustomerMessageRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["conversation_id","title","items"],"title":"CustomerConversationMessagesPage","description":"One keyset page of a conversation's history."},"CustomerConversationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview"}},"type":"object","required":["id","title","status","created_at","updated_at"],"title":"CustomerConversationRead","description":"Buyer-visible conversation summary for the thread sidebar."},"CustomerConversationsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerConversationRead"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CustomerConversationsPage","description":"One keyset page of the tenant's conversations."},"CustomerDeliverableKind":{"type":"string","enum":["rfp","response_comparison","quote_summary","brief"],"title":"CustomerDeliverableKind","description":"Buyer-facing deliverable types produced per customer case (roadmap D3)."},"CustomerDeliverableRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_id":{"type":"string","format":"uuid","title":"Case Id"},"kind":{"$ref":"#/components/schemas/CustomerDeliverableKind"},"title":{"type":"string","title":"Title"},"revision":{"type":"integer","title":"Revision"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"signed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"packet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Packet Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"internal_notes_hidden":{"type":"boolean","const":true,"title":"Internal Notes Hidden","default":true}},"type":"object","required":["id","case_id","kind","title","revision","payload"],"title":"CustomerDeliverableRead","description":"Buyer-visible detail for one published deliverable."},"CustomerDeliverableSummaryRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_id":{"type":"string","format":"uuid","title":"Case Id"},"kind":{"$ref":"#/components/schemas/CustomerDeliverableKind"},"title":{"type":"string","title":"Title"},"revision":{"type":"integer","title":"Revision"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"signed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"packet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Packet Id"}},"type":"object","required":["id","case_id","kind","title","revision"],"title":"CustomerDeliverableSummaryRead","description":"Buyer-visible summary row for one published deliverable.\n\n``signed_by``/``approved_at``/``packet_id`` name the operator who reviewed\nit. They are set together, only for published deliverables approved by a\nnamed operator and only while ``customer_deliverable_signature_enabled`` is\non; legacy anonymous approvals leave all three ``None``."},"CustomerDiscoveryRead":{"properties":{"lanes":{"items":{"$ref":"#/components/schemas/DiscoveryLaneChecklistRead"},"type":"array","title":"Lanes"}},"type":"object","required":["lanes"],"title":"CustomerDiscoveryRead","description":"Per-lane guided discovery checklists for the tenant (roadmap 1.5)."},"CustomerEnvironmentRead":{"properties":{"tenant":{"$ref":"#/components/schemas/CustomerTenantRead"},"summary":{"type":"string","title":"Summary"},"profile":{"additionalProperties":true,"type":"object","title":"Profile"},"missing_info":{"items":{"type":"string"},"type":"array","title":"Missing Info"},"readiness_score":{"type":"integer","title":"Readiness Score"},"pilot_readiness":{"$ref":"#/components/schemas/PilotReadinessSummary"},"facts":{"items":{"$ref":"#/components/schemas/EnvironmentFactRead"},"type":"array","title":"Facts"},"artifacts":{"items":{"$ref":"#/components/schemas/EnvironmentArtifactRead"},"type":"array","title":"Artifacts"},"cases":{"items":{"$ref":"#/components/schemas/CustomerCaseRead"},"type":"array","title":"Cases"},"copper_exposure":{"anyOf":[{"$ref":"#/components/schemas/BuyerCopperExposureRead"},{"type":"null"}]}},"type":"object","required":["tenant","summary","profile","missing_info","readiness_score","pilot_readiness","facts","artifacts","cases"],"title":"CustomerEnvironmentRead","description":"Full customer environment snapshot for the portal workspace."},"CustomerIntakeAttribution":{"properties":{"source":{"type":"string","enum":["google","bing","duckduckgo","linkedin","facebook","instagram","x","chatgpt","perplexity","newsletter","smartlead","direct","other_referral","unknown"],"title":"Source","default":"unknown"},"medium":{"type":"string","enum":["organic","cpc","paid_social","social","email","referral","none","unknown"],"title":"Medium","default":"unknown"},"landing_page":{"type":"string","maxLength":180,"title":"Landing Page","default":"/start"},"campaign_code":{"anyOf":[{"type":"string","enum":["a1","a2","b1"]},{"type":"null"}],"title":"Campaign Code"}},"type":"object","title":"CustomerIntakeAttribution","description":"Bounded acquisition metadata, never evidence of buyer qualification.\n\nMalformed analytics values fall back safely instead of blocking intake.\nExtra fields are ignored so raw URLs, query strings, contact details, and\ntranscripts cannot enter the stored attribution object."},"CustomerIntakeChatRequest":{"properties":{"intake_id":{"type":"string","format":"uuid","title":"Intake Id"},"message":{"type":"string","maxLength":8000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["intake_id","message"],"title":"CustomerIntakeChatRequest","description":"Anonymous advisor chat turn scoped to a provisional intake."},"CustomerIntakeClaimRequest":{"properties":{"intake_id":{"type":"string","format":"uuid","title":"Intake Id"},"intake_token":{"type":"string","maxLength":255,"minLength":1,"title":"Intake Token"}},"type":"object","required":["intake_id","intake_token"],"title":"CustomerIntakeClaimRequest","description":"Authenticated claim of a provisional intake workspace (D2.2)."},"CustomerIntakeClaimResponse":{"properties":{"tenant":{"$ref":"#/components/schemas/CustomerTenantRead"},"mode":{"type":"string","enum":["rekeyed","merged"],"title":"Mode"}},"type":"object","required":["tenant","mode"],"title":"CustomerIntakeClaimResponse","description":"Result of merging a provisional workspace into a Clerk tenant."},"CustomerIntakeCreateRequest":{"properties":{"company_name":{"type":"string","maxLength":255,"minLength":1,"title":"Company Name"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"},"site_count":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Site Count"},"current_providers":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Current Providers"},"contract_end_dates":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Contract End Dates"},"pain":{"type":"string","maxLength":4000,"minLength":1,"title":"Pain"},"state":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"State"},"source":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z0-9_:-]+$"},{"type":"null"}],"title":"Source"},"attribution":{"anyOf":[{"$ref":"#/components/schemas/CustomerIntakeAttribution"},{"type":"null"}]}},"type":"object","required":["company_name","pain"],"title":"CustomerIntakeCreateRequest","description":"Structured answers from the public intake form (roadmap D2.1)."},"CustomerIntakeCreateResponse":{"properties":{"intake_id":{"type":"string","format":"uuid","title":"Intake Id"},"intake_token":{"type":"string","title":"Intake Token"},"claim_path":{"type":"string","title":"Claim Path"},"environment_summary":{"type":"string","title":"Environment Summary"},"missing_info":{"items":{"type":"string"},"type":"array","title":"Missing Info"},"fact_count":{"type":"integer","title":"Fact Count","default":0}},"type":"object","required":["intake_id","intake_token","claim_path","environment_summary"],"title":"CustomerIntakeCreateResponse","description":"Provisional workspace handle returned exactly once at intake."},"CustomerIntakeStatusResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"CustomerIntakeStatusResponse","description":"Public availability of the anonymous intake surface."},"CustomerMessageRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Citations"},"follow_up_questions":{"items":{"type":"string"},"type":"array","title":"Follow Up Questions"},"advisor_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advisor Mode"},"feedback_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Rating"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","content","created_at"],"title":"CustomerMessageRead","description":"Buyer-visible message in a restored conversation."},"CustomerNotificationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"link_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Path"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","title","body","created_at"],"title":"CustomerNotificationRead","description":"Buyer-visible portal notification (roadmap D2.6)."},"CustomerNotificationsMarkReadRequest":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Ids"}},"type":"object","required":["ids"],"title":"CustomerNotificationsMarkReadRequest","description":"Notification ids the buyer acknowledged (own tenant only)."},"CustomerNotificationsMarkReadResponse":{"properties":{"marked":{"type":"integer","title":"Marked"}},"type":"object","required":["marked"],"title":"CustomerNotificationsMarkReadResponse","description":"Count of notifications transitioned to read."},"CustomerTenantRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"clerk_org_id":{"type":"string","title":"Clerk Org Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","domain","clerk_org_id","status"],"title":"CustomerTenantRead","description":"Customer tenant details visible to members of that tenant."},"CustomerUserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","email","name","role"],"title":"CustomerUserRead","description":"Customer portal user details visible to the current user."},"CustomerWorkspaceState":{"properties":{"revision":{"type":"integer","title":"Revision","default":0},"initiatives":{"additionalProperties":{"$ref":"#/components/schemas/WorkspaceInitiative"},"type":"object","maxProperties":100,"title":"Initiatives"},"folders":{"items":{"$ref":"#/components/schemas/WorkspaceFolder"},"type":"array","maxItems":50,"title":"Folders"},"assignments":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":2000,"title":"Assignments"},"notes":{"items":{"$ref":"#/components/schemas/WorkspaceNote"},"type":"array","maxItems":100,"title":"Notes"},"comments":{"items":{"$ref":"#/components/schemas/WorkspaceComment"},"type":"array","maxItems":500,"title":"Comments"},"viewer_id":{"type":"string","title":"Viewer Id","default":""}},"type":"object","title":"CustomerWorkspaceState","description":"Versioned shared data; appearance and open tabs are personal browser state."},"DiscoveryChecklistItemRead":{"properties":{"field":{"type":"string","title":"Field"},"label":{"type":"string","title":"Label"},"question":{"type":"string","title":"Question"},"status":{"type":"string","enum":["ready","missing"],"title":"Status"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"}},"type":"object","required":["field","label","question","status"],"title":"DiscoveryChecklistItemRead","description":"One category discovery question with its buyer-side answered state."},"DiscoveryLaneChecklistRead":{"properties":{"lane":{"type":"string","title":"Lane"},"category":{"type":"string","title":"Category"},"answered_count":{"type":"integer","title":"Answered Count"},"total_count":{"type":"integer","title":"Total Count"},"items":{"items":{"$ref":"#/components/schemas/DiscoveryChecklistItemRead"},"type":"array","title":"Items"}},"type":"object","required":["lane","category","answered_count","total_count","items"],"title":"DiscoveryLaneChecklistRead","description":"Guided discovery checklist for one buyer-visible advisory lane."},"EnvironmentArtifactRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"artifact_type":{"$ref":"#/components/schemas/ArtifactType"},"processing_status":{"type":"string","title":"Processing Status"},"background_refresh_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Refresh Status"},"background_processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Background Processed At"},"fact_count":{"type":"integer","title":"Fact Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"extracted_text_preview":{"type":"string","title":"Extracted Text Preview"}},"type":"object","required":["id","title","artifact_type","processing_status","created_at","extracted_text_preview"],"title":"EnvironmentArtifactRead","description":"Artifact metadata and text extraction summary for the portal rail."},"EnvironmentFactCategory":{"type":"string","enum":["company","connectivity","ucaas","ccaas","cpaas","security","cloud","colo","cx_ai","pro_services","sase","vendor","contract","pain_point","timeline","budget","other"],"title":"EnvironmentFactCategory","description":"Normalized buckets for customer IT environment memory."},"EnvironmentFactRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"category":{"$ref":"#/components/schemas/EnvironmentFactCategory"},"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"source_label":{"type":"string","title":"Source Label"},"confidence":{"type":"number","title":"Confidence"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","category","label","value","source_type","source_label","confidence","created_at","updated_at"],"title":"EnvironmentFactRead","description":"Buyer-visible environment fact with provenance."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MessageFeedbackRequest":{"properties":{"rating":{"type":"string","enum":["up","down"],"title":"Rating"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["rating"],"title":"MessageFeedbackRequest","description":"Buyer thumbs feedback on an assistant message."},"MessageFeedbackResponse":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id"},"rating":{"type":"string","title":"Rating"}},"type":"object","required":["message_id","rating"],"title":"MessageFeedbackResponse","description":"Acknowledged feedback write."},"PilotReadinessCheck":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"status":{"type":"string","enum":["ready","pending","blocked"],"title":"Status"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["id","label","status","detail"],"title":"PilotReadinessCheck","description":"One customer-portal pilot readiness checkpoint."},"PilotReadinessSummary":{"properties":{"overall_status":{"type":"string","enum":["not_started","learning","reviewing","operator_ready","buyer_ready"],"title":"Overall Status"},"next_action":{"type":"string","title":"Next Action"},"checks":{"items":{"$ref":"#/components/schemas/PilotReadinessCheck"},"type":"array","title":"Checks"}},"type":"object","required":["overall_status","next_action","checks"],"title":"PilotReadinessSummary","description":"Derived smoke-pass status for the customer advisor pilot flow."},"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"},"WorkspaceComment":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"target_kind":{"type":"string","enum":["artifact","deliverable","workspace"],"title":"Target Kind"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"body":{"type":"string","maxLength":4000,"minLength":1,"title":"Body"},"quote":{"type":"string","maxLength":2000,"title":"Quote","default":""},"author_id":{"type":"string","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"}},"type":"object","required":["id","target_kind","body","author_id","author_name","created_at"],"title":"WorkspaceComment","description":"A shared discussion entry, optionally anchored to document text."},"WorkspaceFolder":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title"},"color":{"type":"string","pattern":"^(gray|amber|green|purple|rose)$","title":"Color","default":"gray"}},"type":"object","required":["id","title"],"title":"WorkspaceFolder","description":"A shared conversation folder."},"WorkspaceInitiative":{"properties":{"objective":{"type":"string","maxLength":2000,"title":"Objective","default":""},"constraints":{"type":"string","maxLength":2000,"title":"Constraints","default":""},"timeline":{"type":"string","maxLength":500,"title":"Timeline","default":""},"preferences":{"type":"string","maxLength":2000,"title":"Preferences","default":""}},"type":"object","title":"WorkspaceInitiative","description":"Company-authored instructions for a specific buying initiative."},"WorkspaceMutation":{"properties":{"revision":{"type":"integer","minimum":0.0,"title":"Revision"},"operation":{"type":"string","enum":["initiative_save","folder_save","folder_delete","assign","note_save","note_delete","comment_add","comment_delete","comment_resolve"],"title":"Operation"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"title":{"type":"string","maxLength":160,"title":"Title","default":""},"body":{"type":"string","maxLength":20000,"title":"Body","default":""},"color":{"type":"string","enum":["gray","amber","green","purple","rose"],"title":"Color","default":"gray"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"target_kind":{"type":"string","enum":["artifact","deliverable","workspace"],"title":"Target Kind","default":"workspace"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"quote":{"type":"string","maxLength":2000,"title":"Quote","default":""},"resolved":{"type":"boolean","title":"Resolved","default":true},"initiative":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceInitiative"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["revision","operation"],"title":"WorkspaceMutation","description":"One optimistic-concurrency operation; callers cannot replace other users' state."},"WorkspaceNote":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","maxLength":160,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":20000,"title":"Body","default":""},"author_id":{"type":"string","title":"Author Id"},"author_name":{"type":"string","title":"Author Name"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","author_id","author_name","updated_at"],"title":"WorkspaceNote","description":"A customer-authored workspace note."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Agent-API-Key"}}}}