{"openapi":"3.0.0","paths":{"/health":{"get":{"operationId":"healthCheck","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Health check endpoint","tags":["System"]}},"/v1/user/roles-assignable":{"get":{"operationId":"getAssignableRoles","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleDto"}}}}}},"security":[{"token":[]}],"summary":"Get a list of roles assignable to other members for a specific organization","tags":["User"]}},"/v1/user/me/permissions/{organizationId}":{"get":{"operationId":"getUserPermissions","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RolePermissionDto"}}}}}},"security":[{"token":[]}],"summary":"Get a list of permissions for current user","tags":["User"]}},"/v1/user/{userId}/set-user-role":{"post":{"operationId":"setUserRole","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserRoleDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Set user role for a specific organization","tags":["User"]}},"/v1/user/{userId}/set-name":{"post":{"operationId":"setUserName","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserNameDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPublicDto"}}}}},"security":[{"token":[]}],"summary":"Set the name of a member of an organization the caller owns","tags":["User"]}},"/v1/user/{userId}/set-admin":{"post":{"operationId":"setUserAdmin","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserAdminDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Set user admin status (only admins can do this)","tags":["User"]}},"/v1/user/{userId}":{"delete":{"operationId":"deleteUser","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete a user (admin only)","tags":["User"]}},"/v1/user/me":{"get":{"operationId":"getCurrentUser","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailsDto"}}}}},"security":[{"token":[]}],"summary":"Get current user details","tags":["CurrentUser"]},"patch":{"operationId":"updateCurrentUser","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailsDto"}}}}},"security":[{"token":[]}],"summary":"Update current user","tags":["CurrentUser"]}},"/v1/user/me/password":{"post":{"operationId":"updateCurrentUserPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordDto"}}}},"responses":{"400":{"description":"The password change was refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeErrorDto"}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Update current user password","tags":["CurrentUser"]}},"/v1/api-keys":{"get":{"operationId":"listApiKeys","parameters":[{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponseDto"}}}}}},"security":[{"token":[]}],"summary":"List API keys for the current user organizations","tags":["ApiKey"]},"post":{"operationId":"createApiKey","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKeyResponseDto"}}}}},"security":[{"token":[]}],"summary":"Create a new API key. The key itself is returned only here and is not recoverable afterwards.","tags":["ApiKey"]}},"/v1/api-keys/{id}":{"delete":{"operationId":"deleteApiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete an API key","tags":["ApiKey"]}},"/v1/organization":{"get":{"operationId":"listOrganizations","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/OrganizationSortBy"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationListDto"}}}}},"security":[{"token":[]}],"summary":"Get a list of organizations","tags":["Organization"]},"post":{"operationId":"createOrganization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailDto"}}}}},"security":[{"token":[]}],"summary":"Create a new organization","tags":["Organization"]}},"/v1/organization/credit-packs":{"get":{"operationId":"getCreditPacks","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditPackDto"}}}}}},"summary":"Get available credit packs for purchase","tags":["Organization"]}},"/v1/organization/{id}":{"get":{"operationId":"getOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailDto"}}}}},"security":[{"token":[]}],"summary":"Get organization details","tags":["Organization"]},"patch":{"operationId":"updateOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetailDto"}}}}},"security":[{"token":[]}],"summary":"Update organization details","tags":["Organization"]}},"/v1/organization/{id}/claim-invite-domains":{"post":{"operationId":"claimInviteDomains","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimInviteDomainsResponseDto"}}}}},"security":[{"token":[]}],"summary":"Claim the organization's invite domains at the identity provider","tags":["Organization"]}},"/v1/organization/{organizationId}/add-credits":{"post":{"operationId":"addOrganizationCredits","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrganizationCreditsDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Add credits to an organization","tags":["Organization"]}},"/v1/organization/{organizationId}/buy-credits":{"post":{"operationId":"buyCredits","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyCreditsDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Buy credits for an organization","tags":["Organization"]}},"/v1/organization/{organizationId}/can-buy-credits":{"get":{"operationId":"canBuyCredits","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanBuyCreditsResponseDto"}}}}},"security":[{"token":[]}],"summary":"Check if user can buy credits for an organization","tags":["Organization"]}},"/v1/organization/{organizationId}/chargebee/portal-session":{"get":{"operationId":"createPortalSession","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionDto"}}}}},"security":[{"token":[]}],"summary":"Create a Chargebee portal session for managing billing","tags":["Organization"]}},"/v1/organization/{organizationId}/chargebee/subscription-id":{"get":{"operationId":"getChargebeeSubscriptionId","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionIdDto"}}}}},"security":[{"token":[]}],"summary":"Get the Chargebee subscription ID for an organization","tags":["Organization"]}},"/v1/invitees":{"get":{"operationId":"listInvitees","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"ids","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteeListDto"}}}}},"security":[{"token":[]}],"summary":"List invitees for the current user organizations","tags":["Invitee"]},"post":{"operationId":"createInvitee","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteeResponseDto"}}}}},"security":[{"token":[]}],"summary":"Create a new invitee","tags":["Invitee"]}},"/v1/invitees/{id}":{"delete":{"operationId":"deleteInvitee","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete an invitee","tags":["Invitee"]},"get":{"operationId":"getInviteDetails","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteDetailsResponseDto"}}}}},"summary":"Get invite details","tags":["Invitee"]}},"/v1/invitees/{id}/accept-existing":{"post":{"operationId":"acceptInviteAsExistingUser","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Accept an invite as an existing user","tags":["Invitee"]}},"/v1/oauth/providers":{"get":{"operationId":"getOAuthProviders","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProviderResponseDto"}}}}}},"security":[{"token":[]}],"summary":"Get available OAuth providers","tags":["OAuthToken"]}},"/v1/oauth/connections":{"get":{"operationId":"listOAuthConnections","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OAuthConnectionResponseDto"}}}}}},"security":[{"token":[]}],"summary":"List OAuth connections for the current user organizations","tags":["OAuthToken"]}},"/v1/oauth/connect":{"post":{"operationId":"connectOAuthIntegration","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIntegrationDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Connect an OAuth integration","tags":["OAuthToken"]}},"/v1/oauth/connections/{id}":{"delete":{"operationId":"deleteOAuthConnection","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete an OAuth connection","tags":["OAuthToken"]}},"/v1/membership/{id}":{"delete":{"operationId":"removeMembership","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Remove a member from an organization","tags":["OrganizationMembership"]}},"/v1/auth/signup":{"post":{"operationId":"signUp","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponseDto"}}}}},"summary":"Sign up a new user and organization","tags":["Auth"]}},"/v1/auth/logout":{"post":{"operationId":"logout","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Log out the current user","tags":["Auth"]}},"/v1/auth/refresh":{"post":{"operationId":"refreshToken","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Renew the session from the refresh cookie","tags":["Auth"]}},"/v1/chargebee/webhooks":{"post":{"operationId":"handleChargebeeWebhook","parameters":[{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargebeeWebhookEventDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Handle Chargebee webhooks","tags":["ChargebeeWebhook"]}},"/chargebee/webhooks":{"post":{"operationId":"handleChargebeeWebhook","parameters":[{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargebeeWebhookEventDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Handle Chargebee webhooks","tags":["ChargebeeWebhook"]}},"/v1/chargebee/payment-intent":{"post":{"operationId":"createPaymentIntent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentIntentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentDto"}}}}},"summary":"Create a Chargebee payment intent for subscription signup","tags":["Chargebee"]}},"/v1/plan/tier":{"get":{"operationId":"getPlanTiers","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanTierDto"}}}}}},"summary":"Get all available subscription tiers with plan options","tags":["Plans"]}},"/v1/agent-session/platform":{"post":{"operationId":"createPlatformAgentSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlatformAgentSessionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionItemDto"}}}}},"security":[{"token":[]}],"summary":"Create an organization-scoped Platform Agent session","tags":["AgentSession"]}},"/v1/agent-session/scope/approve":{"post":{"operationId":"approveScope","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveScopeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Grant or decline a session a requested scope (project access, web search, ...)","tags":["AgentSession"]}},"/v1/agent-session":{"get":{"operationId":"listAgentSessions","parameters":[{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"parentSessionIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"rootSessionIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"agentNames","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentName"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentSessionStatus"}}},{"name":"rootOnly","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionListDto"}}}}},"security":[{"token":[]}],"summary":"List recent agent sessions","tags":["AgentSession"]}},"/v1/agent-session/{id}":{"get":{"operationId":"getAgentSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionItemDto"}}}}},"security":[{"token":[]}],"summary":"Get a single agent session by ID","tags":["AgentSession"]},"patch":{"operationId":"updateAgentSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentSessionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionItemDto"}}}}},"security":[{"token":[]}],"summary":"Update an agent session (e.g. rename)","tags":["AgentSession"]},"delete":{"operationId":"removeAgentSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete an agent session","tags":["AgentSession"]}},"/v1/agent-session/{id}/stop":{"post":{"operationId":"stopAgentSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Stop a running agent session","tags":["AgentSession"]}},"/v1/agent-session/{id}/scope":{"post":{"operationId":"grantScope","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantScopeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionItemDto"}}}}},"security":[{"token":[]}],"summary":"Connect a session to a project (or capability) the user chose, without a request from the agent","tags":["AgentSession"]}},"/v1/conversation-message":{"post":{"operationId":"sendConversationMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendConversationMessageDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageItemDto"}}}}},"security":[{"token":[]}],"summary":"Send a chat message to an agent session","tags":["ConversationMessage"]},"get":{"operationId":"listConversationMessages","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"agentSessionId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"debug","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageListDto"}}}}},"security":[{"token":[]}],"summary":"List conversation messages","tags":["ConversationMessage"]}},"/v1/conversation-message/{id}":{"get":{"operationId":"getConversationMessage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageItemDto"}}}}},"security":[{"token":[]}],"summary":"Get conversation message by id","tags":["ConversationMessage"]},"patch":{"operationId":"updateConversationMessage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationMessageDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageItemDto"}}}}},"security":[{"token":[]}],"summary":"Update a conversation message","tags":["ConversationMessage"]},"delete":{"operationId":"deleteConversationMessage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a conversation message","tags":["ConversationMessage"]}},"/v1/document":{"get":{"operationId":"getDocuments","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/DocumentStatus"}},{"name":"archived","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"projectIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"documentTypeIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"clientIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"userIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListDto"}}}}},"security":[{"token":[]}],"summary":"Get a list of documents","tags":["Document"]},"post":{"operationId":"createDocument","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailDto"}}}}},"security":[{"token":[]}],"summary":"Create a new document","tags":["Document"]}},"/v1/document/{documentId}":{"get":{"operationId":"getDocumentById","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailDto"}}}}},"security":[{"token":[]}],"summary":"Get a specific document by ID","tags":["Document"]},"patch":{"operationId":"updateDocumentById","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailDto"}}}}},"security":[{"token":[]}],"summary":"Update an existing document by ID","tags":["Document"]},"delete":{"operationId":"deleteDocumentById","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a document by ID","tags":["Document"]}},"/v1/document/{documentId}/opened":{"post":{"operationId":"logDocumentOpened","parameters":[{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Log that the user opened a document","tags":["Document"]}},"/v1/document-type-version":{"get":{"operationId":"getDocumentTypeVersions","parameters":[{"name":"documentTypeId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeVersionListDto"}}}}},"security":[{"token":[]}],"summary":"List versions for a document type","tags":["DocumentTypeVersion"]}},"/v1/document-type-version/{id}":{"get":{"operationId":"getDocumentTypeVersionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeVersionDto"}}}}},"security":[{"token":[]}],"summary":"Get a single document type version","tags":["DocumentTypeVersion"]},"patch":{"operationId":"forkDocumentTypeVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkDocumentTypeVersionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeVersionDto"}}}}},"security":[{"token":[]}],"summary":"Fork a new version from the version with this id","tags":["DocumentTypeVersion"]},"delete":{"operationId":"deleteDocumentTypeVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a non-final version","tags":["DocumentTypeVersion"]}},"/v1/document-type-version/{id}/validate":{"post":{"description":"Validates an already persisted document type version with the same quality checks as validate-payload. Use this after an agent creates or forks a draft version so the review packet contains server-state validation. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateDocumentTypeVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a persisted document type version","tags":["DocumentTypeVersion"]}},"/v1/document-type-version/{id}/publish":{"post":{"operationId":"publishDocumentTypeVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeVersionDto"}}}}},"security":[{"token":[]}],"summary":"Publish a draft version","tags":["DocumentTypeVersion"]}},"/v1/document-type":{"get":{"operationId":"getDocumentTypes","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"knowledgeBaseId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"includeDrafts","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"includeShared","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeListDto"}}}}},"security":[{"token":[]}],"summary":"List document types","tags":["DocumentType"]},"post":{"operationId":"createDocumentType","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentTypeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeDto"}}}}},"security":[{"token":[]}],"summary":"Create a new document type (and v1)","tags":["DocumentType"]}},"/v1/document-type/{id}":{"get":{"operationId":"getDocumentTypeById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeDto"}}}}},"security":[{"token":[]}],"summary":"Get a document type by id","tags":["DocumentType"]},"patch":{"operationId":"updateDocumentType","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentTypeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeDto"}}}}},"security":[{"token":[]}],"summary":"Update document type identity","tags":["DocumentType"]},"delete":{"operationId":"deleteDocumentType","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a document type","tags":["DocumentType"]}},"/v1/document-type/validate-payload":{"post":{"description":"Preflight validation for a document type create or fork payload. This does not write data. Agents should call it before create/fork and store the full response in the review packet. Use operation=create to validate name and organizationId, or operation=fork to validate versionDescription. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateDocumentTypePayload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeValidationPayloadDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a document type create or fork payload without writing it","tags":["DocumentType"]}},"/v1/document-type/template-data":{"post":{"description":"Builds the placeholder data object used for DOCX template checks and test renders. Pass either versionId for a persisted document type version, or a payload with config. Use this to inspect expected template tags such as templateKey, templateKey_table, and templateKey_table_description.","operationId":"getDocumentTypeTemplateData","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTemplateDataRequestDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTemplateDataResponseDto"}}}}},"security":[{"token":[]}],"summary":"Build DOCX template data for a document type payload or version","tags":["DocumentType"]}},"/v1/document-type/template-check":{"post":{"description":"Checks an uploaded DOCX template file against a document type payload or persisted version. Requires templateFileId plus either versionId or config. Missing required tags are returned in errors; extra or suspicious tags are returned in warnings. Agents should block on errors and include warnings in review.","operationId":"checkDocumentTypeTemplate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTemplateCheckRequestDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTemplateCheckResponseDto"}}}}},"security":[{"token":[]}],"summary":"Check a DOCX template against a document type payload or version","tags":["DocumentType"]}},"/v1/document-type/test-render":{"post":{"description":"Runs the same DOCX render path as export, using placeholder data generated from the document type config. Requires templateFileId plus either versionId or config. Render engine failures return ok=false with errors. Set createPreviewFile=true to store the rendered preview and return previewFileId.","operationId":"testRenderDocumentTypeTemplate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTestRenderRequestDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeTestRenderResponseDto"}}}}},"security":[{"token":[]}],"summary":"Render a DOCX template with document type placeholder data","tags":["DocumentType"]}},"/v1/document-section/{id}":{"get":{"operationId":"getDocumentSectionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSectionDetailDto"}}}}},"security":[{"token":[]}],"summary":"Get a specific documentSection by ID","tags":["DocumentSection"]},"put":{"operationId":"updateDocumentSection","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentSectionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSectionDetailDto"}}}}},"security":[{"token":[]}],"summary":"Update an existing documentSection by ID","tags":["DocumentSection"]}},"/v1/document-section/batch":{"post":{"operationId":"batchGetDocumentSections","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetDocumentSectionsDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionDetailDto"}}}}}},"security":[{"token":[]}],"summary":"Get multiple documentSections by IDs","tags":["DocumentSection"]}},"/v1/section-version":{"get":{"operationId":"listSectionVersions","parameters":[{"name":"documentSectionId","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionVersionListDto"}}}}},"security":[{"token":[]}],"summary":"List section versions","tags":["SectionVersion"]}},"/v1/section-version/writing-activity":{"get":{"operationId":"getSectionWritingActivity","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"timeZone","required":true,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionWritingActivityDto"}}}}},"security":[{"token":[]}],"summary":"Sections the current user and Twin wrote per day, for the user's own week overview","tags":["SectionVersion"]}},"/v1/section-version/{id}":{"patch":{"operationId":"patchSectionVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSectionVersionDto"}}}},"responses":{"422":{"description":"A footnote cites an unknown source or lacks text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FootnoteValidationErrorDto"}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionVersionDto"}}}}},"security":[{"token":[]}],"summary":"Update a section version in-place or create a new version","tags":["SectionVersion"]}},"/v1/document-export":{"get":{"operationId":"listDocumentExport","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"documentId","required":true,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExportListDto"}}}}},"security":[{"token":[]}],"summary":"List exports for a document","tags":["DocumentExport"]},"post":{"operationId":"createDocumentExport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentExportDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExportItemDto"}}}}},"security":[{"token":[]}],"summary":"Create export document","tags":["DocumentExport"]}},"/v1/document-export/{id}":{"get":{"operationId":"getDocumentExport","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExportItemDto"}}}}},"security":[{"token":[]}],"summary":"Get export by id","tags":["DocumentExport"]}},"/v1/document-export/prepare":{"post":{"operationId":"prepareDocumentExport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentExportDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentExportItemDto"}}}}},"security":[{"token":[]}],"summary":"Reuse the newest export of the current content, or start one","tags":["DocumentExport"]}},"/v1/client":{"get":{"operationId":"getClients","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientListDto"}}}}},"security":[{"token":[]}],"summary":"Get a list of clients","tags":["Client"]},"post":{"operationId":"createClient","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientDto"}}}}},"security":[{"token":[]}],"summary":"Create a new client","tags":["Client"]}},"/v1/client/{id}":{"get":{"operationId":"getClient","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientDto"}}}}},"security":[{"token":[]}],"summary":"Get client details","tags":["Client"]},"patch":{"operationId":"updateClient","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClientDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientDto"}}}}},"security":[{"token":[]}],"summary":"Update a client","tags":["Client"]},"delete":{"operationId":"deleteClient","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a client","tags":["Client"]}},"/v1/project":{"get":{"operationId":"getProjects","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"clientIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"userIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"grantIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"archived","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"sortBy","required":false,"in":"query","schema":{"$ref":"#/components/schemas/ProjectSortBy"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListDto"}}}}},"security":[{"token":[]}],"summary":"Get a list of projects","tags":["Project"]},"post":{"operationId":"createProject","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDto"}}}}},"security":[{"token":[]}],"summary":"Create a new project","tags":["Project"]}},"/v1/project/client-titles":{"get":{"operationId":"getProjectClientTitles","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectClientTitlesDto"}}}}},"security":[{"token":[]}],"summary":"The roles the organization's clients have on its projects, most used first","tags":["Project"]}},"/v1/project/{id}":{"get":{"operationId":"getProject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDto"}}}}},"security":[{"token":[]}],"summary":"Get project details","tags":["Project"]},"patch":{"operationId":"updateProject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDto"}}}}},"security":[{"token":[]}],"summary":"Update a project","tags":["Project"]},"delete":{"operationId":"deleteProject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a project","tags":["Project"]}},"/v1/project/{id}/client/{clientId}":{"patch":{"operationId":"updateProjectClient","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"clientId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectClientDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDto"}}}}},"security":[{"token":[]}],"summary":"Update the title and description on a project's link to one of its clients","tags":["Project"]}},"/v1/project/{id}/status":{"post":{"operationId":"changeProjectStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectStatusDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDto"}}}}},"security":[{"token":[]}],"summary":"Change the project status, recording the transition in the status history","tags":["Project"]}},"/v1/project/{id}/status-history":{"get":{"operationId":"getProjectStatusHistory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStatusHistoryDto"}}}}},"security":[{"token":[]}],"summary":"Get the project status history, newest first","tags":["Project"]}},"/v1/project-export/{id}":{"get":{"operationId":"getProjectExport","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectExportItemDto"}}}}},"security":[{"token":[]}],"summary":"Get project export by id","tags":["ProjectExport"]}},"/v1/project-export":{"post":{"operationId":"createProjectExport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectExportDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectExportItemDto"}}}}},"security":[{"token":[]}],"summary":"Zip the selected document exports and project files","tags":["ProjectExport"]}},"/v1/project-file":{"get":{"operationId":"listProjectFiles","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"origin","required":false,"in":"query","schema":{"$ref":"#/components/schemas/FileOrigin"}},{"name":"projectFileTypes","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectFileType"}}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileListDto"}}}}},"security":[{"token":[]}],"summary":"List project files","tags":["ProjectFile"]},"post":{"operationId":"createProjectFile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectFileDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Attach a file to a project","tags":["ProjectFile"]}},"/v1/project-file/url/preview":{"post":{"operationId":"previewUrlSource","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewUrlSourceDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlSourcePreviewDto"}}}}},"security":[{"token":[]}],"summary":"Fetch a URL to show what adding it as a source would give, without adding it","tags":["ProjectFile"]}},"/v1/project-file/url":{"post":{"operationId":"createUrlSource","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUrlSourceDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedUrlSourceDto"}}}}},"security":[{"token":[]}],"summary":"Add a web page to a project as a source; returns the existing source for a known URL","tags":["ProjectFile"]}},"/v1/project-file/{id}/rescrape":{"post":{"operationId":"rescrapeUrlSource","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlSourceResultDto"}}}}},"security":[{"token":[]}],"summary":"Fetch an unread web page source again; a page readable now becomes its next version","tags":["ProjectFile"]}},"/v1/project-file/{id}/versions":{"get":{"operationId":"listProjectFileVersions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileVersionListDto"}}}}},"security":[{"token":[]}],"summary":"List a file's version history","tags":["ProjectFile"]},"post":{"operationId":"replaceProjectFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceProjectFileDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Replace an uploaded file with a new upload, as its next version","tags":["ProjectFile"]}},"/v1/project-file/{id}/versions/{versionId}":{"get":{"operationId":"getProjectFileVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"versionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileVersionContentDto"}}}}},"security":[{"token":[]}],"summary":"Read one version's body","tags":["ProjectFile"]}},"/v1/project-file/{id}/versions/{versionId}/restore":{"post":{"operationId":"restoreProjectFileVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"versionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreProjectFileVersionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Bring an earlier version's body back as the current one","tags":["ProjectFile"]}},"/v1/project-file/{id}":{"get":{"operationId":"getProjectFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Get a project file","tags":["ProjectFile"]},"patch":{"operationId":"updateProjectFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectFileDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Update a project file's title, description or body","tags":["ProjectFile"]},"delete":{"operationId":"deleteProjectFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Remove a project file","tags":["ProjectFile"]}},"/v1/project-file/text":{"post":{"operationId":"createTextSource","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTextSourceDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectFileItemDto"}}}}},"security":[{"token":[]}],"summary":"Create a free-text file (note or storyline) on a project","tags":["ProjectFile"]}},"/v1/project-file/{id}/export":{"post":{"operationId":"exportTextSource","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}}},"security":[{"token":[]}],"summary":"Export a text source as a Word document","tags":["ProjectFile"]}},"/v1/project-task":{"get":{"operationId":"getProjectTasks","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"projectId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"completed","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/ProjectTaskStatus"}},{"name":"mine","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTaskListDto"}}}}},"security":[{"token":[]}],"summary":"Get a list of project tasks","tags":["ProjectTask"]},"post":{"operationId":"createProjectTask","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectTaskDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTaskDto"}}}}},"security":[{"token":[]}],"summary":"Create a new project task","tags":["ProjectTask"]}},"/v1/project-task/{id}":{"get":{"operationId":"getProjectTask","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTaskDto"}}}}},"security":[{"token":[]}],"summary":"Get project task details","tags":["ProjectTask"]},"patch":{"operationId":"updateProjectTask","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectTaskDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTaskDto"}}}}},"security":[{"token":[]}],"summary":"Update a project task","tags":["ProjectTask"]},"delete":{"operationId":"deleteProjectTask","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a project task","tags":["ProjectTask"]}},"/v1/figure/{figureId}":{"get":{"operationId":"getFigure","parameters":[{"name":"figureId","required":true,"in":"path","schema":{"type":"string"}},{"name":"version","required":false,"in":"query","schema":{"nullable":false,"type":"number"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FigureDetailDto"}}}}},"security":[{"token":[]}],"summary":"Get the latest version of a figure, or the version asked for","tags":["Figure"]}},"/v1/figure":{"post":{"operationId":"createFigure","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFigureDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FigureDetailDto"}}}}},"security":[{"token":[]}],"summary":"Create a figure, waiting for an agent to generate it","tags":["Figure"]}},"/v1/figure/{figureId}/versions":{"post":{"operationId":"createFigureVersion","parameters":[{"name":"figureId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFigureVersionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FigureDetailDto"}}}}},"security":[{"token":[]}],"summary":"Create a new version of a figure, waiting for an agent to generate it","tags":["Figure"]}},"/v1/admin/files/reprocess":{"post":{"operationId":"reprocessFiles","parameters":[{"name":"after","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"before","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/FileStatus"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReprocessFilesResponseDto"}}}}},"security":[{"token":[]}],"summary":"Re-enqueue files for ingest within a time window","tags":["AdminFile"]}},"/v1/upload/{id}":{"get":{"operationId":"getUploadPage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Get upload page for a specific file ID","tags":["File"]},"post":{"operationId":"uploadFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Upload a file for a specific file ID","tags":["File"]}},"/v1/files/create-file-model":{"post":{"operationId":"createFileModel","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}}},"security":[{"token":[]}],"summary":"Create a new file model (without uploading a file)","tags":["File"]}},"/v1/files/{id}":{"get":{"operationId":"getFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}}},"security":[{"token":[]}],"summary":"Get file metadata by ID","tags":["File"]},"patch":{"operationId":"updateFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFileDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}}},"security":[{"token":[]}],"summary":"Update file metadata by ID","tags":["File"]},"delete":{"operationId":"deleteFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete a file by ID","tags":["File"]}},"/v1/files/{id}/preview":{"post":{"operationId":"createFilePreview","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}}},"security":[{"token":[]}],"summary":"Render the file as PDF for the export preview, once, and return it with its page count","tags":["File"]}},"/v1/files/{id}/raw-excerpt":{"get":{"operationId":"getFileRawExcerpt","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRawExcerptDto"}}}}},"security":[{"token":[]}],"summary":"Get a raw-text excerpt (first + last chunk) of a file","tags":["File"]}},"/v1/files/{id}/text":{"get":{"operationId":"getFileText","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"charStart","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"charEnd","required":false,"in":"query","schema":{"nullable":false,"type":"number"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileTextDto"}}}}},"security":[{"token":[]}],"summary":"Get a page of a file's extracted text, with the text's total length","tags":["File"]}},"/v1/grants/providers":{"get":{"operationId":"getGrantProviders","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProviderListDto"}}}}},"security":[{"token":[]}],"summary":"List all grant providers","tags":["GrantProvider"]},"post":{"operationId":"createGrantProvider","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantProviderDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProviderDto"}}}}},"security":[{"token":[]}],"summary":"Create a new grant provider","tags":["GrantProvider"]}},"/v1/grants/providers/{id}":{"get":{"operationId":"getGrantProviderById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProviderDto"}}}}},"security":[{"token":[]}],"summary":"Get a provider by id","tags":["GrantProvider"]},"put":{"operationId":"updateGrantProvider","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGrantProviderDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProviderDto"}}}}},"security":[{"token":[]}],"summary":"Update a grant provider","tags":["GrantProvider"]},"delete":{"operationId":"deleteGrantProvider","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a grant provider","tags":["GrantProvider"]}},"/v1/grants/themes":{"get":{"operationId":"getThemes","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeListDto"}}}}},"security":[{"token":[]}],"summary":"List all themes","tags":["Theme"]},"post":{"operationId":"createTheme","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThemeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeDto"}}}}},"security":[{"token":[]}],"summary":"Create a new theme","tags":["Theme"]}},"/v1/grants/themes/{id}":{"get":{"operationId":"getThemeById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeDto"}}}}},"security":[{"token":[]}],"summary":"Get a theme by id","tags":["Theme"]},"put":{"operationId":"updateTheme","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThemeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeDto"}}}}},"security":[{"token":[]}],"summary":"Update a theme","tags":["Theme"]},"delete":{"operationId":"deleteTheme","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Delete a theme","tags":["Theme"]}},"/v1/grant-version":{"get":{"operationId":"getGrantVersions","parameters":[{"name":"grantId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantVersionListDto"}}}}},"security":[{"token":[]}],"summary":"List versions for a grant","tags":["GrantVersion"]}},"/v1/grant-version/{id}":{"get":{"operationId":"getGrantVersionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantVersionDto"}}}}},"security":[{"token":[]}],"summary":"Get a single grant version","tags":["GrantVersion"]},"patch":{"operationId":"forkGrantVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkGrantVersionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantVersionDto"}}}}},"security":[{"token":[]}],"summary":"Fork a new version from the version with this id","tags":["GrantVersion"]},"delete":{"operationId":"deleteGrantVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a non-final version","tags":["GrantVersion"]}},"/v1/grant-version/{id}/validate":{"post":{"description":"Validates an already persisted grant version with the same quality checks as validate-payload. Use this after an agent creates or forks a draft version so the review packet contains server-state validation. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateGrantVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a persisted grant version","tags":["GrantVersion"]}},"/v1/grant-version/{id}/publish":{"post":{"operationId":"publishGrantVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantVersionDto"}}}}},"security":[{"token":[]}],"summary":"Publish a draft version","tags":["GrantVersion"]}},"/v1/grants":{"get":{"operationId":"getGrants","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"providerId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"parentGrantId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"knowledgeBaseId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"includeDrafts","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"includeArchived","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"themeIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"regions","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"targetGroups","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/TargetGroup"}}},{"name":"incentiveTypes","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/IncentiveType"}}},{"name":"projectPhases","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectPhase"}}},{"name":"statuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantStatus"}}},{"name":"effectiveStatuses","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantStatus"}}},{"name":"deadlineWithinDays","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"minAwardCents","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"facets","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"histogram","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"sections","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantListDto"}}}}},"security":[{"token":[]}],"summary":"List grants","tags":["Grant"]},"post":{"operationId":"createGrant","parameters":[{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantDto"}}}}},"security":[{"token":[]}],"summary":"Create a new grant (and v1)","tags":["Grant"]}},"/v1/grants/enums":{"get":{"operationId":"getGrantEnums","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantEnumsDto"}}}}},"security":[{"token":[]}],"summary":"Get grant enum values","tags":["Grant"]}},"/v1/grants/usage":{"get":{"operationId":"getGrantUsage","parameters":[{"name":"organizationId","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"grantIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantUsageListDto"}}}}},"security":[{"token":[]}],"summary":"Count the organisation's document types and projects per grant","tags":["Grant"]}},"/v1/grants/by-slug/{slug}":{"get":{"operationId":"getGrantBySlug","parameters":[{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGrantDto"}}}}},"summary":"Get the published grant for a slug","tags":["Grant"]}},"/v1/grants/{id}/archive-events":{"get":{"operationId":"getGrantArchiveEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueArchiveEventListDto"}}}}},"security":[{"token":[]}],"summary":"List archive events of a grant","tags":["Grant"]}},"/v1/grants/{id}":{"get":{"operationId":"getGrantById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantDto"}}}}},"security":[{"token":[]}],"summary":"Get a grant by id","tags":["Grant"]},"patch":{"operationId":"updateGrant","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGrantDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantDto"}}}}},"security":[{"token":[]}],"summary":"Update grant identity fields","tags":["Grant"]},"delete":{"operationId":"deleteGrant","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a grant and all its versions","tags":["Grant"]}},"/v1/grants/validate-payload":{"post":{"description":"Preflight validation for a grant create or fork payload. This does not write data. Agents should call it before create/fork and store the full response in the review packet. Use operation=create to validate create-only fields such as name, provider and knowledgeBaseVersionId, or operation=fork to validate versionDescription. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateGrantPayload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantValidationPayloadDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a grant create or fork payload without writing it","tags":["Grant"]}},"/v1/grants/{id}/archive":{"post":{"operationId":"archiveGrant","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveCatalogueItemDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantDto"}}}}},"security":[{"token":[]}],"summary":"Archive a grant","tags":["Grant"]}},"/v1/grants/{id}/unarchive":{"post":{"operationId":"unarchiveGrant","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnarchiveCatalogueItemDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantDto"}}}}},"security":[{"token":[]}],"summary":"Unarchive a grant","tags":["Grant"]}},"/v1/grants/{id}/relations":{"post":{"operationId":"addGrantRelation","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGrantRelationDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantToRelationDto"}}}}},"security":[{"token":[]}],"summary":"Add a grant relation","tags":["Grant"]}},"/v1/grants/{id}/relations/{relationId}":{"delete":{"operationId":"removeGrantRelation","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"relationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Remove a grant relation","tags":["Grant"]}},"/v1/knowledge-base-version":{"get":{"operationId":"getKnowledgeBaseVersions","parameters":[{"name":"knowledgeBaseId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseVersionListDto"}}}}},"security":[{"token":[]}],"summary":"List versions for a knowledge base","tags":["KnowledgeBaseVersion"]}},"/v1/knowledge-base-version/{id}":{"get":{"operationId":"getKnowledgeBaseVersionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}}}}},"security":[{"token":[]}],"summary":"Get a single knowledge base version","tags":["KnowledgeBaseVersion"]},"patch":{"operationId":"forkKnowledgeBaseVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkKnowledgeBaseVersionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}}}}},"security":[{"token":[]}],"summary":"Fork a new version from the version with this id","tags":["KnowledgeBaseVersion"]},"delete":{"operationId":"deleteKnowledgeBaseVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a non-final version","tags":["KnowledgeBaseVersion"]}},"/v1/knowledge-base-version/{id}/validate":{"post":{"description":"Validates an already persisted knowledge base version with the same quality checks as validate-payload. Use this after an agent creates or forks a draft version so the review packet contains server-state validation. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateKnowledgeBaseVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a persisted knowledge base version","tags":["KnowledgeBaseVersion"]}},"/v1/knowledge-base-version/{id}/publish":{"post":{"operationId":"publishKnowledgeBaseVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}}}}},"security":[{"token":[]}],"summary":"Publish a draft version","tags":["KnowledgeBaseVersion"]}},"/v1/knowledge-bases":{"get":{"operationId":"getKnowledgeBases","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"includeDrafts","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}},{"name":"includeArchived","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseListDto"}}}}},"security":[{"token":[]}],"summary":"List knowledge bases","tags":["KnowledgeBase"]},"post":{"operationId":"createKnowledgeBase","parameters":[{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeBaseDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDto"}}}}},"security":[{"token":[]}],"summary":"Create a new knowledge base (and v1)","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/search":{"get":{"operationId":"searchKnowledgeBases","parameters":[{"name":"search","required":true,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"knowledgeBaseIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseSearchResultsDto"}}}}},"security":[{"token":[]}],"summary":"Search published knowledge base content (cross-KB)","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/{id}/archive-events":{"get":{"operationId":"getKnowledgeBaseArchiveEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueArchiveEventListDto"}}}}},"security":[{"token":[]}],"summary":"List archive events of a knowledge base","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/{id}":{"get":{"operationId":"getKnowledgeBaseById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDto"}}}}},"security":[{"token":[]}],"summary":"Get a knowledge base by id","tags":["KnowledgeBase"]},"patch":{"operationId":"updateKnowledgeBase","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeBaseDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDto"}}}}},"security":[{"token":[]}],"summary":"Update knowledge base identity","tags":["KnowledgeBase"]},"delete":{"operationId":"deleteKnowledgeBase","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a knowledge base","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/validate-payload":{"post":{"description":"Preflight validation for a knowledge base create or fork payload. This does not write data. Agents should call it before create/fork and store the full response in the review packet. The response returns ok=false when any check has status fail; warn and needs-ai-review still require review.","operationId":"validateKnowledgeBasePayload","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseValidationPayloadDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseValidationResultDto"}}}}},"security":[{"token":[]}],"summary":"Validate a knowledge base create or fork payload without writing it","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/{id}/archive":{"post":{"operationId":"archiveKnowledgeBase","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveCatalogueItemDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDto"}}}}},"security":[{"token":[]}],"summary":"Archive a knowledge base","tags":["KnowledgeBase"]}},"/v1/knowledge-bases/{id}/unarchive":{"post":{"operationId":"unarchiveKnowledgeBase","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-approver","in":"header","description":"Unpadded base64url JSON naming the approver in OpenSteward: version=1, user_id, display_name, proposal_id, revision. Accepted from admin API keys only; it is recorded on the version and does not change permissions.","required":false,"schema":{"type":"string","maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnarchiveCatalogueItemDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDto"}}}}},"security":[{"token":[]}],"summary":"Unarchive a knowledge base","tags":["KnowledgeBase"]}},"/v1/memory":{"get":{"operationId":"getMemories","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"documentTypeId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"sectionKey","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"memberId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"clientId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"level","required":false,"in":"query","schema":{"$ref":"#/components/schemas/MemoryLevel"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListDto"}}}}},"security":[{"token":[]}],"summary":"List memories","tags":["Memory"]},"put":{"description":"Writes the given text as the memory content for a scope, verbatim, creating the memory if that scope has none yet. Recorded as a memory change so it appears in history and can be undone. Whitespace-only content clears the memory, and the response is then null. Agents write memory through their own tools instead; this endpoint is for a user editing the text directly.","operationId":"updateMemory","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemoryDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemoryResultDto"}}}}},"security":[{"token":[]}],"summary":"Write a memory’s content directly","tags":["Memory"]}},"/v1/memory/{id}":{"get":{"operationId":"getMemoryById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItemDto"}}}}},"security":[{"token":[]}],"summary":"Get a memory by id","tags":["Memory"]}},"/v1/memory-change":{"get":{"operationId":"getMemoryChanges","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"memoryId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"ids","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"sort","required":false,"in":"query","schema":{"$ref":"#/components/schemas/MemoryChangeSort"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryChangeListDto"}}}}},"security":[{"token":[]}],"summary":"List memory changes","tags":["MemoryChange"]}},"/v1/memory-change/{id}/revert":{"post":{"operationId":"revertMemoryChange","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryChangeListItemDto"}}}}},"security":[{"token":[]}],"summary":"Revert an applied memory change (undo)","tags":["MemoryChange"]}},"/v1/comment":{"post":{"operationId":"createComment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentItemDto"}}}}},"security":[{"token":[]}],"summary":"Create a new comment","tags":["Comment"]}},"/v1/comment/{id}":{"patch":{"operationId":"updateComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentItemDto"}}}}},"security":[{"token":[]}],"summary":"Update a comment","tags":["Comment"]},"delete":{"operationId":"removeComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Remove a comment","tags":["Comment"]}},"/v1/comment-thread/{id}/send-to-agent":{"post":{"operationId":"sendCommentThreadToAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCommentThreadToAgentDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessageItemDto"}}}}},"security":[{"token":[]}],"summary":"Send a comment thread to an agent session as a chat message","tags":["CommentThread"]}},"/v1/comment-thread":{"get":{"operationId":"listCommentThread","parameters":[{"name":"skip","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"size","required":false,"in":"query","schema":{"nullable":false,"type":"number"}},{"name":"documentSectionIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"documentIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"resolved","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThreadListDto"}}}}},"security":[{"token":[]}],"summary":"List comment threads","tags":["CommentThread"]},"post":{"operationId":"createCommentThread","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentThreadDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThreadItemDto"}}}}},"security":[{"token":[]}],"summary":"Create a new comment thread","tags":["CommentThread"]}},"/v1/comment-thread/{id}":{"patch":{"operationId":"updateCommentThread","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentThreadDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThreadItemDto"}}}}},"security":[{"token":[]}],"summary":"Update a comment thread","tags":["CommentThread"]},"delete":{"operationId":"removeCommentThread","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Remove a comment thread","tags":["CommentThread"]}},"/v1/comment-thread/{id}/seen":{"post":{"operationId":"markCommentThreadSeen","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThreadItemDto"}}}}},"security":[{"token":[]}],"summary":"Mark a comment thread as seen by the current user","tags":["CommentThread"]}},"/v1/grant-subscription/subscribe":{"post":{"operationId":"subscribeToGrant","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSubscribeDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Subscribe an email address to updates for a grant (sends a confirmation email)","tags":["GrantSubscription"]}},"/v1/grant-subscription/confirm":{"post":{"operationId":"confirmGrantSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmSubscriptionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Confirm a grant subscription via its confirmation token","tags":["GrantSubscription"]}},"/v1/grant-subscription/unsubscribe":{"post":{"operationId":"unsubscribeFromGrant","parameters":[{"name":"token","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Unsubscribe from a grant via its unsubscribe token","tags":["GrantSubscription"]}},"/v1/grant-subscription":{"get":{"operationId":"getGrantSubscriptions","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSubscriptionListDto"}}}}},"security":[{"token":[]}],"summary":"List all grant subscriptions","tags":["GrantSubscription"]},"post":{"operationId":"createGrantSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantSubscriptionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSubscriptionDto"}}}}},"security":[{"token":[]}],"summary":"Create a grant subscription","tags":["GrantSubscription"]}},"/v1/grant-subscription/{id}":{"get":{"operationId":"getGrantSubscriptionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantSubscriptionDto"}}}}},"security":[{"token":[]}],"summary":"Get a grant subscription by id","tags":["GrantSubscription"]},"delete":{"operationId":"deleteGrantSubscription","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"token":[]}],"summary":"Delete a grant subscription","tags":["GrantSubscription"]}},"/v1/transcriptions":{"post":{"operationId":"transcribeAudio","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranscribeAudioFormDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionDto"}}}}},"security":[{"token":[]}],"summary":"Transcribe a short dictated recording to text, without storing it","tags":["Transcription"]}}},"info":{"title":"TwinAI","description":"API for TwinAI platform","version":"3.3.2","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"token":{"scheme":"bearer","bearerFormat":"JWT or API Key","type":"http","name":"Authorization","description":"An API key, or a session token from the identity provider","in":"header"},"cookie":{"type":"apiKey","in":"cookie","name":"twinai_auth","description":"The identity provider's access token, as the browser holds it"}},"schemas":{"UserRole":{"type":"string","enum":["OrganizationOwner","ProjectEditor","ProjectUser"]},"RoleDto":{"type":"object","properties":{"role":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/UserRole"}]},"label":{"type":"string","nullable":false},"description":{"type":"string","nullable":false}},"required":["role","label","description"]},"RolePermission":{"type":"string","enum":["project.edit","project.view","organization.edit"]},"RolePermissionDto":{"type":"object","properties":{"name":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/RolePermission"}]}},"required":["name"]},"SetUserRoleDto":{"type":"object","properties":{"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organizationId":{"type":"string","nullable":false}},"required":["roles","organizationId"]},"SetUserNameDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":false},"lastName":{"type":"string","nullable":true}},"required":["organizationId","firstName"]},"UserPublicDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true}},"required":["id","email","firstName","lastName"]},"SetUserAdminDto":{"type":"object","properties":{"isAdmin":{"type":"boolean","nullable":false}},"required":["isAdmin"]},"SuccessResponseDto":{"type":"object","properties":{"success":{"type":"boolean","nullable":false},"message":{"type":"string","nullable":false}},"required":["success","message"]},"PublicOrganizationDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"UserMembershipDto":{"type":"object","properties":{"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}}},"required":["organization","roles"]},"UserDetailsDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"deletedAt":{"format":"date-time","type":"string","nullable":true},"updatedAt":{"format":"date-time","type":"string","nullable":false},"onboardingSeen":{"type":"boolean","nullable":false},"isAdmin":{"type":"boolean","nullable":false},"memberships":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UserMembershipDto"}},"seenTutorialKeys":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["id","email","firstName","lastName","phoneNumber","createdAt","deletedAt","updatedAt","onboardingSeen","isAdmin","memberships","seenTutorialKeys"]},"UpdateUserDto":{"type":"object","properties":{"firstName":{"type":"string","nullable":false},"lastName":{"type":"string","nullable":false},"phoneNumber":{"type":"string","nullable":false},"seenTutorialKeys":{"nullable":false,"type":"array","items":{"type":"string"}}}},"UpdatePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string","nullable":false},"newPassword":{"type":"string","nullable":false}},"required":["currentPassword","newPassword"]},"PasswordChangeField":{"type":"string","enum":["currentPassword","newPassword"]},"PasswordChangeErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","nullable":false},"message":{"type":"string","nullable":false},"field":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PasswordChangeField"}]}},"required":["statusCode","message"]},"ApiKeyResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":true},"hint":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"isAdmin":{"type":"boolean","nullable":false},"user":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"lastUsedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","name","hint","roles","isAdmin","user","createdAt","updatedAt","lastUsedAt"]},"CreateApiKeyDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organizationId":{"type":"string","nullable":false},"isAdmin":{"type":"boolean","nullable":false},"personal":{"type":"boolean","nullable":false}},"required":["roles","organizationId"]},"CreatedApiKeyResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":true},"hint":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"isAdmin":{"type":"boolean","nullable":false},"user":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"lastUsedAt":{"format":"date-time","type":"string","nullable":true},"apiKey":{"type":"string","nullable":false}},"required":["id","name","hint","roles","isAdmin","user","createdAt","updatedAt","lastUsedAt","apiKey"]},"OrganizationSortBy":{"type":"string","enum":["createdAt","updatedAt"]},"ModelTag":{"type":"string","enum":["baseline","eu","anthropic-premium","openai-premium"]},"OrganizationDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"email":{"type":"string","nullable":true},"subscriptionCredits":{"type":"number","nullable":false},"purchasedCredits":{"type":"number","nullable":false},"totalCredits":{"type":"number","nullable":false},"isInternal":{"type":"boolean","nullable":false},"showPublicDocumentTypes":{"type":"boolean","nullable":false},"figuresEnabled":{"type":"boolean","nullable":false},"modelTag":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"allowedInviteDomains":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","name","createdAt","updatedAt","email","subscriptionCredits","purchasedCredits","totalCredits","isInternal","showPublicDocumentTypes","figuresEnabled","modelTag"]},"OrganizationListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/OrganizationDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreditPackDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"credits":{"type":"number","nullable":false},"priceEur":{"type":"number","nullable":false}},"required":["id","name","credits","priceEur"]},"AddressDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"street1":{"type":"string","nullable":false},"street2":{"type":"string","nullable":true},"city":{"type":"string","nullable":false},"state":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"country":{"type":"string","nullable":false}},"required":["id","street1","street2","city","state","zip","country"]},"OrganizationUserDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"isAdmin":{"type":"boolean","nullable":false}},"required":["id","email","firstName","lastName","isAdmin"]},"OrganizationMembershipDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"user":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/OrganizationUserDto"}]}},"required":["id","roles","user"]},"InviteeDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}}},"required":["id","email","firstName","lastName","createdAt","roles"]},"SubscriptionStatus":{"type":"string","enum":["future","in_trial","active","non_renewing","paused","cancelled"]},"PlanTier":{"type":"string","enum":["ProNew","BusinessNew","EnterpriseNew","Simple","Starter","Pro","Standard"]},"PlanInterval":{"type":"string","enum":["Monthly","Yearly"]},"CreditTier":{"type":"string","enum":["Small","Medium","Large"]},"CachedAddonDto":{"type":"object","properties":{"itemPriceId":{"type":"string","nullable":false},"quantity":{"type":"number","nullable":false},"creditTier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CreditTier"}]}},"required":["itemPriceId","quantity"]},"OrganizationSubscriptionDto":{"type":"object","properties":{"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/SubscriptionStatus"}]},"planTier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanTier"}]},"planInterval":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanInterval"}]},"addons":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/CachedAddonDto"}},"nextBillingAt":{"format":"date-time","type":"string","nullable":true},"currentTermEnd":{"format":"date-time","type":"string","nullable":true},"lastSyncedAt":{"format":"date-time","type":"string","nullable":true}},"required":["status","planTier","planInterval","addons","nextBillingAt","currentTermEnd","lastSyncedAt"]},"OrganizationDetailDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"email":{"type":"string","nullable":true},"subscriptionCredits":{"type":"number","nullable":false},"purchasedCredits":{"type":"number","nullable":false},"totalCredits":{"type":"number","nullable":false},"isInternal":{"type":"boolean","nullable":false},"showPublicDocumentTypes":{"type":"boolean","nullable":false},"figuresEnabled":{"type":"boolean","nullable":false},"modelTag":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"allowedInviteDomains":{"nullable":true,"type":"array","items":{"type":"string"}},"phoneNumber":{"type":"string","nullable":true},"billingFirstName":{"type":"string","nullable":true},"billingLastName":{"type":"string","nullable":true},"billingEmail":{"type":"string","nullable":true},"billingPhoneNumber":{"type":"string","nullable":true},"address":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"billingAddress":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"memberships":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/OrganizationMembershipDto"}},"invitees":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/InviteeDto"}},"subscription":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/OrganizationSubscriptionDto"}]}},"required":["id","name","createdAt","updatedAt","email","subscriptionCredits","purchasedCredits","totalCredits","isInternal","showPublicDocumentTypes","figuresEnabled","modelTag","phoneNumber","billingFirstName","billingLastName","billingEmail","billingPhoneNumber","address","billingAddress","memberships","invitees","subscription"]},"CreateOrganizationDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"email":{"type":"string","nullable":false}},"required":["name","email"]},"UpdateAddressDto":{"type":"object","properties":{"street1":{"type":"string","nullable":false},"street2":{"type":"string","nullable":true},"city":{"type":"string","nullable":false},"state":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"country":{"type":"string","nullable":false}}},"UpdateOrganizationDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"email":{"type":"string","nullable":true},"showPublicDocumentTypes":{"type":"boolean","nullable":false},"figuresEnabled":{"type":"boolean","nullable":false},"modelTag":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"allowedInviteDomains":{"nullable":true,"type":"array","items":{"type":"string"}},"phoneNumber":{"type":"string","nullable":true},"billingFirstName":{"type":"string","nullable":true},"billingLastName":{"type":"string","nullable":true},"billingEmail":{"type":"string","nullable":true},"billingPhoneNumber":{"type":"string","nullable":true},"address":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UpdateAddressDto"}]},"billingAddress":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UpdateAddressDto"}]}}},"ClaimInviteDomainsResponseDto":{"type":"object","properties":{"externalId":{"type":"string","nullable":false},"claimed":{"nullable":false,"type":"array","items":{"type":"string"}},"alreadyClaimed":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["externalId","claimed","alreadyClaimed"]},"AddOrganizationCreditsDto":{"type":"object","properties":{"amount":{"type":"number","nullable":false}},"required":["amount"]},"BuyCreditsDto":{"type":"object","properties":{"packId":{"type":"string","nullable":false}},"required":["packId"]},"CanBuyCreditsResponseDto":{"type":"object","properties":{"canBuyCredits":{"type":"boolean","nullable":false}},"required":["canBuyCredits"]},"PortalSessionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"token":{"type":"string","nullable":false},"accessUrl":{"type":"string","nullable":false}},"required":["id","token","accessUrl"]},"SubscriptionIdDto":{"type":"object","properties":{"subscriptionId":{"type":"string","nullable":true}},"required":["subscriptionId"]},"InviteeResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","email","firstName","lastName","roles","organization","createdAt","updatedAt"]},"InviteeListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/InviteeResponseDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateInviteeDto":{"type":"object","properties":{"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organizationId":{"type":"string","nullable":false}},"required":["email","roles","organizationId"]},"InviteDetailsResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"existingUser":{"type":"boolean","nullable":false}},"required":["id","email","firstName","lastName","roles","organization","createdAt","updatedAt","existingUser"]},"OAuthProvider":{"type":"string","enum":["Google"]},"OAuthProviderResponseDto":{"type":"object","properties":{"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/OAuthProvider"}]},"name":{"type":"string","nullable":false},"description":{"type":"string","nullable":false},"authorizationUrl":{"type":"string","nullable":false},"responseType":{"type":"string","nullable":false},"scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"accessType":{"type":"string","nullable":true},"includeGrantedScopes":{"type":"string","nullable":true},"clientId":{"type":"string","nullable":false},"codeChallengeMethod":{"type":"string","nullable":true}},"required":["provider","name","description","authorizationUrl","responseType","scopes","clientId"]},"OAuthConnectionResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":true},"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/OAuthProvider"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"expiresAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","name","provider","createdAt","expiresAt"]},"ConnectIntegrationDto":{"type":"object","properties":{"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/OAuthProvider"}]},"code":{"type":"string","nullable":false},"redirectUri":{"type":"string","nullable":false},"codeVerifier":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false}},"required":["provider","code","redirectUri","organizationId"]},"CreateAddressDto":{"type":"object","properties":{"street1":{"type":"string","nullable":false},"street2":{"type":"string","nullable":true},"city":{"type":"string","nullable":false},"state":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"country":{"type":"string","nullable":false}},"required":["street1","street2","city","state","zip","country"]},"SignupDto":{"type":"object","properties":{"email":{"type":"string","nullable":false},"firstName":{"type":"string","nullable":false},"lastName":{"type":"string","nullable":false},"organizationName":{"type":"string","nullable":false},"billingPhoneNumber":{"type":"string","nullable":false},"billingAddress":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CreateAddressDto"}]},"organizationAddress":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CreateAddressDto"}]},"paymentIntentId":{"type":"string","nullable":false},"creditTier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CreditTier"}]}},"required":["email","firstName","organizationName"]},"SignupResponseDto":{"type":"object","properties":{"userId":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false}},"required":["userId","organizationId"]},"ChargebeeWebhookEventDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"event_type":{"type":"string","nullable":false},"content":{"type":"object","nullable":false}},"required":["id","event_type","content"]},"PaymentMethodEnum":{"type":"string","enum":["IDeal","CreditCard"]},"CreatePaymentIntentDto":{"type":"object","properties":{"planTier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanTier"}]},"planInterval":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanInterval"}]},"paymentMethod":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PaymentMethodEnum"}]}},"required":["planTier","planInterval","paymentMethod"]},"PaymentIntentDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"status":{"type":"string","nullable":false},"gatewayAccountId":{"type":"string","nullable":true},"referenceId":{"type":"string","nullable":true}},"required":["id","status","gatewayAccountId","referenceId"]},"PlanFeature":{"type":"string","enum":["AIOptimizations","TemplatesS","TemplatesM","TemplatesL","DevelopmentHoursS","DevelopmentHoursM","DevelopmentHoursL","SupportS","SupportM","SupportL","UsersS","UsersL","GdprAndIso","OnboardingM","OnboardingL","CustomTemplates","SoftwareRequests"]},"PlanFeatureDto":{"type":"object","properties":{"feature":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanFeature"}]},"displayName":{"type":"string","nullable":false}},"required":["feature","displayName"]},"PlanDto":{"type":"object","properties":{"itemId":{"type":"string","nullable":false},"itemPriceId":{"type":"string","nullable":false},"tier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanTier"}]},"interval":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanInterval"}]},"priceInCents":{"type":"number","nullable":false},"currencyCode":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"description":{"type":"string","nullable":false}},"required":["itemId","itemPriceId","tier","interval","priceInCents","currencyCode","name","description"]},"CreditAddonDto":{"type":"object","properties":{"creditTier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CreditTier"}]},"displayName":{"type":"string","nullable":false},"monthlyCredits":{"type":"number","nullable":false},"monthlyPriceInCents":{"type":"number","nullable":false},"yearlyPriceInCents":{"type":"number","nullable":false}},"required":["creditTier","displayName","monthlyCredits","monthlyPriceInCents","yearlyPriceInCents"]},"PlanTierDto":{"type":"object","properties":{"tier":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PlanTier"}]},"displayName":{"type":"string","nullable":false},"features":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/PlanFeatureDto"}},"plans":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/PlanDto"}},"creditAddons":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/CreditAddonDto"}}},"required":["tier","displayName","features","plans","creditAddons"]},"ReasoningEffort":{"type":"string","enum":["low","medium","high"]},"InitialAgentMessageDto":{"type":"object","properties":{"content":{"type":"string","nullable":false},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"viewContext":{"type":"string","nullable":false},"timezone":{"type":"string","nullable":false},"modelTag":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"reasoningEffort":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ReasoningEffort"}]}},"required":["content"]},"ScopeType":{"type":"string","enum":["project","web-search"]},"ApproveScopeItemDto":{"type":"object","properties":{"type":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ScopeType"}]},"projectId":{"type":"string","nullable":false}},"required":["type"]},"CreatePlatformAgentSessionDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false},"initialMessage":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/InitialAgentMessageDto"}]},"routeMap":{"type":"string","nullable":false},"scopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ApproveScopeItemDto"}}},"required":["organizationId"]},"AgentSessionEndedReason":{"type":"string","enum":["max_iterations"]},"SessionScopeProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"SessionScopeDto":{"type":"object","properties":{"type":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ScopeType"}]},"projectId":{"type":"string","nullable":true},"project":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SessionScopeProjectDto"}]},"approvedAt":{"format":"date-time","type":"string","nullable":true}},"required":["type","projectId","project","approvedAt"]},"RootSessionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"scopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/SessionScopeDto"}}},"required":["id","scopes"]},"AgentSessionItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"parentSessionId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":false},"title":{"type":"string","nullable":true},"status":{"type":"string","nullable":false},"endedReason":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AgentSessionEndedReason"}]},"turn":{"type":"number","nullable":false},"iteration":{"type":"number","nullable":false},"statusText":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"error":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"scopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/SessionScopeDto"}},"rootSession":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/RootSessionDto"}]}},"required":["id","parentSessionId","agentName","title","status","endedReason","turn","iteration","statusText","durationMs","error","createdAt","updatedAt","scopes","rootSession"]},"ApproveScopeDto":{"type":"object","properties":{"rootSessionId":{"type":"string","nullable":false},"scopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ApproveScopeItemDto"}}},"required":["rootSessionId","scopes"]},"AgentName":{"type":"string","enum":["agent","input-check","subagent"]},"AgentSessionStatus":{"type":"string","enum":["pending","running","completed","stopped","failed"]},"AgentSessionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/AgentSessionItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"GrantScopeDto":{"type":"object","properties":{"scopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ApproveScopeItemDto"}}},"required":["scopes"]},"UpdateAgentSessionDto":{"type":"object","properties":{"title":{"type":"string","nullable":false}}},"SendConversationMessageDto":{"type":"object","properties":{"content":{"type":"string","nullable":false},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"viewContext":{"type":"string","nullable":false},"timezone":{"type":"string","nullable":false},"modelTag":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"reasoningEffort":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ReasoningEffort"}]},"agentSessionId":{"type":"string","nullable":false}},"required":["content","agentSessionId"]},"UnfurlType":{"type":"string","enum":["Comment","CommentThread","ProjectFile","Project","Document","DocumentSection","Client","AgentSession","DocumentExport","Memory"]},"UnfurlLinkType":{"type":"string","enum":["Document","Project","Client","DocumentType","Member","Organization"]},"UnfurlLinkDto":{"type":"object","properties":{"type":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/UnfurlLinkType"}]},"id":{"type":"string","nullable":false}},"required":["type","id"]},"UnfurlDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"type":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/UnfurlType"}]},"name":{"type":"string","nullable":false},"description":{"type":"string","nullable":false},"link":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/UnfurlLinkDto"}]}},"required":["id","type","name","description"]},"ScopeRequestScopeDto":{"type":"object","properties":{"type":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ScopeType"}]},"projectId":{"type":"string","nullable":true},"name":{"type":"string","nullable":false}},"required":["type","projectId","name"]},"ScopeRequestActivityDto":{"type":"object","properties":{"rootSessionId":{"type":"string","nullable":false},"requestedScopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ScopeRequestScopeDto"}}},"required":["rootSessionId","requestedScopes"]},"ScopeGrantResultActivityDto":{"type":"object","properties":{"approvedScopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ScopeRequestScopeDto"}},"declinedScopes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ScopeRequestScopeDto"}}},"required":["approvedScopes","declinedScopes"]},"MemoryChangeActivityDto":{"type":"object","properties":{"memoryChangeId":{"type":"string","nullable":false},"memoryId":{"type":"string","nullable":false},"level":{"type":"string","nullable":false},"description":{"type":"string","nullable":false}},"required":["memoryChangeId","level","description"]},"NavigationActivityDto":{"type":"object","properties":{"route":{"type":"string","nullable":false},"params":{"nullable":false,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"query":{"nullable":false,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"label":{"type":"string","nullable":false}},"required":["route","label"]},"ConversationActivityItemDto":{"type":"object","properties":{"scopeRequest":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ScopeRequestActivityDto"}]},"scopeGrantResult":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ScopeGrantResultActivityDto"}]},"memoryChange":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/MemoryChangeActivityDto"}]},"navigation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/NavigationActivityDto"}]}}},"SectionChangeKind":{"type":"string","enum":["written","edited","rewritten"]},"ThoughtChangeDto":{"type":"object","properties":{"documentId":{"type":"string","nullable":false},"sectionId":{"type":"string","nullable":false},"sectionName":{"type":"string","nullable":false},"sectionKey":{"type":"string","nullable":false},"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/SectionChangeKind"}]},"removed":{"type":"string","nullable":true},"added":{"type":"string","nullable":false}},"required":["documentId","sectionId","sectionName","sectionKey","kind","removed","added"]},"ToolActivityKind":{"type":"string","enum":["search","read","write","web","wait","memory","other"]},"ToolActivityDto":{"type":"object","properties":{"tool":{"type":"string","nullable":false},"label":{"type":"string","nullable":false},"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ToolActivityKind"}]}},"required":["tool","label","kind"]},"ConversationMessageItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"agentSessionId":{"type":"string","nullable":false},"role":{"type":"string","nullable":false},"content":{"type":"string","nullable":false},"unfurls":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UnfurlDto"}},"user":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"activity":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ConversationActivityItemDto"}},"error":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"processedAt":{"format":"date-time","type":"string","nullable":true},"isThought":{"type":"boolean","nullable":false},"durationMs":{"type":"number","nullable":true},"changes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ThoughtChangeDto"}},"toolActivity":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ToolActivityDto"}},"reasoning":{"type":"string","nullable":true},"isVisible":{"type":"boolean","nullable":false},"toolCallId":{"type":"string","nullable":true},"toolCalls":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"tokenUsage":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"modelTag":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ModelTag"}]},"reasoningEffort":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReasoningEffort"}]},"modelDeploymentId":{"type":"string","nullable":true},"modelName":{"type":"string","nullable":true}},"required":["id","agentSessionId","role","content","user","fileIds","activity","error","createdAt","processedAt"]},"ConversationMessageListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ConversationMessageItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"UpdateConversationMessageDto":{"type":"object","properties":{"content":{"type":"string","nullable":false},"error":{"type":"string","nullable":true}}},"DocumentStatus":{"type":"string","enum":["Initializing","Ready","Generating","Failed"]},"DocumentDocumentTypeDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"DocumentDocumentTypeVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"isPublished":{"type":"boolean","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"documentType":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentDocumentTypeDto"}]}},"required":["id","versionNumber","isPublished","inputDataInstructions","documentType"]},"DocumentClientDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"DocumentProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"clients":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentClientDto"}},"users":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UserPublicDto"}}},"required":["id","archived","clients","users"]},"PictureDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"location":{"type":"string","nullable":false}},"required":["id","location"]},"DocumentScoreDto":{"type":"object","properties":{"score":{"type":"number","nullable":false},"weight":{"type":"number","nullable":false}},"required":["score","weight"]},"DocumentItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"updatedAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"documentTypeVersion":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentDocumentTypeVersionDto"}]},"project":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentProjectDto"}]},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"wordCount":{"type":"number","nullable":false},"characterCount":{"type":"number","nullable":false},"picture":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PictureDto"}]},"lastModifiedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"documentScore":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentScoreDto"}]},"thumbnailUrl":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","name","documentTypeVersion","project","status","wordCount","characterCount","picture","lastModifiedBy","organization","documentScore"]},"FacetOptionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"label":{"type":"string","nullable":false},"count":{"type":"number","nullable":false}},"required":["id","label","count"]},"DocumentFacetsDto":{"type":"object","properties":{"documentTypes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"clients":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"users":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}}},"required":["documentTypes","clients","users"]},"DocumentListDto":{"type":"object","properties":{"count":{"type":"number","nullable":false},"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentItemDto"}},"facets":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentFacetsDto"}]}},"required":["count","items","facets"]},"CreateDocumentDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"documentTypeVersionId":{"type":"string","nullable":false},"pictureId":{"type":"string","nullable":false}},"required":["projectId","documentTypeVersionId"]},"InputCheckConfigDto":{"type":"object","properties":{"key":{"type":"string","nullable":false},"check":{"type":"string","nullable":false},"weight":{"type":"number","nullable":false},"isOptional":{"type":"boolean","nullable":false}},"required":["key","check","weight"]},"TableColumnDataType":{"type":"string","enum":["string","number","integer","boolean","date"]},"TableColumnConfigDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"description":{"type":"string","nullable":false},"dataType":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/TableColumnDataType"}]},"required":{"type":"boolean","nullable":false},"maxLength":{"type":"number","nullable":false},"pattern":{"type":"string","nullable":false},"minValue":{"type":"number","nullable":false},"maxValue":{"type":"number","nullable":false}},"required":["name","dataType"]},"TableSchemaConfigDto":{"type":"object","properties":{"minRows":{"type":"number","nullable":false},"maxRows":{"type":"number","nullable":false},"columns":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/TableColumnConfigDto"}},"strict":{"type":"boolean","nullable":false}},"required":["columns"]},"DocumentSectionConfigDto":{"type":"object","properties":{"key":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"headingLevel":{"type":"number","nullable":false},"sectionContext":{"type":"string","nullable":false},"templateKey":{"type":"string","nullable":false},"question":{"type":"string","nullable":false},"expertInstructions":{"type":"string","nullable":false},"criteria":{"type":"string","nullable":false},"formatting":{"type":"string","nullable":false},"wordLimit":{"type":"number","nullable":false},"characterLimit":{"type":"number","nullable":false},"examples":{"nullable":false,"type":"array","items":{"type":"string"}},"inputChecks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/InputCheckConfigDto"}},"tableSchema":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/TableSchemaConfigDto"}]}},"required":["key","name","headingLevel"]},"DocumentConfigDto":{"type":"object","properties":{"backgroundInfo":{"type":"string","nullable":false},"criteria":{"type":"string","nullable":false},"writingInstructions":{"type":"string","nullable":false},"answeringGuidelines":{"type":"string","nullable":false},"textFormatting":{"type":"string","nullable":false},"wordLimit":{"type":"number","nullable":false},"characterLimit":{"type":"number","nullable":false},"sections":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionConfigDto"}}},"required":["backgroundInfo","writingInstructions","answeringGuidelines","textFormatting","sections"]},"InputCheckResultDto":{"type":"object","properties":{"key":{"type":"string","nullable":false},"check":{"type":"string","nullable":false},"weight":{"type":"number","nullable":false},"score":{"type":"number","nullable":false},"reason":{"type":"string","nullable":false}},"required":["key","check","weight"]},"DocumentSectionScoreDto":{"type":"object","properties":{"selfScore":{"type":"number","nullable":false},"selfWeight":{"type":"number","nullable":false},"totalScore":{"type":"number","nullable":false},"totalWeight":{"type":"number","nullable":false}},"required":["selfScore","selfWeight","totalScore","totalWeight"]},"FootnoteSummaryDto":{"type":"object","properties":{"sourceId":{"type":"string","nullable":true},"text":{"type":"string","nullable":false}},"required":["sourceId","text"]},"SectionVersionSummaryDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"characterCount":{"type":"number","nullable":false},"wordCount":{"type":"number","nullable":false},"footnotes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FootnoteSummaryDto"}},"updatedAt":{"type":"string","nullable":false}},"required":["id","characterCount","wordCount","footnotes","updatedAt"]},"DocumentSectionItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"key":{"type":"string","nullable":false},"headingLevel":{"type":"number","nullable":false},"templateKey":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"isHeadingOnly":{"type":"boolean","nullable":false},"draft":{"type":"boolean","nullable":false},"documentId":{"type":"string","nullable":false},"lastModifiedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"inputCheckResults":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/InputCheckResultDto"}},"calculatedScore":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentSectionScoreDto"}]},"order":{"type":"number","nullable":false},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SectionVersionSummaryDto"}]}},"required":["id","name","key","headingLevel","isHeadingOnly","draft","documentId","inputCheckResults","calculatedScore","order","currentVersion"]},"DocumentFigureDto":{"type":"object","properties":{"figureId":{"type":"string","nullable":false},"label":{"type":"string","nullable":false},"description":{"type":"string","nullable":false},"sectionId":{"type":"string","nullable":false}},"required":["figureId","label","description","sectionId"]},"DocumentDetailDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"updatedAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"documentTypeVersion":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentDocumentTypeVersionDto"}]},"project":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentProjectDto"}]},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentStatus"}]},"wordCount":{"type":"number","nullable":false},"characterCount":{"type":"number","nullable":false},"picture":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PictureDto"}]},"lastModifiedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"documentScore":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentScoreDto"}]},"thumbnailUrl":{"type":"string","nullable":true},"wordLimit":{"type":"number","nullable":true},"characterLimit":{"type":"number","nullable":true},"documentLanguage":{"type":"string","nullable":false},"parsedConfig":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"sections":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionItemDto"}},"figures":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentFigureDto"}},"failedReason":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","name","documentTypeVersion","project","status","wordCount","characterCount","picture","lastModifiedBy","organization","documentScore","wordLimit","characterLimit","documentLanguage","parsedConfig","sections","figures","failedReason"]},"UpdateDocumentDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"pictureId":{"type":"string","nullable":false},"documentLanguage":{"type":"string","nullable":false}}},"FileItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"originalName":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"size":{"type":"number","nullable":true},"type":{"type":"string","nullable":true},"originalUrl":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["id","originalName","mimeType","size","type","originalUrl","notes"]},"PublicKnowledgeBaseVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"knowledgeBaseId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"format":"date-time","type":"string","nullable":true},"description":{"type":"string","nullable":true},"sourceFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"sourceFiles":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FileItemDto"}}},"required":["id","createdAt","knowledgeBaseId","versionNumber","versionDescription","isPublished","publishedAt","description","sourceFileIds","sourceFiles"]},"DocumentTypeVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"documentTypeId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"knowledgeBaseVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicKnowledgeBaseVersionDto"}]}},"required":["id","createdAt","documentTypeId","versionNumber","versionDescription","isPublished","publishedAt","createdBy","description","documentLanguage","inputDataInstructions","templateFileIds","knowledgeBaseVersionId","knowledgeBaseVersion"]},"DocumentTypeVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeVersionDto"}}},"required":["items"]},"ForkDocumentTypeVersionDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false}},"required":["versionDescription"]},"DocumentTypeValidationSummaryDto":{"type":"object","properties":{"pass":{"type":"number","nullable":false},"fail":{"type":"number","nullable":false},"warn":{"type":"number","nullable":false},"needsAiReview":{"type":"number","nullable":false}},"required":["pass","fail","warn","needsAiReview"]},"DocumentTypeValidationCheckStatus":{"type":"string","enum":["pass","fail","warn","needs-ai-review"]},"DocumentTypeValidationCheckDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"step":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypeValidationCheckStatus"}]},"message":{"type":"string","nullable":false},"location":{"type":"string","nullable":false},"suggestion":{"type":"string","nullable":false},"data":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"}},"required":["id","step","status","message"]},"DocumentTypeValidationResultDto":{"type":"object","properties":{"ok":{"type":"boolean","nullable":false},"summary":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypeValidationSummaryDto"}]},"results":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeValidationCheckDto"}}},"required":["ok","summary","results"]},"FilePictureDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"location":{"type":"string","nullable":true},"uploadLocation":{"type":"string","nullable":true},"downloadLocation":{"type":"string","nullable":true}},"required":["id","location"]},"DocumentTypeGrantDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true}},"required":["id","name","slug","shortName"]},"DocumentTypeVersionItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"documentTypeId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"description":{"type":"string","nullable":true},"documentLanguage":{"type":"string","nullable":false},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true}},"required":["id","createdAt","documentTypeId","versionNumber","versionDescription","isPublished","publishedAt","createdBy","description","documentLanguage","templateFileIds","knowledgeBaseVersionId"]},"DocumentTypeItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"pictureId":{"type":"string","nullable":true},"picture":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/FilePictureDto"}]},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"isShared":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"derivedGrant":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentTypeGrantDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentTypeVersionItemDto"}]}},"required":["id","createdAt","name","pictureId","picture","organization","isShared","exportKey","createdBy","derivedGrant","currentVersion"]},"DocumentTypeListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"DocumentTypeDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"pictureId":{"type":"string","nullable":true},"picture":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/FilePictureDto"}]},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"isShared":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentTypeVersionDto"}]},"derivedGrant":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentTypeGrantDto"}]}},"required":["id","createdAt","name","pictureId","picture","organization","isShared","exportKey","createdBy","currentVersion","derivedGrant"]},"CreateDocumentTypeDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"publish":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"knowledgeBaseVersionId":{"type":"string","nullable":true}},"required":["name","organizationId"]},"DocumentTypePayloadOperation":{"type":"string","enum":["create","fork"]},"DocumentTypeValidationPayloadDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypePayloadOperation"}]},"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"publish":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false}}},"DocumentTypeTemplateDataRequestDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypePayloadOperation"}]},"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"publish":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false},"versionId":{"type":"string","nullable":false},"documentName":{"type":"string","nullable":false}}},"DocumentTypeTemplateDataResponseDto":{"type":"object","properties":{"documentName":{"type":"string","nullable":false},"data":{"nullable":false,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"}},"required":["documentName","data"]},"DocumentTypeTemplateCheckRequestDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypePayloadOperation"}]},"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"publish":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false},"versionId":{"type":"string","nullable":false},"documentName":{"type":"string","nullable":false},"templateFileId":{"type":"string","nullable":false}},"required":["templateFileId"]},"DocumentTypeTemplateCheckResponseDto":{"type":"object","properties":{"ok":{"type":"boolean","nullable":false},"templateFileId":{"type":"string","nullable":false},"errors":{"nullable":false,"type":"array","items":{"type":"string"}},"templateName":{"type":"string","nullable":true},"tagCount":{"type":"number","nullable":false},"warnings":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["ok","templateFileId","errors","templateName","tagCount","warnings"]},"DocumentTypeTestRenderRequestDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"documentLanguage":{"type":"string","nullable":false},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true},"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentTypePayloadOperation"}]},"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"publish":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false},"versionId":{"type":"string","nullable":false},"documentName":{"type":"string","nullable":false},"templateFileId":{"type":"string","nullable":false},"createPreviewFile":{"type":"boolean","nullable":false}},"required":["templateFileId"]},"DocumentTypeTestRenderResponseDto":{"type":"object","properties":{"ok":{"type":"boolean","nullable":false},"templateFileId":{"type":"string","nullable":false},"errors":{"nullable":false,"type":"array","items":{"type":"string"}},"renderedBytes":{"type":"number","nullable":true},"previewFileId":{"type":"string","nullable":true}},"required":["ok","templateFileId","errors","renderedBytes","previewFileId"]},"UpdateDocumentTypeDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"isShared":{"type":"boolean","nullable":false},"exportKey":{"type":"string","nullable":true},"pictureId":{"type":"string","nullable":true},"organizationId":{"type":"string","nullable":false}}},"SectionVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"documentSectionId":{"type":"string","nullable":false},"user":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"agentSessionId":{"type":"string","nullable":true},"version":{"type":"number","nullable":false},"content":{"type":"string","nullable":false},"summary":{"type":"string","nullable":true},"decisions":{"nullable":false,"type":"array","items":{"type":"string"}},"sourcesRead":{"nullable":false,"type":"array","items":{"type":"string"}},"feedback":{"type":"string","nullable":true},"questions":{"nullable":false,"type":"array","items":{"type":"string"}},"characterCount":{"type":"number","nullable":false},"wordCount":{"type":"number","nullable":false},"footnotes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FootnoteSummaryDto"}},"createdAt":{"type":"string","nullable":false},"updatedAt":{"type":"string","nullable":false}},"required":["id","documentSectionId","user","agentSessionId","version","content","summary","decisions","sourcesRead","feedback","questions","characterCount","wordCount","footnotes","createdAt","updatedAt"]},"DocumentSectionDetailDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"key":{"type":"string","nullable":false},"headingLevel":{"type":"number","nullable":false},"templateKey":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"isHeadingOnly":{"type":"boolean","nullable":false},"draft":{"type":"boolean","nullable":false},"documentId":{"type":"string","nullable":false},"lastModifiedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"inputCheckResults":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/InputCheckResultDto"}},"calculatedScore":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentSectionScoreDto"}]},"order":{"type":"number","nullable":false},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SectionVersionDto"}]},"sectionContext":{"type":"string","nullable":true},"expertInstructions":{"type":"string","nullable":true},"criteria":{"type":"string","nullable":true},"formatting":{"type":"string","nullable":true},"wordLimit":{"type":"number","nullable":true},"characterLimit":{"type":"number","nullable":true},"examples":{"nullable":true,"type":"array","items":{"type":"string"}},"inputChecks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/InputCheckConfigDto"}},"tableSchema":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/TableSchemaConfigDto"}]}},"required":["id","name","key","headingLevel","isHeadingOnly","draft","documentId","inputCheckResults","calculatedScore","order","currentVersion"]},"BatchGetDocumentSectionsDto":{"type":"object","properties":{"ids":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["ids"]},"UpdateDocumentSectionDto":{"type":"object","properties":{"draft":{"type":"boolean","nullable":false}}},"SectionVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/SectionVersionDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"SectionWritingDayDto":{"type":"object","properties":{"date":{"type":"string","nullable":false,"format":"date"},"twin":{"type":"number","nullable":false},"you":{"type":"number","nullable":false}},"required":["date","twin","you"]},"SectionWritingTotalsDto":{"type":"object","properties":{"twin":{"type":"number","nullable":false},"you":{"type":"number","nullable":false},"total":{"type":"number","nullable":false}},"required":["twin","you","total"]},"SectionWritingActivityDto":{"type":"object","properties":{"days":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/SectionWritingDayDto"}},"current":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/SectionWritingTotalsDto"}]},"previous":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/SectionWritingTotalsDto"}]}},"required":["days","current","previous"]},"PatchSectionVersionDto":{"type":"object","properties":{"content":{"type":"string","nullable":false}},"required":["content"]},"FootnoteValidationErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","nullable":false},"error":{"type":"string","nullable":false},"message":{"type":"string","nullable":false},"invalidSourceIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["statusCode","error","message","invalidSourceIds"]},"DocumentExportStatus":{"type":"string","enum":["Exporting","Ready","Failed"]},"FileDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"originalName":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"size":{"type":"number","nullable":true},"type":{"type":"string","nullable":true},"originalUrl":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":false},"updatedAt":{"type":"string","nullable":false},"location":{"type":"string","nullable":true},"organizationId":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"uploadLocation":{"type":"string","nullable":true},"downloadLocation":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true},"pageCount":{"type":"number","nullable":true}},"required":["id","originalName","mimeType","size","type","originalUrl","notes","createdAt","updatedAt","location","organizationId","createdBy","pageCount"]},"DocumentExportItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"documentId":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentExportStatus"}]},"files":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FileDto"}},"createdAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","documentId","status","files","createdAt"]},"DocumentExportListDto":{"type":"object","properties":{"count":{"type":"number","nullable":false},"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentExportItemDto"}}},"required":["count","items"]},"CreateDocumentExportDto":{"type":"object","properties":{"documentId":{"type":"string","nullable":false}},"required":["documentId"]},"ClientDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"email":{"type":"string","nullable":true},"kvk":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"address":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"logoId":{"type":"string","nullable":true},"logo":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/FilePictureDto"}]},"organizationId":{"type":"string","nullable":false},"projectCount":{"type":"number","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","name","email","kvk","description","address","logoId","logo","organizationId","projectCount","createdAt","updatedAt"]},"ClientListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ClientDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateClientDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"email":{"type":"string","nullable":true},"kvk":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"logoId":{"type":"string","nullable":true},"address":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UpdateAddressDto"}]}},"required":["name","organizationId"]},"UpdateClientDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"email":{"type":"string","nullable":true},"kvk":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"logoId":{"type":"string","nullable":true},"address":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UpdateAddressDto"}]}}},"ProjectSortBy":{"type":"string","enum":["lastEdited","newestCreated","oldestCreated","name"]},"ProjectStatus":{"type":"string","enum":["Draft","Writing","Review","Submitted","AwaitingInformation","Awarded","Rejected","Withdrawn"]},"ProjectGrantDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true,"format":"date"}},"required":["id","slug","name","shortName","deadline"]},"ProjectClientDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"required":["id","name","title","description"]},"ProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectStatus"}]},"deadline":{"type":"string","nullable":true,"format":"date"},"owner":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"grant":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProjectGrantDto"}]},"description":{"type":"string","nullable":true},"organizationId":{"type":"string","nullable":false},"clientIds":{"nullable":false,"type":"array","items":{"type":"string"}},"clients":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectClientDto"}},"users":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UserPublicDto"}},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","name","archived","status","deadline","owner","grant","description","organizationId","clientIds","clients","users","createdAt","updatedAt"]},"ProjectFacetsDto":{"type":"object","properties":{"clients":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"users":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}}},"required":["clients","users"]},"ProjectListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectDto"}},"count":{"type":"number","nullable":false},"facets":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFacetsDto"}]}},"required":["items","count","facets"]},"ProjectClientTitlesDto":{"type":"object","properties":{"titles":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["titles"]},"CreateProjectDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"userIds":{"nullable":false,"type":"array","items":{"type":"string"}},"nameIsGenerated":{"type":"boolean","nullable":false}},"required":["name","organizationId"]},"UpdateProjectDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"deadline":{"type":"string","nullable":true,"format":"date"},"description":{"type":"string","nullable":true},"clientIds":{"nullable":false,"type":"array","items":{"type":"string"}},"userIds":{"nullable":false,"type":"array","items":{"type":"string"}},"ownerId":{"type":"string","nullable":true},"grantId":{"type":"string","nullable":true}}},"UpdateProjectClientDto":{"type":"object","properties":{"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}}},"UpdateProjectStatusDto":{"type":"object","properties":{"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectStatus"}]},"occurredAt":{"format":"date-time","type":"string","nullable":false},"note":{"type":"string","nullable":false}},"required":["status"]},"ProjectStatusTransitionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectStatus"}]},"occurredAt":{"format":"date-time","type":"string","nullable":false},"note":{"type":"string","nullable":true},"user":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]}},"required":["id","status","occurredAt","note","user"]},"ProjectStatusHistoryDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectStatusTransitionDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"ProjectExportItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"projectId":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentExportStatus"}]},"failedReason":{"type":"string","nullable":true},"files":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FileDto"}},"createdAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","projectId","status","failedReason","files","createdAt"]},"ProjectExportDocumentSelectionDto":{"type":"object","properties":{"exportId":{"type":"string","nullable":false},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["exportId","fileIds"]},"CreateProjectExportDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"documents":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectExportDocumentSelectionDto"}},"projectFileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["projectId","documents","projectFileIds"]},"FileOrigin":{"type":"string","enum":["upload","scrape","user-text","generated"]},"ProjectFileType":{"type":"string","enum":["source","note","storyline"]},"FileStatus":{"type":"string","enum":["pending","processing","ready","failed"]},"TocHeadingDto":{"type":"object","properties":{"ordinal":{"type":"number","nullable":false},"depth":{"type":"number","nullable":false},"title":{"type":"string","nullable":false},"charStart":{"type":"number","nullable":false},"charEnd":{"type":"number","nullable":false}},"required":["ordinal","depth","title","charStart","charEnd"]},"ProjectFileFileDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"origin":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/FileOrigin"}]},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/FileStatus"}]},"originalName":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"readable":{"type":"boolean","nullable":false},"originalUrl":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"tags":{"nullable":false,"type":"array","items":{"type":"string"}},"failedReason":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"headings":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/TocHeadingDto"}}},"required":["id","origin","status","originalName","mimeType","readable","originalUrl","summary","tags","failedReason","thumbnailUrl","headings"]},"ProjectFileItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"chainId":{"type":"string","nullable":false},"projectId":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false},"file":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFileFileDto"}]},"projectFileType":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFileType"}]},"title":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"descriptionUnfurls":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UnfurlDto"}},"bodyIsEditable":{"type":"boolean","nullable":false},"versionNumber":{"type":"number","nullable":false},"author":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"versionStamp":{"type":"string","nullable":false}},"required":["id","chainId","projectId","createdAt","updatedAt","file","projectFileType","title","description","bodyIsEditable","versionNumber","author","versionStamp"]},"ProjectFileListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectFileItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"PreviewUrlSourceDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"url":{"type":"string","nullable":false,"format":"uri"}},"required":["projectId","url"]},"UrlSourcePreviewDto":{"type":"object","properties":{"url":{"type":"string","nullable":false},"host":{"type":"string","nullable":false},"title":{"type":"string","nullable":true},"readable":{"type":"boolean","nullable":false},"existing":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProjectFileItemDto"}]}},"required":["url","host","title","readable","existing"]},"CreateUrlSourceDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"url":{"type":"string","nullable":false,"format":"uri"},"title":{"type":"string","nullable":false}},"required":["projectId","url"]},"CreatedUrlSourceDto":{"type":"object","properties":{"item":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFileItemDto"}]},"readable":{"type":"boolean","nullable":false},"alreadyExisted":{"type":"boolean","nullable":false}},"required":["item","readable","alreadyExisted"]},"UrlSourceResultDto":{"type":"object","properties":{"item":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFileItemDto"}]},"readable":{"type":"boolean","nullable":false}},"required":["item","readable"]},"ProjectFileVersionFileDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"mimeType":{"type":"string","nullable":true},"originalName":{"type":"string","nullable":true}},"required":["id","mimeType","originalName"]},"ProjectFileVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"author":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"agentSessionId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"supersededAt":{"format":"date-time","type":"string","nullable":true},"bodyAvailable":{"type":"boolean","nullable":false},"file":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProjectFileVersionFileDto"}]}},"required":["id","versionNumber","author","agentSessionId","createdAt","supersededAt","bodyAvailable","file"]},"ProjectFileVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectFileVersionDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"ProjectFileVersionContentDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"author":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"agentSessionId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"supersededAt":{"format":"date-time","type":"string","nullable":true},"bodyAvailable":{"type":"boolean","nullable":false},"file":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProjectFileVersionFileDto"}]},"content":{"type":"string","nullable":true}},"required":["id","versionNumber","author","agentSessionId","createdAt","supersededAt","bodyAvailable","file","content"]},"ReplaceProjectFileDto":{"type":"object","properties":{"fileId":{"type":"string","nullable":false},"baseVersionStamp":{"type":"string","nullable":false}},"required":["fileId","baseVersionStamp"]},"RestoreProjectFileVersionDto":{"type":"object","properties":{"baseVersionStamp":{"type":"string","nullable":false}},"required":["baseVersionStamp"]},"CreateProjectFileDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"fileId":{"type":"string","nullable":false}},"required":["projectId","fileId"]},"TextProjectFileType":{"type":"string","enum":["note","storyline"]},"CreateTextSourceDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"title":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"projectFileType":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/TextProjectFileType"}]},"content":{"type":"string","nullable":true}},"required":["projectId"]},"UpdateProjectFileDto":{"type":"object","properties":{"title":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"baseVersionStamp":{"type":"string","nullable":false}}},"ProjectTaskStatus":{"type":"string","enum":["open","in_progress","waiting"]},"ProjectTaskProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"ProjectTaskDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"projectId":{"type":"string","nullable":false},"project":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectTaskProjectDto"}]},"title":{"type":"string","nullable":false},"note":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true,"format":"date"},"sortIndex":{"type":"number","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectTaskStatus"}]},"completedAt":{"format":"date-time","type":"string","nullable":true},"completedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"assigneeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"assignees":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UserPublicDto"}},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","projectId","project","title","note","dueDate","sortIndex","status","completedAt","completedBy","createdBy","assigneeIds","assignees","createdAt","updatedAt"]},"ProjectTaskListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectTaskDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateProjectTaskDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"title":{"type":"string","nullable":false},"assigneeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true},"dueDate":{"type":"string","nullable":true,"format":"date"},"sortIndex":{"type":"number","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectTaskStatus"}]}},"required":["projectId","title"]},"UpdateProjectTaskDto":{"type":"object","properties":{"title":{"type":"string","nullable":false},"dueDate":{"type":"string","nullable":true,"format":"date"},"sortIndex":{"type":"number","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectTaskStatus"}]},"assigneeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true},"completed":{"type":"boolean","nullable":false}}},"FigureStatus":{"type":"string","enum":["generating","ready"]},"FigureFormat":{"type":"string","enum":["svg","mermaid","chartjs"]},"FigureDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"documentId":{"type":"string","nullable":false},"chainId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/FigureStatus"}]},"description":{"type":"string","nullable":false},"format":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/FigureFormat"}]},"svgUrl":{"type":"string","nullable":true},"pngUrl":{"type":"string","nullable":true},"supersededAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","organizationId","documentId","chainId","versionNumber","status","description","format","svgUrl","pngUrl","supersededAt","createdAt"]},"FigureDetailDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"documentId":{"type":"string","nullable":false},"chainId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/FigureStatus"}]},"description":{"type":"string","nullable":false},"format":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/FigureFormat"}]},"svgUrl":{"type":"string","nullable":true},"pngUrl":{"type":"string","nullable":true},"supersededAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"previousReady":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/FigureDto"}]}},"required":["id","organizationId","documentId","chainId","versionNumber","status","description","format","svgUrl","pngUrl","supersededAt","createdAt","previousReady"]},"CreateFigureDto":{"type":"object","properties":{"documentId":{"type":"string","nullable":false},"description":{"type":"string","nullable":false}},"required":["documentId","description"]},"CreateFigureVersionDto":{"type":"object","properties":{"description":{"type":"string","nullable":false}},"required":["description"]},"ReprocessFilesResponseDto":{"type":"object","properties":{"enqueued":{"type":"string","nullable":false}},"required":["enqueued"]},"CreateFileDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false}},"required":["organizationId"]},"FileRawExcerptDto":{"type":"object","properties":{"text":{"type":"string","nullable":false},"totalChunks":{"type":"number","nullable":false},"omittedChunks":{"type":"number","nullable":false}},"required":["text","totalChunks","omittedChunks"]},"FileTextDto":{"type":"object","properties":{"text":{"type":"string","nullable":false},"charStart":{"type":"number","nullable":false},"charEnd":{"type":"number","nullable":false},"totalChars":{"type":"number","nullable":false}},"required":["text","charStart","charEnd","totalChars"]},"UpdateFileDto":{"type":"object","properties":{"originalName":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"originalUrl":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}}},"GrantProviderDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"slug":{"type":"string","nullable":false},"website":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"required":["id","createdAt","name","shortName","slug","website","countryCode","description"]},"GrantProviderListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantProviderDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateGrantProviderDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"slug":{"type":"string","nullable":false},"website":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}}},"UpdateGrantProviderDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"slug":{"type":"string","nullable":false},"website":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}}},"ThemeDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"parentThemeId":{"type":"string","nullable":true},"synonyms":{"nullable":true,"type":"array","items":{"type":"string"}},"detailTags":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","createdAt","name","slug","description","parentThemeId","synonyms","detailTags"]},"ThemeListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ThemeDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateThemeDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"parentThemeId":{"type":"string","nullable":true},"synonyms":{"nullable":true,"type":"array","items":{"type":"string"}},"detailTags":{"nullable":true,"type":"array","items":{"type":"string"}}}},"UpdateThemeDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"parentThemeId":{"type":"string","nullable":true},"synonyms":{"nullable":true,"type":"array","items":{"type":"string"}},"detailTags":{"nullable":true,"type":"array","items":{"type":"string"}}}},"ApiKeyRefDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":true},"hint":{"type":"string","nullable":false},"organization":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"deletedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","name","hint","organization","deletedAt"]},"VersionAttributionDto":{"type":"object","properties":{"source":{"type":"string","nullable":false},"userId":{"type":"string","nullable":false},"displayName":{"type":"string","nullable":false},"proposalId":{"type":"string","nullable":false},"proposalRevision":{"type":"number","nullable":false}},"required":["source","userId","displayName","proposalId","proposalRevision"]},"GrantStatus":{"type":"string","enum":["open","closed","upcoming","announced","permanent","suspended","budget-exhausted","permanently-stopped"]},"NextRelevantDateKind":{"type":"string","enum":["opens","closes"]},"GrantNextRelevantDateDto":{"type":"object","properties":{"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/NextRelevantDateKind"}]},"iso":{"type":"string","nullable":false}},"required":["kind","iso"]},"TargetGroup":{"type":"string","enum":["sme","large-enterprise","research-institute","government","sole-trader","foundation","association","consortium","homeowner","individual"]},"CompanySize":{"type":"string","enum":["micro","small","medium","large"]},"ActivityCodeSystem":{"type":"string","enum":["sbi-2008","sbi-2025","nace-2","nace-2.1","isic-4"]},"SectorCodeLevel":{"type":"string","enum":["section","division","group","class","subclass"]},"GrantLegalActivityCodeDto":{"type":"object","properties":{"system":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ActivityCodeSystem"}]},"code":{"type":"string","nullable":false},"level":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SectorCodeLevel"}]}},"required":["system","code"]},"ProjectPhase":{"type":"string","enum":["feasibility","research","development","demonstration","commercialization","investment"]},"GrantCallWindowDto":{"type":"object","properties":{"name":{"type":"string","nullable":true},"opens":{"type":"string","nullable":true},"closes":{"type":"string","nullable":true},"opensAt":{"format":"date-time","type":"string","nullable":true},"closesAt":{"format":"date-time","type":"string","nullable":true},"resultDate":{"type":"string","nullable":true}}},"Cyclicity":{"type":"string","enum":["one-time","annual","quarterly","rolling","on-demand"]},"AllocationMethod":{"type":"string","enum":["tender","fcfs"]},"GrantBudgetStatus":{"type":"string","enum":["open","budget-exhausted","closed"]},"GrantBudgetDto":{"type":"object","properties":{"label":{"type":"string","nullable":false},"regions":{"nullable":true,"type":"array","items":{"type":"string"}},"amountCents":{"type":"string","nullable":false},"allocation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"authority":{"type":"string","nullable":true},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GrantBudgetStatus"}]},"statusSourceUrl":{"type":"string","nullable":true},"statusCheckedAt":{"type":"string","nullable":true,"format":"date"},"allocatedCents":{"type":"string","nullable":true},"allocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"allocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"allocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"allocatedNote":{"type":"string","nullable":true},"remainingCents":{"type":"string","nullable":true},"requestedCents":{"type":"string","nullable":true},"applicationCount":{"type":"number","nullable":true},"oversubscriptionRatio":{"type":"number","nullable":true},"legalReference":{"type":"string","nullable":true},"note":{"type":"string","nullable":true}},"required":["label","amountCents","remainingCents","oversubscriptionRatio"]},"GrantFundingUpliftDto":{"type":"object","properties":{"percentagePoints":{"type":"number","nullable":false},"condition":{"type":"string","nullable":false},"provision":{"type":"string","nullable":true}},"required":["percentagePoints","condition"]},"GrantFundingRateDto":{"type":"object","properties":{"activity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProjectPhase"}]},"label":{"type":"string","nullable":true},"provision":{"type":"string","nullable":true},"basePercentage":{"type":"number","nullable":false},"maxPercentage":{"type":"number","nullable":false},"uplifts":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantFundingUpliftDto"}},"note":{"type":"string","nullable":true}},"required":["basePercentage","maxPercentage"]},"GrantTrackDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"provision":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"minAmountCents":{"type":"string","nullable":true},"maxAmountCents":{"type":"string","nullable":true},"minProjectAmountCents":{"type":"string","nullable":true},"maxProjectAmountCents":{"type":"string","nullable":true},"amountNote":{"type":"string","nullable":true},"fundingRates":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantFundingRateDto"}},"fundingNote":{"type":"string","nullable":true}},"required":["name"]},"CostType":{"type":"string","enum":["personnel","material","subcontracting","equipment","land","buildings","overhead","travel","other"]},"IncentiveType":{"type":"string","enum":["grant","loan","guarantee","tax-credit","investment"]},"KnowledgeBaseVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"knowledgeBaseId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"format":"date-time","type":"string","nullable":true},"description":{"type":"string","nullable":true},"sourceFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"createdByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"publishedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"publishedByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"publishedByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"sourceFiles":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FileItemDto"}}},"required":["id","createdAt","knowledgeBaseId","versionNumber","versionDescription","isPublished","publishedAt","description","sourceFileIds","createdBy","createdByApiKey","createdByAttribution","publishedBy","publishedByApiKey","publishedByAttribution","sourceFiles"]},"GrantRequiredAttachmentDto":{"type":"object","properties":{"label":{"type":"string","nullable":false},"fileRef":{"type":"string","nullable":true}},"required":["label"]},"GrantGoalPillarDto":{"type":"object","properties":{"title":{"type":"string","nullable":false},"body":{"type":"string","nullable":false}},"required":["title","body"]},"GrantVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"createdByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"publishedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"publishedByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"publishedByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"grantId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"format":"date-time","type":"string","nullable":true},"tagline":{"type":"string","nullable":true},"shortDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"effectiveStatus":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"nextRelevantDate":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantNextRelevantDateDto"}]},"regions":{"nullable":false,"type":"array","items":{"type":"string"}},"targetGroups":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TargetGroup"}},"eligibleCompanySizes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CompanySize"}},"themes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ThemeDto"}},"excludedBusinessTypes":{"nullable":true,"type":"array","items":{"type":"string"}},"legalActivityCodes":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantLegalActivityCodeDto"}},"minTRL":{"type":"number","nullable":true},"maxTRL":{"type":"number","nullable":true},"projectPhases":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ProjectPhase"}},"minConsortiumPartners":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"decisionPeriodNote":{"type":"string","nullable":true},"callWindows":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantCallWindowDto"}},"cyclicity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Cyclicity"}]},"allocationMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"nextDeadlineDate":{"type":"string","nullable":true},"currency":{"type":"string","nullable":false},"fundSizeCents":{"type":"string","nullable":true},"fundSizeNote":{"type":"string","nullable":true},"fundSizeAllocatedCents":{"type":"string","nullable":true},"fundSizeAllocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"fundSizeAllocatedNote":{"type":"string","nullable":true},"fundSizeRemainingCents":{"type":"string","nullable":true},"fundSizeRequestedCents":{"type":"string","nullable":true},"fundSizeApplicationCount":{"type":"number","nullable":true},"fundSizeOversubscriptionRatio":{"type":"number","nullable":true},"budgets":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantBudgetDto"}},"minAmountCents":{"type":"string","nullable":true},"minAmountNote":{"type":"string","nullable":true},"maxAmountCents":{"type":"string","nullable":true},"maxAmountNote":{"type":"string","nullable":true},"minProjectAmountCents":{"type":"string","nullable":true},"maxProjectAmountCents":{"type":"string","nullable":true},"fundingPercentage":{"type":"number","nullable":true},"tracks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantTrackDto"}},"minCoFinancingPercentage":{"type":"number","nullable":true},"cumulationRules":{"type":"string","nullable":true},"eligibleCostTypes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CostType"}},"incentiveType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/IncentiveType"}]},"knowledgeBaseVersionId":{"type":"string","nullable":false},"knowledgeBaseVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}]},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"templateFiles":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/FileItemDto"}},"seoTitle":{"type":"string","nullable":true},"seoMetaDescription":{"type":"string","nullable":true},"seoKeywords":{"nullable":true,"type":"array","items":{"type":"string"}},"locale":{"type":"string","nullable":true},"requiresPreRegistration":{"type":"boolean","nullable":true},"requiredAttachments":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantRequiredAttachmentDto"}},"processNote":{"type":"string","nullable":true},"eligibilityConditions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"costTypeNotes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"purpose":{"type":"string","nullable":true},"goalPillars":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantGoalPillarDto"}},"website":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"lastVerifiedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","createdAt","createdBy","createdByApiKey","createdByAttribution","publishedBy","publishedByApiKey","publishedByAttribution","grantId","versionNumber","versionDescription","isPublished","publishedAt","tagline","shortDescription","description","status","effectiveStatus","nextRelevantDate","regions","targetGroups","eligibleCompanySizes","themes","excludedBusinessTypes","legalActivityCodes","minTRL","maxTRL","projectPhases","minConsortiumPartners","startDate","endDate","decisionPeriodNote","callWindows","cyclicity","allocationMethod","nextDeadlineDate","currency","fundSizeCents","fundSizeNote","fundSizeAllocatedCents","fundSizeAllocatedCheckedAt","fundSizeAllocatedPublishedAt","fundSizeAllocatedSourceUrl","fundSizeAllocatedNote","fundSizeRemainingCents","fundSizeRequestedCents","fundSizeApplicationCount","fundSizeOversubscriptionRatio","budgets","minAmountCents","minAmountNote","maxAmountCents","maxAmountNote","minProjectAmountCents","maxProjectAmountCents","fundingPercentage","tracks","minCoFinancingPercentage","cumulationRules","eligibleCostTypes","incentiveType","knowledgeBaseVersionId","knowledgeBaseVersion","templateFileIds","templateFiles","seoTitle","seoMetaDescription","seoKeywords","locale","requiresPreRegistration","requiredAttachments","processNote","eligibilityConditions","costTypeNotes","purpose","goalPillars","website","contactEmail","contactPhone","sourceUrl","lastVerifiedAt"]},"GrantVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantVersionDto"}}},"required":["items"]},"GrantBudgetInputDto":{"type":"object","properties":{"label":{"type":"string","nullable":false},"regions":{"nullable":true,"type":"array","items":{"type":"string"}},"amountCents":{"type":"string","nullable":false},"allocation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"authority":{"type":"string","nullable":true},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GrantBudgetStatus"}]},"statusSourceUrl":{"type":"string","nullable":true},"statusCheckedAt":{"type":"string","nullable":true,"format":"date"},"allocatedCents":{"type":"string","nullable":true},"allocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"allocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"allocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"allocatedNote":{"type":"string","nullable":true},"requestedCents":{"type":"string","nullable":true},"applicationCount":{"type":"number","nullable":true},"legalReference":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"remainingCents":{"type":"string","nullable":true}},"required":["label","amountCents"]},"ForkGrantVersionDto":{"type":"object","properties":{"tagline":{"type":"string","nullable":true},"shortDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"regions":{"nullable":false,"type":"array","items":{"type":"string"}},"targetGroups":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TargetGroup"}},"eligibleCompanySizes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CompanySize"}},"excludedBusinessTypes":{"nullable":true,"type":"array","items":{"type":"string"}},"legalActivityCodes":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantLegalActivityCodeDto"}},"minTRL":{"type":"number","nullable":true},"maxTRL":{"type":"number","nullable":true},"projectPhases":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ProjectPhase"}},"minConsortiumPartners":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"decisionPeriodNote":{"type":"string","nullable":true},"callWindows":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantCallWindowDto"}},"cyclicity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Cyclicity"}]},"allocationMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"currency":{"type":"string","nullable":false},"fundSizeCents":{"type":"string","nullable":true},"fundSizeNote":{"type":"string","nullable":true},"fundSizeAllocatedCents":{"type":"string","nullable":true},"fundSizeAllocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"fundSizeAllocatedNote":{"type":"string","nullable":true},"fundSizeRemainingCents":{"type":"string","nullable":true},"fundSizeRequestedCents":{"type":"string","nullable":true},"fundSizeApplicationCount":{"type":"number","nullable":true},"minAmountCents":{"type":"string","nullable":true},"minAmountNote":{"type":"string","nullable":true},"maxAmountCents":{"type":"string","nullable":true},"maxAmountNote":{"type":"string","nullable":true},"minProjectAmountCents":{"type":"string","nullable":true},"maxProjectAmountCents":{"type":"string","nullable":true},"fundingPercentage":{"type":"number","nullable":true},"tracks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantTrackDto"}},"minCoFinancingPercentage":{"type":"number","nullable":true},"cumulationRules":{"type":"string","nullable":true},"eligibleCostTypes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CostType"}},"incentiveType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/IncentiveType"}]},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"seoTitle":{"type":"string","nullable":true},"seoMetaDescription":{"type":"string","nullable":true},"seoKeywords":{"nullable":true,"type":"array","items":{"type":"string"}},"locale":{"type":"string","nullable":true},"requiresPreRegistration":{"type":"boolean","nullable":true},"requiredAttachments":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantRequiredAttachmentDto"}},"processNote":{"type":"string","nullable":true},"eligibilityConditions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"costTypeNotes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"purpose":{"type":"string","nullable":true},"goalPillars":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantGoalPillarDto"}},"website":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"lastVerifiedAt":{"format":"date-time","type":"string","nullable":true},"budgets":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantBudgetInputDto"}},"versionDescription":{"type":"string","nullable":false},"themeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":false}},"required":["versionDescription"]},"GrantValidationSummaryDto":{"type":"object","properties":{"pass":{"type":"number","nullable":false},"fail":{"type":"number","nullable":false},"warn":{"type":"number","nullable":false},"needsAiReview":{"type":"number","nullable":false}},"required":["pass","fail","warn","needsAiReview"]},"GrantValidationCheckStatus":{"type":"string","enum":["pass","fail","warn","needs-ai-review"]},"GrantValidationCheckDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"step":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantValidationCheckStatus"}]},"message":{"type":"string","nullable":false},"data":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"}},"required":["id","step","status","message"]},"GrantValidationResultDto":{"type":"object","properties":{"ok":{"type":"boolean","nullable":false},"summary":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantValidationSummaryDto"}]},"results":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantValidationCheckDto"}}},"required":["ok","summary","results"]},"GrantItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedAt":{"format":"date-time","type":"string","nullable":true},"archiveReason":{"type":"string","nullable":true},"archivedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"archivedByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"slug":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"providerId":{"type":"string","nullable":false},"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantProviderDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantVersionDto"}]}},"required":["id","createdAt","createdBy","archivedAt","archiveReason","archivedBy","archivedByApiKey","archivedByAttribution","slug","name","shortName","providerId","provider","currentVersion"]},"GrantFacetsDto":{"type":"object","properties":{"theme":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"region":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"status":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"type":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"target":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}},"projectPhase":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FacetOptionDto"}}},"required":["theme","region","status","type","target","projectPhase"]},"GrantDeadlineBucketDto":{"type":"object","properties":{"weekStart":{"type":"string","nullable":false},"count":{"type":"number","nullable":false}},"required":["weekStart","count"]},"GrantListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantItemDto"}},"count":{"type":"number","nullable":false},"facets":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantFacetsDto"}]},"deadlineHistogram":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantDeadlineBucketDto"}}},"required":["items","count","facets","deadlineHistogram"]},"GrantEnumsDto":{"type":"object","properties":{"targetGroups":{"nullable":false,"type":"array","items":{"type":"string"}},"statuses":{"nullable":false,"type":"array","items":{"type":"string"}},"relationKinds":{"nullable":false,"type":"array","items":{"type":"string"}},"companySizes":{"nullable":false,"type":"array","items":{"type":"string"}},"incentiveTypes":{"nullable":false,"type":"array","items":{"type":"string"}},"projectPhases":{"nullable":false,"type":"array","items":{"type":"string"}},"costTypes":{"nullable":false,"type":"array","items":{"type":"string"}},"cyclicities":{"nullable":false,"type":"array","items":{"type":"string"}},"allocationMethods":{"nullable":false,"type":"array","items":{"type":"string"}},"sectorCodeLevels":{"nullable":false,"type":"array","items":{"type":"string"}},"activityCodeSystems":{"nullable":false,"type":"array","items":{"type":"string"}},"budgetStatuses":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["targetGroups","statuses","relationKinds","companySizes","incentiveTypes","projectPhases","costTypes","cyclicities","allocationMethods","sectorCodeLevels","activityCodeSystems","budgetStatuses"]},"GrantUsageDto":{"type":"object","properties":{"grantId":{"type":"string","nullable":false},"documentTypeCount":{"type":"number","nullable":false},"projectCount":{"type":"number","nullable":false}},"required":["grantId","documentTypeCount","projectCount"]},"GrantUsageListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantUsageDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"GrantRelationKind":{"type":"string","enum":["related","combines-with","alternative","successor-of"]},"GrantRefDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false}},"required":["id","name","slug"]},"GrantToRelationDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantRelationKind"}]},"notes":{"type":"string","nullable":true},"toGrant":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantRefDto"}]}},"required":["id","kind","notes","toGrant"]},"GrantFromRelationDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantRelationKind"}]},"notes":{"type":"string","nullable":true},"fromGrant":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantRefDto"}]}},"required":["id","kind","notes","fromGrant"]},"PublicGrantVersionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"grantId":{"type":"string","nullable":false},"versionNumber":{"type":"number","nullable":false},"versionDescription":{"type":"string","nullable":true},"isPublished":{"type":"boolean","nullable":false},"publishedAt":{"format":"date-time","type":"string","nullable":true},"tagline":{"type":"string","nullable":true},"shortDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"effectiveStatus":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"nextRelevantDate":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantNextRelevantDateDto"}]},"regions":{"nullable":false,"type":"array","items":{"type":"string"}},"targetGroups":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TargetGroup"}},"eligibleCompanySizes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CompanySize"}},"themes":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ThemeDto"}},"excludedBusinessTypes":{"nullable":true,"type":"array","items":{"type":"string"}},"legalActivityCodes":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantLegalActivityCodeDto"}},"minTRL":{"type":"number","nullable":true},"maxTRL":{"type":"number","nullable":true},"projectPhases":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ProjectPhase"}},"minConsortiumPartners":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"decisionPeriodNote":{"type":"string","nullable":true},"callWindows":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantCallWindowDto"}},"cyclicity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Cyclicity"}]},"allocationMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"nextDeadlineDate":{"type":"string","nullable":true},"currency":{"type":"string","nullable":false},"fundSizeCents":{"type":"string","nullable":true},"fundSizeNote":{"type":"string","nullable":true},"fundSizeAllocatedCents":{"type":"string","nullable":true},"fundSizeAllocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"fundSizeAllocatedNote":{"type":"string","nullable":true},"fundSizeRemainingCents":{"type":"string","nullable":true},"fundSizeRequestedCents":{"type":"string","nullable":true},"fundSizeApplicationCount":{"type":"number","nullable":true},"fundSizeOversubscriptionRatio":{"type":"number","nullable":true},"budgets":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantBudgetDto"}},"minAmountCents":{"type":"string","nullable":true},"minAmountNote":{"type":"string","nullable":true},"maxAmountCents":{"type":"string","nullable":true},"maxAmountNote":{"type":"string","nullable":true},"minProjectAmountCents":{"type":"string","nullable":true},"maxProjectAmountCents":{"type":"string","nullable":true},"fundingPercentage":{"type":"number","nullable":true},"tracks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantTrackDto"}},"minCoFinancingPercentage":{"type":"number","nullable":true},"cumulationRules":{"type":"string","nullable":true},"eligibleCostTypes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CostType"}},"incentiveType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/IncentiveType"}]},"knowledgeBaseVersionId":{"type":"string","nullable":false},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"templateFiles":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/FileItemDto"}},"seoTitle":{"type":"string","nullable":true},"seoMetaDescription":{"type":"string","nullable":true},"seoKeywords":{"nullable":true,"type":"array","items":{"type":"string"}},"locale":{"type":"string","nullable":true},"requiresPreRegistration":{"type":"boolean","nullable":true},"requiredAttachments":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantRequiredAttachmentDto"}},"processNote":{"type":"string","nullable":true},"eligibilityConditions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"costTypeNotes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"purpose":{"type":"string","nullable":true},"goalPillars":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantGoalPillarDto"}},"website":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"lastVerifiedAt":{"format":"date-time","type":"string","nullable":true},"knowledgeBaseVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicKnowledgeBaseVersionDto"}]}},"required":["id","createdAt","grantId","versionNumber","versionDescription","isPublished","publishedAt","tagline","shortDescription","description","status","effectiveStatus","nextRelevantDate","regions","targetGroups","eligibleCompanySizes","themes","excludedBusinessTypes","legalActivityCodes","minTRL","maxTRL","projectPhases","minConsortiumPartners","startDate","endDate","decisionPeriodNote","callWindows","cyclicity","allocationMethod","nextDeadlineDate","currency","fundSizeCents","fundSizeNote","fundSizeAllocatedCents","fundSizeAllocatedCheckedAt","fundSizeAllocatedPublishedAt","fundSizeAllocatedSourceUrl","fundSizeAllocatedNote","fundSizeRemainingCents","fundSizeRequestedCents","fundSizeApplicationCount","fundSizeOversubscriptionRatio","budgets","minAmountCents","minAmountNote","maxAmountCents","maxAmountNote","minProjectAmountCents","maxProjectAmountCents","fundingPercentage","tracks","minCoFinancingPercentage","cumulationRules","eligibleCostTypes","incentiveType","knowledgeBaseVersionId","templateFileIds","templateFiles","seoTitle","seoMetaDescription","seoKeywords","locale","requiresPreRegistration","requiredAttachments","processNote","eligibilityConditions","costTypeNotes","purpose","goalPillars","website","contactEmail","contactPhone","sourceUrl","lastVerifiedAt","knowledgeBaseVersion"]},"PublicGrantDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"archivedAt":{"format":"date-time","type":"string","nullable":true},"slug":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"providerId":{"type":"string","nullable":false},"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantProviderDto"}]},"parentGrantId":{"type":"string","nullable":true},"toRelations":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantToRelationDto"}},"fromRelations":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantFromRelationDto"}},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PublicGrantVersionDto"}]}},"required":["id","createdAt","archivedAt","slug","name","shortName","providerId","provider","parentGrantId","toRelations","fromRelations","currentVersion"]},"CatalogueArchiveAction":{"type":"string","enum":["archived","unarchived"]},"CatalogueArchiveEventDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"action":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CatalogueArchiveAction"}]},"reason":{"type":"string","nullable":true},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"createdByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]}},"required":["id","createdAt","action","reason","createdBy","createdByApiKey","createdByAttribution"]},"CatalogueArchiveEventListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/CatalogueArchiveEventDto"}}},"required":["items"]},"GrantDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedAt":{"format":"date-time","type":"string","nullable":true},"archiveReason":{"type":"string","nullable":true},"archivedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"archivedByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"slug":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"providerId":{"type":"string","nullable":false},"provider":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantProviderDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantVersionDto"}]},"parentGrantId":{"type":"string","nullable":true},"toRelations":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantToRelationDto"}},"fromRelations":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantFromRelationDto"}}},"required":["id","createdAt","createdBy","archivedAt","archiveReason","archivedBy","archivedByApiKey","archivedByAttribution","slug","name","shortName","providerId","provider","currentVersion","parentGrantId","toRelations","fromRelations"]},"CreateGrantDto":{"type":"object","properties":{"tagline":{"type":"string","nullable":true},"shortDescription":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantStatus"}]},"regions":{"nullable":false,"type":"array","items":{"type":"string"}},"targetGroups":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/TargetGroup"}},"eligibleCompanySizes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CompanySize"}},"excludedBusinessTypes":{"nullable":true,"type":"array","items":{"type":"string"}},"legalActivityCodes":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantLegalActivityCodeDto"}},"minTRL":{"type":"number","nullable":true},"maxTRL":{"type":"number","nullable":true},"projectPhases":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ProjectPhase"}},"minConsortiumPartners":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"decisionPeriodNote":{"type":"string","nullable":true},"callWindows":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantCallWindowDto"}},"cyclicity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Cyclicity"}]},"allocationMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AllocationMethod"}]},"currency":{"type":"string","nullable":false},"fundSizeCents":{"type":"string","nullable":true},"fundSizeNote":{"type":"string","nullable":true},"fundSizeAllocatedCents":{"type":"string","nullable":true},"fundSizeAllocatedCheckedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedPublishedAt":{"type":"string","nullable":true,"format":"date"},"fundSizeAllocatedSourceUrl":{"type":"string","nullable":true,"format":"uri"},"fundSizeAllocatedNote":{"type":"string","nullable":true},"fundSizeRemainingCents":{"type":"string","nullable":true},"fundSizeRequestedCents":{"type":"string","nullable":true},"fundSizeApplicationCount":{"type":"number","nullable":true},"minAmountCents":{"type":"string","nullable":true},"minAmountNote":{"type":"string","nullable":true},"maxAmountCents":{"type":"string","nullable":true},"maxAmountNote":{"type":"string","nullable":true},"minProjectAmountCents":{"type":"string","nullable":true},"maxProjectAmountCents":{"type":"string","nullable":true},"fundingPercentage":{"type":"number","nullable":true},"tracks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantTrackDto"}},"minCoFinancingPercentage":{"type":"number","nullable":true},"cumulationRules":{"type":"string","nullable":true},"eligibleCostTypes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CostType"}},"incentiveType":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/IncentiveType"}]},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"seoTitle":{"type":"string","nullable":true},"seoMetaDescription":{"type":"string","nullable":true},"seoKeywords":{"nullable":true,"type":"array","items":{"type":"string"}},"locale":{"type":"string","nullable":true},"requiresPreRegistration":{"type":"boolean","nullable":true},"requiredAttachments":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantRequiredAttachmentDto"}},"processNote":{"type":"string","nullable":true},"eligibilityConditions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"costTypeNotes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"purpose":{"type":"string","nullable":true},"goalPillars":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantGoalPillarDto"}},"website":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"lastVerifiedAt":{"format":"date-time","type":"string","nullable":true},"budgets":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/GrantBudgetInputDto"}},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"slug":{"type":"string","nullable":false},"parentGrantId":{"type":"string","nullable":true},"providerId":{"type":"string","nullable":false},"knowledgeBaseVersionId":{"type":"string","nullable":false},"themeIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["name","providerId","knowledgeBaseVersionId"]},"GrantValidationPayloadOperation":{"type":"string","enum":["create","fork"]},"GrantValidationPayloadDto":{"type":"object","properties":{"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantValidationPayloadOperation"}]},"baseVersionId":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"slug":{"type":"string","nullable":false},"providerId":{"type":"string","nullable":true},"providerSlug":{"type":"string","nullable":true},"parentGrantId":{"type":"string","nullable":true},"knowledgeBaseVersionId":{"type":"string","nullable":true},"versionDescription":{"type":"string","nullable":false},"themeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"themeSlugs":{"nullable":false,"type":"array","items":{"type":"string"}},"shortDescription":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"description":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"status":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"regions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"targetGroups":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"eligibleCompanySizes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minTRL":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"maxTRL":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"projectPhases":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"startDate":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"endDate":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"callWindows":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"cyclicity":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeAllocatedCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeAllocatedCheckedAt":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeAllocatedPublishedAt":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeAllocatedSourceUrl":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeRemainingCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeRequestedCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeApplicationCount":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"budgets":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minAmountCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"maxAmountCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minProjectAmountCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"maxProjectAmountCents":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundingPercentage":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"tracks":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minCoFinancingPercentage":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"eligibleCostTypes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"incentiveType":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"seoTitle":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"seoMetaDescription":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"goalPillars":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"eligibilityConditions":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"costTypeNotes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"relations":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"lastVerifiedAt":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"tagline":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"excludedBusinessTypes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"legalActivityCodes":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minConsortiumPartners":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"decisionPeriodNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"allocationMethod":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"currency":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"fundSizeAllocatedNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"minAmountNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"maxAmountNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"cumulationRules":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"templateFileIds":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"seoKeywords":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"locale":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"requiresPreRegistration":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"requiredAttachments":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"processNote":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"purpose":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"website":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"contactEmail":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"contactPhone":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"},"sourceUrl":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"}}},"ArchiveCatalogueItemDto":{"type":"object","properties":{"reason":{"type":"string","nullable":false}},"required":["reason"]},"UnarchiveCatalogueItemDto":{"type":"object","properties":{"reason":{"type":"string","nullable":false}}},"UpdateGrantDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"shortName":{"type":"string","nullable":true},"parentGrantId":{"type":"string","nullable":true},"providerId":{"type":"string","nullable":false},"slug":{"type":"string","nullable":false}}},"AddGrantRelationDto":{"type":"object","properties":{"toGrantId":{"type":"string","nullable":false},"kind":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/GrantRelationKind"}]},"notes":{"type":"string","nullable":true}},"required":["toGrantId","kind"]},"KnowledgeBaseVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}}},"required":["items"]},"ForkKnowledgeBaseVersionDto":{"type":"object","properties":{"versionDescription":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"sourceFileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["versionDescription"]},"KnowledgeBaseValidationSummaryDto":{"type":"object","properties":{"pass":{"type":"number","nullable":false},"fail":{"type":"number","nullable":false},"warn":{"type":"number","nullable":false},"needsAiReview":{"type":"number","nullable":false}},"required":["pass","fail","warn","needsAiReview"]},"KnowledgeBaseValidationCheckStatus":{"type":"string","enum":["pass","fail","warn","needs-ai-review"]},"KnowledgeBaseValidationCheckDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"step":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/KnowledgeBaseValidationCheckStatus"}]},"message":{"type":"string","nullable":false},"data":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"type":"array","items":{}},{"type":"null"}],"description":"Any valid JSON value (string, number, boolean, object, array, or null)"}},"required":["id","step","status","message"]},"KnowledgeBaseValidationResultDto":{"type":"object","properties":{"ok":{"type":"boolean","nullable":false},"summary":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/KnowledgeBaseValidationSummaryDto"}]},"results":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseValidationCheckDto"}}},"required":["ok","summary","results"]},"KnowledgeBaseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedAt":{"format":"date-time","type":"string","nullable":true},"archiveReason":{"type":"string","nullable":true},"archivedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"archivedByApiKey":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ApiKeyRefDto"}]},"archivedByAttribution":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/VersionAttributionDto"}]},"name":{"type":"string","nullable":false},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}]}},"required":["id","createdAt","createdBy","archivedAt","archiveReason","archivedBy","archivedByApiKey","archivedByAttribution","name","currentVersion"]},"KnowledgeBaseListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"KnowledgeBaseSearchHitDto":{"type":"object","properties":{"knowledgeBaseId":{"type":"string","nullable":false},"knowledgeBaseVersionId":{"type":"string","nullable":false},"fileId":{"type":"string","nullable":false},"filename":{"type":"string","nullable":true},"sourceUrl":{"type":"string","nullable":true},"charStart":{"type":"number","nullable":false},"charEnd":{"type":"number","nullable":false},"headingPath":{"nullable":false,"type":"array","items":{"type":"string"}},"content":{"type":"string","nullable":false}},"required":["knowledgeBaseId","knowledgeBaseVersionId","fileId","filename","sourceUrl","charStart","charEnd","headingPath","content"]},"KnowledgeBaseSearchResultsDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseSearchHitDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateKnowledgeBaseDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"sourceFileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["name"]},"KnowledgeBaseValidationPayloadOperation":{"type":"string","enum":["create","fork"]},"KnowledgeBaseValidationPayloadDto":{"type":"object","properties":{"operation":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/KnowledgeBaseValidationPayloadOperation"}]},"name":{"type":"string","nullable":false},"versionDescription":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"sourceFileIds":{"nullable":false,"type":"array","items":{"type":"string"}}}},"UpdateKnowledgeBaseDto":{"type":"object","properties":{"name":{"type":"string","nullable":false}}},"MemoryLevel":{"type":"string","enum":["organization","documentType","section","member","client"]},"MemoryDocumentTypeDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"MemoryMemberDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"user":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]}},"required":["id","user"]},"MemoryClientDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false}},"required":["id","name"]},"MemoryItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"content":{"type":"string","nullable":false},"organization":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/PublicOrganizationDto"}]},"documentType":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryDocumentTypeDto"}]},"sectionKey":{"type":"string","nullable":true},"sectionName":{"type":"string","nullable":true},"member":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryMemberDto"}]},"client":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryClientDto"}]},"level":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/MemoryLevel"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","content","organization","documentType","sectionKey","sectionName","member","client","level","createdAt","updatedAt"]},"MemoryListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/MemoryItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"UpdateMemoryDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false},"documentTypeId":{"type":"string","nullable":false},"sectionKey":{"type":"string","nullable":false},"memberId":{"type":"string","nullable":false},"clientId":{"type":"string","nullable":false},"content":{"type":"string","nullable":false}},"required":["organizationId","content"]},"UpdateMemoryResultDto":{"type":"object","properties":{"memory":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryItemDto"}]}},"required":["memory"]},"MemoryChangeSort":{"type":"string","enum":["createdAt","-createdAt"]},"MemoryChangeMemoryDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"level":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/MemoryLevel"}]},"sectionName":{"type":"string","nullable":true},"documentType":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryDocumentTypeDto"}]},"member":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryMemberDto"}]},"client":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryClientDto"}]}},"required":["id","level","sectionName","documentType","member","client"]},"MemoryChangeAgentSessionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"agentName":{"type":"string","nullable":false},"title":{"type":"string","nullable":true}},"required":["id","agentName","title"]},"MemoryChangeListItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"memory":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/MemoryChangeMemoryDto"}]},"description":{"type":"string","nullable":false},"isDirectEdit":{"type":"boolean","nullable":false},"baseContent":{"type":"string","nullable":false},"appliedContent":{"type":"string","nullable":false},"removed":{"type":"string","nullable":true},"added":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"agentSession":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/MemoryChangeAgentSessionDto"}]},"revertedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"revertedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","memory","description","isDirectEdit","baseContent","appliedContent","removed","added","createdBy","agentSession","revertedBy","revertedAt","createdAt","updatedAt"]},"MemoryChangeListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/MemoryChangeListItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateCommentDto":{"type":"object","properties":{"contentMarkdown":{"type":"string","nullable":false},"threadId":{"type":"string","nullable":false}},"required":["contentMarkdown","threadId"]},"CommentItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"contentMarkdown":{"type":"string","nullable":false},"contentHtml":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","contentMarkdown","contentHtml","createdBy","createdAt","updatedAt"]},"UpdateCommentDto":{"type":"object","properties":{"contentMarkdown":{"type":"string","nullable":false}}},"SendCommentThreadToAgentDto":{"type":"object","properties":{"agentSessionId":{"type":"string","nullable":false}}},"CommentThreadDocumentSectionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"key":{"type":"string","nullable":false},"documentId":{"type":"string","nullable":false},"order":{"type":"number","nullable":false}},"required":["id","name","key","documentId","order"]},"CommentAnchorDto":{"type":"object","properties":{"text":{"type":"string","nullable":false},"prefix":{"type":"string","nullable":false},"suffix":{"type":"string","nullable":false},"offset":{"type":"number","nullable":false}},"required":["text","prefix","suffix","offset"]},"CommentThreadItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"documentSection":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CommentThreadDocumentSectionDto"}]},"comments":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/CommentItemDto"}},"anchor":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/CommentAnchorDto"}]},"createdAt":{"type":"string","nullable":false},"resolvedAt":{"format":"date-time","type":"string","nullable":true},"unread":{"type":"boolean","nullable":false}},"required":["id","documentSection","comments","anchor","createdAt","resolvedAt","unread"]},"CommentThreadListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/CommentThreadItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateCommentThreadDto":{"type":"object","properties":{"contentMarkdown":{"type":"string","nullable":false},"documentSectionId":{"type":"string","nullable":false},"anchor":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/CommentAnchorDto"}]}},"required":["contentMarkdown","documentSectionId"]},"UpdateCommentThreadDto":{"type":"object","properties":{"resolvedAt":{"format":"date-time","type":"string","nullable":true},"anchor":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/CommentAnchorDto"}]}}},"PublicSubscribeDto":{"type":"object","properties":{"grantId":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"captchaA":{"type":"number","nullable":false},"captchaB":{"type":"number","nullable":false},"captchaAnswer":{"type":"number","nullable":false}},"required":["grantId","email","captchaA","captchaB","captchaAnswer"]},"ConfirmSubscriptionDto":{"type":"object","properties":{"confirmationToken":{"type":"string","nullable":false}},"required":["confirmationToken"]},"GrantSubscriptionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"grantId":{"type":"string","nullable":false},"userId":{"type":"string","nullable":false},"isConfirmed":{"type":"boolean","nullable":false},"lastSentAt":{"format":"date-time","type":"string","nullable":true},"archivedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","createdAt","grantId","userId","isConfirmed","lastSentAt","archivedAt"]},"GrantSubscriptionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantSubscriptionDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateGrantSubscriptionDto":{"type":"object","properties":{"grantId":{"type":"string","nullable":false},"userId":{"type":"string","nullable":false},"isConfirmed":{"type":"boolean","nullable":false}},"required":["grantId","userId"]},"TranscribeAudioFormDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false},"file":{"type":"string","format":"binary","description":"The recording, as WAV"}},"required":["organizationId","file"]},"TranscriptionDto":{"type":"object","properties":{"text":{"type":"string","nullable":false}},"required":["text"]}}}}