{"openapi":"3.0.0","info":{"title":"Numezis External Platform API","version":"0.3.0","description":"Filtered external OpenAPI contract for official platform integrations.","contact":{"name":"Numezis API Support","email":"support@numezis.com"}},"servers":[{"url":"http://api:8080/api/v1","description":"Production Cloud Run API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from /auth/login endpoint"}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"SuccessResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","example":true,"description":"Always true for successful responses"},"data":{"type":"object","description":"Response data (structure varies by endpoint)","additionalProperties":true}}},"GlobalSearchResultGroup":{"type":"string","enum":["pages","settings","config","actions","records"],"description":"UI section grouping for global search palette"},"GlobalSearchNavigationKind":{"type":"string","enum":["page","settings","config","hub","action"],"description":"Navigation catalog kind for page/settings results"},"GlobalSearchResultType":{"type":"string","enum":["navigation","action","user","invoice","order","contact","document","task","quote","expense","bill","project","lead","product","config"],"description":"Global search result entity/type discriminator"},"GlobalSearchResult":{"type":"object","required":["type","id","title","href"],"properties":{"type":{"type":"string","enum":["navigation","action","user","invoice","order","contact","document","task","quote","expense","bill","project","lead","product","config"],"description":"Global search result entity/type discriminator"},"group":{"type":"string","enum":["pages","settings","config","actions","records"],"description":"UI section grouping for global search palette"},"kind":{"type":"string","enum":["page","settings","config","hub","action"],"description":"Navigation catalog kind for page/settings results"},"id":{"type":"string","description":"Stable result identifier (route id, entity id, or action id)"},"title":{"type":"string","description":"Localized display title"},"description":{"type":"string","description":"Optional subtitle or summary"},"breadcrumb":{"type":"string","description":"Resolved breadcrumb trail for palette display"},"href":{"type":"string","description":"Resolved navigation target"},"icon":{"type":"string","description":"Optional icon token"},"providerId":{"type":"string","enum":["page","record","action","config"],"description":"Provider identifier for ranking and telemetry"},"metadata":{"type":"object","additionalProperties":true,"description":"Optional provider-specific metadata (non-sensitive)"},"highlights":{"type":"array","items":{"type":"string"},"description":"Optional highlight snippets"}}},"GlobalSearchResponse":{"type":"object","required":["results","total","query"],"properties":{"results":{"type":"array","items":{"type":"object","required":["type","id","title","href"],"properties":{"type":{"type":"string","enum":["navigation","action","user","invoice","order","contact","document","task","quote","expense","bill","project","lead","product","config"],"description":"Global search result entity/type discriminator"},"group":{"type":"string","enum":["pages","settings","config","actions","records"],"description":"UI section grouping for global search palette"},"kind":{"type":"string","enum":["page","settings","config","hub","action"],"description":"Navigation catalog kind for page/settings results"},"id":{"type":"string","description":"Stable result identifier (route id, entity id, or action id)"},"title":{"type":"string","description":"Localized display title"},"description":{"type":"string","description":"Optional subtitle or summary"},"breadcrumb":{"type":"string","description":"Resolved breadcrumb trail for palette display"},"href":{"type":"string","description":"Resolved navigation target"},"icon":{"type":"string","description":"Optional icon token"},"providerId":{"type":"string","enum":["page","record","action","config"],"description":"Provider identifier for ranking and telemetry"},"metadata":{"type":"object","additionalProperties":true,"description":"Optional provider-specific metadata (non-sensitive)"},"highlights":{"type":"array","items":{"type":"string"},"description":"Optional highlight snippets"}}}},"total":{"type":"integer","minimum":0},"query":{"type":"string"}}},"GlobalSearchSuccessResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["results","total","query"],"properties":{"results":{"type":"array","items":{"type":"object","required":["type","id","title","href"],"properties":{"type":{"type":"string","enum":["navigation","action","user","invoice","order","contact","document","task","quote","expense","bill","project","lead","product","config"],"description":"Global search result entity/type discriminator"},"group":{"type":"string","enum":["pages","settings","config","actions","records"],"description":"UI section grouping for global search palette"},"kind":{"type":"string","enum":["page","settings","config","hub","action"],"description":"Navigation catalog kind for page/settings results"},"id":{"type":"string","description":"Stable result identifier (route id, entity id, or action id)"},"title":{"type":"string","description":"Localized display title"},"description":{"type":"string","description":"Optional subtitle or summary"},"breadcrumb":{"type":"string","description":"Resolved breadcrumb trail for palette display"},"href":{"type":"string","description":"Resolved navigation target"},"icon":{"type":"string","description":"Optional icon token"},"providerId":{"type":"string","enum":["page","record","action","config"],"description":"Provider identifier for ranking and telemetry"},"metadata":{"type":"object","additionalProperties":true,"description":"Optional provider-specific metadata (non-sensitive)"},"highlights":{"type":"array","items":{"type":"string"},"description":"Optional highlight snippets"}}}},"total":{"type":"integer","minimum":0},"query":{"type":"string"}}}}},"SupportTicketSourceContext":{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}},"SupportTicketUatContext":{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}},"SupportTicketScreenshot":{"type":"object","required":["filename","contentType","sizeBytes","width","height"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"previewUrl":{"type":"string"},"previewExpiresAt":{"type":"string","format":"date-time"}}},"SupportTicket":{"type":"object","required":["id","type","status","priority","title","description","sourcePortal","tenantId","companyId","partnerTenantId","requesterUserId","requesterRole","assignedToUserId","assignedByUserId","planId","firstResponseDueAt","firstResponseAt","slaState","intakeChannel","contactCategory","requesterEmail","requesterDisplayName","contactSubmissionId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["support","bug","feedback","other"]},"status":{"type":"string","enum":["new","in_progress","waiting_customer","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"title":{"type":"string"},"description":{"type":"string"},"sourcePortal":{"type":"string","enum":["company","tenant","partner","internal"]},"sourcePath":{"type":"string"},"sourceContext":{"allOf":[{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}}],"nullable":true},"uatContext":{"allOf":[{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}}],"nullable":true},"screenshot":{"allOf":[{"type":"object","required":["filename","contentType","sizeBytes","width","height"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"previewUrl":{"type":"string"},"previewExpiresAt":{"type":"string","format":"date-time"}}}],"nullable":true},"tenantId":{"type":"string"},"companyId":{"type":"string","nullable":true},"partnerTenantId":{"type":"string","nullable":true},"requesterUserId":{"type":"string"},"requesterRole":{"type":"string"},"assignedToUserId":{"type":"string","nullable":true},"assignedByUserId":{"type":"string","nullable":true},"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseDueAt":{"type":"string","format":"date-time"},"firstResponseAt":{"type":"string","format":"date-time","nullable":true},"slaState":{"type":"string","enum":["on_track","at_risk","breached"]},"intakeChannel":{"type":"string","enum":["support_drawer","contact_form_public","contact_form_authenticated"],"nullable":true},"contactCategory":{"type":"string","enum":["general","support","sales","technical","billing","partner","other"],"nullable":true},"requesterEmail":{"type":"string","nullable":true},"requesterDisplayName":{"type":"string","nullable":true},"contactSubmissionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SupportScreenshotDraft":{"type":"object","required":["draftId","filename","contentType","sizeBytes","width","height"],"properties":{"draftId":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"InternalSupportAssignee":{"type":"object","required":["id","email","role","profile"],"properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"profile":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"avatarUrl":{"type":"string"}}}}},"SupportSlaPolicy":{"type":"object","required":["planId","firstResponseHours","coverage"],"properties":{"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseHours":{"type":"integer"},"coverage":{"type":"string","enum":["24_7"]}}},"CreateSupportTicketRequest":{"type":"object","required":["type","title","description"],"properties":{"type":{"type":"string","enum":["support","bug","feedback","other"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"title":{"type":"string"},"description":{"type":"string"},"sourcePath":{"type":"string"},"sourceContext":{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}},"uatContext":{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}},"screenshotDraftId":{"type":"string"},"intakeChannel":{"type":"string","enum":["support_drawer","contact_form_public","contact_form_authenticated"]},"contactCategory":{"type":"string","enum":["general","support","sales","technical","billing","partner","other"]}}},"AssignInternalSupportTicketRequest":{"type":"object","required":["assignedToUserId"],"properties":{"assignedToUserId":{"type":"string"}}},"UpdateInternalSupportTicketStatusRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["new","in_progress","waiting_customer","resolved","closed"]}}},"CompanySupportTicketListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["tickets","total"],"properties":{"tickets":{"type":"array","items":{"type":"object","required":["id","type","status","priority","title","description","sourcePortal","tenantId","companyId","partnerTenantId","requesterUserId","requesterRole","assignedToUserId","assignedByUserId","planId","firstResponseDueAt","firstResponseAt","slaState","intakeChannel","contactCategory","requesterEmail","requesterDisplayName","contactSubmissionId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["support","bug","feedback","other"]},"status":{"type":"string","enum":["new","in_progress","waiting_customer","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"title":{"type":"string"},"description":{"type":"string"},"sourcePortal":{"type":"string","enum":["company","tenant","partner","internal"]},"sourcePath":{"type":"string"},"sourceContext":{"allOf":[{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}}],"nullable":true},"uatContext":{"allOf":[{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}}],"nullable":true},"screenshot":{"allOf":[{"type":"object","required":["filename","contentType","sizeBytes","width","height"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"previewUrl":{"type":"string"},"previewExpiresAt":{"type":"string","format":"date-time"}}}],"nullable":true},"tenantId":{"type":"string"},"companyId":{"type":"string","nullable":true},"partnerTenantId":{"type":"string","nullable":true},"requesterUserId":{"type":"string"},"requesterRole":{"type":"string"},"assignedToUserId":{"type":"string","nullable":true},"assignedByUserId":{"type":"string","nullable":true},"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseDueAt":{"type":"string","format":"date-time"},"firstResponseAt":{"type":"string","format":"date-time","nullable":true},"slaState":{"type":"string","enum":["on_track","at_risk","breached"]},"intakeChannel":{"type":"string","enum":["support_drawer","contact_form_public","contact_form_authenticated"],"nullable":true},"contactCategory":{"type":"string","enum":["general","support","sales","technical","billing","partner","other"],"nullable":true},"requesterEmail":{"type":"string","nullable":true},"requesterDisplayName":{"type":"string","nullable":true},"contactSubmissionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"}}}}},"InternalSupportTicketListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["tickets","total","breachedTicketIds"],"properties":{"tickets":{"type":"array","items":{"type":"object","required":["id","type","status","priority","title","description","sourcePortal","tenantId","companyId","partnerTenantId","requesterUserId","requesterRole","assignedToUserId","assignedByUserId","planId","firstResponseDueAt","firstResponseAt","slaState","intakeChannel","contactCategory","requesterEmail","requesterDisplayName","contactSubmissionId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["support","bug","feedback","other"]},"status":{"type":"string","enum":["new","in_progress","waiting_customer","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"title":{"type":"string"},"description":{"type":"string"},"sourcePortal":{"type":"string","enum":["company","tenant","partner","internal"]},"sourcePath":{"type":"string"},"sourceContext":{"allOf":[{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}}],"nullable":true},"uatContext":{"allOf":[{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}}],"nullable":true},"screenshot":{"allOf":[{"type":"object","required":["filename","contentType","sizeBytes","width","height"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"previewUrl":{"type":"string"},"previewExpiresAt":{"type":"string","format":"date-time"}}}],"nullable":true},"tenantId":{"type":"string"},"companyId":{"type":"string","nullable":true},"partnerTenantId":{"type":"string","nullable":true},"requesterUserId":{"type":"string"},"requesterRole":{"type":"string"},"assignedToUserId":{"type":"string","nullable":true},"assignedByUserId":{"type":"string","nullable":true},"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseDueAt":{"type":"string","format":"date-time"},"firstResponseAt":{"type":"string","format":"date-time","nullable":true},"slaState":{"type":"string","enum":["on_track","at_risk","breached"]},"intakeChannel":{"type":"string","enum":["support_drawer","contact_form_public","contact_form_authenticated"],"nullable":true},"contactCategory":{"type":"string","enum":["general","support","sales","technical","billing","partner","other"],"nullable":true},"requesterEmail":{"type":"string","nullable":true},"requesterDisplayName":{"type":"string","nullable":true},"contactSubmissionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"},"breachedTicketIds":{"type":"array","items":{"type":"string"}}}}}},"SupportTicketResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["ticket"],"properties":{"ticket":{"type":"object","required":["id","type","status","priority","title","description","sourcePortal","tenantId","companyId","partnerTenantId","requesterUserId","requesterRole","assignedToUserId","assignedByUserId","planId","firstResponseDueAt","firstResponseAt","slaState","intakeChannel","contactCategory","requesterEmail","requesterDisplayName","contactSubmissionId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["support","bug","feedback","other"]},"status":{"type":"string","enum":["new","in_progress","waiting_customer","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"title":{"type":"string"},"description":{"type":"string"},"sourcePortal":{"type":"string","enum":["company","tenant","partner","internal"]},"sourcePath":{"type":"string"},"sourceContext":{"allOf":[{"type":"object","properties":{"url":{"type":"string"},"pathname":{"type":"string"},"search":{"type":"string"},"hash":{"type":"string"},"referrer":{"type":"string"},"userAgent":{"type":"string"}}}],"nullable":true},"uatContext":{"allOf":[{"type":"object","required":["moduleKey","scenarioId","result","why"],"properties":{"moduleKey":{"type":"string","enum":["accounting","crm","sales","projects","purchases","documents","contacts","inventory","hr"]},"scenarioId":{"type":"string"},"result":{"type":"string","enum":["success","failed","blocked"]},"why":{"type":"string"},"executionId":{"type":"string"}}}],"nullable":true},"screenshot":{"allOf":[{"type":"object","required":["filename","contentType","sizeBytes","width","height"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"previewUrl":{"type":"string"},"previewExpiresAt":{"type":"string","format":"date-time"}}}],"nullable":true},"tenantId":{"type":"string"},"companyId":{"type":"string","nullable":true},"partnerTenantId":{"type":"string","nullable":true},"requesterUserId":{"type":"string"},"requesterRole":{"type":"string"},"assignedToUserId":{"type":"string","nullable":true},"assignedByUserId":{"type":"string","nullable":true},"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseDueAt":{"type":"string","format":"date-time"},"firstResponseAt":{"type":"string","format":"date-time","nullable":true},"slaState":{"type":"string","enum":["on_track","at_risk","breached"]},"intakeChannel":{"type":"string","enum":["support_drawer","contact_form_public","contact_form_authenticated"],"nullable":true},"contactCategory":{"type":"string","enum":["general","support","sales","technical","billing","partner","other"],"nullable":true},"requesterEmail":{"type":"string","nullable":true},"requesterDisplayName":{"type":"string","nullable":true},"contactSubmissionId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}},"SupportScreenshotDraftResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["draft"],"properties":{"draft":{"type":"object","required":["draftId","filename","contentType","sizeBytes","width","height"],"properties":{"draftId":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}}}}}},"InternalSupportAssigneeListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["users"],"properties":{"users":{"type":"array","items":{"type":"object","required":["id","email","role","profile"],"properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"profile":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"avatarUrl":{"type":"string"}}}}}}}}}},"SupportSlaPolicyListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["policies"],"properties":{"policies":{"type":"array","items":{"type":"object","required":["planId","firstResponseHours","coverage"],"properties":{"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"firstResponseHours":{"type":"integer"},"coverage":{"type":"string","enum":["24_7"]}}}}}}}},"DeleteSupportTicketResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}}},"VatReportingDiagnosticAction":{"type":"object","required":["kind","labelKey","href"],"properties":{"kind":{"type":"string","enum":["section","document","list"]},"labelKey":{"type":"string"},"href":{"type":"string"}}},"VatReportingDiagnostic":{"type":"object","required":["code","messageKey","severity","blocking"],"properties":{"code":{"type":"string"},"messageKey":{"type":"string"},"severity":{"type":"string","enum":["error","warning","info"]},"blocking":{"type":"boolean"},"actions":{"type":"array","items":{"type":"object","required":["kind","labelKey","href"],"properties":{"kind":{"type":"string","enum":["section","document","list"]},"labelKey":{"type":"string"},"href":{"type":"string"}}}},"meta":{"type":"object","additionalProperties":true}}},"CompanyVatActivitySourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}},"CompanyVatNetTaxRateActivity":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}},"CompanyVatAdjustmentEntry":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}},"CompanyVatReportingConfigWindow":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}},"CompanyVatReportingConfig":{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}},"CompanyVatPeriodAdjustment":{"type":"object","required":["id","companyId","tenantId","countryCode","period","reportingMethod","entries","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"period":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"reportingWindowKey":{"type":"string","nullable":true},"entries":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}},"VatReturnBox":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"labelKey":{"type":"string"},"type":{"type":"string","enum":["base","tax","calculated"]}}},"VatReturnMapping":{"type":"object","required":["vatRuleCode"],"properties":{"vatRuleCode":{"type":"string"},"salesBaseBox":{"type":"string"},"salesTaxBox":{"type":"string"},"purchaseBaseBox":{"type":"string"},"purchaseTaxBox":{"type":"string"},"baseBox":{"type":"string"},"taxBox":{"type":"string"},"echSalesTarget":{"type":"string"},"echPurchaseTarget":{"type":"string"}}},"VatReturnEch0217Config":{"type":"object","required":["schemaVersion","profile","reportingMethod","formOfReporting"],"properties":{"schemaVersion":{"type":"string"},"profile":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"formOfReporting":{"type":"number","enum":[1,2]},"grossOrNet":{"type":"number","enum":[1,2]},"initialSubmissionType":{"type":"number","enum":[1,2,3]},"correctionSubmissionType":{"type":"number","enum":[2,3]},"supportedDeclarationTypes":{"type":"array","items":{"type":"string"}}}},"VatReturnMethodConfig":{"type":"object","required":["reportingMethod","boxes","mappings"],"properties":{"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"defaultFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"requiresAnnualApproval":{"type":"boolean"},"computationStrategy":{"type":"string","enum":["effective","net_tax_rate"]},"formNameKey":{"type":"string"},"allowedFilingFrequencies":{"type":"array","items":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]}},"submissionMode":{"type":"string","enum":["skill","lifecycle"]},"submissionSkillName":{"type":"string"},"boxes":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"labelKey":{"type":"string"},"type":{"type":"string","enum":["base","tax","calculated"]}}}},"mappings":{"type":"array","items":{"type":"object","required":["vatRuleCode"],"properties":{"vatRuleCode":{"type":"string"},"salesBaseBox":{"type":"string"},"salesTaxBox":{"type":"string"},"purchaseBaseBox":{"type":"string"},"purchaseTaxBox":{"type":"string"},"baseBox":{"type":"string"},"taxBox":{"type":"string"},"echSalesTarget":{"type":"string"},"echPurchaseTarget":{"type":"string"}}}},"ech0217":{"type":"object","required":["schemaVersion","profile","reportingMethod","formOfReporting"],"properties":{"schemaVersion":{"type":"string"},"profile":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"formOfReporting":{"type":"number","enum":[1,2]},"grossOrNet":{"type":"number","enum":[1,2]},"initialSubmissionType":{"type":"number","enum":[1,2,3]},"correctionSubmissionType":{"type":"number","enum":[2,3]},"supportedDeclarationTypes":{"type":"array","items":{"type":"string"}}}}}},"CompanyVatReportingContext":{"type":"object","required":["countryCode","supportedReportingMethods","supportedVatAccountingBases","vatRegistrationStatus","vatReportingRequired","canPrepareVatReturn","canSubmitVatReturn","canExportVatReturn","reportingConfigStatus","diagnostics","config"],"properties":{"countryCode":{"type":"string"},"supportedReportingMethods":{"type":"array","items":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]}},"supportedVatAccountingBases":{"type":"array","items":{"type":"string","enum":["accrual","cash"]}},"vatRegistered":{"type":"boolean"},"vatRegistrationStatus":{"type":"string","enum":["unknown","not_registered","registered_pending_setup","registered_ready","registered_incomplete","deregistered"]},"vatReportingRequired":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"canPrepareVatReturn":{"type":"boolean"},"canSubmitVatReturn":{"type":"boolean"},"canExportVatReturn":{"type":"boolean"},"reportingConfigStatus":{"type":"string","enum":["not_applicable","needs_classification","missing","incomplete","ready","conflict"]},"diagnostics":{"type":"array","items":{"type":"object","required":["code","messageKey","severity","blocking"],"properties":{"code":{"type":"string"},"messageKey":{"type":"string"},"severity":{"type":"string","enum":["error","warning","info"]},"blocking":{"type":"boolean"},"actions":{"type":"array","items":{"type":"object","required":["kind","labelKey","href"],"properties":{"kind":{"type":"string","enum":["section","document","list"]},"labelKey":{"type":"string"},"href":{"type":"string"}}}},"meta":{"type":"object","additionalProperties":true}}}},"currentReportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"currentFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"currentVatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"activeXmlProfile":{"type":"string"},"config":{"allOf":[{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}],"nullable":true},"activeWindow":{"allOf":[{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}],"nullable":true},"activeMethodConfig":{"allOf":[{"type":"object","required":["reportingMethod","boxes","mappings"],"properties":{"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"defaultFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"requiresAnnualApproval":{"type":"boolean"},"computationStrategy":{"type":"string","enum":["effective","net_tax_rate"]},"formNameKey":{"type":"string"},"allowedFilingFrequencies":{"type":"array","items":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]}},"submissionMode":{"type":"string","enum":["skill","lifecycle"]},"submissionSkillName":{"type":"string"},"boxes":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"labelKey":{"type":"string"},"type":{"type":"string","enum":["base","tax","calculated"]}}}},"mappings":{"type":"array","items":{"type":"object","required":["vatRuleCode"],"properties":{"vatRuleCode":{"type":"string"},"salesBaseBox":{"type":"string"},"salesTaxBox":{"type":"string"},"purchaseBaseBox":{"type":"string"},"purchaseTaxBox":{"type":"string"},"baseBox":{"type":"string"},"taxBox":{"type":"string"},"echSalesTarget":{"type":"string"},"echPurchaseTarget":{"type":"string"}}}},"ech0217":{"type":"object","required":["schemaVersion","profile","reportingMethod","formOfReporting"],"properties":{"schemaVersion":{"type":"string"},"profile":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"formOfReporting":{"type":"number","enum":[1,2]},"grossOrNet":{"type":"number","enum":[1,2]},"initialSubmissionType":{"type":"number","enum":[1,2,3]},"correctionSubmissionType":{"type":"number","enum":[2,3]},"supportedDeclarationTypes":{"type":"array","items":{"type":"string"}}}}}}],"nullable":true}}},"CompanyVatReportingPayload":{"type":"object","required":["config","context","periodAdjustments"],"properties":{"config":{"allOf":[{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}],"nullable":true},"context":{"type":"object","required":["countryCode","supportedReportingMethods","supportedVatAccountingBases","vatRegistrationStatus","vatReportingRequired","canPrepareVatReturn","canSubmitVatReturn","canExportVatReturn","reportingConfigStatus","diagnostics","config"],"properties":{"countryCode":{"type":"string"},"supportedReportingMethods":{"type":"array","items":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]}},"supportedVatAccountingBases":{"type":"array","items":{"type":"string","enum":["accrual","cash"]}},"vatRegistered":{"type":"boolean"},"vatRegistrationStatus":{"type":"string","enum":["unknown","not_registered","registered_pending_setup","registered_ready","registered_incomplete","deregistered"]},"vatReportingRequired":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"canPrepareVatReturn":{"type":"boolean"},"canSubmitVatReturn":{"type":"boolean"},"canExportVatReturn":{"type":"boolean"},"reportingConfigStatus":{"type":"string","enum":["not_applicable","needs_classification","missing","incomplete","ready","conflict"]},"diagnostics":{"type":"array","items":{"type":"object","required":["code","messageKey","severity","blocking"],"properties":{"code":{"type":"string"},"messageKey":{"type":"string"},"severity":{"type":"string","enum":["error","warning","info"]},"blocking":{"type":"boolean"},"actions":{"type":"array","items":{"type":"object","required":["kind","labelKey","href"],"properties":{"kind":{"type":"string","enum":["section","document","list"]},"labelKey":{"type":"string"},"href":{"type":"string"}}}},"meta":{"type":"object","additionalProperties":true}}}},"currentReportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"currentFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"currentVatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"activeXmlProfile":{"type":"string"},"config":{"allOf":[{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}],"nullable":true},"activeWindow":{"allOf":[{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}],"nullable":true},"activeMethodConfig":{"allOf":[{"type":"object","required":["reportingMethod","boxes","mappings"],"properties":{"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"defaultFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"requiresAnnualApproval":{"type":"boolean"},"computationStrategy":{"type":"string","enum":["effective","net_tax_rate"]},"formNameKey":{"type":"string"},"allowedFilingFrequencies":{"type":"array","items":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]}},"submissionMode":{"type":"string","enum":["skill","lifecycle"]},"submissionSkillName":{"type":"string"},"boxes":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"labelKey":{"type":"string"},"type":{"type":"string","enum":["base","tax","calculated"]}}}},"mappings":{"type":"array","items":{"type":"object","required":["vatRuleCode"],"properties":{"vatRuleCode":{"type":"string"},"salesBaseBox":{"type":"string"},"salesTaxBox":{"type":"string"},"purchaseBaseBox":{"type":"string"},"purchaseTaxBox":{"type":"string"},"baseBox":{"type":"string"},"taxBox":{"type":"string"},"echSalesTarget":{"type":"string"},"echPurchaseTarget":{"type":"string"}}}},"ech0217":{"type":"object","required":["schemaVersion","profile","reportingMethod","formOfReporting"],"properties":{"schemaVersion":{"type":"string"},"profile":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"formOfReporting":{"type":"number","enum":[1,2]},"grossOrNet":{"type":"number","enum":[1,2]},"initialSubmissionType":{"type":"number","enum":[1,2,3]},"correctionSubmissionType":{"type":"number","enum":[2,3]},"supportedDeclarationTypes":{"type":"array","items":{"type":"string"}}}}}}],"nullable":true}}},"periodAdjustments":{"type":"array","items":{"type":"object","required":["id","companyId","tenantId","countryCode","period","reportingMethod","entries","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"period":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"reportingWindowKey":{"type":"string","nullable":true},"entries":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}}}},"CompanyVatReportingSuccessResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["config","context","periodAdjustments"],"properties":{"config":{"allOf":[{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}],"nullable":true},"context":{"type":"object","required":["countryCode","supportedReportingMethods","supportedVatAccountingBases","vatRegistrationStatus","vatReportingRequired","canPrepareVatReturn","canSubmitVatReturn","canExportVatReturn","reportingConfigStatus","diagnostics","config"],"properties":{"countryCode":{"type":"string"},"supportedReportingMethods":{"type":"array","items":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]}},"supportedVatAccountingBases":{"type":"array","items":{"type":"string","enum":["accrual","cash"]}},"vatRegistered":{"type":"boolean"},"vatRegistrationStatus":{"type":"string","enum":["unknown","not_registered","registered_pending_setup","registered_ready","registered_incomplete","deregistered"]},"vatReportingRequired":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"canPrepareVatReturn":{"type":"boolean"},"canSubmitVatReturn":{"type":"boolean"},"canExportVatReturn":{"type":"boolean"},"reportingConfigStatus":{"type":"string","enum":["not_applicable","needs_classification","missing","incomplete","ready","conflict"]},"diagnostics":{"type":"array","items":{"type":"object","required":["code","messageKey","severity","blocking"],"properties":{"code":{"type":"string"},"messageKey":{"type":"string"},"severity":{"type":"string","enum":["error","warning","info"]},"blocking":{"type":"boolean"},"actions":{"type":"array","items":{"type":"object","required":["kind","labelKey","href"],"properties":{"kind":{"type":"string","enum":["section","document","list"]},"labelKey":{"type":"string"},"href":{"type":"string"}}}},"meta":{"type":"object","additionalProperties":true}}}},"currentReportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"currentFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"currentVatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"activeXmlProfile":{"type":"string"},"config":{"allOf":[{"type":"object","required":["id","companyId","tenantId","countryCode","windows","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date","nullable":true},"windows":{"type":"array","items":{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}],"nullable":true},"activeWindow":{"allOf":[{"type":"object","required":["key","reportingMethod","filingFrequency","effectiveFrom"],"properties":{"key":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","required":["activityKey","label","approvedRate"],"properties":{"activityKey":{"type":"string"},"label":{"type":"string"},"approvedRate":{"type":"number"},"estvApprovalRef":{"type":"string","nullable":true},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}},"revenueAccountCodes":{"type":"array","items":{"type":"string"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}}}}],"nullable":true},"activeMethodConfig":{"allOf":[{"type":"object","required":["reportingMethod","boxes","mappings"],"properties":{"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"defaultFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"requiresAnnualApproval":{"type":"boolean"},"computationStrategy":{"type":"string","enum":["effective","net_tax_rate"]},"formNameKey":{"type":"string"},"allowedFilingFrequencies":{"type":"array","items":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]}},"submissionMode":{"type":"string","enum":["skill","lifecycle"]},"submissionSkillName":{"type":"string"},"boxes":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"labelKey":{"type":"string"},"type":{"type":"string","enum":["base","tax","calculated"]}}}},"mappings":{"type":"array","items":{"type":"object","required":["vatRuleCode"],"properties":{"vatRuleCode":{"type":"string"},"salesBaseBox":{"type":"string"},"salesTaxBox":{"type":"string"},"purchaseBaseBox":{"type":"string"},"purchaseTaxBox":{"type":"string"},"baseBox":{"type":"string"},"taxBox":{"type":"string"},"echSalesTarget":{"type":"string"},"echPurchaseTarget":{"type":"string"}}}},"ech0217":{"type":"object","required":["schemaVersion","profile","reportingMethod","formOfReporting"],"properties":{"schemaVersion":{"type":"string"},"profile":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"formOfReporting":{"type":"number","enum":[1,2]},"grossOrNet":{"type":"number","enum":[1,2]},"initialSubmissionType":{"type":"number","enum":[1,2,3]},"correctionSubmissionType":{"type":"number","enum":[2,3]},"supportedDeclarationTypes":{"type":"array","items":{"type":"string"}}}}}}],"nullable":true}}},"periodAdjustments":{"type":"array","items":{"type":"object","required":["id","companyId","tenantId","countryCode","period","reportingMethod","entries","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"companyId":{"type":"string"},"tenantId":{"type":"string"},"countryCode":{"type":"string"},"period":{"type":"string"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"reportingWindowKey":{"type":"string","nullable":true},"entries":{"type":"array","items":{"type":"object","required":["adjustmentType","amount"],"properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number"},"turnover":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3},"applies":{"type":"boolean"},"note":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}}}}}}}},"RecordRelationshipPolicy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}},"RelationSummaryBadge":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}},"RelationSummaryItem":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}},"RelationSummaryCollection":{"type":"object","required":["key","label","items","totalCount","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"totalCount":{"type":"number"},"viewAllHref":{"type":"string"},"summary":{"type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["loading","known","unavailable","forbidden","error"]},"count":{"type":"number"}}},"items":{"type":"array","items":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}},"RelationSummaryAction":{"type":"object","required":["key","relationshipKey","label"],"properties":{"key":{"type":"string"},"relationshipKey":{"type":"string"},"label":{"type":"string"},"href":{"type":"string"},"intent":{"type":"string","enum":["navigation","utility"]},"variant":{"type":"string","enum":["default","secondary","outline"]},"permission":{"type":"string"}}},"EntityRelationsSummaryPartialFailure":{"type":"object","required":["hasPartialFailure","failedKeys"],"properties":{"hasPartialFailure":{"type":"boolean"},"failedKeys":{"type":"array","items":{"type":"string"}}}},"EntityRelationsSummary":{"type":"object","required":["routeId","entityType","entityId","primary","collections","actions"],"properties":{"routeId":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"primary":{"type":"array","items":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"collections":{"type":"array","items":{"type":"object","required":["key","label","items","totalCount","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"totalCount":{"type":"number"},"viewAllHref":{"type":"string"},"summary":{"type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["loading","known","unavailable","forbidden","error"]},"count":{"type":"number"}}},"items":{"type":"array","items":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"actions":{"type":"array","items":{"type":"object","required":["key","relationshipKey","label"],"properties":{"key":{"type":"string"},"relationshipKey":{"type":"string"},"label":{"type":"string"},"href":{"type":"string"},"intent":{"type":"string","enum":["navigation","utility"]},"variant":{"type":"string","enum":["default","secondary","outline"]},"permission":{"type":"string"}}}},"partialFailure":{"type":"object","required":["hasPartialFailure","failedKeys"],"properties":{"hasPartialFailure":{"type":"boolean"},"failedKeys":{"type":"array","items":{"type":"string"}}}}}},"EntityRelationsSummaryResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["summary"],"properties":{"summary":{"type":"object","required":["routeId","entityType","entityId","primary","collections","actions"],"properties":{"routeId":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"primary":{"type":"array","items":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"collections":{"type":"array","items":{"type":"object","required":["key","label","items","totalCount","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"totalCount":{"type":"number"},"viewAllHref":{"type":"string"},"summary":{"type":"object","required":["state"],"properties":{"state":{"type":"string","enum":["loading","known","unavailable","forbidden","error"]},"count":{"type":"number"}}},"items":{"type":"array","items":{"type":"object","required":["key","label","entityType","policy"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"entityType":{"type":"string","enum":["contact_person","contact_organization","crm_lead","crm_opportunity","customer_account","service_contract","project","quote","order","invoice"]},"entityId":{"type":"string"},"href":{"type":"string"},"description":{"type":"string"},"count":{"type":"number"},"isArchived":{"type":"boolean"},"badges":{"type":"array","items":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["default","success","warning","destructive","secondary","outline"]}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"policy":{"type":"object","required":["direction","onForbidden","emptyBehavior","archivedPolicy"],"properties":{"direction":{"type":"string","enum":["source","target","both"]},"onForbidden":{"type":"string","enum":["hide","teaser"]},"emptyBehavior":{"type":"string","enum":["hide","placeholder","cta"]},"archivedPolicy":{"type":"object","required":["strip","section","list"],"properties":{"strip":{"type":"string","enum":["exclude"]},"section":{"type":"string","enum":["exclude","show_badge"]},"list":{"type":"string","enum":["exclude","include"]}}},"primarySelection":{"type":"string","enum":["primary_flag","active_first","open_first","recent_first"]},"permission":{"type":"string"}}}}}},"actions":{"type":"array","items":{"type":"object","required":["key","relationshipKey","label"],"properties":{"key":{"type":"string"},"relationshipKey":{"type":"string"},"label":{"type":"string"},"href":{"type":"string"},"intent":{"type":"string","enum":["navigation","utility"]},"variant":{"type":"string","enum":["default","secondary","outline"]},"permission":{"type":"string"}}}},"partialFailure":{"type":"object","required":["hasPartialFailure","failedKeys"],"properties":{"hasPartialFailure":{"type":"boolean"},"failedKeys":{"type":"array","items":{"type":"string"}}}}}}}}}},"AccessPermissionImpactLink":{"type":"object","required":["portal","pathTemplate"],"properties":{"portal":{"type":"string"},"pathTemplate":{"type":"string"}}},"AccessPermissionItem":{"type":"object","required":["code","module","action"],"properties":{"code":{"type":"string"},"module":{"type":"string"},"action":{"type":"string"},"description":{"type":"string"},"labelKey":{"type":"string"},"businessDescriptionKey":{"type":"string"},"riskLevel":{"type":"string","enum":["read","write","critical"]},"moduleLabelKey":{"type":"string"},"isInfrastructure":{"type":"boolean"},"linkedPages":{"type":"array","items":{"type":"object","required":["portal","pathTemplate"],"properties":{"portal":{"type":"string"},"pathTemplate":{"type":"string"}}}}}},"AccessPermissionsListData":{"type":"object","required":["permissions"],"properties":{"permissions":{"type":"array","items":{"type":"object","required":["code","module","action"],"properties":{"code":{"type":"string"},"module":{"type":"string"},"action":{"type":"string"},"description":{"type":"string"},"labelKey":{"type":"string"},"businessDescriptionKey":{"type":"string"},"riskLevel":{"type":"string","enum":["read","write","critical"]},"moduleLabelKey":{"type":"string"},"isInfrastructure":{"type":"boolean"},"linkedPages":{"type":"array","items":{"type":"object","required":["portal","pathTemplate"],"properties":{"portal":{"type":"string"},"pathTemplate":{"type":"string"}}}}}}}}},"AccessPermissionsListSuccessResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["permissions"],"properties":{"permissions":{"type":"array","items":{"type":"object","required":["code","module","action"],"properties":{"code":{"type":"string"},"module":{"type":"string"},"action":{"type":"string"},"description":{"type":"string"},"labelKey":{"type":"string"},"businessDescriptionKey":{"type":"string"},"riskLevel":{"type":"string","enum":["read","write","critical"]},"moduleLabelKey":{"type":"string"},"isInfrastructure":{"type":"boolean"},"linkedPages":{"type":"array","items":{"type":"object","required":["portal","pathTemplate"],"properties":{"portal":{"type":"string"},"pathTemplate":{"type":"string"}}}}}}}}}}},"ContactsCompanySummaryView":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"ContactsPersonSummaryView":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"ContactsPersonView":{"type":"object","required":["id","tenantId","companyId","status","firstName","lastName","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"salutation":{"type":"string"},"jobTitle":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string"},"iban":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"type":"string"},"primaryOrganization":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ContactsCompanyContactView":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}},"ContactsAddressView":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ContactsAddressOwnerView":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"ContactsAddressLinkView":{"type":"object","required":["id","tenantId","addressId","ownerType","ownerId","usage","isPrimary","createdAt","updatedAt","address","owner","addressFormatted","ownerDisplayName"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"addressId":{"type":"string"},"ownerType":{"type":"string","enum":["PERSON","COMPANY"]},"ownerId":{"type":"string"},"usage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"owner":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"addressFormatted":{"type":"string"},"ownerDisplayName":{"type":"string"}}},"ContactsPersonsListData":{"type":"object","required":["persons","total"],"properties":{"persons":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","status","firstName","lastName","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"salutation":{"type":"string"},"jobTitle":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string"},"iban":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"type":"string"},"primaryOrganization":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"}}},"ContactsPersonData":{"type":"object","required":["person"],"properties":{"person":{"type":"object","required":["id","tenantId","companyId","status","firstName","lastName","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"salutation":{"type":"string"},"jobTitle":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string"},"iban":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"type":"string"},"primaryOrganization":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}},"ContactsCompanyContactsListData":{"type":"object","required":["contacts","total"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}},"total":{"type":"integer"}}},"ContactsCompanyContactsCollectionData":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}}}},"ContactsCompanyContactData":{"type":"object","required":["contact"],"properties":{"contact":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}}},"ContactsAddressesListData":{"type":"object","required":["addresses","total"],"properties":{"addresses":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"}}},"ContactsAddressData":{"type":"object","required":["address"],"properties":{"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}},"ContactsAddressLinksCollectionData":{"type":"object","required":["links"],"properties":{"links":{"type":"array","items":{"type":"object","required":["id","tenantId","addressId","ownerType","ownerId","usage","isPrimary","createdAt","updatedAt","address","owner","addressFormatted","ownerDisplayName"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"addressId":{"type":"string"},"ownerType":{"type":"string","enum":["PERSON","COMPANY"]},"ownerId":{"type":"string"},"usage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"owner":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"addressFormatted":{"type":"string"},"ownerDisplayName":{"type":"string"}}}}}},"ContactsAddressLinkData":{"type":"object","required":["link"],"properties":{"link":{"type":"object","required":["id","tenantId","addressId","ownerType","ownerId","usage","isPrimary","createdAt","updatedAt","address","owner","addressFormatted","ownerDisplayName"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"addressId":{"type":"string"},"ownerType":{"type":"string","enum":["PERSON","COMPANY"]},"ownerId":{"type":"string"},"usage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"owner":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"addressFormatted":{"type":"string"},"ownerDisplayName":{"type":"string"}}}}},"ContactsPersonsListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["persons","total"],"properties":{"persons":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","status","firstName","lastName","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"salutation":{"type":"string"},"jobTitle":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string"},"iban":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"type":"string"},"primaryOrganization":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"}}}}},"ContactsPersonResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["person"],"properties":{"person":{"type":"object","required":["id","tenantId","companyId","status","firstName","lastName","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"salutation":{"type":"string"},"jobTitle":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string"},"iban":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"type":"string"},"primaryOrganization":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}},"ContactsCompanyContactsListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["contacts","total"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}},"total":{"type":"integer"}}}}},"ContactsCompanyContactsCollectionResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}}}}}},"ContactsCompanyContactResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["contact"],"properties":{"contact":{"type":"object","required":["id","tenantId","companyId","personId","type","displayName","name","roles","isPrimary","createdAt","updatedAt","person"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"personId":{"type":"string"},"type":{"type":"string","enum":["PERSON"]},"displayName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"person":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"company":{"type":"object","required":["id","displayName"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"}}},"companyName":{"type":"string"}}}}}}},"ContactsAddressesListResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["addresses","total"],"properties":{"addresses":{"type":"array","items":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"}}}}},"ContactsAddressResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["address"],"properties":{"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}}},"ContactsAddressLinksCollectionResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["links"],"properties":{"links":{"type":"array","items":{"type":"object","required":["id","tenantId","addressId","ownerType","ownerId","usage","isPrimary","createdAt","updatedAt","address","owner","addressFormatted","ownerDisplayName"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"addressId":{"type":"string"},"ownerType":{"type":"string","enum":["PERSON","COMPANY"]},"ownerId":{"type":"string"},"usage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"owner":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"addressFormatted":{"type":"string"},"ownerDisplayName":{"type":"string"}}}}}}}},"ContactsAddressLinkResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","required":["link"],"properties":{"link":{"type":"object","required":["id","tenantId","addressId","ownerType","ownerId","usage","isPrimary","createdAt","updatedAt","address","owner","addressFormatted","ownerDisplayName"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"addressId":{"type":"string"},"ownerType":{"type":"string","enum":["PERSON","COMPANY"]},"ownerId":{"type":"string"},"usage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"address":{"type":"object","required":["id","tenantId","companyId","status","street","postalCode","city","country","formatted","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"companyId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"lifecycleReason":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"notes":{"type":"string"},"formatted":{"type":"string"},"archivedAt":{"type":"string","format":"date-time"},"archivedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"owner":{"type":"object","required":["type","id","displayName"],"properties":{"type":{"type":"string","description":"Owner type label mirror (PERSON or COMPANY)"},"id":{"type":"string"},"displayName":{"type":"string"}}},"addressFormatted":{"type":"string"},"ownerDisplayName":{"type":"string"}}}}}}},"PaginationQuery":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of items to return"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Number of items to skip"}}},"PaginationResponse":{"type":"object","properties":{"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"total":{"type":"integer","example":100,"description":"Total number of items available"},"hasMore":{"type":"boolean","example":true,"description":"Whether there are more items available"}}},"CompanyAccessMode":{"type":"object","description":"AccessMode for Company Portal (/c). Automatically resolved by backend.","properties":{"portal":{"type":"string","enum":["company"],"example":"company"},"userId":{"type":"string","description":"User ID"},"tenantId":{"type":"string","description":"Tenant ID"},"companyId":{"type":"string","description":"Company ID"}}},"TenantAccessMode":{"type":"object","description":"AccessMode for Tenant Portal (/t). Automatically resolved by backend.","properties":{"portal":{"type":"string","enum":["tenant"],"example":"tenant"},"userId":{"type":"string","description":"User ID"},"tenantId":{"type":"string","description":"Tenant ID"}}},"PartnerAccessMode":{"type":"object","description":"AccessMode for Partner Portal (/p). Automatically resolved by backend.","properties":{"portal":{"type":"string","enum":["partner"],"example":"partner"},"userId":{"type":"string","description":"User ID"},"accessibleCompanyIds":{"type":"array","items":{"type":"string"},"description":"List of company IDs accessible by this partner"}}},"SuperadminAccessMode":{"type":"object","description":"AccessMode for Superadmin Portal (/s). Automatically resolved by backend.","properties":{"portal":{"type":"string","enum":["superadmin"],"example":"superadmin"},"userId":{"type":"string","description":"Superadmin user ID"}}},"InternalAccessMode":{"type":"object","description":"AccessMode for Internal Portal (/i). Automatically resolved by backend.","properties":{"portal":{"type":"string","enum":["internal"],"example":"internal"},"userId":{"type":"string","description":"Internal user ID"}}},"LocalizedText":{"type":"object","required":["resolvedTitle"],"properties":{"titleKey":{"type":"string","nullable":true,"description":"Optional i18n key for title"},"descriptionKey":{"type":"string","nullable":true,"description":"Optional i18n key for description"},"resolvedTitle":{"type":"string","description":"Resolved display title for the current locale"},"resolvedDescription":{"type":"string","nullable":true,"description":"Resolved display description for the current locale"}}},"Task":{"type":"object","required":["id","entityType","entityId","title","status","priority","createdByUserId","tenantId","portal","createdAt","updatedAt","resolvedTitle"],"properties":{"id":{"type":"string","description":"Task ID"},"entityType":{"type":"string","enum":["invoice","document","task","user","order","company","tenant"],"description":"Entity type this task is associated with"},"entityId":{"type":"string","description":"Entity ID this task is associated with"},"title":{"type":"string","description":"Task title"},"description":{"type":"string","nullable":true,"description":"Task description"},"titleKey":{"type":"string","nullable":true,"description":"Optional i18n key backing the task title"},"descriptionKey":{"type":"string","nullable":true,"description":"Optional i18n key backing the task description"},"resolvedTitle":{"type":"string","description":"Resolved display title for the current locale"},"resolvedDescription":{"type":"string","nullable":true,"description":"Resolved display description for the current locale"},"status":{"type":"string","enum":["open","in_progress","blocked","done"],"description":"Task status"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"nullable":true,"description":"Task priority"},"assigneeUserId":{"type":"string","nullable":true,"description":"User ID assigned to this task"},"createdByUserId":{"type":"string","description":"User ID who created this task"},"dueDate":{"type":"string","format":"date-time","nullable":true,"description":"Task due date"},"completedAt":{"type":"string","format":"date-time","nullable":true,"description":"Task completion date"},"tenantId":{"type":"string","description":"Tenant ID"},"companyId":{"type":"string","nullable":true,"description":"Company ID"},"portal":{"type":"string","enum":["company","tenant","partner","internal","superadmin"],"description":"Portal this task belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Task creation date"},"updatedAt":{"type":"string","format":"date-time","description":"Task last update date"}}},"CompanyFollowUpEventBadge":{"type":"object","required":["kind","key"],"properties":{"kind":{"type":"string","enum":["type","category"]},"key":{"type":"string"},"label":{"type":"string","nullable":true}}},"CompanyFollowUpEventAction":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["complete","reopen","snooze","dismiss","archive"]}}},"CompanyFollowUpEvent":{"type":"object","required":["id","sourceType","sourceId","title","resolvedTitle","dueAt","status","priority","deepLink","badges","actions"],"properties":{"id":{"type":"string","description":"Follow-up event identifier (<sourceType>:<sourceId>)"},"sourceType":{"type":"string","enum":["compliance","task","approval","reminder"]},"sourceId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"titleKey":{"type":"string","nullable":true},"descriptionKey":{"type":"string","nullable":true},"resolvedTitle":{"type":"string"},"resolvedDescription":{"type":"string","nullable":true},"dueAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","due_soon","overdue","blocked","done"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"assigneeUserId":{"type":"string","nullable":true},"deepLink":{"type":"string"},"badges":{"type":"array","items":{"type":"object","required":["kind","key"],"properties":{"kind":{"type":"string","enum":["type","category"]},"key":{"type":"string"},"label":{"type":"string","nullable":true}}}},"actions":{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["complete","reopen","snooze","dismiss","archive"]}}}}}},"PrepareUploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/tiff","image/bmp","image/gif","image/webp","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","text/plain","text/csv","application/csv","audio/mpeg","audio/mp3","audio/wav","audio/x-wav","audio/mp4"]},"folderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true}},"required":["filename","contentType"]},"ConfirmUploadRequest":{"type":"object","properties":{"storageKey":{"type":"string","minLength":1},"visibilityContext":{"type":"string","enum":["personal"]},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/tiff","image/bmp","image/gif","image/webp","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","text/plain","text/csv","application/csv","audio/mpeg","audio/mp3","audio/wav","audio/x-wav","audio/mp4"]},"size":{"type":"number","minimum":0,"exclusiveMinimum":true},"folderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"metadata":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"relatedEntityType":{"oneOf":[{"type":"string","enum":["bill","expense","purchase_order","invoice","order","quote","delivery_note","credit_note","closing_run","closing_note","service_contract","payroll_run","payroll_declaration","contract"]},{"type":"string","enum":["payroll.run","employee_contract","social_security_declaration"]}]},"relatedEntityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"ingestion":{"type":"object","properties":{"source":{"type":"string","enum":["picker_upload"]}},"required":["source"]}}}},"required":["storageKey","filename","contentType","size"]},"UpdateDocumentRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"folderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"metadata":{"type":"object","properties":{"relatedEntityType":{"oneOf":[{"type":"string","enum":["bill","expense","purchase_order","invoice","order","quote","delivery_note","credit_note","closing_run","closing_note","service_contract","payroll_run","payroll_declaration","contract"]},{"type":"string","enum":["payroll.run","employee_contract","social_security_declaration"]}]},"relatedEntityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}}}},"ListDocumentsQuery":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"status":{"type":"array","items":{"type":"string","enum":["pending_processing","processing","processed","processing_failed","deleted"]}},"folderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"libraryRoot":{"type":"boolean"},"recordState":{"type":"string","enum":["active","archived"]},"includeArchived":{"type":"boolean"},"archivedOnly":{"type":"boolean"},"accessScope":{"type":"string","enum":["private","shared_with_me","company"]},"ownerUserId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"relatedEntityType":{"oneOf":[{"type":"string","enum":["bill","expense","purchase_order","invoice","order","quote","delivery_note","credit_note","closing_run","closing_note","service_contract","payroll_run","payroll_declaration","contract"]},{"type":"string","enum":["payroll.run","employee_contract","social_security_declaration"]}]},"relatedEntityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"lifecycleStage":{"type":"string","enum":["document_only","processing","classified","routed","work_item_created","draft_created","pending_approval","finalized","exception"]},"automationOutcome":{"type":"string","enum":["none","manual_only","auto_draft_created","blocked_by_policy","blocked_by_confidence","blocked_by_duplicates"]},"folderRoutingStatus":{"type":"string","enum":["disabled","no_folders","no_suggestion","suggested","applied","failed","rejected"]},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0}}},"ClassifyDocumentInput":{"type":"object","properties":{"extractedText":{"type":"string","minLength":1},"extractedEntities":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1}},"required":["extractedText"]},"CreateInvoiceRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"status":{"type":"string","enum":["draft","issued","paid","cancelled"],"default":"draft"},"description":{"type":"string","nullable":true},"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"servicePeriodStart":{"type":"string","format":"date-time"},"servicePeriodEnd":{"type":"string","format":"date-time"},"recognitionPolicyRef":{"type":"string","minLength":1},"taxPointDate":{"type":"string","format":"date-time"},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"]},"taxConfiguration":{"type":"string","enum":["exclusive","inclusive"]},"invoiceNumber":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true},"categoryId":{"type":"string","minLength":1,"nullable":true},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceTimeEntryIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceExpenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceDocumentIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}},"required":["description","quantity","unitPrice"]}},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"paymentReference":{"type":"string"},"qrIban":{"type":"string"},"qrReference":{"type":"string"},"customerAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOrderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOrderLineRefs":{"type":"array","items":{"type":"object","properties":{"orderLineIndex":{"type":"integer","minimum":0},"orderLineId":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["orderLineIndex","quantity"]}},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceQuoteId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceRecurringRunId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"billingPeriodKey":{"type":"string","minLength":1},"type":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"originalInvoiceId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"customFieldValues":{"type":"object","additionalProperties":{}},"financialPolicyPrecondition":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"expectedFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceArgsHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"canonicalArgsHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceArgs":{"type":"object","additionalProperties":{}}},"required":["version","expectedFingerprint","sourceArgsHash","canonicalArgsHash","sourceArgs"]}},"required":["items"]},"UpdateInvoiceRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"status":{"type":"string","enum":["draft","issued","paid","cancelled"]},"description":{"type":"string"},"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"servicePeriodStart":{"type":"string","format":"date-time","nullable":true},"servicePeriodEnd":{"type":"string","format":"date-time","nullable":true},"recognitionPolicyRef":{"type":"string","minLength":1,"nullable":true},"taxPointDate":{"type":"string","format":"date-time","nullable":true},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"]},"taxConfiguration":{"type":"string","enum":["exclusive","inclusive"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true},"categoryId":{"type":"string","minLength":1,"nullable":true},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceTimeEntryIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceExpenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceDocumentIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}},"required":["description","quantity","unitPrice","vatRate"]}},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"paymentReference":{"type":"string"},"qrIban":{"type":"string"},"qrReference":{"type":"string"},"customerAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"originalInvoiceId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateOrderRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"status":{"type":"string","enum":["draft"],"default":"draft"},"description":{"type":"string"},"orderDate":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"]},"orderNumber":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true}},"required":["description","quantity","unitPrice","vatRate"]}},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"customerAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceQuoteId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["items","counterparty"]},"UpdateOrderRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"description":{"type":"string"},"orderDate":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true}},"required":["description","quantity","unitPrice","vatRate"]}},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"customerAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateCommentRequest":{"type":"object","properties":{"entityType":{"type":"string","enum":["invoice","document","task","user","order","company","tenant","bank_account","bank_transaction","payment","approval","crm_lead","crm_deal","quote","bill","expense","purchase_order","expense_report","credit_note","budget","vendor","project","time_entry","project_expense","project_task","product","warehouse","stock_transfer","adjustment","stocktake","batch_tracking","serial_tracking","return","inventory_category","employee","leave_request","performance_review","payroll_run","payroll_declaration","contract","ledger_entry","journal","ledger_sequence","chart_account","fiscal_period","fixed_asset","netting_batch","closing_run","closing_note","approval_automation","approval_template","contact_person","contact_organization","contact_address","contact_address_link","customer_account","service_contract","service_portfolio","country","module","document_template","compliance_declaration","note"]},"entityId":{"type":"string","minLength":1},"parentId":{"type":"string"},"message":{"type":"string","minLength":1,"maxLength":10000},"mentions":{"type":"array","items":{"type":"string"}}},"required":["entityType","entityId","message"]},"UpdateCommentRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":10000}}},"CreateTaskRequest":{"type":"object","properties":{"entityType":{"type":"string","minLength":1,"maxLength":50},"entityId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"assigneeUserId":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","blocked","done"],"default":"open"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"default":"medium"},"blockedReason":{"type":"string","enum":["missing_client_info","waiting_approval","dependency_blocked","other"]},"waitingOn":{"type":"string","enum":["client","partner","internal","none"]},"metadata":{"type":"object","additionalProperties":{}},"dueDate":{"type":"string","format":"date-time"}},"required":["entityType","entityId","title"]},"UpdateTaskRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"status":{"type":"string","enum":["open","in_progress","blocked","done"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"blockedReason":{"type":"string","enum":["missing_client_info","waiting_approval","dependency_blocked","other"]},"waitingOn":{"type":"string","enum":["client","partner","internal","none"]},"metadata":{"type":"object","additionalProperties":{}},"assigneeUserId":{"type":"string"},"dueDate":{"type":"string","format":"date-time"}}},"ListTasksQuery":{"type":"object","properties":{"entityType":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1},"assigneeUserId":{"type":"string","minLength":1},"assignedToMe":{"type":"boolean"},"status":{"type":"string","enum":["open","in_progress","blocked","done"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"dueDateFrom":{"type":"string","format":"date-time"},"dueDateTo":{"type":"string","format":"date-time"},"search":{"type":"string","minLength":1},"createdByUserId":{"type":"string","minLength":1},"createdAfter":{"type":"string","format":"date-time"},"createdBefore":{"type":"string","format":"date-time"},"hasAssignee":{"type":"boolean"},"blockedReason":{"type":"string","enum":["missing_client_info","waiting_approval","dependency_blocked","other"]},"waitingOn":{"type":"string","enum":["client","partner","internal","none"]},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"offset":{"type":"integer","minimum":0},"cursor":{"type":"string","minLength":1}}},"CreatePersonRequest":{"type":"object","properties":{"salutation":{"type":"string"},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"jobTitle":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string","minLength":1},"iban":{"type":"string","minLength":5,"maxLength":34},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"not":{},"description":"This field must not be provided."},"source":{"type":"string","minLength":1},"sourceMetadata":{"type":"object","additionalProperties":{}},"tagIds":{"type":"array","items":{"type":"string","minLength":1}},"recordState":{"type":"string","enum":["active","archived"]},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["firstName","lastName"]},"UpdatePersonRequest":{"type":"object","properties":{"salutation":{"type":"string"},"firstName":{"type":"string","minLength":1},"lastName":{"type":"string","minLength":1},"jobTitle":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"mobile":{"type":"string"},"countryCode":{"type":"string"},"fiscalIdentifier":{"type":"string","minLength":1},"iban":{"type":"string","minLength":5,"maxLength":34},"language":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"notes":{"not":{},"description":"This field must not be provided."},"recordState":{"type":"string","enum":["active","archived"]},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateCompanyContactRequest":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"personId":{"type":"string","minLength":1},"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean","default":false},"notes":{"type":"string"}},"required":["personId","roles"]},"UpdateCompanyContactRequest":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string","enum":["CLIENT","SUPPLIER","EMPLOYEE","LEGAL_REP","BILLING_CONTACT","SHIPPING_CONTACT","ACCOUNTING_CONTACT","ADMIN"]}},"isPrimary":{"type":"boolean"},"notes":{"type":"string"}}},"CreateAddressRequest":{"type":"object","properties":{"street":{"type":"string","minLength":1},"streetNumber":{"type":"string"},"postalCode":{"type":"string","minLength":1},"city":{"type":"string","minLength":1},"state":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"notes":{"type":"string"},"recordState":{"type":"string","enum":["active","archived"]}},"required":["street","postalCode","city","country"]},"UpdateAddressRequest":{"type":"object","properties":{"street":{"type":"string","minLength":1},"streetNumber":{"type":"string"},"postalCode":{"type":"string","minLength":1},"city":{"type":"string","minLength":1},"state":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"notes":{"type":"string"},"recordState":{"type":"string","enum":["active","archived"]}}},"CreateAddressLinkRequest":{"type":"object","properties":{"addressId":{"type":"string","minLength":1},"ownerType":{"type":"string","enum":["PERSON","COMPANY","ORGANIZATION","WAREHOUSE"]},"ownerId":{"type":"string","minLength":1},"usage":{"type":"string","enum":["REGISTERED","BILLING","SHIPPING","LEGAL","BRANCH","WAREHOUSE","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean","default":false},"notes":{"type":"string"}},"required":["addressId","ownerType","ownerId","usage"]},"UpdateAddressLinkRequest":{"type":"object","properties":{"usage":{"type":"string","enum":["REGISTERED","BILLING","SHIPPING","LEGAL","BRANCH","WAREHOUSE","PRIVATE","OTHER"]},"isPrimary":{"type":"boolean"},"notes":{"type":"string"}}},"UpdateTenantRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"billingInfo":{"type":"object","properties":{"planId":{"type":"string"},"subscriptionId":{"type":"string"},"stripeCustomerId":{"type":"string"},"billingCycle":{"type":"string","enum":["monthly","annual"]},"subscriptionStatus":{"type":"string"},"billingType":{"type":"string","enum":["tenant_plan"]},"subscriptionItemId":{"type":"string"},"seatQuantity":{"type":"integer","minimum":0},"seatSyncUpdatedAt":{"type":"string","format":"date-time"}}},"settings":{"type":"object","additionalProperties":{}},"featureOverrides":{"type":"object","additionalProperties":{}},"billingOverride":{"type":"object","properties":{"planId":{"type":"string","enum":["starter","plus","pro","enterprise"]},"mode":{"type":"string","enum":["internal_force","comped_stripe"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time","nullable":true},"reason":{"type":"string","minLength":3,"maxLength":500},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stripeCouponId":{"type":"string"},"stripeSubscriptionId":{"type":"string"},"stripeDiscountAppliedAt":{"type":"string","format":"date-time"},"removeStripeDiscountOnExpiry":{"type":"boolean"}},"required":["planId","mode","startsAt","reason","createdBy","createdAt","updatedAt"]}}},"UpdateNotificationPreferencesRequest":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":{"type":"object","properties":{"email":{"type":"boolean"},"in_app":{"type":"boolean"}},"required":["email","in_app"]}},"eventPreferences":{"type":"array","items":{"type":"object","properties":{"eventKey":{"type":"string","minLength":1},"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"required":["eventKey","email","inApp"]}},"emailEnabled":{"type":"boolean"},"inAppEnabled":{"type":"boolean"},"quietHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([0-1][0-9]|2[0-3]):[0-5][0-9]$"},"end":{"type":"string","pattern":"^([0-1][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1}},"required":["start","end","timezone"],"nullable":true}}},"UpdateUserPreferencesRequest":{"type":"object","properties":{"theme":{"type":"string","enum":["system","light","dark"]},"tablePreferences":{"type":"object","additionalProperties":{"type":"object","properties":{"tableId":{"type":"string","minLength":1},"metadataVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"visibleColumnKeys":{"type":"array","items":{"type":"string","minLength":1}},"columnOrder":{"type":"array","items":{"type":"string","minLength":1}},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"visible":{"type":"boolean"},"width":{"type":"number"},"order":{"type":"integer"},"pinning":{"type":"string","enum":["left","right"]}},"required":["id","visible"]}},"cardSlots":{"type":"object","properties":{"subtitleFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"primaryMetricFieldId":{"type":"array","items":{"type":"string","minLength":1}},"statusFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"secondaryFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"metaFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"chipFieldIds":{"type":"array","items":{"type":"string","minLength":1}}}},"sort":{"type":"object","properties":{"column":{"type":"string","minLength":1},"direction":{"type":"string","enum":["asc","desc"]}},"required":["column","direction"]},"pageSize":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","minLength":1}},"required":["columns"]}},"uiPreferences":{"type":"object","additionalProperties":{}}}},"TablePreferenceRequest":{"type":"object","properties":{"tableId":{"type":"string","minLength":1},"metadataVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"visibleColumnKeys":{"type":"array","items":{"type":"string","minLength":1}},"columnOrder":{"type":"array","items":{"type":"string","minLength":1}},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"visible":{"type":"boolean"},"width":{"type":"number"},"order":{"type":"integer"},"pinning":{"type":"string","enum":["left","right"]}},"required":["id","visible"]}},"cardSlots":{"type":"object","properties":{"subtitleFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"primaryMetricFieldId":{"type":"array","items":{"type":"string","minLength":1}},"statusFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"secondaryFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"metaFieldIds":{"type":"array","items":{"type":"string","minLength":1}},"chipFieldIds":{"type":"array","items":{"type":"string","minLength":1}}}},"sort":{"type":"object","properties":{"column":{"type":"string","minLength":1},"direction":{"type":"string","enum":["asc","desc"]}},"required":["column","direction"]},"pageSize":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","minLength":1}},"required":["columns"]},"CreateCompanyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"businessLocale":{"type":"string","minLength":5,"maxLength":32,"nullable":true},"canton":{"type":"string"},"legalIdentifiers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"legalForm":{"type":"string","minLength":1},"fiscalYearStart":{"type":"object","properties":{"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["month","day"]},"cctApplicability":{"type":"string","enum":["unknown","not_applicable","applicable"]},"defaultCctFamilyCode":{"type":"string","minLength":1,"nullable":true},"cctNonApplicabilityReason":{"type":"string","minLength":1,"maxLength":1000,"nullable":true},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date-time"},"vatDeregistrationDate":{"type":"string","format":"date-time","nullable":true},"vatFilingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatReportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod"]},"hasEmployees":{"type":"boolean"},"firstPayrollMonth":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"selectedCct":{"type":"string","minLength":1,"nullable":true}},"required":["name","countryCode"]},"UpdateCompanyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"settings":{"type":"object","additionalProperties":{}}}},"InviteTenantUserRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["TENANT_ADMIN","COMPANY_ADMIN","COMPANY_USER"],"default":"TENANT_ADMIN"},"companyId":{"type":"string"},"groupIds":{"type":"array","items":{"type":"string"}}},"required":["email"]},"UpdateTenantUserRequest":{"type":"object","properties":{"role":{"type":"string","enum":["TENANT_ADMIN","COMPANY_ADMIN","COMPANY_USER"]},"companyIds":{"type":"array","items":{"type":"string"}},"groupIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","SUSPENDED","INVITED"]},"expectedUpdatedAt":{"type":"string","format":"date-time"}}},"InviteCompanyUserRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["COMPANY_ADMIN","COMPANY_USER"]},"groupIds":{"type":"array","items":{"type":"string"}}},"required":["email","role"]},"UpdateCompanyUserRequest":{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","SUSPENDED","INVITED"]},"expectedUpdatedAt":{"type":"string","format":"date-time"}}},"InvitePartnerUserRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["PARTNER_ADMIN","PARTNER_STAFF"]},"groupIds":{"type":"array","items":{"type":"string"}}},"required":["email","role"]},"UpdatePartnerUserRequest":{"type":"object","properties":{"role":{"type":"string","enum":["PARTNER_ADMIN","PARTNER_STAFF"]},"groupIds":{"type":"array","items":{"type":"string"}},"allowedCompanyIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","SUSPENDED","INVITED"]},"profile":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"language":{"type":"string","enum":["fr","en","de","it"]},"timezone":{"type":"string"}}},"operationsProfile":{"type":"object","properties":{"defaultGrade":{"type":"string","enum":["assistant","associate","senior","manager","director","partner"]},"defaultRole":{"type":"string","enum":["lead","delivery","review","backup"]},"defaultHourlyRate":{"type":"number","minimum":0},"defaultMonthlyCapacityHours":{"type":"number","minimum":0},"defaultScopeProcesses":{"type":"array","items":{"type":"string","minLength":1}},"operationsActive":{"type":"boolean"}}},"expectedUpdatedAt":{"type":"string","format":"date-time"}}},"CreateGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissionCodes":{"type":"array","items":{"type":"string"}}},"required":["name"]},"UpdateGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissionCodes":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}}},"TenantSettingsGeneralRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"type":"string"},"timezone":{"type":"string","minLength":1},"locale":{"type":"string","enum":["fr","en","de","it"]},"currency":{"type":"string"},"dateFormat":{"type":"string","enum":["DD/MM/YYYY","MM/DD/YYYY","YYYY-MM-DD","DD.MM.YYYY","D MMMM YYYY"]},"numberFormat":{"type":"string","enum":["1'234.56","1 234,56","1.234,56","1,234.56"]},"branding":{"type":"object","properties":{"logoStorageKey":{"type":"string","minLength":1,"nullable":true},"logoUrl":{"type":"string","format":"uri","nullable":true}}}}},"CompanySettingsGeneralRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"businessLocale":{"type":"string","minLength":5,"maxLength":32,"nullable":true},"canton":{"type":"string"},"legalIdentifiers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"fiscalYearStart":{"type":"object","properties":{"month":{"type":"number","minimum":1,"maximum":12},"day":{"type":"number","minimum":1,"maximum":31}},"required":["month","day"]},"cctApplicability":{"type":"string","enum":["unknown","not_applicable","applicable"]},"defaultCctFamilyCode":{"type":"string","minLength":1,"nullable":true},"cctNonApplicabilityReason":{"type":"string","minLength":1,"maxLength":1000,"nullable":true},"selectedCct":{"type":"string","minLength":1,"nullable":true},"settings":{"type":"object","properties":{"timezone":{"type":"string","minLength":1,"maxLength":128,"nullable":true},"contact":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string","format":"email"},"website":{"type":"string","format":"uri"}}},"address":{"type":"object","properties":{"street":{"type":"string"},"streetNumber":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"state":{"type":"string"},"canton":{"type":"string"},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}}},"legal":{"type":"object","properties":{"legalForm":{"type":"string"},"registryNumber":{"type":"string"}}},"branding":{"type":"object","properties":{"logoStorageKey":{"type":"string","minLength":1,"nullable":true},"logoUrl":{"type":"string","format":"uri","nullable":true},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3})?$","nullable":true},"secondaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3}(?:[0-9a-fA-F]{3})?$","nullable":true},"fontFamily":{"type":"string","nullable":true},"footerText":{"type":"string","maxLength":300,"nullable":true}}},"banking":{"type":"object","properties":{"iban":{"oneOf":[{"type":"string","pattern":"^[A-Za-z]{2}[0-9]{2}[A-Za-z0-9 ]{11,30}$"},{"type":"string","enum":[""]}],"nullable":true}},"required":["iban"]}}}}},"PartnerSettingsGeneralRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"logoUrl":{"type":"string","format":"uri"},"defaultLocale":{"type":"string","enum":["fr","en","de","it"]},"timezone":{"type":"string","minLength":1},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"legalIdentifiers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["type","value"]}},"contact":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string","format":"email"},"website":{"type":"string","format":"uri"}}},"address":{"type":"object","properties":{"street":{"type":"string"},"streetNumber":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"state":{"type":"string"},"canton":{"type":"string"},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}}},"legal":{"type":"object","properties":{"legalForm":{"type":"string"},"registryNumber":{"type":"string"}}}}}}},"MfaPolicyRequest":{"type":"object","properties":{"enforcement":{"type":"string","enum":["optional","recommended","grace_period","required"]},"gracePeriodEndsAt":{"type":"string","format":"date-time","nullable":true},"allowBackupCodes":{"type":"boolean"},"codeValidityDuration":{"type":"string","enum":["30","60"]},"trustedDevices":{"type":"object","properties":{"enabled":{"type":"boolean"},"ttlDaysAdmin":{"type":"integer","minimum":1,"maximum":90},"ttlDaysUser":{"type":"integer","minimum":1,"maximum":90},"allowedPortals":{"type":"array","items":{"type":"string","enum":["company","tenant","partner"]}}}}}},"PasswordPolicyRequest":{"type":"object","properties":{"minLength":{"type":"number","minimum":8,"maximum":20},"requireUppercase":{"type":"boolean"},"requireLowercase":{"type":"boolean"},"requireNumbers":{"type":"boolean"},"requireSymbols":{"type":"boolean"},"maxAgeDays":{"type":"number","minimum":0,"nullable":true},"historyCount":{"type":"number","minimum":0,"maximum":10},"checkBreached":{"type":"boolean"}}},"CreateConversationRequest":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"]},"content":{"type":"string","minLength":1},"id":{"type":"string","minLength":1,"maxLength":512},"turnId":{"type":"string","minLength":1,"maxLength":512},"providerMessageId":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["web","telegram","whatsapp","automation"]},"timestamp":{"type":"string","format":"date-time"},"toolName":{"type":"string","minLength":1},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","enum":["success","error"]},"structuredContent":{},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["running","success","error","pending_approval"]},"output":{},"id":{"type":"string","minLength":1},"review":{"type":"object","properties":{"approvalId":{"type":"string","minLength":1,"nullable":true},"risk":{"type":"string","enum":["read","write_direct","write_reversible","write_approval_required","write_irreversible"]},"reversible":{"type":"boolean"},"summary":{"type":"string","minLength":1},"preview":{},"frozenToolCall":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}}},"required":["toolName","args"],"nullable":true}}}},"required":["name","args","status"]}}},"required":["role","content"]}},"title":{"type":"string"},"summary":{"type":"string"},"contextSnapshot":{"type":"object","properties":{"entity":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["type","id"]},"accessMode":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"pageUrl":{"type":"string"},"threadId":{"type":"string","minLength":1}},"required":["accessMode"]},"threadStatus":{"type":"string","enum":["running","error","completed_unread","completed_read"]},"readAt":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"lastRunStatus":{"type":"string","enum":["running","completed","error","cancelled"]},"threadOrigin":{"type":"object","properties":{"kind":{"type":"string","enum":["manual","automation","automation_test","channel"]},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"agentRunStartedAt":{"type":"string","format":"date-time"},"automationId":{"type":"string","minLength":1},"automationRunId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"triggerSummary":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"channel":{"type":"string","enum":["telegram","whatsapp"]},"humanWaitState":{"type":"string","enum":["approval","clarification"],"nullable":true}},"required":["kind"]},"listScope":{"type":"string","enum":["user","tenant","company"]},"threadCanonicalKey":{"type":"string","minLength":1},"parentConversationId":{"type":"string","minLength":1,"maxLength":512},"branchedFromMessageId":{"type":"string","minLength":1,"maxLength":512},"branchKind":{"type":"string","enum":["edit_rerun"]}},"required":["messages"]},"AgentConversationCreate":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"]},"content":{"type":"string","minLength":1},"id":{"type":"string","minLength":1,"maxLength":512},"turnId":{"type":"string","minLength":1,"maxLength":512},"providerMessageId":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["web","telegram","whatsapp","automation"]},"timestamp":{"type":"string","format":"date-time"},"toolName":{"type":"string","minLength":1},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","enum":["success","error"]},"structuredContent":{},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["running","success","error","pending_approval"]},"output":{},"id":{"type":"string","minLength":1},"review":{"type":"object","properties":{"approvalId":{"type":"string","minLength":1,"nullable":true},"risk":{"type":"string","enum":["read","write_direct","write_reversible","write_approval_required","write_irreversible"]},"reversible":{"type":"boolean"},"summary":{"type":"string","minLength":1},"preview":{},"frozenToolCall":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}}},"required":["toolName","args"],"nullable":true}}}},"required":["name","args","status"]}}},"required":["role","content"]}},"title":{"type":"string"},"summary":{"type":"string"},"contextSnapshot":{"type":"object","properties":{"entity":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["type","id"]},"accessMode":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"pageUrl":{"type":"string"},"threadId":{"type":"string","minLength":1}},"required":["accessMode"]},"threadStatus":{"type":"string","enum":["running","error","completed_unread","completed_read"]},"readAt":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"lastRunStatus":{"type":"string","enum":["running","completed","error","cancelled"]},"threadOrigin":{"type":"object","properties":{"kind":{"type":"string","enum":["manual","automation","automation_test","channel"]},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"agentRunStartedAt":{"type":"string","format":"date-time"},"automationId":{"type":"string","minLength":1},"automationRunId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"triggerSummary":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"channel":{"type":"string","enum":["telegram","whatsapp"]},"humanWaitState":{"type":"string","enum":["approval","clarification"],"nullable":true}},"required":["kind"]},"listScope":{"type":"string","enum":["user","tenant","company"]},"threadCanonicalKey":{"type":"string","minLength":1},"parentConversationId":{"type":"string","minLength":1,"maxLength":512},"branchedFromMessageId":{"type":"string","minLength":1,"maxLength":512},"branchKind":{"type":"string","enum":["edit_rerun"]}},"required":["messages"]},"UpdateConversationRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1},"summary":{"type":"string"},"pinned":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"]},"content":{"type":"string","minLength":1},"id":{"type":"string","minLength":1,"maxLength":512},"turnId":{"type":"string","minLength":1,"maxLength":512},"providerMessageId":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["web","telegram","whatsapp","automation"]},"timestamp":{"type":"string","format":"date-time"},"toolName":{"type":"string","minLength":1},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","enum":["success","error"]},"structuredContent":{},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["running","success","error","pending_approval"]},"output":{},"id":{"type":"string","minLength":1},"review":{"type":"object","properties":{"approvalId":{"type":"string","minLength":1,"nullable":true},"risk":{"type":"string","enum":["read","write_direct","write_reversible","write_approval_required","write_irreversible"]},"reversible":{"type":"boolean"},"summary":{"type":"string","minLength":1},"preview":{},"frozenToolCall":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}}},"required":["toolName","args"],"nullable":true}}}},"required":["name","args","status"]}}},"required":["role","content"]}},"contextSnapshot":{"type":"object","properties":{"entity":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["type","id"]},"accessMode":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"pageUrl":{"type":"string"},"threadId":{"type":"string","minLength":1}},"required":["accessMode"]},"threadStatus":{"type":"string","enum":["running","error","completed_unread","completed_read"]},"readAt":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"lastRunStatus":{"type":"string","enum":["running","completed","error","cancelled"]},"threadOrigin":{"type":"object","properties":{"kind":{"type":"string","enum":["manual","automation","automation_test","channel"]},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"agentRunStartedAt":{"type":"string","format":"date-time"},"automationId":{"type":"string","minLength":1},"automationRunId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"triggerSummary":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"channel":{"type":"string","enum":["telegram","whatsapp"]},"humanWaitState":{"type":"string","enum":["approval","clarification"],"nullable":true}},"required":["kind"]},"listScope":{"type":"string","enum":["user","tenant","company"]}}},"AgentConversationUpdate":{"type":"object","properties":{"title":{"type":"string","minLength":1},"summary":{"type":"string"},"pinned":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system","tool"]},"content":{"type":"string","minLength":1},"id":{"type":"string","minLength":1,"maxLength":512},"turnId":{"type":"string","minLength":1,"maxLength":512},"providerMessageId":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["web","telegram","whatsapp","automation"]},"timestamp":{"type":"string","format":"date-time"},"toolName":{"type":"string","minLength":1},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","enum":["success","error"]},"structuredContent":{},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"toolCalls":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["running","success","error","pending_approval"]},"output":{},"id":{"type":"string","minLength":1},"review":{"type":"object","properties":{"approvalId":{"type":"string","minLength":1,"nullable":true},"risk":{"type":"string","enum":["read","write_direct","write_reversible","write_approval_required","write_irreversible"]},"reversible":{"type":"boolean"},"summary":{"type":"string","minLength":1},"preview":{},"frozenToolCall":{"type":"object","properties":{"toolName":{"type":"string","minLength":1},"args":{"type":"object","additionalProperties":{}}},"required":["toolName","args"],"nullable":true}}}},"required":["name","args","status"]}}},"required":["role","content"]}},"contextSnapshot":{"type":"object","properties":{"entity":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["type","id"]},"accessMode":{"type":"string"},"filters":{"type":"object","additionalProperties":{}},"pageUrl":{"type":"string"},"threadId":{"type":"string","minLength":1}},"required":["accessMode"]},"threadStatus":{"type":"string","enum":["running","error","completed_unread","completed_read"]},"readAt":{"type":"string","format":"date-time","nullable":true},"archivedAt":{"type":"string","format":"date-time","nullable":true},"lastRunStatus":{"type":"string","enum":["running","completed","error","cancelled"]},"threadOrigin":{"type":"object","properties":{"kind":{"type":"string","enum":["manual","automation","automation_test","channel"]},"agentRunId":{"type":"string","pattern":"^[0-9a-f]{24}$"},"agentRunStartedAt":{"type":"string","format":"date-time"},"automationId":{"type":"string","minLength":1},"automationRunId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"triggerSummary":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"channel":{"type":"string","enum":["telegram","whatsapp"]},"humanWaitState":{"type":"string","enum":["approval","clarification"],"nullable":true}},"required":["kind"]},"listScope":{"type":"string","enum":["user","tenant","company"]}}},"CreateMemoryRequest":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":10000},"type":{"type":"string","enum":["preference","fact","instruction","context"],"default":"fact"},"metadata":{"type":"object","additionalProperties":{}},"pinned":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"},"provenance":{"type":"object","properties":{"source":{"type":"string","enum":["user_stated","tool_verified"]},"toolName":{"type":"string","minLength":1,"maxLength":200}},"required":["source"]}},"required":["key","content","provenance"]},"AgentMemoryCreate":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":10000},"type":{"type":"string","enum":["preference","fact","instruction","context"],"default":"fact"},"metadata":{"type":"object","additionalProperties":{}},"pinned":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"},"provenance":{"type":"object","properties":{"source":{"type":"string","enum":["user_stated","tool_verified"]},"toolName":{"type":"string","minLength":1,"maxLength":200}},"required":["source"]}},"required":["key","content","provenance"]},"UpdateMemoryRequest":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"type":{"type":"string","enum":["preference","fact","instruction","context"]},"metadata":{"type":"object","additionalProperties":{}},"pinned":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time","nullable":true}}},"AgentMemoryUpdate":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"type":{"type":"string","enum":["preference","fact","instruction","context"]},"metadata":{"type":"object","additionalProperties":{}},"pinned":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time","nullable":true}}},"UpdatePayrollConfigRequest":{"type":"object","properties":{"processing":{"type":"object","properties":{"frequency":{"type":"string","enum":["monthly","biweekly","weekly"]},"payday":{"type":"integer","minimum":1,"maximum":31},"autoCalculate":{"type":"boolean"},"requireApproval":{"type":"boolean"},"requireApprovalAbove":{"type":"number","minimum":0},"allowRetroactiveCorrections":{"type":"boolean"},"generateAccountingEntries":{"type":"boolean"},"generateBankTransfers":{"type":"boolean"},"requireHREventForAllRuns":{"type":"boolean"}}},"contributions":{"type":"object","properties":{"autoCalculateEmployer":{"type":"boolean"},"autoCalculateEmployee":{"type":"boolean"},"disabledTypes":{"type":"array","items":{"type":"string"}}}},"payslips":{"type":"object","properties":{"autoGenerate":{"type":"boolean"},"autoDeliver":{"type":"boolean"},"templateId":{"type":"string"}}},"integrity":{"type":"object","properties":{"enableIntegrityHash":{"type":"boolean"},"enableHashChaining":{"type":"boolean"}}},"socialSecurity":{"type":"object","properties":{"lpp":{"type":"object","properties":{"rate":{"type":"number","minimum":0,"maximum":1},"employerRate":{"type":"number","minimum":0,"maximum":1},"employeeRate":{"type":"number","minimum":0,"maximum":1}},"required":["rate","employerRate","employeeRate"]},"alv2":{"type":"object","properties":{"rate":{"type":"number","minimum":0,"maximum":1},"thresholdAnnual":{"type":"number","minimum":0},"employerRate":{"type":"number","minimum":0,"maximum":1},"employeeRate":{"type":"number","minimum":0,"maximum":1}},"required":["rate","thresholdAnnual"]},"bvg":{"type":"object","properties":{"entryThresholdAnnual":{"type":"number","minimum":0},"coordinationDeductionAnnual":{"type":"number","minimum":0},"maxInsuredSalaryAnnual":{"type":"number","minimum":0},"ageRates":{"type":"array","items":{"type":"object","properties":{"minAge":{"type":"integer","minimum":0,"maximum":120},"maxAge":{"type":"integer","minimum":0,"maximum":120},"rate":{"type":"number","minimum":0,"maximum":1}},"required":["minAge","maxAge","rate"]}},"employerRateShare":{"type":"number","minimum":0,"maximum":1}},"required":["entryThresholdAnnual","coordinationDeductionAnnual","maxInsuredSalaryAnnual","ageRates"]},"uvg":{"type":"object","properties":{"maxBaseAnnual":{"type":"number","minimum":0},"buRate":{"type":"number","minimum":0,"maximum":1},"nbuRate":{"type":"number","minimum":0,"maximum":1},"nbuPaidByEmployee":{"type":"boolean"}},"required":["maxBaseAnnual","buRate","nbuRate"]},"fak":{"type":"object","properties":{"rate":{"type":"number","minimum":0,"maximum":1}},"required":["rate"]},"healthInsurance":{"type":"object","properties":{"rate":{"type":"number","minimum":0,"maximum":1}},"required":["rate"]},"customContributions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1},"nameKey":{"type":"string","minLength":1},"rate":{"type":"number","minimum":0,"maximum":1},"employerRate":{"type":"number","minimum":0,"maximum":1},"employeeRate":{"type":"number","minimum":0,"maximum":1},"maxBase":{"type":"number","minimum":0},"minBase":{"type":"number","minimum":0},"applyTo":{"type":"string","enum":["all","specific_employees"]},"employeeIds":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"}},"required":["code","nameKey","rate","employerRate","employeeRate","applyTo","active"]}}}},"customDeductions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1},"nameKey":{"type":"string","minLength":1},"type":{"type":"string","enum":["fixed","percentage","custom"]},"amount":{"type":"number","minimum":0},"rate":{"type":"number","minimum":0,"maximum":1},"maxAmount":{"type":"number","minimum":0},"minAmount":{"type":"number","minimum":0},"applyTo":{"type":"string","enum":["all","specific_employees"]},"employeeIds":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"priority":{"type":"number","minimum":0},"active":{"type":"boolean"}},"required":["code","nameKey","type","applyTo","priority","active"]}},"swissdec":{"type":"object","properties":{"elmVersion":{"type":"string","enum":["5.5.0"]},"certificate":{"type":"string","minLength":1},"standardWeeklyHours":{"type":"number","minimum":1,"maximum":80},"monthTotal":{"type":"object","properties":{"ahvAvs":{"type":"object","properties":{"institutionId":{"type":"string","minLength":1},"branchNumber":{"type":"string","minLength":1},"customerNumber":{"type":"string","minLength":1},"subNumber":{"type":"string","minLength":1}}},"fakCaf":{"type":"object","properties":{"institutionId":{"type":"string","minLength":1},"branchNumber":{"type":"string","minLength":1},"customerNumber":{"type":"string","minLength":1},"subNumber":{"type":"string","minLength":1}}}}},"insurers":{"type":"object","properties":{"uvgLaa":{"type":"object","properties":{"name":{"type":"string","minLength":1},"uid":{"type":"string","pattern":"^CHE-\\d{3}\\.\\d{3}\\.\\d{3}$"}}},"bvgLpp":{"type":"object","properties":{"name":{"type":"string","minLength":1},"uid":{"type":"string","pattern":"^CHE-\\d{3}\\.\\d{3}\\.\\d{3}$"}}}}},"declareSalary":{"type":"object","properties":{"uvgLaa":{"type":"object","properties":{"institutionId":{"type":"string","minLength":1},"insuranceId":{"type":"string","minLength":1},"insuranceCompanyName":{"type":"string","minLength":1},"customerIdentity":{"type":"string","minLength":1},"contractIdentity":{"type":"string","minLength":1}}},"bvgLpp":{"type":"object","properties":{"institutionId":{"type":"string","minLength":1},"insuranceId":{"type":"string","minLength":1},"insuranceCompanyName":{"type":"string","minLength":1},"customerIdentity":{"type":"string","minLength":1},"contractIdentity":{"type":"string","minLength":1},"generalValidAsOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"payrollUnit":{"type":"string","minLength":1}}},"taxAtSource":{"type":"object","properties":{"workMunicipalityId":{"type":"string","pattern":"^[0-9]{1,6}$"},"institutions":{"type":"array","items":{"type":"object","properties":{"institutionId":{"type":"string","minLength":1},"cantonId":{"type":"string","enum":["AG","AI","AR","BE","BL","BS","FR","GE","GL","GR","JU","LU","NE","NW","OW","SG","SH","SO","SZ","TG","TI","UR","VD","VS","ZG","ZH"]},"customerIdentity":{"type":"string","minLength":1},"payrollUnit":{"type":"string","minLength":1},"taxAtSourceMunicipalityId":{"type":"string","pattern":"^[0-9]{1,6}$"},"commissionRate":{"type":"number","minimum":0,"maximum":1}},"required":["institutionId","cantonId","customerIdentity","payrollUnit"]}}}}}}}}}},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","inactive"]}},"required":["url","events"]},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","inactive"]}}},"CreateAccountingEventRequest":{"type":"object","properties":{"ledgerId":{"type":"string","enum":["statutory","management","simulation"],"default":"statutory"},"targetLedgerIds":{"type":"array","items":{"type":"string","enum":["statutory","management","simulation"]}},"generationMode":{"type":"string","enum":["single","multi"]},"sourceDomain":{"type":"string","enum":["sales","purchases","banking","fixed_assets","manual","hr","inventory","projects","closing"]},"sourceEntityType":{"type":"string","minLength":1},"sourceEntityId":{"type":"string","minLength":1},"eventType":{"type":"string","minLength":1},"occurredAt":{"type":"string","format":"date-time"},"eventData":{"type":"object","additionalProperties":{}}},"required":["sourceDomain","sourceEntityType","sourceEntityId","eventType","occurredAt","eventData"]},"CreateLedgerEntryRequest":{"type":"object","properties":{"ledgerId":{"type":"string","enum":["statutory","management","simulation"]},"accountingEventId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"journal":{"type":"string","minLength":1},"journalId":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"ledgerLineId":{"type":"string","minLength":1},"accountCode":{"type":"string","minLength":1},"debit":{"type":"number","minimum":0},"credit":{"type":"number","minimum":0},"description":{"type":"string"},"dimensions":{"type":"object","additionalProperties":{"type":"string"}}},"required":["accountCode","debit","credit"]}},"description":{"type":"string"}},"required":["accountingEventId","date","lines"]},"UpdateCompanyVatReportingConfigRequest":{"type":"object","properties":{"countryCode":{"type":"string"},"vatRegistered":{"type":"boolean"},"vatRegistrationDate":{"type":"string","format":"date-time","nullable":true},"vatDeregistrationDate":{"type":"string","format":"date-time","nullable":true},"windows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"filingFrequency":{"type":"string","enum":["monthly","quarterly","semiannual","annual"]},"vatAccountingBasis":{"type":"string","enum":["accrual","cash"]},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time","nullable":true},"annualFilingApproved":{"type":"boolean"},"annualFilingApprovalRef":{"type":"string","minLength":1,"nullable":true},"netTaxRateActivities":{"type":"array","items":{"type":"object","properties":{"activityKey":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"approvedRate":{"type":"number","minimum":0,"maximum":100},"estvApprovalRef":{"type":"string","minLength":1,"nullable":true},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time","nullable":true},"sourceMappings":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string","minLength":1}},"revenueAccountCodes":{"type":"array","items":{"type":"string","minLength":1}}}}},"required":["activityKey","label","approvedRate"]}},"adjustments":{"type":"array","items":{"type":"object","properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number","minimum":0,"maximum":100},"turnover":{"type":"number"},"currency":{"type":"string"},"applies":{"type":"boolean"},"note":{"type":"string","minLength":1}},"required":["adjustmentType","amount"]}}},"required":["key","reportingMethod","filingFrequency","effectiveFrom"]}},"updatedBy":{"type":"string"},"periodAdjustments":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","pattern":"^(\\d{4}-\\d{2}|\\d{4}-Q[1-4]|\\d{4}-H[1-2]|\\d{4})$"},"reportingMethod":{"type":"string","enum":["effectiveReportingMethod","netTaxRateMethod","flatTaxRateMethod","simpleTaxRateMethod"]},"reportingWindowKey":{"type":"string","minLength":1,"nullable":true},"entries":{"type":"array","items":{"type":"object","properties":{"adjustmentType":{"type":"string","enum":["acquisition_tax","compensation_export","deemed_input_tax_deduction","margin_taxation","method_transition_adjustment"]},"amount":{"type":"number"},"rate":{"type":"number","minimum":0,"maximum":100},"turnover":{"type":"number"},"currency":{"type":"string"},"applies":{"type":"boolean"},"status":{"type":"string","enum":["candidate","accepted","ignored"]},"sourceEntityType":{"type":"string","enum":["bill","expense","manual"]},"sourceEntityId":{"type":"string","minLength":1},"sourceLineIndex":{"type":"integer","minimum":0},"idempotencyKey":{"type":"string","minLength":1},"calculationBasis":{"type":"object","properties":{"amount":{"type":"number"},"rate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1}},"required":["amount"]},"note":{"type":"string","minLength":1}},"required":["adjustmentType","amount"]}}},"required":["period","reportingMethod","entries"]}}},"required":["countryCode","windows"]},"UpdateLedgerEntryRequest":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"journal":{"type":"string","minLength":1},"journalId":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"ledgerLineId":{"type":"string","minLength":1},"accountCode":{"type":"string","minLength":1},"debit":{"type":"number","minimum":0},"credit":{"type":"number","minimum":0},"description":{"type":"string"},"dimensions":{"type":"object","additionalProperties":{"type":"string"}}},"required":["accountCode","debit","credit"]}},"description":{"type":"string"}}},"CreateAccountRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["asset","liability","equity","revenue","expense"]},"parentCode":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"isSystem":{"type":"boolean","default":false},"isActive":{"type":"boolean","default":true}},"required":["code","name","type"]},"CreateBankAccountRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"bankName":{"type":"string","minLength":1},"iban":{"type":"string"},"accountNumber":{"type":"string"},"bankClearingNumber":{"type":"string"},"accountType":{"type":"string","enum":["checking","savings","credit","investment","other"]},"currency":{"type":"string"},"openingBalance":{"type":"number","default":0},"openingDate":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean","default":false},"linkedAccountCode":{"type":"string"},"notes":{"type":"string"}},"required":["name","bankName","iban","accountType","currency"]},"CreatePurchaseEventRequest":{"type":"object","properties":{"sourceEntityType":{"type":"string","enum":["expense","bill","credit_note","purchase_order","expense_report","budget"]},"sourceEntityId":{"type":"string","minLength":1},"eventType":{"type":"string","enum":["expense_created","expense_submitted","expense_approved","expense_rejected","expense_paid","bill_received","bill_submitted","bill_approved","bill_rejected","bill_posted","bill_paid","bill_reversed","credit_note_created","credit_note_submitted","credit_note_approved","credit_note_rejected","credit_note_paid","purchase_order_created","purchase_order_confirmed","purchase_order_received","purchase_order_cancelled","purchase_order_reopened","purchase_order_reset_to_draft","purchase_order_receive_undone","expense_report_created","expense_report_submitted","expense_report_approved","expense_report_rejected","expense_report_paid","budget_created","budget_updated","budget_exceeded"]},"occurredAt":{"type":"string","format":"date-time"},"eventData":{"type":"object","additionalProperties":{}},"accountingEventId":{"type":"string"}},"required":["sourceEntityType","sourceEntityId","eventType","occurredAt"]},"CreatePurchaseOrderRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0,"exclusiveMinimum":true},"date":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"incotermCode":{"type":"string","minLength":1},"paymentTermId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"deliveryTermId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","minLength":1,"maxLength":500},"productId":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0,"exclusiveMinimum":true},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"vatRate":{"type":"number","minimum":0,"maximum":100,"default":0},"vatRuleCode":{"type":"string","minLength":1},"receivedQuantity":{"type":"number","minimum":0},"receivedAt":{"type":"string","format":"date-time"},"billLineId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["description","quantity","unitPrice","amount"]}},"budgetId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"orderNumber":{"type":"string"},"status":{"type":"string","enum":["draft"],"default":"draft"},"merchantName":{"type":"string","minLength":1},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"matchStatus":{"type":"string","enum":["unmatched","auto_matched","confirmed","rejected"]},"matchConfidence":{"type":"number","minimum":0,"maximum":1},"matchedBy":{"type":"string","enum":["ocr","rule","user"]}},"required":["currency","date","deliveryDate","items"]},"UpdatePurchaseOrderRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"incotermCode":{"type":"string","minLength":1},"paymentTermId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"deliveryTermId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","minLength":1,"maxLength":500},"productId":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0,"exclusiveMinimum":true},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"vatRate":{"type":"number","minimum":0,"maximum":100,"default":0},"vatRuleCode":{"type":"string","minLength":1},"receivedQuantity":{"type":"number","minimum":0},"receivedAt":{"type":"string","format":"date-time"},"billLineId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["description","quantity","unitPrice","amount"]}},"budgetId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"merchantName":{"type":"string","minLength":1,"nullable":true},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"matchStatus":{"type":"string","enum":["unmatched","auto_matched","confirmed","rejected"]},"matchConfidence":{"type":"number","minimum":0,"maximum":1,"nullable":true},"matchedBy":{"type":"string","enum":["ocr","rule","user"],"nullable":true}}},"ReceivePurchaseOrderRequest":{"type":"object","properties":{"receivedLines":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string","minLength":1},"receivedQuantity":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["lineId","receivedQuantity"]}}},"required":["receivedLines"]},"MatchOrderToBillRequest":{"type":"object","properties":{"billId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["billId"]},"CreateExpenseRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"amountInclTax":{"type":"number","minimum":0,"exclusiveMinimum":true},"taxAmount":{"type":"number","minimum":0},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"categoryId":{"type":"string","minLength":1},"category":{"type":"string","enum":["office_supplies","travel","meals","utilities","other"]},"description":{"type":"string","minLength":1},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1},"receiptDocumentId":{"type":"string"},"employeeId":{"type":"string"},"expenseNumber":{"type":"string"},"notes":{"type":"string","maxLength":2000},"paymentMethod":{"type":"string","maxLength":50},"receiptNumber":{"type":"string","maxLength":50},"merchantName":{"type":"string","minLength":1},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"matchStatus":{"type":"string","enum":["unmatched","auto_matched","confirmed","rejected"]},"matchConfidence":{"type":"number","minimum":0,"maximum":1},"matchedBy":{"type":"string","enum":["ocr","rule","user"]}},"required":["amount","date","description"]},"UpdateExpenseRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"amountInclTax":{"type":"number","minimum":0,"exclusiveMinimum":true},"taxAmount":{"type":"number","minimum":0},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"categoryId":{"type":"string","minLength":1},"category":{"type":"string","enum":["office_supplies","travel","meals","utilities","other"]},"description":{"type":"string","minLength":1},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1},"receiptDocumentId":{"type":"string","nullable":true},"employeeId":{"type":"string"},"notes":{"type":"string","maxLength":2000},"paymentMethod":{"type":"string","maxLength":50},"receiptNumber":{"type":"string","maxLength":50},"merchantName":{"type":"string","minLength":1,"nullable":true},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"matchStatus":{"type":"string","enum":["unmatched","auto_matched","confirmed","rejected"]},"matchConfidence":{"type":"number","minimum":0,"maximum":1,"nullable":true},"matchedBy":{"type":"string","enum":["ocr","rule","user"],"nullable":true}}},"CreateExpenseReportRequest":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"expenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"employeeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"currency":{"type":"string"},"reportNumber":{"type":"string"}},"required":["expenseIds"]},"UpdateExpenseReportRequest":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"expenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"employeeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}},"RejectExpenseReportRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]},"CreateCreditNoteRequest":{"type":"object","properties":{"originalBillId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1},"accountCode":{"type":"string"},"categoryId":{"type":"string","minLength":1},"expenseCategoryId":{"type":"string","minLength":1},"category":{"type":"string"},"productId":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitCost":{"type":"number","minimum":0}},"required":["description","amount","vatRate"]}},"reason":{"type":"string"},"paymentReference":{"type":"string","maxLength":35},"qrIban":{"type":"string"},"qrReference":{"type":"string"}},"required":["originalBillId","date","items"]},"UpdateCreditNoteRequest":{"type":"object","properties":{"originalBillId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1},"accountCode":{"type":"string"},"categoryId":{"type":"string","minLength":1},"expenseCategoryId":{"type":"string","minLength":1},"category":{"type":"string"},"productId":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitCost":{"type":"number","minimum":0}},"required":["description","amount","vatRate"]}},"reason":{"type":"string"},"paymentReference":{"type":"string","maxLength":35},"qrIban":{"type":"string"},"qrReference":{"type":"string"}}},"SubmitCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"ApproveCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"RejectCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"]},"PayCreditNoteRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"paymentDate":{"type":"string","format":"date-time"},"paymentMethod":{"type":"string","enum":["bank_transfer","cash","card","other"]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128},"paymentReference":{"type":"string","maxLength":140},"note":{"type":"string","maxLength":2000},"sourceType":{"type":"string","enum":["bank_account","ledger_account"]},"sourceBankAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceLiquidityAccountCode":{"type":"string","maxLength":40},"paymentDifferenceHandling":{"type":"string","enum":["keep_open","mark_fully_paid"],"default":"keep_open"},"differenceAccountCode":{"type":"string","maxLength":40},"differenceLabel":{"type":"string","maxLength":200}},"required":["amount","paymentDate","paymentMethod","idempotencyKey","sourceType"]},"CreateBudgetRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"category":{"type":"string","enum":["expenses","bills","purchase_orders","all"]},"period":{"type":"string","enum":["monthly","quarterly","yearly"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"warningThreshold":{"type":"number","minimum":0,"maximum":100,"default":80},"blockThreshold":{"type":"number","minimum":0,"maximum":100,"default":100}},"required":["name","category","period","amount","currency","startDate","endDate"]},"UpdateBudgetRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"category":{"type":"string","enum":["expenses","bills","purchase_orders","all"]},"period":{"type":"string","enum":["monthly","quarterly","yearly"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"warningThreshold":{"type":"number","minimum":0,"maximum":100},"blockThreshold":{"type":"number","minimum":0,"maximum":100}}},"CreateBillRequest":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","credit_note"],"default":"invoice"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"exchangeRate":{"type":"number","minimum":0,"exclusiveMinimum":true},"date":{"type":"string","format":"date-time"},"accountingDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"paymentTermId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"vendorReference":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1},"accountCode":{"type":"string"},"categoryId":{"type":"string","minLength":1},"expenseCategoryId":{"type":"string","minLength":1},"category":{"type":"string"},"productId":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitCost":{"type":"number","minimum":0}},"required":["description","amount","vatRate"]}},"billNumber":{"type":"string"},"paymentReference":{"type":"string","maxLength":35},"qrIban":{"type":"string","minLength":1,"maxLength":34},"qrReference":{"type":"string"},"originalBillId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"documentId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"purchaseOrderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"vendorVatId":{"type":"string","minLength":1},"vendorCompanyId":{"type":"string","minLength":1},"iban":{"type":"string","minLength":5,"maxLength":34},"bicSwift":{"type":"string","minLength":8,"maxLength":11},"bankName":{"type":"string","maxLength":100},"supplierBankAccountId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"supplierBankAccountVerificationStatus":{"type":"string","enum":["UNVERIFIED","VERIFIED","FAILED"]},"buyerName":{"type":"string","maxLength":200},"buyerAddress":{"type":"string","maxLength":500},"buyerVatId":{"type":"string","minLength":1},"invoiceNumber":{"type":"string","maxLength":50},"notes":{"type":"string","maxLength":2000},"paymentMethod":{"type":"string","maxLength":50},"orderNumber":{"type":"string","maxLength":50},"subtotal":{"type":"number","minimum":0},"discount":{"type":"number","minimum":0},"merchantName":{"type":"string","minLength":1},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"matchStatus":{"type":"string","enum":["unmatched","auto_matched","confirmed","rejected"]},"matchConfidence":{"type":"number","minimum":0,"maximum":1},"matchedBy":{"type":"string","enum":["ocr","rule","user"]}},"required":["date","dueDate","items"]},"UpdatePurchaseConfigRequest":{"type":"object","properties":{"expenses":{"type":"object","properties":{"requireReceiptForAmountAbove":{"type":"number","minimum":0},"defaultExpenseCategoryId":{"type":"string","minLength":1},"defaultVatRuleId":{"type":"string","minLength":1},"enableOcr":{"type":"boolean"},"enableAutoClassification":{"type":"boolean"},"maxExpenseAmount":{"type":"number","minimum":0,"exclusiveMinimum":true},"allowForeignCurrency":{"type":"boolean"},"defaultCurrency":{"type":"string"}}},"bills":{"type":"object","properties":{"requireTaxValidationForAmountAbove":{"type":"number","minimum":0},"defaultVatRuleId":{"type":"string","minLength":1},"defaultExpenseAccountId":{"type":"string","minLength":1},"enableAutoMatching":{"type":"boolean"},"vendorMatching":{"type":"object","properties":{"identitySignals":{"type":"array","items":{"type":"string","enum":["vat_exact","iban_exact","name_exact","name_partial","registration_id_exact","email_exact","phone_exact","website","address","invoice_reference"]}},"compositeAutoAcceptThreshold":{"type":"number","minimum":0,"maximum":1},"allowAgentProposedCreation":{"type":"boolean"}}},"enableOcr":{"type":"boolean"},"requireIbanValidation":{"type":"boolean"},"requireVatValidation":{"type":"boolean"},"allowManualTaxOverride":{"type":"boolean"}}},"purchaseOrders":{"type":"object","properties":{"allowPartialReceipt":{"type":"boolean"},"allowOverReceipt":{"type":"boolean"},"maxOverReceiptPercentage":{"type":"number","minimum":0,"maximum":1},"enableIncoterms":{"type":"boolean"},"enableBudgetCheck":{"type":"boolean"},"matching":{"type":"object","properties":{"requireForStockableLines":{"type":"boolean"},"requireReceiptBeforePosting":{"type":"boolean"},"amountTolerancePercent":{"type":"number","minimum":0,"maximum":100},"quantityTolerancePercent":{"type":"number","minimum":0,"maximum":100},"allowOverrideWithReason":{"type":"boolean"}},"required":["requireForStockableLines","requireReceiptBeforePosting","amountTolerancePercent","quantityTolerancePercent","allowOverrideWithReason"]}}},"budgets":{"type":"object","properties":{"enableBudgetControl":{"type":"boolean"},"budgetWarningThreshold":{"type":"number","minimum":0,"maximum":1},"budgetBlockThreshold":{"type":"number","minimum":0,"maximum":1},"allowOverBudget":{"type":"boolean"},"requireApprovalForOverBudget":{"type":"boolean"},"defaultBudgetPeriod":{"type":"string","enum":["monthly","quarterly","yearly"]},"enableMultiDimensionBudgets":{"type":"boolean"}}},"compliance":{"type":"object","properties":{"requireVatValidation":{"type":"boolean"},"requireIbanValidation":{"type":"boolean"},"roundingMode":{"type":"string","enum":["HALF_UP","HALF_DOWN","HALF_EVEN","CEILING","FLOOR"]},"allowRetroactiveCorrections":{"type":"boolean"},"requireTaxValidationAbove":{"type":"number","minimum":0},"autoCalculateTax":{"type":"boolean"},"requireQrBillForSwissInvoices":{"type":"boolean"},"documentRetentionYears":{"type":"integer","minimum":1,"maximum":50}}},"expenseRecognition":{"type":"object","properties":{"enabled":{"type":"boolean"},"trigger":{"type":"string","enum":["on_bill","on_payment","on_order_receipt"]},"method":{"type":"string","enum":["point_in_time","straight_line","milestone"]},"prepaidExpenseAccountId":{"type":"string","minLength":1},"grniAccountId":{"type":"string","minLength":1}}},"subscriptionMatching":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}},"UpdateAccountingConfigRequest":{"type":"object","properties":{"ledger":{"type":"object","properties":{"defaultLedgerId":{"type":"string","enum":["statutory","management","simulation"]},"activeLedgerIds":{"type":"array","items":{"type":"string","enum":["statutory","management","simulation"]}},"enableMultiLedger":{"type":"boolean"},"enableIntegrityHash":{"type":"boolean"},"enableHashChaining":{"type":"boolean"},"allowManualEntries":{"type":"boolean"},"requireAccountingEventForAllEntries":{"type":"boolean"}}},"banking":{"type":"object","properties":{"matchingThresholdAuto":{"type":"number","minimum":0,"maximum":1},"matchingThresholdSuggest":{"type":"number","minimum":0,"maximum":1},"dateToleranceDays":{"type":"integer","minimum":0},"requireReconciliationBeforeClosing":{"type":"boolean"},"allowManualTransactions":{"type":"boolean"},"paymentPostingMode":{"type":"string","enum":["direct","two_step"],"default":"two_step"},"transitAlertThresholdDays":{"type":"integer","minimum":0,"maximum":365,"default":10}}},"compliance":{"type":"object","properties":{"profile":{"type":"string","enum":["STANDARD","CH_STATUTORY_AUDIT_READY"]},"runtimeProfile":{"type":"string","enum":["STANDARD","AUDIT_READY"]},"frameworkKey":{"type":"string","minLength":1},"frameworkVersion":{"type":"string","minLength":1},"roundingMode":{"type":"string","enum":["HALF_UP","HALF_DOWN","HALF_EVEN","CEILING","FLOOR"]},"allowRetroactiveCorrections":{"type":"boolean"},"requireTaxValidationAbove":{"type":"number","minimum":0},"autoCalculateTax":{"type":"boolean"}}},"closing":{"type":"object","properties":{"requireSecondApprover":{"type":"boolean"},"trialBalanceTolerance":{"type":"number","minimum":0},"autoGenerateDepreciation":{"type":"boolean"},"blockOnVatMismatch":{"type":"boolean"},"allowAllocationOverride":{"type":"boolean"}}},"currency":{"type":"object","properties":{"multiCurrencyEnabled":{"type":"boolean"},"baseCurrency":{"type":"string"},"allowedCurrencies":{"type":"array","items":{"type":"string"}},"salesDefaultCurrency":{"type":"string"},"purchasesDefaultCurrency":{"type":"string"},"allowManualRateOverride":{"type":"boolean"},"rateSource":{"type":"string","enum":["manual","ecb"]},"fxAccounts":{"type":"object","properties":{"realizedGain":{"type":"string","minLength":1},"realizedLoss":{"type":"string","minLength":1},"unrealizedGain":{"type":"string","minLength":1},"unrealizedLoss":{"type":"string","minLength":1}}}}}}},"UpdateContactsConfigRequest":{"type":"object","properties":{"persons":{"type":"object","properties":{"defaultType":{"type":"string","enum":["PRIVATE","PROFESSIONAL"]},"requireEmail":{"type":"boolean"},"requirePhone":{"type":"boolean"}}},"addresses":{"type":"object","properties":{"defaultCountrySource":{"type":"string","enum":["company","custom"]},"customDefaultCountryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"enforceCantonRequirementForCompanyCountry":{"type":"boolean"},"googleAutocompleteEnabled":{"type":"boolean"}}},"addressLinks":{"type":"object","properties":{"defaultUsage":{"type":"string","enum":["BILLING","SHIPPING","LEGAL","PRIVATE","OTHER"]},"autoSetPrimaryOnFirstLinkForUsage":{"type":"boolean"}}}}},"UpdateCollaborationConfigRequest":{"type":"object","properties":{"approvals":{"type":"object","properties":{"autoAssignApprover":{"type":"boolean"},"slaHours":{"type":"integer","minimum":1,"maximum":720},"requireCommentOnReject":{"type":"boolean"},"enableAutomations":{"type":"boolean"}}},"tasks":{"type":"object","properties":{"defaultAssigneeRole":{"type":"string","enum":["creator","manager","none"]},"allowDueDates":{"type":"boolean"},"reminderHoursBeforeDue":{"type":"integer","minimum":0,"maximum":720},"allowCrossCompanyMentions":{"type":"boolean"}}},"comments":{"type":"object","properties":{"allowMentions":{"type":"boolean"},"allowAttachments":{"type":"boolean"},"moderationEnabled":{"type":"boolean"}}}}},"UpdateDocumentsConfigRequest":{"type":"object","properties":{"documents":{"type":"object","properties":{"processingApprovals":{"type":"object","properties":{"enabled":{"type":"boolean"},"defaultAssigneeUserId":{"type":"string"},"defaultAssigneeGroupId":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"enabled":{"type":"boolean"},"action":{"type":"string","enum":["none","create_bill_from_ocr","create_expense_from_ocr","create_purchase_order_from_ocr","create_sales_invoice_from_ocr","create_sales_order_from_ocr"]},"assignedToUserId":{"type":"string"},"assignedToGroupId":{"type":"string"}},"required":["documentType","enabled","action"]}}}},"intakeRouting":{"type":"object","properties":{"enabled":{"type":"boolean"},"defaultAssigneeUserId":{"type":"string"},"defaultAssigneeGroupId":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"enabled":{"type":"boolean"},"action":{"type":"string","enum":["none","prepare_bill","prepare_expense","prepare_purchase_order","prepare_sales_invoice","prepare_sales_order"]},"targetEntityType":{"type":"string","enum":["bill","expense","purchase_order","sales_invoice","sales_order"]},"defaultQueue":{"type":"string"},"assignedToUserId":{"type":"string"},"assignedToGroupId":{"type":"string"}},"required":["documentType","enabled","action"]}}}},"confidenceThresholds":{"type":"object","properties":{"autoDraft":{"type":"object","properties":{"extraction":{"type":"number","minimum":0,"maximum":1},"line":{"type":"number","minimum":0,"maximum":1}}},"review":{"type":"object","properties":{"extraction":{"type":"number","minimum":0,"maximum":1},"line":{"type":"number","minimum":0,"maximum":1}}}}},"redaction":{"type":"object","properties":{"level":{"type":"string","enum":["off","sensitive_only","minimal","strict"]},"detectors":{"type":"object","properties":{"email":{"type":"boolean"},"iban":{"type":"boolean"},"phone":{"type":"boolean"},"ahv":{"type":"boolean"},"numeric_id":{"type":"boolean"}}},"rules":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","enum":["invoice","receipt","contract","statement","payslip","employee_contract","social_security_declaration","salary_certificate","work_certificate","other"]},"level":{"type":"string","enum":["off","sensitive_only","minimal","strict"]},"detectors":{"type":"object","properties":{"email":{"type":"boolean"},"iban":{"type":"boolean"},"phone":{"type":"boolean"},"ahv":{"type":"boolean"},"numeric_id":{"type":"boolean"}}}},"required":["documentType"]}}}}}}}},"CreateQuoteRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","rejected","cancelled","expired","converted"],"default":"draft"},"description":{"type":"string","nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"pricelistId":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"],"default":"exclusive"},"validUntil":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true}},"required":["description","quantity","unitPrice","vatRate"]}},"quoteNumber":{"type":"string"},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["items","counterparty"]},"UpdateQuoteRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","rejected","cancelled","expired","converted"]},"description":{"type":"string","nullable":true},"incotermCode":{"type":"string","minLength":1,"nullable":true},"deliveryTermId":{"type":"string","minLength":1,"nullable":true},"paymentTermId":{"type":"string","minLength":1,"nullable":true},"pricelistId":{"type":"string","minLength":1,"nullable":true},"taxMode":{"type":"string","enum":["exclusive","inclusive"]},"validUntil":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true}},"required":["description","quantity","unitPrice","vatRate"]}},"counterparty":{"type":"object","properties":{"entityType":{"type":"string","enum":["PERSON","ORGANIZATION"]},"entityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"required":["entityType","entityId"]},"sourceOpportunityId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"customFieldValues":{"type":"object","additionalProperties":{}}}},"UpdateSalesConfigRequest":{"type":"object","properties":{"invoices":{"type":"object","properties":{"requireTaxValidationForAmountAbove":{"type":"number","minimum":0},"requireQrBillForSwissInvoices":{"type":"boolean"},"requireIbanValidation":{"type":"boolean"},"requireVatValidation":{"type":"boolean"},"allowManualTaxOverride":{"type":"boolean"},"defaultRevenueAccountId":{"type":"string","minLength":1},"enableRecurringInvoices":{"type":"boolean"},"recurring":{"type":"object","properties":{"enabled":{"type":"boolean"},"draftOnly":{"type":"boolean"},"catchUpMissedPeriods":{"type":"boolean"},"maxCatchUpPeriods":{"type":"integer","minimum":1,"maximum":12},"notifyOnGeneration":{"type":"boolean"}}},"publicAccess":{"type":"object","properties":{"enabled":{"type":"boolean"},"defaultExpiryDays":{"type":"integer","minimum":1,"maximum":365},"requirePasswordForQuotes":{"type":"boolean"},"embedLinkInOutboundEmail":{"type":"boolean"},"allowedScopes":{"type":"array","items":{"type":"string","enum":["view","accept","reject","pay_info"]}}}},"onlinePayment":{"type":"object","properties":{"provider":{"type":"string","enum":["none","stripe_connect","twint","stripe_own_account"]},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["test","live"]}}},"eBill":{"type":"object","properties":{"enabled":{"type":"boolean"},"provider":{"type":"string","enum":["sandbox"]}}},"customerReminders":{"type":"object","properties":{"autoSendToCustomer":{"type":"boolean"},"respectBillingEmailRequired":{"type":"boolean"}}}}},"orders":{"type":"object","properties":{"allowPartialDelivery":{"type":"boolean"},"allowOverDelivery":{"type":"boolean"},"maxOverDeliveryPercentage":{"type":"number","minimum":0,"maximum":1},"enableIncoterms":{"type":"boolean"},"enableInventoryCheck":{"type":"boolean"},"autoConvertToInvoice":{"type":"boolean"},"fulfillment":{"type":"object","properties":{"enableDeliveryNotes":{"type":"boolean"},"autoCreateOnShip":{"type":"boolean"},"requireDeliveryNoteBeforeInvoice":{"type":"boolean"}},"required":["enableDeliveryNotes","autoCreateOnShip","requireDeliveryNoteBeforeInvoice"]}}},"quotes":{"type":"object","properties":{"defaultValidityDays":{"type":"integer","minimum":1},"enableAutoExpiration":{"type":"boolean"},"allowPriceNegotiation":{"type":"boolean"},"enableConversionTracking":{"type":"boolean"}}},"compliance":{"type":"object","properties":{"requireVatValidation":{"type":"boolean"},"requireIbanValidation":{"type":"boolean"},"roundingMode":{"type":"string","enum":["HALF_UP","HALF_DOWN","HALF_EVEN","CEILING","FLOOR"]},"allowRetroactiveCorrections":{"type":"boolean"},"requireTaxValidationAbove":{"type":"number","minimum":0},"autoCalculateTax":{"type":"boolean"},"requireQrBillForSwissInvoices":{"type":"boolean"},"defaultSalesVatRuleId":{"type":"string","minLength":1}}},"revenueRecognition":{"type":"object","properties":{"enabled":{"type":"boolean"},"trigger":{"type":"string","enum":["on_invoice","on_payment","on_order"]},"method":{"type":"string","enum":["point_in_time","straight_line","milestone","percentage_of_completion"]},"deferredRevenueAccountId":{"type":"string","minLength":1},"contractAssetAccountId":{"type":"string","minLength":1},"contractLiabilityAccountId":{"type":"string","minLength":1}}}}},"UpdateInventoryConfigRequest":{"type":"object","properties":{"valuation":{"type":"object","properties":{"defaultMethod":{"type":"string","enum":["FIFO","LIFO","average","standard"]},"allowMethodChange":{"type":"boolean"},"requireApprovalForMethodChange":{"type":"boolean"},"allowNegativeStock":{"type":"boolean"},"requireCostForMovements":{"type":"boolean"}}},"tracking":{"type":"object","properties":{"requireSerialTracking":{"type":"boolean"},"requireBatchTracking":{"type":"boolean"},"requireExpirationDates":{"type":"boolean"},"expirationAlertDays":{"type":"integer","minimum":0},"allowSerialDuplicates":{"type":"boolean"},"allowBatchDuplicates":{"type":"boolean"}}},"replenishment":{"type":"object","properties":{"enableAutoReplenishment":{"type":"boolean"},"defaultReorderPoint":{"type":"number","minimum":0},"defaultReorderQuantity":{"type":"number","minimum":0},"requireApprovalForOrders":{"type":"boolean"},"enableForecasting":{"type":"boolean"},"forecastingMethod":{"type":"string","enum":["moving_average","exponential_smoothing","linear_regression"]}}},"units":{"type":"object","properties":{"defaultUnit":{"type":"string","minLength":1},"supportedUnits":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"symbol":{"type":"string","minLength":1},"type":{"type":"string","enum":["count","weight","volume","area","length","time"]},"isBase":{"type":"boolean"}},"required":["code","name","symbol","type","isBase"]}},"allowCustomUnits":{"type":"boolean"},"conversionRules":{"type":"array","items":{"type":"object","properties":{"fromUnit":{"type":"string","minLength":1},"toUnit":{"type":"string","minLength":1},"factor":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["fromUnit","toUnit","factor"]}}}},"barcodes":{"type":"object","properties":{"enableBarcodeScanning":{"type":"boolean"},"supportedFormats":{"type":"array","items":{"type":"string","enum":["EAN-13","EAN-8","UPC-A","Code-128","QR-Code","Data-Matrix"]}},"requireUniqueBarcodes":{"type":"boolean"},"allowMultipleBarcodesPerProduct":{"type":"boolean"}}}}},"UpdateProjectsConfigRequest":{"type":"object","properties":{"projects":{"type":"object","properties":{"defaultBudget":{"type":"number","minimum":0},"requireClientForProjects":{"type":"boolean"},"allowProjectsWithoutClient":{"type":"boolean"},"maxProjectDurationDays":{"type":"integer","minimum":1},"enableProjectTemplates":{"type":"boolean"},"requireBudgetForProjects":{"type":"boolean"},"enableProjectPhases":{"type":"boolean"},"enableProjectMilestones":{"type":"boolean"}}},"timeEntries":{"type":"object","properties":{"defaultHourlyRate":{"type":"number","minimum":0},"requireTaskForTimeEntry":{"type":"boolean"},"requireDescriptionForTimeEntry":{"type":"boolean"},"maxHoursPerDay":{"type":"number","minimum":0},"maxHoursPerWeek":{"type":"number","minimum":0},"enableTimeRounding":{"type":"boolean"},"timeRoundingInterval":{"type":"integer","minimum":1},"allowFutureTimeEntries":{"type":"boolean"},"allowPastTimeEntriesDays":{"type":"integer","minimum":0},"enableBillableTimeTracking":{"type":"boolean"},"defaultTimeEntryType":{"type":"string","enum":["billable","non_billable","administrative"]}}},"projectExpenses":{"type":"object","properties":{"requireReceiptForAmountAbove":{"type":"number","minimum":0},"defaultExpenseCategory":{"type":"string","minLength":1},"maxExpenseAmount":{"type":"number","minimum":0},"allowForeignCurrency":{"type":"boolean"},"defaultCurrency":{"type":"string"},"requireDescriptionForExpense":{"type":"boolean"},"enableOcr":{"type":"boolean"},"enableAutoClassification":{"type":"boolean"}}},"budgets":{"type":"object","properties":{"enableBudgetControl":{"type":"boolean"},"budgetWarningThreshold":{"type":"number","minimum":0,"maximum":1},"budgetBlockThreshold":{"type":"number","minimum":0,"maximum":1},"allowOverBudget":{"type":"boolean"},"requireApprovalForOverBudget":{"type":"boolean"},"enableBudgetByPhase":{"type":"boolean"},"enableBudgetByResource":{"type":"boolean"},"enableBudgetByCategory":{"type":"boolean"}}},"compliance":{"type":"object","properties":{"requireVatValidation":{"type":"boolean"},"requireIbanValidation":{"type":"boolean"},"roundingMode":{"type":"string","enum":["HALF_UP","HALF_DOWN","HALF_EVEN","CEILING","FLOOR"]},"allowRetroactiveCorrections":{"type":"boolean"},"requireTaxValidationAbove":{"type":"number","minimum":0},"autoCalculateTax":{"type":"boolean"},"requireQrBillForSwissInvoices":{"type":"boolean"},"enableInvoiceValidation":{"type":"boolean"}}},"notifications":{"type":"object","properties":{"budgetAlerts":{"type":"boolean"},"deadlineAlerts":{"type":"boolean"},"approvalRequests":{"type":"boolean"},"projectStatusChanges":{"type":"boolean"},"timeEntrySubmissions":{"type":"boolean"},"expenseSubmissions":{"type":"boolean"},"invoiceGenerated":{"type":"boolean"}}},"deliverySetupDefaults":{"type":"object","properties":{"phoneEndpoints":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":50},"number":{"type":"string","minLength":1,"maxLength":30},"isPrimary":{"type":"boolean"}},"required":["number"]}},"supportedLanguages":{"type":"array","items":{"type":"string","minLength":2,"maxLength":10}},"reportingModeId":{"type":"string","minLength":1},"assignedServiceUserIds":{"type":"array","items":{"type":"string","minLength":1}},"scheduleTemplateIds":{"type":"array","items":{"type":"string","minLength":1}},"operationalNotes":{"type":"string","maxLength":2000},"complianceCountryCode":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]}}}}},"CreateSalesCreditNoteRequest":{"type":"object","properties":{"originalInvoiceId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true},"categoryId":{"type":"string","minLength":1,"nullable":true},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceTimeEntryIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceExpenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceDocumentIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}},"required":["description","quantity","unitPrice","vatRate"]}},"reason":{"type":"string"},"paymentReference":{"type":"string","maxLength":35},"qrIban":{"type":"string"},"qrReference":{"type":"string"},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["originalInvoiceId","date","items"]},"UpdateSalesCreditNoteRequest":{"type":"object","properties":{"originalInvoiceId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"description":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unitPrice":{"type":"number","minimum":0},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatRuleCode":{"type":"string","minLength":1,"nullable":true},"vatReportingActivityKey":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"productName":{"type":"string","minLength":1,"nullable":true},"discount":{"type":"number","minimum":0,"nullable":true},"discountType":{"type":"string","enum":["percent","fixed"],"nullable":true},"lineType":{"type":"string","enum":["product","text","section"],"nullable":true},"isOptional":{"type":"boolean","nullable":true},"categoryId":{"type":"string","minLength":1,"nullable":true},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"sourceProjectId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"sourceTimeEntryIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceExpenseIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},"sourceDocumentIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}}},"required":["description","quantity","unitPrice","vatRate"]}},"reason":{"type":"string"},"paymentReference":{"type":"string","maxLength":35},"qrIban":{"type":"string"},"qrReference":{"type":"string"},"customFieldValues":{"type":"object","additionalProperties":{}}}},"SubmitSalesCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"ApproveSalesCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"RejectSalesCreditNoteRequest":{"type":"object","properties":{"reason":{"type":"string"}}},"PaySalesCreditNoteRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"paymentMethod":{"type":"string"},"date":{"type":"string","format":"date-time"}},"required":["amount"]},"CreateProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"type":{"type":"string","enum":["fixed_price","time_material","retainer","milestone","internal"],"default":"time_material"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"organizationId":{"type":"string","minLength":1},"customerAccountId":{"type":"string","minLength":1},"sourceContractId":{"type":"string","minLength":1},"sourceOpportunityId":{"type":"string","minLength":1},"contractId":{"type":"string","minLength":1},"revenueRecognitionMethod":{"type":"string","enum":["point_in_time","straight_line","milestone","time_material","percentage_of_completion"]},"recognitionBasis":{"type":"string","enum":["service_period","delivery","milestone","time_entry","manual"]},"budget":{"type":"object","properties":{"totalBudget":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["totalBudget","currency"]},"settings":{"type":"object","properties":{"allowTimeEntries":{"type":"boolean","default":true},"allowExpenses":{"type":"boolean","default":true},"requireApproval":{"type":"boolean","default":false},"autoInvoice":{"type":"boolean","default":false},"billingAutomation":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"cadence":{"type":"string","enum":["monthly","quarterly"],"default":"monthly"},"includeApprovedTimeEntries":{"type":"boolean","default":true},"includeApprovedExpenses":{"type":"boolean","default":true},"draftOnly":{"type":"boolean","default":true}}},"notifyOnBudgetExceeded":{"type":"boolean","default":true},"budgetThreshold":{"type":"number","minimum":0,"maximum":100,"default":10}}},"tags":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string"}},"required":["userId","role"]}},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["name"]},"UpdateProjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"type":{"type":"string","enum":["fixed_price","time_material","retainer","milestone","internal"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"organizationId":{"type":"string","minLength":1},"customerAccountId":{"type":"string","minLength":1},"sourceContractId":{"type":"string","minLength":1},"sourceOpportunityId":{"type":"string","minLength":1},"contractId":{"type":"string","minLength":1,"nullable":true},"revenueRecognitionMethod":{"type":"string","enum":["point_in_time","straight_line","milestone","time_material","percentage_of_completion"],"nullable":true},"recognitionBasis":{"type":"string","enum":["service_period","delivery","milestone","time_entry","manual"],"nullable":true},"budget":{"type":"object","properties":{"totalBudget":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["totalBudget","currency"]},"settings":{"type":"object","properties":{"allowTimeEntries":{"type":"boolean","default":true},"allowExpenses":{"type":"boolean","default":true},"requireApproval":{"type":"boolean","default":false},"autoInvoice":{"type":"boolean","default":false},"billingAutomation":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"cadence":{"type":"string","enum":["monthly","quarterly"],"default":"monthly"},"includeApprovedTimeEntries":{"type":"boolean","default":true},"includeApprovedExpenses":{"type":"boolean","default":true},"draftOnly":{"type":"boolean","default":true}}},"notifyOnBudgetExceeded":{"type":"boolean","default":true},"budgetThreshold":{"type":"number","minimum":0,"maximum":100,"default":10}}},"tags":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string"}},"required":["userId","role"]}},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateProjectTaskRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"parentTaskId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["draft","pending","active","completed","cancelled"],"default":"draft"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"default":"medium"},"assignedTo":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"estimatedHours":{"type":"number","minimum":0},"billingRate":{"type":"number","minimum":0},"isBillable":{"type":"boolean","default":false},"dependencies":{"type":"array","items":{"type":"string"}}},"required":["projectId","name"]},"UpdateProjectTaskRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"assignedTo":{"type":"array","items":{"type":"string"}},"parentTaskId":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"estimatedHours":{"type":"number","minimum":0},"actualHours":{"type":"number","minimum":0},"billingRate":{"type":"number","minimum":0},"isBillable":{"type":"boolean"},"dependencies":{"type":"array","items":{"type":"string"}}}},"CreateProjectExpenseRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"taskId":{"type":"string"},"category":{"type":"string","enum":["transport","accommodation","meals","materials","equipment","other"]},"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"vatRate":{"type":"number","minimum":0,"maximum":100,"default":0},"status":{"type":"string","enum":["draft","pending","submitted","approved","rejected","invoiced"],"default":"draft"},"documentId":{"type":"string"},"receiptUrl":{"type":"string","format":"uri"},"date":{"type":"string","format":"date-time"},"splitAcrossProjects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["projectId","amount"]}},"markup":{"type":"number","minimum":0,"maximum":100}},"required":["projectId","category","description","amount","currency","date"]},"UpdateProjectExpenseRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"taskId":{"type":"string"},"category":{"type":"string","enum":["transport","accommodation","meals","materials","equipment","other"]},"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"vatRate":{"type":"number","minimum":0,"maximum":100},"documentId":{"type":"string"},"receiptUrl":{"type":"string","format":"uri"},"date":{"type":"string","format":"date-time"},"splitAcrossProjects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["projectId","amount"]}},"markup":{"type":"number","minimum":0,"maximum":100}}},"CreateTimeEntryRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"taskId":{"type":"string"},"userId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"hours":{"type":"integer","minimum":0,"maximum":24,"default":0},"minutes":{"type":"integer","minimum":0,"maximum":59,"default":0},"description":{"type":"string"},"costRate":{"type":"number","minimum":0,"default":0},"billingRate":{"type":"number","minimum":0},"status":{"type":"string","enum":["draft","pending","submitted","approved","rejected","invoiced"],"default":"draft"},"timesheetId":{"type":"string"},"requiresLegalTime":{"type":"boolean"},"hrTimeEntryId":{"type":"string"},"hrSyncStatus":{"type":"string","enum":["not_required","pending_employee_link","synced","blocked"]},"legalTimeSource":{"type":"string","enum":["hr_time_tracking","not_required"]},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"breakMinutes":{"type":"integer","minimum":0,"maximum":1440}},"required":["projectId","userId","date"]},"UpdateTimeEntryRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"taskId":{"type":"string"},"userId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"hours":{"type":"integer","minimum":0,"maximum":24},"minutes":{"type":"integer","minimum":0,"maximum":59},"description":{"type":"string"},"costRate":{"type":"number","minimum":0},"billingRate":{"type":"number","minimum":0},"timesheetId":{"type":"string"},"requiresLegalTime":{"type":"boolean"},"hrTimeEntryId":{"type":"string"},"hrSyncStatus":{"type":"string","enum":["not_required","pending_employee_link","synced","blocked"]},"legalTimeSource":{"type":"string","enum":["hr_time_tracking","not_required"]},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"breakMinutes":{"type":"integer","minimum":0,"maximum":1440}}},"GenerateInvoiceRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"},"timeEntryIds":{"type":"array","items":{"type":"string"}},"expenseIds":{"type":"array","items":{"type":"string"}},"groupBy":{"type":"string","enum":["none","month","week"]},"title":{"type":"string"},"description":{"type":"string"},"dueDate":{"type":"string","format":"date-time"},"includeNonBillable":{"type":"boolean"}},"required":["projectId"]},"SubmitTimeEntryForApprovalRequest":{"type":"object","properties":{"timeEntryId":{"type":"string","minLength":1},"title":{"type":"string"},"description":{"type":"string"}},"required":["timeEntryId"]},"SubmitExpenseForApprovalRequest":{"type":"object","properties":{"expenseId":{"type":"string","minLength":1},"title":{"type":"string"},"description":{"type":"string"}},"required":["expenseId"]},"ProjectPlanningFiltersQuery":{"type":"object","properties":{"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"},"granularity":{"type":"string","enum":["week","month"],"default":"week"},"resourceId":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string"}},"required":["dateFrom","dateTo"]},"ListProjectRevenueRecognitionQuery":{"type":"object","properties":{"asOfDate":{"type":"string","format":"date-time"}}},"CreateProjectRevenueRecognitionRequest":{"type":"object","properties":{"invoiceId":{"type":"string"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"method":{"type":"string","enum":["point_in_time","straight_line","milestone","time_material","percentage_of_completion"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"recognitionDate":{"type":"string","format":"date-time"},"dryRun":{"type":"boolean"}},"required":["periodStart","periodEnd","method","amount"]},"ProjectSkillContextRequest":{"type":"object","properties":{"correlationId":{"type":"string"},"idempotencyKey":{"type":"string"},"approvalId":{"type":"string"},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"}}},"ProjectTaskSyncRequest":{"type":"object","properties":{"provider":{"type":"string","enum":["jira","asana"]},"externalProjectId":{"type":"string"},"syncDirection":{"type":"string","enum":["import","export","bidirectional"]},"dryRun":{"type":"boolean"},"externalTasks":{"type":"array","items":{"type":"object","properties":{"externalTaskId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string"},"assigneeExternalId":{"type":"string"},"startDate":{"type":"string"},"dueDate":{"type":"string"}},"required":["externalTaskId","name"]}}},"required":["provider","syncDirection"]},"CreateWarehouseRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"isDefault":{"type":"boolean","default":false}},"required":["code","name"]},"UpdateWarehouseRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"isDefault":{"type":"boolean"}}},"CreateLocationRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["zone","aisle","shelf","bin"]},"parentId":{"type":"string"},"isActive":{"type":"boolean","default":true}},"required":["code","name","type"]},"UpdateLocationRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["zone","aisle","shelf","bin"]},"parentId":{"type":"string"},"isActive":{"type":"boolean"}}},"CreateProductRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"type":{"type":"string","enum":["stockable","non_stockable","consumable"]},"sellable":{"type":"boolean","default":true},"purchasable":{"type":"boolean","default":true},"description":{"type":"string"},"category":{"type":"string"},"categoryId":{"type":"string"},"supplierId":{"type":"string"},"baseUnit":{"type":"string","minLength":1},"unitConversions":{"type":"array","items":{"type":"object","properties":{"fromUnit":{"type":"string"},"toUnit":{"type":"string"},"factor":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["fromUnit","toUnit","factor"]}},"packagingLevels":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"barcode":{"type":"string"}},"required":["level","name","quantity"]}},"barcodes":{"type":"array","items":{"type":"object","properties":{"barcode":{"type":"string","minLength":1},"format":{"type":"string"},"type":{"type":"string","enum":["product","variant","packaging"]},"variantId":{"type":"string"},"packagingLevel":{"type":"number"}},"required":["barcode","format","type"]}},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"sku":{"type":"string"},"barcode":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"required":["variantId","name"]}},"weight":{"type":"number","minimum":0},"dimensions":{"type":"object","properties":{"length":{"type":"number","minimum":0},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0}},"required":["length","width","height"]},"defaultSalesAccount":{"type":"string"},"defaultPurchaseAccount":{"type":"string"},"defaultInventoryAccount":{"type":"string"},"defaultSalesPrice":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["amount","currency"]},"defaultPurchasePrice":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["amount","currency"]},"defaultSalesVatRuleCode":{"type":"string","minLength":1},"defaultPurchaseVatRuleCode":{"type":"string","minLength":1},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["name","code","type","baseUnit"]},"UpdateProductRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"type":{"type":"string","enum":["stockable","non_stockable","consumable"]},"sellable":{"type":"boolean","default":true},"purchasable":{"type":"boolean","default":true},"description":{"type":"string"},"category":{"type":"string"},"categoryId":{"type":"string","nullable":true},"supplierId":{"type":"string","nullable":true},"baseUnit":{"type":"string","minLength":1},"unitConversions":{"type":"array","items":{"type":"object","properties":{"fromUnit":{"type":"string"},"toUnit":{"type":"string"},"factor":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["fromUnit","toUnit","factor"]}},"packagingLevels":{"type":"array","items":{"type":"object","properties":{"level":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"barcode":{"type":"string"}},"required":["level","name","quantity"]}},"barcodes":{"type":"array","items":{"type":"object","properties":{"barcode":{"type":"string","minLength":1},"format":{"type":"string"},"type":{"type":"string","enum":["product","variant","packaging"]},"variantId":{"type":"string"},"packagingLevel":{"type":"number"}},"required":["barcode","format","type"]}},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"sku":{"type":"string"},"barcode":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"required":["variantId","name"]}},"weight":{"type":"number","minimum":0,"nullable":true},"dimensions":{"type":"object","properties":{"length":{"type":"number","minimum":0},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0}},"required":["length","width","height"],"nullable":true},"defaultSalesAccount":{"type":"string","nullable":true},"defaultPurchaseAccount":{"type":"string","nullable":true},"defaultInventoryAccount":{"type":"string","nullable":true},"defaultSalesPrice":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["amount","currency"],"nullable":true},"defaultPurchasePrice":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"currency":{"type":"string"}},"required":["amount","currency"],"nullable":true},"defaultSalesVatRuleCode":{"type":"string","minLength":1,"nullable":true},"defaultPurchaseVatRuleCode":{"type":"string","minLength":1,"nullable":true},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateTransferRequest":{"type":"object","properties":{"sourceWarehouseId":{"type":"string","minLength":1},"destinationWarehouseId":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit"]}},"requestedDate":{"type":"string","format":"date-time"},"expectedDeliveryDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"},"transferNumber":{"type":"string"}},"required":["sourceWarehouseId","destinationWarehouseId","lines"]},"UpdateTransferRequest":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit"]}},"expectedDeliveryDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"}}},"CreateStocktakeRequest":{"type":"object","properties":{"warehouseId":{"type":"string","minLength":1},"locationId":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"expectedQuantity":{"type":"number","minimum":0},"countedQuantity":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","expectedQuantity","countedQuantity","unit"]}},"startDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"},"stocktakeNumber":{"type":"string"}},"required":["warehouseId","lines"]},"UpdateStocktakeRequest":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"expectedQuantity":{"type":"number","minimum":0},"countedQuantity":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","expectedQuantity","countedQuantity","unit"]}},"notes":{"type":"string"},"reason":{"type":"string"}}},"CreateStockMovementRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"warehouseId":{"type":"string","minLength":1},"locationId":{"type":"string"},"movementType":{"type":"string","enum":["in","out","transfer","adjustment"]},"sourceType":{"type":"string","enum":["delivery_note","goods_receipt","order","transfer","adjustment","manual","return"]},"sourceId":{"type":"string"},"sourceLineId":{"type":"string","minLength":1},"effectKind":{"type":"string","enum":["reservation","stock_in","stock_out","transfer_out","transfer_in","return_in","return_out","adjustment"]},"reservationId":{"type":"string","minLength":1},"quantity":{"type":"number"},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"movementDate":{"type":"string","format":"date-time"},"reference":{"type":"string"},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","warehouseId","movementType","sourceType","quantity","unit","movementDate"]},"UpdateStockMovementRequest":{"type":"object","properties":{"quantity":{"type":"number"},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"movementDate":{"type":"string","format":"date-time"},"reference":{"type":"string"},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}}},"CreateAdjustmentRequest":{"type":"object","properties":{"warehouseId":{"type":"string","minLength":1},"locationId":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number"},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"reason":{"type":"string","enum":["damaged","expired","lost","found","theft","count_error","other"]},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit","reason"]}},"adjustmentDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"},"adjustmentNumber":{"type":"string"}},"required":["warehouseId","items"]},"UpdateAdjustmentRequest":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number"},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"reason":{"type":"string","enum":["damaged","expired","lost","found","theft","count_error","other"]},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit","reason"]}},"adjustmentDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"}}},"CreateEmployeeRequest":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"personId":{"type":"string","minLength":1},"socialSecurityNumber":{"type":"string","maxLength":30},"birthDate":{"type":"string","format":"date-time"},"nationality":{"type":"string"},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","registered_partnership"]},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"managerId":{"type":"string"},"managerEmployeeId":{"type":"string","minLength":1,"nullable":true},"status":{"type":"string","enum":["active","inactive","on_leave","in_training"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"contract":{"type":"object","properties":{"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"]},"probationPeriod":{"type":"number","minimum":0},"noticePeriod":{"type":"number","minimum":0},"clauses":{"type":"object","additionalProperties":{}}},"required":["contractType","startDate","salary","workingHours"]},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["personId","position","startDate","contract"]},"CreateEmployeeInput":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"personId":{"type":"string","minLength":1},"socialSecurityNumber":{"type":"string","maxLength":30},"birthDate":{"type":"string","format":"date-time"},"nationality":{"type":"string"},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","registered_partnership"]},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"managerId":{"type":"string"},"managerEmployeeId":{"type":"string","minLength":1,"nullable":true},"status":{"type":"string","enum":["active","inactive","on_leave","in_training"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"contract":{"type":"object","properties":{"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"]},"probationPeriod":{"type":"number","minimum":0},"noticePeriod":{"type":"number","minimum":0},"clauses":{"type":"object","additionalProperties":{}}},"required":["contractType","startDate","salary","workingHours"]},"customFieldValues":{"type":"object","additionalProperties":{}}},"required":["personId","position","startDate","contract"]},"UpdateEmployeeRequest":{"type":"object","properties":{"socialSecurityNumber":{"type":"string","maxLength":30},"birthDate":{"type":"string","format":"date-time"},"nationality":{"type":"string"},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","registered_partnership"]},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"managerId":{"type":"string"},"managerEmployeeId":{"type":"string","minLength":1,"nullable":true},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"status":{"type":"string","enum":["active","inactive","on_leave","in_training"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"endDate":{"type":"string","format":"date-time"},"customFieldValues":{"type":"object","additionalProperties":{}}}},"UpdateEmployeeInput":{"type":"object","properties":{"socialSecurityNumber":{"type":"string","maxLength":30},"birthDate":{"type":"string","format":"date-time"},"nationality":{"type":"string"},"maritalStatus":{"type":"string","enum":["single","married","divorced","widowed","registered_partnership"]},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"managerId":{"type":"string"},"managerEmployeeId":{"type":"string","minLength":1,"nullable":true},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"status":{"type":"string","enum":["active","inactive","on_leave","in_training"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"endDate":{"type":"string","format":"date-time"},"customFieldValues":{"type":"object","additionalProperties":{}}}},"CreateEmployeeContractRequest":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"employeeRecordId":{"type":"string","minLength":1},"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"]},"probationPeriod":{"type":"number","minimum":0},"noticePeriod":{"type":"number","minimum":0},"clauses":{"type":"object","additionalProperties":{}}},"required":["employeeId","contractType","startDate","position","salary","workingHours"]},"CreateEmployeeContractInput":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"employeeRecordId":{"type":"string","minLength":1},"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"]},"probationPeriod":{"type":"number","minimum":0},"noticePeriod":{"type":"number","minimum":0},"clauses":{"type":"object","additionalProperties":{}}},"required":["employeeId","contractType","startDate","position","salary","workingHours"]},"UpdateEmployeeContractRequest":{"type":"object","properties":{"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time","nullable":true},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"],"nullable":true},"probationPeriod":{"type":"number","minimum":0,"nullable":true},"noticePeriod":{"type":"number","minimum":0,"nullable":true},"clauses":{"type":"object","additionalProperties":{}}}},"UpdateEmployeeContractInput":{"type":"object","properties":{"contractType":{"type":"string","minLength":1},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time","nullable":true},"position":{"type":"string","minLength":1},"department":{"type":"string"},"grade":{"type":"string"},"salary":{"type":"number","minimum":0},"compensationType":{"type":"string","enum":["annual_salary","hourly"]},"hourlyRate":{"type":"number","minimum":0},"thirteenthSalaryEnabled":{"type":"boolean"},"thirteenthSalaryMode":{"type":"string","enum":["accrue_monthly","pay_in_december","pay_monthly"]},"workingHours":{"type":"number","minimum":0,"maximum":168},"cctAssignment":{"type":"object","properties":{"familyCode":{"type":"string","minLength":1},"classificationValues":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}},"status":{"type":"string","enum":["complete","incomplete"]}},"required":["status"],"nullable":true},"probationPeriod":{"type":"number","minimum":0,"nullable":true},"noticePeriod":{"type":"number","minimum":0,"nullable":true},"clauses":{"type":"object","additionalProperties":{}}}},"UpdateEmployeeContractStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","approved","executed","locked"]},"reason":{"type":"string"}},"required":["status"]},"CreateLeaveRequestInput":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"leaveType":{"type":"string","enum":["vacation","sick","unpaid","maternity","paternity","other"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["employeeId","leaveType","startDate","endDate"]},"UpdateLeaveRequestStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","approved","executed","locked"]},"reason":{"type":"string"}},"required":["status"]},"CreateTemplateRequest":{"type":"object","properties":{"templateId":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["invoice","quote","order","creditNote","deliveryNote","purchaseOrder","bill","purchaseCreditNote","socialSecurityDeclaration","contract","payslip","financials","statement","other"]},"name":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","minLength":1},"designVersion":{"type":"integer","minimum":1},"design":{"type":"object","additionalProperties":{}},"variablesSchema":{"type":"object","additionalProperties":{}},"validationMode":{"type":"string","enum":["strict","permissive"],"default":"strict"},"capabilities":{"type":"object","properties":{"supportsPdf":{"type":"boolean"},"supportsHtml":{"type":"boolean"},"supportsDocx":{"type":"boolean"},"supportsAsync":{"type":"boolean"}},"required":["supportsPdf","supportsHtml","supportsDocx","supportsAsync"],"default":{"supportsPdf":true,"supportsHtml":true,"supportsDocx":false,"supportsAsync":false}},"mockData":{"type":"object","additionalProperties":{}},"companyId":{"type":"string","nullable":true},"isDefault":{"type":"boolean","default":false},"locale":{"type":"string","default":"en"}},"required":["type","name","content"]},"UpdateTemplateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","minLength":1},"designVersion":{"type":"integer","minimum":1},"design":{"type":"object","additionalProperties":{}},"variablesSchema":{"type":"object","additionalProperties":{}},"validationMode":{"type":"string","enum":["strict","permissive"]},"capabilities":{"type":"object","properties":{"supportsPdf":{"type":"boolean"},"supportsHtml":{"type":"boolean"},"supportsDocx":{"type":"boolean"},"supportsAsync":{"type":"boolean"}},"required":["supportsPdf","supportsHtml","supportsDocx","supportsAsync"]},"mockData":{"type":"object","additionalProperties":{}},"isDefault":{"type":"boolean"},"locale":{"type":"string"}}},"GenerateDocumentRequest":{"type":"object","properties":{"templateId":{"type":"string"},"type":{"type":"string","enum":["invoice","quote","order","creditNote","deliveryNote","purchaseOrder","bill","purchaseCreditNote","socialSecurityDeclaration","contract","payslip","financials","statement","other"]},"variables":{"type":"object","additionalProperties":{}},"format":{"type":"string","enum":["pdf","html","docx"],"default":"pdf"},"locale":{"type":"string","default":"en"},"dryRun":{"type":"boolean","default":false},"relatedEntityType":{"type":"string","maxLength":50},"relatedEntityId":{"type":"string"}},"required":["variables"]},"DryRunRequest":{"type":"object","properties":{"templateId":{"type":"string"},"type":{"type":"string","enum":["invoice","quote","order","creditNote","deliveryNote","purchaseOrder","bill","purchaseCreditNote","socialSecurityDeclaration","contract","payslip","financials","statement","other"]},"variables":{"type":"object","additionalProperties":{}},"format":{"type":"string","enum":["pdf","html","docx"],"default":"pdf"},"locale":{"type":"string","default":"en"},"dryRun":{"type":"boolean","enum":[true]},"relatedEntityType":{"type":"string","maxLength":50},"relatedEntityId":{"type":"string"}},"required":["variables","dryRun"]},"ExplainRequest":{"type":"object","properties":{"templateId":{"type":"string"},"type":{"type":"string","enum":["invoice","quote","order","creditNote","deliveryNote","purchaseOrder","bill","purchaseCreditNote","socialSecurityDeclaration","contract","payslip","financials","statement","other"]},"variables":{"type":"object","additionalProperties":{}},"format":{"type":"string","enum":["pdf","html","docx"],"default":"pdf"},"locale":{"type":"string","default":"en"}},"required":["variables"]},"CreateFixedAssetRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"category":{"type":"string","enum":["computer","vehicle","furniture","building","equipment","other"]},"acquisitionDate":{"type":"string","format":"date-time"},"serviceDate":{"type":"string","format":"date-time"},"acquisitionCost":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"depreciationMethod":{"type":"string","enum":["linear","declining"]},"depreciationPeriod":{"type":"integer","minimum":0,"exclusiveMinimum":true},"depreciationRate":{"type":"number","minimum":0,"exclusiveMinimum":true},"residualValue":{"type":"number","minimum":0},"accountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"},"depreciationAccountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"},"depreciationExpenseAccountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"}},"required":["name","category","acquisitionDate","serviceDate","acquisitionCost","currency","depreciationMethod","depreciationPeriod","residualValue","accountCode","depreciationAccountCode","depreciationExpenseAccountCode"]},"UpdateFixedAssetRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"category":{"type":"string","enum":["computer","vehicle","furniture","building","equipment","other"]},"acquisitionDate":{"type":"string","format":"date-time"},"serviceDate":{"type":"string","format":"date-time"},"acquisitionCost":{"type":"number","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string"},"depreciationMethod":{"type":"string","enum":["linear","declining"]},"depreciationPeriod":{"type":"integer","minimum":0,"exclusiveMinimum":true},"depreciationRate":{"type":"number","minimum":0,"exclusiveMinimum":true},"residualValue":{"type":"number","minimum":0},"accountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"},"depreciationAccountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"},"depreciationExpenseAccountCode":{"type":"string","minLength":1,"pattern":"^\\d+(\\.\\d+)*$"}}},"DisposeFixedAssetRequest":{"type":"object","properties":{"disposalDate":{"type":"string","format":"date-time"},"disposalAmount":{"type":"number","minimum":0},"reason":{"type":"string"}},"required":["disposalDate"]},"CalculateDepreciationRequest":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"method":{"type":"string","enum":["linear","declining"]}},"required":["period"]},"GenerateDepreciationEntryRequest":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["period"]},"CalculateTaxRequest":{"type":"object","properties":{"amountExcludingTax":{"type":"number","minimum":0,"exclusiveMinimum":true},"taxCode":{"type":"string"},"calculationDate":{"type":"string","format":"date-time"},"countryCode":{"type":"string"}},"required":["amountExcludingTax"]},"CalculateVatAmountsRequest":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}(?:-(\\d{2})|-Q(\\d)|-H([12]))?$"},"countryCode":{"type":"string"},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"}},"required":["period"]},"CreateTaxDeclarationRequest":{"type":"object","properties":{"countryCode":{"type":"string"},"period":{"type":"string","pattern":"^\\d{4}(?:-(\\d{2})|-Q(\\d)|-H([12]))?$"},"type":{"type":"string","enum":["vat","estv","corporate_income_tax","capital_tax"]},"correctionOfDeclarationId":{"type":"string"},"correctionReason":{"type":"string"}},"required":["period","type"]},"ReconcileTransactionsRequest":{"type":"object","properties":{"bankAccountId":{"type":"string","minLength":1},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"]},"autoMatch":{"type":"boolean","default":false},"matches":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1},"ledgerEntryId":{"type":"string","minLength":1},"matchType":{"type":"string","enum":["automatic","manual"]},"matchScore":{"type":"number"}},"required":["transactionId","ledgerEntryId","matchType"]}},"allocations":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1},"ledgerEntryId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["transactionId","ledgerEntryId","amount"]}},"adjustments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bank_fee","fx_difference","payment_difference"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"accountCode":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["type","amount","accountCode"]}},"differencePolicy":{"type":"string","enum":["block","post_to_account"],"default":"block"},"exchangeRate":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["bankAccountId","period"]},"CreateReconciliationRequest":{"type":"object","properties":{"bankAccountId":{"type":"string","minLength":1},"reconciliationDate":{"type":"string","format":"date-time"},"closingBalance":{"type":"number"},"allocations":{"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1},"ledgerEntryId":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["transactionId","ledgerEntryId","amount"]}},"adjustments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bank_fee","fx_difference","payment_difference"]},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"accountCode":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["type","amount","accountCode"]}},"differencePolicy":{"type":"string","enum":["block","post_to_account"],"default":"block"},"exchangeRate":{"type":"number","minimum":0,"exclusiveMinimum":true},"notes":{"type":"string"}},"required":["bankAccountId","reconciliationDate","closingBalance"]},"CreateAccountingPolicyRuleRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"conditions":{"type":"object","properties":{"productId":{"type":"string"},"productType":{"type":"string","enum":["stockable","non_stockable","consumable"]},"categoryId":{"type":"string"},"category":{"type":"string"},"transactionType":{"type":"string","enum":["SALE","PURCHASE"]},"vatRate":{"type":"number","minimum":0,"maximum":100},"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0}}},"resolution":{"type":"object","properties":{"accountCode":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["accountCode","reason"]},"isActive":{"type":"boolean","default":true},"priority":{"type":"integer","minimum":1,"maximum":100,"default":1},"version":{"type":"string","minLength":1,"maxLength":50},"effectiveDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}},"required":["name","conditions","resolution"]},"UpdateAccountingPolicyRuleRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"conditions":{"type":"object","properties":{"productId":{"type":"string"},"productType":{"type":"string","enum":["stockable","non_stockable","consumable"]},"categoryId":{"type":"string"},"category":{"type":"string"},"transactionType":{"type":"string","enum":["SALE","PURCHASE"]},"vatRate":{"type":"number","minimum":0,"maximum":100},"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0}}},"resolution":{"type":"object","properties":{"accountCode":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}}},"isActive":{"type":"boolean"},"priority":{"type":"integer","minimum":1,"maximum":100},"version":{"type":"string","minLength":1,"maxLength":50},"effectiveDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"CreateReturnRequest":{"type":"object","properties":{"direction":{"type":"string","enum":["customer_inbound","supplier_outbound"],"default":"customer_inbound"},"sourceType":{"type":"string","enum":["manual"],"default":"manual"},"contactName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"warehouseId":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"productId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1},"reason":{"type":"string","enum":["defective","wrong_item","damaged","not_as_described","customer_request","other"]},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit","reason"]}},"returnDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"}},"required":["warehouseId","lines"]},"UpdateReturnRequest":{"type":"object","properties":{"contactName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"warehouseId":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"productId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1},"reason":{"type":"string","enum":["defective","wrong_item","damaged","not_as_described","customer_request","other"]},"notes":{"type":"string"},"batchNumber":{"type":"string"},"serialNumber":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"}},"required":["productId","quantity","unit","reason"]}},"returnDate":{"type":"string","format":"date-time"},"notes":{"type":"string"},"reason":{"type":"string"}}},"ReturnTransitionRequest":{"type":"object","properties":{"action":{"type":"string","enum":["request","approve","receive","restock","ship","cancel","withdraw","unapprove","step_back"]},"reason":{"type":"string"}},"required":["action"]},"ReserveStockRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"warehouseId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1},"sourceType":{"type":"string","enum":["delivery_note","goods_receipt","order","transfer","adjustment","manual","return"]},"sourceId":{"type":"string"},"sourceLineId":{"type":"string","minLength":1},"effectKind":{"type":"string","enum":["reservation","stock_in","stock_out","transfer_out","transfer_in","return_in","return_out","adjustment"]},"expiresAt":{"type":"string","format":"date-time"},"notes":{"type":"string"}},"required":["productId","warehouseId","quantity","unit","sourceType"]},"CalculateCostRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"warehouseId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"method":{"type":"string","enum":["FIFO","LIFO","FEFO","average","standard"],"default":"FIFO"}},"required":["productId","warehouseId","quantity"]},"CreateBatchRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"warehouseId":{"type":"string","minLength":1},"batchNumber":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0},"unit":{"type":"string","minLength":1},"unitCost":{"type":"number","minimum":0},"productionDate":{"type":"string","format":"date-time"},"expirationDate":{"type":"string","format":"date-time"},"supplierBatchNumber":{"type":"string"},"notes":{"type":"string"},"sourceMovementId":{"type":"string"}},"required":["productId","warehouseId","batchNumber","quantity","unit"]},"CreatePayrollRunInput":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"grossSalary":{"type":"number","minimum":0},"adjustments":{"type":"object","properties":{"bonuses":{"type":"number","minimum":0},"deductions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["advance","loan","source_tax","health_insurance","other"]},"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0}},"required":["type","description","amount"]}},"benefits":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["meal_vouchers","transport","other"]},"description":{"type":"string","minLength":1},"amount":{"type":"number","minimum":0},"taxable":{"type":"boolean"}},"required":["type","description","amount","taxable"]}}}}},"required":["employeeId","periodStart","periodEnd"]},"UpdatePayrollRunStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","approved","executed","locked"]},"reason":{"type":"string"}},"required":["status"]},"CreateSocialSecurityDeclarationInput":{"type":"object","properties":{"declarationType":{"type":"string","enum":["AVS","LPP","unemployment","health_insurance"]},"period":{"type":"string","pattern":"^\\d{4}(-\\d{2}|-Q[1-4]|)$"},"payrollRunIds":{"type":"array","items":{"type":"string"}}},"required":["declarationType","period"]},"UpdateSocialSecurityDeclarationStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","pending_approval","generated","approved","validated","submitted","accepted","rejected","locked"]},"rejectionReason":{"type":"string"}},"required":["status"]},"CreatePayrollCorrectionInput":{"type":"object","properties":{"originalPayrollRunId":{"type":"string","minLength":1},"correctionType":{"type":"string","enum":["gross_salary","contributions","deductions","benefits","other"]},"reason":{"type":"string","minLength":1},"adjustments":{"type":"object","properties":{"grossSalary":{"type":"number"},"employerContributions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"required":["type","amount"]}},"employeeContributions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"required":["type","amount"]}},"deductions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"required":["type","amount"]}},"benefits":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"required":["type","amount"]}}}}},"required":["originalPayrollRunId","correctionType","reason","adjustments"]},"CreatePayrollSimulationInput":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"grossSalary":{"type":"number","minimum":0},"contributionOverrides":{"type":"object","additionalProperties":{"type":"number"}},"deductionOverrides":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"}},"required":["type","description","amount"]}},"benefitOverrides":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"taxable":{"type":"boolean"}},"required":["type","description","amount","taxable"]}}},"required":["employeeId","periodStart","periodEnd","grossSalary"]},"CreateHREventInput":{"type":"object","properties":{"sourceEntityType":{"type":"string","enum":["payroll.run","payroll.correction","payroll_simulation","social_security_declaration","leave.request","time_entry","employee_contract","employee","attendance","benefit","performance_review","recruitment","onboarding","offboarding"]},"sourceEntityId":{"oneOf":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},{"type":"string"},{}]},"eventType":{"type":"string","enum":["payroll_created","payroll_executed","payroll_bank_handoff_created","payroll_corrected","payslip_generated","declaration_generated","declaration_submitted","declaration_accepted","declaration_rejected","declaration_accounting_generated","declaration_banking_generated","declaration_exported","correction_created","correction_executed","simulation_created","leave_requested","leave_approved","leave_executed","leave_rejected","time_entry_created","time_entry_approved","contract_created","contract_updated","contract_status_changed","contract_deleted","contract_executed","contract_generated","employee_hired","employee_deleted","employee_terminated","attendance_recorded","benefit_assigned","performance_reviewed","recruitment_started","onboarding_started","offboarding_started"]},"eventData":{"type":"object","additionalProperties":{}},"occurredAt":{"type":"string","format":"date-time"}},"required":["sourceEntityType","sourceEntityId","eventType","eventData"]},"CreateHRConfigInput":{"type":"object","properties":{"leave":{"type":"object","properties":{"defaultVacationDays":{"type":"number","minimum":0,"maximum":365},"allowNegativeBalance":{"type":"boolean"},"requireApproval":{"type":"boolean"},"autoApproveBelow":{"type":"number","minimum":0},"allowOverlapping":{"type":"boolean"},"maxConsecutiveDays":{"type":"number","minimum":1},"carryOverEnabled":{"type":"boolean"},"carryOverMaxDays":{"type":"number","minimum":0},"carryOverExpiryMonths":{"type":"number","minimum":0}},"required":["defaultVacationDays","allowNegativeBalance","requireApproval","autoApproveBelow","allowOverlapping","maxConsecutiveDays","carryOverEnabled","carryOverMaxDays","carryOverExpiryMonths"]},"timeTracking":{"type":"object","properties":{"requireApproval":{"type":"boolean"},"autoApproveBelow":{"type":"number","minimum":0},"allowOvertime":{"type":"boolean"},"maxDailyHours":{"type":"number","minimum":1,"maximum":24},"requireProject":{"type":"boolean"},"requireActivity":{"type":"boolean"},"roundingMode":{"type":"string","enum":["NONE","QUARTER","HALF","HOUR"]},"minEntryDuration":{"type":"number","minimum":0}},"required":["requireApproval","autoApproveBelow","allowOvertime","maxDailyHours","requireProject","requireActivity","roundingMode","minEntryDuration"]},"attendance":{"type":"object","properties":{"enableClockIn":{"type":"boolean"},"requireClockIn":{"type":"boolean"},"allowRemoteClockIn":{"type":"boolean"},"geofencingEnabled":{"type":"boolean"},"geofencingRadius":{"type":"number","minimum":0},"breakDuration":{"type":"number","minimum":0},"requireBreakAfter":{"type":"number","minimum":0},"maxConsecutiveHours":{"type":"number","minimum":1,"maximum":24}},"required":["enableClockIn","requireClockIn","allowRemoteClockIn","geofencingEnabled","geofencingRadius","breakDuration","requireBreakAfter","maxConsecutiveHours"]},"benefits":{"type":"object","properties":{"enableBenefits":{"type":"boolean"},"allowCustomBenefits":{"type":"boolean"},"requireApproval":{"type":"boolean"},"taxableBenefits":{"type":"array","items":{"type":"string"}},"nonTaxableBenefits":{"type":"array","items":{"type":"string"}}},"required":["enableBenefits","allowCustomBenefits","requireApproval","taxableBenefits","nonTaxableBenefits"]},"performance":{"type":"object","properties":{"enableReviews":{"type":"boolean"},"reviewFrequency":{"type":"string","enum":["annual","biannual","quarterly","monthly"]},"requireSelfAssessment":{"type":"boolean"},"requireManagerAssessment":{"type":"boolean"},"allowPeerReview":{"type":"boolean"},"maxGoals":{"type":"number","minimum":0},"requireGoalApproval":{"type":"boolean"}},"required":["enableReviews","reviewFrequency","requireSelfAssessment","requireManagerAssessment","allowPeerReview","maxGoals","requireGoalApproval"]}},"required":["leave","timeTracking","attendance","benefits","performance"]},"UpdateHRConfigRequest":{"type":"object","properties":{"leave":{"type":"object","properties":{"defaultVacationDays":{"type":"number","minimum":0,"maximum":365},"allowNegativeBalance":{"type":"boolean"},"requireApproval":{"type":"boolean"},"autoApproveBelow":{"type":"number","minimum":0},"allowOverlapping":{"type":"boolean"},"maxConsecutiveDays":{"type":"number","minimum":1},"carryOverEnabled":{"type":"boolean"},"carryOverMaxDays":{"type":"number","minimum":0},"carryOverExpiryMonths":{"type":"number","minimum":0}}},"timeTracking":{"type":"object","properties":{"requireApproval":{"type":"boolean"},"autoApproveBelow":{"type":"number","minimum":0},"allowOvertime":{"type":"boolean"},"maxDailyHours":{"type":"number","minimum":1,"maximum":24},"requireProject":{"type":"boolean"},"requireActivity":{"type":"boolean"},"roundingMode":{"type":"string","enum":["NONE","QUARTER","HALF","HOUR"]},"minEntryDuration":{"type":"number","minimum":0}}},"attendance":{"type":"object","properties":{"enableClockIn":{"type":"boolean"},"requireClockIn":{"type":"boolean"},"allowRemoteClockIn":{"type":"boolean"},"geofencingEnabled":{"type":"boolean"},"geofencingRadius":{"type":"number","minimum":0},"breakDuration":{"type":"number","minimum":0},"requireBreakAfter":{"type":"number","minimum":0},"maxConsecutiveHours":{"type":"number","minimum":1,"maximum":24}}},"benefits":{"type":"object","properties":{"enableBenefits":{"type":"boolean"},"allowCustomBenefits":{"type":"boolean"},"requireApproval":{"type":"boolean"},"taxableBenefits":{"type":"array","items":{"type":"string"}},"nonTaxableBenefits":{"type":"array","items":{"type":"string"}}}},"performance":{"type":"object","properties":{"enableReviews":{"type":"boolean"},"reviewFrequency":{"type":"string","enum":["annual","biannual","quarterly","monthly"]},"requireSelfAssessment":{"type":"boolean"},"requireManagerAssessment":{"type":"boolean"},"allowPeerReview":{"type":"boolean"},"maxGoals":{"type":"number","minimum":0},"requireGoalApproval":{"type":"boolean"}}}}},"CreateTimeEntryInput":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"breakMinutes":{"type":"integer","minimum":0,"maximum":1440,"default":0},"projectId":{"type":"string","minLength":1},"activityId":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["employeeId","date","startTime","endTime"]},"UpdateTimeEntryInput":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"breakMinutes":{"type":"integer","minimum":0,"maximum":1440},"projectId":{"type":"string","minLength":1,"nullable":true},"activityId":{"type":"string","minLength":1,"nullable":true},"description":{"type":"string"}}},"UpdateTimeEntryStatusInput":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","approved","executed","locked"]},"reason":{"type":"string"}},"required":["status"]},"ReportParameters":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"]},"groupBy":{"type":"array","items":{"type":"string"}},"filters":{"type":"object","additionalProperties":{}},"currency":{"type":"string"},"locale":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"comparison":{"type":"object","properties":{"type":{"type":"string","enum":["previous_period","previous_year","custom"]},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"]}},"required":["type"]}}},"ProjectTimeEntryInput":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"taskId":{"type":"string"},"userId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"hours":{"type":"number","minimum":0,"exclusiveMinimum":true},"description":{"type":"string"}},"required":["projectId","userId","date","hours"]},"ProjectExpenseInput":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1},"date":{"type":"string","format":"date-time"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"description":{"type":"string"},"category":{"type":"string"}},"required":["projectId","userId","date","amount"]},"PayrollProcessingInput":{"type":"object","properties":{"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"companyId":{"type":"string","minLength":1}},"required":["periodStart","periodEnd","companyId"]},"CreateApprovalRequest":{"type":"object","properties":{"sourceType":{"type":"string","enum":["business_entity","document"]},"sourceId":{"type":"string","minLength":1},"entityType":{"type":"string","minLength":1,"maxLength":50},"entityId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"assignedToUserId":{"type":"string"},"assignedToGroupId":{"type":"string"},"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"groupId":{"type":"string"},"role":{"type":"string"}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","greater_than","less_than","contains"]},"value":{}},"required":["field","operator","value"]}}},"required":["stageNumber","type","approvers"]}},"metadata":{"type":"object","additionalProperties":{}},"notifyAssignees":{"type":"boolean"}},"required":["sourceType","sourceId","entityType","entityId","title","stages"]},"ListApprovalPoliciesQuery":{"type":"object","properties":{"status":{"type":"string","enum":["active","archived","all"]},"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1},"triggerAction":{"type":"string","minLength":1},"q":{"type":"string"}}},"CreateApprovalPolicyRequest":{"type":"object","properties":{"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1,"maxLength":120},"triggerAction":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["active","archived"],"default":"active"},"isDefault":{"type":"boolean","default":false},"priority":{"type":"integer","minimum":0,"default":0},"matching":{"type":"object","properties":{"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"currencies":{"type":"array","items":{"type":"string","minLength":1}},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"toolNames":{"type":"array","items":{"type":"string","minLength":1}},"modules":{"type":"array","items":{"type":"string","minLength":1}},"domains":{"type":"array","items":{"type":"string","minLength":1}},"kinds":{"type":"array","items":{"type":"string","minLength":1}},"forceApproval":{"type":"boolean"},"fieldConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"operator":{"type":"string","enum":["equals","not_equals","in","not_in","gt","gte","lt","lte","contains","exists"]},"value":{}},"required":["field","operator"]}}}},"workflow":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["stageNumber","type","approvers"]}}},"required":["stages"]},"presentation":{"type":"object","properties":{"titleTemplate":{"type":"string","minLength":1,"maxLength":200},"descriptionTemplate":{"type":"string","minLength":1,"maxLength":1000},"defaultMetadata":{"type":"object","additionalProperties":{}}}}},"required":["domain","policyKind","entityType","triggerAction","workflow"]},"UpdateApprovalPolicyRequest":{"type":"object","properties":{"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1,"maxLength":120},"triggerAction":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["active","archived"]},"isDefault":{"type":"boolean"},"priority":{"type":"integer","minimum":0},"matching":{"type":"object","properties":{"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"currencies":{"type":"array","items":{"type":"string","minLength":1}},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"toolNames":{"type":"array","items":{"type":"string","minLength":1}},"modules":{"type":"array","items":{"type":"string","minLength":1}},"domains":{"type":"array","items":{"type":"string","minLength":1}},"kinds":{"type":"array","items":{"type":"string","minLength":1}},"forceApproval":{"type":"boolean"},"fieldConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"operator":{"type":"string","enum":["equals","not_equals","in","not_in","gt","gte","lt","lte","contains","exists"]},"value":{}},"required":["field","operator"]}}}},"workflow":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["stageNumber","type","approvers"]}}},"required":["stages"]},"presentation":{"type":"object","properties":{"titleTemplate":{"type":"string","minLength":1,"maxLength":200},"descriptionTemplate":{"type":"string","minLength":1,"maxLength":1000},"defaultMetadata":{"type":"object","additionalProperties":{}}}}}},"SimulateApprovalPolicyRequest":{"type":"object","properties":{"amount":{"type":"number"},"amountInBaseCurrency":{"type":"number"},"currency":{"type":"string"},"countryCode":{"type":"string","minLength":2,"maxLength":3},"fields":{"type":"object","additionalProperties":{}}}},"ApprovalPoliciesListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1,"maxLength":120},"triggerAction":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["active","archived"]},"isDefault":{"type":"boolean"},"priority":{"type":"integer","minimum":0},"matching":{"type":"object","properties":{"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"currencies":{"type":"array","items":{"type":"string","minLength":1}},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"toolNames":{"type":"array","items":{"type":"string","minLength":1}},"modules":{"type":"array","items":{"type":"string","minLength":1}},"domains":{"type":"array","items":{"type":"string","minLength":1}},"kinds":{"type":"array","items":{"type":"string","minLength":1}},"forceApproval":{"type":"boolean"},"fieldConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"operator":{"type":"string","enum":["equals","not_equals","in","not_in","gt","gte","lt","lte","contains","exists"]},"value":{}},"required":["field","operator"]}}}},"workflow":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["stageNumber","type","approvers"]}}},"required":["stages"]},"presentation":{"type":"object","properties":{"titleTemplate":{"type":"string","minLength":1,"maxLength":200},"descriptionTemplate":{"type":"string","minLength":1,"maxLength":1000},"defaultMetadata":{"type":"object","additionalProperties":{}}}},"origin":{"type":"string","enum":["system","migrated","custom"]},"createdBy":{"type":"string","minLength":1},"updatedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1}},"required":["id","domain","policyKind","entityType","triggerAction","status","isDefault","priority","workflow","origin","createdBy","updatedBy","createdAt","updatedAt"]}}},"required":["items"]},"ApprovalPolicyItemResponse":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","minLength":1},"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1,"maxLength":120},"triggerAction":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["active","archived"]},"isDefault":{"type":"boolean"},"priority":{"type":"integer","minimum":0},"matching":{"type":"object","properties":{"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"currencies":{"type":"array","items":{"type":"string","minLength":1}},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"toolNames":{"type":"array","items":{"type":"string","minLength":1}},"modules":{"type":"array","items":{"type":"string","minLength":1}},"domains":{"type":"array","items":{"type":"string","minLength":1}},"kinds":{"type":"array","items":{"type":"string","minLength":1}},"forceApproval":{"type":"boolean"},"fieldConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"operator":{"type":"string","enum":["equals","not_equals","in","not_in","gt","gte","lt","lte","contains","exists"]},"value":{}},"required":["field","operator"]}}}},"workflow":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["stageNumber","type","approvers"]}}},"required":["stages"]},"presentation":{"type":"object","properties":{"titleTemplate":{"type":"string","minLength":1,"maxLength":200},"descriptionTemplate":{"type":"string","minLength":1,"maxLength":1000},"defaultMetadata":{"type":"object","additionalProperties":{}}}},"origin":{"type":"string","enum":["system","migrated","custom"]},"createdBy":{"type":"string","minLength":1},"updatedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1}},"required":["id","domain","policyKind","entityType","triggerAction","status","isDefault","priority","workflow","origin","createdBy","updatedBy","createdAt","updatedAt"]}},"required":["item"]},"ApprovalPolicySimulationResponse":{"type":"object","properties":{"matches":{"type":"boolean"},"policy":{"type":"object","properties":{"id":{"type":"string","minLength":1},"domain":{"type":"string","enum":["accounting","sales","purchases","hr","inventory","collaboration"]},"policyKind":{"type":"string","enum":["transition_gate","creation_gate","manual_instance","document_action","workflow_node","workflow_action"]},"entityType":{"type":"string","minLength":1,"maxLength":120},"triggerAction":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["active","archived"]},"isDefault":{"type":"boolean"},"priority":{"type":"integer","minimum":0},"matching":{"type":"object","properties":{"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"currencies":{"type":"array","items":{"type":"string","minLength":1}},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":3}},"toolNames":{"type":"array","items":{"type":"string","minLength":1}},"modules":{"type":"array","items":{"type":"string","minLength":1}},"domains":{"type":"array","items":{"type":"string","minLength":1}},"kinds":{"type":"array","items":{"type":"string","minLength":1}},"forceApproval":{"type":"boolean"},"fieldConditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200},"operator":{"type":"string","enum":["equals","not_equals","in","not_in","gt","gte","lt","lte","contains","exists"]},"value":{}},"required":["field","operator"]}}}},"workflow":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"stageNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true},"type":{"type":"string","enum":["sequential","parallel"]},"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}}}},"requiredApprovals":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["stageNumber","type","approvers"]}}},"required":["stages"]},"presentation":{"type":"object","properties":{"titleTemplate":{"type":"string","minLength":1,"maxLength":200},"descriptionTemplate":{"type":"string","minLength":1,"maxLength":1000},"defaultMetadata":{"type":"object","additionalProperties":{}}}},"origin":{"type":"string","enum":["system","migrated","custom"]},"createdBy":{"type":"string","minLength":1},"updatedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1}},"required":["id","domain","policyKind","entityType","triggerAction","status","isDefault","priority","workflow","origin","createdBy","updatedBy","createdAt","updatedAt"],"nullable":true}},"required":["matches","policy"]},"CreateApprovalAutomationRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"enabled":{"type":"boolean","default":true},"priority":{"type":"integer","minimum":1,"maximum":1000,"default":100},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","greater_than","less_than","greater_than_or_equal","less_than_or_equal","contains","not_contains","in","not_in"]},"value":{}},"required":["field","operator","value"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["auto_approve","auto_reject","assign_to_user","assign_to_group","set_sla_deadline","send_notification","create_task"]},"params":{"type":"object","additionalProperties":{}}},"required":["type"]}},"entityTypes":{"type":"array","items":{"type":"string"}},"sourceTypes":{"type":"array","items":{"type":"string","enum":["business_entity","document"]}}},"required":["name","conditions","actions"]},"UpdateApprovalAutomationRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"enabled":{"type":"boolean"},"priority":{"type":"integer","minimum":1,"maximum":1000},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","greater_than","less_than","greater_than_or_equal","less_than_or_equal","contains","not_contains","in","not_in"]},"value":{}},"required":["field","operator","value"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["auto_approve","auto_reject","assign_to_user","assign_to_group","set_sla_deadline","send_notification","create_task"]},"params":{"type":"object","additionalProperties":{}}},"required":["type"]}},"entityTypes":{"type":"array","items":{"type":"string"}},"sourceTypes":{"type":"array","items":{"type":"string","enum":["business_entity","document"]}}}},"MetadataEntityTypeParam":{"type":"object","properties":{"entityType":{"type":"string","minLength":1,"maxLength":120}},"required":["entityType"]},"MetadataEntityCustomFieldParam":{"type":"object","properties":{"entityType":{"type":"string","minLength":1,"maxLength":120},"fieldId":{"type":"string","minLength":1}},"required":["entityType","fieldId"]},"MetadataResolveBody":{"type":"object","properties":{"view":{"type":"string","enum":["list","detail","form","picker","search","export"]},"formMode":{"type":"string","enum":["create","edit"]},"pickerKey":{"type":"string","minLength":1,"maxLength":120},"locale":{"type":"string","minLength":2,"maxLength":16},"includeCustomFields":{"type":"boolean"},"includeArchivedFields":{"type":"boolean"},"includeGovernanceDiagnostics":{"type":"boolean"}}},"MetadataResolveQuery":{"type":"object","properties":{"view":{"type":"string","enum":["list","detail","form","picker","search","export"]},"formMode":{"type":"string","enum":["create","edit"]},"pickerKey":{"type":"string","minLength":1,"maxLength":120},"locale":{"type":"string","minLength":2,"maxLength":16},"includeCustomFields":{"type":"boolean"},"includeArchivedFields":{"type":"boolean"},"includeGovernanceDiagnostics":{"type":"boolean"}}},"MetadataValidateBody":{"type":"object","properties":{"operation":{"type":"string","enum":["create","update","action"]},"operationId":{"type":"string","minLength":1,"maxLength":160},"validationMode":{"type":"string","enum":["form","patch"]},"payload":{"type":"object","additionalProperties":{}},"metadataVersion":{"type":"string","minLength":1,"maxLength":120}},"required":["payload"]},"MetadataRecordHeaderResolveBody":{"type":"object","properties":{"entityId":{"type":"string","minLength":1,"maxLength":120},"record":{"type":"object","additionalProperties":{}},"relationHints":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":500},"href":{"type":"string","minLength":1,"maxLength":500}},"required":["key","label"]}},"formMode":{"type":"string","enum":["read","edit","create"]}},"required":["entityId","record"]},"MetadataLinkGraphResolveBody":{"type":"object","properties":{"formMode":{"type":"string","enum":["read","edit","create"]},"roles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}}},"MetadataCustomFieldsQuery":{"type":"object","properties":{"includeArchived":{"type":"boolean"},"tenantId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}}},"MetadataCreateCustomFieldBody":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["tenant"]},"tenantId":{"type":"string","minLength":1}},"required":["scopeType","tenantId"]},{"type":"object","properties":{"scopeType":{"type":"string","enum":["company"]},"tenantId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["scopeType","tenantId","companyId"]}]},"field":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"defaultValue":{},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"dataType":{"type":"string","enum":["text","textarea","rich_text","number","scale","currency","percentage","boolean","date","datetime","email","phone","url","file","iban","paymentReference","identifier","enum","multi_enum","relation","json"]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"kind":{"type":"string","enum":["scalar"]},"format":{"type":"string","enum":["plain","money","percent","date","datetime"]}},"required":["key","labelKey","dataType","kind"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"defaultValue":{},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"dataType":{"type":"string","enum":["text","textarea","rich_text","number","scale","currency","percentage","boolean","date","datetime","email","phone","url","file","iban","paymentReference","identifier","enum","multi_enum","relation","json"]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"kind":{"type":"string","enum":["enum"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"archived":{"type":"boolean"}},"required":["value"]}}},"required":["key","labelKey","dataType","kind","options"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"defaultValue":{},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"dataType":{"type":"string","enum":["text","textarea","rich_text","number","scale","currency","percentage","boolean","date","datetime","email","phone","url","file","iban","paymentReference","identifier","enum","multi_enum","relation","json"]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"kind":{"type":"string","enum":["multi_enum"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"archived":{"type":"boolean"}},"required":["value"]}},"maxSelections":{"type":"integer","minimum":1}},"required":["key","labelKey","dataType","kind","options"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"defaultValue":{},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"dataType":{"type":"string","enum":["text","textarea","rich_text","number","scale","currency","percentage","boolean","date","datetime","email","phone","url","file","iban","paymentReference","identifier","enum","multi_enum","relation","json"]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"kind":{"type":"string","enum":["relation"]},"relation":{"type":"object","properties":{"entityType":{"type":"string","enum":["address","bankAccount","bill","company","customer_account","employee","invoice","journal","opportunity","order","organization","person","productCategory","project","quote","warehouse"]},"relationType":{"type":"string","enum":["one_to_one","one_to_many","many_to_one","many_to_many"]},"labelFieldKey":{"type":"string","minLength":1},"valueFieldKey":{"type":"string","minLength":1},"pickerKey":{"type":"string","minLength":1}},"required":["entityType","relationType"]}},"required":["key","labelKey","dataType","kind","relation"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"defaultValue":{},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"dataType":{"type":"string","enum":["text","textarea","rich_text","number","scale","currency","percentage","boolean","date","datetime","email","phone","url","file","iban","paymentReference","identifier","enum","multi_enum","relation","json"]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"kind":{"type":"string","enum":["json"]},"schemaVersion":{"type":"string","minLength":1},"schemaRef":{"type":"string","minLength":1}},"required":["key","labelKey","dataType","kind"]}]},"capabilityPolicy":{"type":"object","properties":{"searchable":{"type":"boolean"},"filterable":{"type":"boolean"},"sortable":{"type":"boolean"},"exportable":{"type":"boolean"},"embeddable":{"type":"boolean"},"facetable":{"type":"boolean"}}},"indexPolicy":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","enum":["none"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["keyword"]},"indexName":{"type":"string","minLength":1},"caseInsensitive":{"type":"boolean"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["text"]},"indexName":{"type":"string","minLength":1},"analyzer":{"type":"string","minLength":1}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["numeric"]},"indexName":{"type":"string","minLength":1},"precision":{"type":"integer","minimum":0}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["date"]},"indexName":{"type":"string","minLength":1}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["relation"]},"indexName":{"type":"string","minLength":1},"relationEntityType":{"type":"string","enum":["address","approvalPolicy","bankAccount","bill","chartAccount","comment","company","customer_account","employee","group","invoice","journal","lead","ledgerEntry","ledgerSequence","module","opportunity","order","organization","partner","person","product","productCategory","project","purchaseOrder","quote","tenant","user","warehouse"]}},"required":["strategy","relationEntityType"]}]},"auditReasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["field"]},"MetadataUpdateCustomFieldBody":{"type":"object","properties":{"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"descriptionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"helpTextKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"placeholderKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"required":{"type":"boolean"},"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"defaultValue":{},"clearDefaultValue":{"type":"boolean"},"validationRules":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"minValue":{"type":"number"},"maxValue":{"type":"number"},"regex":{"type":"string","maxLength":2000}}},"clearValidationRules":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"labelKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"archived":{"type":"boolean"}},"required":["value"]}},"capabilityPolicy":{"type":"object","properties":{"searchable":{"type":"boolean"},"filterable":{"type":"boolean"},"sortable":{"type":"boolean"},"exportable":{"type":"boolean"},"embeddable":{"type":"boolean"},"facetable":{"type":"boolean"}}},"indexPolicy":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","enum":["none"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["keyword"]},"indexName":{"type":"string","minLength":1},"caseInsensitive":{"type":"boolean"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["text"]},"indexName":{"type":"string","minLength":1},"analyzer":{"type":"string","minLength":1}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["numeric"]},"indexName":{"type":"string","minLength":1},"precision":{"type":"integer","minimum":0}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["date"]},"indexName":{"type":"string","minLength":1}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","enum":["relation"]},"indexName":{"type":"string","minLength":1},"relationEntityType":{"type":"string","enum":["address","approvalPolicy","bankAccount","bill","chartAccount","comment","company","customer_account","employee","group","invoice","journal","lead","ledgerEntry","ledgerSequence","module","opportunity","order","organization","partner","person","product","productCategory","project","purchaseOrder","quote","tenant","user","warehouse"]}},"required":["strategy","relationEntityType"]}]},"visibilityPolicy":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["visible"]},"whenPermission":{"type":"string","minLength":1},"whenModuleEnabled":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["hidden"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["masked"]},"reasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"maskPattern":{"type":"string","enum":["last4","email","phone","full"]},"whenPermission":{"type":"string","minLength":1},"whenConditionKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]}]},"editPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["editable"]},"allowOnCreate":{"type":"boolean"},"allowOnUpdate":{"type":"boolean"},"reasonKeyWhenDenied":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}},"required":["mode"]},"securityPolicy":{"type":"object","properties":{"pii":{"type":"boolean"},"sensitive":{"type":"boolean"},"encryptedAtRest":{"type":"boolean"},"redactionStrategy":{"type":"string","enum":["none","mask","hash","omit"]},"auditReadAccess":{"type":"boolean"}}},"format":{"type":"string","enum":["plain","money","percent","date","datetime"]},"maxSelections":{"type":"integer","minimum":1},"clearMaxSelections":{"type":"boolean"},"relation":{"type":"object","properties":{"entityType":{"type":"string","enum":["address","bankAccount","bill","company","customer_account","employee","invoice","journal","opportunity","order","organization","person","productCategory","project","quote","warehouse"]},"relationType":{"type":"string","enum":["one_to_one","one_to_many","many_to_one","many_to_many"]},"labelFieldKey":{"type":"string","minLength":1},"valueFieldKey":{"type":"string","minLength":1},"pickerKey":{"type":"string","minLength":1}},"required":["entityType","relationType"]},"schemaVersion":{"type":"string","minLength":1},"schemaRef":{"type":"string","minLength":1},"clearSchemaRef":{"type":"boolean"},"auditReasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"},"key":{"type":"string","minLength":1},"entityType":{"type":"string","minLength":1},"type":{"type":"string","minLength":1}}},"MetadataArchiveCustomFieldBody":{"type":"object","properties":{"archiveReasonKey":{"type":"string","minLength":3,"pattern":"^[a-z0-9_]+(\\.[a-z0-9_]+)+$"}}},"BulkFieldEditPreviewRequest":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string","minLength":1}},"fieldId":{"type":"string","minLength":1,"maxLength":160},"value":{},"atomicity":{"type":"string","enum":["atomic","bestEffort"],"default":"bestEffort"},"recordVersions":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]}},"metadataVersion":{"type":"string","minLength":1,"maxLength":120}},"required":["entityIds","fieldId","value"]},"BulkFieldEditExecuteRequest":{"type":"object","properties":{"previewToken":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1}},"required":["previewToken","idempotencyKey"]},"BulkDeleteRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]},"BulkUpdateStatusRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1}},"status":{"type":"string","minLength":1}},"required":["ids","status"]},"CountryComplianceConfig":{"type":"object","additionalProperties":{}},"ReportData":{"type":"object","additionalProperties":{}},"SNSMessage":{"type":"object","additionalProperties":{}},"ListQueryPageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"ListQueryColumnDefinition":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}},"ListQueryFilterDefinition":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}},"ConfigurationActionTarget":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}},"ConfigurationReadinessEvidence":{"type":"object","required":["state","sourceKey"],"properties":{"state":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"sourceKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"reasonKey":{"type":"string"}}},"ConfigurationReadinessCheck":{"type":"object","required":["key","titleKey","applicabilityState","setupState","evidenceState","attentionState","evidence"],"properties":{"key":{"type":"string"},"titleKey":{"type":"string"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"evidence":{"type":"array","minItems":1,"items":{"type":"object","required":["state","sourceKey"],"properties":{"state":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"sourceKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"reasonKey":{"type":"string"}}}},"impactKey":{"type":"string"}}},"ConfigurationReadinessAction":{"type":"object","required":["labelKey","target"],"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}},"ConfigurationReadinessDomain":{"type":"object","required":["id","titleKey","order","applicabilityState","setupState","evidenceState","attentionState","dataState","checks"],"properties":{"id":{"type":"string","enum":["company","sales_invoicing","banking_payments","accounting","vat_tax","hr_payroll"]},"titleKey":{"type":"string"},"order":{"type":"integer"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"checks":{"type":"array","items":{"type":"object","required":["key","titleKey","applicabilityState","setupState","evidenceState","attentionState","evidence"],"properties":{"key":{"type":"string"},"titleKey":{"type":"string"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"evidence":{"type":"array","minItems":1,"items":{"type":"object","required":["state","sourceKey"],"properties":{"state":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"sourceKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"reasonKey":{"type":"string"}}}},"impactKey":{"type":"string"}}}},"primaryBlockingCheckKey":{"type":"string"},"impactKey":{"type":"string"},"action":{"type":"object","required":["labelKey","target"],"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}},"ConfigurationReadinessCounts":{"type":"object","required":["visibleDomains","completeDomains","actionRequiredDomains","needsReviewDomains","unknownDomains","notApplicableDomains","unsupportedDomains"],"properties":{"visibleDomains":{"type":"integer"},"completeDomains":{"type":"integer"},"actionRequiredDomains":{"type":"integer"},"needsReviewDomains":{"type":"integer"},"unknownDomains":{"type":"integer"},"notApplicableDomains":{"type":"integer"},"unsupportedDomains":{"type":"integer"}}},"CompanyConfigurationReadiness":{"type":"object","required":["version","companyId","generatedAt","dataState","counts","domains"],"properties":{"version":{"type":"string","enum":["configuration-readiness.v1"]},"companyId":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"counts":{"type":"object","required":["visibleDomains","completeDomains","actionRequiredDomains","needsReviewDomains","unknownDomains","notApplicableDomains","unsupportedDomains"],"properties":{"visibleDomains":{"type":"integer"},"completeDomains":{"type":"integer"},"actionRequiredDomains":{"type":"integer"},"needsReviewDomains":{"type":"integer"},"unknownDomains":{"type":"integer"},"notApplicableDomains":{"type":"integer"},"unsupportedDomains":{"type":"integer"}}},"domains":{"type":"array","items":{"type":"object","required":["id","titleKey","order","applicabilityState","setupState","evidenceState","attentionState","dataState","checks"],"properties":{"id":{"type":"string","enum":["company","sales_invoicing","banking_payments","accounting","vat_tax","hr_payroll"]},"titleKey":{"type":"string"},"order":{"type":"integer"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"checks":{"type":"array","items":{"type":"object","required":["key","titleKey","applicabilityState","setupState","evidenceState","attentionState","evidence"],"properties":{"key":{"type":"string"},"titleKey":{"type":"string"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"evidence":{"type":"array","minItems":1,"items":{"type":"object","required":["state","sourceKey"],"properties":{"state":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"sourceKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"reasonKey":{"type":"string"}}}},"impactKey":{"type":"string"}}}},"primaryBlockingCheckKey":{"type":"string"},"impactKey":{"type":"string"},"action":{"type":"object","required":["labelKey","target"],"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}}}}},"CompanyConfigurationReadinessResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["readiness"],"properties":{"readiness":{"type":"object","required":["version","companyId","generatedAt","dataState","counts","domains"],"properties":{"version":{"type":"string","enum":["configuration-readiness.v1"]},"companyId":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"counts":{"type":"object","required":["visibleDomains","completeDomains","actionRequiredDomains","needsReviewDomains","unknownDomains","notApplicableDomains","unsupportedDomains"],"properties":{"visibleDomains":{"type":"integer"},"completeDomains":{"type":"integer"},"actionRequiredDomains":{"type":"integer"},"needsReviewDomains":{"type":"integer"},"unknownDomains":{"type":"integer"},"notApplicableDomains":{"type":"integer"},"unsupportedDomains":{"type":"integer"}}},"domains":{"type":"array","items":{"type":"object","required":["id","titleKey","order","applicabilityState","setupState","evidenceState","attentionState","dataState","checks"],"properties":{"id":{"type":"string","enum":["company","sales_invoicing","banking_payments","accounting","vat_tax","hr_payroll"]},"titleKey":{"type":"string"},"order":{"type":"integer"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"checks":{"type":"array","items":{"type":"object","required":["key","titleKey","applicabilityState","setupState","evidenceState","attentionState","evidence"],"properties":{"key":{"type":"string"},"titleKey":{"type":"string"},"applicabilityState":{"type":"string","enum":["applicable","not_applicable","unsupported","unknown"]},"setupState":{"type":"string","enum":["complete","incomplete","unknown"]},"evidenceState":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"evidence":{"type":"array","minItems":1,"items":{"type":"object","required":["state","sourceKey"],"properties":{"state":{"type":"string","enum":["verified","unverified","stale","not_required","unknown"]},"sourceKey":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"reasonKey":{"type":"string"}}}},"impactKey":{"type":"string"}}}},"primaryBlockingCheckKey":{"type":"string"},"impactKey":{"type":"string"},"action":{"type":"object","required":["labelKey","target"],"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}}}}}}}}},"TenantCompanyReadinessSummary":{"type":"object","required":["companyId","name","accessState","attentionState","dataState"],"additionalProperties":false,"properties":{"companyId":{"type":"string"},"name":{"type":"string"},"accessState":{"type":"string","enum":["authorized","not_authorized"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"counts":{"type":"object","required":["visibleDomains","completeDomains","actionRequiredDomains","needsReviewDomains","unknownDomains","notApplicableDomains","unsupportedDomains"],"properties":{"visibleDomains":{"type":"integer"},"completeDomains":{"type":"integer"},"actionRequiredDomains":{"type":"integer"},"needsReviewDomains":{"type":"integer"},"unknownDomains":{"type":"integer"},"notApplicableDomains":{"type":"integer"},"unsupportedDomains":{"type":"integer"}}},"primaryAttentionDomainId":{"type":"string"},"primaryAttentionDomainTitleKey":{"type":"string"},"action":{"type":"object","required":["labelKey","target"],"additionalProperties":false,"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}},"TenantWorkspaceReadiness":{"type":"object","required":["version","tenantId","generatedAt","dataState","counts","companies"],"additionalProperties":false,"properties":{"version":{"type":"string"},"tenantId":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"counts":{"type":"object","required":["visibleCompanies","readyCompanies","actionRequiredCompanies","needsReviewCompanies","unknownCompanies","notAuthorizedCompanies"],"additionalProperties":false,"properties":{"visibleCompanies":{"type":"integer"},"readyCompanies":{"type":"integer"},"actionRequiredCompanies":{"type":"integer"},"needsReviewCompanies":{"type":"integer"},"unknownCompanies":{"type":"integer"},"notAuthorizedCompanies":{"type":"integer"}}},"companies":{"type":"array","items":{"type":"object","required":["companyId","name","accessState","attentionState","dataState"],"additionalProperties":false,"properties":{"companyId":{"type":"string"},"name":{"type":"string"},"accessState":{"type":"string","enum":["authorized","not_authorized"]},"attentionState":{"type":"string","enum":["none","action_required","needs_review","unknown"]},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"counts":{"type":"object","required":["visibleDomains","completeDomains","actionRequiredDomains","needsReviewDomains","unknownDomains","notApplicableDomains","unsupportedDomains"],"properties":{"visibleDomains":{"type":"integer"},"completeDomains":{"type":"integer"},"actionRequiredDomains":{"type":"integer"},"needsReviewDomains":{"type":"integer"},"unknownDomains":{"type":"integer"},"notApplicableDomains":{"type":"integer"},"unsupportedDomains":{"type":"integer"}}},"primaryAttentionDomainId":{"type":"string"},"primaryAttentionDomainTitleKey":{"type":"string"},"action":{"type":"object","required":["labelKey","target"],"additionalProperties":false,"properties":{"labelKey":{"type":"string"},"target":{"type":"object","required":["routeId"],"additionalProperties":false,"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}}}}},"ComplianceObligationActionTarget":{"type":"object","required":["routeId"],"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}},"ComplianceObligationEvidence":{"type":"object","required":["state"],"properties":{"state":{"type":"string","pattern":"^(calculated|user_declared|external_receipt|awaiting_confirmation|unavailable)$"},"proofKind":{"type":"string","enum":["calendar_calculation","workflow_calculation","completion_declaration","submission_declaration","authority_receipt","bank_confirmation","user_payment_confirmation"]},"recordedAt":{"type":"string","format":"date-time"},"recordedByUserId":{"type":"string"},"referenceId":{"type":"string"}}},"ComplianceObligation":{"type":"object","required":["id","sourceId","category","title","titleKey","period","dueAt","workState","timingState","evidenceState","evidence","blockingCheckKeys","provenance","historyAvailable"],"properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"period":{"type":"object","required":["key","start","end"],"properties":{"key":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"dueAt":{"type":"string","format":"date-time"},"workState":{"type":"string","enum":["prepare","review","submit","awaiting_confirmation","received","pay","paid","complete","unknown"]},"timingState":{"type":"string","enum":["upcoming","due_soon","overdue"]},"evidenceState":{"type":"string","enum":["calculated","user_declared","external_receipt","awaiting_confirmation","unavailable"]},"evidence":{"type":"object","required":["state"],"properties":{"state":{"type":"string","pattern":"^(calculated|user_declared|external_receipt|awaiting_confirmation|unavailable)$"},"proofKind":{"type":"string","enum":["calendar_calculation","workflow_calculation","completion_declaration","submission_declaration","authority_receipt","bank_confirmation","user_payment_confirmation"]},"recordedAt":{"type":"string","format":"date-time"},"recordedByUserId":{"type":"string"},"referenceId":{"type":"string"}}},"blockingCheckKeys":{"type":"array","items":{"type":"string"}},"responsibleUserId":{"type":"string"},"provenance":{"type":"object","required":["source","referenceId","observedAt"],"properties":{"source":{"type":"string","enum":["compliance_calendar"]},"referenceId":{"type":"string"},"observedAt":{"type":"string","format":"date-time"}}},"historyAvailable":{"type":"boolean"},"action":{"type":"object","required":["routeId"],"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}},"CompanyComplianceOverview":{"type":"object","required":["schemaVersion","generatedAt","dataState","summary","now","upcoming"],"properties":{"schemaVersion":{"type":"string","enum":["1"]},"generatedAt":{"type":"string","format":"date-time"},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"summary":{"type":"object","required":["actionsRequired","dueWithin30Days","overdue"],"properties":{"actionsRequired":{"type":"integer","minimum":0},"dueWithin30Days":{"type":"integer","minimum":0},"overdue":{"type":"integer","minimum":0}}},"now":{"type":"array","maxItems":5,"items":{"type":"object","required":["id","sourceId","category","title","titleKey","period","dueAt","workState","timingState","evidenceState","evidence","blockingCheckKeys","provenance","historyAvailable"],"properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"period":{"type":"object","required":["key","start","end"],"properties":{"key":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"dueAt":{"type":"string","format":"date-time"},"workState":{"type":"string","enum":["prepare","review","submit","awaiting_confirmation","received","pay","paid","complete","unknown"]},"timingState":{"type":"string","enum":["upcoming","due_soon","overdue"]},"evidenceState":{"type":"string","enum":["calculated","user_declared","external_receipt","awaiting_confirmation","unavailable"]},"evidence":{"type":"object","required":["state"],"properties":{"state":{"type":"string","pattern":"^(calculated|user_declared|external_receipt|awaiting_confirmation|unavailable)$"},"proofKind":{"type":"string","enum":["calendar_calculation","workflow_calculation","completion_declaration","submission_declaration","authority_receipt","bank_confirmation","user_payment_confirmation"]},"recordedAt":{"type":"string","format":"date-time"},"recordedByUserId":{"type":"string"},"referenceId":{"type":"string"}}},"blockingCheckKeys":{"type":"array","items":{"type":"string"}},"responsibleUserId":{"type":"string"},"provenance":{"type":"object","required":["source","referenceId","observedAt"],"properties":{"source":{"type":"string","enum":["compliance_calendar"]},"referenceId":{"type":"string"},"observedAt":{"type":"string","format":"date-time"}}},"historyAvailable":{"type":"boolean"},"action":{"type":"object","required":["routeId"],"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}},"upcoming":{"type":"array","maxItems":3,"items":{"type":"object","required":["id","sourceId","category","title","titleKey","period","dueAt","workState","timingState","evidenceState","evidence","blockingCheckKeys","provenance","historyAvailable"],"properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"period":{"type":"object","required":["key","start","end"],"properties":{"key":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"dueAt":{"type":"string","format":"date-time"},"workState":{"type":"string","enum":["prepare","review","submit","awaiting_confirmation","received","pay","paid","complete","unknown"]},"timingState":{"type":"string","enum":["upcoming","due_soon","overdue"]},"evidenceState":{"type":"string","enum":["calculated","user_declared","external_receipt","awaiting_confirmation","unavailable"]},"evidence":{"type":"object","required":["state"],"properties":{"state":{"type":"string","pattern":"^(calculated|user_declared|external_receipt|awaiting_confirmation|unavailable)$"},"proofKind":{"type":"string","enum":["calendar_calculation","workflow_calculation","completion_declaration","submission_declaration","authority_receipt","bank_confirmation","user_payment_confirmation"]},"recordedAt":{"type":"string","format":"date-time"},"recordedByUserId":{"type":"string"},"referenceId":{"type":"string"}}},"blockingCheckKeys":{"type":"array","items":{"type":"string"}},"responsibleUserId":{"type":"string"},"provenance":{"type":"object","required":["source","referenceId","observedAt"],"properties":{"source":{"type":"string","enum":["compliance_calendar"]},"referenceId":{"type":"string"},"observedAt":{"type":"string","format":"date-time"}}},"historyAvailable":{"type":"boolean"},"action":{"type":"object","required":["routeId"],"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}}},"CompanyComplianceObligationDetail":{"type":"object","required":["schemaVersion","generatedAt","dataState","obligation"],"properties":{"schemaVersion":{"type":"string","enum":["1"]},"generatedAt":{"type":"string","format":"date-time"},"dataState":{"type":"string","enum":["complete","partial","unavailable"]},"obligation":{"type":"object","required":["id","sourceId","category","title","titleKey","period","dueAt","workState","timingState","evidenceState","evidence","blockingCheckKeys","provenance","historyAvailable"],"properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"period":{"type":"object","required":["key","start","end"],"properties":{"key":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"dueAt":{"type":"string","format":"date-time"},"workState":{"type":"string","enum":["prepare","review","submit","awaiting_confirmation","received","pay","paid","complete","unknown"]},"timingState":{"type":"string","enum":["upcoming","due_soon","overdue"]},"evidenceState":{"type":"string","enum":["calculated","user_declared","external_receipt","awaiting_confirmation","unavailable"]},"evidence":{"type":"object","required":["state"],"properties":{"state":{"type":"string","pattern":"^(calculated|user_declared|external_receipt|awaiting_confirmation|unavailable)$"},"proofKind":{"type":"string","enum":["calendar_calculation","workflow_calculation","completion_declaration","submission_declaration","authority_receipt","bank_confirmation","user_payment_confirmation"]},"recordedAt":{"type":"string","format":"date-time"},"recordedByUserId":{"type":"string"},"referenceId":{"type":"string"}}},"blockingCheckKeys":{"type":"array","items":{"type":"string"}},"responsibleUserId":{"type":"string"},"provenance":{"type":"object","required":["source","referenceId","observedAt"],"properties":{"source":{"type":"string","enum":["compliance_calendar"]},"referenceId":{"type":"string"},"observedAt":{"type":"string","format":"date-time"}}},"historyAvailable":{"type":"boolean"},"action":{"type":"object","required":["routeId"],"properties":{"routeId":{"type":"string"},"areaId":{"type":"string"},"sectionId":{"type":"string"},"focusKey":{"type":"string"}}}}}}},"ListQueryActionDefinition":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}},"ListQueryPolicyMetadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}},"ListInvoiceItem":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"invoiceNumber":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","cancelled"]},"type":{"type":"string","enum":["invoice","credit_note"]},"title":{"type":"string"},"amount":{"type":"number"},"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListOrderItem":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"status":{"type":"string","enum":["draft","pending","confirmed","in_progress","shipped","delivered","cancelled"]},"title":{"type":"string"},"amount":{"type":"number"},"orderDate":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListQuoteItem":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"quoteNumber":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","rejected","cancelled","expired","converted"]},"description":{"type":"string"},"amount":{"type":"number"},"validUntil":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListInvoicesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["sales.invoice"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"invoiceNumber":{"type":"string"},"status":{"type":"string","enum":["draft","sent","paid","cancelled"]},"type":{"type":"string","enum":["invoice","credit_note"]},"title":{"type":"string"},"amount":{"type":"number"},"invoiceDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListOrdersResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["sales.order"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"status":{"type":"string","enum":["draft","pending","confirmed","in_progress","shipped","delivered","cancelled"]},"title":{"type":"string"},"amount":{"type":"number"},"orderDate":{"type":"string","format":"date-time"},"deliveryDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListQuotesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["sales.quote"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","status","amount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"quoteNumber":{"type":"string"},"status":{"type":"string","enum":["draft","sent","accepted","rejected","cancelled","expired","converted"]},"description":{"type":"string"},"amount":{"type":"number"},"validUntil":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListBillItem":{"type":"object","required":["id","status","amountInclTax","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"billNumber":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","approved","posted","partially_paid","paid","reversed","cancelled"]},"type":{"type":"string","enum":["invoice","credit_note"]},"vendorName":{"type":"string"},"amount":{"type":"number"},"amountInclTax":{"type":"number"},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListBillsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.bill"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","status","amountInclTax","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"billNumber":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","approved","posted","partially_paid","paid","reversed","cancelled"]},"type":{"type":"string","enum":["invoice","credit_note"]},"vendorName":{"type":"string"},"amount":{"type":"number"},"amountInclTax":{"type":"number"},"currency":{"type":"string"},"date":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListExpenseItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListExpensesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.expense"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListExpenseReportItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListExpenseReportsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.expense-report"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListPurchaseOrderItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListPurchaseOrdersResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.purchase-order"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListPurchaseCreditNoteItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListPurchaseCreditNotesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.credit-note"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListVendorItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListVendorsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.vendor"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListBudgetItem":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListBudgetsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["purchases.budget"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListOrganizationItem":{"type":"object","required":["id","displayName","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"legalName":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","BLOCKED","ARCHIVED"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"riskLevel":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"countryOfRegistration":{"type":"string"},"vatNumber":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListOrganizationsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["contacts.organization"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","displayName","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"displayName":{"type":"string"},"legalName":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","INACTIVE","BLOCKED","ARCHIVED"]},"recordState":{"type":"string","enum":["active","inactive","archived"]},"riskLevel":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"countryOfRegistration":{"type":"string"},"vatNumber":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListPersonItem":{"type":"object","required":["id","firstName","lastName","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"mobile":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"recordState":{"type":"string","enum":["active","archived"]},"type":{"type":"string"},"jobTitle":{"type":"string"},"language":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListPersonsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["contacts.person"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","firstName","lastName","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"mobile":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"recordState":{"type":"string","enum":["active","archived"]},"type":{"type":"string"},"jobTitle":{"type":"string"},"language":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListAddressItem":{"type":"object","required":["id","country","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"line1":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"recordState":{"type":"string","enum":["active","archived"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListAddressesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["contacts.address"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","country","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"line1":{"type":"string"},"street":{"type":"string"},"streetNumber":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"recordState":{"type":"string","enum":["active","archived"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListLeadItem":{"type":"object","required":["id","title","statusCategory","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"statusCategory":{"type":"string","enum":["open","qualified","converted","disqualified","archived"]},"statusId":{"type":"string"},"leadKind":{"type":"string"},"ownerUserId":{"type":"string"},"organizationId":{"type":"string"},"primaryContactId":{"type":"string"},"individualPersonId":{"type":"string"},"acquisitionSource":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListLeadsResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["crm.lead"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","title","statusCategory","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"statusCategory":{"type":"string","enum":["open","qualified","converted","disqualified","archived"]},"statusId":{"type":"string"},"leadKind":{"type":"string"},"ownerUserId":{"type":"string"},"organizationId":{"type":"string"},"primaryContactId":{"type":"string"},"individualPersonId":{"type":"string"},"acquisitionSource":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"ListOpportunityItem":{"type":"object","required":["id","title","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["open","won","lost"]},"currency":{"type":"string"},"value":{"type":"number"},"probability":{"type":"number"},"pipelineId":{"type":"string"},"stageId":{"type":"string"},"ownerUserId":{"type":"string"},"accountId":{"type":"string"},"organizationId":{"type":"string"},"leadId":{"type":"string"},"closeDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true},"ListOpportunitiesResponse":{"type":"object","required":["contractVersion","policyVersion","entityType","context","items","pageInfo","metadata"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string","enum":["crm.opportunity"]},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"items":{"type":"array","items":{"type":"object","required":["id","title","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["open","won","lost"]},"currency":{"type":"string"},"value":{"type":"number"},"probability":{"type":"number"},"pipelineId":{"type":"string"},"stageId":{"type":"string"},"ownerUserId":{"type":"string"},"accountId":{"type":"string"},"organizationId":{"type":"string"},"leadId":{"type":"string"},"closeDate":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}},"pageInfo":{"type":"object","required":["page","limit","total","totalPages","hasNext","hasPrev"],"properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}}},"metadata":{"type":"object","required":["contractVersion","policyVersion","entityType","context","columns","filters","actions"],"properties":{"contractVersion":{"type":"string","example":"1.0"},"policyVersion":{"type":"string"},"entityType":{"type":"string"},"context":{"type":"string","enum":["managementList","operationalList","referencePicker","auditHistory"]},"columns":{"type":"array","items":{"type":"object","required":["fieldId","labelKey","sortable","filterable"],"properties":{"fieldId":{"type":"string"},"labelKey":{"type":"string"},"sortable":{"type":"boolean"},"filterable":{"type":"boolean"}}}},"filters":{"type":"array","items":{"type":"object","required":["fieldId","operators"],"properties":{"fieldId":{"type":"string"},"operators":{"type":"array","items":{"type":"string"}}}}},"actions":{"type":"array","items":{"type":"object","required":["actionId","labelKey"],"properties":{"actionId":{"type":"string"},"labelKey":{"type":"string"},"requiresSelection":{"type":"boolean"}}}}}}}},"CompanySetupAction":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"CompanySetupActionsData":{"type":"object","required":["actions","summary"],"properties":{"actions":{"type":"array","items":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}}},"summary":{"type":"object","required":["total","open","done"],"properties":{"total":{"type":"integer"},"open":{"type":"integer"},"done":{"type":"integer"}}}}},"CompanySetupActionsResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["actions","summary"],"properties":{"actions":{"type":"array","items":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}}},"summary":{"type":"object","required":["total","open","done"],"properties":{"total":{"type":"integer"},"open":{"type":"integer"},"done":{"type":"integer"}}}}}}},"CompleteCompanySetupActionData":{"type":"object","required":["action"],"properties":{"action":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}}}},"CompleteCompanySetupActionResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["action"],"properties":{"action":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}}}}}},"AssignCompanySetupActionData":{"type":"object","required":["action","taskId"],"properties":{"action":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"taskId":{"type":"string"}}},"AssignCompanySetupActionResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["action","taskId"],"properties":{"action":{"type":"object","required":["key","source","status","priority","titleKey","ctaLabelKey","href","assignable","completable"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","first_invoice_create","mobile_channels_connect","invite_team_member","modules_review","payment_terms_review","delivery_terms_review","reminder_rules_review","agent_first_run","compliance_profile_complete","compliance_follow_up_open"]},"source":{"type":"string","enum":["onboarding","config_defaults","compliance_profile","compliance_follow_up"]},"status":{"type":"string","enum":["todo","blocked","due_soon","overdue","done"]},"priority":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"count":{"type":"integer"},"dueAt":{"type":"string","format":"date-time"},"taskId":{"type":"string"},"assignable":{"type":"boolean"},"completable":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}}},"taskId":{"type":"string"}}}}},"CompanyActivationBlocker":{"type":"object","required":["reason","labelKey"],"properties":{"reason":{"type":"string","enum":["missing_permission","missing_module","unavailable"]},"labelKey":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}},"CompanyActivationManualCompletion":{"type":"object","required":["actionKey"],"properties":{"actionKey":{"type":"string"}}},"CompanyActivationMilestone":{"type":"object","required":["key","category","status","priority","weight","titleKey","descriptionKey","ctaLabelKey","requiredModules","requiredPermissions","blockers"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","team_invited","first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected","vat_reporting_ready","compliance_profile_complete"]},"category":{"type":"string","enum":["setup","first_value","growth","compliance"]},"status":{"type":"string","enum":["todo","blocked","done"]},"priority":{"type":"integer"},"weight":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"signalKey":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"requiredModules":{"type":"array","items":{"type":"string"}},"requiredPermissions":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","required":["reason","labelKey"],"properties":{"reason":{"type":"string","enum":["missing_permission","missing_module","unavailable"]},"labelKey":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}},"manualCompletion":{"type":"object","required":["actionKey"],"properties":{"actionKey":{"type":"string"}}},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}},"CompanyActivationSignal":{"type":"object","required":["key","reached","count"],"properties":{"key":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"reached":{"type":"boolean"},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}},"CompanyActivationNextBestAction":{"type":"object","required":["milestoneKey","titleKey","descriptionKey","ctaLabelKey","href","priority"],"properties":{"milestoneKey":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"priority":{"type":"integer"}}},"CompanyActivationState":{"type":"object","required":["version","companyId","stage","score","firstValueReached","milestones","signals","summary","generatedAt"],"properties":{"version":{"type":"string","enum":["activation"]},"companyId":{"type":"string"},"stage":{"type":"string","enum":["not_started","setup","first_value_pending","first_value_reached","expanded"]},"score":{"type":"integer"},"firstValueReached":{"type":"boolean"},"nextBestAction":{"type":"object","required":["milestoneKey","titleKey","descriptionKey","ctaLabelKey","href","priority"],"properties":{"milestoneKey":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"priority":{"type":"integer"}}},"milestones":{"type":"array","items":{"type":"object","required":["key","category","status","priority","weight","titleKey","descriptionKey","ctaLabelKey","requiredModules","requiredPermissions","blockers"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","team_invited","first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected","vat_reporting_ready","compliance_profile_complete"]},"category":{"type":"string","enum":["setup","first_value","growth","compliance"]},"status":{"type":"string","enum":["todo","blocked","done"]},"priority":{"type":"integer"},"weight":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"signalKey":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"requiredModules":{"type":"array","items":{"type":"string"}},"requiredPermissions":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","required":["reason","labelKey"],"properties":{"reason":{"type":"string","enum":["missing_permission","missing_module","unavailable"]},"labelKey":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}},"manualCompletion":{"type":"object","required":["actionKey"],"properties":{"actionKey":{"type":"string"}}},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"signals":{"type":"array","items":{"type":"object","required":["key","reached","count"],"properties":{"key":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"reached":{"type":"boolean"},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"summary":{"type":"object","required":["total","done","open","blocked"],"properties":{"total":{"type":"integer"},"done":{"type":"integer"},"open":{"type":"integer"},"blocked":{"type":"integer"}}},"generatedAt":{"type":"string","format":"date-time"}}},"CompanyActivationResponseData":{"type":"object","required":["state"],"properties":{"state":{"type":"object","required":["version","companyId","stage","score","firstValueReached","milestones","signals","summary","generatedAt"],"properties":{"version":{"type":"string","enum":["activation"]},"companyId":{"type":"string"},"stage":{"type":"string","enum":["not_started","setup","first_value_pending","first_value_reached","expanded"]},"score":{"type":"integer"},"firstValueReached":{"type":"boolean"},"nextBestAction":{"type":"object","required":["milestoneKey","titleKey","descriptionKey","ctaLabelKey","href","priority"],"properties":{"milestoneKey":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"priority":{"type":"integer"}}},"milestones":{"type":"array","items":{"type":"object","required":["key","category","status","priority","weight","titleKey","descriptionKey","ctaLabelKey","requiredModules","requiredPermissions","blockers"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","team_invited","first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected","vat_reporting_ready","compliance_profile_complete"]},"category":{"type":"string","enum":["setup","first_value","growth","compliance"]},"status":{"type":"string","enum":["todo","blocked","done"]},"priority":{"type":"integer"},"weight":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"signalKey":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"requiredModules":{"type":"array","items":{"type":"string"}},"requiredPermissions":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","required":["reason","labelKey"],"properties":{"reason":{"type":"string","enum":["missing_permission","missing_module","unavailable"]},"labelKey":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}},"manualCompletion":{"type":"object","required":["actionKey"],"properties":{"actionKey":{"type":"string"}}},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"signals":{"type":"array","items":{"type":"object","required":["key","reached","count"],"properties":{"key":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"reached":{"type":"boolean"},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"summary":{"type":"object","required":["total","done","open","blocked"],"properties":{"total":{"type":"integer"},"done":{"type":"integer"},"open":{"type":"integer"},"blocked":{"type":"integer"}}},"generatedAt":{"type":"string","format":"date-time"}}}}},"CompanyActivationResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean"},"data":{"type":"object","required":["state"],"properties":{"state":{"type":"object","required":["version","companyId","stage","score","firstValueReached","milestones","signals","summary","generatedAt"],"properties":{"version":{"type":"string","enum":["activation"]},"companyId":{"type":"string"},"stage":{"type":"string","enum":["not_started","setup","first_value_pending","first_value_reached","expanded"]},"score":{"type":"integer"},"firstValueReached":{"type":"boolean"},"nextBestAction":{"type":"object","required":["milestoneKey","titleKey","descriptionKey","ctaLabelKey","href","priority"],"properties":{"milestoneKey":{"type":"string"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"priority":{"type":"integer"}}},"milestones":{"type":"array","items":{"type":"object","required":["key","category","status","priority","weight","titleKey","descriptionKey","ctaLabelKey","requiredModules","requiredPermissions","blockers"],"properties":{"key":{"type":"string","enum":["company_profile_complete","accounting_plan_review","team_invited","first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected","vat_reporting_ready","compliance_profile_complete"]},"category":{"type":"string","enum":["setup","first_value","growth","compliance"]},"status":{"type":"string","enum":["todo","blocked","done"]},"priority":{"type":"integer"},"weight":{"type":"integer"},"titleKey":{"type":"string"},"descriptionKey":{"type":"string"},"ctaLabelKey":{"type":"string"},"href":{"type":"string"},"signalKey":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"requiredModules":{"type":"array","items":{"type":"string"}},"requiredPermissions":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","required":["reason","labelKey"],"properties":{"reason":{"type":"string","enum":["missing_permission","missing_module","unavailable"]},"labelKey":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}},"manualCompletion":{"type":"object","required":["actionKey"],"properties":{"actionKey":{"type":"string"}}},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"signals":{"type":"array","items":{"type":"object","required":["key","reached","count"],"properties":{"key":{"type":"string","enum":["first_document_ingested","first_invoice_created","first_agent_action","first_bank_connected"]},"reached":{"type":"boolean"},"count":{"type":"integer"},"reachedAt":{"type":"string","format":"date-time"}}}},"summary":{"type":"object","required":["total","done","open","blocked"],"properties":{"total":{"type":"integer"},"done":{"type":"integer"},"open":{"type":"integer"},"blocked":{"type":"integer"}}},"generatedAt":{"type":"string","format":"date-time"}}}}}}},"PublicComplianceQuestionEvidence":{"type":"object","required":["url","title","language","legalForce","jurisdiction"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"},"legalForce":{"type":"string","enum":["authentic","informative","guidance"]},"jurisdiction":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time"},"locator":{"type":"object","additionalProperties":{"type":"string"}}}},"PublicComplianceQuestion":{"type":"object","required":["id","locale","clusterSlug","slug","status","alternateSlugs"],"properties":{"id":{"type":"string"},"countryCode":{"type":"string"},"locale":{"type":"string","enum":["de","fr","it","en"]},"clusterSlug":{"type":"string"},"slug":{"type":"string"},"scope":{"type":"string"},"question":{"type":"string"},"shortAnswer":{"type":"string"},"bodyBlocks":{"type":"array","items":{"type":"object","required":["kind","citationRefs"],"properties":{"kind":{"type":"string","enum":["paragraph","list","note","table"]},"text":{"type":"string"},"items":{"type":"array","items":{"type":"string"}},"citationRefs":{"type":"array","items":{"type":"integer"}}}}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"authorityNotice":{"type":"string","enum":["informative_translation","guidance_only"]},"evidence":{"type":"array","items":{"type":"object","required":["url","title","language","legalForce","jurisdiction"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"},"legalForce":{"type":"string","enum":["authentic","informative","guidance"]},"jurisdiction":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time"},"locator":{"type":"object","additionalProperties":{"type":"string"}}}}},"status":{"type":"string","enum":["published_noindex","indexed","withdrawn"]},"withdrawal":{"type":"object","properties":{"reason":{"type":"string"},"withdrawnAt":{"type":"string","format":"date-time"},"alternativeSourceUrls":{"type":"array","items":{"type":"string","format":"uri"}}}},"reviewer":{"type":"object","properties":{"reviewedAt":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"alternateSlugs":{"type":"object","additionalProperties":{"type":"string"}},"alternatePaths":{"type":"object","additionalProperties":{"type":"object","required":["clusterSlug","slug"],"properties":{"clusterSlug":{"type":"string"},"slug":{"type":"string"}}}},"relatedSlugs":{"type":"array","items":{"type":"string"}},"lastVerifiedAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time"}}},"PublicComplianceQuestionDetailResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["question"],"properties":{"question":{"type":"object","required":["id","locale","clusterSlug","slug","status","alternateSlugs"],"properties":{"id":{"type":"string"},"countryCode":{"type":"string"},"locale":{"type":"string","enum":["de","fr","it","en"]},"clusterSlug":{"type":"string"},"slug":{"type":"string"},"scope":{"type":"string"},"question":{"type":"string"},"shortAnswer":{"type":"string"},"bodyBlocks":{"type":"array","items":{"type":"object","required":["kind","citationRefs"],"properties":{"kind":{"type":"string","enum":["paragraph","list","note","table"]},"text":{"type":"string"},"items":{"type":"array","items":{"type":"string"}},"citationRefs":{"type":"array","items":{"type":"integer"}}}}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"authorityNotice":{"type":"string","enum":["informative_translation","guidance_only"]},"evidence":{"type":"array","items":{"type":"object","required":["url","title","language","legalForce","jurisdiction"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"},"legalForce":{"type":"string","enum":["authentic","informative","guidance"]},"jurisdiction":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time"},"locator":{"type":"object","additionalProperties":{"type":"string"}}}}},"status":{"type":"string","enum":["published_noindex","indexed","withdrawn"]},"withdrawal":{"type":"object","properties":{"reason":{"type":"string"},"withdrawnAt":{"type":"string","format":"date-time"},"alternativeSourceUrls":{"type":"array","items":{"type":"string","format":"uri"}}}},"reviewer":{"type":"object","properties":{"reviewedAt":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"alternateSlugs":{"type":"object","additionalProperties":{"type":"string"}},"alternatePaths":{"type":"object","additionalProperties":{"type":"object","required":["clusterSlug","slug"],"properties":{"clusterSlug":{"type":"string"},"slug":{"type":"string"}}}},"relatedSlugs":{"type":"array","items":{"type":"string"}},"lastVerifiedAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time"}}}}}}},"PublicComplianceQuestionClusterResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["questions"],"properties":{"questions":{"type":"array","items":{"type":"object","required":["id","locale","clusterSlug","slug","status","alternateSlugs"],"properties":{"id":{"type":"string"},"countryCode":{"type":"string"},"locale":{"type":"string","enum":["de","fr","it","en"]},"clusterSlug":{"type":"string"},"slug":{"type":"string"},"scope":{"type":"string"},"question":{"type":"string"},"shortAnswer":{"type":"string"},"bodyBlocks":{"type":"array","items":{"type":"object","required":["kind","citationRefs"],"properties":{"kind":{"type":"string","enum":["paragraph","list","note","table"]},"text":{"type":"string"},"items":{"type":"array","items":{"type":"string"}},"citationRefs":{"type":"array","items":{"type":"integer"}}}}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"authorityNotice":{"type":"string","enum":["informative_translation","guidance_only"]},"evidence":{"type":"array","items":{"type":"object","required":["url","title","language","legalForce","jurisdiction"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"},"legalForce":{"type":"string","enum":["authentic","informative","guidance"]},"jurisdiction":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time"},"locator":{"type":"object","additionalProperties":{"type":"string"}}}}},"status":{"type":"string","enum":["published_noindex","indexed","withdrawn"]},"withdrawal":{"type":"object","properties":{"reason":{"type":"string"},"withdrawnAt":{"type":"string","format":"date-time"},"alternativeSourceUrls":{"type":"array","items":{"type":"string","format":"uri"}}}},"reviewer":{"type":"object","properties":{"reviewedAt":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"alternateSlugs":{"type":"object","additionalProperties":{"type":"string"}},"alternatePaths":{"type":"object","additionalProperties":{"type":"object","required":["clusterSlug","slug"],"properties":{"clusterSlug":{"type":"string"},"slug":{"type":"string"}}}},"relatedSlugs":{"type":"array","items":{"type":"string"}},"lastVerifiedAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time"}}}},"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1},"hasMore":{"type":"boolean"}}}}},"PublicComplianceQuestionClusterSummaryResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["clusters"],"properties":{"clusters":{"type":"array","items":{"type":"object","required":["clusterSlug","total","questions"],"properties":{"clusterSlug":{"type":"string"},"total":{"type":"integer","minimum":0},"questions":{"type":"array","items":{"type":"object","required":["id","locale","clusterSlug","slug","status","alternateSlugs"],"properties":{"id":{"type":"string"},"countryCode":{"type":"string"},"locale":{"type":"string","enum":["de","fr","it","en"]},"clusterSlug":{"type":"string"},"slug":{"type":"string"},"scope":{"type":"string"},"question":{"type":"string"},"shortAnswer":{"type":"string"},"bodyBlocks":{"type":"array","items":{"type":"object","required":["kind","citationRefs"],"properties":{"kind":{"type":"string","enum":["paragraph","list","note","table"]},"text":{"type":"string"},"items":{"type":"array","items":{"type":"string"}},"citationRefs":{"type":"array","items":{"type":"integer"}}}}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"authorityNotice":{"type":"string","enum":["informative_translation","guidance_only"]},"evidence":{"type":"array","items":{"type":"object","required":["url","title","language","legalForce","jurisdiction"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"publisher":{"type":"string"},"language":{"type":"string"},"legalForce":{"type":"string","enum":["authentic","informative","guidance"]},"jurisdiction":{"type":"string"},"effectiveFrom":{"type":"string","format":"date-time"},"effectiveTo":{"type":"string","format":"date-time"},"locator":{"type":"object","additionalProperties":{"type":"string"}}}}},"status":{"type":"string","enum":["published_noindex","indexed","withdrawn"]},"withdrawal":{"type":"object","properties":{"reason":{"type":"string"},"withdrawnAt":{"type":"string","format":"date-time"},"alternativeSourceUrls":{"type":"array","items":{"type":"string","format":"uri"}}}},"reviewer":{"type":"object","properties":{"reviewedAt":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"alternateSlugs":{"type":"object","additionalProperties":{"type":"string"}},"alternatePaths":{"type":"object","additionalProperties":{"type":"object","required":["clusterSlug","slug"],"properties":{"clusterSlug":{"type":"string"},"slug":{"type":"string"}}}},"relatedSlugs":{"type":"array","items":{"type":"string"}},"lastVerifiedAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time"}}}}}}}}}}},"PublicComplianceQuestionSitemapResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["id","locale","clusterSlug","slug"],"properties":{"id":{"type":"string"},"locale":{"type":"string","enum":["de","fr","it","en"]},"clusterSlug":{"type":"string"},"slug":{"type":"string"},"lastModified":{"type":"string","format":"date-time"}}}},"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1},"hasMore":{"type":"boolean"},"nextAfterId":{"type":"string","nullable":true}}}}},"SuperadminComplianceQuestionQueueResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["questions","total","page","pageSize","policy"],"properties":{"questions":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1,"maximum":100},"policy":{"type":"object","required":["production"],"properties":{"production":{"type":"boolean"}}}}}}},"SuperadminComplianceQuestionBulkResponse":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","required":["processed","failedCount","failed"],"properties":{"processed":{"type":"integer","minimum":0},"failedCount":{"type":"integer","minimum":0},"failed":{"type":"array","items":{"type":"object","required":["id","reason"],"properties":{"id":{"type":"string"},"reason":{"type":"string"}}}}}}}}},"responses":{"BadRequestError":{"description":"Bad Request (400)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"BAD_REQUEST","message":"Invalid request parameters"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"UnauthorizedError":{"description":"Unauthorized (401) - Missing or invalid JWT token","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"ForbiddenError":{"description":"Forbidden (403) - Missing permission, inactive company, or module not enabled","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"FORBIDDEN","message":"Insufficient permissions","details":{"requiredPermission":"TASKS:READ"}}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"NotFoundError":{"description":"Not Found (404)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"NOT_FOUND","message":"Resource not found"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"ValidationError":{"description":"Validation Error (422) - Invalid request body or parameters","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"VALIDATION_ERROR","message":"Validation error","details":{"email":"Invalid email format","password":"Password must be at least 8 characters"}}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"ConflictError":{"description":"Conflict (409) - Resource conflict (e.g., duplicate email, concurrent modification)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"CONFLICT","message":"Resource conflict","details":{"field":"email","reason":"Email already exists"}}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"InternalError":{"description":"Internal Server Error (500)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"RateLimitError":{"description":"Rate Limit Exceeded (429)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Rate limit exceeded"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}},"PaymentRequiredError":{"description":"Payment Required (402) - Subscription payment required","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","AGENT_TOOL_POLICY_MODE_NOT_ALLOWED","CONFLICT","INTERNAL_ERROR","SERVICE_UNAVAILABLE","BAD_REQUEST","PAYMENT_REQUIRED","RATE_LIMIT_EXCEEDED","MODULE_NOT_ENABLED","PERMISSION_DENIED","COMPANY_NOT_ACTIVE","TENANT_NOT_ACTIVE","INVALID_TOKEN","TOKEN_EXPIRED","INVITATION_EXPIRED","INVALID_CREDENTIALS","PASSWORD_EXPIRED","EMAIL_NOT_VERIFIED","DATA_INTEGRITY_GUARD","SSO_PROVISIONING_REQUIRED","MFA_SETUP_REQUIRED","MFA_VERIFICATION_REQUIRED","MFA_STEP_UP_REQUIRED","USER_SUSPENDED","COMPANY_ARCHIVED","NETWORK_ERROR","COUNTRY_NOT_FOUND","AGENT_TIMEOUT","TOOL_EXECUTION_ERROR","LEGACY_APPROVAL_UNSUPPORTED","MODEL_ERROR","AGENT_CANCELLED","SUSPICIOUS_CONTENT_DETECTED","IMPORT_MOVED_TO_DATA_IMPORTS","INVALID_PORTAL","INVALID_PORTAL_FOR_RUNS","INVALID_PORTAL_FOR_STATS","ACCESSMODE_USER_MISMATCH","ACCESSMODE_TENANT_MISMATCH","ACCESSMODE_COMPANY_MISMATCH","ORG_PROVISIONING_FAILED"],"description":"Error code (ErrorCode type)","example":"NOT_FOUND"},"message":{"type":"string","description":"Localized error message (via translateError() with i18n keys)","example":"Company not found"},"details":{"type":"object","description":"Optional error details (validation errors, etc.)","additionalProperties":true},"field":{"type":"string","description":"Optional field name for validation errors","example":"email"},"correlationId":{"type":"string","description":"Request correlation ID for debugging","example":"req-1234567890"},"requestId":{"type":"string","description":"Request ID for tracing","example":"req-9876543210"}}}}},"example":{"error":{"code":"PAYMENT_REQUIRED","message":"Payment required to access this feature"}}}},"headers":{"X-API-Version":{"description":"API semantic version.","schema":{"type":"string"},"example":"0.3.0"},"X-API-Path-Version":{"description":"API URL version prefix.","schema":{"type":"string"},"example":"v1"}}}},"parameters":{"companyId":{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"Company ID"},"tenantId":{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant ID"},"paginationQuery":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Maximum number of items to return"},"paginationOffset":{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Number of items to skip"}}},"tags":[{"name":"Company Portal","description":"Company-level operations (portal /c)"},{"name":"Tenant Portal","description":"Tenant-level operations (portal /t)"},{"name":"Partner Portal","description":"Partner-level operations (portal /p)"},{"name":"Authentication","description":"Authentication and authorization endpoints"}],"paths":{}}