{"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-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":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"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/ApiKeyResponseDto"}}}}},"security":[{"token":[]}],"summary":"Create a new API key","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/{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":{"post":{"operationId":"acceptInvite","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Accept an invite and create a user account","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/login":{"post":{"operationId":"login","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthTokenResponseDto"}}}}},"summary":"Log in with email and password","tags":["Auth"]}},"/v1/auth/logout":{"post":{"operationId":"logout","parameters":[],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"token":[]}],"summary":"Log out the current user","tags":["Auth"]}},"/v1/auth/refresh":{"post":{"operationId":"refreshToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthTokenResponseDto"}}}}},"summary":"Refresh access token","tags":["Auth"]}},"/v1/auth/verify-email":{"post":{"operationId":"verifyEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Verify a user email address","tags":["Auth"]}},"/v1/auth/resend-verification":{"post":{"operationId":"resendVerificationEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationEmailDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Resend email verification","tags":["Auth"]}},"/v1/auth/request-password-reset":{"post":{"operationId":"requestPasswordReset","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPasswordResetDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Request a password reset email","tags":["Auth"]}},"/v1/auth/reset-password":{"post":{"operationId":"resetPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"summary":"Reset password using a token","tags":["Auth"]}},"/v1/auth/email-available":{"get":{"operationId":"isEmailAvailable","parameters":[{"name":"email","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAvailableResponseDto"}}}}},"summary":"Check if an email address is available","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/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}/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-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/{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":{"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/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":"clientId","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"userIds","required":false,"in":"query","schema":{"nullable":false,"type":"array","items":{"type":"string"}}},{"name":"archived","required":false,"in":"query","schema":{"nullable":false,"type":"boolean"}}],"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/{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-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":true,"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"}}],"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/{id}":{"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/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"]}},"/upload/{id}":{"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}/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/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/agent-session/document":{"post":{"operationId":"createDocumentAgentSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentAgentSessionDto"}}}},"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionItemDto"}}}}},"security":[{"token":[]}],"summary":"Create a document-scoped agent session","tags":["AgentSession"]}},"/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":{"get":{"operationId":"listAgentSessions","parameters":[{"name":"documentId","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":"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"]}},"/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/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/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"}}],"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}/publish":{"post":{"operationId":"publishKnowledgeBaseVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"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"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseListDto"}}}}},"security":[{"token":[]}],"summary":"List knowledge bases","tags":["KnowledgeBase"]},"post":{"operationId":"createKnowledgeBase","parameters":[],"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}":{"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/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"}}],"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}/publish":{"post":{"operationId":"publishGrantVersion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"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":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/GrantStatus"}},{"name":"region","required":false,"in":"query","schema":{"nullable":false,"type":"string"}},{"name":"targetGroup","required":false,"in":"query","schema":{"$ref":"#/components/schemas/TargetGroup"}},{"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"}}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantListDto"}}}}},"security":[{"token":[]}],"summary":"List grants","tags":["Grant"]},"post":{"operationId":"createGrant","parameters":[],"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/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/GrantDto"}}}}},"summary":"Get the published grant for a slug","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/{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"]}}},"info":{"title":"TwinAI","description":"API for TwinAI platform","version":"2.4.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"token":{"scheme":"bearer","bearerFormat":"JWT or API Key","type":"http","name":"Authorization","description":"Enter a valid JWT token or API Key","in":"header"},"cookie":{"type":"apiKey","in":"cookie","name":"twinai_auth","description":"JWT token stored in HttpOnly cookie (requires COOKIE_AUTH_ENABLED=true)"}},"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"]},"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"}}},"required":["id","email","firstName","lastName","phoneNumber","createdAt","deletedAt","updatedAt","onboardingSeen","isAdmin","memberships"]},"UpdateUserDto":{"type":"object","properties":{"firstName":{"type":"string","nullable":false},"lastName":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"phoneNumber":{"type":"string","nullable":false}}},"UpdatePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string","nullable":false},"newPassword":{"type":"string","nullable":false}},"required":["currentPassword","newPassword"]},"ApiKeyResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":true},"apiKey":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"isAdmin":{"type":"boolean","nullable":false},"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","apiKey","roles","isAdmin","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}},"required":["roles","organizationId"]},"OrganizationSortBy":{"type":"string","enum":["createdAt","updatedAt"]},"ModelTag":{"type":"string","enum":["baseline","eu"]},"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},"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","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},"name":{"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","name","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},"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","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},"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"}]}}},"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},"name":{"type":"string","nullable":false},"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","name","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},"name":{"type":"string","nullable":false},"roles":{"type":"array","nullable":false,"items":{"$ref":"#/components/schemas/UserRole"}},"organizationId":{"type":"string","nullable":false}},"required":["email","name","roles","organizationId"]},"InviteDetailsResponseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"email":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"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","name","roles","organization","createdAt","updatedAt","existingUser"]},"AcceptInviteDto":{"type":"object","properties":{"password":{"type":"string","nullable":false}},"required":["password"]},"OAuthProvider":{"type":"string","enum":["Google","Exact","SalesForce"]},"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},"password":{"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","password","firstName","organizationName"]},"SignupResponseDto":{"type":"object","properties":{"userId":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false}},"required":["userId","organizationId"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]},"AuthTokenResponseDto":{"type":"object","properties":{"tokenId":{"type":"string","nullable":false},"token":{"type":"string","nullable":false},"tokenExpirationDateUTC":{"format":"date-time","type":"string","nullable":false},"refreshToken":{"type":"string","nullable":false},"refreshExpirationDateUTC":{"format":"date-time","type":"string","nullable":false}},"required":["tokenId","token","tokenExpirationDateUTC","refreshToken","refreshExpirationDateUTC"]},"RefreshDto":{"type":"object","properties":{"refreshToken":{"type":"string","nullable":false}}},"VerifyEmailDto":{"type":"object","properties":{"email":{"type":"string","nullable":false},"token":{"type":"string","nullable":false}},"required":["email","token"]},"ResendVerificationEmailDto":{"type":"object","properties":{"email":{"type":"string","nullable":false}},"required":["email"]},"RequestPasswordResetDto":{"type":"object","properties":{"email":{"type":"string","nullable":false}},"required":["email"]},"ResetPasswordDto":{"type":"object","properties":{"email":{"type":"string","nullable":false},"token":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","token","password"]},"EmailAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","nullable":false}},"required":["available"]},"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"]},"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"]},"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"]},"DocumentProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"client":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentClientDto"}]},"users":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/UserPublicDto"}}},"required":["id","archived","client","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"}]}},"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","name","documentTypeVersionId"]},"ResearchDepth":{"type":"string","enum":["low","medium","high"]},"DocumentSettingsDto":{"type":"object","properties":{"isInteractive":{"type":"boolean","nullable":true},"websearchEnabled":{"type":"boolean","nullable":true},"modelTag":{"type":"string","nullable":true},"writingLanguage":{"type":"string","nullable":true},"researchDepth":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ResearchDepth"}]}},"required":["isInteractive","websearchEnabled","modelTag","writingLanguage","researchDepth"]},"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"]},"DocumentSectionStatus":{"type":"string","enum":["Ready","Generating"]},"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"]},"SectionVersionSummaryDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"characterCount":{"type":"number","nullable":false},"wordCount":{"type":"number","nullable":false}},"required":["id","characterCount","wordCount"]},"DocumentSectionItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentSectionStatus"}]},"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","status","key","headingLevel","isHeadingOnly","draft","documentId","inputCheckResults","calculatedScore","order","currentVersion"]},"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"}]},"wordLimit":{"type":"number","nullable":true},"characterLimit":{"type":"number","nullable":true},"agentSettings":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"parsedConfig":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"sections":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/DocumentSectionItemDto"}},"failedReason":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","name","documentTypeVersion","project","status","wordCount","characterCount","picture","lastModifiedBy","organization","documentScore","wordLimit","characterLimit","agentSettings","parsedConfig","sections","failedReason"]},"UpdateDocumentDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"pictureId":{"type":"string","nullable":false},"agentSettings":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]}}},"FileItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"originalName":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"extension":{"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","extension","size","type","originalUrl","notes"]},"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"}]},"sourceFiles":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/FileItemDto"}}},"required":["id","createdAt","knowledgeBaseId","versionNumber","versionDescription","isPublished","publishedAt","description","sourceFileIds","createdBy","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"}]},"agentSettings":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"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/KnowledgeBaseVersionDto"}]}},"required":["id","createdAt","documentTypeId","versionNumber","versionDescription","isPublished","publishedAt","createdBy","description","inputDataInstructions","templateFileIds","knowledgeBaseVersionId","knowledgeBaseVersion"]},"DocumentTypeVersionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeVersionDto"}}},"required":["items"]},"ForkDocumentTypeVersionDto":{"type":"object","properties":{"versionDescription":{"type":"string","nullable":false},"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"agentSettings":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"inputDataInstructions":{"type":"string","nullable":true},"templateFileIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":true}},"required":["versionDescription"]},"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"]},"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"}]}},"required":["id","createdAt","name","pictureId","picture","organization","isShared","exportKey","createdBy","currentVersion"]},"DocumentTypeListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateDocumentTypeDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"config":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentConfigDto"}]},"agentSettings":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DocumentSettingsDto"}]},"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"]},"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"}]},"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},"createdAt":{"type":"string","nullable":false},"updatedAt":{"type":"string","nullable":false}},"required":["id","documentSectionId","user","version","content","summary","decisions","sourcesRead","feedback","questions","characterCount","wordCount","createdAt","updatedAt"]},"DocumentSectionDetailDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"status":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DocumentSectionStatus"}]},"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","status","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"]},"PatchSectionVersionDto":{"type":"object","properties":{"content":{"type":"string","nullable":false}},"required":["content"]},"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},"extension":{"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},"contentType":{"type":"string","nullable":true},"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}},"required":["id","originalName","mimeType","extension","size","type","originalUrl","notes","createdAt","updatedAt","contentType","location","organizationId","createdBy"]},"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},"organizationId":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"updatedAt":{"format":"date-time","type":"string","nullable":false}},"required":["id","name","organizationId","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}},"required":["name","organizationId"]},"UpdateClientDto":{"type":"object","properties":{"name":{"type":"string","nullable":false}}},"ProjectDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"organizationId":{"type":"string","nullable":false},"clientId":{"type":"string","nullable":true},"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","organizationId","clientId","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"]},"CreateProjectDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"organizationId":{"type":"string","nullable":false},"clientId":{"type":"string","nullable":false},"userIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["name","organizationId"]},"UpdateProjectDto":{"type":"object","properties":{"name":{"type":"string","nullable":false},"archived":{"type":"boolean","nullable":false},"clientId":{"type":"string","nullable":true},"userIds":{"nullable":false,"type":"array","items":{"type":"string"}}}},"FileOrigin":{"type":"string","enum":["upload","scrape","user-text","generated"]},"TocHeadingDto":{"type":"object","properties":{"ordinal":{"type":"number","nullable":false},"depth":{"type":"number","nullable":false},"headingPath":{"nullable":false,"type":"array","items":{"type":"string"}},"charStart":{"type":"number","nullable":false},"charEnd":{"type":"number","nullable":false}},"required":["ordinal","depth","headingPath","charStart","charEnd"]},"ProjectFileFileDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"origin":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/FileOrigin"}]},"originalName":{"type":"string","nullable":true},"originalUrl":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"tags":{"nullable":false,"type":"array","items":{"type":"string"}},"failedReason":{"type":"string","nullable":true},"inlineContent":{"type":"string","nullable":true},"headings":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/TocHeadingDto"}}},"required":["id","origin","originalName","originalUrl","summary","tags","failedReason","inlineContent","headings"]},"ProjectFileItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"projectId":{"type":"string","nullable":false},"createdAt":{"format":"date-time","type":"string","nullable":false},"file":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/ProjectFileFileDto"}]}},"required":["id","projectId","createdAt","file"]},"ProjectFileListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/ProjectFileItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"CreateProjectFileDto":{"type":"object","properties":{"projectId":{"type":"string","nullable":false},"fileId":{"type":"string","nullable":false}},"required":["projectId","fileId"]},"FileStatus":{"type":"string","enum":["pending","processing","ready","failed"]},"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"]},"UpdateFileDto":{"type":"object","properties":{"originalName":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"originalUrl":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}}},"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}},"required":["agentSessionId"]},"ConversationActivityItemDto":{"type":"object","properties":{"type":{"type":"string","nullable":false},"sectionsCount":{"type":"number","nullable":false},"durationMs":{"type":"number","nullable":false}},"required":["type"]},"ConversationMessageItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"agentSessionId":{"type":"string","nullable":false},"role":{"type":"string","nullable":false},"content":{"type":"string","nullable":false},"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},"isVisible":{"type":"boolean","nullable":false},"toolCallId":{"type":"string","nullable":true},"toolCalls":{"type":"object","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)"},"reasoning":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"tokenUsage":{"type":"object","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","agentSessionId","role","content","user","fileIds","activity","error","createdAt","processedAt"]},"CommentThreadDocumentSectionDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"key":{"type":"string","nullable":false},"documentId":{"type":"string","nullable":false},"order":{"type":"number","nullable":false}},"required":["id","key","documentId","order"]},"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"}},"createdAt":{"type":"string","nullable":false},"resolvedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","documentSection","comments","createdAt","resolvedAt"]},"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}},"required":["contentMarkdown","documentSectionId"]},"UpdateCommentThreadDto":{"type":"object","properties":{"resolvedAt":{"format":"date-time","type":"string","nullable":false}},"required":["resolvedAt"]},"InitialAgentMessageDto":{"type":"object","properties":{"content":{"type":"string","nullable":false},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["content"]},"CreateDocumentAgentSessionDto":{"type":"object","properties":{"documentId":{"type":"string","nullable":false},"initialMessage":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/InitialAgentMessageDto"}]}},"required":["documentId"]},"AgentSessionEndedReason":{"type":"string","enum":["context_limit"]},"AgentSessionItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"parentSessionId":{"type":"string","nullable":true},"documentId":{"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"}]},"iteration":{"type":"number","nullable":false},"model":{"type":"string","nullable":true},"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}},"required":["id","parentSessionId","documentId","agentName","title","status","endedReason","iteration","model","statusText","durationMs","error","createdAt","updatedAt"]},"CreatePlatformAgentSessionDto":{"type":"object","properties":{"organizationId":{"type":"string","nullable":false},"initialMessage":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/InitialAgentMessageDto"}]}},"required":["organizationId"]},"AgentName":{"type":"string","enum":["document","researcher","writer","input-check","platform"]},"AgentSessionListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/AgentSessionItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"UpdateAgentSessionDto":{"type":"object","properties":{"title":{"type":"string","nullable":false}}},"SendConversationMessageDto":{"type":"object","properties":{"agentSessionId":{"type":"string","nullable":false},"content":{"type":"string","nullable":false},"fileIds":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["agentSessionId","content"]},"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}}},"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"]},"KnowledgeBaseDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"name":{"type":"string","nullable":false},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/KnowledgeBaseVersionDto"}]}},"required":["id","createdAt","name","createdBy","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"]},"UpdateKnowledgeBaseDto":{"type":"object","properties":{"name":{"type":"string","nullable":false}}},"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"}}}},"GrantStatus":{"type":"string","enum":["open","closed","upcoming","announced","permanent","suspended","budget-exhausted","permanently-stopped"]},"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"]},"CostType":{"type":"string","enum":["personnel","material","subcontracting","equipment","land","buildings","overhead","travel","other"]},"IncentiveType":{"type":"string","enum":["grant","loan","guarantee","tax-credit","investment"]},"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},"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},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"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"}},"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},"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},"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":{"type":"object","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":{"type":"object","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","grantId","versionNumber","versionDescription","isPublished","publishedAt","createdBy","tagline","shortDescription","description","status","regions","targetGroups","eligibleCompanySizes","themes","excludedBusinessTypes","legalActivityCodes","minTRL","maxTRL","projectPhases","minConsortiumPartners","startDate","endDate","decisionPeriodNote","callWindows","cyclicity","allocationMethod","nextDeadlineDate","currency","fundSizeCents","fundSizeNote","minAmountCents","minAmountNote","maxAmountCents","maxAmountNote","minProjectAmountCents","maxProjectAmountCents","fundingPercentage","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"]},"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},"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},"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":{"type":"object","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":{"type":"object","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},"versionDescription":{"type":"string","nullable":false},"themeIds":{"nullable":false,"type":"array","items":{"type":"string"}},"knowledgeBaseVersionId":{"type":"string","nullable":false}},"required":["versionDescription"]},"GrantItemDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"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"}]},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"currentVersion":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantVersionDto"}]}},"required":["id","createdAt","slug","name","shortName","providerId","provider","createdBy","currentVersion"]},"GrantListDto":{"type":"object","properties":{"items":{"nullable":false,"type":"array","items":{"$ref":"#/components/schemas/GrantItemDto"}},"count":{"type":"number","nullable":false}},"required":["items","count"]},"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"}}},"required":["targetGroups","statuses","relationKinds","companySizes","incentiveTypes","projectPhases","costTypes","cyclicities","allocationMethods","sectorCodeLevels","activityCodeSystems"]},"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"]},"GrantDto":{"type":"object","properties":{"id":{"type":"string","nullable":false},"createdAt":{"type":"string","nullable":false},"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"}]},"createdBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicDto"}]},"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","slug","name","shortName","providerId","provider","createdBy","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},"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},"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":{"type":"object","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":{"type":"object","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},"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"]},"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"]}}}}