{"openapi":"3.0.0","paths":{"/api/v1/debug-sentry":{"get":{"operationId":"AppController_getError_v1","parameters":[],"responses":{"200":{"description":""}},"tags":["App"]}},"/api/v1/admin/maintenance-windows":{"post":{"operationId":"MaintenanceController_createMaintenanceWindow_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMaintenanceWindowDto"}}}},"responses":{"201":{"description":""}},"summary":"Create a maintenance window","tags":["Admin Maintenance"]},"get":{"operationId":"AdminReadController_listMaintenanceWindows_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List maintenance windows","tags":["Admin Read"]}},"/api/v1/admin/maintenance-windows/{id}":{"patch":{"operationId":"MaintenanceController_updateMaintenanceWindow_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMaintenanceWindowDto"}}}},"responses":{"200":{"description":""}},"summary":"Update a maintenance window","tags":["Admin Maintenance"]}},"/api/v1/admin/maintenance-windows/{id}/cancel":{"post":{"operationId":"MaintenanceController_cancelMaintenanceWindow_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Cancel a maintenance window","tags":["Admin Maintenance"]}},"/api/v1/admin/maintenance-windows/{id}/resolve":{"post":{"operationId":"MaintenanceController_resolveMaintenanceWindow_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Resolve a maintenance window immediately","tags":["Admin Maintenance"]}},"/api/v1/internal/observability/ownership-read-metrics":{"get":{"operationId":"OwnershipReadMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get ownership read endpoint metrics","tags":["Observability"]}},"/api/v1/internal/observability/ownership-mutation-metrics":{"get":{"operationId":"OwnershipMutationMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get ownership mutation endpoint metrics","tags":["Observability"]}},"/api/v1/health":{"get":{"operationId":"HealthController_getHealth_v1","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/api/v1/health/db":{"get":{"operationId":"HealthController_getDatabaseHealth_v1","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/api/v1/internal/queues/pressure":{"get":{"operationId":"QueuePressureController_getQueuePressure_v1","parameters":[],"responses":{"200":{"description":"Queue pressure snapshot returned."},"401":{"description":"Invalid or missing internal API key."}},"summary":"Get queue pressure snapshot for AI heavy queues","tags":["internal"]}},"/api/v1/me":{"get":{"operationId":"UsersController_getMe_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the authenticated user","tags":["Users"]}},"/api/v1/me/profile":{"patch":{"operationId":"UsersController_updateProfile_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update the authenticated user profile","tags":["Users"]}},"/api/v1/me/last-active":{"post":{"operationId":"UsersController_updateLastActiveTime_v1","parameters":[],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Update authenticated user last active timestamp","tags":["Users"]}},"/api/v1/me/onboarding":{"patch":{"operationId":"UsersController_updateOnboarding_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeOnboardingDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update the authenticated user onboarding state","tags":["Users"]}},"/api/v1/me/onboarding/business-context":{"patch":{"operationId":"UsersController_updateBusinessContext_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeBusinessContextDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update the authenticated user business context","tags":["Users"]}},"/api/v1/me/onboarding/current":{"get":{"operationId":"UsersController_getCurrentOnboardingState_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOnboardingStateResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the authenticated user current onboarding state","tags":["Users"]}},"/api/v1/me/onboarding/provision":{"post":{"operationId":"UsersController_provisionOnboarding_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionOnboardingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionOnboardingResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Provision a new workspace during onboarding","tags":["Users"]}},"/api/v1/me/onboarding/finalize":{"post":{"operationId":"UsersController_finalizeOnboarding_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeOnboardingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeOnboardingResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Finalize onboarding for a provisioned workspace","tags":["Users"]}},"/api/v1/me/onboarding/complete":{"post":{"operationId":"UsersController_completeOnboarding_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMeOnboardingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMeOnboardingResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Complete onboarding for a new workspace owner","tags":["Users"]}},"/api/v1/me/onboarding/complete-invited":{"post":{"operationId":"UsersController_completeInvitedOnboarding_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMeInvitedOnboardingDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteMeInvitedOnboardingResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Complete onboarding for an invited user","tags":["Users"]}},"/api/v1/me/onboarding/activation-summary":{"get":{"operationId":"UsersController_getActivationSummary_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeActivationSummaryResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get activation summary for the authenticated user team","tags":["Users"]}},"/api/v1/me/invitation-context":{"get":{"operationId":"UsersController_getInvitationContext_v1","parameters":[{"name":"invitationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeInvitationContextResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Resolve invitation context for the authenticated user","tags":["Users"]}},"/api/v1/me/team-creation-gate":{"get":{"operationId":"UsersController_getTeamCreationGate_v1","parameters":[{"name":"organizationId","required":false,"in":"query","description":"Organization whose team capacity is being evaluated.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreationGateResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get team creation gate for the authenticated user","tags":["Users"]}},"/api/v1/me/deletion-preview":{"get":{"operationId":"UsersController_getDeletionPreview_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionPreviewResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get deletion preview for the authenticated user","tags":["Users"]}},"/api/v1/me/preferences":{"patch":{"operationId":"UsersController_updatePreferences_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMePreferencesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update the authenticated user preferences","tags":["Users"]}},"/api/v1/organizations":{"get":{"operationId":"OrganizationsController_listOrganizations_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationListItemDto"}}}}}},"security":[{"bearer":[]}],"summary":"List organizations for the authenticated user","tags":["Organizations"]},"post":{"operationId":"OrganizationsController_createOrganization_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an organization","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}":{"get":{"operationId":"OrganizationsController_getOrganization_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get an organization for the authenticated user","tags":["Organizations"]},"patch":{"operationId":"OrganizationsController_updateOrganization_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update an organization","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}/members":{"get":{"operationId":"OrganizationsController_listMembers_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMemberDto"}}}}}},"security":[{"bearer":[]}],"summary":"List organization members","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}/members/{memberId}":{"patch":{"operationId":"OrganizationsController_updateMember_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationMemberDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberDto"}}}}},"security":[{"bearer":[]}],"summary":"Update an organization member","tags":["Organizations"]},"delete":{"operationId":"OrganizationsController_removeMember_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Remove an organization member","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}/invitations":{"get":{"operationId":"OrganizationsController_listInvitations_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED","REVOKED","EXPIRED"]}},{"name":"teamId","required":false,"in":"query","description":"Filter invitations that have a pending assignment to this team.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitationDto"}}}}}},"security":[{"bearer":[]}],"summary":"List organization invitations","tags":["Organizations"]},"post":{"operationId":"OrganizationsController_createInvitation_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationInvitationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationDto"}}}}},"security":[{"bearer":[]}],"summary":"Invite a new organization member","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}/invitations/{invitationId}/revoke":{"post":{"operationId":"OrganizationsController_revokeInvitation_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationDto"}}}}},"security":[{"bearer":[]}],"summary":"Revoke an organization invitation","tags":["Organizations"]}},"/api/v1/organizations/{organizationId}/invitations/{invitationId}/resend":{"post":{"operationId":"OrganizationsController_resendInvitation_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationDto"}}}}},"security":[{"bearer":[]}],"summary":"Resend an organization invitation","tags":["Organizations"]}},"/api/v1/organizations/invitations/{invitationId}/accept":{"post":{"operationId":"OrganizationsController_acceptInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptOrganizationInvitationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Accept an organization invitation","tags":["Organizations"]}},"/api/v1/notifications":{"get":{"operationId":"NotificationsController_list_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedNotificationsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"List notifications for the authenticated user","tags":["Notifications"]},"delete":{"operationId":"NotificationsController_deleteAll_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Delete all notifications","tags":["Notifications"]}},"/api/v1/notifications/unread-count":{"get":{"operationId":"NotificationsController_getUnreadCount_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get unread notification count for the authenticated user","tags":["Notifications"]}},"/api/v1/notifications/stats":{"get":{"operationId":"NotificationsController_getStats_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationStatsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get notification stats for the authenticated user","tags":["Notifications"]}},"/api/v1/notifications/{id}":{"get":{"operationId":"NotificationsController_getDetail_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get a single notification detail","tags":["Notifications"]},"delete":{"operationId":"NotificationsController_delete_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Delete a notification","tags":["Notifications"]}},"/api/v1/notifications/{id}/read":{"patch":{"operationId":"NotificationsController_toggleRead_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Toggle a notification as read/unread","tags":["Notifications"]}},"/api/v1/notifications/read-all":{"patch":{"operationId":"NotificationsController_markAllRead_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Mark all notifications as read","tags":["Notifications"]}},"/api/v1/teams":{"get":{"operationId":"TeamsController_listTeams_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List teams for the authenticated user","tags":["Teams"]},"post":{"operationId":"TeamsController_createTeam_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a team","tags":["Teams"]}},"/api/v1/teams/{teamId}/media/storage-usage":{"get":{"operationId":"TeamsController_getTeamMediaStorageUsage_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get media storage usage for the team","tags":["Teams"]}},"/api/v1/teams/{teamId}":{"get":{"operationId":"TeamsController_getTeam_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a team for the authenticated user","tags":["Teams"]},"patch":{"operationId":"TeamsController_updateTeam_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a team","tags":["Teams"]},"delete":{"operationId":"TeamsController_deleteTeam_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-delete a team","tags":["Teams"]}},"/api/v1/teams/{teamId}/shell-stats":{"get":{"operationId":"TeamsController_getShellStats_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamShellStatsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get shell stats for a team","tags":["Teams"]}},"/api/v1/teams/{teamId}/members":{"get":{"operationId":"TeamMembersController_listMembers_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search members by name or email.","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","owner","admin","editor","viewer"]}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List active team members","tags":["Team Members"]},"post":{"operationId":"TeamMembersController_addMember_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTeamMemberDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Assign an organization member to a team","tags":["Team Members"]}},"/api/v1/teams/{teamId}/members/eligible-organization-members":{"get":{"operationId":"TeamMembersController_listEligibleOrganizationMembers_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search members by name or email.","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","owner","admin","editor","viewer"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EligibleOrganizationMemberResponseDto"}}}}}},"security":[{"bearer":[]}],"summary":"List organization members eligible for assignment to this team","tags":["Team Members"]}},"/api/v1/teams/{teamId}/members/{userId}/role":{"patch":{"operationId":"TeamMembersController_updateRole_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamMemberRoleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a member role","tags":["Team Members"]}},"/api/v1/teams/{teamId}/members/{userId}":{"delete":{"operationId":"TeamMembersController_removeMember_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-remove a team member","tags":["Team Members"]}},"/api/v1/teams/{teamId}/context":{"get":{"operationId":"TeamContextController_getContext_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamContextResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get team context with membership, permissions, and team info","tags":["Teams"]}},"/api/v1/teams/{teamId}/overview":{"get":{"operationId":"TeamOverviewController_getOverview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamOverviewResponseDto"}}}}},"summary":"Get team operating overview","tags":["Teams"]}},"/api/v1/billing/entitlements":{"get":{"operationId":"BillingController_getEntitlements_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerEntitlementsDto"}}}}},"security":[{"bearer":[]}],"summary":"Get owner entitlements (plan, limits, subscription status)","tags":["Billing"]}},"/api/v1/billing/team-capacity":{"get":{"operationId":"BillingController_getTeamCapacity_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCapacityResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get team capacity for the current owner","tags":["Billing"]}},"/api/v1/billing/subscription":{"get":{"operationId":"BillingController_getSubscription_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get current subscription","tags":["Billing"]}},"/api/v1/billing/plan":{"get":{"operationId":"BillingController_getPlan_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanNameResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get current plan","tags":["Billing"]}},"/api/v1/billing/status":{"get":{"operationId":"BillingController_getSubscriptionStatus_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get subscription status","tags":["Billing"]}},"/api/v1/billing/summary":{"get":{"operationId":"BillingController_getBillingSummary_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummaryResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get billing summary with plan, usage, and overage","tags":["Billing"]}},"/api/v1/billing/usage-preview":{"get":{"operationId":"BillingController_getUsagePreview_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"meter","required":true,"in":"query","schema":{"type":"string"}},{"name":"units","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePreviewResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Preview meter consumption","tags":["Billing"]}},"/api/v1/billing/checkout":{"post":{"operationId":"BillingController_createCheckout_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Generate checkout link","tags":["Billing"]}},"/api/v1/billing/enterprise-addon-checkout":{"post":{"operationId":"BillingController_createEnterpriseAddonCheckout_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseAddonCheckoutDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseAddonCheckoutResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Generate enterprise extra-team addon checkout link","tags":["Billing"]}},"/api/v1/billing/portal":{"get":{"operationId":"BillingController_getCustomerPortal_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get customer portal URL","tags":["Billing"]}},"/api/v1/billing/ledger":{"get":{"operationId":"BillingController_listLedger_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}},{"name":"cursor","required":true,"in":"query","schema":{"type":"string"}},{"name":"limit","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLedgerResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"List usage ledger entries","tags":["Billing"]}},"/api/v1/billing/products":{"get":{"operationId":"BillingController_listProducts_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingProductDto"}}}}}},"security":[{"bearer":[]}],"summary":"List all Polar products","tags":["Billing"]}},"/api/v1/billing/subscription/cancel":{"post":{"operationId":"BillingController_cancelSubscription_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Cancel current subscription","tags":["Billing"]}},"/api/v1/billing/customer":{"delete":{"operationId":"BillingController_deleteCustomerRecord_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}},{"name":"x-organization-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCustomerRecordResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Delete customer Polar record","tags":["Billing"]}},"/api/v1/billing/sync":{"post":{"operationId":"BillingController_syncSubscription_v1","parameters":[{"name":"x-organization-id","in":"header","description":"Active organization ID for billing-scoped operations","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Sync subscription state (idempotent, called by webhooks)","tags":["Billing"]}},"/api/v1/billing/webhook-health":{"get":{"operationId":"BillingWebhookAdminController_getWebhookHealth_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get Polar webhook health summary (admin only)","tags":["Billing Webhook Admin"]}},"/api/v1/billing/webhook-events/{polarEventId}/retry":{"post":{"operationId":"BillingWebhookAdminController_retryWebhookEvent_v1","parameters":[{"name":"polarEventId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Force retry a Polar webhook event (admin only)","tags":["Billing Webhook Admin"]}},"/api/v1/internal/billing/check/post-create":{"post":{"operationId":"InternalBillingCheckController_checkPostCreate_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can create a post","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/ai-content":{"post":{"operationId":"InternalBillingCheckController_checkAiContent_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can generate AI content","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/project-create":{"post":{"operationId":"InternalBillingCheckController_checkProjectCreate_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can create a project","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/integration-create":{"post":{"operationId":"InternalBillingCheckController_checkIntegrationCreate_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can create an integration","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/storage-upload":{"post":{"operationId":"InternalBillingCheckController_checkStorageUpload_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can upload storage","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/agent-ai-generation":{"post":{"operationId":"InternalBillingCheckController_checkAgentAiGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can use agent AI generation","tags":["Internal Billing"]}},"/api/v1/internal/billing/check/comment-automation":{"post":{"operationId":"InternalBillingCheckController_checkCommentAutomation_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalBillingCheckRequestDto"}}}},"responses":{"200":{"description":""}},"summary":"Check if owner can use comment automation","tags":["Internal Billing"]}},"/api/v1/agents/{teamId}":{"get":{"operationId":"AgentController_getAgent_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSummaryDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the agent summary for a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/detail":{"get":{"operationId":"AgentController_getAgentDetail_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the detailed agent configuration for a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/dashboard":{"get":{"operationId":"AgentController_getDashboard_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the agent dashboard aggregates for a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/dashboard/performance":{"get":{"operationId":"AgentController_getPerformanceDashboard_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"timeRange","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPerformanceDashboardDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the frontend performance dashboard model for a team agent","tags":["Agents"]}},"/api/v1/agents/{teamId}/runtime-status":{"get":{"operationId":"AgentController_getRuntimeStatus_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeStatusDto"}}}}},"security":[{"bearer":[]}],"summary":"Get runtime banner status for a team agent","tags":["Agents"]}},"/api/v1/agents/{teamId}/settings":{"patch":{"operationId":"AgentController_updateSettings_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentSettingsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Update configurable agent settings for a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/threads":{"get":{"operationId":"AgentThreadController_listThreads_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for keyset pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/ThreadStatus"}},{"name":"search","required":false,"in":"query","description":"Search by customer name or customer id","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPageDto"}}}}},"security":[{"bearer":[]}],"summary":"List agent threads for a team","tags":["Agents"]}},"/api/v1/agents/threads/{threadId}":{"get":{"operationId":"AgentThreadController_getThreadDetail_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get thread detail, messages, and execution summary","tags":["Agents"]}},"/api/v1/agents/{teamId}/threads/by-profile/{customerProfileId}":{"get":{"operationId":"AgentThreadController_listThreadsByCustomerProfile_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPageDto"}}}}},"security":[{"bearer":[]}],"summary":"List agent threads linked to a customer profile on a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/threads/by-customer/{customerId}":{"get":{"operationId":"AgentThreadController_getThreadDetailByCustomer_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the latest thread detail for a customer on a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/approvals":{"get":{"operationId":"AgentApprovalController_listApprovals_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for keyset pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/AgentApprovalReadStatus"}},{"name":"search","required":false,"in":"query","description":"Search by customer identity, trigger, approval reason, inbound preview, or generated response preview","schema":{"type":"string"}},{"name":"riskLevel","required":false,"in":"query","description":"Filter by persisted approval risk level","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Filter by customer or delivery platform","schema":{"type":"string"}},{"name":"triggerType","required":false,"in":"query","description":"Filter by execution trigger type","schema":{"type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Only approvals created at or after this ISO timestamp","schema":{"type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Only approvals created at or before this ISO timestamp","schema":{"type":"string"}},{"name":"expiryState","required":false,"in":"query","description":"Filter by persisted expiry state. active means pending approvals whose expiry is in the future or absent.","schema":{"type":"string","enum":["active","expired","noExpiry"]}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["createdAt","updatedAt","expiresAt","status"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPageDto"}}}}},"security":[{"bearer":[]}],"summary":"List agent approvals for a team","tags":["Agents"]}},"/api/v1/agents/approvals/{approvalId}":{"get":{"operationId":"AgentApprovalController_getApprovalDetail_v1","parameters":[{"name":"approvalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDetailResponseDto"}}}},"404":{"description":"Approval not found."}},"security":[{"bearer":[]}],"summary":"Get approval detail, metadata, and history","tags":["Agents"]}},"/api/v1/agents/{teamId}/handoffs":{"get":{"operationId":"AgentHandoffController_listHandoffs_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for keyset pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"$ref":"#/components/schemas/HandoffStatus"}},{"name":"priority","required":false,"in":"query","schema":{"$ref":"#/components/schemas/HandoffPriority"}},{"name":"assignedTo","required":false,"in":"query","description":"Filter by assigned user id","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search by customer name, customer id, external customer id, email, reason, or assigned user id","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Filter by customer platform","schema":{"type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Only handoffs created at or after this ISO timestamp","schema":{"type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Only handoffs created at or before this ISO timestamp","schema":{"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["createdAt","updatedAt","priority","status"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffPageDto"}}}}},"security":[{"bearer":[]}],"summary":"List agent handoffs for a team","tags":["Agents"]}},"/api/v1/agents/{teamId}/activity":{"get":{"operationId":"AgentActivityController_listActivity_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for keyset pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"type","required":false,"in":"query","description":"Filter by activity category","schema":{"$ref":"#/components/schemas/ActivityCategory"}},{"name":"severity","required":false,"in":"query","schema":{"$ref":"#/components/schemas/ActivitySeverity"}},{"name":"startDate","required":false,"in":"query","description":"Inclusive ISO start date","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Inclusive ISO end date","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityPageDto"}}}}},"security":[{"bearer":[]}],"summary":"List agent activity for a team","tags":["Agents"]}},"/api/v1/agents/approvals/{approvalId}/approve":{"post":{"operationId":"AgentApprovalCommandController_approve_v1","parameters":[{"name":"approvalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveAgentApprovalDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSummaryDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Approval or agent not found."},"409":{"description":"Approval is no longer pending or is expired."}},"security":[{"bearer":[]}],"summary":"Approve a pending agent approval","tags":["Agents"]}},"/api/v1/agents/approvals/{approvalId}/reject":{"post":{"operationId":"AgentApprovalCommandController_reject_v1","parameters":[{"name":"approvalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectAgentApprovalDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSummaryDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Approval or agent not found."},"409":{"description":"Approval is no longer pending or is expired."}},"security":[{"bearer":[]}],"summary":"Reject a pending agent approval","tags":["Agents"]}},"/api/v1/agents/approvals/{approvalId}/escalate":{"post":{"operationId":"AgentApprovalCommandController_escalate_v1","parameters":[{"name":"approvalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalateAgentApprovalDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSummaryDto"}}}},"403":{"description":"Authenticated user or escalation target is not a team member."},"404":{"description":"Approval, agent, or escalation target not found."},"409":{"description":"Approval is no longer pending or is expired."}},"security":[{"bearer":[]}],"summary":"Escalate a pending agent approval to another team member","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/accept":{"post":{"operationId":"AgentHandoffCommandController_accept_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptHandoffDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffSummaryDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Handoff or agent not found."},"409":{"description":"Handoff was resolved or changed before the command."}},"security":[{"bearer":[]}],"summary":"Accept an open agent handoff","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/acknowledge":{"post":{"operationId":"AgentHandoffCommandController_acknowledge_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcknowledgeHandoffDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffSummaryDto"}}}}},"security":[{"bearer":[]}],"summary":"Acknowledge an agent handoff","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/reject":{"post":{"operationId":"AgentHandoffCommandController_reject_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectHandoffDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffSummaryDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Handoff or agent not found."},"409":{"description":"Handoff was resolved or changed before the command."}},"security":[{"bearer":[]}],"summary":"Reject an agent handoff and mark it resolved","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/reassign":{"post":{"operationId":"AgentHandoffCommandController_reassign_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignHandoffDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffSummaryDto"}}}},"403":{"description":"Authenticated user or assignee is not a team member."},"404":{"description":"Handoff, agent, or assignee not found."},"409":{"description":"Handoff was resolved or changed before the command."}},"security":[{"bearer":[]}],"summary":"Reassign an agent handoff to another team member","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/resolve":{"post":{"operationId":"AgentHandoffCommandController_resolve_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveHandoffDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffSummaryDto"}}}}},"security":[{"bearer":[]}],"summary":"Resolve an agent handoff","tags":["Agents"]}},"/api/v1/agents/handoffs/{handoffId}/reply":{"post":{"operationId":"AgentHandoffCommandController_reply_v1","parameters":[{"name":"handoffId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendHumanHandoffReplyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanHandoffReplyResponseDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Handoff or agent not found."},"409":{"description":"Handoff was resolved or changed before the command."}},"security":[{"bearer":[]}],"summary":"Send a human reply in an active handoff conversation","tags":["Agents"]}},"/api/v1/agents/handoffs/bulk-resolve":{"post":{"operationId":"AgentHandoffCommandController_bulkResolve_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResolveHandoffsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"resolvedCount":{"type":"number"},"skippedCount":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/HandoffSummaryDto"}}},"required":["resolvedCount","skippedCount","items"]}}}}},"security":[{"bearer":[]}],"summary":"Resolve multiple agent handoffs","tags":["Agents"]}},"/api/v1/agents/handoffs/bulk-acknowledge":{"post":{"operationId":"AgentHandoffCommandController_bulkAcknowledge_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAcknowledgeHandoffsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgedCount":{"type":"number"},"skippedCount":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/HandoffSummaryDto"}}},"required":["acknowledgedCount","skippedCount","items"]}}}}},"security":[{"bearer":[]}],"summary":"Acknowledge multiple open agent handoffs","tags":["Agents"]}},"/api/v1/agents/threads/{threadId}/archive":{"post":{"operationId":"AgentThreadCommandController_archive_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveThreadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Thread or agent not found."},"409":{"description":"Thread is already archived or changed before the command."}},"security":[{"bearer":[]}],"summary":"Archive an agent thread","tags":["Agents"]}},"/api/v1/agents/threads/{threadId}/reopen":{"post":{"operationId":"AgentThreadCommandController_reopen_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReopenThreadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Thread or agent not found."},"409":{"description":"Thread is already open or changed before the command."}},"security":[{"bearer":[]}],"summary":"Reopen an agent thread","tags":["Agents"]}},"/api/v1/agents/threads/{threadId}/priority":{"post":{"operationId":"AgentThreadCommandController_updatePriority_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadPriorityDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDetailDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Thread or agent not found."},"409":{"description":"Thread changed before the command."}},"security":[{"bearer":[]}],"summary":"Update agent thread priority metadata","tags":["Agents"]}},"/api/v1/agents/threads/{threadId}/internal-note":{"post":{"operationId":"AgentThreadCommandController_createInternalNote_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThreadInternalNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessageDto"}}}},"403":{"description":"Authenticated user is not a team member."},"404":{"description":"Thread or agent not found."}},"security":[{"bearer":[]}],"summary":"Create an internal note on an agent thread","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers":{"get":{"operationId":"CustomerProfileController_listProfiles_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for keyset pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by display name, identity, email, phone, or tag","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["active","opted_out"]}},{"name":"platform","required":false,"in":"query","description":"Exact source platform, for example instagram or whatsapp","schema":{"type":"string"}},{"name":"lastSeenFrom","required":false,"in":"query","description":"Only profiles last seen at or after this ISO timestamp","schema":{"type":"string"}},{"name":"lastSeenTo","required":false,"in":"query","description":"Only profiles last seen at or before this ISO timestamp","schema":{"type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["lastSeenAt","createdAt"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfilePageDto"}}}}},"security":[{"bearer":[]}],"summary":"List customer profiles for a team agent","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}":{"get":{"operationId":"CustomerProfileController_getProfileDetail_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileDetailResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get customer profile detail for a team agent","tags":["Agents"]},"patch":{"operationId":"CustomerProfileController_updateProfile_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileDetailResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update a customer profile for a team agent","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/preferences":{"put":{"operationId":"CustomerProfileController_replacePreferences_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceCustomerPreferencesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerPreferenceDto"}}}}}},"security":[{"bearer":[]}],"summary":"Replace normalized customer preferences for a profile","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/moderation":{"put":{"operationId":"CustomerProfileController_updateModeration_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerModerationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileDetailResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update customer profile moderation state","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/tags":{"put":{"operationId":"CustomerProfileController_replaceTags_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceCustomerTagsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerTagDto"}}}}}},"security":[{"bearer":[]}],"summary":"Replace normalized customer tags for a profile","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/notes":{"get":{"operationId":"CustomerProfileController_listNotes_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNoteDto"}}}}}},"security":[{"bearer":[]}],"summary":"List internal notes for a customer profile","tags":["Agents"]},"post":{"operationId":"CustomerProfileController_createNote_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerNoteDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an internal note for a customer profile","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/memories":{"get":{"operationId":"CustomerProfileController_listMemories_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerMemoryDto"}}}}}},"security":[{"bearer":[]}],"summary":"List structured customer memory entries for a profile","tags":["Agents"]},"post":{"operationId":"CustomerProfileController_createMemory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerMemoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMemoryDto"}}}}},"security":[{"bearer":[]}],"summary":"Create a structured customer memory entry","tags":["Agents"]}},"/api/v1/agents/{teamId}/customers/{customerProfileId}/memories/{memoryId}":{"patch":{"operationId":"CustomerProfileController_updateMemory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"customerProfileId","required":true,"in":"path","schema":{"type":"string"}},{"name":"memoryId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerMemoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMemoryDto"}}}}},"security":[{"bearer":[]}],"summary":"Update a structured customer memory entry","tags":["Agents"]}},"/api/v1/analytics/{teamId}/engagement":{"get":{"operationId":"AnalyticsReportingController_getEngagement_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Inclusive ISO start date","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Inclusive ISO end date","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Filter by platform (e.g., instagram)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEngagementResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get engagement analytics for a team","tags":["Analytics"]}},"/api/v1/analytics/{teamId}/sync-status":{"get":{"operationId":"AnalyticsReportingController_getSyncStatus_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncStatusResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get analytics sync status for a team","tags":["Analytics"]}},"/api/v1/analytics/{teamId}/sync/retry":{"post":{"operationId":"AnalyticsReportingController_retrySync_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"integrationId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryAnalyticsImportResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Retry missing historical analytics dates for a team integration","tags":["Analytics"]}},"/api/v1/integrations/shopify/connection":{"get":{"operationId":"IntegrationsController_getShopifyConnection_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get the active Shopify catalog connection for a team","tags":["Integrations"]},"post":{"operationId":"IntegrationsController_completeShopifyConnection_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteShopifyConnectionDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Exchange a Shopify OAuth code and connect a shop to a team","tags":["Integrations"]}},"/api/v1/integrations/shopify/connection/{integrationId}":{"delete":{"operationId":"IntegrationsController_disconnectShopifyConnection_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Disconnect the active Shopify catalog connection","tags":["Integrations"]}},"/api/v1/integrations":{"post":{"operationId":"IntegrationsController_createIntegration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a new integration","tags":["Integrations"]},"get":{"operationId":"IntegrationsController_listIntegrations_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List integrations for a team","tags":["Integrations"]}},"/api/v1/integrations/accounts":{"get":{"operationId":"IntegrationsController_listConnectedAccounts_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List connected platform accounts for a team","tags":["Integrations"]}},"/api/v1/integrations/platforms":{"get":{"operationId":"IntegrationsController_getPlatformSummaries_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get per-platform integration summaries for a team","tags":["Integrations"]}},"/api/v1/integrations/has-any":{"get":{"operationId":"IntegrationsController_hasAnyIntegration_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Check if team has any integrations","tags":["Integrations"]}},"/api/v1/integrations/limits":{"get":{"operationId":"IntegrationsController_getIntegrationLimits_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get integration limit status for a team","tags":["Integrations"]}},"/api/v1/integrations/ad-platforms":{"get":{"operationId":"IntegrationsController_listAdIntegrations_v1","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List ad platform integrations for a team","tags":["Integrations"]}},"/api/v1/integrations/posting-preflight":{"post":{"operationId":"IntegrationsController_runPostingPreflight_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPostingPreflightRequestDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Evaluate integration health before scheduling or publishing posts","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/platform-posts":{"get":{"operationId":"IntegrationsController_listPlatformPosts_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List posts for an integration via server-side credentials","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}":{"get":{"operationId":"IntegrationsController_getIntegration_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get an integration by id","tags":["Integrations"]},"delete":{"operationId":"IntegrationsController_removeIntegration_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Remove an integration","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/diagnostics":{"get":{"operationId":"IntegrationsController_getIntegrationDiagnostics_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get integration diagnostics","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/reconnect":{"patch":{"operationId":"IntegrationsController_reconnectIntegration_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectIntegrationDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Reconnect an integration","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/connection":{"patch":{"operationId":"IntegrationsController_toggleConnection_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleConnectionDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Toggle integration connection status","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/whatsapp-template":{"patch":{"operationId":"IntegrationsController_updateWhatsAppTemplate_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWhatsappTemplateDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update WhatsApp template settings","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/switch-impact":{"get":{"operationId":"IntegrationsController_getSwitchImpact_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get impact of disconnecting an integration","tags":["Integrations"]}},"/api/v1/integrations/telegram/connect":{"post":{"operationId":"IntegrationsController_connectTelegram_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectTelegramIntegrationDto"}}}},"responses":{"201":{"description":"Telegram bot connected successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramIntegrationResponseDto"}}}},"400":{"description":"Invalid bot token."},"401":{"description":"Authentication required."},"403":{"description":"User lacks team access or plan limit reached."},"409":{"description":"Bot is already connected to another integration."},"502":{"description":"Telegram provider unavailable or webhook setup failed."}},"security":[{"bearer":[]}],"summary":"Connect a Telegram bot integration","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/telegram/reconnect":{"patch":{"operationId":"IntegrationsController_reconnectTelegram_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectTelegramIntegrationDto"}}}},"responses":{"200":{"description":"Telegram bot reconnected successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramIntegrationResponseDto"}}}},"400":{"description":"Invalid bot token."},"401":{"description":"Authentication required."},"403":{"description":"User lacks team access or integration is disconnected."},"404":{"description":"Integration not found."},"409":{"description":"Bot is already connected to another integration."},"502":{"description":"Telegram provider or webhook unavailable."}},"security":[{"bearer":[]}],"summary":"Reconnect a Telegram bot integration with a new token","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/tiktok-profile":{"get":{"operationId":"IntegrationsController_getTikTokProfile_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"TikTok profile data retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokProfileResponseDto"}}}},"401":{"description":"Authentication required."},"403":{"description":"Integration is disconnected or user lacks team access."},"404":{"description":"Integration not found."}},"security":[{"bearer":[]}],"summary":"Fetch the TikTok profile for a connected integration","tags":["Integrations"]}},"/api/v1/integrations/{integrationId}/refresh-profile":{"post":{"operationId":"IntegrationsController_refreshIntegrationProfile_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"force","required":false,"in":"query","description":"Skip the freshness check and call the provider immediately.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Integration profile refreshed successfully."},"401":{"description":"Authentication required."},"403":{"description":"Integration is disconnected or user lacks team access."},"404":{"description":"Integration not found."}},"security":[{"bearer":[]}],"summary":"Refresh the provider profile identity for an integration","tags":["Integrations"]}},"/api/v1/internal/integration-read-metrics":{"get":{"operationId":"IntegrationReadMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get integration read metrics","tags":["Integration Read Metrics"]}},"/api/v1/internal/integrations/{integrationId}/credentials":{"get":{"operationId":"InternalIntegrationCredentialsController_getCredentials_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get sanitized integration credential metadata for internal server-side callers","tags":["Integration Credentials (Internal)"]}},"/api/v1/internal/integration-credential-read-metrics":{"get":{"operationId":"IntegrationCredentialReadMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get integration credential read metrics","tags":["Integration Credential Read Metrics"]}},"/api/v1/internal/integrations/{integrationId}/token-refresh/dry-run":{"post":{"operationId":"InternalIntegrationTokenRefreshController_dryRun_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Evaluate whether an integration token refresh is needed without calling external providers","tags":["Integration Token Refresh (Internal)"]}},"/api/v1/internal/integrations/{integrationId}/token-refresh":{"post":{"operationId":"InternalIntegrationTokenRefreshController_refresh_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Refresh an integration token and persist the result to Postgres only","tags":["Integration Token Refresh (Internal)"]}},"/api/v1/internal/integration-token-refresh-metrics":{"get":{"operationId":"IntegrationTokenRefreshMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get integration token refresh metrics","tags":["Integration Token Refresh Metrics"]}},"/api/v1/admin/dashboard/summary":{"get":{"operationId":"AdminReadController_getDashboardSummary_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDashboardSummaryResponseDto"}}}}},"summary":"Get the admin dashboard summary","tags":["Admin Read"]}},"/api/v1/admin/dashboard/trends":{"get":{"operationId":"AdminReadController_getDashboardTrends_v1","parameters":[{"name":"days","required":false,"in":"query","schema":{"example":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDashboardTrendsResponseDto"}}}}},"summary":"Get admin dashboard trend data","tags":["Admin Read"]}},"/api/v1/admin/analytics/attribution":{"get":{"description":"Platform-wide attribution event counts grouped by platform, campaign, team, project, and feature.","operationId":"AdminReadController_getAttributionAnalytics_v1","parameters":[{"name":"days","required":false,"in":"query","description":"Number of days to look back from now. Clamped to 1-365. Defaults to 30.","schema":{"minimum":1,"maximum":365,"default":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAttributionAnalyticsResponseDto"}}}}},"summary":"Get admin attribution analytics","tags":["Admin Read"]}},"/api/v1/admin/usage/analytics":{"get":{"description":"Platform-wide metered usage grouped by meter and by organization. Organization ranking uses entry count because meter units are not comparable across meters.","operationId":"AdminReadController_getUsageAnalytics_v1","parameters":[{"name":"days","required":false,"in":"query","description":"Number of days to look back from now. Clamped to 7-90. Defaults to 30.","schema":{"minimum":7,"maximum":90,"default":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsageAnalyticsResponseDto"}}}}},"summary":"Get admin usage analytics","tags":["Admin Read"]}},"/api/v1/admin/revenue":{"get":{"description":"Contracted recurring subscription value by currency and plan, derived from OrganizationBillingState. Excludes historical revenue, cash collections, and overage.","operationId":"AdminReadController_getRevenueOverview_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRevenueResponseDto"}}}}},"summary":"Get admin revenue overview","tags":["Admin Read"]}},"/api/v1/admin/users":{"get":{"operationId":"AdminReadController_listUsers_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["all","active","inactive","banned","admins"]}},{"name":"role","required":false,"in":"query","schema":{"type":"string","enum":["user","support","admin","super_admin"]}}],"responses":{"200":{"description":""}},"summary":"List admin users","tags":["Admin Read"]}},"/api/v1/admin/users/{userId}":{"get":{"operationId":"AdminReadController_getUserDetail_v1","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailResponseDto"}}}}},"summary":"Get admin user detail","tags":["Admin Read"]}},"/api/v1/admin/users/{userId}/ban":{"post":{"operationId":"AdminReadController_banUser_v1","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBanUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserActionResponseDto"}}}}},"summary":"Ban a user from the admin panel","tags":["Admin Read"]}},"/api/v1/admin/users/{userId}/unban":{"post":{"operationId":"AdminReadController_unbanUser_v1","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserActionResponseDto"}}}}},"summary":"Unban a user from the admin panel","tags":["Admin Read"]}},"/api/v1/admin/users/{userId}/platform-role":{"patch":{"operationId":"AdminReadController_updateUserRoleByAdmin_v1","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateUserRoleDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserRoleUpdateResponseDto"}}}}},"summary":"Update a user platform role from the admin panel","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}/members":{"get":{"operationId":"AdminReadController_listOrganizationMembers_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationMembersResponseDto"}}}}},"summary":"List Organization members for platform Admin inspection","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}/invitations":{"get":{"operationId":"AdminReadController_listOrganizationInvitations_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED","REVOKED","EXPIRED"]}},{"name":"teamId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationInvitationsResponseDto"}}}}},"summary":"List canonical Organization invitations for platform Admin inspection","tags":["Admin Read"]}},"/api/v1/admin/organizations":{"get":{"operationId":"AdminReadController_listOrganizations_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search name, slug, or billing email","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationsResponseDto"}}}}},"summary":"List organizations for platform Admin inspection","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}":{"get":{"operationId":"AdminReadController_getOrganizationDetail_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationDetailResponseDto"}}}}},"summary":"Get an organization for platform Admin inspection","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}/billing":{"get":{"operationId":"AdminReadController_getOrganizationBilling_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationBillingResponseDto"}}}}},"summary":"Get an organization billing summary for platform Admin","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}/usage":{"get":{"operationId":"AdminReadController_getOrganizationUsage_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationUsageResponseDto"}}}}},"summary":"Get an organization usage summary for platform Admin","tags":["Admin Read"]}},"/api/v1/admin/organizations/{organizationId}/usage/ledger":{"get":{"operationId":"AdminReadController_getOrganizationUsageLedger_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"meter","required":false,"in":"query","description":"Filter by meter identifier","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Filter by Team attribution","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor for server-driven pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationUsageLedgerResponseDto"}}}}},"summary":"Get an organization usage ledger for platform Admin","tags":["Admin Read"]}},"/api/v1/admin/teams":{"get":{"operationId":"AdminReadController_listTeams_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeDeleted","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamsResponseDto"}}}}},"summary":"List admin teams","tags":["Admin Read"]}},"/api/v1/admin/teams/{teamId}":{"get":{"operationId":"AdminReadController_getTeamDetail_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamDetailResponseDto"}}}}},"summary":"Get admin team detail","tags":["Admin Read"]}},"/api/v1/admin/customer-ops":{"get":{"operationId":"AdminReadController_listCustomerOps_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"organizationId","required":false,"in":"query","schema":{"type":"string"}},{"name":"days","required":false,"in":"query","schema":{"minimum":7,"maximum":90,"default":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOpsListResponseDto"}}}}},"summary":"List customer operations","tags":["Admin Read"]}},"/api/v1/admin/customer-ops/{teamId}":{"get":{"operationId":"AdminReadController_getCustomerOpsDetail_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"days","required":false,"in":"query","schema":{"minimum":7,"maximum":90,"default":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOpsDetailResponseDto"}}}}},"summary":"Get customer operations detail","tags":["Admin Read"]}},"/api/v1/admin/customer-success":{"get":{"operationId":"AdminReadController_getCustomerSuccessSummary_v1","parameters":[{"name":"days","required":false,"in":"query","schema":{"minimum":7,"maximum":90,"default":30,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerSuccessSummaryResponseDto"}}}}},"summary":"Get customer success activation analytics","tags":["Admin Read"]}},"/api/v1/admin/customer-success/leaderboard":{"get":{"operationId":"AdminReadController_getCustomerSuccessLeaderboard_v1","parameters":[{"name":"days","required":false,"in":"query","schema":{"minimum":7,"maximum":90,"default":30,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerSuccessLeaderboardResponseDto"}}}}},"summary":"List fastest team activations","tags":["Admin Read"]}},"/api/v1/admin/customer-success/stalled":{"get":{"operationId":"AdminReadController_getCustomerSuccessStalled_v1","parameters":[{"name":"minDaysStale","required":false,"in":"query","schema":{"minimum":1,"maximum":90,"default":7,"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerSuccessStalledResponseDto"}}}}},"summary":"List stalled activation teams","tags":["Admin Read"]}},"/api/v1/admin/operations/billing-health":{"get":{"operationId":"AdminReadController_getBillingHealthSummary_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingHealthSummaryResponseDto"}}}}},"summary":"Get billing operations health summary","tags":["Admin Read"]}},"/api/v1/admin/operations/billing-health/issues":{"get":{"operationId":"AdminReadController_getBillingHealthIssues_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","schema":{"type":"string","enum":["WARNING","CRITICAL"]}},{"name":"issueType","required":false,"in":"query","schema":{"type":"string"}},{"name":"subscriptionStatus","required":false,"in":"query","description":"Internal subscription status filter","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingHealthIssuesResponseDto"}}}}},"summary":"List billing operations health issues","tags":["Admin Read"]}},"/api/v1/admin/subscriptions":{"get":{"operationId":"AdminReadController_listAdminSubscriptions_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across organization name, slug, billing email, owner name, owner email, polar customer id, and polar subscription id","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by resolved subscription status","schema":{"type":"string","enum":["active","past_due","canceled","incomplete"]}},{"name":"plan","required":false,"in":"query","description":"Filter by resolved billing plan","schema":{"type":"string","enum":["starter","pro","growth","enterprise"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionListResponseDto"}}}}},"summary":"List organization subscriptions","tags":["Admin Read"]}},"/api/v1/admin/subscriptions/{organizationId}":{"get":{"operationId":"AdminReadController_getAdminSubscriptionDetail_v1","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionDetailResponseDto"}}}}},"summary":"Get organization subscription detail","tags":["Admin Read"]}},"/api/v1/admin/teams/{teamId}/members":{"get":{"operationId":"AdminReadController_listTeamMembers_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","schema":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamMembersResponseDto"}}}}},"summary":"List Team members with Organization membership context","tags":["Admin Read"]}},"/api/v1/admin/projects":{"get":{"operationId":"AdminReadController_listProjects_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProjectsResponseDto"}}}}},"summary":"List admin projects","tags":["Admin Read"]}},"/api/v1/admin/projects/{projectId}":{"get":{"operationId":"AdminReadController_getProjectDetail_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProjectDetailResponseDto"}}}}},"summary":"Get admin project detail","tags":["Admin Read"]}},"/api/v1/admin/posts":{"get":{"operationId":"AdminReadController_listPosts_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPostsResponseDto"}}}}},"summary":"List admin posts","tags":["Admin Read"]}},"/api/v1/admin/posts/{postId}":{"get":{"operationId":"AdminReadController_getPostDetail_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPostDetailResponseDto"}}}}},"summary":"Get admin post detail","tags":["Admin Read"]}},"/api/v1/admin/invitations":{"get":{"operationId":"AdminReadController_listInvitations_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List admin invitations","tags":["Admin Read"]}},"/api/v1/admin/invitations/{invitationId}":{"get":{"operationId":"AdminReadController_getInvitationDetail_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationDetailResponseDto"}}}}},"summary":"Get admin invitation detail","tags":["Admin Read"]},"delete":{"operationId":"AdminReadController_deleteInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationDetailResponseDto"}}}}},"summary":"Soft-delete an invitation from Admin","tags":["Admin Read"]}},"/api/v1/admin/invitations/{invitationId}/resend":{"post":{"operationId":"AdminReadController_resendInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationDetailResponseDto"}}}}},"summary":"Resend an invitation from Admin","tags":["Admin Read"]}},"/api/v1/admin/invitations/{invitationId}/revoke":{"post":{"operationId":"AdminReadController_revokeInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvitationDetailResponseDto"}}}}},"summary":"Revoke an invitation from Admin","tags":["Admin Read"]}},"/api/v1/admin/feedback":{"get":{"operationId":"AdminReadController_listFeedback_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List admin feedback","tags":["Admin Read"]}},"/api/v1/admin/demo-requests":{"get":{"operationId":"AdminReadController_listDemoRequests_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List demo requests","tags":["Admin Read"]}},"/api/v1/admin/system-settings":{"get":{"operationId":"AdminReadController_getSystemSettings_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Read system settings","tags":["Admin Read"]},"patch":{"operationId":"SystemSettingsController_updateSystemSettings_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSystemSettingsDto"}}}},"responses":{"200":{"description":""}},"summary":"Update global system settings","tags":["Admin System Settings"]}},"/api/v1/admin/activity-logs":{"get":{"operationId":"AdminReadController_listActivityLogs_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List activity logs","tags":["Admin Read"]}},"/api/v1/admin/media-library":{"get":{"operationId":"AdminReadController_listMediaLibrary_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMediaLibraryResponseDto"}}}}},"summary":"List admin media library items","tags":["Admin Read"]}},"/api/v1/admin/ops-alerts":{"get":{"operationId":"AdminReadController_listOpsAlerts_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOpsAlertsResponseDto"}}}}},"summary":"List ops alerts","tags":["Admin Read"]}},"/api/v1/admin/ops-alerts/{alertId}/acknowledge":{"post":{"operationId":"AdminReadController_acknowledgeOpsAlert_v1","parameters":[{"name":"alertId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOpsAlertAcknowledgeResponseDto"}}}}},"summary":"Acknowledge an ops alert","tags":["Admin Read"]}},"/api/v1/admin/queues/pressure":{"get":{"operationId":"AdminReadController_getQueuePressure_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminQueuePressureResponseDto"}}}}},"summary":"Get live AI queue pressure snapshot","tags":["Admin Read"]}},"/api/v1/internal/admin-read-metrics":{"get":{"operationId":"AdminReadMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get admin read metrics","tags":["Admin Read Metrics"]}},"/api/v1/admin/automations":{"get":{"operationId":"AdminAutomationsController_listAutomations_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAutomationsResponseDto"}}}}},"summary":"List admin automations inventory","tags":["Admin Automations"]}},"/api/v1/admin/automations/reliability-runs":{"get":{"operationId":"AdminAutomationsController_listReliabilityRuns_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAutomationReliabilityRunsResponseDto"}}}}},"summary":"List recent admin automation reliability runs","tags":["Admin Automations"]}},"/api/v1/admin/automations/{automationId}":{"get":{"operationId":"AdminAutomationsController_getAutomationDetail_v1","parameters":[{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAutomationDetailResponseDto"}}}}},"summary":"Get admin automation detail","tags":["Admin Automations"]}},"/api/v1/admin/approval-queue":{"get":{"operationId":"AdminAutomationsController_listApprovalQueue_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApprovalQueueResponseDto"}}}}},"summary":"List admin approval queue items","tags":["Admin Automations"]}},"/api/v1/admin/leads":{"get":{"operationId":"AdminLeadsController_listLeads_v1","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":400,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Free-text search across relevant text fields","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter","schema":{"type":"string"}},{"name":"severity","required":false,"in":"query","description":"Severity filter","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Team identifier filter","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project identifier filter","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","description":"User identifier filter","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","description":"Automation identifier filter","schema":{"type":"string"}},{"name":"integrationId","required":false,"in":"query","description":"Integration identifier filter","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type filter","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Role filter","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Category filter","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"Email filter","schema":{"type":"string"}},{"name":"ownerId","required":false,"in":"query","description":"Owner identifier filter","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived records","schema":{"type":"boolean"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted records","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"Start of date range (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"End of date range (ISO 8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminListLeadsResponseDto"}}}}},"summary":"List all leads (admin)","tags":["Admin Leads"]}},"/api/v1/admin/leads/{leadId}":{"get":{"operationId":"AdminLeadsController_getLeadDetail_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLeadDetailResponseDto"}}}}},"summary":"Get lead detail (admin)","tags":["Admin Leads"]},"delete":{"operationId":"AdminLeadsController_deleteLead_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete a lead (admin)","tags":["Admin Leads"]}},"/api/v1/admin/leads/{leadId}/qualify":{"patch":{"operationId":"AdminLeadsController_markLeadQualified_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Mark a lead as qualified (admin)","tags":["Admin Leads"]}},"/api/v1/admin/demo-workspaces/{teamId}/readiness":{"get":{"operationId":"AdminDemoWorkspacesController_getReadiness_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDemoWorkspaceReadinessResponseDto"}}}}},"summary":"Get demo workspace readiness for a team","tags":["Admin Demo Workspaces"]}},"/api/v1/admin/demo-workspaces/{teamId}/designate":{"post":{"operationId":"AdminDemoWorkspacesController_designate_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDemoWorkspaceDesignateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDemoWorkspaceDesignateResponseDto"}}}}},"summary":"Designate a team as a demo workspace","tags":["Admin Demo Workspaces"]}},"/api/v1/admin/demo-workspaces/{teamId}/seed":{"post":{"operationId":"AdminDemoWorkspacesController_seed_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDemoWorkspaceSeedDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDemoWorkspaceSeedResponseDto"}}}}},"summary":"Seed demo workspace data for a team","tags":["Admin Demo Workspaces"]}},"/api/v1/teams/{teamId}/leads":{"get":{"operationId":"LeadsController_listLeads_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","new","contacted","qualified"]}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Exact source platform, for example instagram or whatsapp.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":50,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Server-side sort field for cursor pagination.","schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","status","name"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLeadsResponseDto"}}}}},"summary":"List leads with cursor pagination","tags":["Leads"]},"post":{"operationId":"LeadsController_createLead_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDto"}}}}},"summary":"Create a new lead","tags":["Leads"]}},"/api/v1/teams/{teamId}/leads/new-count":{"get":{"operationId":"LeadsController_getNewLeadsCount_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLeadsCountResponseDto"}}}}},"summary":"Get new leads count for nav badge","tags":["Leads"]}},"/api/v1/teams/{teamId}/leads/summary":{"get":{"operationId":"LeadsController_getLeadsSummary_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadsSummaryResponseDto"}}}}},"summary":"Get team-wide lead funnel summary counts","tags":["Leads"]}},"/api/v1/teams/{teamId}/leads/export":{"get":{"operationId":"LeadsController_exportLeads_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","new","contacted","qualified"]}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Exact source platform, for example instagram or whatsapp.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":50,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Server-side sort field for cursor pagination.","schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","status","name"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":""}},"summary":"Export leads as CSV","tags":["Leads"]}},"/api/v1/leads/{leadId}":{"get":{"operationId":"LeadsController_getLeadById_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDto"}}}}},"summary":"Get a single lead by ID","tags":["Leads"]},"patch":{"operationId":"LeadsController_updateLead_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDto"}}}}},"summary":"Update lead fields","tags":["Leads"]},"delete":{"operationId":"LeadsController_deleteLead_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete a lead","tags":["Leads"]}},"/api/v1/leads/{leadId}/status":{"patch":{"operationId":"LeadsController_updateLeadStatus_v1","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDto"}}}}},"summary":"Update lead status","tags":["Leads"]}},"/api/v1/teams/{teamId}/projects":{"get":{"operationId":"ProjectsController_listProjects_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponseDto"}}}}}},"security":[{"bearer":[]}],"summary":"List projects for a team member","tags":["Projects"]},"post":{"operationId":"ProjectsController_createProject_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a project","tags":["Projects"]}},"/api/v1/projects/{projectId}/stats":{"get":{"operationId":"ProjectsController_getProjectStats_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectOverviewStatDto"}}}}}},"security":[{"bearer":[]}],"summary":"Get project overview stats","tags":["Projects"]}},"/api/v1/projects/{projectId}":{"get":{"operationId":"ProjectsController_getProject_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get a project","tags":["Projects"]},"patch":{"operationId":"ProjectsController_updateProject_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a project","tags":["Projects"]},"delete":{"operationId":"ProjectsController_deleteProject_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-delete a project","tags":["Projects"]}},"/api/v1/teams/{teamId}/project-creation-gate":{"get":{"operationId":"ProjectsController_getProjectCreationGate_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreationGateResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get project creation capacity for the current user in a team","tags":["Projects"]}},"/api/v1/projects/{projectId}/analytics":{"get":{"operationId":"ProjectAnalyticsController_getProjectAnalytics_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date as epoch milliseconds","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"End date as epoch milliseconds","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponseDto"}}}}},"summary":"Get project analytics dashboard data","tags":["Project Analytics"]}},"/api/v1/projects/{projectId}/recommendations":{"get":{"operationId":"ProjectAnalyticsController_getProjectRecommendations_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRecommendationsResponseDto"}}}}},"summary":"Get project recommendations","tags":["Project Analytics"]}},"/api/v1/projects/{projectId}/analytics/content-coverage":{"get":{"operationId":"ProjectAnalyticsController_getProjectContentCoverage_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentCoverageResponseDto"}}}}},"summary":"Get product/service content coverage for a project","tags":["Project Analytics"]}},"/api/v1/projects/{projectId}/members":{"get":{"operationId":"ProjectMembersController_listMembers_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List project members","tags":["Project Members"]},"post":{"operationId":"ProjectMembersController_addMember_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProjectMemberDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Add a project member","tags":["Project Members"]}},"/api/v1/projects/{projectId}/members/{userId}/role":{"patch":{"operationId":"ProjectMembersController_updateMemberRole_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectMemberRoleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a project member role","tags":["Project Members"]}},"/api/v1/projects/{projectId}/members/{userId}":{"delete":{"operationId":"ProjectMembersController_removeMember_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-remove a project member","tags":["Project Members"]}},"/api/v1/projects/{projectId}/media":{"get":{"operationId":"ProjectMediaController_listProjectMedia_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["all","image","video"]}},{"name":"order","required":false,"in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","schema":{"maxLength":120,"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"maxLength":256,"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List project media","tags":["Project Media"]}},"/api/v1/projects/{projectId}/media/{mediaId}":{"patch":{"operationId":"ProjectMediaController_renameProjectMedia_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameProjectMediaDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Rename project media","tags":["Project Media"]},"delete":{"operationId":"ProjectMediaController_deleteProjectMedia_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-delete project media","tags":["Project Media"]},"get":{"operationId":"ProjectMediaController_getProjectMediaDetail_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get project media detail","tags":["Project Media"]}},"/api/v1/projects/{projectId}/media/bulk-delete":{"post":{"operationId":"ProjectMediaController_bulkDeleteProjectMedia_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteProjectMediaDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-delete project media in bulk","tags":["Project Media"]}},"/api/v1/projects/{projectId}/media/storage-usage":{"get":{"operationId":"ProjectMediaController_getStorageUsage_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get storage usage for the project team","tags":["Project Media"]}},"/api/v1/projects/{projectId}/media/upload-access":{"get":{"operationId":"ProjectMediaController_getUploadAccess_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Check upload permissions and quota","tags":["Project Media"]}},"/api/v1/projects/{projectId}/media/register":{"post":{"operationId":"ProjectMediaController_registerProjectMedia_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterProjectMediaDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Register media directly (bypasses upload queue)","tags":["Project Media"]}},"/api/v1/projects/{projectId}/context":{"get":{"operationId":"ProjectContextController_getContext_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectContextResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get project context with membership, permissions, and capabilities","tags":["Projects"]}},"/api/v1/teams/{teamId}/invitations":{"get":{"operationId":"InvitationsController_listInvitations_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search invitations by email address.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"default":"all","type":"string","enum":["all","active","pending","accepted","expired","revoked"]}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List team invitations","tags":["Invitations"]},"post":{"operationId":"InvitationsController_createInvitation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitationDto"}}}}},"security":[{"bearer":[]}],"summary":"Invite a new user to the team (creates an organization invitation)","tags":["Invitations"]}},"/api/v1/invitations/{invitationId}/accept":{"post":{"operationId":"InvitationsController_acceptInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Accept an invitation","tags":["Invitations"]}},"/api/v1/invitations/{invitationId}/revoke":{"post":{"operationId":"InvitationsController_revokeInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Revoke an invitation","tags":["Invitations"]}},"/api/v1/invitations/{invitationId}":{"delete":{"operationId":"InvitationsController_deleteInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Soft-delete an invitation","tags":["Invitations"]},"get":{"operationId":"InvitationLookupController_getInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationDetailResponseDto"}}}}},"summary":"Get invitation details (public, no auth required)","tags":["Invitations"]}},"/api/v1/invitations/{invitationId}/resend":{"post":{"operationId":"InvitationsController_resendInvitation_v1","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Resend an invitation","tags":["Invitations"]}},"/api/v1/admin/integrations":{"get":{"operationId":"AdminIntegrationsController_listIntegrations_v1","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by platform, account, team, or organization","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by integration status","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Filter by platform","schema":{"type":"string"}},{"name":"permissionState","required":false,"in":"query","description":"Filter by permission state","schema":{"type":"string","enum":["HEALTHY","MISSING_PERMISSIONS","UNKNOWN"]}},{"name":"organizationId","required":false,"in":"query","description":"Filter by organization","schema":{"type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Filter by team","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Filter by project","schema":{"type":"string"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include soft-deleted integrations","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminIntegrationsResponseDto"}}}}},"summary":"List admin integrations","tags":["Admin Integrations"]}},"/api/v1/admin/integrations/{integrationId}":{"get":{"operationId":"AdminIntegrationsController_getIntegrationDetail_v1","parameters":[{"name":"integrationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminIntegrationDetailResponseDto"}}}}},"summary":"Get admin integration detail","tags":["Admin Integrations"]}},"/api/v1/public/maintenance-status":{"get":{"operationId":"PublicMaintenanceStatusController_getStatus_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaintenanceStatusDto"}}}}},"summary":"Get the public maintenance status for the application shell","tags":["Public"]}},"/api/v1/admin/feedback/{id}":{"get":{"operationId":"FeedbackController_getFeedbackDetail_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get admin feedback detail","tags":["Admin Feedback"]}},"/api/v1/admin/feedback/{id}/screenshot-url":{"get":{"operationId":"FeedbackController_getScreenshotUrl_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Issue a short-lived private feedback screenshot URL","tags":["Admin Feedback"]}},"/api/v1/admin/feedback/{id}/triage":{"patch":{"operationId":"FeedbackController_updateTriageStatus_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeedbackTriageDto"}}}},"responses":{"200":{"description":""}},"summary":"Update feedback triage status","tags":["Admin Feedback"]}},"/api/v1/feedback":{"post":{"operationId":"FeedbackSubmissionController_submitFeedback_v1","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackDto"}}}},"responses":{"201":{"description":""}},"summary":"Submit customer feedback with an optional private screenshot","tags":["Feedback"]}},"/api/v1/feedback/{id}/screenshot":{"post":{"operationId":"FeedbackSubmissionController_retryScreenshot_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Retry a private screenshot attachment for an existing feedback report","tags":["Feedback"]}},"/api/v1/admin/demo-requests/{id}/status":{"patch":{"operationId":"DemoRequestsController_updateStatus_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDemoRequestStatusDto"}}}},"responses":{"200":{"description":""}},"summary":"Update demo request status","tags":["Admin Demo Requests"]}},"/api/v1/public/demo-requests":{"post":{"operationId":"PublicDemoRequestsController_create_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDemoRequestDto"}}}},"responses":{"201":{"description":""}},"summary":"Ingest a public demo request","tags":["Public Demo Requests"]}},"/api/v1/public/calendly-webhooks":{"post":{"operationId":"PublicCalendlyWebhooksController_handleWebhook_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendlyWebhookPayloadDto"}}}},"responses":{"200":{"description":""}},"summary":"Receive Calendly demo booking webhook deliveries","tags":["Public Calendly Webhooks"]}},"/api/v1/projects/{projectId}/posts":{"get":{"operationId":"PostsController_listProjectPosts_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"maxLength":120,"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["draft","scheduled","published"]}},{"name":"platform","required":false,"in":"query","schema":{"type":"string","enum":["instagram","facebook","youtube","google","tiktok","x","linkedin","pinterest","whatsapp","telegram","other"]}},{"name":"order","required":false,"in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"name":"cursor","required":false,"in":"query","schema":{"maxLength":1024,"type":"string"}},{"name":"productId","required":false,"in":"query","description":"Optional product id to filter posts by promoted product.","schema":{"maxLength":160,"nullable":true,"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectPostsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"List project posts","tags":["Posts"]},"post":{"operationId":"PostsController_createProjectPost_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerPostDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPostResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create a post","tags":["Posts"]}},"/api/v1/posts/{postId}":{"get":{"operationId":"PostsController_getPost_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPostResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get a post","tags":["Posts"]},"patch":{"operationId":"PostsController_updatePost_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerPostDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPostResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update a post","tags":["Posts"]},"delete":{"operationId":"PostsController_deletePost_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePostResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Soft-delete a post","tags":["Posts"]}},"/api/v1/posts/{postId}/analytics":{"get":{"operationId":"PostsController_getPostAnalytics_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}},{"name":"force","required":false,"in":"query","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAnalyticsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get post analytics","tags":["Posts"]}},"/api/v1/posts/{postId}/approval-history":{"get":{"operationId":"PostApprovalController_getApprovalHistory_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApprovalHistoryResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get post approval history","tags":["Post Approval"]}},"/api/v1/projects/{projectId}/approval-queue":{"get":{"operationId":"PostApprovalController_getApprovalQueue_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalQueueResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get project approval queue","tags":["Post Approval"]}},"/api/v1/posts/{postId}/submit-for-approval":{"post":{"operationId":"PostApprovalController_submitForApproval_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitForApprovalDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Submit a post for approval","tags":["Post Approval"]}},"/api/v1/posts/{postId}/withdraw-submission":{"post":{"operationId":"PostApprovalController_withdrawSubmission_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawSubmissionDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Withdraw a post approval submission","tags":["Post Approval"]}},"/api/v1/posts/{postId}/approve":{"post":{"operationId":"PostApprovalController_approve_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovePostDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Approve a post","tags":["Post Approval"]}},"/api/v1/posts/{postId}/reject":{"post":{"operationId":"PostApprovalController_reject_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectPostDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Reject a post","tags":["Post Approval"]}},"/api/v1/posts/{postId}/request-changes":{"post":{"operationId":"PostApprovalController_requestChanges_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestChangesDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Request changes for a post","tags":["Post Approval"]}},"/api/v1/internal/publishing/posts":{"post":{"operationId":"InternalPublishingController_createPost_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostDto"}}}},"responses":{"201":{"description":""}},"summary":"Create a post record (internal testing only)","tags":["Publishing (Internal)"]},"get":{"operationId":"InternalPublishingController_listPosts_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["DRAFT","SCHEDULED","PUBLISHED","DELETED"]}},{"name":"includeDeleted","required":false,"in":"query","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":""}},"summary":"List posts by team/project (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/posts/{postId}":{"get":{"operationId":"InternalPublishingController_getPost_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get a post by id (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs":{"post":{"operationId":"InternalPublishingController_createPublishJob_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublishJobDto"}}}},"responses":{"201":{"description":""}},"summary":"Create a publish job (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}":{"get":{"operationId":"InternalPublishingController_getPublishJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get a publish job by id (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/status":{"patch":{"operationId":"InternalPublishingController_markPublishJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPublishJobStatusDto"}}}},"responses":{"200":{"description":""}},"summary":"Update publish job status (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/attempts":{"post":{"operationId":"InternalPublishingController_recordPublishAttempt_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPublishAttemptDto"}}}},"responses":{"201":{"description":""}},"summary":"Record a publish attempt (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/failures":{"post":{"operationId":"InternalPublishingController_recordPublishFailure_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPublishFailureDto"}}}},"responses":{"201":{"description":""}},"summary":"Record a publish failure (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/posts/{postId}/events":{"post":{"operationId":"InternalPublishingController_appendPublishEvent_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendPublishEventDto"}}}},"responses":{"201":{"description":""}},"summary":"Append a publish event (internal testing only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/posts/{postId}/integrations":{"post":{"operationId":"InternalPublishingController_addPostIntegration_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPostIntegrationDto"}}}},"responses":{"201":{"description":""}},"summary":"Add a post integration target (internal only)","tags":["Publishing (Internal)"]},"get":{"operationId":"InternalPublishingController_listPostIntegrations_v1","parameters":[{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List post integration targets (internal only)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/schedule":{"post":{"operationId":"InternalPublishingController_schedulePublishJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePublishJobDto"}}}},"responses":{"201":{"description":""}},"summary":"Schedule a publish job for future execution","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/cancel-schedule":{"post":{"operationId":"InternalPublishingController_cancelPublishSchedule_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Cancel an active publish schedule","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/cancel":{"post":{"operationId":"InternalPublishingController_cancelPublishJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelPublishJobDto"}}}},"responses":{"201":{"description":""}},"summary":"Cancel a queued, scheduled, or retrying publish job","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/reschedule":{"post":{"operationId":"InternalPublishingController_reschedulePublishJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReschedulePublishJobDto"}}}},"responses":{"201":{"description":""}},"summary":"Reschedule a publish job","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/sweeper/run-once":{"post":{"operationId":"InternalPublishingController_runPublishingSweeperOnce_v1","parameters":[],"responses":{"201":{"description":""}},"summary":"Run the publishing sweeper once","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing/jobs/{jobId}/execute-once":{"post":{"operationId":"InternalPublishingController_executePublishJobOnce_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Execute a publish job once via the orchestrator (internal testing)","tags":["Publishing (Internal)"]}},"/api/v1/internal/publishing-reliability-metrics":{"get":{"operationId":"PublishingReliabilityMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get publishing reliability metrics","tags":["Publishing Reliability Metrics"]}},"/api/v1/internal/publishing/diagnostics":{"get":{"operationId":"PublishingDiagnosticsController_getDiagnostics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get publishing queue diagnostics","tags":["Publishing Diagnostics (Internal)"]}},"/api/v1/internal/media/{mediaId}/resolve":{"get":{"operationId":"InternalMediaResolutionController_resolveMedia_v1","parameters":[{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}},{"name":"maxFileSizeBytes","required":true,"in":"query","schema":{"type":"string"}},{"name":"maxDurationSeconds","required":true,"in":"query","schema":{"type":"string"}},{"name":"minDurationSeconds","required":true,"in":"query","schema":{"type":"string"}},{"name":"minAspectRatio","required":true,"in":"query","schema":{"type":"string"}},{"name":"maxAspectRatio","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Resolve a media asset to a downloadable URL and validation metadata","tags":["Media Resolution (Internal)"]}},"/api/v1/media/probe":{"post":{"description":"Use this to validate media against platform constraints before publish.","operationId":"MediaProbeController_probe_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaProbeDto"}}}},"responses":{"200":{"description":"Probe result."},"400":{"description":"Invalid request."},"413":{"description":"Remote file too large."},"422":{"description":"Media is unsupported or unprocessable."},"500":{"description":"Internal error."},"502":{"description":"Remote media/tooling failure."},"504":{"description":"Remote media fetch timed out."}},"summary":"Probe a remote media URL (duration, dimensions, codecs).","tags":["media"]}},"/api/v1/media/thumbnail":{"post":{"description":"Returns a small thumbnail suitable for UI. For publish-grade thumbnails, request a larger width.","operationId":"MediaProbeController_thumbnail_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaThumbnailDto"}}}},"responses":{"200":{"description":"Thumbnail result."},"400":{"description":"Invalid request."},"413":{"description":"Remote file too large."},"422":{"description":"Media is unsupported or unprocessable."},"500":{"description":"Internal error."},"502":{"description":"Remote media/tooling failure."},"504":{"description":"Remote media fetch timed out."}},"summary":"Generate a thumbnail (base64) for a remote media URL.","tags":["media"]}},"/api/v1/internal/publishing-queue-metrics":{"get":{"operationId":"PublishingQueueMetricsController_getMetrics_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get publishing queue and scheduler metrics","tags":["Publishing Queue Metrics"]}},"/api/v1/projects/{projectId}/posts/{postId}/publish-jobs":{"get":{"operationId":"CustomerPublishingController_listPublishJobs_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPublishJobsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"List publish jobs for a post","tags":["Publishing"]}},"/api/v1/projects/{projectId}/posts/{postId}/publish":{"post":{"operationId":"CustomerPublishingController_publishNow_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Publish a post immediately","tags":["Publishing"]}},"/api/v1/projects/{projectId}/posts/{postId}/schedule":{"post":{"operationId":"CustomerPublishingController_schedulePost_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"postId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePostRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Schedule a post for future publication","tags":["Publishing"]}},"/api/v1/projects/{projectId}/posts/{postId}/publish-jobs/{jobId}/cancel":{"post":{"operationId":"CustomerPublishingController_cancelPublishJob_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"postId","required":true,"in":"path","schema":{"type":"string"}},{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelPublishJobRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Cancel a publish job","tags":["Publishing"]}},"/api/v1/projects/{projectId}/posts/{postId}/publish-jobs/{jobId}/reschedule":{"post":{"operationId":"CustomerPublishingController_reschedulePublishJob_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"postId","required":true,"in":"path","schema":{"type":"string"}},{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReschedulePublishJobRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Reschedule a publish job","tags":["Publishing"]}},"/api/v1/projects/{projectId}/calendar-posts":{"get":{"operationId":"PublishingCalendarController_getCalendarPosts_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"start","required":true,"in":"query","description":"ISO 8601 start datetime (inclusive)","schema":{"type":"string"}},{"name":"end","required":true,"in":"query","description":"ISO 8601 end datetime (inclusive)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarPostListResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get calendar posts within a date range","tags":["Publishing"]}},"/api/v1/projects/{projectId}/scheduled-posts":{"get":{"operationId":"PublishingCalendarController_getLatestScheduledPosts_v1","parameters":[{"name":"projectId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of posts (1-50, default 10)","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarPostListResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get latest scheduled posts","tags":["Publishing"]}},"/api/v1/products/{productId}/media":{"get":{"operationId":"ProductMediaController_listProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List product media","tags":["Product Media"]},"post":{"operationId":"ProductMediaController_registerProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSingleProductMediaDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Register product media","tags":["Product Media"]}},"/api/v1/products/{productId}/media/{mediaId}":{"patch":{"operationId":"ProductMediaController_updateProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductMediaDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update product media metadata","tags":["Product Media"]},"delete":{"operationId":"ProductMediaController_deleteProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete product media","tags":["Product Media"]}},"/api/v1/products/{productId}/media/reorder":{"put":{"operationId":"ProductMediaController_reorderProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderProductMediaDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Reorder product media","tags":["Product Media"]}},"/api/v1/products/{productId}/media/{mediaId}/primary":{"post":{"operationId":"ProductMediaController_setPrimaryProductMedia_v1","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mediaId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Set product media as primary","tags":["Product Media"]}},"/api/v1/teams/{teamId}/products":{"get":{"operationId":"ProductsController_listProducts_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductsResponseDto"}}}}},"summary":"List products with cursor pagination","tags":["Products"]},"post":{"operationId":"ProductsController_createProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Create a product","tags":["Products"]}},"/api/v1/teams/{teamId}/products/export":{"get":{"operationId":"ProductsController_exportCSV_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Export products as CSV","tags":["Products"]}},"/api/v1/teams/{teamId}/products/{productId}":{"get":{"operationId":"ProductsController_getProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Get product detail","tags":["Products"]},"patch":{"operationId":"ProductsController_updateProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Update a product","tags":["Products"]},"delete":{"operationId":"ProductsController_deleteProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Soft-delete a product","tags":["Products"]}},"/api/v1/teams/{teamId}/products/import":{"post":{"operationId":"ProductsController_importProducts_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProductsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProductsResponseDto"}}}}},"summary":"Import products from CSV data","tags":["Products"]}},"/api/v1/teams/{teamId}/products/bulk/delete":{"post":{"operationId":"ProductsController_bulkDelete_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteProductsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteProductsResponseDto"}}}}},"summary":"Bulk delete products","tags":["Products"]}},"/api/v1/teams/{teamId}/products/bulk/update":{"post":{"operationId":"ProductsController_bulkUpdate_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateProductsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateProductsResponseDto"}}}}},"summary":"Bulk update products (status/visibility)","tags":["Products"]}},"/api/v1/teams/{teamId}/products/{productId}/duplicate":{"post":{"operationId":"ProductsController_duplicateProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Duplicate a product","tags":["Products"]}},"/api/v1/teams/{teamId}/products/{productId}/inventory":{"post":{"operationId":"ProductsController_adjustInventory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustInventoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Adjust product inventory","tags":["Products"]}},"/api/v1/teams/{teamId}/products/{productId}/restore":{"post":{"operationId":"ProductsController_restoreProduct_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}}},"summary":"Restore a soft-deleted product","tags":["Products"]}},"/api/v1/teams/{teamId}/categories":{"get":{"operationId":"ProductCategoriesController_listCategories_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductCategoryResponseDto"}}}}}},"summary":"List all categories for a team","tags":["Product Categories"]},"post":{"operationId":"ProductCategoriesController_createCategory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCategoryResponseDto"}}}}},"summary":"Create a category","tags":["Product Categories"]}},"/api/v1/teams/{teamId}/categories/children":{"get":{"operationId":"ProductCategoriesController_getChildrenCategories_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"parentId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductCategoryResponseDto"}}}}}},"summary":"Get child categories by parent","tags":["Product Categories"]}},"/api/v1/teams/{teamId}/categories/{categoryId}":{"get":{"operationId":"ProductCategoriesController_getCategory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCategoryResponseDto"}}}}},"summary":"Get category by ID","tags":["Product Categories"]},"patch":{"operationId":"ProductCategoriesController_updateCategory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCategoryResponseDto"}}}}},"summary":"Update a category","tags":["Product Categories"]},"delete":{"operationId":"ProductCategoriesController_deleteCategory_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"categoryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete a category","tags":["Product Categories"]}},"/api/v1/teams/{teamId}/categories/reconcile":{"post":{"operationId":"ProductCategoriesController_reconcileCategories_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileCategoriesResponseDto"}}}}},"summary":"Reconcile category product and child counts","tags":["Product Categories"]}},"/api/v1/teams/{teamId}/activity-logs":{"get":{"operationId":"ActivityLogsController_list_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor for cursor-based pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"default":50,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search text in action or details","schema":{"type":"string"}},{"name":"action","required":false,"in":"query","description":"Filter by action type (e.g. post_created)","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","description":"Filter by platform","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLogListResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"List activity logs for a team","tags":["Activity Logs"]}},"/api/v1/teams/{teamId}/activity-logs/users/{userId}/summary":{"get":{"operationId":"ActivityLogsController_getUserSummary_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get activity breakdown for a user in a team","tags":["Activity Logs"]}},"/api/v1/teams/{teamId}/activity-logs/users/{userId}/recent":{"get":{"operationId":"ActivityLogsController_getUserRecent_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get 5 most recent activities for a user in a team","tags":["Activity Logs"]}},"/api/v1/realtime/teams/{teamId}/events":{"get":{"operationId":"RealtimeEventsController_events_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["RealtimeEvents"]}},"/api/v1/realtime/admin/events":{"get":{"operationId":"RealtimeEventsController_adminEvents_v1","parameters":[],"responses":{"200":{"description":""}},"tags":["RealtimeEvents"]}},"/api/v1/agent-runtime/process-message":{"post":{"operationId":"RuntimeCoordinatorController_processMessage_v1","parameters":[],"responses":{"200":{"description":""}},"tags":["RuntimeCoordinator"]}},"/api/v1/teams/{teamId}/business-profile":{"get":{"operationId":"BusinessProfilesController_getProfile_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Business profile for the team, or null when not configured","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BusinessProfileResponseDto"},{"type":"null"}]}}}}},"security":[{"bearer":[]}],"summary":"Get business profile for a team","tags":["Business Profiles"]},"put":{"operationId":"BusinessProfilesController_upsertProfile_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBusinessProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create or update business profile (upsert)","tags":["Business Profiles"]}},"/api/v1/teams/{teamId}/business-profile/toggle":{"patch":{"operationId":"BusinessProfilesController_toggleProfile_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleBusinessProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Toggle business profile enabled status","tags":["Business Profiles"]}},"/api/v1/teams/{teamId}/business-profile/status":{"get":{"operationId":"BusinessProfilesController_getProfileStatus_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfileStatusResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Get business profile existence status (shell)","tags":["Business Profiles"]}},"/api/v1/draft-orders":{"post":{"operationId":"DraftOrdersController_create_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftOrderDto"}}}},"responses":{"201":{"description":""}},"tags":["Draft Orders"]}},"/api/v1/draft-orders/{id}":{"get":{"operationId":"DraftOrdersController_findById_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Draft Orders"]}},"/api/v1/draft-orders/{id}/items":{"post":{"operationId":"DraftOrdersController_addItem_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDraftOrderItemDto"}}}},"responses":{"201":{"description":""}},"tags":["Draft Orders"]}},"/api/v1/draft-orders/{id}/items/{itemId}":{"delete":{"operationId":"DraftOrdersController_removeItem_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"itemId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Draft Orders"]},"patch":{"operationId":"DraftOrdersController_updateItem_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"itemId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftOrderItemDto"}}}},"responses":{"200":{"description":""}},"tags":["Draft Orders"]}},"/api/v1/draft-orders/{id}/complete":{"post":{"operationId":"DraftOrdersController_complete_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Draft Orders"]}},"/api/v1/internal/draft-orders":{"post":{"operationId":"InternalDraftOrdersController_createForAgent_v1","parameters":[],"responses":{"201":{"description":""}},"tags":["Internal Draft Orders"]}},"/api/v1/internal/draft-orders/{id}/items":{"post":{"operationId":"InternalDraftOrdersController_addItemForAgent_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDraftOrderItemDto"}}}},"responses":{"201":{"description":""}},"tags":["Internal Draft Orders"]}},"/api/v1/internal/draft-orders/{id}/complete":{"post":{"operationId":"InternalDraftOrdersController_completeForAgent_v1","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Internal Draft Orders"]}},"/api/v1/internal/draft-orders/team/{teamId}":{"get":{"operationId":"InternalDraftOrdersController_findByTeamId_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Internal Draft Orders"]}},"/api/v1/internal/draft-orders/thread/{threadId}":{"get":{"operationId":"InternalDraftOrdersController_findByThreadId_v1","parameters":[{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Internal Draft Orders"]}},"/api/v1/automations/{teamId}":{"get":{"operationId":"AutomationController_listAutomations_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"triggerType","required":false,"in":"query","schema":{"type":"string","enum":["COMMENT","DM"]}},{"name":"isEnabled","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"includeArchived","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"projectId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAutomationsDto"}}}}},"security":[{"bearer":[]}],"summary":"List automations for a team","tags":["Automations"]},"post":{"operationId":"AutomationController_createAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"projectId","required":true,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an automation","tags":["Automations"]}},"/api/v1/automations/{teamId}/limits":{"get":{"operationId":"AutomationController_getLimits_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationLimitsDto"}}}}},"security":[{"bearer":[]}],"summary":"Get automation plan limits for a team","tags":["Automations"]}},"/api/v1/automations/{teamId}/{automationId}":{"get":{"operationId":"AutomationController_getAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Get automation detail","tags":["Automations"]},"patch":{"operationId":"AutomationController_updateAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutomationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Update an automation","tags":["Automations"]},"delete":{"operationId":"AutomationController_deleteAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete (archive) an automation","tags":["Automations"]}},"/api/v1/automations/{teamId}/{automationId}/enable":{"post":{"operationId":"AutomationController_enableAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Enable an automation","tags":["Automations"]}},"/api/v1/automations/{teamId}/{automationId}/disable":{"post":{"operationId":"AutomationController_disableAutomation_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationDetailDto"}}}}},"security":[{"bearer":[]}],"summary":"Disable an automation","tags":["Automations"]}},"/api/v1/automations/{teamId}/{automationId}/runs":{"get":{"operationId":"AutomationController_listExecutionRuns_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExecutionRunsDto"}}}}},"security":[{"bearer":[]}],"summary":"List execution runs for an automation","tags":["Automations"]}},"/api/v1/automations/{teamId}/{automationId}/preflight":{"post":{"description":"Dry-run simulation of an automation. Evaluates trigger conditions, builds an execution plan preview, and returns step-by-step diagnostics. Never enqueues real jobs or sends messages.","operationId":"AutomationController_preflight_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResultDto"}}}}},"security":[{"bearer":[]}],"summary":"Run automation preflight/simulation test","tags":["Automations"]}},"/api/v1/automations/{teamId}/operations/metrics":{"get":{"operationId":"AutomationOperationsController_getExecutionMetrics_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"automationId","required":false,"in":"query","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionMetricsDto"}}}}},"security":[{"bearer":[]}],"summary":"Get execution metrics for automations","tags":["Automation Operations"]}},"/api/v1/automations/{teamId}/operations/failures":{"get":{"operationId":"AutomationOperationsController_getFailures_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":25,"type":"number"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFailuresDto"}}}}},"security":[{"bearer":[]}],"summary":"Get recent automation execution failures","tags":["Automation Operations"]}},"/api/v1/automations/{teamId}/operations/runs/{runId}/timeline":{"get":{"operationId":"AutomationOperationsController_getTimeline_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionTimelineDto"}}}}},"security":[{"bearer":[]}],"summary":"Get execution timeline for a specific run","tags":["Automation Operations"]}},"/api/v1/automations/{teamId}/operations/runs/{runId}/retry":{"post":{"operationId":"AutomationOperationsController_retryExecution_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationalCommandResultDto"}}}}},"security":[{"bearer":[]}],"summary":"Retry a failed execution run","tags":["Automation Operations"]}},"/api/v1/automations/{teamId}/operations/runs/{runId}/cancel":{"post":{"operationId":"AutomationOperationsController_cancelExecution_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationalCommandResultDto"}}}}},"security":[{"bearer":[]}],"summary":"Cancel a queued execution run","tags":["Automation Operations"]}},"/api/v1/automations/{teamId}/operations/runs/{runId}/requeue":{"post":{"operationId":"AutomationOperationsController_requeueExecution_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationalCommandResultDto"}}}}},"security":[{"bearer":[]}],"summary":"Requeue a failed execution run (reset and re-enqueue)","tags":["Automation Operations"]}},"/api/v1/ai/dm-stt/enqueue":{"post":{"operationId":"DMSttController_enqueue_v1","parameters":[],"responses":{"202":{"description":"Job queued."},"401":{"description":"Invalid or missing internal API key."}},"summary":"Queue DM audio for transcription","tags":["internal"]}},"/api/v1/ai/dm-stt/callback":{"post":{"operationId":"DMSttController_callback_v1","parameters":[],"responses":{"200":{"description":"Callback forwarded."},"401":{"description":"Invalid or missing internal API key."}},"summary":"Process DM STT callbacks into Backend V2 automation ingress","tags":["internal"]}},"/api/v1/ads/campaigns":{"get":{"operationId":"AdsController_listCampaigns_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","schema":{"type":"string","enum":["meta","google","tiktok","linkedin","all"]}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["draft","pending","active","paused","completed","all"]}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}},{"name":"includePerformance","required":false,"in":"query","description":"Include aggregate performance for each campaign","schema":{"type":"boolean"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List ad campaigns for a team","tags":["Ads"]}},"/api/v1/ads/teams/{teamId}/campaigns":{"post":{"operationId":"AdsController_createCampaign_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdCampaignDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an ad campaign","tags":["Ads"]}},"/api/v1/ads/teams/{teamId}/campaigns/launch":{"post":{"operationId":"AdsController_launchCampaign_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdCampaignDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchAdCampaignResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an ad campaign and push it to the external ad platform","tags":["Ads"]}},"/api/v1/ads/campaigns/{campaignId}":{"get":{"operationId":"AdsController_getCampaign_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Epoch ms range start","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"Epoch ms range end","schema":{"type":"number"}},{"name":"includePerformance","required":false,"in":"query","description":"Join aggregate performance metrics","schema":{"type":"boolean"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get an ad campaign (optionally with performance)","tags":["Ads"]},"patch":{"operationId":"AdsController_updateCampaign_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdCampaignDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update an ad campaign","tags":["Ads"]},"delete":{"operationId":"AdsController_removeCampaign_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Delete an ad campaign and its creatives","tags":["Ads"]}},"/api/v1/ads/campaigns/{campaignId}/pause":{"post":{"operationId":"AdsController_pauseCampaign_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Pause an ad campaign (syncs to platform)","tags":["Ads"]}},"/api/v1/ads/campaigns/{campaignId}/activate":{"post":{"operationId":"AdsController_activateCampaign_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Activate an ad campaign (syncs to platform)","tags":["Ads"]}},"/api/v1/ads/campaigns/{campaignId}/creatives":{"get":{"operationId":"AdsController_listCampaignCreatives_v1","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List creatives for a campaign","tags":["Ads"]}},"/api/v1/ads/teams/{teamId}/creatives":{"get":{"operationId":"AdsController_listTeamCreatives_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List creatives across a team","tags":["Ads"]}},"/api/v1/ads/creatives":{"post":{"operationId":"AdsController_createCreative_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdCreativeDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCreativeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Create an ad creative","tags":["Ads"]}},"/api/v1/ads/creatives/{creativeId}":{"patch":{"operationId":"AdsController_updateCreative_v1","parameters":[{"name":"creativeId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdCreativeDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCreativeResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Update an ad creative","tags":["Ads"]},"delete":{"operationId":"AdsController_removeCreative_v1","parameters":[{"name":"creativeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCampaignActionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Delete an ad creative","tags":["Ads"]}},"/api/v1/ads/creatives/generate-copy":{"post":{"operationId":"AdsController_generateCreativeCopy_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAdCreativeCopyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAdCreativeCopyResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Generate ad creative copy with AI","tags":["Ads"]}},"/api/v1/ads/performance/aggregated":{"get":{"operationId":"AdsController_getAggregatedMetrics_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"campaignId","required":false,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","schema":{"type":"string","enum":["meta","google","tiktok","linkedin"]}},{"name":"startDate","required":false,"in":"query","description":"Epoch ms range start","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"Epoch ms range end","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get aggregated ad metrics for a team/campaign","tags":["Ads"]}},"/api/v1/ads/performance/daily-trend":{"get":{"operationId":"AdsController_getDailyTrend_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"campaignId","required":false,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","schema":{"type":"string","enum":["meta","google","tiktok","linkedin"]}},{"name":"startDate","required":false,"in":"query","description":"Epoch ms range start","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"Epoch ms range end","schema":{"type":"number"}},{"name":"days","required":false,"in":"query","schema":{"default":30,"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get daily performance trend","tags":["Ads"]}},"/api/v1/ads/performance/campaigns":{"get":{"operationId":"AdsController_getCampaignsPerformance_v1","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}},{"name":"campaignId","required":false,"in":"query","schema":{"type":"string"}},{"name":"platform","required":false,"in":"query","schema":{"type":"string","enum":["meta","google","tiktok","linkedin"]}},{"name":"startDate","required":false,"in":"query","description":"Epoch ms range start","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"Epoch ms range end","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get per-campaign performance breakdown","tags":["Ads"]}},"/api/v1/ads/teams/{teamId}/sync-status":{"get":{"operationId":"AdsController_getSyncStatus_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get last external performance sync status","tags":["Ads"]}},"/api/v1/ads/teams/{teamId}/settings":{"get":{"operationId":"AdsController_getSettings_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get ad automation/AI settings for a team","tags":["Ads"]},"post":{"operationId":"AdsController_saveSettings_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAdSettingsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdSettingsResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Save ad automation/AI settings for a team","tags":["Ads"]}},"/api/v1/teams/{teamId}/analytics":{"get":{"operationId":"TeamAnalyticsController_getTeamAnalytics_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date as epoch milliseconds","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"End date as epoch milliseconds","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAnalyticsResponseDto"}}}}},"summary":"Get team analytics dashboard data","tags":["Team Analytics"]}},"/api/v1/teams/{teamId}/attribution/summary":{"get":{"operationId":"TeamAnalyticsController_getTeamAttributionSummary_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date as epoch milliseconds","schema":{"type":"number"}},{"name":"endDate","required":false,"in":"query","description":"End date as epoch milliseconds","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAttributionSummaryResponseDto"}}}}},"summary":"Get team attribution summary","tags":["Team Analytics"]}},"/api/v1/me/account-deletion":{"get":{"operationId":"AccountDeletionController_getStatus_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionStatusDto"}}}}},"security":[{"bearer":[]}],"summary":"Get the authenticated account deletion status","tags":["Account deletion"]}},"/api/v1/me/account-deletion/request":{"post":{"operationId":"AccountDeletionController_request_v1","parameters":[],"responses":{"202":{"description":""}},"security":[{"bearer":[]}],"summary":"Request account deletion email confirmation","tags":["Account deletion"]}},"/api/v1/account-deletion/confirm":{"post":{"operationId":"PublicAccountDeletionController_confirm_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionTokenDto"}}}},"responses":{"200":{"description":""}},"summary":"Confirm a deletion request email token","tags":["Account deletion"]}},"/api/v1/account-deletion/cancel":{"post":{"operationId":"PublicAccountDeletionController_cancel_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionTokenDto"}}}},"responses":{"200":{"description":""}},"summary":"Cancel a scheduled deletion using its email token","tags":["Account deletion"]}},"/api/v1/media/delete":{"post":{"operationId":"DeleteController_delete_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMediaDto"}}}},"responses":{"201":{"description":""}},"tags":["Delete"]}},"/api/v1/admin/trust-safety/overview":{"get":{"operationId":"TrustSafetyController_getOverview_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get Trust & Safety incident overview","tags":["Admin Trust & Safety"]}},"/api/v1/admin/trust-safety/incidents":{"get":{"operationId":"TrustSafetyController_listIncidents_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"List Trust & Safety incidents","tags":["Admin Trust & Safety"]}},"/api/v1/admin/trust-safety/incidents/{incidentId}":{"get":{"operationId":"TrustSafetyController_getIncident_v1","parameters":[{"name":"incidentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get Trust & Safety incident detail","tags":["Admin Trust & Safety"]}},"/api/v1/admin/trust-safety/incidents/{incidentId}/status":{"patch":{"operationId":"TrustSafetyController_updateStatus_v1","parameters":[{"name":"incidentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAbuseIncidentStatusDto"}}}},"responses":{"200":{"description":""}},"summary":"Update a Trust & Safety incident status","tags":["Admin Trust & Safety"]}},"/api/v1/admin/trust-safety/incidents/{incidentId}/actions":{"post":{"operationId":"TrustSafetyController_executeAction_v1","parameters":[{"name":"incidentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteAbuseResponseActionDto"}}}},"responses":{"201":{"description":""}},"summary":"Execute an audited Trust & Safety response action","tags":["Admin Trust & Safety"]}},"/api/v1/admin/intelligence/overview":{"get":{"operationId":"AdminIntelligenceController_overview_v1","parameters":[],"responses":{"200":{"description":""}},"summary":"Get the Admin Intelligence platform overview","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/needs-attention":{"get":{"operationId":"AdminIntelligenceController_attention_v1","parameters":[{"name":"limit","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List actionable platform attention items","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/timeline/{entityType}/{entityId}":{"get":{"operationId":"AdminIntelligenceController_timeline_v1","parameters":[{"name":"entityType","required":true,"in":"path","schema":{"type":"string"}},{"name":"entityId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get a metadata-only entity investigation timeline","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/alerts/{alertId}":{"get":{"operationId":"AdminIntelligenceController_alert_v1","parameters":[{"name":"alertId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get operational alert detail, ownership, and lifecycle evidence","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/incidents/{incidentId}":{"get":{"operationId":"AdminIntelligenceController_incident_v1","parameters":[{"name":"incidentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get Trust & Safety incident detail and safe causal evidence","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/customers/{subjectType}/{subjectId}":{"get":{"operationId":"AdminIntelligenceController_customer_v1","parameters":[{"name":"subjectType","required":true,"in":"path","schema":{"type":"string"}},{"name":"subjectId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get a metadata-only customer 360 view","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/investigations":{"post":{"operationId":"AdminIntelligenceController_investigate_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminInvestigationDto"}}}},"responses":{"201":{"description":""}},"summary":"Create a citation-backed read-only Admin investigation","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/action-proposals":{"post":{"operationId":"AdminIntelligenceController_createProposal_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminActionProposalDto"}}}},"responses":{"201":{"description":""}},"summary":"Create a high-impact Admin action proposal","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/action-proposals/{proposalId}/review":{"patch":{"operationId":"AdminIntelligenceController_reviewProposal_v1","parameters":[{"name":"proposalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAdminActionProposalDto"}}}},"responses":{"200":{"description":""}},"summary":"Approve or reject another Admin action proposal","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/action-proposals/{proposalId}/execute":{"post":{"operationId":"AdminIntelligenceController_executeProposal_v1","parameters":[{"name":"proposalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Execute an approved Admin action proposal","tags":["Admin Intelligence"]}},"/api/v1/admin/intelligence/launch-alerts/test":{"post":{"operationId":"AdminIntelligenceController_sendLaunchAlertTest_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendLaunchAlertTestDto"}}}},"responses":{"201":{"description":""}},"summary":"Send a test launch-critical alert notification","tags":["Admin Intelligence"]}},"/api/v1/media/stock/search":{"get":{"description":"Provider-neutral endpoint for Pexels/Unsplash image and video search.","operationId":"StockMediaController_search_v1","parameters":[{"name":"provider","required":false,"in":"query","schema":{"type":"string","enum":["pexels","unsplash"]}},{"name":"query","required":false,"in":"query","description":"Search term. Empty string returns curated/popular results.","schema":{"maxLength":200,"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}},{"name":"perPage","required":false,"in":"query","schema":{"minimum":1,"maximum":80,"type":"number"}},{"name":"type","required":false,"in":"query","description":"Only used for Pexels. Unsplash only returns photos.","schema":{"type":"string","enum":["photos","videos"]}}],"responses":{"200":{"description":"Stock media results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMediaSearchResponseDto"}}}},"400":{"description":"Invalid query parameters."},"401":{"description":"Unauthorized."},"429":{"description":"Provider rate limit."},"500":{"description":"Internal / provider not configured."},"502":{"description":"Provider error."},"504":{"description":"Provider timeout."}},"security":[{"bearer":[]}],"summary":"Search stock media from Pexels or Unsplash","tags":["media"]}},"/api/v1/media/upload/authorize":{"post":{"operationId":"UploadAuthorizationController_authorizeUpload_v1","parameters":[],"responses":{"201":{"description":""}},"tags":["UploadAuthorization"]}},"/api/v1/media/upload":{"post":{"operationId":"UploadController_uploadFile_v1","parameters":[],"responses":{"201":{"description":""}},"tags":["Upload"]}},"/api/v1/media/upload/job-status/{jobId}":{"get":{"operationId":"UploadController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a media upload job","tags":["Upload"]}},"/api/v1/media/upload/batch-job-status":{"get":{"operationId":"UploadController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","description":"Team scope for upload status authorization","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple media upload jobs","tags":["Upload"]}},"/api/v1/media/upload/cancel/{jobId}":{"post":{"operationId":"UploadController_cancelUploadJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Request cancellation for an active media upload job","tags":["Upload"]}},"/api/v1/media/product/upload":{"post":{"operationId":"UploadProductController_uploadFiles_v1","parameters":[],"responses":{"201":{"description":""}},"tags":["UploadProduct"]}},"/api/v1/media/product/upload/job-status/{jobId}":{"get":{"operationId":"UploadProductController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a media upload job","tags":["UploadProduct"]}},"/api/v1/media/product/upload/batch-job-status":{"get":{"operationId":"UploadProductController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","description":"Team scope for upload status authorization","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple media upload jobs","tags":["UploadProduct"]}},"/api/v1/media/product/upload/cancel/{jobId}":{"post":{"operationId":"UploadProductController_cancelUploadJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Request cancellation for an active product media upload job","tags":["UploadProduct"]}},"/api/v1/media/download":{"post":{"operationId":"DownloadController_createZip_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadZipDto"}}}},"responses":{"201":{"description":""}},"tags":["Download"]}},"/api/v1/video/resize":{"post":{"operationId":"VideoResizeController_queueVideoConversion_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"videoUrl":{"type":"string","format":"url"},"userId":{"type":"string","format":"url"},"ownerId":{"type":"string","format":"url"},"teamId":{"type":"string","format":"url"},"projectId":{"type":"string","format":"url"},"type":{"type":"string","enum":["portrait","landscape","square","widescreen","custom"],"default":"portrait"},"mode":{"type":"string","enum":["letterbox","crop","resize"],"default":"letterbox"},"quality":{"type":"string","enum":["low","medium","high"],"default":"medium"},"optimizeForInstagram":{"type":"boolean","default":true},"targetWidth":{"type":"number","description":"Only used for resize mode"},"targetHeight":{"type":"number","description":"Only used for resize mode"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a video for conversion to Instagram Reels format","tags":["video"]}},"/api/v1/video/job-status/{jobId}":{"get":{"operationId":"VideoResizeController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a video conversion job","tags":["video"]}},"/api/v1/video/batch-job-status":{"get":{"operationId":"VideoResizeController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple video conversion jobs","tags":["video"]}},"/api/v1/video/cancel/{jobId}":{"post":{"operationId":"VideoResizeController_cancelJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Cancel a queued or active video conversion job","tags":["video"]}},"/api/v1/media/trim":{"post":{"description":"Starts a background job to trim a video based on start and end times","operationId":"VideoTrimController_trimVideo_v1","parameters":[],"requestBody":{"required":true,"description":"Video trim parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoTrimDto"}}}},"responses":{"200":{"description":"Video trim job queued successfully","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","description":"Unique job identifier","example":"550e8400-e29b-41d4-a716-446655440000"},"statusUrl":{"type":"string","description":"URL to check job status","example":"/api/v1/media/trim/job-status/550e8400-e29b-41d4-a716-446655440000"},"message":{"type":"string","description":"Success message","example":"Video trim job queued successfully"}}}}}},"400":{"description":"Invalid request parameters"},"401":{"description":"Unauthorized"}},"summary":"Queue a video for trimming","tags":["media"]}},"/api/v1/media/trim/job-status/{jobId}":{"get":{"description":"Returns the current status and progress of a video trim job","operationId":"VideoTrimController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"Job ID returned from the trim endpoint","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}}],"responses":{"200":{"description":"Job status retrieved successfully"},"404":{"description":"Job not found"}},"summary":"Check the status of a video trim job","tags":["media"]}},"/api/v1/media/trim/cancel/{jobId}":{"post":{"operationId":"VideoTrimController_cancelTrimJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Cancel a queued or active video trim job","tags":["media"]}},"/api/v1/image/resize":{"post":{"operationId":"ImageResizeController_queueVideoConversion_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","format":"url"},"userId":{"type":"string","format":"url"},"ownerId":{"type":"string","format":"url"},"teamId":{"type":"string","format":"url"},"projectId":{"type":"string","format":"url"},"type":{"type":"string","enum":["portrait","landscape","square","widescreen","custom"],"default":"portrait"},"mode":{"type":"string","enum":["letterbox","crop","resize"],"default":"letterbox"},"quality":{"type":"string","enum":["low","medium","high"],"default":"medium"},"optimizeForInstagram":{"type":"boolean","default":true},"targetWidth":{"type":"number","description":"Only used for resize mode"},"targetHeight":{"type":"number","description":"Only used for resize mode"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a video for conversion to Instagram Reels format","tags":["image"]}},"/api/v1/image/job-status/{jobId}":{"get":{"operationId":"ImageResizeController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a image conversion job","tags":["image"]}},"/api/v1/image/batch-job-status":{"get":{"operationId":"ImageResizeController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple image conversion jobs","tags":["image"]}},"/api/v1/image/cancel/{jobId}":{"post":{"operationId":"ImageResizeController_cancelJob_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Cancel a queued or active image conversion job","tags":["image"]}},"/api/v1/ai/script-gen":{"post":{"operationId":"AIScriptGenController_queueScriptGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"The prompt to generate the script for"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a ai script generation job","tags":["ai"]}},"/api/v1/ai/script-gen/job-status/{jobId}":{"get":{"operationId":"AIScriptGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a script generation job","tags":["ai"]}},"/api/v1/ai/script-gen/usage-preview/{teamId}":{"get":{"operationId":"AIScriptGenController_getUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get script generation quota preview for a team","tags":["ai"]}},"/api/v1/ai/script-gen/batch-job-status":{"get":{"operationId":"AIScriptGenController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple script generation jobs","tags":["ai"]}},"/api/v1/ai/tts-gen":{"post":{"operationId":"AITTSGenController_queueTTSGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"The prompt to generate the tts"},"speed":{"type":"number","description":"The speed of the tts","default":1},"voiceType":{"type":"string","description":"The voice type of the tts","default":"Zephyr"},"voiceMode":{"type":"string","enum":["single","dual"],"description":"Single or dual speaker generation mode","default":"single"},"secondaryVoiceType":{"type":"string","description":"Second voice type for dual speaker mode","default":"Kore"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a ai tts generation job","tags":["ai"]}},"/api/v1/ai/tts-gen/job-status/{jobId}":{"get":{"operationId":"AITTSGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a tts generation job","tags":["ai"]}},"/api/v1/ai/tts-gen/usage-preview/{teamId}":{"get":{"operationId":"AITTSGenController_getUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get TTS generation quota preview for a team","tags":["ai"]}},"/api/v1/ai/tts-gen/batch-job-status":{"get":{"operationId":"AITTSGenController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple tts generation jobs","tags":["ai"]}},"/api/v1/ai/captions-gen":{"post":{"operationId":"AICaptionsGenController_queueCaptionsGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"The prompt to generate the script for"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a ai captions generation job","tags":["ai"]}},"/api/v1/ai/captions-gen/job-status/{jobId}":{"get":{"operationId":"AICaptionsGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a captions generation job","tags":["ai"]}},"/api/v1/ai/captions-gen/usage-preview/{teamId}":{"get":{"operationId":"AICaptionsGenController_getUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get captions generation quota preview for a team","tags":["ai"]}},"/api/v1/ai/captions-gen/batch-job-status":{"get":{"operationId":"AICaptionsGenController_getBatchJobStatus_v1","parameters":[{"name":"ids","required":true,"in":"query","description":"Comma-separated list of job IDs","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of multiple captions generation jobs","tags":["ai"]}},"/api/v1/ai/transcript/generate":{"post":{"operationId":"TranscriptController_queueTranscriptGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filePath":{"type":"string","description":"Path to the audio file to transcribe"},"format":{"type":"string","enum":["sentences","paragraphs","raw"],"description":"Output format for the transcript","default":"sentences"},"includePunctuation":{"type":"boolean","description":"Whether to include punctuation in the transcript","default":true}}}}}},"responses":{"201":{"description":""}},"summary":"Queue a transcript generation job","tags":["ai"]}},"/api/v1/ai/transcript/job-status/{jobId}":{"get":{"operationId":"TranscriptController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get the status of a transcript generation job","tags":["ai"]}},"/api/v1/ai/transcript/generate-complete":{"post":{"operationId":"TranscriptController_queueCompleteTranscript_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filePath":{"type":"string","description":"Path to the audio file to transcribe"}}}}}},"responses":{"201":{"description":""}},"summary":"Queue complete transcript generation with full text and segments","tags":["ai"]}},"/api/v1/ai/transcript/quick":{"post":{"description":"WARNING: Synchronous processing - use /generate for production","operationId":"TranscriptController_quickTranscript_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filePath":{"type":"string","description":"Path to the audio file to transcribe"}}}}}},"responses":{"201":{"description":""}},"summary":"Quick synchronous transcript generation (development only)","tags":["ai"]}},"/api/v1/ai/image-gen":{"post":{"operationId":"ImageGenController_queueImageGeneration_v1","parameters":[],"requestBody":{"required":true,"description":"Image generation parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationDTO"}}}},"responses":{"202":{"description":"Image generation has been queued"},"400":{"description":"Prompt is required"},"500":{"description":"Internal server error"}},"summary":"Queue an AI image generation job","tags":["ai"]}},"/api/v1/ai/image-gen/job-status/{jobId}":{"get":{"operationId":"ImageGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","description":"ID of the job to check","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Job status/result returned"},"404":{"description":"Job not found"}},"summary":"Get the status/result of an image generation job","tags":["ai"]}},"/api/v1/ai/image-gen/usage-preview/{teamId}":{"get":{"operationId":"ImageGenController_getUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Image generation usage preview returned"}},"summary":"Get image generation quota preview for a team","tags":["ai"]}},"/api/v1/ai/image-gen/cancel/{jobId}":{"post":{"operationId":"ImageGenController_cancelImageGeneration_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Cancellation request processed"},"400":{"description":"Validation error"},"500":{"description":"Internal server error"}},"summary":"Request cancellation for an active image generation job","tags":["ai"]}},"/api/v1/ai/image-prompt-gen":{"post":{"operationId":"ImagePromptGenController_queuePromptGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePromptGenerationDTO"}}}},"responses":{"201":{"description":""}},"tags":["ImagePromptGen"]}},"/api/v1/ai/image-prompt-gen/job-status/{jobId}":{"get":{"operationId":"ImagePromptGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["ImagePromptGen"]}},"/api/v1/ai/short-gen":{"post":{"operationId":"ShortGenController_queueShortGeneration_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"script":{"type":"string","description":"Optional: Provide a script (min 250 chars)"},"prompt":{"type":"string","description":"Optional: Provide a prompt to generate a script"},"teamId":{"type":"string","description":"Required team ID for quota and rate limiting"},"projectId":{"type":"string","description":"Optional project ID used to create an editable studio draft on completion"},"userId":{"type":"string","description":"Optional user ID used to create an editable studio draft on completion"},"ownerId":{"type":"string","description":"Optional owner ID for direct media library persistence (falls back to team owner when omitted)"},"includeSubtitles":{"type":"boolean","description":"Whether subtitles should be burned into output video","default":true},"captionTemplate":{"type":"string","enum":["tiktok","tiktok_line","classic","kinetic","karaoke","punch","neon","underline"],"description":"Caption style template. FlowSynk supports true TikTok single-word and line-highlight styles; legacy values are accepted and normalized.","default":"tiktok"},"visualTheme":{"type":"string","description":"Optional visual style/theme instructions for image scene generation"},"voiceType":{"type":"string","enum":["Achernar","Achird","Algenib","Algieba","Alnilam","Aoede","Autonoe","Callirrhoe","Charon","Despina","Enceladus","Erinome","Fenrir","Gacrux","Iapetus","Kore","Laomedeia","Leda","Orus","Puck","Pulcherrima","Rasalgethi","Sadachbia","Sadaltager","Schedar","Sulafat","Umbriel","Vindemiatrix","Zephyr","Zubenelgenubi"],"description":"Optional TTS voice type","default":"Zephyr"},"voiceMode":{"type":"string","enum":["single","dual"],"description":"Optional TTS mode. dual uses two speakers.","default":"single"},"secondaryVoiceType":{"type":"string","enum":["Achernar","Achird","Algenib","Algieba","Alnilam","Aoede","Autonoe","Callirrhoe","Charon","Despina","Enceladus","Erinome","Fenrir","Gacrux","Iapetus","Kore","Laomedeia","Leda","Orus","Puck","Pulcherrima","Rasalgethi","Sadachbia","Sadaltager","Schedar","Sulafat","Umbriel","Vindemiatrix","Zephyr","Zubenelgenubi"],"description":"Optional second speaker voice for dual mode"},"speed":{"type":"number","description":"Optional TTS speed multiplier","default":1},"targetDurationSeconds":{"type":"number","enum":[30,45,60],"description":"Target output duration in seconds","default":45},"transitionType":{"type":"string","enum":["none","fade","slide","wipe","flip","clock_wipe","iris","flash","slide_left","slide_up","zoom_in","wipe_right"],"description":"Scene transition type between generated image scenes (legacy values accepted temporarily).","default":"fade"},"transitionStrength":{"type":"string","enum":["gentle","standard","strong"],"description":"Transition intensity/overlap strength","default":"standard"},"transitionDirection":{"type":"string","enum":["left","right","up","down"],"description":"Direction for supported transitions (slide, wipe, clock_wipe).","default":"left"}}}}}},"responses":{"202":{"description":"Short generation has been queued"},"400":{"description":"Validation error"},"429":{"description":"Quota exceeded or rate limited"},"500":{"description":"Internal server error"}},"summary":"Start the full short/reel generation workflow","tags":["ai"]}},"/api/v1/ai/short-gen/job-status/{jobId}":{"get":{"operationId":"ShortGenController_getJobStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Job status/result returned (includes 'completed', 'failed', 'partial', or 'not_found')."},"500":{"description":"Internal server error"}},"summary":"Get the status/result of a short generation job","tags":["ai"]}},"/api/v1/ai/short-gen/cancel/{jobId}":{"post":{"operationId":"ShortGenController_cancelShortGeneration_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Cancellation request processed"},"400":{"description":"Validation error"},"500":{"description":"Internal server error"}},"summary":"Request cancellation for an active short generation job","tags":["ai"]}},"/api/v1/ai/short-gen/usage-preview/{teamId}":{"get":{"operationId":"ShortGenController_getUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Usage preview returned"}},"summary":"Get short generation quota preview for a team","tags":["ai"]}},"/api/v1/ai/short-gen/preset/{teamId}":{"get":{"operationId":"ShortGenController_getTeamPreset_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Team preset returned"}},"summary":"Get team preset for short generation options","tags":["ai"]},"delete":{"operationId":"ShortGenController_deleteTeamPreset_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Preset deleted"}},"summary":"Delete team preset for short generation options","tags":["ai"]}},"/api/v1/ai/short-gen/preset":{"post":{"operationId":"ShortGenController_saveTeamPreset_v1","parameters":[],"responses":{"200":{"description":"Preset saved"}},"summary":"Save team preset for short generation options","tags":["ai"]}},"/api/v1/ai/studio/render":{"post":{"operationId":"StudioController_queueStudioVideoRender_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"userId":{"type":"string"},"studioProjectId":{"type":"string"},"studioVersionId":{"type":"string"},"timelineState":{"type":"object"},"watermarkEnabled":{"type":"boolean","default":true},"watermarkText":{"type":"string","default":"FlowSynk"},"watermarkOpacity":{"type":"number","default":0.52}},"required":["teamId","projectId","userId","timelineState"]}}}},"responses":{"202":{"description":"Studio render job queued"}},"summary":"Queue a Studio video render export","tags":["ai"]}},"/api/v1/ai/studio/image-render":{"post":{"operationId":"StudioController_queueStudioImageRender_v1","parameters":[],"responses":{"202":{"description":"Studio image render job queued"}},"summary":"Queue a Studio image canvas export","tags":["ai"]}},"/api/v1/ai/studio/usage-preview/{teamId}":{"get":{"operationId":"StudioController_getStudioUsagePreview_v1","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Studio usage preview returned"}},"summary":"Get studio export quota preview for a team","tags":["ai"]}},"/api/v1/ai/studio/render-status/{jobId}":{"get":{"operationId":"StudioController_getStudioRenderStatus_v1","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Studio render job status returned"}},"summary":"Get studio render job status","tags":["ai"]}},"/api/v1/ai/studio/build-auto-draft":{"post":{"operationId":"StudioController_buildAutoDraft_v1","parameters":[],"responses":{"201":{"description":""}},"summary":"Build and persist editable studio draft from auto-gen metadata","tags":["ai"]}},"/api/v1/ai/post-content/generate":{"post":{"operationId":"PostContentGenerationController_generate_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePostContentDto"}}}},"responses":{"200":{"description":"Successfully generated post content variants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePostContentResponseDto"}}}},"400":{"description":"Request payload failed validation (missing or invalid fields)"},"401":{"description":"Missing or invalid bearer token"},"403":{"description":"Authenticated user is not a member of the specified team"},"429":{"description":"Rate limit exceeded for content generation"}},"security":[{"bearer":[]}],"summary":"Generate post content variations","tags":["AI"]}},"/api/webhooks/clerk":{"post":{"operationId":"ClerkWebhookController_receiveWebhook","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"201":{"description":""}},"summary":"Receive Clerk user webhooks","tags":["Clerk Webhooks"]}},"/api/v1/webhooks/polar":{"post":{"operationId":"PolarWebhookController_receiveWebhook[0]_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":""}},"summary":"Receive Polar billing webhooks","tags":["Polar Webhooks"]}},"/api/webhooks/polar":{"post":{"operationId":"PolarWebhookController_receiveWebhook[1]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":""}},"summary":"Receive Polar billing webhooks","tags":["Polar Webhooks"]}},"/api/webhooks/shopify/products":{"post":{"operationId":"ShopifyWebhookController_receiveShopifyWebhook","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Receive Shopify product webhooks","tags":["Shopify Webhooks"]}},"/api/webhooks/woocommerce/products":{"post":{"operationId":"WooCommerceWebhookController_receiveWooCommerceWebhook","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Receive WooCommerce product webhooks","tags":["WooCommerce Webhooks"]}},"/api/webhooks/meta/ads":{"post":{"operationId":"MetaAdsWebhookController_receiveMetaAdsWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive Meta Ads webhooks","tags":["Meta Ads Webhooks"]},"get":{"operationId":"MetaAdsWebhookController_validateMetaAdsWebhook","parameters":[{"name":"hub.mode","required":true,"in":"query","schema":{"type":"string"}},{"name":"hub.verify_token","required":true,"in":"query","schema":{"type":"string"}},{"name":"hub.challenge","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Validate the Meta Ads webhook endpoint","tags":["Meta Ads Webhooks"]}},"/api/fb-webhook":{"post":{"operationId":"FBWebhookController_receiveFBWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive webhook from Facebook","tags":["Facebook Webhooks"]},"get":{"operationId":"FBWebhookController_validateFBWebhook","parameters":[],"responses":{"200":{"description":""}},"summary":"Validate the endpoint","tags":["Facebook Webhooks"]}},"/api/ig-webhook":{"post":{"operationId":"IGWebhookController_receiveIGWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive webhook from IG","tags":["Instagram Webhooks"]},"get":{"operationId":"IGWebhookController_validateIGWebhook","parameters":[],"responses":{"200":{"description":""}},"summary":"Validate the endpoint","tags":["Instagram Webhooks"]}},"/api/tiktok-webhook":{"post":{"operationId":"TikTokWebhookController_receiveTikTokWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive webhook from TikTok","tags":["TikTok Webhooks"]},"get":{"operationId":"TikTokWebhookController_validateTikTokWebhook","parameters":[],"responses":{"200":{"description":""}},"summary":"Validate TikTok webhook endpoint","tags":["TikTok Webhooks"]}},"/api/telegram-webhook":{"post":{"operationId":"TelegramWebhookController_receiveTelegramWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive webhook from Telegram","tags":["Telegram Webhooks"]}},"/api/whatsapp-webhook":{"post":{"operationId":"WhatsAppWebhookController_receiveWhatsAppWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive webhook from WhatsApp","tags":["WhatsApp Webhooks"]},"get":{"operationId":"WhatsAppWebhookController_validateWhatsAppWebhook","parameters":[],"responses":{"200":{"description":""}},"summary":"Validate WhatsApp webhook endpoint","tags":["WhatsApp Webhooks"]}},"/api/webhooks/ingress/meta":{"post":{"operationId":"WebhookFanoutController_receiveMetaWebhook","parameters":[],"responses":{"201":{"description":""}},"summary":"Receive and fan out Meta webhooks","tags":["Webhook Fan-out (Meta)"]},"get":{"operationId":"WebhookFanoutController_verifyMetaWebhook","parameters":[],"responses":{"200":{"description":""}},"summary":"Respond to Meta webhook challenge","tags":["Webhook Fan-out (Meta)"]}}},"info":{"title":"FlowSynk API","description":"FlowSynk API for media processing and storage and other services","version":"v1","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateMaintenanceWindowDto":{"type":"object","properties":{}},"UpdateMaintenanceWindowDto":{"type":"object","properties":{}},"MeBannedDto":{"type":"object","properties":{"is":{"type":"boolean"},"reason":{"type":"string","nullable":true},"at":{"type":"number","nullable":true},"by":{"type":"string","nullable":true}},"required":["is"]},"MePreferencesDto":{"type":"object","properties":{"language":{"type":"string"},"timezone":{"type":"string","nullable":true},"emailNotifications":{"type":"boolean"},"pushNotifications":{"type":"boolean"},"notificationSound":{"type":"boolean"},"newComments":{"type":"boolean"},"productUpdates":{"type":"boolean"},"desktopNotifications":{"type":"boolean"},"postScheduled":{"type":"boolean"},"postPublished":{"type":"boolean"},"postFailed":{"type":"boolean"},"teamInvites":{"type":"boolean"},"billingAlerts":{"type":"boolean"},"aiGenerationComplete":{"type":"boolean"},"approvalRequests":{"type":"boolean"},"integrationDisconnected":{"type":"boolean"}},"required":["language","emailNotifications","pushNotifications","notificationSound","newComments","productUpdates","desktopNotifications","postScheduled","postPublished","postFailed","teamInvites","billingAlerts","aiGenerationComplete","approvalRequests","integrationDisconnected"]},"MeResponseDto":{"type":"object","properties":{"id":{"type":"string"},"clerkId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"imageUrl":{"type":"string"},"role":{"type":"string"},"banned":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/MeBannedDto"}]},"preferences":{"$ref":"#/components/schemas/MePreferencesDto"},"hasOnboarded":{"type":"boolean"},"isFreeForever":{"type":"boolean"},"unreadNotificationsCount":{"type":"number","nullable":true},"lastActiveTime":{"type":"number","nullable":true}},"required":["id","clerkId","email","name","imageUrl","role","preferences","hasOnboarded","isFreeForever"]},"UpdateMeLocationDto":{"type":"object","properties":{"countryId":{"type":"number"},"stateId":{"type":"number","nullable":true}},"required":["countryId"]},"UpdateMeProfileDto":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"bio":{"type":"string","nullable":true},"location":{"$ref":"#/components/schemas/UpdateMeLocationDto"}},"required":["firstName","lastName"]},"UpdateMeOnboardingDto":{"type":"object","properties":{"userType":{"type":"string","enum":["personal","business","agency","enterprise"]}},"required":["userType"]},"UpdateMeBusinessContextDto":{"type":"object","properties":{"businessName":{"type":"string","minLength":2,"maxLength":100},"businessCategory":{"type":"string","maxLength":100},"businessDescription":{"type":"string","maxLength":500},"teamMemberCount":{"type":"number","minimum":1,"maximum":10000}}},"CurrentOnboardingTeamDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"CurrentOnboardingProjectDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"CurrentOnboardingBusinessProfileDto":{"type":"object","properties":{"businessName":{"type":"object","nullable":true},"industry":{"type":"object","nullable":true},"description":{"type":"object","nullable":true}},"required":["businessName","industry","description"]},"CurrentOnboardingStateResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["none","provisioned","completed"]},"onboardingSessionId":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"provisioningStatus":{"type":"string","enum":["PROVISIONED","COMPLETED"]},"firstActionType":{"type":"string","enum":["PUBLISH","AUTOMATE","LEADS","EXPLORE"],"nullable":true},"integrationSkippedAt":{"type":"object","nullable":true},"team":{"$ref":"#/components/schemas/CurrentOnboardingTeamDto"},"project":{"$ref":"#/components/schemas/CurrentOnboardingProjectDto"},"businessProfile":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CurrentOnboardingBusinessProfileDto"}]}},"required":["status"]},"ProvisionOnboardingDto":{"type":"object","properties":{"teamName":{"type":"string","minLength":2,"maxLength":50},"projectName":{"type":"string","maxLength":50},"onboardingSessionId":{"type":"string","minLength":1,"maxLength":100},"firstActionType":{"type":"string","enum":["PUBLISH","AUTOMATE","LEADS","EXPLORE"]},"skippedSteps":{"maxItems":16,"type":"array","items":{"type":"string"}},"organizationType":{"type":"string","enum":["PERSONAL","BUSINESS"]},"organizationName":{"type":"string","minLength":1,"maxLength":120}},"required":["onboardingSessionId"]},"ProvisionOnboardingResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"isExisting":{"type":"boolean","default":false}},"required":["teamId","projectId","organizationId","isExisting"]},"FinalizeOnboardingDto":{"type":"object","properties":{"onboardingSessionId":{"type":"string","minLength":1,"maxLength":100},"firstActionType":{"type":"string","enum":["PUBLISH","AUTOMATE","LEADS","EXPLORE"]},"skippedSteps":{"maxItems":16,"type":"array","items":{"type":"string"}},"integrationSkipped":{"type":"boolean"}},"required":["onboardingSessionId"]},"FinalizeOnboardingResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"}},"required":["teamId","projectId","organizationId"]},"CompleteMeOnboardingDto":{"type":"object","properties":{"teamName":{"type":"string","minLength":2,"maxLength":50},"projectName":{"type":"string","maxLength":50},"firstActionType":{"type":"string","maxLength":100},"skippedSteps":{"maxItems":16,"type":"array","items":{"type":"string"}},"organizationType":{"type":"string","enum":["PERSONAL","BUSINESS"]},"organizationName":{"type":"string","minLength":1,"maxLength":120}}},"CompleteMeOnboardingResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"}},"required":["teamId","projectId","organizationId"]},"CompleteMeInvitedOnboardingDto":{"type":"object","properties":{"teamId":{"type":"string"},"firstActionType":{"type":"string","maxLength":100},"skippedSteps":{"maxItems":16,"type":"array","items":{"type":"string"}}}},"CompleteMeInvitedOnboardingResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"organizationId":{"type":"string","nullable":true}},"required":["success"]},"MilestoneActionDto":{"type":"object","properties":{"label":{"type":"string"},"href":{"type":"string"},"canNavigate":{"type":"boolean"}},"required":["label","href","canNavigate"]},"MilestoneModelDto":{"type":"object","properties":{"key":{"type":"string","enum":["onboarding_complete","business_profile_complete","channel_connected","first_post_created","first_post_published","first_automation_created","first_automation_enabled","first_automation_executed","first_lead_captured"]},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["not_started","blocked","skipped","completed"]},"isRecommended":{"type":"boolean"},"blockedBy":{"type":"string","enum":["onboarding_complete","business_profile_complete","channel_connected","first_post_created","first_post_published","first_automation_created","first_automation_enabled","first_automation_executed","first_lead_captured"],"nullable":true},"completionMode":{"type":"string","enum":["user_action","system_evidence"]},"canCompleteDirectly":{"type":"boolean"},"cannotActReason":{"type":"string","nullable":true},"action":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/MilestoneActionDto"}]},"achievedAt":{"type":"string","nullable":true},"recordedAt":{"type":"string","nullable":true},"currentHealth":{"type":"string","enum":["healthy","degraded","down"],"nullable":true},"needsAttention":{"type":"boolean"}},"required":["key","title","description","status","isRecommended","completionMode","canCompleteDirectly","needsAttention"]},"ActivationRecommendedActionDto":{"type":"object","properties":{"key":{"type":"string","enum":["onboarding_complete","business_profile_complete","channel_connected","first_post_created","first_post_published","first_automation_created","first_automation_enabled","first_automation_executed","first_lead_captured"]},"title":{"type":"string"},"description":{"type":"string"},"cta":{"type":"string"},"href":{"type":"string"}},"required":["key","title","description","cta","href"]},"ChannelSummaryDto":{"type":"object","properties":{"hasQualifyingIntegration":{"type":"boolean"},"hasAnyIntegration":{"type":"boolean"},"platform":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"permissionState":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"isExpired":{"type":"boolean"},"goalCapability":{"type":"string","enum":["publishing","messaging"],"nullable":true},"supportsGoal":{"type":"boolean"}},"required":["hasQualifyingIntegration","hasAnyIntegration","isExpired","supportsGoal"]},"NullGoalBranchDto":{"type":"object","properties":{"branch":{"type":"string","enum":["publish","automate","leads"]},"label":{"type":"string"},"description":{"type":"string"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneModelDto"}},"isComplete":{"type":"boolean"},"deepLink":{"type":"string"}},"required":["branch","label","description","milestones","isComplete","deepLink"]},"NullGoalProgressDto":{"type":"object","properties":{"baseMilestones":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneModelDto"}},"branches":{"type":"array","items":{"$ref":"#/components/schemas/NullGoalBranchDto"}},"completedBranch":{"type":"string","enum":["publish","automate","leads","unknown"],"nullable":true},"legacyCompletion":{"type":"boolean"}},"required":["baseMilestones","branches"]},"MeActivationSummaryResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"goal":{"type":"string","enum":["publish","automate","leads","explore"],"nullable":true},"provisioningStatus":{"type":"string","enum":["provisioned","completed","abandoned"]},"activationPercent":{"type":"number","minimum":0,"maximum":100},"activationStatus":{"type":"string","enum":["not_started","in_progress","activated"]},"activatedAt":{"type":"string","nullable":true},"onboardingCompletedAt":{"type":"string","nullable":true},"integrationSkippedAt":{"type":"string","nullable":true},"evaluatedAt":{"type":"string"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneModelDto"}},"recommendedNextAction":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivationRecommendedActionDto"}]},"defaultProjectId":{"type":"string","nullable":true},"businessProfileId":{"type":"string","nullable":true},"businessProfileSetupStatus":{"type":"string","enum":["not_started","draft","complete"]},"incompleteSections":{"type":"array","items":{"type":"string","enum":["identity","contact","brand_voice","hours","policies","faqs"]}},"channelSummary":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ChannelSummaryDto"}]},"nullGoalProgress":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/NullGoalProgressDto"}]},"legacyCompletion":{"type":"boolean"}},"required":["teamId","activationPercent","activationStatus","evaluatedAt","milestones","incompleteSections"]},"MeInvitationContextCurrentUserDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"hasOnboarded":{"type":"boolean"}},"required":["id","email","hasOnboarded"]},"MeInvitationContextInvitationDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"effectiveStatus":{"type":"string"}},"required":["id","teamId","email","status","effectiveStatus"]},"MeInvitationContextResponseDto":{"type":"object","properties":{"currentUser":{"$ref":"#/components/schemas/MeInvitationContextCurrentUserDto"},"invitation":{"$ref":"#/components/schemas/MeInvitationContextInvitationDto"},"emailMatchesInvitation":{"type":"boolean"}},"required":["currentUser","invitation","emailMatchesInvitation"]},"TeamCreationGateResponseDto":{"type":"object","properties":{"canManageTeams":{"type":"boolean"},"allowed":{"type":"boolean"},"ownerPlan":{"type":"string"},"activeTeams":{"type":"number"},"totalOwnedTeams":{"type":"number"},"lockedTeams":{"type":"number"},"includedTeams":{"type":"number"},"requiredExtraTeams":{"type":"number"},"entitledExtraTeams":{"type":"number"},"reason":{"type":"string"},"checkoutUrl":{"type":"string"}},"required":["canManageTeams","allowed","ownerPlan","activeTeams","totalOwnedTeams","lockedTeams","includedTeams","requiredExtraTeams","entitledExtraTeams"]},"DeletionPreviewResponseDto":{"type":"object","properties":{"ownedTeamCount":{"type":"number","description":"Number of teams owned by the user"},"hasBillableSubscription":{"type":"boolean","description":"Whether the user has a billable subscription"}},"required":["ownedTeamCount","hasBillableSubscription"]},"UpdateMePreferencesDto":{"type":"object","properties":{"language":{"type":"string"},"timezone":{"type":"string","nullable":true},"emailNotifications":{"type":"boolean"},"pushNotifications":{"type":"boolean"},"notificationSound":{"type":"boolean"},"newComments":{"type":"boolean"},"productUpdates":{"type":"boolean"},"desktopNotifications":{"type":"boolean"},"postScheduled":{"type":"boolean"},"postPublished":{"type":"boolean"},"postFailed":{"type":"boolean"},"teamInvites":{"type":"boolean"},"billingAlerts":{"type":"boolean"},"aiGenerationComplete":{"type":"boolean"},"approvalRequests":{"type":"boolean"},"integrationDisconnected":{"type":"boolean"}}},"OrganizationListItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["PERSONAL","BUSINESS"]},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"ownerUserId":{"type":"string"},"billingEmail":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","slug","type","status","ownerUserId","createdAt","updatedAt"]},"OrganizationResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["PERSONAL","BUSINESS"]},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"ownerUserId":{"type":"string"},"billingEmail":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"currentUserRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"currentUserPermissions":{"type":"array","items":{"type":"string","enum":["VIEW_BILLING","MANAGE_BILLING","MANAGE_MEMBERS","MANAGE_TEAMS","MANAGE_SETTINGS"]}},"pendingTeamId":{"type":"string","description":"Populated when the user just accepted an organization invitation that also assigned a pending team."},"pendingTeamName":{"type":"string"}},"required":["id","name","slug","type","status","ownerUserId","createdAt","updatedAt","currentUserRole","currentUserPermissions"]},"CreateOrganizationDto":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["PERSONAL","BUSINESS"]},"billingEmail":{"type":"string","nullable":true}},"required":["name","type"]},"UpdateOrganizationDto":{"type":"object","properties":{"name":{"type":"string"},"billingEmail":{"type":"string","nullable":true}}},"OrganizationMemberDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW_BILLING","MANAGE_BILLING","MANAGE_MEMBERS","MANAGE_TEAMS","MANAGE_SETTINGS"]}},"status":{"type":"string"},"joinedAt":{"type":"string"}},"required":["id","userId","name","email","avatarUrl","role","permissions","status","joinedAt"]},"UpdateOrganizationMemberDto":{"type":"object","properties":{"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW_BILLING","MANAGE_BILLING","MANAGE_MEMBERS","MANAGE_TEAMS","MANAGE_SETTINGS"]}}}},"OrganizationInvitationDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW_BILLING","MANAGE_BILLING","MANAGE_MEMBERS","MANAGE_TEAMS","MANAGE_SETTINGS"]}},"inviterId":{"type":"string"},"inviterName":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED","REVOKED","EXPIRED"]},"resendCount":{"type":"number"},"pendingTeamId":{"type":"string","description":"If set, the invitee will join this team on acceptance with pendingTeamRole."},"pendingTeamRole":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"]},"pendingTeamName":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"expiresAt":{"type":"string"},"acceptedAt":{"type":"string"},"revokedAt":{"type":"string"}},"required":["id","organizationId","email","role","permissions","inviterId","inviterName","status","resendCount","createdAt","updatedAt","expiresAt"]},"CreateOrganizationInvitationDto":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"permissions":{"type":"array","description":"Explicit permissions only take effect for the MEMBER role.","items":{"type":"string","enum":["VIEW_BILLING","MANAGE_BILLING","MANAGE_MEMBERS","MANAGE_TEAMS","MANAGE_SETTINGS"]}},"pendingTeamId":{"type":"string","description":"Optional team id for a pending team assignment. When provided, the invitee will also join this team on acceptance."},"pendingTeamRole":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"],"description":"The role the invitee will receive in the pending team. Required when pendingTeamId is provided."}},"required":["email"]},"AcceptOrganizationInvitationDto":{"type":"object","properties":{"token":{"type":"string"}}},"NotificationResponseDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"title":{"type":"string"},"message":{"type":"string","nullable":true},"type":{"type":"string"},"icon":{"type":"string","nullable":true},"actionUrl":{"type":"string","nullable":true},"actionable":{"type":"boolean"},"platform":{"type":"string","nullable":true},"teamId":{"type":"string","nullable":true},"teamName":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"projectName":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"postTitle":{"type":"string","nullable":true},"invitationId":{"type":"string","nullable":true},"errorDetails":{"type":"string","nullable":true},"leadInfo":{"type":"object","additionalProperties":true,"nullable":true},"read":{"type":"boolean"},"readAt":{"type":"string","nullable":true,"format":"date-time"},"deletedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","title","type","actionable","read","createdAt","updatedAt"]},"PaginatedNotificationsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponseDto"}},"nextCursor":{"type":"string","nullable":true},"page":{"type":"number","minimum":1},"pageSize":{"type":"number","minimum":1},"total":{"type":"number","minimum":0},"totalPages":{"type":"number","minimum":1},"hasMore":{"type":"boolean"}},"required":["items","nextCursor"]},"UnreadCountResponseDto":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"]},"NotificationStatsResponseDto":{"type":"object","properties":{"unread":{"type":"number","description":"Unread notifications for the current user"},"total":{"type":"number","description":"Total notifications for the current user"},"today":{"type":"number","description":"Notifications created in the last 24 hours for the current user"}},"required":["unread","total","today"]},"SuccessResponseDto":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"TeamShellLimitsDto":{"type":"object","properties":{"projects":{"type":"number","description":"Maximum number of projects"},"posts":{"type":"number","description":"Maximum number of posts"},"membersPerTeam":{"type":"number","description":"Maximum members per team"}},"required":["projects","posts","membersPerTeam"]},"TeamShellStatsResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"limits":{"$ref":"#/components/schemas/TeamShellLimitsDto"},"teamMembers":{"type":"number","description":"Total active team members"}},"required":["teamId","limits","teamMembers"]},"CreateTeamDto":{"type":"object","properties":{}},"UpdateTeamDto":{"type":"object","properties":{}},"EligibleOrganizationMemberResponseDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"joinedAt":{"type":"string"}},"required":["id","organizationId","userId","name","email","organizationRole","joinedAt"]},"AddTeamMemberDto":{"type":"object","properties":{"organizationMemberId":{"type":"string","description":"Organization member id for the person being assigned to this team."},"userId":{"type":"string","description":"User id for an existing member of the team organization. Prefer organizationMemberId when available."},"role":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"]}},"required":["role"]},"UpdateTeamMemberRoleDto":{"type":"object","properties":{"role":{"type":"string"}},"required":["role"]},"TeamContextMembershipDto":{"type":"object","properties":{"isMember":{"type":"boolean"},"role":{"type":"string","nullable":true}},"required":["isMember","role"]},"TeamContextPermissionsDto":{"type":"object","properties":{"canManageMembers":{"type":"boolean"},"canInvite":{"type":"boolean"},"canDelete":{"type":"boolean"},"canUpdate":{"type":"boolean"}},"required":["canManageMembers","canInvite","canDelete","canUpdate"]},"TeamContextTeamDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"ownerId":{"type":"string"},"memberCount":{"type":"number"}},"required":["id","organizationId","name","description","ownerId","memberCount"]},"TeamContextResponseDto":{"type":"object","properties":{"membership":{"$ref":"#/components/schemas/TeamContextMembershipDto"},"permissions":{"$ref":"#/components/schemas/TeamContextPermissionsDto"},"team":{"$ref":"#/components/schemas/TeamContextTeamDto"}},"required":["membership","permissions","team"]},"TeamOverviewCatalogDto":{"type":"object","properties":{"total":{"type":"number"},"products":{"type":"number"},"services":{"type":"number"}},"required":["total","products","services"]},"TeamOverviewIntegrationsDto":{"type":"object","properties":{"total":{"type":"number"},"connected":{"type":"number"},"requiresAttention":{"type":"number"}},"required":["total","connected","requiresAttention"]},"TeamOverviewMembersDto":{"type":"object","properties":{"active":{"type":"number"},"pendingInvitations":{"type":"number"}},"required":["active","pendingInvitations"]},"TeamOverviewAgentDto":{"type":"object","properties":{"configured":{"type":"boolean"},"enabled":{"type":"boolean"},"completion":{"type":"number"},"pendingApprovals":{"type":"number"},"openHandoffs":{"type":"number"},"activeConversations":{"type":"number"}},"required":["configured","enabled","completion","pendingApprovals","openHandoffs","activeConversations"]},"TeamOverviewProjectDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"posts":{"type":"number"},"enabledAutomations":{"type":"number"},"updatedAt":{"type":"string"}},"required":["id","name","posts","enabledAutomations","updatedAt"]},"TeamOverviewLeadStageDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]},"TeamOverviewPerformanceMetricDto":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"change":{"type":"number","nullable":true}},"required":["name","value"]},"TeamOverviewActivityDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string"},"projectId":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","action","resourceType","resourceId","createdAt"]},"TeamOverviewAttentionDto":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]},"TeamOverviewStorageDto":{"type":"object","properties":{"count":{"type":"number"},"usedSpace":{"type":"number"},"totalSpace":{"type":"number"},"totalImagesSize":{"type":"number"},"totalVideosSize":{"type":"number"}},"required":["count","usedSpace","totalSpace","totalImagesSize","totalVideosSize"]},"TeamOverviewEngagementPointDto":{"type":"object","properties":{"date":{"type":"string"},"engagements":{"type":"number"}},"required":["date","engagements"]},"TeamOverviewEngagementPlatformPointDto":{"type":"object","properties":{"platform":{"type":"string"},"date":{"type":"string"},"engagements":{"type":"number"}},"required":["platform","date","engagements"]},"TeamOverviewEngagementDto":{"type":"object","properties":{"total":{"type":"number"},"periodChange":{"type":"number"},"reachTotal":{"type":"number"},"trendByPeriod":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewEngagementPointDto"}},"trendByPlatform":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewEngagementPlatformPointDto"}}},"required":["total","periodChange","reachTotal","trendByPeriod","trendByPlatform"]},"TeamOverviewThroughputPointDto":{"type":"object","properties":{"date":{"type":"string"},"leads":{"type":"number"},"posts":{"type":"number"},"activityEvents":{"type":"number"}},"required":["date","leads","posts","activityEvents"]},"TeamOverviewThroughputDto":{"type":"object","properties":{"trendByPeriod":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewThroughputPointDto"}},"projects":{"type":"object"},"integrations":{"type":"object"}},"required":["trendByPeriod","projects","integrations"]},"TeamOverviewPublishingStageDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]},"TeamOverviewPublishingDto":{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewPublishingStageDto"}}},"required":["stages"]},"TeamOverviewResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"catalog":{"$ref":"#/components/schemas/TeamOverviewCatalogDto"},"integrations":{"$ref":"#/components/schemas/TeamOverviewIntegrationsDto"},"members":{"$ref":"#/components/schemas/TeamOverviewMembersDto"},"agent":{"$ref":"#/components/schemas/TeamOverviewAgentDto"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewProjectDto"}},"leads":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewLeadStageDto"}},"performance":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewPerformanceMetricDto"}},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewActivityDto"}},"attention":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewAttentionDto"}},"storage":{"$ref":"#/components/schemas/TeamOverviewStorageDto"},"engagement":{"$ref":"#/components/schemas/TeamOverviewEngagementDto"},"throughput":{"$ref":"#/components/schemas/TeamOverviewThroughputDto"},"publishing":{"$ref":"#/components/schemas/TeamOverviewPublishingDto"}},"required":["teamId","catalog","integrations","members","agent","projects","leads","performance","recentActivity","attention","storage","engagement","throughput","publishing"]},"OwnerLimitsDto":{"type":"object","properties":{"teams":{"type":"number"},"posts":{"type":"number"},"aiContentGenerations":{"type":"number"},"commentAutomations":{"type":"number"},"aiGenerationsPerMonth":{"type":"number"},"postIntegrations":{"type":"number"},"commentAutomationRunsPerMonth":{"type":"number"},"dmAutomationRunsPerMonth":{"type":"number"},"aiShortVideoGenerationsPerMonth":{"type":"number"}},"required":["teams","posts","aiContentGenerations","commentAutomations","aiGenerationsPerMonth","postIntegrations","commentAutomationRunsPerMonth","dmAutomationRunsPerMonth","aiShortVideoGenerationsPerMonth"]},"OwnerEntitlementsDto":{"type":"object","properties":{"plan":{"type":"string"},"isFreeForever":{"type":"boolean"},"subscriptionStatus":{"type":"object","nullable":true},"limits":{"$ref":"#/components/schemas/OwnerLimitsDto"}},"required":["plan","isFreeForever","limits"]},"TeamCapacityDto":{"type":"object","properties":{"plan":{"type":"string"},"includedTeams":{"type":"number"},"entitledExtraTeams":{"type":"number"},"effectiveMaxTeams":{"type":"number"},"absoluteMaxTeams":{"type":"number"},"usedTeams":{"type":"number"},"remainingTeams":{"type":"number"},"allowsPaidExpansion":{"type":"boolean"}},"required":["plan","includedTeams","entitledExtraTeams","effectiveMaxTeams","absoluteMaxTeams","usedTeams","remainingTeams","allowsPaidExpansion"]},"TeamCapacityResponseDto":{"type":"object","properties":{"capacity":{"$ref":"#/components/schemas/TeamCapacityDto"}},"required":["capacity"]},"SubscriptionResponseDto":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"recurringInterval":{"type":"string"},"currentPeriodStart":{"format":"date-time","type":"string"},"currentPeriodEnd":{"format":"date-time","type":"string"},"cancelAtPeriodEnd":{"type":"boolean"},"polarCustomerId":{"type":"string"},"polarSubscriptionId":{"type":"string"},"isFreeForever":{"type":"boolean"},"trialEnd":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","plan","status","createdAt","updatedAt"]},"PlanNameResponseDto":{"type":"object","properties":{"plan":{"type":"string"}},"required":["plan"]},"SubscriptionStatusResponseDto":{"type":"object","properties":{"status":{"type":"string","nullable":true}},"required":["status"]},"BillingPeriodDto":{"type":"object","properties":{"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"},"source":{"type":"string"}},"required":["start","end","source"]},"UsageMeterSummary":{"type":"object","properties":{"meter":{"type":"string"},"label":{"type":"string"},"used":{"type":"number"},"monthlyLimit":{"type":"number"},"remaining":{"type":"number"},"unitCostUsd":{"type":"number"},"overageSpendUsd":{"type":"number"}},"required":["meter","label","used","monthlyLimit","remaining"]},"BillingSummaryResponseDto":{"type":"object","properties":{"plan":{"type":"string"},"subscriptionStatus":{"type":"string"},"isFreeForever":{"type":"boolean"},"activeOwnedTeamsCount":{"type":"number"},"confirmedAddonSeats":{"type":"number"},"overageBudgetUsd":{"type":"number"},"currentOverageSpendUsd":{"type":"number"},"billingPeriod":{"$ref":"#/components/schemas/BillingPeriodDto"},"usage":{"type":"array","items":{"$ref":"#/components/schemas/UsageMeterSummary"}}},"required":["plan","subscriptionStatus","billingPeriod","usage"]},"UsagePreviewResponseDto":{"type":"object","properties":{"allowed":{"type":"boolean"},"errorCode":{"type":"string"},"reason":{"type":"string"},"quotaRemainingBeforeRequest":{"type":"number"},"quotaRemainingAfterRequest":{"type":"number"},"monthlyLimit":{"type":"number"},"resetDate":{"format":"date-time","type":"string"}},"required":["allowed","quotaRemainingBeforeRequest","quotaRemainingAfterRequest","monthlyLimit"]},"CreateCheckoutDto":{"type":"object","properties":{"productId":{"type":"string"},"successUrl":{"type":"string"},"cancelUrl":{"type":"string"},"quantity":{"type":"number"},"allowDiscounts":{"type":"boolean"},"recurringInterval":{"type":"string"}},"required":["productId"]},"CheckoutResponseDto":{"type":"object","properties":{"url":{"type":"string"},"checkoutId":{"type":"string"}},"required":["url","checkoutId"]},"CreateEnterpriseAddonCheckoutDto":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID for the checkout context"},"pendingNewTeams":{"type":"number","description":"Pending new teams to account for in seat calculation"},"successUrl":{"type":"string","description":"Explicit success URL override (defaults to team billing page)"},"cancelUrl":{"type":"string","description":"Explicit cancel/return URL override (defaults to team billing page)"}},"required":["teamId"]},"EnterpriseAddonCheckoutResponseDto":{"type":"object","properties":{"url":{"type":"string"},"checkoutId":{"type":"string"},"productId":{"type":"string"},"desiredSeats":{"type":"number"},"expiresAt":{"type":"string"}},"required":["url","checkoutId","productId","desiredSeats"]},"CustomerPortalResponseDto":{"type":"object","properties":{"url":{"type":"string","nullable":true}}},"LedgerEntryResponseDto":{"type":"object","properties":{"id":{"type":"string"},"meter":{"type":"string"},"units":{"type":"number"},"source":{"type":"string"},"sourceId":{"type":"object","nullable":true},"teamId":{"type":"object","nullable":true},"projectId":{"type":"object","nullable":true},"billingPeriodStart":{"format":"date-time","type":"string"},"billingPeriodEnd":{"format":"date-time","type":"string"},"status":{"type":"string"},"unitCostUsd":{"type":"object","nullable":true},"totalCostUsd":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","meter","units","source","billingPeriodStart","billingPeriodEnd","status","createdAt"]},"PaginatedLedgerResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntryResponseDto"}},"nextCursor":{"type":"object","nullable":true}},"required":["items"]},"BillingProductPriceDto":{"type":"object","properties":{"id":{"type":"string"},"amountType":{"type":"string"},"priceAmount":{"type":"number"},"priceCurrency":{"type":"string"},"recurringInterval":{"type":"string"}}},"BillingProductDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isArchived":{"type":"boolean"},"recurringInterval":{"type":"string","nullable":true},"prices":{"type":"array","items":{"$ref":"#/components/schemas/BillingProductPriceDto"}}},"required":["id","name"]},"CancelSubscriptionResponseDto":{"type":"object","properties":{"cancelled":{"type":"boolean"}},"required":["cancelled"]},"DeleteCustomerRecordResponseDto":{"type":"object","properties":{"deleted":{"type":"boolean"},"reason":{"type":"string"}},"required":["deleted"]},"InternalBillingCheckRequestDto":{"type":"object","properties":{"ownerId":{"type":"string","description":"Owner user ID"},"teamId":{"type":"string","description":"Team ID (for team-scoped checks)"},"currentCount":{"type":"number","description":"TEMPORARY mixed-mode: caller-provided current count. When NestJS can derive the count from Prisma, it will ignore this field."},"currentUsageBytes":{"type":"number","description":"TEMPORARY mixed-mode: caller-provided current storage usage in bytes. When NestJS can derive this from Prisma OrganizationUsage.storageUsed, it will ignore this field."},"requestedBytes":{"type":"number","description":"Requested bytes for storage upload check"},"source":{"type":"string","description":"Source identifier for audit logging"}},"required":["ownerId"]},"AgentSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"approvalMode":{"type":"string"},"voiceToneInstructions":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","approvalMode","createdAt","updatedAt"]},"AgentDetailDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"approvalMode":{"type":"string"},"voiceToneInstructions":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"optOutEnabled":{"type":"boolean"},"businessHoursOnly":{"type":"boolean"},"timezone":{"type":"string","nullable":true}},"required":["id","teamId","approvalMode","createdAt","updatedAt","optOutEnabled","businessHoursOnly"]},"ActivitySummaryDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"teamId":{"type":"string"},"threadId":{"type":"string","nullable":true},"action":{"type":"string"},"category":{"type":"string"},"severity":{"type":"string"},"details":{"type":"object","nullable":true},"cause":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","agentId","teamId","action","category","severity","createdAt"]},"DashboardDto":{"type":"object","properties":{"pendingApprovals":{"type":"number"},"openHandoffs":{"type":"number"},"activeConversations":{"type":"number"},"executionsToday":{"type":"number"},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/ActivitySummaryDto"}}},"required":["pendingApprovals","openHandoffs","activeConversations","executionsToday","recentActivity"]},"AgentInsightDto":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"color":{"type":"string"}},"required":["type","title","message","color"]},"AgentPerformanceDashboardDto":{"type":"object","properties":{"overview":{"type":"object"},"quality":{"type":"object"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/AgentInsightDto"}},"timeRange":{"type":"string"},"lastUpdated":{"type":"number"},"isEmpty":{"type":"boolean"}},"required":["overview","quality","insights","timeRange","lastUpdated","isEmpty"]},"RuntimeMissingFieldDto":{"type":"object","properties":{"field":{"type":"string"},"label":{"type":"string"}},"required":["field","label"]},"RuntimeBlockerDto":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]},"actionLabel":{"type":"string"},"destinationUrl":{"type":"string"},"missingFields":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeMissingFieldDto"}}},"required":["code","title","description","severity","actionLabel","destinationUrl"]},"RuntimeRequirementDto":{"type":"object","properties":{"key":{"type":"string","enum":["BUSINESS_PROFILE","REQUIRED_FIELDS","PRODUCTS","INTEGRATIONS"]},"title":{"type":"string"},"description":{"type":"string"},"met":{"type":"boolean"},"destinationUrl":{"type":"string","nullable":true}},"required":["key","title","description","met"]},"RuntimeConfigurationDto":{"type":"object","properties":{"configured":{"type":"boolean"},"enabled":{"type":"boolean"},"completion":{"type":"number"},"blockers":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeBlockerDto"}},"requirements":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeRequirementDto"}}},"required":["configured","enabled","completion","blockers","requirements"]},"RuntimeOperationalDto":{"type":"object","properties":{"state":{"type":"string","enum":["RUNNING","PAUSED","DISABLED","DEGRADED","ERROR"]}},"required":["state"]},"RuntimeStatusDto":{"type":"object","properties":{"configuration":{"$ref":"#/components/schemas/RuntimeConfigurationDto"},"operational":{"$ref":"#/components/schemas/RuntimeOperationalDto"},"status":{"type":"string","enum":["healthy","warning","critical"],"description":"High-level customer-facing status. Maps to the operational state."},"customerMessage":{"type":"string","description":"Customer-friendly explanation of the agent state. Does not include infrastructure details or provider names."}},"required":["configuration","operational","status","customerMessage"]},"AgentApprovalMode":{"type":"string","enum":["AUTONOMOUS","FIRST_CONTACT","HIGH_RISK","TOOL_ACTION","FULL_APPROVAL"]},"AgentRiskCategory":{"type":"string","enum":["PRICING","DISCOUNTS","AVAILABILITY","SHIPPING","LEGAL","COMPETITOR","NEGATIVE_SENTIMENT","ESCALATION"]},"UpdateAgentSettingsDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"approvalMode":{"allOf":[{"$ref":"#/components/schemas/AgentApprovalMode"}]},"riskCategories":{"type":"array","items":{"$ref":"#/components/schemas/AgentRiskCategory"}},"staleThresholdMinutes":{"type":"number","minimum":1,"maximum":525600},"maxReEngagementAttempts":{"type":"number","minimum":0,"maximum":100},"reEngagementCooldownMinutes":{"type":"number","minimum":1,"maximum":525600},"escalationUserId":{"type":"object","nullable":true},"outageResponderUserId":{"type":"object","nullable":true},"optOutEnabled":{"type":"boolean"},"voiceToneInstructions":{"type":"object","nullable":true,"maxLength":4000},"businessHoursOnly":{"type":"boolean"},"timezone":{"type":"object","nullable":true,"maxLength":100},"maxContextTokens":{"type":"number","minimum":1000,"maximum":200000},"maxResponseTokens":{"type":"number","minimum":1,"maximum":16000},"modelName":{"type":"string","maxLength":200}}},"ThreadStatus":{"type":"string","enum":["ACTIVE","WAITING_HUMAN","RESOLVED","CLOSED"]},"ThreadSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"teamId":{"type":"string"},"customerId":{"type":"string"},"customerProfileId":{"type":"string","nullable":true},"customerName":{"type":"string","nullable":true},"status":{"type":"string"},"lastActivityAt":{"type":"string","nullable":true},"messageCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","agentId","teamId","customerId","status","messageCount","createdAt","updatedAt"]},"ThreadPageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ThreadSummaryDto"}}},"required":["items"]},"ThreadDetailDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"teamId":{"type":"string"},"customerId":{"type":"string"},"customerProfileId":{"type":"string","nullable":true},"customerName":{"type":"string","nullable":true},"status":{"type":"string"},"lastActivityAt":{"type":"string","nullable":true},"messageCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"externalCustomerId":{"type":"string","nullable":true},"customerPlatform":{"type":"string","nullable":true}},"required":["id","agentId","teamId","customerId","status","messageCount","createdAt","updatedAt"]},"ThreadMessageDto":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"role":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string","nullable":true},"platformMessageId":{"type":"string","nullable":true},"parentMessageId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","threadId","role","content","createdAt"]},"ThreadParticipantDto":{"type":"object","properties":{"kind":{"type":"string","description":"Participant kind derived from the current schema"},"id":{"type":"string"},"displayName":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true}},"required":["kind","id"]},"ThreadExecutionSummaryDto":{"type":"object","properties":{"totalExecutions":{"type":"number"},"completedExecutions":{"type":"number"},"failedExecutions":{"type":"number"},"lastCompletedAt":{"type":"string","nullable":true}},"required":["totalExecutions","completedExecutions","failedExecutions"]},"ConversationSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"summaryType":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","threadId","summaryType","content","createdAt"]},"ExecutionSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"teamId":{"type":"string"},"status":{"type":"string"},"triggerEvent":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","threadId","teamId","status","createdAt"]},"ThreadDetailResponseDto":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/ThreadDetailDto"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ThreadMessageDto"}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipantDto"}},"executionSummary":{"$ref":"#/components/schemas/ThreadExecutionSummaryDto"},"conversationSummary":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ConversationSummaryDto"}]},"executionHistory":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionSummaryDto"}},"conversationSummaries":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSummaryDto"}}},"required":["thread","messages","participants","executionSummary","executionHistory","conversationSummaries"]},"AgentApprovalReadStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","ESCALATED","EXPIRED"]},"ApprovalSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"executionId":{"type":"string"},"teamId":{"type":"string"},"threadId":{"type":"string","nullable":true},"status":{"type":"string"},"approvalMode":{"type":"string"},"riskLevel":{"type":"string","nullable":true},"reviewedBy":{"type":"string","nullable":true},"reviewedAt":{"type":"string","nullable":true},"reviewNotes":{"type":"string","nullable":true},"escalatedTo":{"type":"string","nullable":true},"escalatedAt":{"type":"string","nullable":true},"slaDeadline":{"type":"string","nullable":true},"slaBreachedAt":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"customerId":{"type":"string","nullable":true},"customerProfileId":{"type":"string","nullable":true},"customerName":{"type":"string","nullable":true},"customerEmail":{"type":"string","nullable":true},"externalCustomerId":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"triggerType":{"type":"string","nullable":true},"approvalReason":{"type":"string","nullable":true},"originalInboundPreview":{"type":"string","nullable":true},"generatedResponsePreview":{"type":"string","nullable":true},"validationNotes":{"type":"array","items":{"type":"string"}},"deliveryStatus":{"type":"string","nullable":true},"deliverySafeMessage":{"type":"string","nullable":true},"deliveryUpdatedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","executionId","teamId","status","approvalMode","validationNotes","createdAt","updatedAt"]},"ApprovalQueueSummaryDto":{"type":"object","properties":{"pending":{"type":"number","description":"Pending approvals matching all active filters except status."},"approved":{"type":"number","description":"Approved approvals matching all active filters except status."},"rejected":{"type":"number","description":"Rejected approvals matching all active filters except status."},"expired":{"type":"number","description":"Expired approvals matching all active filters except status."},"escalated":{"type":"number","description":"Escalated approvals matching all active filters except status."},"highRisk":{"type":"number","description":"High-risk approvals matching all active filters except status."},"expiredByTime":{"type":"number","description":"Approvals matching all active filters except status whose persisted expiry has passed."}},"required":["pending","approved","rejected","expired","escalated","highRisk","expiredByTime"]},"ApprovalPageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalSummaryDto"}},"summary":{"$ref":"#/components/schemas/ApprovalQueueSummaryDto"}},"required":["items","summary"]},"ApprovalMetadataDto":{"type":"object","properties":{"deliveryContent":{"type":"object","nullable":true},"customerId":{"type":"string","nullable":true},"customerName":{"type":"string","nullable":true},"customerPlatform":{"type":"string","nullable":true},"externalCustomerId":{"type":"string","nullable":true},"executionStatus":{"type":"string","nullable":true},"executionTriggerEvent":{"type":"string","nullable":true}}},"ApprovalHistoryEventDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"actorUserId":{"type":"string","nullable":true},"actorName":{"type":"string","nullable":true},"details":{"type":"object","nullable":true},"createdAt":{"type":"string"}},"required":["id","action","createdAt"]},"ApprovalDetailResponseDto":{"type":"object","properties":{"approval":{"$ref":"#/components/schemas/ApprovalSummaryDto"},"metadata":{"$ref":"#/components/schemas/ApprovalMetadataDto"},"recentThreadMessages":{"type":"array","items":{"$ref":"#/components/schemas/ThreadMessageDto"}},"history":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalHistoryEventDto"}}},"required":["approval","metadata","recentThreadMessages","history"]},"HandoffStatus":{"type":"string","enum":["OPEN","ACKNOWLEDGED","RESOLVED"]},"HandoffPriority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"HandoffSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"teamId":{"type":"string"},"customerId":{"type":"string"},"customerProfileId":{"type":"string","nullable":true},"customerName":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true},"priority":{"type":"string"},"status":{"type":"string"},"assignedTo":{"type":"string","nullable":true},"assignedToName":{"type":"string","nullable":true},"acknowledgedAt":{"type":"string","nullable":true},"resolvedAt":{"type":"string","nullable":true},"resolutionNotes":{"type":"string","nullable":true},"resolvedByName":{"type":"string","nullable":true},"customerPlatform":{"type":"string","nullable":true},"customerDisplayName":{"type":"string","nullable":true},"customerEmail":{"type":"string","nullable":true},"externalCustomerId":{"type":"string","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"inboundMessagesSinceOpen":{"type":"number","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","threadId","teamId","customerId","priority","status","createdAt","updatedAt"]},"HandoffQueueSummaryDto":{"type":"object","properties":{"open":{"type":"number","description":"Count of open handoffs matching all active filters except status."},"acknowledged":{"type":"number","description":"Count of acknowledged handoffs matching all active filters except status."},"resolved":{"type":"number","description":"Count of resolved handoffs matching all active filters except status."},"highPriority":{"type":"number","description":"Count of urgent or high-priority handoffs matching all active filters except status."},"overdueSupported":{"type":"boolean","description":"False until handoffs have a persisted SLA or due-date policy that can support overdue counts."}},"required":["open","acknowledged","resolved","highPriority","overdueSupported"]},"HandoffPageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/HandoffSummaryDto"}},"summary":{"$ref":"#/components/schemas/HandoffQueueSummaryDto"}},"required":["items","summary"]},"ActivityCategory":{"type":"string","enum":["MESSAGE","HANDOFF","APPROVAL","DELIVERY","TOOL","ERROR","SYSTEM"]},"ActivitySeverity":{"type":"string","enum":["INFO","WARNING","ERROR","CRITICAL"]},"ActivityPageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivitySummaryDto"}}},"required":["items"]},"ApproveAgentApprovalDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"editedContent":{"type":"string","maxLength":4000},"reviewNotes":{"type":"string","maxLength":1000}}},"RejectAgentApprovalDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"editedContent":{"type":"string","maxLength":4000},"reason":{"type":"string","maxLength":1000}},"required":["reason"]},"EscalateAgentApprovalDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"escalatedToUserId":{"type":"string"},"reason":{"type":"string","maxLength":1000}},"required":["escalatedToUserId"]},"AcceptHandoffDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"note":{"type":"string","maxLength":1000}}},"AcknowledgeHandoffDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"note":{"type":"string","maxLength":1000}}},"RejectHandoffDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"reason":{"type":"string","maxLength":1000}},"required":["reason"]},"ReassignHandoffDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"assignedToUserId":{"type":"string"},"note":{"type":"string","maxLength":1000}},"required":["assignedToUserId"]},"ResolveHandoffDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"resolutionNotes":{"type":"string","maxLength":1000}}},"SendHumanHandoffReplyDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"message":{"type":"string","maxLength":10000},"mediaUrls":{"type":"array","items":{"type":"string"}},"idempotencyKey":{"type":"string","maxLength":255}},"required":["message"]},"HumanHandoffReplyDeliveryDto":{"type":"object","properties":{"status":{"type":"string"},"providerMessageId":{"type":"string","nullable":true}},"required":["status"]},"HumanHandoffReplyResponseDto":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ThreadMessageDto"},"delivery":{"$ref":"#/components/schemas/HumanHandoffReplyDeliveryDto"},"handoff":{"$ref":"#/components/schemas/HandoffSummaryDto"},"thread":{"$ref":"#/components/schemas/ThreadDetailDto"}},"required":["message","delivery","handoff","thread"]},"BulkResolveHandoffsDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"handoffIds":{"type":"array","items":{"type":"string"}},"resolutionNotes":{"type":"string","maxLength":1000}},"required":["handoffIds"]},"BulkAcknowledgeHandoffsDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"handoffIds":{"type":"array","items":{"type":"string"}},"note":{"type":"string","maxLength":1000}},"required":["handoffIds"]},"ArchiveThreadDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"reason":{"type":"string","maxLength":1000}}},"ReopenThreadDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"reason":{"type":"string","maxLength":1000}}},"UpdateThreadPriorityDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"priority":{"allOf":[{"$ref":"#/components/schemas/HandoffPriority"}]}},"required":["priority"]},"CreateThreadInternalNoteDto":{"type":"object","properties":{"note":{"type":"string","maxLength":5000}},"required":["note"]},"CustomerModerationDto":{"type":"object","properties":{"optedOut":{"type":"boolean"},"optedOutAt":{"type":"string","nullable":true}},"required":["optedOut"]},"CustomerProfileSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"customerId":{"type":"string"},"customerPlatform":{"type":"string","nullable":true},"externalCustomerId":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"knownEmail":{"type":"string","nullable":true},"knownPhone":{"type":"string","nullable":true},"sentiment":{"type":"string","nullable":true},"lastTopicDiscussed":{"type":"string","nullable":true},"totalInteractions":{"type":"number"},"firstSeenAt":{"type":"string","nullable":true},"lastSeenAt":{"type":"string","nullable":true},"moderation":{"$ref":"#/components/schemas/CustomerModerationDto"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["id","teamId","customerId","totalInteractions","moderation"]},"CustomerProfileSummaryCountsDto":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"optedOut":{"type":"number"}},"required":["total","active","optedOut"]},"CustomerProfilePageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomerProfileSummaryDto"}},"summary":{"$ref":"#/components/schemas/CustomerProfileSummaryCountsDto"}},"required":["items","summary"]},"CustomerProfileDetailDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"customerId":{"type":"string"},"customerPlatform":{"type":"string","nullable":true},"externalCustomerId":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"knownEmail":{"type":"string","nullable":true},"knownPhone":{"type":"string","nullable":true},"sentiment":{"type":"string","nullable":true},"lastTopicDiscussed":{"type":"string","nullable":true},"totalInteractions":{"type":"number"},"firstSeenAt":{"type":"string","nullable":true},"lastSeenAt":{"type":"string","nullable":true},"moderation":{"$ref":"#/components/schemas/CustomerModerationDto"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"conversationSummary":{"type":"string","nullable":true},"reEngagementCount":{"type":"number"},"lastReEngagedAt":{"type":"string","nullable":true}},"required":["id","teamId","customerId","totalInteractions","moderation","reEngagementCount"]},"CustomerPreferenceDto":{"type":"object","properties":{"id":{"type":"string"},"customerProfileId":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"source":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","customerProfileId","key","value","createdAt","updatedAt"]},"CustomerTagDto":{"type":"object","properties":{"id":{"type":"string"},"customerProfileId":{"type":"string"},"value":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","customerProfileId","value","createdAt"]},"CustomerMemoryDto":{"type":"object","properties":{"id":{"type":"string"},"customerProfileId":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string","nullable":true},"content":{"type":"string"},"source":{"type":"string","nullable":true},"lastObservedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","customerProfileId","kind","content","createdAt","updatedAt"]},"CustomerNoteDto":{"type":"object","properties":{"id":{"type":"string"},"customerProfileId":{"type":"string"},"authorName":{"type":"string","nullable":true},"body":{"type":"string"},"isPinned":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","customerProfileId","body","isPinned","createdAt","updatedAt"]},"CustomerProfileDetailResponseDto":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/CustomerProfileDetailDto"},"preferences":{"type":"array","items":{"$ref":"#/components/schemas/CustomerPreferenceDto"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/CustomerTagDto"}},"memories":{"type":"array","items":{"$ref":"#/components/schemas/CustomerMemoryDto"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNoteDto"}},"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadSummaryDto"}},"handoffs":{"type":"array","items":{"$ref":"#/components/schemas/HandoffSummaryDto"}},"approvals":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalSummaryDto"}}},"required":["profile","preferences","tags","memories","notes","threads","handoffs","approvals"]},"UpdateCustomerProfileDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"displayName":{"type":"string"},"knownEmail":{"type":"string"},"knownPhone":{"type":"string"},"sentiment":{"type":"string"},"lastTopicDiscussed":{"type":"string"},"conversationSummary":{"type":"string"}}},"CustomerPreferenceInputDto":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"source":{"type":"string"}},"required":["key","value"]},"ReplaceCustomerPreferencesDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"preferences":{"type":"array","items":{"$ref":"#/components/schemas/CustomerPreferenceInputDto"}}},"required":["preferences"]},"UpdateCustomerModerationDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"optedOut":{"type":"boolean"},"moderationNotes":{"type":"string"}},"required":["optedOut"]},"ReplaceCustomerTagsDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"]},"CreateCustomerNoteDto":{"type":"object","properties":{"body":{"type":"string"},"isPinned":{"type":"boolean"}},"required":["body"]},"CustomerMemoryKind":{"type":"string","enum":["FACT","PREFERENCE","SUMMARY","OTHER"]},"CreateCustomerMemoryDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/CustomerMemoryKind"}]},"title":{"type":"string"},"content":{"type":"string"},"source":{"type":"string"},"relevanceScore":{"type":"number"}},"required":["content"]},"UpdateCustomerMemoryDto":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","description":"ISO updatedAt value observed by the client before submitting the command."},"kind":{"allOf":[{"$ref":"#/components/schemas/CustomerMemoryKind"}]},"title":{"type":"string"},"content":{"type":"string"},"source":{"type":"string"},"relevanceScore":{"type":"number"}}},"MetricSummaryDto":{"type":"object","properties":{"total":{"type":"number"},"byPlatform":{"type":"object","additionalProperties":{"type":"number"}}},"required":["total","byPlatform"]},"MetricChangeDto":{"type":"object","properties":{"absolute":{"type":"number"},"percentage":{"type":"number"}},"required":["absolute","percentage"]},"MetricSeriesPointDto":{"type":"object","properties":{"date":{"type":"string"},"total":{"type":"number"},"byPlatform":{"type":"object","additionalProperties":{"type":"number"}}},"required":["date","total","byPlatform"]},"AnalyticsCoverageDto":{"type":"object","properties":{"trackedPlatforms":{"type":"array","items":{"type":"string"}},"untrackedPlatforms":{"type":"array","items":{"type":"string"}},"lastFetchedAt":{"type":"object","additionalProperties":{"type":"string"}},"healthByPlatform":{"type":"object","additionalProperties":{"type":"object","properties":{"success":{"type":"integer"},"partial":{"type":"integer"},"failed":{"type":"integer"},"rateLimited":{"type":"integer"}}}}},"required":["trackedPlatforms","untrackedPlatforms","lastFetchedAt","healthByPlatform"]},"AnalyticsEngagementResponseDto":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/MetricSummaryDto"},"previous":{"$ref":"#/components/schemas/MetricSummaryDto"},"change":{"$ref":"#/components/schemas/MetricChangeDto"},"series":{"type":"array","items":{"$ref":"#/components/schemas/MetricSeriesPointDto"}},"coverage":{"$ref":"#/components/schemas/AnalyticsCoverageDto"},"reachSummary":{"description":"Reach metrics from REACH category","allOf":[{"$ref":"#/components/schemas/MetricSummaryDto"}]}},"required":["summary","previous","change","series","coverage","reachSummary"]},"PlatformSyncStateDto":{"type":"object","properties":{"integrationId":{"type":"string"},"platform":{"type":"string"},"state":{"type":"string","enum":["NOT_CONNECTED","PENDING","SYNCING","SYNCED","RECOVERING","STALLED","FAILED","RATE_LIMITED"]},"importedDays":{"type":"number"},"successfulDays":{"type":"number","description":"Days with a successful or partial snapshot"},"failedDays":{"type":"number","description":"Days whose ingestion attempt failed"},"totalDays":{"type":"number"},"lastSuccessfulSyncAt":{"type":"string"},"nextSyncAt":{"type":"string"},"lastAttemptAt":{"type":"string"},"lastProgressAt":{"type":"string"},"importStartedAt":{"type":"string"},"etaSeconds":{"type":"number"},"recoveryAttempts":{"type":"number"},"retryEligible":{"type":"boolean"},"error":{"type":"string"}},"required":["platform","state","importedDays","successfulDays","failedDays","totalDays","recoveryAttempts","retryEligible"]},"SyncStatusResponseDto":{"type":"object","properties":{"overallState":{"type":"string","enum":["NO_INTEGRATIONS","SYNCING","PARTIAL","READY"]},"overallProgress":{"type":"number","description":"Progress percentage 0-100"},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/PlatformSyncStateDto"}}},"required":["overallState","overallProgress","platforms"]},"RetryAnalyticsImportResponseDto":{"type":"object","properties":{"accepted":{"type":"boolean"}},"required":["accepted"]},"CompleteShopifyConnectionDto":{"type":"object","properties":{}},"CreateIntegrationDto":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID to create the integration under"},"accountId":{"type":"string","description":"External platform account ID (canonical identity — must not be empty)"},"aliasAccountId":{"type":"string","description":"Alias account ID (e.g. WhatsApp WABA ID)"},"platform":{"type":"string","description":"Social platform identifier","example":"instagram"},"name":{"type":"string","description":"Display name for the integration"},"username":{"type":"string","description":"Username on the platform"},"accessToken":{"type":"string","description":"OAuth access token from the platform"},"refreshToken":{"type":"string","description":"OAuth refresh token"},"grantedScopes":{"description":"Granted OAuth scopes","type":"array","items":{"type":"string"}},"profileImage":{"type":"string","description":"Profile image URL"},"wabaId":{"type":"string","description":"WhatsApp Business Account ID"},"phoneNumberId":{"type":"string","description":"WhatsApp phone number ID"},"businessAccountName":{"type":"string","description":"WhatsApp business account name"},"defaultTemplateName":{"type":"string","description":"Default WhatsApp template name"},"defaultTemplateLanguage":{"type":"string","description":"Default WhatsApp template language"},"defaultTemplateParamsSchema":{"type":"string","description":"Default WhatsApp template params schema JSON"},"expiresAt":{"type":"number","description":"Token expiry timestamp (ms since epoch)"}},"required":["teamId","accountId","platform","accessToken"]},"IntegrationPostingPreflightRequestDto":{"type":"object","properties":{"teamId":{"type":"string","description":"Team that owns the integrations"},"integrationIds":{"description":"Integration IDs to evaluate. When omitted, all team integrations are checked.","type":"array","items":{"type":"string"}}},"required":["teamId"]},"ReconnectIntegrationDto":{"type":"object","properties":{"accessToken":{"type":"string","description":"OAuth access token from the platform"},"expiresAt":{"type":"number","description":"Token expiry timestamp (ms since epoch)"},"refreshToken":{"type":"string","description":"OAuth refresh token"},"grantedScopes":{"description":"Granted OAuth scopes","type":"array","items":{"type":"string"}},"accountId":{"type":"string","description":"External platform account ID"},"aliasAccountId":{"type":"string","description":"Alias account ID (e.g. WhatsApp WABA ID)"},"name":{"type":"string","description":"Display name for the integration"},"username":{"type":"string","description":"Username on the platform"},"profileImage":{"type":"string","description":"Profile image URL"},"wabaId":{"type":"string","description":"WhatsApp Business Account ID"},"phoneNumberId":{"type":"string","description":"WhatsApp phone number ID"},"businessAccountName":{"type":"string","description":"WhatsApp business account name"},"defaultTemplateName":{"type":"string","description":"Default WhatsApp template name"},"defaultTemplateLanguage":{"type":"string","description":"Default WhatsApp template language"},"defaultTemplateParamsSchema":{"type":"string","description":"Default WhatsApp template params schema JSON"},"userId":{"type":"string","description":"User ID associated with the integration token"}},"required":["accessToken","expiresAt"]},"ToggleConnectionDto":{"type":"object","properties":{"connect":{"type":"boolean","description":"Desired connection state"}},"required":["connect"]},"UpdateWhatsappTemplateDto":{"type":"object","properties":{"defaultTemplateName":{"type":"string","description":"Default WhatsApp template name"},"defaultTemplateLanguage":{"type":"string","description":"Default WhatsApp template language"},"defaultTemplateParamsSchema":{"type":"string","description":"Default WhatsApp template params schema JSON"}},"required":["defaultTemplateName","defaultTemplateLanguage"]},"ConnectTelegramIntegrationDto":{"type":"object","properties":{"teamId":{"type":"string"},"botToken":{"type":"string","writeOnly":true}},"required":["teamId","botToken"]},"TelegramIntegrationResponseDto":{"type":"object","properties":{"integrationId":{"type":"string"},"botId":{"type":"string"},"botUsername":{"type":"string"},"webhookUrl":{"type":"string"}},"required":["integrationId","botId","botUsername","webhookUrl"]},"ReconnectTelegramIntegrationDto":{"type":"object","properties":{"botToken":{"type":"string","writeOnly":true}},"required":["botToken"]},"TikTokProfileStatsDto":{"type":"object","properties":{"followerCount":{"type":"number"},"followingCount":{"type":"number"},"likesCount":{"type":"number"},"videoCount":{"type":"number"}},"required":["followerCount","followingCount","likesCount","videoCount"]},"TikTokProfileResponseDto":{"type":"object","properties":{"integrationId":{"type":"string"},"openId":{"type":"string"},"unionId":{"type":"string","nullable":true},"displayName":{"type":"string"},"username":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"bioDescription":{"type":"string","nullable":true},"profileDeepLink":{"type":"string","nullable":true},"isVerified":{"type":"boolean"},"stats":{"$ref":"#/components/schemas/TikTokProfileStatsDto"},"fetchedAt":{"type":"string","format":"date-time"}},"required":["integrationId","openId","displayName","username","isVerified","stats","fetchedAt"]},"AdminDashboardUsersDto":{"type":"object","properties":{"total":{"type":"number","description":"Total users"},"active":{"type":"number","description":"Users active in the last 30 days"},"banned":{"type":"number","description":"Banned users"},"admins":{"type":"number","description":"Admin/support/super-admin users"},"newLast30Days":{"type":"number","description":"New users in the last 30 days. Always 0 because the User table has no account-creation timestamp; this metric is excluded from the UI until a trustworthy timestamp is introduced."}},"required":["total","active","banned","admins","newLast30Days"]},"AdminDashboardTeamsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total teams"},"active":{"type":"number","description":"Active teams"}},"required":["total","active"]},"AdminDashboardProjectsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total projects"},"active":{"type":"number","description":"Active projects"},"archived":{"type":"number","description":"Archived projects"}},"required":["total","active","archived"]},"AdminDashboardPostsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total live posts"},"draft":{"type":"number","description":"Draft posts"},"scheduled":{"type":"number","description":"Scheduled posts"},"published":{"type":"number","description":"Published posts"},"failed":{"type":"number","description":"Failed posts"}},"required":["total","draft","scheduled","published","failed"]},"AdminDashboardAutomationsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total automations"},"active":{"type":"number","description":"Enabled automations"},"paused":{"type":"number","description":"Paused automations"},"executions":{"type":"number","description":"Total DM and comment executions"}},"required":["total","active","paused","executions"]},"AdminDashboardIntegrationsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total integrations"},"connected":{"type":"number","description":"Connected integrations"},"error":{"type":"number","description":"Integrations in error state"}},"required":["total","connected","error"]},"AdminDashboardLeadsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total leads"},"new":{"type":"number","description":"New leads"},"contacted":{"type":"number","description":"Contacted leads"},"qualified":{"type":"number","description":"Qualified leads"}},"required":["total","new","contacted","qualified"]},"AdminDashboardSubscriptionsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total billable subscriptions"},"active":{"type":"number","description":"Active or trialing subscriptions"},"pastDue":{"type":"number","description":"Past-due subscriptions"},"canceled":{"type":"number","description":"Canceled subscriptions"},"mrr":{"type":"number","description":"Monthly recurring revenue in USD dollars"}},"required":["total","active","pastDue","canceled","mrr"]},"AdminDashboardMediaDto":{"type":"object","properties":{"total":{"type":"number","description":"Total live media items"},"totalBytes":{"type":"number","description":"Total size of live media in bytes"},"images":{"type":"number","description":"Image count"},"videos":{"type":"number","description":"Video count"}},"required":["total","totalBytes","images","videos"]},"AdminDashboardNotificationsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total notifications"},"unread":{"type":"number","description":"Unread notifications"},"today":{"type":"number","description":"Notifications created in the last 24 hours"}},"required":["total","unread","today"]},"AdminDashboardInvitationsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total invitations"},"pending":{"type":"number","description":"Pending invitations"},"accepted":{"type":"number","description":"Accepted invitations"},"rejected":{"type":"number","description":"Declined or revoked invitations"},"expired":{"type":"number","description":"Expired invitations"}},"required":["total","pending","accepted","rejected","expired"]},"AdminDashboardFeedbackDto":{"type":"object","properties":{"total":{"type":"number","description":"Total feedback records"},"open":{"type":"number","description":"Open feedback records"},"resolved":{"type":"number","description":"Resolved feedback records"},"averageRating":{"type":"number","description":"Average feedback rating (1-5)"}},"required":["total","open","resolved","averageRating"]},"AdminDashboardActivityDto":{"type":"object","properties":{"total":{"type":"number","description":"Total activity logs"},"today":{"type":"number","description":"Activity logs created in the last 24 hours"}},"required":["total","today"]},"AdminDashboardAiUsageDto":{"type":"object","properties":{"messages":{"type":"number","description":"Successfully completed customer-message agent executions in the last 30 days."},"promptTokens":{"type":"number","description":"Prompt tokens in the last 30 days"},"completionTokens":{"type":"number","description":"Completion tokens in the last 30 days"},"totalTokens":{"type":"number","description":"Total tokens in the last 30 days"},"estimatedCostUsd":{"type":"number","description":"Estimated AI cost in USD dollars"}},"required":["messages","promptTokens","completionTokens","totalTokens","estimatedCostUsd"]},"AdminDashboardMaintenanceWindowsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total maintenance windows"},"active":{"type":"number","description":"Currently active maintenance windows"},"scheduled":{"type":"number","description":"Scheduled maintenance windows"}},"required":["total","active","scheduled"]},"AdminDashboardDemoRequestsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total demo requests"},"new":{"type":"number","description":"New demo requests"},"contacted":{"type":"number","description":"Contacted demo requests"},"scheduled":{"type":"number","description":"Scheduled demo requests"},"closed":{"type":"number","description":"Closed demo requests"}},"required":["total","new","contacted","scheduled","closed"]},"AdminDashboardSystemSettingsDto":{"type":"object","properties":{"maintenanceMode":{"type":"boolean","description":"Whether maintenance mode is enabled"},"disabled":{"type":"boolean","description":"Whether the platform is disabled"}},"required":["maintenanceMode","disabled"]},"AdminDashboardOpsAlertsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total ops alerts"},"open":{"type":"number","description":"Open ops alerts"},"critical":{"type":"number","description":"Critical ops alerts"}},"required":["total","open","critical"]},"AdminDashboardSummaryResponseDto":{"type":"object","properties":{"users":{"$ref":"#/components/schemas/AdminDashboardUsersDto"},"teams":{"$ref":"#/components/schemas/AdminDashboardTeamsDto"},"projects":{"$ref":"#/components/schemas/AdminDashboardProjectsDto"},"posts":{"$ref":"#/components/schemas/AdminDashboardPostsDto"},"automations":{"$ref":"#/components/schemas/AdminDashboardAutomationsDto"},"integrations":{"$ref":"#/components/schemas/AdminDashboardIntegrationsDto"},"leads":{"$ref":"#/components/schemas/AdminDashboardLeadsDto"},"subscriptions":{"$ref":"#/components/schemas/AdminDashboardSubscriptionsDto"},"media":{"$ref":"#/components/schemas/AdminDashboardMediaDto"},"notifications":{"$ref":"#/components/schemas/AdminDashboardNotificationsDto"},"invitations":{"$ref":"#/components/schemas/AdminDashboardInvitationsDto"},"feedback":{"$ref":"#/components/schemas/AdminDashboardFeedbackDto"},"activity":{"$ref":"#/components/schemas/AdminDashboardActivityDto"},"aiUsage":{"$ref":"#/components/schemas/AdminDashboardAiUsageDto"},"maintenanceWindows":{"$ref":"#/components/schemas/AdminDashboardMaintenanceWindowsDto"},"demoRequests":{"$ref":"#/components/schemas/AdminDashboardDemoRequestsDto"},"systemSettings":{"$ref":"#/components/schemas/AdminDashboardSystemSettingsDto"},"opsAlerts":{"$ref":"#/components/schemas/AdminDashboardOpsAlertsDto"}},"required":["users","teams","projects","posts","automations","integrations","leads","subscriptions","media","notifications","invitations","feedback","activity","aiUsage","maintenanceWindows","demoRequests","systemSettings","opsAlerts"]},"AdminDashboardTrendsDailyPointDto":{"type":"object","properties":{"date":{"type":"string","description":"UTC date in YYYY-MM-DD format"},"users":{"type":"number","description":"New users created on this day. Always 0 because the User table has no account-creation timestamp; the UI omits the users series from trend charts."},"posts":{"type":"number","description":"Posts created on this day"},"leads":{"type":"number","description":"Leads created on this day"},"activity":{"type":"number","description":"Activity logs created on this day"},"aiMessages":{"type":"number","description":"Successfully completed customer-message agent executions on this day."},"aiTokens":{"type":"number","description":"AI tokens consumed on this day"},"aiCostUsd":{"type":"number","description":"Estimated AI cost on this day in USD dollars"}},"required":["date","users","posts","leads","activity","aiMessages","aiTokens","aiCostUsd"]},"AdminDashboardTrendsMonthlyRevenueDto":{"type":"object","properties":{"month":{"type":"string","description":"Billing month in YYYY-MM format"},"revenue":{"type":"number","description":"Revenue for the month in USD dollars"}},"required":["month","revenue"]},"AdminDashboardTrendsResponseDto":{"type":"object","properties":{"daily":{"type":"array","items":{"$ref":"#/components/schemas/AdminDashboardTrendsDailyPointDto"}},"monthlyRevenue":{"type":"array","items":{"$ref":"#/components/schemas/AdminDashboardTrendsMonthlyRevenueDto"}}},"required":["daily","monthlyRevenue"]},"AdminAttributionAnalyticsTotalsDto":{"type":"object","properties":{"events":{"type":"number"},"leadsCaptured":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["events","leadsCaptured","conversions","revenue"]},"AdminAttributionAnalyticsPlatformBucketDto":{"type":"object","properties":{"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"},"platform":{"type":"string"}},"required":["events","conversions","revenue","platform"]},"AdminAttributionAnalyticsCampaignBucketDto":{"type":"object","properties":{"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"},"campaign":{"type":"string"}},"required":["events","conversions","revenue","campaign"]},"AdminAttributionAnalyticsTeamBucketDto":{"type":"object","properties":{"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"},"teamId":{"type":"string"},"teamName":{"type":"string"}},"required":["events","conversions","revenue","teamId","teamName"]},"AdminAttributionAnalyticsProjectBucketDto":{"type":"object","properties":{"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"},"projectId":{"type":"string","nullable":true},"projectName":{"type":"string"},"teamName":{"type":"string"}},"required":["events","conversions","revenue","projectId","projectName","teamName"]},"AdminAttributionAnalyticsFeatureBucketDto":{"type":"object","properties":{"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"},"feature":{"type":"string"}},"required":["events","conversions","revenue","feature"]},"AdminAttributionAnalyticsResponseDto":{"type":"object","properties":{"days":{"type":"number"},"generatedAt":{"type":"number"},"windowStart":{"type":"string"},"windowEnd":{"type":"string"},"totals":{"$ref":"#/components/schemas/AdminAttributionAnalyticsTotalsDto"},"byPlatform":{"type":"array","items":{"$ref":"#/components/schemas/AdminAttributionAnalyticsPlatformBucketDto"}},"byCampaign":{"type":"array","items":{"$ref":"#/components/schemas/AdminAttributionAnalyticsCampaignBucketDto"}},"byTeam":{"type":"array","items":{"$ref":"#/components/schemas/AdminAttributionAnalyticsTeamBucketDto"}},"byProject":{"type":"array","items":{"$ref":"#/components/schemas/AdminAttributionAnalyticsProjectBucketDto"}},"byFeature":{"type":"array","items":{"$ref":"#/components/schemas/AdminAttributionAnalyticsFeatureBucketDto"}}},"required":["days","generatedAt","windowStart","windowEnd","totals","byPlatform","byCampaign","byTeam","byProject","byFeature"]},"AdminUsageAnalyticsMeterBucketDto":{"type":"object","properties":{"meter":{"type":"string"},"label":{"type":"string"},"units":{"type":"number"},"entryCount":{"type":"number"}},"required":["meter","label","units","entryCount"]},"AdminUsageAnalyticsOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminUsageAnalyticsOrganizationBucketDto":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/AdminUsageAnalyticsOrganizationDto"},"entryCount":{"type":"number"}},"required":["organization","entryCount"]},"AdminUsageAnalyticsResponseDto":{"type":"object","properties":{"days":{"type":"number"},"generatedAt":{"type":"number"},"windowStart":{"type":"string"},"windowEnd":{"type":"string"},"byMeter":{"type":"array","items":{"$ref":"#/components/schemas/AdminUsageAnalyticsMeterBucketDto"}},"byOrganization":{"type":"array","items":{"$ref":"#/components/schemas/AdminUsageAnalyticsOrganizationBucketDto"}}},"required":["days","generatedAt","windowStart","windowEnd","byMeter","byOrganization"]},"AdminRevenueCurrencyValueDto":{"type":"object","properties":{"currency":{"type":"string","description":"Currency code (uppercase)."},"mrr":{"type":"number","description":"Monthly recurring value in major currency units."},"arr":{"type":"number","description":"Annualized recurring value in major currency units (MRR × 12)."},"paidOrganizations":{"type":"number","description":"Number of paid organizations contributing to this currency."}},"required":["currency","mrr","arr","paidOrganizations"]},"AdminRevenueCountsDto":{"type":"object","properties":{"active":{"type":"number"},"trialing":{"type":"number"},"pastDue":{"type":"number"},"canceled":{"type":"number"},"free":{"type":"number"},"paid":{"type":"number"},"total":{"type":"number"}},"required":["active","trialing","pastDue","canceled","free","paid","total"]},"AdminRevenuePlanDto":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","pro","growth","enterprise"]},"organizations":{"type":"number","description":"Organizations with this effective plan (active, trialing, past-due, or free)."},"paidOrganizations":{"type":"number"},"recurringValue":{"type":"array","items":{"$ref":"#/components/schemas/AdminRevenueCurrencyValueDto"}}},"required":["plan","organizations","paidOrganizations","recurringValue"]},"AdminRevenueOrganizationRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminRevenueOrganizationDto":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/AdminRevenueOrganizationRefDto"},"plan":{"type":"string","enum":["starter","pro","growth","enterprise"]},"status":{"type":"string","description":"Canonical subscription status category."},"mrr":{"type":"number"},"currency":{"type":"string"},"isFreeForever":{"type":"boolean"}},"required":["organization","plan","status","mrr","currency","isFreeForever"]},"AdminRevenueResponseDto":{"type":"object","properties":{"generatedAt":{"type":"number"},"primaryCurrency":{"type":"string","description":"Primary currency (largest MRR). Recurring-value cards should use this currency."},"averageMrr":{"type":"number","description":"Average contracted MRR per paid organization in the primary currency."},"recurringValue":{"type":"array","items":{"$ref":"#/components/schemas/AdminRevenueCurrencyValueDto"}},"counts":{"$ref":"#/components/schemas/AdminRevenueCountsDto"},"byPlan":{"type":"array","items":{"$ref":"#/components/schemas/AdminRevenuePlanDto"}},"byOrganization":{"type":"array","items":{"$ref":"#/components/schemas/AdminRevenueOrganizationDto"}}},"required":["generatedAt","primaryCurrency","averageMrr","recurringValue","counts","byPlan","byOrganization"]},"AdminUserPreferencesDto":{"type":"object","properties":{"language":{"type":"string"},"timezone":{"type":"string","nullable":true},"emailNotifications":{"type":"boolean"},"pushNotifications":{"type":"boolean"},"notificationSound":{"type":"boolean"},"newComments":{"type":"boolean"},"productUpdates":{"type":"boolean"},"desktopNotifications":{"type":"boolean"}},"required":["language","emailNotifications","pushNotifications","notificationSound","newComments","productUpdates","desktopNotifications"]},"AdminUserBanDto":{"type":"object","properties":{"is":{"type":"boolean"},"reason":{"type":"string","nullable":true},"at":{"type":"number","nullable":true},"by":{"type":"string","nullable":true}},"required":["is"]},"AdminUserDetailStatsDto":{"type":"object","properties":{"teamsOwned":{"type":"number"},"memberTeams":{"type":"number"},"projectsOwned":{"type":"number"},"memberProjects":{"type":"number"},"postsAuthored":{"type":"number"},"invitationsSent":{"type":"number"},"notifications":{"type":"number"},"unreadNotifications":{"type":"number"},"activityLogs":{"type":"number"},"integrations":{"type":"number"},"organizationMemberships":{"type":"number"},"teamAssignments":{"type":"number"}},"required":["teamsOwned","memberTeams","projectsOwned","memberProjects","postsAuthored","invitationsSent","notifications","unreadNotifications","activityLogs","integrations","organizationMemberships","teamAssignments"]},"AdminOrganizationMembershipDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"organizationRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"status":{"type":"string","enum":["active"]},"joinedAt":{"format":"date-time","type":"string"},"teamAssignmentCount":{"type":"number"}},"required":["id","organizationId","organizationName","organizationSlug","organizationRole","status","joinedAt","teamAssignmentCount"]},"AdminUserTeamAssignmentDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"organizationId":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true},"organizationSlug":{"type":"string","nullable":true},"teamRole":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"]},"status":{"type":"string","enum":["active"]},"assignedAt":{"format":"date-time","type":"string"},"organizationMembershipPresent":{"type":"boolean"}},"required":["id","teamId","teamName","teamRole","status","assignedAt","organizationMembershipPresent"]},"AdminUserTeamSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"number"},"role":{"type":"string","nullable":true}},"required":["id","name","createdAt"]},"AdminUserTeamsDto":{"type":"object","properties":{"owned":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserTeamSummaryDto"}},"memberOf":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserTeamSummaryDto"}}},"required":["owned","memberOf"]},"AdminUserProjectSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"number"},"isArchived":{"type":"boolean"},"role":{"type":"string","nullable":true}},"required":["id","name","createdAt","isArchived"]},"AdminUserProjectsDto":{"type":"object","properties":{"owned":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserProjectSummaryDto"}},"memberOf":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserProjectSummaryDto"}}},"required":["owned","memberOf"]},"AdminUserActivityDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"timestamp":{"type":"number"}},"required":["id","action","timestamp"]},"AdminUserIntegrationDto":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"account":{"type":"string"},"status":{"type":"string"},"lastSync":{"type":"number","nullable":true},"createdAt":{"type":"number"}},"required":["id","platform","account","status","createdAt"]},"AdminUserNotificationDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"message":{"type":"string","nullable":true},"read":{"type":"boolean"},"timestamp":{"type":"number"}},"required":["id","title","read","timestamp"]},"AdminUserDetailDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"role":{"type":"string"},"joinedAt":{"type":"number","nullable":true},"updatedAt":{"type":"number","nullable":true},"lastActiveAt":{"type":"number","nullable":true},"bio":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true},"clerkId":{"type":"string"},"polarCustomerId":{"type":"string","nullable":true},"hasOnboarded":{"type":"boolean"},"isFreeForever":{"type":"boolean"},"preferences":{"$ref":"#/components/schemas/AdminUserPreferencesDto"},"banned":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminUserBanDto"}]},"stats":{"$ref":"#/components/schemas/AdminUserDetailStatsDto"},"organizationMemberships":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationMembershipDto"}},"teamAssignments":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserTeamAssignmentDto"}},"relationshipIntegrityWarnings":{"type":"array","items":{"type":"string"}},"teams":{"$ref":"#/components/schemas/AdminUserTeamsDto"},"projects":{"$ref":"#/components/schemas/AdminUserProjectsDto"},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserActivityDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserIntegrationDto"}},"recentNotifications":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserNotificationDto"}}},"required":["id","name","email","role","clerkId","hasOnboarded","isFreeForever","preferences","stats","organizationMemberships","teamAssignments","relationshipIntegrityWarnings","teams","projects","recentActivity","integrations","recentNotifications"]},"AdminUserDetailResponseDto":{"type":"object","properties":{"error":{"type":"boolean"},"user":{"$ref":"#/components/schemas/AdminUserDetailDto"}},"required":["error","user"]},"AdminBanUserDto":{"type":"object","properties":{"reason":{"type":"string","nullable":true}}},"AdminUserActionResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"userId":{"type":"string"}},"required":["success","userId"]},"AdminUpdateUserRoleDto":{"type":"object","properties":{"role":{"type":"string","enum":["user","support","admin","super_admin"]}},"required":["role"]},"AdminUserRoleUpdateResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"userId":{"type":"string"},"role":{"type":"string"},"clerkId":{"type":"string"}},"required":["success","userId","role","clerkId"]},"AdminOrganizationMemberItemDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"status":{"type":"string","enum":["active"]},"joinedAt":{"format":"date-time","type":"string"},"teamAssignmentCount":{"type":"number"}},"required":["id","userId","name","email","organizationRole","status","joinedAt","teamAssignmentCount"]},"AdminOrganizationMembersResponseDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationMemberItemDto"}}},"required":["page","pageSize","total","totalPages","hasMore","items"]},"AdminOrganizationInvitationItemDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string"},"organizationRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"status":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED","REVOKED","EXPIRED"]},"inviterId":{"type":"string"},"inviterName":{"type":"string"},"pendingTeamId":{"type":"string","nullable":true},"pendingTeamName":{"type":"string","nullable":true},"pendingTeamRole":{"type":"string","nullable":true,"enum":["OWNER","ADMIN","EDITOR","VIEWER"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"acceptedAt":{"format":"date-time","type":"string","nullable":true},"revokedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","organizationId","email","organizationRole","status","inviterId","inviterName","createdAt","updatedAt","expiresAt"]},"AdminOrganizationInvitationsResponseDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationInvitationItemDto"}}},"required":["page","pageSize","total","totalPages","hasMore","items"]},"AdminOrganizationItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["PERSONAL","BUSINESS"]},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"billingEmail":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"teamCount":{"type":"number"},"memberCount":{"type":"number"},"pendingInvitationCount":{"type":"number"}},"required":["id","name","slug","type","status","createdAt","updatedAt","teamCount","memberCount","pendingInvitationCount"]},"AdminOrganizationsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationItemDto"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["items","page","pageSize","total","totalPages","hasMore"]},"AdminOrganizationTeamPreviewDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","status","createdAt","updatedAt"]},"AdminOrganizationDetailResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["PERSONAL","BUSINESS"]},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"billingEmail":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"teamCount":{"type":"number"},"memberCount":{"type":"number"},"pendingInvitationCount":{"type":"number"},"ownerUserId":{"type":"string"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationTeamPreviewDto"}}},"required":["id","name","slug","type","status","createdAt","updatedAt","teamCount","memberCount","pendingInvitationCount","ownerUserId","teams"]},"AdminOrganizationEntitlementsDto":{"type":"object","properties":{"teams":{"type":"number"},"projects":{"type":"number"},"posts":{"type":"number"},"membersPerTeam":{"type":"number"},"storageQuota":{"type":"number"},"commentAutomations":{"type":"number"},"commentAutomationRunsPerMonth":{"type":"number"},"dmAutomationRunsPerMonth":{"type":"number"},"aiContentGenerations":{"type":"number"},"aiShortVideoGenerationsPerMonth":{"type":"number"},"postIntegrations":{"type":"number"},"aiGenerationsPerMonth":{"type":"number"}},"required":["teams","projects","posts","membersPerTeam","storageQuota","commentAutomations","commentAutomationRunsPerMonth","dmAutomationRunsPerMonth","aiContentGenerations","aiShortVideoGenerationsPerMonth","postIntegrations","aiGenerationsPerMonth"]},"AdminOrganizationBillingResponseDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization identifier"},"plan":{"type":"string","description":"Resolved billing plan"},"subscriptionStatus":{"type":"string","description":"Subscription status","enum":["active","trialing","past_due","canceled","incomplete","inactive","none"]},"billingInterval":{"type":"string","description":"Billing interval","enum":["month","year"],"nullable":true},"currentPeriodStart":{"type":"number","description":"Current billing period start timestamp in milliseconds","nullable":true},"currentPeriodEnd":{"type":"number","description":"Current billing period end timestamp in milliseconds","nullable":true},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether the subscription is scheduled to cancel at period end","nullable":true},"billingEmail":{"type":"string","description":"Billing email associated with the Organization","nullable":true},"confirmedAddonSeats":{"type":"number","description":"Confirmed enterprise add-on seats"},"polarCustomerId":{"type":"string","description":"Polar customer identifier","nullable":true},"subscriptionId":{"type":"string","description":"Polar subscription identifier","nullable":true},"lastSyncAt":{"type":"number","description":"Timestamp of the last successful billing sync in milliseconds","nullable":true},"lastSyncError":{"type":"string","description":"Last billing synchronization error","nullable":true},"isFreeForever":{"type":"boolean","description":"Whether the Organization is free-forever","nullable":true},"entitlements":{"$ref":"#/components/schemas/AdminOrganizationEntitlementsDto"}},"required":["organizationId","plan","subscriptionStatus","confirmedAddonSeats","entitlements"]},"AdminOrganizationUsageMeterDto":{"type":"object","properties":{"id":{"type":"string","description":"Meter identifier"},"label":{"type":"string","description":"Human-readable meter label"},"used":{"type":"number","description":"Units consumed in the current billing period"},"limit":{"type":"number","description":"Monthly limit for the resolved plan"},"remaining":{"type":"number","description":"Remaining units before limit"},"unlimited":{"type":"boolean","description":"Whether the meter is unlimited on this plan"},"category":{"type":"string","description":"Meter category for grouping","enum":["account","ai","operations","storage"]}},"required":["id","label","used","limit","remaining","unlimited","category"]},"AdminOrganizationUsageGroupDto":{"type":"object","properties":{"key":{"type":"string","description":"Group key"},"label":{"type":"string","description":"Group display label"},"meters":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationUsageMeterDto"}}},"required":["key","label","meters"]},"AdminOrganizationUsageResponseDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization identifier"},"billingPeriodStart":{"type":"number","description":"Current billing period start timestamp in milliseconds"},"billingPeriodEnd":{"type":"number","description":"Current billing period end timestamp in milliseconds"},"billingPeriodSource":{"type":"string","description":"Source of the billing period bounds"},"plan":{"type":"string","description":"Plan used to resolve limits"},"meters":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationUsageMeterDto"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationUsageGroupDto"}}},"required":["organizationId","billingPeriodStart","billingPeriodEnd","billingPeriodSource","plan","meters","groups"]},"AdminOrganizationUsageLedgerItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Ledger entry identifier"},"meter":{"type":"string","description":"Meter identifier"},"meterLabel":{"type":"string","description":"Human-readable meter label"},"units":{"type":"number","description":"Units consumed"},"teamId":{"type":"string","description":"Team identifier when usage is attributable to a Team","nullable":true},"projectId":{"type":"string","description":"Project identifier when usage is attributable to a Project","nullable":true},"source":{"type":"string","description":"Source of the usage entry"},"sourceId":{"type":"string","description":"Source entity identifier","nullable":true},"status":{"type":"string","description":"Processing status"},"billingPeriodStart":{"type":"number","description":"Billing period start timestamp in milliseconds","nullable":true},"billingPeriodEnd":{"type":"number","description":"Billing period end timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"}},"required":["id","meter","meterLabel","units","source","status","createdAt"]},"AdminOrganizationUsageLedgerResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationUsageLedgerItemDto"}},"nextCursor":{"type":"string","description":"Opaque cursor for the next page","nullable":true}},"required":["items"]},"AdminTeamOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"plan":{"type":"string","description":"Organization billing plan","nullable":true},"subscriptionStatus":{"type":"string","description":"Organization subscription status","nullable":true}},"required":["id","name","slug","status"]},"AdminTeamItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"ownerId":{"type":"string","description":"Owning user identifier"},"name":{"type":"string","description":"Team display name"},"description":{"type":"string","description":"Team description","nullable":true},"normalizedName":{"type":"string","description":"Normalized team name for search","nullable":true},"isDefault":{"type":"boolean","description":"Whether this is the owner's default team"},"isDeleted":{"type":"boolean","description":"Whether the team has been soft-deleted"},"deletedAt":{"type":"number","description":"Deletion timestamp in milliseconds when soft-deleted","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"owner":{"type":"string","description":"Display name or email of the team owner"},"ownerEmail":{"type":"string","description":"Email of the team owner","nullable":true},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminTeamOrganizationDto"}]},"members":{"type":"number","description":"Number of active team members"},"projects":{"type":"number","description":"Number of active projects"},"status":{"type":"string","description":"Computed team status","enum":["active","inactive"]},"lastActivityAt":{"type":"number","description":"Timestamp of the most recent activity in milliseconds","nullable":true}},"required":["id","ownerId","name","isDefault","isDeleted","createdAt","updatedAt","owner","members","projects","status"]},"AdminTeamStatsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of teams matching the query"},"active":{"type":"number","description":"Number of active teams"},"teamMembers":{"type":"number","description":"Total active members across all matching teams"}},"required":["total","active","teamMembers"]},"AdminTeamsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamItemDto"}},"stats":{"$ref":"#/components/schemas/AdminTeamStatsDto"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total matching items"},"totalPages":{"type":"number","description":"Total available pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminTeamDetailOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Owner user identifier"},"name":{"type":"string","description":"Owner display name"},"email":{"type":"string","description":"Owner email address","nullable":true}},"required":["id","name"]},"AdminTeamDetailStatsDto":{"type":"object","properties":{"members":{"type":"number","description":"Active member count"},"projects":{"type":"number","description":"Active project count"},"integrations":{"type":"number","description":"Connected integration count"}},"required":["members","projects","integrations"]},"AdminTeamDetailMemberDto":{"type":"object","properties":{"id":{"type":"string","description":"Team member user identifier"},"role":{"type":"string","description":"Team role"},"joinedAt":{"type":"number","description":"Join timestamp in milliseconds"},"name":{"type":"string","description":"Member display name"},"email":{"type":"string","description":"Member email address","nullable":true},"organizationRole":{"type":"string","nullable":true,"enum":["OWNER","ADMIN","MEMBER"]},"organizationMembershipPresent":{"type":"boolean"}},"required":["id","role","joinedAt","name","organizationMembershipPresent"]},"AdminTeamDetailProjectDto":{"type":"object","properties":{"id":{"type":"string","description":"Project identifier"},"name":{"type":"string","description":"Project name"},"status":{"type":"string","description":"Project status","enum":["active","paused"]},"posts":{"type":"number","description":"Live post count for the project"},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"}},"required":["id","name","status","posts","createdAt"]},"AdminTeamDetailIntegrationDto":{"type":"object","properties":{"id":{"type":"string","description":"Integration identifier"},"platform":{"type":"string","description":"Display platform label"},"account":{"type":"string","description":"Connected account label"},"status":{"type":"string","description":"Integration status"},"lastSync":{"type":"number","description":"Last sync timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"}},"required":["id","platform","account","status","createdAt"]},"AdminTeamDetailActivityDto":{"type":"object","properties":{"id":{"type":"string","description":"Activity log identifier"},"action":{"type":"string","description":"Activity action"},"details":{"type":"string","description":"Activity details","nullable":true},"platform":{"type":"string","description":"Related platform","nullable":true},"occurredAt":{"type":"number","description":"Activity timestamp in milliseconds"}},"required":["id","action","occurredAt"]},"AdminTeamDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"name":{"type":"string","description":"Team display name"},"description":{"type":"string","description":"Team description","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminTeamOrganizationDto"}]},"owner":{"$ref":"#/components/schemas/AdminTeamDetailOwnerDto"},"stats":{"$ref":"#/components/schemas/AdminTeamDetailStatsDto"},"members":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamDetailMemberDto"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamDetailProjectDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamDetailIntegrationDto"}},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamDetailActivityDto"}}},"required":["id","name","createdAt","updatedAt","owner","stats","members","projects","integrations","recentActivity"]},"AdminTeamDetailResponseDto":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/AdminTeamDetailDto"}},"required":["team"]},"AdminCustomerOpsOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]}},"required":["id","name","slug","status"]},"AdminCustomerOpsItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"ownerId":{"type":"string"},"owner":{"type":"string"},"ownerEmail":{"type":"string","nullable":true},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminCustomerOpsOrganizationDto"}]},"plan":{"type":"string"},"subscriptionStatus":{"type":"string"},"mrr":{"type":"number"},"members":{"type":"number"},"projects":{"type":"number"},"aiMessages":{"type":"number"},"aiTokens":{"type":"number"},"aiCostUsd":{"type":"number"},"lastActivityAt":{"type":"number","nullable":true},"status":{"type":"string"},"createdAt":{"type":"number"}},"required":["id","name","ownerId","owner","plan","subscriptionStatus","mrr","members","projects","aiMessages","aiTokens","aiCostUsd","status","createdAt"]},"AdminCustomerOpsStatsDto":{"type":"object","properties":{"total":{"type":"number"},"activeAgents":{"type":"number"},"teamMembers":{"type":"number"},"totalMrr":{"type":"number"},"totalAiTokens":{"type":"number"},"totalAiCost":{"type":"number"}},"required":["total","activeAgents","teamMembers","totalMrr","totalAiTokens","totalAiCost"]},"AdminCustomerOpsListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminCustomerOpsItemDto"}},"stats":{"$ref":"#/components/schemas/AdminCustomerOpsStatsDto"},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminCustomerOpsOwnerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","name"]},"AdminCustomerOpsSubscriptionDto":{"type":"object","properties":{"plan":{"type":"string"},"status":{"type":"string"},"mrr":{"type":"number","nullable":true},"currentPeriodEnd":{"type":"number","nullable":true},"recurringInterval":{"type":"string","nullable":true}},"required":["plan","status"]},"AdminCustomerOpsLeadStatsDto":{"type":"object","properties":{"total":{"type":"number"},"new":{"type":"number"},"contacted":{"type":"number"},"qualified":{"type":"number"}},"required":["total","new","contacted","qualified"]},"AdminCustomerOpsAiUsageDto":{"type":"object","properties":{"days":{"type":"number"},"messages":{"type":"number"},"tokens":{"type":"number"},"costUsd":{"type":"number"}},"required":["days","messages","tokens","costUsd"]},"AdminCustomerOpsDetailStatsDto":{"type":"object","properties":{"members":{"type":"number"},"projects":{"type":"number"},"businessProfiles":{"type":"number"},"leads":{"$ref":"#/components/schemas/AdminCustomerOpsLeadStatsDto"},"aiUsage":{"$ref":"#/components/schemas/AdminCustomerOpsAiUsageDto"}},"required":["members","projects","businessProfiles","leads","aiUsage"]},"AdminCustomerOpsProfileUsageDto":{"type":"object","properties":{"profileId":{"type":"string"},"businessName":{"type":"string"},"messages":{"type":"number"},"tokens":{"type":"number"},"costUsd":{"type":"number"}},"required":["profileId","businessName","messages","tokens","costUsd"]},"AdminCustomerOpsActivityDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"occurredAt":{"type":"number"}},"required":["id","action","occurredAt"]},"AdminCustomerOpsDetailDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"createdAt":{"type":"number"},"lastActivityAt":{"type":"number"},"owner":{"$ref":"#/components/schemas/AdminCustomerOpsOwnerDto"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminCustomerOpsOrganizationDto"}]},"subscription":{"$ref":"#/components/schemas/AdminCustomerOpsSubscriptionDto"},"stats":{"$ref":"#/components/schemas/AdminCustomerOpsDetailStatsDto"},"aiUsageByProfile":{"type":"array","items":{"$ref":"#/components/schemas/AdminCustomerOpsProfileUsageDto"}},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/AdminCustomerOpsActivityDto"}}},"required":["id","name","createdAt","lastActivityAt","owner","subscription","stats","aiUsageByProfile","recentActivity"]},"AdminCustomerOpsDetailResponseDto":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/AdminCustomerOpsDetailDto"}},"required":["customer"]},"CustomerSuccessTotalsDto":{"type":"object","properties":{"onboardingStarted":{"type":"number"},"onboardingCompleted":{"type":"number"},"businessProfileCompleted":{"type":"number"},"channelConnected":{"type":"number"},"firstPostCreated":{"type":"number"},"firstPostPublished":{"type":"number"},"firstAutomationCreated":{"type":"number"},"firstAutomationEnabled":{"type":"number"},"firstAutomationExecuted":{"type":"number"},"firstLeadCaptured":{"type":"number"},"activationReached":{"type":"number"}},"required":["onboardingStarted","onboardingCompleted","businessProfileCompleted","channelConnected","firstPostCreated","firstPostPublished","firstAutomationCreated","firstAutomationEnabled","firstAutomationExecuted","firstLeadCaptured","activationReached"]},"CustomerSuccessDropOffPointDto":{"type":"object","properties":{"step":{"type":"string"},"count":{"type":"number"}},"required":["step","count"]},"CustomerSuccessFunnelStepDto":{"type":"object","properties":{"step":{"type":"string"},"count":{"type":"number"},"conversionPercent":{"type":"number"}},"required":["step","count","conversionPercent"]},"CustomerSuccessTimeToValueMetricDto":{"type":"object","properties":{"p50Ms":{"type":"number","nullable":true},"p90Ms":{"type":"number","nullable":true}}},"CustomerSuccessTimeToValueDto":{"type":"object","properties":{"first_post_published":{"$ref":"#/components/schemas/CustomerSuccessTimeToValueMetricDto"},"first_automation_enabled":{"$ref":"#/components/schemas/CustomerSuccessTimeToValueMetricDto"},"first_lead_captured":{"$ref":"#/components/schemas/CustomerSuccessTimeToValueMetricDto"}},"required":["first_post_published","first_automation_enabled","first_lead_captured"]},"AdminCustomerSuccessSummaryResponseDto":{"type":"object","properties":{"generatedAt":{"type":"number"},"windowDays":{"type":"number"},"totals":{"$ref":"#/components/schemas/CustomerSuccessTotalsDto"},"activationRatePercent":{"type":"number"},"medianTimeToActivationMs":{"type":"number","nullable":true},"stalledCustomers":{"type":"number"},"dropOffPoints":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSuccessDropOffPointDto"}},"funnelSteps":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSuccessFunnelStepDto"}},"timeToValue":{"$ref":"#/components/schemas/CustomerSuccessTimeToValueDto"}},"required":["generatedAt","windowDays","totals","activationRatePercent","stalledCustomers","dropOffPoints","funnelSteps","timeToValue"]},"CustomerSuccessTeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CustomerSuccessOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminCustomerSuccessLeaderboardEntryDto":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/CustomerSuccessTeamDto"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CustomerSuccessOrganizationDto"}]},"ownerEmail":{"type":"string","nullable":true},"durationMs":{"type":"number"},"activatedAt":{"type":"number"}},"required":["team","durationMs","activatedAt"]},"AdminCustomerSuccessLeaderboardResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminCustomerSuccessLeaderboardEntryDto"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["items","page","pageSize","total","totalPages"]},"AdminCustomerSuccessStalledTeamDto":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/CustomerSuccessTeamDto"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CustomerSuccessOrganizationDto"}]},"ownerEmail":{"type":"string","nullable":true},"lastStep":{"type":"string"},"daysStale":{"type":"number"},"lastProgressAt":{"type":"number"}},"required":["team","lastStep","daysStale","lastProgressAt"]},"AdminCustomerSuccessStalledResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminCustomerSuccessStalledTeamDto"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["items","page","pageSize","total","totalPages"]},"AdminBillingHealthSubscriptionHealthDto":{"type":"object","properties":{"organizationsEvaluated":{"type":"number"},"healthy":{"type":"number"},"warning":{"type":"number"},"critical":{"type":"number"},"pastDue":{"type":"number"},"missingProviderCustomer":{"type":"number"},"missingProviderSubscription":{"type":"number"},"lastSyncError":{"type":"number"},"scheduledCancellations":{"type":"number"}},"required":["organizationsEvaluated","healthy","warning","critical","pastDue","missingProviderCustomer","missingProviderSubscription","lastSyncError","scheduledCancellations"]},"AdminBillingHealthMetricDto":{"type":"object","properties":{"count":{"type":"number"},"isTruncated":{"type":"boolean"}},"required":["count","isTruncated"]},"AdminBillingHealthIngestionHealthDto":{"type":"object","properties":{"queuedUsageEvents":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"retryingUsageEvents":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"failedUsageEvents":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"deadLetterUsageEvents":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"orphanedUsageEvents":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"duplicateIdempotencyKeys":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"duplicatePolarExternalIds":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"failedUsageLedgers":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"billingLocks":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"staleCheckouts":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"pendingCheckouts":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"successfulIngestions":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"averageIngestionLatencyMs":{"type":"number"},"pendingIngestionAgeMs":{"type":"number"},"failedWebhooks":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"permanentlyFailedWebhooks":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"},"webhookRetryBacklog":{"$ref":"#/components/schemas/AdminBillingHealthMetricDto"}},"required":["queuedUsageEvents","retryingUsageEvents","failedUsageEvents","deadLetterUsageEvents","orphanedUsageEvents","duplicateIdempotencyKeys","duplicatePolarExternalIds","failedUsageLedgers","billingLocks","staleCheckouts","pendingCheckouts","successfulIngestions","averageIngestionLatencyMs","pendingIngestionAgeMs","failedWebhooks","permanentlyFailedWebhooks","webhookRetryBacklog"]},"AdminBillingHealthSummaryResponseDto":{"type":"object","properties":{"generatedAt":{"type":"number"},"subscriptionHealth":{"$ref":"#/components/schemas/AdminBillingHealthSubscriptionHealthDto"},"ingestionHealth":{"$ref":"#/components/schemas/AdminBillingHealthIngestionHealthDto"}},"required":["generatedAt","subscriptionHealth","ingestionHealth"]},"AdminBillingHealthOrganizationDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"billingEmail":{"type":"string","nullable":true}},"required":["id","name"]},"AdminBillingHealthIssueDto":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["WARNING","CRITICAL"]},"title":{"type":"string"},"reason":{"type":"string"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminBillingHealthOrganizationDto"}]},"internalState":{"type":"string","nullable":true},"providerState":{"type":"string","nullable":true},"detectedAtMs":{"type":"number","nullable":true},"context":{"type":"object","nullable":true}},"required":["id","code","severity","title","reason"]},"AdminBillingHealthIssuesResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminBillingHealthIssueDto"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["items","page","pageSize","total","totalPages"]},"AdminSubscriptionOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"User identifier of the Organization owner"},"name":{"type":"string","description":"Owner display name","nullable":true},"email":{"type":"string","description":"Owner email","nullable":true}},"required":["id"]},"AdminSubscriptionListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization identifier"},"organizationName":{"type":"string","description":"Organization name"},"billingEmail":{"type":"string","description":"Billing email associated with the Organization","nullable":true},"owner":{"$ref":"#/components/schemas/AdminSubscriptionOwnerDto"},"plan":{"type":"string","description":"Resolved effective billing plan","enum":["starter","pro","growth","enterprise"]},"status":{"type":"string","description":"Resolved subscription status for display","enum":["active","past_due","canceled","incomplete"]},"mrr":{"type":"number","description":"Monthly recurring revenue in USD cents, normalized from the stored subscription amount"},"recurringAmount":{"type":"number","description":"Raw recurring subscription amount in USD cents","nullable":true},"currency":{"type":"string","description":"Subscription currency","nullable":true},"recurringInterval":{"type":"string","description":"Billing interval","enum":["month","year"],"nullable":true},"currentPeriodStart":{"type":"number","description":"Current billing period start timestamp in milliseconds","nullable":true},"currentPeriodEnd":{"type":"number","description":"Current billing period end timestamp in milliseconds","nullable":true},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether the subscription is scheduled to cancel at period end","nullable":true},"isFreeForever":{"type":"boolean","description":"Whether the Organization is free-forever","nullable":true},"polarCustomerId":{"type":"string","description":"Polar customer identifier","nullable":true},"providerSubscriptionId":{"type":"string","description":"Polar subscription identifier","nullable":true},"teamCount":{"type":"number","description":"Number of Teams in the Organization"},"memberCount":{"type":"number","description":"Number of Organization members"},"createdAt":{"type":"number","description":"Organization creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Organization last update timestamp in milliseconds"}},"required":["id","organizationName","owner","plan","status","mrr","teamCount","memberCount","createdAt","updatedAt"]},"AdminSubscriptionListStatsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total Organizations in the filtered result"},"active":{"type":"number","description":"Organizations with an active or trialing subscription (including free-forever)"},"totalMrr":{"type":"number","description":"Total monthly recurring revenue in USD cents across active/trialing subscriptions"},"averageMrr":{"type":"number","description":"Average monthly recurring revenue in USD cents per active Organization"}},"required":["total","active","totalMrr","averageMrr"]},"AdminSubscriptionListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminSubscriptionListItemDto"}},"stats":{"$ref":"#/components/schemas/AdminSubscriptionListStatsDto"},"page":{"type":"number","description":"Current page number (1-indexed)"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total items matching the query"},"totalPages":{"type":"number","description":"Total pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminSubscriptionDetailTeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"name":{"type":"string","description":"Team name"},"projectCount":{"type":"number","description":"Number of active projects in the Team"},"leadCount":{"type":"number","description":"Number of leads in the Team"}},"required":["id","name","projectCount","leadCount"]},"AdminSubscriptionDetailResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization identifier"},"organizationName":{"type":"string","description":"Organization name"},"billingEmail":{"type":"string","description":"Billing email associated with the Organization","nullable":true},"owner":{"$ref":"#/components/schemas/AdminSubscriptionOwnerDto"},"plan":{"type":"string","description":"Resolved effective billing plan","enum":["starter","pro","growth","enterprise"]},"status":{"type":"string","description":"Resolved subscription status for display","enum":["active","past_due","canceled","incomplete"]},"mrr":{"type":"number","description":"Monthly recurring revenue in USD cents, normalized from the stored subscription amount"},"recurringAmount":{"type":"number","description":"Raw recurring subscription amount in USD cents","nullable":true},"currency":{"type":"string","description":"Subscription currency","nullable":true},"recurringInterval":{"type":"string","description":"Billing interval","enum":["month","year"],"nullable":true},"currentPeriodStart":{"type":"number","description":"Current billing period start timestamp in milliseconds","nullable":true},"currentPeriodEnd":{"type":"number","description":"Current billing period end timestamp in milliseconds","nullable":true},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether the subscription is scheduled to cancel at period end","nullable":true},"isFreeForever":{"type":"boolean","description":"Whether the Organization is free-forever","nullable":true},"polarCustomerId":{"type":"string","description":"Polar customer identifier","nullable":true},"providerSubscriptionId":{"type":"string","description":"Polar subscription identifier","nullable":true},"teamCount":{"type":"number","description":"Number of Teams in the Organization"},"memberCount":{"type":"number","description":"Number of Organization members"},"teams":{"description":"Teams belonging to the Organization","type":"array","items":{"$ref":"#/components/schemas/AdminSubscriptionDetailTeamDto"}},"createdAt":{"type":"number","description":"Organization creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Organization last update timestamp in milliseconds"}},"required":["id","organizationName","owner","plan","status","mrr","teamCount","memberCount","teams","createdAt","updatedAt"]},"AdminTeamMemberItemDto":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"organizationId":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true},"organizationSlug":{"type":"string","nullable":true},"organizationRole":{"type":"string","nullable":true,"enum":["OWNER","ADMIN","MEMBER"]},"teamRole":{"type":"string","enum":["OWNER","ADMIN","EDITOR","VIEWER"]},"status":{"type":"string","enum":["active"]},"assignedAt":{"format":"date-time","type":"string"},"organizationMembershipPresent":{"type":"boolean"}},"required":["id","userId","name","email","teamId","teamName","teamRole","status","assignedAt","organizationMembershipPresent"]},"AdminTeamMembersResponseDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"},"hasMore":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamMemberItemDto"}}},"required":["page","pageSize","total","totalPages","hasMore","items"]},"AdminProjectItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Project identifier"},"name":{"type":"string","description":"Project display name"},"description":{"type":"string","description":"Project description","nullable":true},"teamId":{"type":"string","description":"Owning team identifier"},"ownerId":{"type":"string","description":"Owning user identifier"},"owner":{"type":"string","description":"Display name or email of the project owner"},"teamName":{"type":"string","description":"Team display name"},"status":{"type":"string","description":"Computed project status","enum":["active","paused"]},"posts":{"type":"number","description":"Number of non-deleted posts"},"lastPostAt":{"type":"number","description":"Timestamp of the most recent post in milliseconds","nullable":true},"isDefault":{"type":"boolean","description":"Whether this is the default project for the team"},"isArchived":{"type":"boolean","description":"Whether the project is archived"},"isDeleted":{"type":"boolean","description":"Whether the project has been soft-deleted"},"deletedAt":{"type":"number","description":"Deletion timestamp in milliseconds when soft-deleted","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"}},"required":["id","name","teamId","ownerId","owner","teamName","status","posts","isDefault","isArchived","isDeleted","createdAt","updatedAt"]},"AdminProjectStatsSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Total matching projects"},"active":{"type":"number","description":"Number of active projects"},"paused":{"type":"number","description":"Number of archived (paused) projects"},"scheduled":{"type":"number","description":"Number of scheduled posts across matching projects"}},"required":["total","active","paused","scheduled"]},"AdminProjectsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminProjectItemDto"}},"stats":{"$ref":"#/components/schemas/AdminProjectStatsSummaryDto"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total matching items"},"totalPages":{"type":"number","description":"Total available pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminProjectOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Organization display name"},"slug":{"type":"string","description":"Organization slug","nullable":true},"status":{"type":"string","description":"Organization status"}},"required":["id","name","status"]},"AdminProjectTeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"name":{"type":"string","description":"Team display name"},"organization":{"$ref":"#/components/schemas/AdminProjectOrganizationDto"}},"required":["id","name","organization"]},"AdminProjectOwnerDto":{"type":"object","properties":{"id":{"type":"string","description":"Owner user identifier"},"name":{"type":"string","description":"Owner display name"},"email":{"type":"string","description":"Owner email address","nullable":true}},"required":["id","name"]},"AdminProjectStatsDto":{"type":"object","properties":{"totalPosts":{"type":"number","description":"Total non-deleted posts"},"draftPosts":{"type":"number","description":"Draft posts"},"scheduledPosts":{"type":"number","description":"Scheduled posts"},"publishedPosts":{"type":"number","description":"Published posts"}},"required":["totalPosts","draftPosts","scheduledPosts","publishedPosts"]},"AdminProjectRecentPostDto":{"type":"object","properties":{"id":{"type":"string","description":"Post identifier"},"caption":{"type":"string","description":"Post caption","nullable":true},"status":{"type":"string","description":"Post status"},"scheduledAt":{"type":"number","description":"Scheduled timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"}},"required":["id","status","createdAt"]},"AdminProjectDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Project identifier"},"name":{"type":"string","description":"Project display name"},"description":{"type":"string","description":"Project description","nullable":true},"status":{"type":"string","description":"Project status","enum":["active","paused"]},"isDefault":{"type":"boolean","description":"Whether this is the default project for the team"},"isArchived":{"type":"boolean","description":"Whether the project is archived"},"isDeleted":{"type":"boolean","description":"Whether the project has been soft-deleted"},"requirePostApprovalForEditors":{"type":"boolean","description":"Whether posts from editors require approval before publishing","nullable":true},"deletedAt":{"type":"number","description":"Deletion timestamp in milliseconds when soft-deleted","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"team":{"$ref":"#/components/schemas/AdminProjectTeamDto"},"owner":{"$ref":"#/components/schemas/AdminProjectOwnerDto"},"memberCount":{"type":"number","description":"Number of active project members"},"stats":{"$ref":"#/components/schemas/AdminProjectStatsDto"},"recentPosts":{"description":"Most recent posts in the project (bounded)","type":"array","items":{"$ref":"#/components/schemas/AdminProjectRecentPostDto"}},"lastPostAt":{"type":"number","description":"Timestamp of the most recent post in milliseconds","nullable":true}},"required":["id","name","status","isDefault","isArchived","isDeleted","createdAt","updatedAt","team","owner","memberCount","stats","recentPosts"]},"AdminProjectDetailResponseDto":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/AdminProjectDetailDto"}},"required":["project"]},"AdminPostListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Post identifier"},"projectId":{"type":"string","description":"Owning project identifier"},"teamId":{"type":"string","description":"Owning team identifier"},"caption":{"type":"string","description":"Post caption","nullable":true},"scheduledAt":{"type":"number","description":"Scheduled timestamp in milliseconds","nullable":true},"publishedAt":{"type":"number","description":"Published timestamp in milliseconds","nullable":true},"status":{"type":"string","description":"Post status"},"platforms":{"description":"Target platforms","type":"array","items":{"type":"string"}},"mediaCount":{"type":"number","description":"Number of attached media files"},"permaLink":{"type":"string","description":"Permanent post URL","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"}},"required":["id","projectId","teamId","status","platforms","mediaCount","createdAt","updatedAt"]},"AdminPostStatsSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Total matching posts"},"scheduled":{"type":"number","description":"Scheduled posts"},"published":{"type":"number","description":"Published posts"},"failed":{"type":"number","description":"Failed posts"},"draft":{"type":"number","description":"Draft posts"}},"required":["total","scheduled","published","failed","draft"]},"AdminPostsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostListItemDto"}},"stats":{"$ref":"#/components/schemas/AdminPostStatsSummaryDto"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total matching items"},"totalPages":{"type":"number","description":"Total available pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminPostDetailAuthorDto":{"type":"object","properties":{"name":{"type":"string","description":"Author display name"}},"required":["name"]},"AdminPostDetailProjectDto":{"type":"object","properties":{"id":{"type":"string","description":"Project identifier"},"name":{"type":"string","description":"Project display name"}},"required":["id","name"]},"AdminPostDetailTeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"name":{"type":"string","description":"Team display name"}},"required":["id","name"]},"AdminPostMediaDto":{"type":"object","properties":{"id":{"type":"string","description":"Media identifier"},"url":{"type":"string","description":"Media URL"},"type":{"type":"string","description":"Media type","example":"image"},"fileName":{"type":"string","description":"Media file name"},"size":{"type":"number","description":"Media size in bytes"}},"required":["id","url","type","fileName","size"]},"AdminPostIntegrationDto":{"type":"object","properties":{"integrationId":{"type":"string","description":"Integration identifier"},"platform":{"type":"string","description":"Platform identifier"},"account":{"type":"string","description":"Account display name"},"status":{"type":"string","description":"Integration status"},"platformPostId":{"type":"string","description":"Platform post identifier","nullable":true},"permaLink":{"type":"string","description":"Permanent post URL","nullable":true}},"required":["integrationId","platform","account","status"]},"AdminPostPublishJobDto":{"type":"object","properties":{"id":{"type":"string","description":"Publish job identifier"},"platform":{"type":"string","description":"Target platform"},"status":{"type":"string","description":"Job status"},"attemptCount":{"type":"number","description":"Number of attempts made"},"maxAttempts":{"type":"number","description":"Maximum allowed attempts"},"startedAt":{"type":"number","description":"Start timestamp in milliseconds","nullable":true},"completedAt":{"type":"number","description":"Completion timestamp in milliseconds","nullable":true},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"errorMessage":{"type":"string","description":"Last error message","nullable":true}},"required":["id","platform","status","attemptCount","maxAttempts","updatedAt"]},"AdminPostLastErrorDto":{"type":"object","properties":{"platform":{"type":"string","description":"Platform where the error occurred"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"},"occurredAt":{"type":"number","description":"Error timestamp in milliseconds"}},"required":["platform","code","message","occurredAt"]},"AdminPostStatusMixItemDto":{"type":"object","properties":{"status":{"type":"string","description":"Post status"},"total":{"type":"number","description":"Number of posts with this status"}},"required":["status","total"]},"AdminPostDailyVolumeItemDto":{"type":"object","properties":{"date":{"type":"string","description":"Date in YYYY-MM-DD"},"draft":{"type":"number","description":"Draft posts"},"scheduled":{"type":"number","description":"Scheduled posts"},"published":{"type":"number","description":"Published posts"},"failed":{"type":"number","description":"Failed posts"}},"required":["date","draft","scheduled","published","failed"]},"AdminPostPublishJobStatusItemDto":{"type":"object","properties":{"status":{"type":"string","description":"Job status"},"total":{"type":"number","description":"Number of jobs with this status"}},"required":["status","total"]},"AdminPostPlatformPerformanceItemDto":{"type":"object","properties":{"platform":{"type":"string","description":"Platform identifier"},"attempts":{"type":"number","description":"Total attempts"},"successes":{"type":"number","description":"Successful attempts"},"failures":{"type":"number","description":"Failed attempts"}},"required":["platform","attempts","successes","failures"]},"AdminPostAnalyticsDto":{"type":"object","properties":{"projectStatusMix":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostStatusMixItemDto"}},"projectDailyVolume":{"description":"Daily post volume for the project over the last 14 days","type":"array","items":{"$ref":"#/components/schemas/AdminPostDailyVolumeItemDto"}},"publishJobStatus":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostPublishJobStatusItemDto"}},"platformPerformance":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostPlatformPerformanceItemDto"}}},"required":["projectStatusMix","projectDailyVolume","publishJobStatus","platformPerformance"]},"AdminPostDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Post identifier"},"projectId":{"type":"string","description":"Owning project identifier"},"teamId":{"type":"string","description":"Owning team identifier"},"caption":{"type":"string","description":"Post caption","nullable":true},"status":{"type":"string","description":"Post status"},"scheduledAt":{"type":"number","description":"Scheduled timestamp in milliseconds","nullable":true},"publishedAt":{"type":"number","description":"Published timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"author":{"$ref":"#/components/schemas/AdminPostDetailAuthorDto"},"project":{"$ref":"#/components/schemas/AdminPostDetailProjectDto"},"team":{"$ref":"#/components/schemas/AdminPostDetailTeamDto"},"platforms":{"description":"Target platforms","type":"array","items":{"type":"string"}},"permaLink":{"type":"string","description":"Permanent post URL","nullable":true},"media":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostMediaDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostIntegrationDto"}},"publishJobs":{"type":"array","items":{"$ref":"#/components/schemas/AdminPostPublishJobDto"}},"lastError":{"description":"Most recent publish error","nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminPostLastErrorDto"}]},"analytics":{"$ref":"#/components/schemas/AdminPostAnalyticsDto"}},"required":["id","projectId","teamId","status","createdAt","updatedAt","author","project","team","platforms","media","integrations","publishJobs","analytics"]},"AdminPostDetailResponseDto":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/AdminPostDetailDto"}},"required":["post"]},"AdminInvitationTeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","name"]},"AdminInvitationPersonDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true}},"required":["id","name"]},"AdminInvitationLifecycleDto":{"type":"object","properties":{"status":{"type":"string"},"effectiveStatus":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"expiresAt":{"type":"number"},"acceptedAt":{"type":"number","nullable":true},"revokedAt":{"type":"number","nullable":true},"deletedAt":{"type":"number","nullable":true},"lastResentAt":{"type":"number","nullable":true},"resendCount":{"type":"number"},"isDeleted":{"type":"boolean"}},"required":["status","effectiveStatus","createdAt","updatedAt","expiresAt","resendCount","isDeleted"]},"AdminInvitationDeliveryDto":{"type":"object","properties":{"status":{"type":"string","enum":["queued_for_delivery","delivery_status_unavailable"]},"label":{"type":"string"},"lastSentAt":{"type":"number","nullable":true},"sendAttempts":{"type":"number"},"failureMessage":{"type":"string","nullable":true}},"required":["status","label","sendAttempts"]},"AdminInvitationActionAvailabilityDto":{"type":"object","properties":{"canResend":{"type":"boolean"},"canRevoke":{"type":"boolean"},"canDelete":{"type":"boolean"}},"required":["canResend","canRevoke","canDelete"]},"AdminInvitationActivityDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"createdAt":{"type":"number"},"actor":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminInvitationPersonDto"}]}},"required":["id","action","createdAt"]},"AdminInvitationDetailResponseDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"},"teamId":{"type":"string"},"inviterId":{"type":"string"},"ownerId":{"type":"string"},"team":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminInvitationTeamDto"}]},"inviter":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminInvitationPersonDto"}]},"owner":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminInvitationPersonDto"}]},"recipientUser":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminInvitationPersonDto"}]},"lifecycle":{"$ref":"#/components/schemas/AdminInvitationLifecycleDto"},"delivery":{"$ref":"#/components/schemas/AdminInvitationDeliveryDto"},"actions":{"$ref":"#/components/schemas/AdminInvitationActionAvailabilityDto"},"activity":{"type":"array","items":{"$ref":"#/components/schemas/AdminInvitationActivityDto"}}},"required":["id","email","type","role","teamId","inviterId","ownerId","team","inviter","owner","recipientUser","lifecycle","delivery","actions","activity"]},"AdminMediaLibraryItemDto":{"type":"object","properties":{"id":{"type":"string","description":"CUID media identifier"},"name":{"type":"string","description":"Normalized file name"},"type":{"type":"string","description":"Media kind","enum":["image","video","file"]},"size":{"type":"number","description":"Size in bytes"},"url":{"type":"string","description":"Public or presigned media URL"},"thumbnail":{"type":"string","description":"Thumbnail URL when available","nullable":true},"dimensions":{"type":"string","description":"Width x height dimensions for images/videos","nullable":true},"uploadedAt":{"type":"number","description":"Upload timestamp in milliseconds"},"usedIn":{"type":"number","description":"Number of posts referencing this media"},"processingStatus":{"type":"string","description":"Processing/reconciliation status","enum":["pending","matched","ambiguous","missing","unmatchable"],"nullable":true},"teamId":{"type":"string","description":"Owning team identifier"},"projectId":{"type":"string","description":"Owning project identifier"}},"required":["id","name","type","size","url","uploadedAt","usedIn","teamId","projectId"]},"AdminMediaLibraryStatsDto":{"type":"object","properties":{"totalBytes":{"type":"number","description":"Total bytes for returned items"},"imageCount":{"type":"number","description":"Count of image items"},"videoCount":{"type":"number","description":"Count of video items"},"fileCount":{"type":"number","description":"Count of generic file items"},"recentUploads":{"type":"number","description":"Items uploaded in the last 24 hours"}},"required":["totalBytes","imageCount","videoCount","fileCount","recentUploads"]},"AdminMediaLibraryResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminMediaLibraryItemDto"}},"stats":{"$ref":"#/components/schemas/AdminMediaLibraryStatsDto"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total matching items"},"totalPages":{"type":"number","description":"Total available pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminOpsAlertItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Alert identifier"},"category":{"type":"string","description":"Alert category","enum":["billing","usage","enterprise","revenue"]},"severity":{"type":"string","description":"Alert severity","enum":["info","warning","critical"]},"title":{"type":"string","description":"Short alert title"},"message":{"type":"string","description":"Detailed alert message"},"ownerUserId":{"type":"string","description":"Identifier of the user who owns the affected resource"},"ownerUserName":{"type":"string","description":"Display name of the owner user"},"teamId":{"type":"string","description":"Identifier of the team associated with the alert"},"teamName":{"type":"string","description":"Name of the team associated with the alert"},"status":{"type":"string","description":"Current alert status","enum":["open","acknowledged","resolved"]},"acknowledgedAt":{"type":"number","description":"When the alert was acknowledged, as a Unix timestamp in milliseconds"},"acknowledgedByUserId":{"type":"string","description":"Identifier of the user who acknowledged the alert"},"acknowledgedByUserName":{"type":"string","description":"Display name of the user who acknowledged the alert"},"resolvedAt":{"type":"number","description":"When the alert was resolved, as a Unix timestamp in milliseconds"},"createdAt":{"type":"number","description":"When the alert was created, as a Unix timestamp in milliseconds"},"updatedAt":{"type":"number","description":"When the alert was last updated, as a Unix timestamp in milliseconds"}},"required":["id","category","severity","title","message","status","createdAt","updatedAt"]},"AdminOpsAlertStatsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total alerts matching the current filters"},"open":{"type":"number","description":"Open alerts in the current result set"},"critical":{"type":"number","description":"Critical alerts in the current result set"}},"required":["total","open","critical"]},"AdminOpsAlertsResponseDto":{"type":"object","properties":{"items":{"description":"Alerts for the current page","type":"array","items":{"$ref":"#/components/schemas/AdminOpsAlertItemDto"}},"stats":{"description":"Result-set statistics","allOf":[{"$ref":"#/components/schemas/AdminOpsAlertStatsDto"}]},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total number of matching alerts"},"totalPages":{"type":"number","description":"Total number of pages"},"hasMore":{"type":"boolean","description":"Whether another page exists after the current one"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminOpsAlertAcknowledgeResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the acknowledgement succeeded"},"id":{"type":"string","description":"Acknowledged alert identifier"},"status":{"type":"string","description":"Alert status after acknowledgement","enum":["open","acknowledged","resolved"]},"acknowledgedAt":{"type":"number","description":"When the alert was acknowledged, as a Unix timestamp in milliseconds"},"acknowledgedByUserId":{"type":"string","description":"Identifier of the user who acknowledged the alert"},"acknowledgedByUserName":{"type":"string","description":"Name of the user who acknowledged the alert"}},"required":["success","id","status","acknowledgedAt","acknowledgedByUserId","acknowledgedByUserName"]},"AdminQueuePressureMetricDto":{"type":"object","properties":{"queueName":{"type":"string"},"waiting":{"type":"number"},"active":{"type":"number"},"delayed":{"type":"number"},"failed":{"type":"number"},"completed":{"type":"number"},"maxQueueDepth":{"type":"number"},"totalQueued":{"type":"number"},"pressureRatio":{"type":"number"},"pressureLevel":{"type":"string"},"error":{"type":"string"}},"required":["queueName","waiting","active","delayed","failed","completed","maxQueueDepth","totalQueued","pressureRatio","pressureLevel"]},"AdminQueuePressureSummaryDto":{"type":"object","properties":{"criticalQueues":{"type":"number"},"highQueues":{"type":"number"},"maxPressureRatio":{"type":"number"},"totalQueued":{"type":"number"}},"required":["criticalQueues","highQueues","maxPressureRatio","totalQueued"]},"AdminQueuePressureResponseDto":{"type":"object","properties":{"generatedAt":{"type":"number"},"queues":{"type":"array","items":{"$ref":"#/components/schemas/AdminQueuePressureMetricDto"}},"summary":{"$ref":"#/components/schemas/AdminQueuePressureSummaryDto"},"sourceUnavailable":{"type":"boolean"},"sourceUnavailableReason":{"type":"string"}},"required":["generatedAt","queues","summary","sourceUnavailable"]},"AdminAutomationListItemDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","paused","error"]},"trigger":{"type":"string"},"actions":{"type":"number"},"executions":{"type":"number"},"successRate":{"type":"number"},"lastRun":{"type":"number"},"createdAt":{"type":"number"}},"required":["id","teamId","name","status","trigger","actions","executions","successRate","lastRun","createdAt"]},"AdminAutomationListStatsDto":{"type":"object","properties":{"active":{"type":"number"},"totalExecutions":{"type":"number"},"averageSuccessRate":{"type":"number"}},"required":["active","totalExecutions","averageSuccessRate"]},"AdminAutomationsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminAutomationListItemDto"}},"stats":{"$ref":"#/components/schemas/AdminAutomationListStatsDto"}},"required":["items","stats"]},"AdminAutomationReliabilityRunDto":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"automationId":{"type":"string","nullable":true},"teamId":{"type":"string"},"status":{"type":"string"},"triggerType":{"type":"string"},"startedAt":{"type":"number"},"failureCode":{"type":"string","nullable":true},"failureMessage":{"type":"string","nullable":true},"team":{"type":"string"},"project":{"type":"string"},"retryable":{"type":"boolean"}},"required":["id","runId","teamId","status","triggerType","startedAt","team","project","retryable"]},"AdminAutomationFailureClusterDto":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]},"AdminAutomationReliabilityStatsDto":{"type":"object","properties":{"failed":{"type":"number"},"deadLetter":{"type":"number"},"fallbackHandoff":{"type":"number"},"topFailures":{"type":"array","items":{"$ref":"#/components/schemas/AdminAutomationFailureClusterDto"}}},"required":["failed","deadLetter","fallbackHandoff","topFailures"]},"AdminAutomationReliabilityRunsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminAutomationReliabilityRunDto"}},"stats":{"$ref":"#/components/schemas/AdminAutomationReliabilityStatsDto"}},"required":["items","stats"]},"AdminAutomationExecutionStatsDto":{"type":"object","properties":{"total":{"type":"number"},"comments":{"type":"number"},"dms":{"type":"number"}},"required":["total","comments","dms"]},"AdminAutomationTeamRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminAutomationProjectRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminAutomationIntegrationDto":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"account":{"type":"string"},"status":{"type":"string"},"permissionState":{"type":"string","nullable":true}},"required":["id","platform","account","status"]},"AdminAutomationRecentActivityDto":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"details":{"type":"string"},"timestamp":{"type":"number"},"actor":{"type":"string"}},"required":["id","action","details","timestamp","actor"]},"AdminAutomationDetailPayloadDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","paused","error"]},"name":{"type":"string"},"triggerType":{"type":"string"},"trigger":{"type":"array","items":{"type":"string"}},"responseType":{"type":"string"},"response":{"type":"string","nullable":true},"aiPrompt":{"type":"string","nullable":true},"createdAt":{"type":"number"},"executions":{"$ref":"#/components/schemas/AdminAutomationExecutionStatsDto"},"actionsConfigured":{"type":"number"},"team":{"$ref":"#/components/schemas/AdminAutomationTeamRefDto"},"project":{"$ref":"#/components/schemas/AdminAutomationProjectRefDto"},"integration":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminAutomationIntegrationDto"}]},"recentActivity":{"type":"array","items":{"$ref":"#/components/schemas/AdminAutomationRecentActivityDto"}}},"required":["id","status","name","triggerType","trigger","responseType","createdAt","executions","actionsConfigured","team","project","recentActivity"]},"AdminAutomationDetailResponseDto":{"type":"object","properties":{"error":{"type":"boolean"},"message":{"type":"string"},"automation":{"$ref":"#/components/schemas/AdminAutomationDetailPayloadDto"}},"required":["error"]},"AdminApprovalQueueItemDto":{"type":"object","properties":{"id":{"type":"string"},"entityType":{"type":"string","enum":["post","automation"]},"approvalStatus":{"type":"string"},"complianceStatus":{"type":"string","enum":["pass","warning","fail"]},"summary":{"type":"string"},"projectName":{"type":"string"},"teamName":{"type":"string"},"requestedAt":{"type":"number"}},"required":["id","entityType","approvalStatus","complianceStatus","summary","projectName","teamName","requestedAt"]},"AdminApprovalQueueStatsDto":{"type":"object","properties":{"total":{"type":"number"},"posts":{"type":"number"},"automations":{"type":"number"},"highRisk":{"type":"number"}},"required":["total","posts","automations","highRisk"]},"AdminApprovalQueueResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminApprovalQueueItemDto"}},"stats":{"$ref":"#/components/schemas/AdminApprovalQueueStatsDto"}},"required":["items","stats"]},"AdminLeadItemDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"company":{"type":"string"},"source":{"type":"string"},"status":{"type":"string","enum":["new","contacted","qualified"]},"score":{"type":"number"},"assignedTo":{"type":"string"},"createdAt":{"type":"number"},"lastContactedAt":{"type":"object"}},"required":["id","name","email","phone","company","source","status","score","assignedTo","createdAt"]},"AdminLeadsStatsDto":{"type":"object","properties":{"new":{"type":"number"},"qualified":{"type":"number"},"averageScore":{"type":"number"}},"required":["new","qualified","averageScore"]},"AdminListLeadsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminLeadItemDto"}},"stats":{"$ref":"#/components/schemas/AdminLeadsStatsDto"}},"required":["items","stats"]},"AdminLeadDetailTeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminLeadDetailBusinessProfileDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AdminLeadDetailDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"object"},"phone":{"type":"object"},"description":{"type":"object"},"interest":{"type":"object"},"source":{"type":"object"},"sourcePlatform":{"type":"object"},"sourceCampaign":{"type":"object"},"sourceAutomationId":{"type":"object"},"status":{"type":"string","enum":["new","contacted","qualified"]},"priority":{"type":"string","enum":["low","medium","high"]},"score":{"type":"object"},"notes":{"type":"object"},"preferences":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"},"updatedAt":{"type":"object"},"followUpScheduled":{"type":"object"},"conversationContext":{"type":"object"},"team":{"$ref":"#/components/schemas/AdminLeadDetailTeamDto"},"project":{"type":"object"},"businessProfile":{"$ref":"#/components/schemas/AdminLeadDetailBusinessProfileDto"}},"required":["id","name","status","createdAt","team","businessProfile"]},"AdminLeadDetailResponseDto":{"type":"object","properties":{"error":{"type":"boolean"},"message":{"type":"string"},"lead":{"$ref":"#/components/schemas/AdminLeadDetailDto"}},"required":["error"]},"AdminDemoWorkspaceReadinessCheckDto":{"type":"object","properties":{"id":{"type":"string","description":"Check identifier"},"label":{"type":"string","description":"Human-readable label"},"passed":{"type":"boolean","description":"Whether the check passed"},"detail":{"type":"string","description":"Check detail message"}},"required":["id","label","passed","detail"]},"AdminDemoWorkspaceReadinessResponseDto":{"type":"object","properties":{"score":{"type":"number","description":"Readiness score (0-100)"},"checks":{"description":"Individual readiness checks","type":"array","items":{"$ref":"#/components/schemas/AdminDemoWorkspaceReadinessCheckDto"}},"teamId":{"type":"string","description":"Team identifier"},"isDemoWorkspace":{"type":"boolean","description":"Whether the team is flagged as a demo workspace"},"organizationId":{"type":"string","description":"Organization identifier when available"}},"required":["score","checks","teamId","isDemoWorkspace"]},"AdminDemoWorkspaceDesignateDto":{"type":"object","properties":{"preset":{"type":"string","description":"Demo workspace preset to assign to the team","enum":["founder","enterprise","marketing"],"example":"founder"}},"required":["preset"]},"AdminDemoWorkspaceDesignateResponseDto":{"type":"object","properties":{"designated":{"type":"boolean","description":"Whether the team was designated as a demo workspace"}},"required":["designated"]},"AdminDemoWorkspaceSeedDto":{"type":"object","properties":{"preset":{"type":"string","description":"Demo workspace preset to assign to the team","enum":["founder","enterprise","marketing"],"example":"founder"}},"required":["preset"]},"AdminDemoWorkspaceSeedResponseDto":{"type":"object","properties":{"seeded":{"type":"boolean","description":"Whether the seed completed"}},"required":["seeded"]},"LeadAttributionDto":{"type":"object","properties":{"sourceLabel":{"type":"string"},"automationLabel":{"type":"string","nullable":true},"accountLabel":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"projectLabel":{"type":"string","nullable":true},"firstInteractionAt":{"type":"string"},"hasConversation":{"type":"boolean"}},"required":["sourceLabel","firstInteractionAt","hasConversation"]},"LeadChangeHistoryEntryDto":{"type":"object","properties":{"field":{"type":"string"},"oldValue":{"type":"object"},"newValue":{"type":"object"},"changedAt":{"type":"string"},"changedBy":{"type":"string","enum":["agent","user"]},"reason":{"type":"object"},"affectsService":{"type":"boolean"}},"required":["field","changedAt","changedBy","affectsService"]},"LeadDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"businessProfileId":{"type":"string"},"projectId":{"type":"object"},"customerProfileId":{"type":"object"},"name":{"type":"string"},"email":{"type":"object"},"phone":{"type":"object"},"contact":{"type":"object"},"description":{"type":"object"},"interest":{"type":"object"},"preferences":{"type":"array","items":{"type":"string"}},"source":{"type":"object"},"sourcePlatform":{"type":"object"},"sourceCampaign":{"type":"object"},"sourceAutomationId":{"type":"object"},"sourceAutomationExecutionId":{"type":"object"},"sourcePostId":{"type":"object"},"sourceIntegrationId":{"type":"object"},"sourcePlatformAccountId":{"type":"object"},"sourceExternalUserId":{"type":"object"},"attribution":{"$ref":"#/components/schemas/LeadAttributionDto"},"notes":{"type":"object"},"status":{"type":"string","enum":["new","contacted","qualified"]},"pickupDate":{"type":"object"},"deliveryDate":{"type":"object"},"serviceDetails":{"type":"object"},"agentThreadId":{"type":"object"},"qualificationScore":{"type":"object"},"conversationContext":{"type":"object"},"priority":{"type":"string","enum":["low","medium","high"]},"changeHistory":{"type":"array","items":{"$ref":"#/components/schemas/LeadChangeHistoryEntryDto"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","businessProfileId","name","attribution","status","createdAt","updatedAt"]},"ListLeadsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadDto"}},"nextCursor":{"type":"object"},"hasMore":{"type":"boolean"}},"required":["data","hasMore"]},"CreateLeadDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"},"notes":{"type":"string"},"priority":{"type":"string","enum":["low","medium","high"]},"sourcePlatform":{"type":"string"},"sourceCampaign":{"type":"string"}},"required":["name"]},"NewLeadsCountResponseDto":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"]},"LeadsSummaryResponseDto":{"type":"object","properties":{"total":{"type":"number"},"new":{"type":"number"},"contacted":{"type":"number"},"qualified":{"type":"number"}},"required":["total","new","contacted","qualified"]},"UpdateLeadDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"},"notes":{"type":"string"},"status":{"type":"string","enum":["new","contacted","qualified"]},"priority":{"type":"string","enum":["low","medium","high"]},"sourcePlatform":{"type":"string"},"sourceCampaign":{"type":"string"}}},"UpdateLeadStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["new","contacted","qualified"]}},"required":["status"]},"ProjectResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Project ID"},"teamId":{"type":"string","description":"Team ID"},"ownerId":{"type":"string","description":"User ID of the project owner"},"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description","nullable":true},"isDefault":{"type":"boolean","description":"Whether this is the default project for the team"},"isDeleted":{"type":"boolean","description":"Soft-deletion flag","nullable":true},"isArchived":{"type":"boolean","description":"Whether the project is archived"},"requirePostApprovalForEditors":{"type":"boolean","description":"Whether editors require post approval","nullable":true},"deletedAt":{"type":"string","description":"Soft-deletion timestamp","format":"date-time","nullable":true},"createdAt":{"type":"string","description":"Creation timestamp","format":"date-time"},"updatedAt":{"type":"string","description":"Last update timestamp","format":"date-time"},"currentUserRole":{"type":"string","description":"Role of the current user in this project","enum":["owner","admin","editor","viewer"]},"memberCount":{"type":"number","description":"Number of active project members"},"postCount":{"type":"number","description":"Number of non-deleted posts in the project"}},"required":["id","teamId","ownerId","name","isDefault","isArchived","createdAt","updatedAt","currentUserRole","memberCount","postCount"]},"ProjectOverviewStatDto":{"type":"object","properties":{"title":{"type":"string"},"value":{"type":"number"},"color":{"type":"string"},"bgColor":{"type":"string"},"action":{"type":"string"}},"required":["title","value","color","bgColor","action"]},"CreateProjectDto":{"type":"object","properties":{"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description","nullable":true},"isDefault":{"type":"boolean","description":"Whether this is the default project for the team"}},"required":["name"]},"UpdateProjectDto":{"type":"object","properties":{}},"ProjectCreationGateResponseDto":{"type":"object","properties":{"allowed":{"type":"boolean","description":"Whether the current user may create a project in this team, considering both permission and entitlement."},"current":{"type":"number","description":"Current number of projects in the active team (non-deleted)."},"limit":{"type":"number","description":"Project limit for the current plan; null means unlimited.","nullable":true},"remaining":{"type":"number","description":"Remaining project slots; null means unlimited.","nullable":true},"reason":{"type":"string","description":"Machine-readable reason when creation is denied.","nullable":true}},"required":["allowed","current","limit","remaining"]},"PerformanceMetricDto":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"change":{"type":"object"},"prefix":{"type":"string"},"postfix":{"type":"string"},"decimalPlaces":{"type":"number"}},"required":["name","value"]},"PerformanceSummaryDto":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/PerformanceMetricDto"}}},"required":["metrics"]},"PipelineStageDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"},"description":{"type":"string"}},"required":["name","count"]},"PublishingPipelineDto":{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#/components/schemas/PipelineStageDto"}}},"required":["stages"]},"LeadFunnelStageDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]},"LeadFunnelDto":{"type":"object","properties":{"stages":{"type":"array","items":{"$ref":"#/components/schemas/LeadFunnelStageDto"}}},"required":["stages"]},"DashboardActivitySummaryDto":{"type":"object","properties":{"total":{"type":"number"},"errors":{"type":"number"},"warnings":{"type":"number"},"today":{"type":"number"}},"required":["total","errors","warnings","today"]},"PlatformHealthItemDto":{"type":"object","properties":{"platform":{"type":"string"},"status":{"type":"string"},"lastSuccessfulSyncAt":{"type":"string"},"error":{"type":"string"}},"required":["platform","status"]},"PlatformHealthDto":{"type":"object","properties":{"platforms":{"type":"array","items":{"$ref":"#/components/schemas/PlatformHealthItemDto"}}},"required":["platforms"]},"AnalyticsResponseDto":{"type":"object","properties":{"performance":{"$ref":"#/components/schemas/PerformanceSummaryDto"},"publishing":{"$ref":"#/components/schemas/PublishingPipelineDto"},"leads":{"$ref":"#/components/schemas/LeadFunnelDto"},"activity":{"$ref":"#/components/schemas/DashboardActivitySummaryDto"},"platforms":{"$ref":"#/components/schemas/PlatformHealthDto"}},"required":["performance","publishing","leads","activity","platforms"]},"ProjectRecommendationsResponseDto":{"type":"object","properties":{"recommendations":{"type":"array","items":{"type":"object"}}},"required":["recommendations"]},"ContentCoveragePromotedProductSummaryDto":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"totalPosts":{"type":"number"}},"required":["productId","productName","totalPosts"]},"ContentCoverageSummaryDto":{"type":"object","properties":{"totalProducts":{"type":"number"},"promotedProducts":{"type":"number"},"neverPromotedProducts":{"type":"number"},"productsWithoutScheduledContent":{"type":"number"},"unassignedPostCount":{"type":"number"},"notPromotedIn30Days":{"type":"number"},"notPromotedIn90Days":{"type":"number"},"mostPromotedProducts":{"type":"array","items":{"$ref":"#/components/schemas/ContentCoveragePromotedProductSummaryDto"}},"leastPromotedProducts":{"type":"array","items":{"$ref":"#/components/schemas/ContentCoveragePromotedProductSummaryDto"}}},"required":["totalProducts","promotedProducts","neverPromotedProducts","productsWithoutScheduledContent","unassignedPostCount","notPromotedIn30Days","notPromotedIn90Days"]},"ContentCoverageProductSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"offeringType":{"type":"string","nullable":true},"thumbnailUrl":{"type":"string","nullable":true},"status":{"type":"string"},"isAvailable":{"type":"boolean"}},"required":["id","name","offeringType","thumbnailUrl","status","isAvailable"]},"ContentCoverageProductDto":{"type":"object","properties":{"product":{"nullable":true,"description":"Lightweight product summary. Null for posts with no linked product.","allOf":[{"$ref":"#/components/schemas/ContentCoverageProductSummaryDto"}]},"totalPosts":{"type":"number"},"draftCount":{"type":"number"},"pendingReviewCount":{"type":"number"},"changesRequestedCount":{"type":"number"},"approvedCount":{"type":"number"},"scheduledCount":{"type":"number"},"publishedCount":{"type":"number"},"firstPublishedAt":{"type":"string","nullable":true},"lastPublishedAt":{"type":"string","nullable":true},"lastScheduledAt":{"type":"string","nullable":true},"lastDraftedAt":{"type":"string","nullable":true},"daysSinceLastPublished":{"type":"number","nullable":true},"hasScheduledContent":{"type":"boolean"}},"required":["product","totalPosts","draftCount","pendingReviewCount","changesRequestedCount","approvedCount","scheduledCount","publishedCount","firstPublishedAt","lastPublishedAt","lastScheduledAt","lastDraftedAt","daysSinceLastPublished","hasScheduledContent"]},"ContentCoverageResponseDto":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/ContentCoverageSummaryDto"},"products":{"type":"array","items":{"$ref":"#/components/schemas/ContentCoverageProductDto"}}},"required":["summary","products"]},"AddProjectMemberDto":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["admin","editor","viewer"]}},"required":["userId","role"]},"UpdateProjectMemberRoleDto":{"type":"object","properties":{"role":{"type":"string","enum":["admin","editor","viewer"]}},"required":["role"]},"RenameProjectMediaDto":{"type":"object","properties":{}},"BulkDeleteProjectMediaDto":{"type":"object","properties":{}},"RegisterMediaItemDto":{"type":"object","properties":{"fileName":{"type":"string"},"fileId":{"type":"string"},"url":{"type":"string"},"size":{"type":"number"},"type":{"type":"string"},"mimeType":{"type":"string"},"dimensions":{"type":"string"},"thumbnail":{"type":"string"},"source":{"type":"string"},"attribution":{"type":"string"},"attributionUrl":{"type":"string"}},"required":["fileName","url","size","type"]},"RegisterProjectMediaDto":{"type":"object","properties":{"mediaItems":{"type":"array","items":{"$ref":"#/components/schemas/RegisterMediaItemDto"}},"ownerId":{"type":"string"}},"required":["mediaItems"]},"ProjectContextMembershipDto":{"type":"object","properties":{"isMember":{"type":"boolean"},"role":{"type":"string","nullable":true}},"required":["isMember","role"]},"ProjectContextPermissionsDto":{"type":"object","properties":{"canRead":{"type":"boolean"},"canCreatePost":{"type":"boolean"},"canUpdatePost":{"type":"boolean"},"canDeletePost":{"type":"boolean"},"canManageMembers":{"type":"boolean"},"canUploadMedia":{"type":"boolean"}},"required":["canRead","canCreatePost","canUpdatePost","canDeletePost","canManageMembers","canUploadMedia"]},"ProjectContextCapabilitiesDto":{"type":"object","properties":{"canPublish":{"type":"boolean"},"hasExceededPostsLimit":{"type":"boolean","description":"True when the team owner has reached the monthly post allowance."},"aiContentGenerationAllowed":{"type":"boolean"},"aiContentGenerationUsed":{"type":"number"},"postsMonthlyLimit":{"type":"number","description":"Monthly post allowance for the team owner plan."},"postsUsed":{"type":"number","description":"Posts consumed in the current billing cycle."},"postsRemaining":{"type":"number","description":"Remaining posts before the monthly allowance is reached."},"aiContentGenerationLimit":{"type":"number","description":"Monthly AI content generation allowance."},"limitReason":{"type":"string","nullable":true,"description":"Reason publishing or AI generation is blocked, when applicable."},"projectArchived":{"type":"boolean","description":"True when the project is archived and cannot publish."}},"required":["canPublish","hasExceededPostsLimit","aiContentGenerationAllowed","aiContentGenerationUsed"]},"ProjectContextResponseDto":{"type":"object","properties":{"membership":{"$ref":"#/components/schemas/ProjectContextMembershipDto"},"permissions":{"$ref":"#/components/schemas/ProjectContextPermissionsDto"},"capabilities":{"$ref":"#/components/schemas/ProjectContextCapabilitiesDto"}},"required":["membership","permissions","capabilities"]},"CreateInvitationDto":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"},"note":{"type":"string"}},"required":["email","role"]},"InvitationTeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["id","name","description"]},"InvitationUserSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"type":"string"}},"required":["id","name"]},"InvitationDetailResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"effectiveStatus":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"team":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationTeamDto"}]},"inviter":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationUserSummaryDto"}]}},"required":["id","teamId","email","role","status","effectiveStatus","createdAt","expiresAt","team","inviter"]},"AdminIntegrationTeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team identifier"},"name":{"type":"string","description":"Team display name"},"organizationId":{"type":"string","description":"Organization identifier"}},"required":["id","name","organizationId"]},"AdminIntegrationOrganizationDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Organization display name"},"slug":{"type":"string","description":"Organization slug","nullable":true},"status":{"type":"string","description":"Organization status"}},"required":["id","name","status"]},"AdminIntegrationItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Integration identifier"},"platform":{"type":"string","description":"Connected platform"},"accountId":{"type":"string","description":"Provider account identifier"},"aliasAccountId":{"type":"string","description":"Alternative provider account identifier","nullable":true},"name":{"type":"string","description":"Display name of the connected account","nullable":true},"username":{"type":"string","description":"Username or handle of the connected account","nullable":true},"account":{"type":"string","description":"Readable account label"},"profileImage":{"type":"string","description":"Profile image URL","nullable":true},"status":{"type":"string","description":"Integration status"},"permissionState":{"type":"string","description":"Permission state","nullable":true},"missingScopes":{"description":"Missing OAuth scopes","type":"array","items":{"type":"string"}},"health":{"type":"string","description":"Derived health summary"},"isExpired":{"type":"boolean","description":"Whether the access token is currently expired"},"expiresAt":{"type":"number","description":"Token expiration timestamp in milliseconds"},"lastSync":{"type":"number","description":"Last successful sync timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"team":{"$ref":"#/components/schemas/AdminIntegrationTeamDto"},"organization":{"$ref":"#/components/schemas/AdminIntegrationOrganizationDto"},"wabaId":{"type":"string","description":"WhatsApp Business Account ID","nullable":true},"phoneNumberId":{"type":"string","description":"WhatsApp phone number identifier","nullable":true},"businessAccountName":{"type":"string","description":"Business account display name","nullable":true},"telegramWebhookUrl":{"type":"string","description":"Telegram webhook URL","nullable":true}},"required":["id","platform","accountId","account","status","missingScopes","health","isExpired","expiresAt","createdAt","updatedAt","team","organization"]},"AdminIntegrationStatsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total matching integrations"},"connected":{"type":"number","description":"Connected integrations"},"disconnected":{"type":"number","description":"Disconnected integrations"},"error":{"type":"number","description":"Integrations in error state"},"expired":{"type":"number","description":"Integrations with expired tokens"},"needsReauth":{"type":"number","description":"Integrations missing permissions"}},"required":["total","connected","disconnected","error","expired","needsReauth"]},"AdminIntegrationsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdminIntegrationItemDto"}},"stats":{"$ref":"#/components/schemas/AdminIntegrationStatsDto"},"page":{"type":"number","description":"Current page number"},"pageSize":{"type":"number","description":"Number of items per page"},"total":{"type":"number","description":"Total matching items"},"totalPages":{"type":"number","description":"Total available pages"},"hasMore":{"type":"boolean","description":"Whether another page exists"}},"required":["items","stats","page","pageSize","total","totalPages","hasMore"]},"AdminIntegrationProjectDto":{"type":"object","properties":{"id":{"type":"string","description":"Project identifier"},"name":{"type":"string","description":"Project name"}},"required":["id","name"]},"AdminIntegrationAddedByDto":{"type":"object","properties":{"id":{"type":"string","description":"User identifier"},"name":{"type":"string","description":"User display name"},"email":{"type":"string","description":"User email","nullable":true}},"required":["id","name"]},"AdminIntegrationTokenHealthDto":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Token expiration timestamp in milliseconds"},"isExpired":{"type":"boolean","description":"Whether the access token is currently expired"},"hasRefreshToken":{"type":"boolean","description":"Whether the integration has a stored refresh token"},"hasAccessToken":{"type":"boolean","description":"Whether the integration has a stored access token"},"lastSync":{"type":"number","description":"Last successful sync timestamp in milliseconds","nullable":true},"lastSuccessfulAnalyticsSyncAt":{"type":"number","description":"Last successful analytics sync timestamp in milliseconds","nullable":true},"lastAnalyticsErrorCode":{"type":"string","description":"Last analytics sync error code","nullable":true}},"required":["expiresAt","isExpired","hasRefreshToken","hasAccessToken"]},"AdminIntegrationDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Integration identifier"},"platform":{"type":"string","description":"Connected platform"},"accountId":{"type":"string","description":"Provider account identifier"},"aliasAccountId":{"type":"string","description":"Alternative provider account identifier","nullable":true},"name":{"type":"string","description":"Display name of the connected account","nullable":true},"username":{"type":"string","description":"Username or handle of the connected account","nullable":true},"account":{"type":"string","description":"Readable account label"},"profileImage":{"type":"string","description":"Profile image URL","nullable":true},"status":{"type":"string","description":"Integration status"},"permissionState":{"type":"string","description":"Permission state","nullable":true},"missingScopes":{"description":"Missing OAuth scopes","type":"array","items":{"type":"string"}},"health":{"type":"string","description":"Derived health summary"},"isExpired":{"type":"boolean","description":"Whether the access token is currently expired"},"expiresAt":{"type":"number","description":"Token expiration timestamp in milliseconds"},"lastSync":{"type":"number","description":"Last successful sync timestamp in milliseconds","nullable":true},"createdAt":{"type":"number","description":"Creation timestamp in milliseconds"},"updatedAt":{"type":"number","description":"Last update timestamp in milliseconds"},"team":{"$ref":"#/components/schemas/AdminIntegrationTeamDto"},"organization":{"$ref":"#/components/schemas/AdminIntegrationOrganizationDto"},"wabaId":{"type":"string","description":"WhatsApp Business Account ID","nullable":true},"phoneNumberId":{"type":"string","description":"WhatsApp phone number identifier","nullable":true},"businessAccountName":{"type":"string","description":"Business account display name","nullable":true},"telegramWebhookUrl":{"type":"string","description":"Telegram webhook URL","nullable":true},"project":{"description":"Owning project when scoped","nullable":true,"allOf":[{"$ref":"#/components/schemas/AdminIntegrationProjectDto"}]},"addedBy":{"$ref":"#/components/schemas/AdminIntegrationAddedByDto"},"tokenHealth":{"$ref":"#/components/schemas/AdminIntegrationTokenHealthDto"},"grantedScopes":{"description":"Granted OAuth scopes","type":"array","items":{"type":"string"}},"requiredScopes":{"description":"Required OAuth scopes","type":"array","items":{"type":"string"}},"webhookConfigured":{"type":"boolean","description":"Webhook configured flag"},"deletedAt":{"type":"number","description":"Deletion timestamp in milliseconds when soft-deleted","nullable":true}},"required":["id","platform","accountId","account","status","missingScopes","health","isExpired","expiresAt","createdAt","updatedAt","team","organization","addedBy","tokenHealth","grantedScopes","requiredScopes","webhookConfigured"]},"AdminIntegrationDetailResponseDto":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/AdminIntegrationDetailDto"}},"required":["integration"]},"UpdateSystemSettingsDto":{"type":"object","properties":{}},"PublicMaintenanceWindowDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"reason":{"type":"string"},"status":{"type":"string","enum":["maintenance","partial","read_only"]},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"}},"required":["id","reason","status","startsAt","endsAt"]},"PublicMaintenanceStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["normal","maintenance","partial","read_only"]},"message":{"type":"string","nullable":true},"estimatedDuration":{"type":"string","nullable":true},"activeWindow":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PublicMaintenanceWindowDto"}]},"upcomingWindow":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PublicMaintenanceWindowDto"}]}},"required":["status"]},"UpdateFeedbackTriageDto":{"type":"object","properties":{}},"SubmitFeedbackDto":{"type":"object","properties":{"teamId":{"type":"string"},"message":{"type":"string"},"feedbackType":{"type":"string","enum":["very_good","not_bad","poor"]},"reportType":{"type":"string","enum":["general","bug"]},"pagePath":{"type":"string"},"bugArea":{"type":"string"},"actualBehavior":{"type":"string"},"expectedBehavior":{"type":"string"},"browserInfo":{"type":"string"},"entryPoint":{"type":"string"},"viewport":{"type":"string"},"timezone":{"type":"string"},"release":{"type":"string"},"severity":{"type":"string","description":"Bug severity. Only meaningful for bug reports; stored in context.","enum":["minor","major","critical"]}},"required":["teamId","message","feedbackType","reportType"]},"UpdateDemoRequestStatusDto":{"type":"object","properties":{}},"CreateDemoRequestDto":{"type":"object","properties":{}},"CalendlyWebhookPayloadDto":{"type":"object","properties":{}},"PostProductSummaryResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"offeringType":{"type":"string","nullable":true},"status":{"type":"string"},"thumbnailUrl":{"type":"string","nullable":true},"isAvailable":{"type":"boolean"}},"required":["id","name","offeringType","status","thumbnailUrl","isAvailable"]},"PostSchedulingResponseDto":{"type":"object","properties":{"scheduleAt":{"type":"string","nullable":true},"proposedScheduleAt":{"type":"string","nullable":true},"platformTargets":{"type":"object","nullable":true},"platformOptions":{"type":"object","nullable":true}},"required":["scheduleAt","proposedScheduleAt","platformTargets","platformOptions"]},"PostApprovalResponseDto":{"type":"object","properties":{"status":{"type":"string"},"requestedBy":{"type":"string","nullable":true},"requestedAt":{"type":"string","nullable":true},"decisionBy":{"type":"string","nullable":true},"decisionAt":{"type":"string","nullable":true},"decisionComment":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"contentRevision":{"type":"number"},"approvedRevision":{"type":"number","nullable":true}},"required":["status","requestedBy","requestedAt","decisionBy","decisionAt","decisionComment","updatedAt","contentRevision","approvedRevision"]},"PostComplianceResponseDto":{"type":"object","properties":{"status":{"type":"string","nullable":true},"result":{"type":"object","nullable":true}},"required":["status","result"]},"PostMediaResponseDto":{"type":"object","properties":{"id":{"type":"string"},"mediaId":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"},"thumbnail":{"type":"string","nullable":true},"fileName":{"type":"string"},"mimeType":{"type":"string","nullable":true},"dimensions":{"type":"string","nullable":true},"sizeBytes":{"type":"string"},"sortOrder":{"type":"number"},"platformMediaData":{"type":"object","nullable":true},"createdAt":{"type":"string"}},"required":["id","mediaId","url","type","thumbnail","fileName","mimeType","dimensions","sizeBytes","sortOrder","platformMediaData","createdAt"]},"PostIntegrationResponseDto":{"type":"object","properties":{"id":{"type":"string"},"integrationId":{"type":"string"},"platform":{"type":"string"},"status":{"type":"string"},"platformPostId":{"type":"string","nullable":true},"permaLink":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","integrationId","platform","status","platformPostId","permaLink","createdAt","updatedAt"]},"PostListItemResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"authorId":{"type":"string"},"content":{"type":"string"},"contentPrompt":{"type":"string"},"imagePrompt":{"type":"string"},"productId":{"type":"string","nullable":true},"product":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PostProductSummaryResponseDto"}]},"status":{"type":"string"},"postMode":{"type":"string","nullable":true},"postType":{"type":"string","nullable":true},"igMediaType":{"type":"string","nullable":true},"contentTone":{"type":"string","nullable":true},"contentHashtags":{"type":"boolean","nullable":true},"contentLanguage":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduling":{"$ref":"#/components/schemas/PostSchedulingResponseDto"},"approval":{"$ref":"#/components/schemas/PostApprovalResponseDto"},"compliance":{"$ref":"#/components/schemas/PostComplianceResponseDto"},"media":{"type":"array","items":{"$ref":"#/components/schemas/PostMediaResponseDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/PostIntegrationResponseDto"}}},"required":["id","teamId","projectId","authorId","content","contentPrompt","imagePrompt","productId","product","status","postMode","postType","igMediaType","contentTone","contentHashtags","contentLanguage","createdAt","updatedAt","scheduling","approval","compliance","media","integrations"]},"PostReadPageInfoDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]},"PostReadPermissionsDto":{"type":"object","properties":{"canRead":{"type":"boolean"},"role":{"type":"string"}},"required":["canRead","role"]},"ListProjectPostsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PostListItemResponseDto"}},"pageInfo":{"$ref":"#/components/schemas/PostReadPageInfoDto"},"permissions":{"$ref":"#/components/schemas/PostReadPermissionsDto"}},"required":["items","pageInfo","permissions"]},"PostWriteIntegrationDto":{"type":"object","properties":{"integrationId":{"type":"string"},"platform":{"type":"string","enum":["instagram","facebook","youtube","google","tiktok","x","linkedin","pinterest","whatsapp","telegram","other"]}},"required":["integrationId","platform"]},"CreateCustomerPostDto":{"type":"object","properties":{"content":{"type":"string"},"contentPrompt":{"type":"string"},"imagePrompt":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","published"]},"postMode":{"type":"string","enum":["feed","story","short_video","long_video"]},"postType":{"type":"string","enum":["general","announcement","question","promotion","event","quote","tip","custom"]},"igMediaType":{"type":"string","enum":["feed","story","reel"]},"contentTone":{"type":"string"},"contentHashtags":{"type":"boolean"},"contentLanguage":{"type":"string"},"mediaIds":{"description":"Ordered media ids to attach to the post.","type":"array","items":{"type":"string"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/PostWriteIntegrationDto"}},"platformOptions":{"type":"object","nullable":true},"productId":{"type":"string","nullable":true,"description":"Optional related product promoted by this post. Empty strings are treated as null."}},"required":["content","contentPrompt","imagePrompt","integrations"]},"PostProjectSummaryResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"requirePostApprovalForEditors":{"type":"boolean","nullable":true}},"required":["id","teamId","name","requirePostApprovalForEditors"]},"PostPublishingStateDto":{"type":"object","properties":{"status":{"type":"string","enum":["draft","scheduled","publishing","published","failed","cancelled"]},"progressPercent":{"type":"number"},"hasActiveSchedule":{"type":"boolean"},"isTerminal":{"type":"boolean"},"nextAttemptAt":{"type":"string","nullable":true},"totalJobs":{"type":"number"},"succeededJobs":{"type":"number"},"failedJobs":{"type":"number"},"cancelledJobs":{"type":"number"},"runningJobs":{"type":"number"},"queuedJobs":{"type":"number"}},"required":["status","progressPercent","hasActiveSchedule","isTerminal","nextAttemptAt","totalJobs","succeededJobs","failedJobs","cancelledJobs","runningJobs","queuedJobs"]},"PostDetailResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"authorId":{"type":"string"},"content":{"type":"string"},"contentPrompt":{"type":"string"},"imagePrompt":{"type":"string"},"productId":{"type":"string","nullable":true},"product":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PostProductSummaryResponseDto"}]},"status":{"type":"string"},"postMode":{"type":"string","nullable":true},"postType":{"type":"string","nullable":true},"igMediaType":{"type":"string","nullable":true},"contentTone":{"type":"string","nullable":true},"contentHashtags":{"type":"boolean","nullable":true},"contentLanguage":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduling":{"$ref":"#/components/schemas/PostSchedulingResponseDto"},"approval":{"$ref":"#/components/schemas/PostApprovalResponseDto"},"compliance":{"$ref":"#/components/schemas/PostComplianceResponseDto"},"media":{"type":"array","items":{"$ref":"#/components/schemas/PostMediaResponseDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/PostIntegrationResponseDto"}},"project":{"$ref":"#/components/schemas/PostProjectSummaryResponseDto"},"publishingState":{"$ref":"#/components/schemas/PostPublishingStateDto"}},"required":["id","teamId","projectId","authorId","content","contentPrompt","imagePrompt","productId","product","status","postMode","postType","igMediaType","contentTone","contentHashtags","contentLanguage","createdAt","updatedAt","scheduling","approval","compliance","media","integrations","project","publishingState"]},"GetPostResponseDto":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/PostDetailResponseDto"}},"required":["post"]},"PostAnalyticsMetricsDto":{"type":"object","properties":{"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"views":{"type":"number"},"impressions":{"type":"number"},"reach":{"type":"number"},"saves":{"type":"number"},"engagementRate":{"type":"number"}},"required":["likes","comments","shares","views","impressions","reach","saves","engagementRate"]},"PostAnalyticsPlatformResponseDto":{"type":"object","properties":{"platform":{"type":"string"},"status":{"type":"string","enum":["SUCCESS","PARTIAL","FAILED","NOT_SUPPORTED","RATE_LIMITED"]},"error":{"type":"string","nullable":true},"metrics":{"$ref":"#/components/schemas/PostAnalyticsMetricsDto"},"platformData":{"type":"object","nullable":true}},"required":["platform","status","metrics"]},"PostAnalyticsResponseDto":{"type":"object","properties":{"postId":{"type":"string"},"lastUpdated":{"type":"string"},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/PostAnalyticsPlatformResponseDto"}}},"required":["postId","lastUpdated","platforms"]},"UpdateCustomerPostDto":{"type":"object","properties":{"content":{"type":"string"},"contentPrompt":{"type":"string"},"imagePrompt":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","published"]},"postMode":{"type":"string","enum":["feed","story","short_video","long_video"]},"postType":{"type":"string","enum":["general","announcement","question","promotion","event","quote","tip","custom"]},"igMediaType":{"type":"string","enum":["feed","story","reel"]},"contentTone":{"type":"string"},"contentHashtags":{"type":"boolean"},"contentLanguage":{"type":"string"},"mediaIds":{"description":"Ordered media ids to attach to the post.","type":"array","items":{"type":"string"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/PostWriteIntegrationDto"}},"platformOptions":{"type":"object","nullable":true},"productId":{"type":"string","nullable":true,"description":"Optional related product promoted by this post. Empty strings are treated as null."}},"required":["content","contentPrompt","imagePrompt","integrations"]},"DeletePostResponseDto":{"type":"object","properties":{"deleted":{"type":"boolean"},"postId":{"type":"string"},"projectId":{"type":"string"}},"required":["deleted","postId","projectId"]},"PostApprovalHistoryItemDto":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"actorId":{"type":"string"},"previousStatus":{"type":"string"},"nextStatus":{"type":"string"},"comment":{"type":"string","nullable":true},"contentRevision":{"type":"number","nullable":true},"proposedScheduleAt":{"type":"string","nullable":true},"publishIntent":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","postId","actorId","previousStatus","nextStatus","comment","contentRevision","proposedScheduleAt","publishIntent","createdAt"]},"GetApprovalHistoryResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PostApprovalHistoryItemDto"}}},"required":["items"]},"ApprovalQueueResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PostListItemResponseDto"}}},"required":["items"]},"SubmitForApprovalDto":{"type":"object","properties":{"publishIntent":{"type":"string","enum":["schedule","publish_now"],"description":"Whether the submitter intends to schedule or publish immediately upon approval."},"proposedScheduleAt":{"type":"string","description":"ISO 8601 datetime the submitter would like the post to be scheduled for."},"comment":{"type":"string","maxLength":1024}}},"WithdrawSubmissionDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1024}}},"ApprovePostDto":{"type":"object","properties":{"publishAction":{"type":"string","enum":["approve","publish_now","schedule"],"description":"What to do after approval: approve only, publish now, or schedule at the provided/proposed time."},"scheduledAt":{"type":"string","description":"ISO 8601 scheduled datetime when publishAction is \"schedule\". Falls back to the post proposedScheduleAt if omitted."},"comment":{"type":"string","maxLength":1024}}},"RejectPostDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1024}}},"RequestChangesDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1024}}},"PostPlatformTargetDto":{"type":"object","properties":{"integrationId":{"type":"string"},"platform":{"type":"string"},"platformPostId":{"type":"string"},"permaLink":{"type":"string"}},"required":["integrationId","platform"]},"CreatePostDto":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"authorId":{"type":"string"},"content":{"type":"string"},"contentPrompt":{"type":"string"},"imagePrompt":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PUBLISHED","DELETED"]},"postMode":{"type":"string","enum":["FEED","STORY","SHORT_VIDEO","LONG_VIDEO"]},"postType":{"type":"string","enum":["GENERAL","ANNOUNCEMENT","QUESTION","PROMOTION","EVENT","QUOTE","TIP","CUSTOM"]},"igMediaType":{"type":"string","enum":["FEED","STORY","REEL"]},"scheduleAt":{"format":"date-time","type":"string"},"proposedScheduleAt":{"format":"date-time","type":"string"},"contentTone":{"type":"string"},"contentHashtags":{"type":"boolean"},"contentLanguage":{"type":"string"},"platformTargets":{"type":"array","items":{"$ref":"#/components/schemas/PostPlatformTargetDto"}},"platformOptions":{"type":"object"},"approvalStatus":{"type":"string","enum":["DRAFT","PENDING_REVIEW","CHANGES_REQUESTED","APPROVED","REJECTED"]},"complianceStatus":{"type":"string","enum":["PASS","WARNING","FAIL"]},"complianceResult":{"type":"object"},"validationMetadata":{"type":"object"}},"required":["teamId","projectId","authorId","content","contentPrompt","imagePrompt"]},"CreatePublishJobDto":{"type":"object","properties":{"postId":{"type":"string"},"integrationId":{"type":"string"},"platform":{"type":"string"},"maxAttempts":{"type":"number","default":5},"nextAttemptAt":{"format":"date-time","type":"string"}},"required":["postId","integrationId","platform"]},"MarkPublishJobStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED","SCHEDULED","RETRYING"]},"attemptCount":{"type":"number"},"nextAttemptAt":{"format":"date-time","type":"string"},"startedAt":{"format":"date-time","type":"string"},"completedAt":{"format":"date-time","type":"string"},"platformPostId":{"type":"string"},"permaLink":{"type":"string"},"lastError":{"type":"object"},"providerResponse":{"type":"object"}},"required":["status"]},"RecordPublishAttemptDto":{"type":"object","properties":{"attemptNumber":{"type":"number"},"status":{"type":"string","enum":["RUNNING","SUCCEEDED","FAILED","CANCELLED"]},"startedAt":{"format":"date-time","type":"string"},"completedAt":{"format":"date-time","type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"rawDetails":{"type":"string"},"bullJobId":{"type":"string"},"providerResponse":{"type":"object"}},"required":["attemptNumber","status"]},"RecordPublishFailureDto":{"type":"object","properties":{"attemptNumber":{"type":"number"},"platform":{"type":"string","enum":["INSTAGRAM","FACEBOOK","YOUTUBE","GOOGLE","TIKTOK","X","LINKEDIN","PINTEREST","WHATSAPP","TELEGRAM","OTHER"]},"message":{"type":"string"},"category":{"type":"string","enum":["PROVIDER_OUTAGE","AUTH_OR_CONFIG","MISSING_PERMISSIONS","RATE_LIMITED","VALIDATION","MEDIA_INVALID","TIMEOUT","INTERNAL","UNKNOWN"]},"code":{"type":"string"},"rawDetails":{"type":"string"},"retryable":{"type":"boolean","default":true}},"required":["attemptNumber","platform","message"]},"AppendPublishEventDto":{"type":"object","properties":{"type":{"type":"string","enum":["POST_CREATED","POST_SCHEDULED","POST_PUBLISHED","POST_SOFT_DELETED","PUBLISH_JOB_CREATED","PUBLISH_JOB_STARTED","PUBLISH_JOB_SUCCEEDED","PUBLISH_JOB_FAILED","PUBLISH_JOB_CANCELLED","PUBLISH_ATTEMPT_RECORDED","PUBLISH_FAILURE_RECORDED","PUBLISH_SCHEDULE_CREATED","PUBLISH_SCHEDULE_CANCELLED","PUBLISH_SCHEDULE_FIRED","PUBLISH_JOB_CLAIMED","PUBLISH_JOB_RETRY_SCHEDULED","PUBLISH_JOB_RETRY_EXHAUSTED","PUBLISH_JOB_STALE_CLAIM_RECOVERED","PUBLISH_JOB_RECONCILIATION_STARTED","PUBLISH_JOB_RECONCILIATION_SCHEDULED","PUBLISH_JOB_RECONCILIATION_SUCCEEDED","PUBLISH_JOB_RECONCILIATION_FAILED"]},"publishJobId":{"type":"string"},"payload":{"type":"object"},"processedAt":{"format":"date-time","type":"string"}},"required":["type"]},"AddPostIntegrationDto":{"type":"object","properties":{"integrationId":{"type":"string"},"platform":{"type":"string","description":"Platform slug, e.g. instagram"},"platformPostId":{"type":"string"},"permaLink":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PUBLISHED","FAILED","REMOVED"]},"providerResponse":{"type":"object"}},"required":["integrationId","platform"]},"SchedulePublishJobDto":{"type":"object","properties":{"scheduledAt":{"format":"date-time","type":"string","description":"When the publish job should run"},"metadata":{"type":"object","description":"Optional schedule metadata"}},"required":["scheduledAt"]},"CancelPublishJobDto":{"type":"object","properties":{"cancelledBy":{"type":"string","description":"Stable actor identifier for audit."},"reason":{"type":"string","description":"Human-readable cancellation reason."}}},"ReschedulePublishJobDto":{"type":"object","properties":{"scheduledAt":{"format":"date-time","type":"string","description":"New scheduled time for the publish job"},"metadata":{"type":"object","description":"Optional schedule metadata"}},"required":["scheduledAt"]},"MediaProbeDto":{"type":"object","properties":{"url":{"type":"string","description":"Publicly reachable media URL (video or image).","example":"https://example.com/media.mp4"},"kind":{"type":"string","description":"Optional hint to avoid guessing. If omitted, we will try to infer from headers/URL and probe.","enum":["video","image"]}},"required":["url"]},"MediaThumbnailDto":{"type":"object","properties":{"url":{"type":"string","description":"Publicly reachable media URL (video or image).","example":"https://example.com/media.mp4"},"kind":{"type":"string","description":"Optional hint to avoid guessing.","enum":["video","image"]},"width":{"type":"number","description":"Target thumbnail width in pixels.","default":320,"minimum":64,"maximum":1920},"timestamp":{"type":"string","description":"Thumbnail timestamp for videos. Supports ffmpeg time formats like '50%' or '00:00:01.500'.","default":"50%"}},"required":["url"]},"PublishJobIntegrationResponseDto":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"profileImage":{"type":"string","nullable":true}},"required":["id","platform"]},"PublishJobAttemptResponseDto":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"status":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true}},"required":["id","attemptNumber","status","startedAt"]},"PublishJobFailureResponseDto":{"type":"object","properties":{"id":{"type":"string"},"attemptNumber":{"type":"number"},"platform":{"type":"string"},"category":{"type":"string"},"code":{"type":"string","nullable":true},"message":{"type":"string"},"retryable":{"type":"boolean"},"occurredAt":{"type":"string"}},"required":["id","attemptNumber","platform","category","message","retryable","occurredAt"]},"PublishJobResponseDto":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"integrationId":{"type":"string"},"platform":{"type":"string"},"status":{"type":"string"},"attemptCount":{"type":"number"},"maxAttempts":{"type":"number"},"nextAttemptAt":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"platformPostId":{"type":"string","nullable":true},"permaLink":{"type":"string","nullable":true},"lastError":{"type":"object","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integration":{"$ref":"#/components/schemas/PublishJobIntegrationResponseDto"},"latestAttempt":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PublishJobAttemptResponseDto"}]},"latestFailure":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PublishJobFailureResponseDto"}]}},"required":["id","postId","integrationId","platform","status","attemptCount","maxAttempts","createdAt","updatedAt","integration"]},"ListPublishJobsResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublishJobResponseDto"}}},"required":["items"]},"PublishActionResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"jobId":{"type":"string","nullable":true},"scheduleAt":{"type":"string","nullable":true},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/PublishJobResponseDto"}}},"required":["success","message"]},"SchedulePostRequestDto":{"type":"object","properties":{"scheduledAt":{"type":"string","description":"ISO 8601 scheduled datetime"}},"required":["scheduledAt"]},"CancelPublishJobRequestDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":256}}},"ReschedulePublishJobRequestDto":{"type":"object","properties":{"scheduledAt":{"type":"string","description":"ISO 8601 scheduled datetime"}},"required":["scheduledAt"]},"CalendarMediaDto":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string","nullable":true},"url":{"type":"string"},"kind":{"type":"string"},"mimeType":{"type":"string","nullable":true},"thumbnail":{"type":"string","nullable":true},"sortOrder":{"type":"number"}},"required":["id","url","kind","sortOrder"]},"CalendarIntegrationDto":{"type":"object","properties":{"id":{"type":"string"},"postIntegrationId":{"type":"string"},"platform":{"type":"string"},"name":{"type":"string","nullable":true},"status":{"type":"string"}},"required":["id","postIntegrationId","platform","status"]},"CalendarPostResponseDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string","nullable":true},"scheduleAt":{"type":"string","nullable":true},"calendarAt":{"type":"string","description":"Datetime used to place this post on the calendar. Published posts use successful publish completion time; scheduled posts use scheduleAt."},"status":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/CalendarMediaDto"}},"integrations":{"type":"array","items":{"$ref":"#/components/schemas/CalendarIntegrationDto"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","calendarAt","status","teamId","projectId","media","integrations","createdAt","updatedAt"]},"CalendarPostListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CalendarPostResponseDto"}}},"required":["items"]},"RegisterSingleProductMediaDto":{"type":"object","properties":{"fileName":{"type":"string"},"fileId":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"dimensions":{"type":"string"},"size":{"type":"number"},"thumbnail":{"type":"string"},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"alt":{"type":"string"},"ownerId":{"type":"string"},"uploadedBy":{"type":"string"},"processingStatus":{"type":"string","enum":["PENDING","PROCESSING","COMPLETED","FAILED"]}},"required":["fileName","fileId","url","type","size"]},"UpdateProductMediaDto":{"type":"object","properties":{"alt":{"type":"string"},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"fileName":{"type":"string"},"url":{"type":"string"},"processingStatus":{"type":"string","enum":["PENDING","PROCESSING","COMPLETED","FAILED"]},"processingError":{"type":"string"},"thumbnail":{"type":"string"},"dimensions":{"type":"string"}}},"ReorderProductMediaDto":{"type":"object","properties":{"mediaIds":{"description":"Media IDs in desired order","type":"array","items":{"type":"string"}}},"required":["mediaIds"]},"ProductInventoryDto":{"type":"object","properties":{"trackQuantity":{"type":"boolean"},"quantity":{"type":"number"},"lowStockThreshold":{"type":"number"}}},"ProductVariantDto":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"price":{"type":"number"},"compareAtPrice":{"type":"number"},"inventory":{"type":"number"},"options":{"type":"object"}},"required":["sku","name","price"]},"ProductDimensionsDto":{"type":"object","properties":{"length":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"unit":{"type":"string"}},"required":["length","width","height","unit"]},"PrimaryMediaDto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"thumbnailUrl":{"type":"object"},"kind":{"type":"string"},"altText":{"type":"object"}},"required":["id","url","kind"]},"ProductResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"sku":{"type":"string"},"price":{"type":"number"},"description":{"type":"string"},"barcode":{"type":"string"},"brand":{"type":"string"},"compareAtPrice":{"type":"number"},"cost":{"type":"number"},"status":{"type":"string"},"offeringType":{"type":"string"},"visibility":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"inventory":{"$ref":"#/components/schemas/ProductInventoryDto"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantDto"}},"dimensions":{"$ref":"#/components/schemas/ProductDimensionsDto"},"weight":{"type":"number"},"weightUnit":{"type":"string"},"mediaProcessingStatus":{"type":"string"},"primaryMedia":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PrimaryMediaDto"}]},"createdBy":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"},"deletedAt":{"format":"date-time","type":"string"}},"required":["id","teamId","name","sku","price","status","visibility","createdAt","updatedAt"]},"PaginatedProductsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["data","hasMore"]},"CSVProductRowDto":{"type":"object","properties":{"name":{"type":"string"},"sku":{"type":"string"},"price":{"type":"number"},"description":{"type":"string"},"compare_at_price":{"type":"number"},"cost":{"type":"number"},"quantity":{"type":"number"},"low_stock_threshold":{"type":"number"},"category":{"type":"string"},"category_path":{"type":"string"},"tags":{"type":"string"},"status":{"type":"string"},"visibility":{"type":"string"},"weight":{"type":"number"},"weight_unit":{"type":"string"},"barcode":{"type":"string"}},"required":["name","sku","price"]},"ImportProductsDto":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/CSVProductRowDto"}},"autoCreateCategories":{"type":"boolean","default":true}},"required":["products"]},"CSVImportErrorDto":{"type":"object","properties":{"row":{"type":"number"},"sku":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}},"required":["row","sku","field","message"]},"ImportProductsResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"total":{"type":"number"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/CSVImportErrorDto"}},"createdCategories":{"type":"array","items":{"type":"string"}}},"required":["success","total","errors","createdCategories"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string"},"sku":{"type":"string"},"price":{"type":"number"},"description":{"type":"string"},"barcode":{"type":"string"},"brand":{"type":"string"},"compareAtPrice":{"type":"number"},"cost":{"type":"number"},"status":{"type":"string"},"offeringType":{"type":"string"},"visibility":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"inventory":{"type":"object","additionalProperties":true},"variants":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"seo":{"type":"object","additionalProperties":true},"weight":{"type":"number"},"weightUnit":{"type":"string"},"dimensions":{"type":"object","additionalProperties":true}},"required":["name","sku","price"]},"BulkDeleteProductsDto":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]},"BulkDeleteProductsResponseDto":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]},"BulkUpdateProductsDto":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","draft","archived"]},"visibility":{"type":"string"}},"required":["ids"]},"BulkUpdateProductsResponseDto":{"type":"object","properties":{"updated":{"type":"number"}},"required":["updated"]},"AdjustInventoryDto":{"type":"object","properties":{"quantity":{"type":"number"},"reason":{"type":"string"}},"required":["quantity"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string"},"sku":{"type":"string"},"price":{"type":"number"},"description":{"type":"string"},"barcode":{"type":"string"},"brand":{"type":"string"},"compareAtPrice":{"type":"number"},"cost":{"type":"number"},"status":{"type":"string"},"offeringType":{"type":"string"},"visibility":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"inventory":{"type":"object","additionalProperties":true},"variants":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"seo":{"type":"object","additionalProperties":true},"weight":{"type":"number"},"weightUnit":{"type":"string"},"dimensions":{"type":"object","additionalProperties":true}}},"ProductCategoryResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"parentId":{"type":"string","nullable":true},"order":{"type":"number"},"directProductCount":{"type":"number"},"directChildrenCount":{"type":"number"},"descendantProductCount":{"type":"number"},"productCount":{"type":"number"},"childrenCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","teamId","name","slug","order","directProductCount","directChildrenCount","descendantProductCount","productCount","childrenCount","createdAt","updatedAt"]},"CreateCategoryDto":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"parentId":{"type":"string"},"imageUrl":{"type":"string"},"order":{"type":"number"}},"required":["name"]},"UpdateCategoryDto":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"parentId":{"type":"string"},"imageUrl":{"type":"string"},"order":{"type":"number"}}},"ReconcileCategoriesResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"updatedCategories":{"type":"number"},"correctedDirectProductCounts":{"type":"number"},"correctedChildCounts":{"type":"number"},"correctedDescendantCounts":{"type":"number"},"scannedCategories":{"type":"number"},"scannedProducts":{"type":"number"}},"required":["success","updatedCategories","correctedDirectProductCounts","correctedChildCounts","correctedDescendantCounts","scannedCategories","scannedProducts"]},"ActivityLogUserDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"imageUrl":{"type":"string","nullable":true}},"required":["id","name","email","imageUrl"]},"ActivityLogItemDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"userId":{"type":"string"},"action":{"type":"string"},"details":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"createdAt":{"type":"string"},"actorRole":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string"},"severity":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"nullable":true},"requestId":{"type":"string","nullable":true},"user":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivityLogUserDto"}]}},"required":["id","teamId","projectId","userId","action","details","platform","createdAt","actorRole","resourceType","resourceId"]},"ActivityLogPageInfoDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]},"ActivityLogListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivityLogItemDto"}},"pageInfo":{"$ref":"#/components/schemas/ActivityLogPageInfoDto"}},"required":["items","pageInfo"]},"BusinessProfileContactDto":{"type":"object","properties":{"email":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"locationNote":{"type":"string"}},"required":["email"]},"BrandVoiceDto":{"type":"object","properties":{"tones":{"type":"array","items":{"type":"string"}},"values":{"type":"array","items":{"type":"string"}},"emojiUsage":{"type":"string"},"responseLength":{"type":"string"},"signoffStyle":{"type":"string"}}},"BusinessProfileResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"businessName":{"type":"string"},"industry":{"type":"string"},"businessType":{"type":"string"},"foundedYear":{"type":"number"},"tagline":{"type":"string"},"description":{"type":"string"},"contact":{"$ref":"#/components/schemas/BusinessProfileContactDto"},"tone":{"type":"array","items":{"type":"string"}},"brandVoice":{"$ref":"#/components/schemas/BrandVoiceDto"},"businessHours":{"type":"object"},"policies":{"type":"object"},"faqs":{"type":"array","items":{"type":"string"}},"extraNotes":{"type":"string"},"isEnabled":{"type":"boolean"},"setupStatus":{"type":"string"},"onboardingPrefill":{"type":"boolean"},"sectionValidation":{"type":"array","items":{"type":"string"}},"form":{"type":"object"},"agentSettings":{"type":"object"},"agentDeliveryPolicy":{"type":"object"},"agentToolPreferences":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","businessName","industry","description","isEnabled","createdAt","updatedAt"]},"BusinessProfileStatusResponseDto":{"type":"object","properties":{"exists":{"type":"boolean","description":"Whether a business profile exists for this team"},"id":{"type":"string"},"businessName":{"type":"string"},"isEnabled":{"type":"boolean"},"setupStatus":{"type":"string"}},"required":["exists"]},"ContactDto":{"type":"object","properties":{}},"BusinessHoursDto":{"type":"object","properties":{}},"PoliciesDto":{"type":"object","properties":{}},"AgentSettingsDto":{"type":"object","properties":{}},"AgentDeliveryPolicyDto":{"type":"object","properties":{}},"UpsertBusinessProfileDto":{"type":"object","properties":{"businessName":{"type":"string"},"industry":{"type":"string"},"businessType":{"type":"string"},"foundedYear":{"type":"number"},"tagline":{"type":"string"},"description":{"type":"string"},"contact":{"$ref":"#/components/schemas/ContactDto"},"tone":{"type":"array","items":{"type":"string"}},"brandVoice":{"$ref":"#/components/schemas/BrandVoiceDto"},"businessHours":{"$ref":"#/components/schemas/BusinessHoursDto"},"policies":{"$ref":"#/components/schemas/PoliciesDto"},"faqs":{"type":"array","items":{"type":"string"}},"extraNotes":{"type":"string"},"isEnabled":{"type":"boolean"},"setupStatus":{"type":"string"},"agentSettings":{"$ref":"#/components/schemas/AgentSettingsDto"},"agentDeliveryPolicy":{"$ref":"#/components/schemas/AgentDeliveryPolicyDto"},"agentToolPreferences":{"type":"array","items":{"type":"string"}},"sectionValidation":{"type":"array","items":{"type":"string"}},"form":{"type":"object"}},"required":["businessName","industry","description"]},"ToggleBusinessProfileDto":{"type":"object","properties":{"isEnabled":{"type":"boolean"}},"required":["isEnabled"]},"CreateDraftOrderDto":{"type":"object","properties":{"teamId":{"type":"string"},"customerId":{"type":"string"},"threadId":{"type":"string"},"integrationId":{"type":"string"},"source":{"type":"string"},"notes":{"type":"string"},"currency":{"type":"string"}}},"AddDraftOrderItemDto":{"type":"object","properties":{"productId":{"type":"string"},"sku":{"type":"string"},"variant":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"notes":{"type":"string"}}},"UpdateDraftOrderItemDto":{"type":"object","properties":{"quantity":{"type":"number"},"notes":{"type":"string"},"variant":{"type":"string"}}},"AutomationTriggerType":{"type":"string","enum":["COMMENT","DM"]},"AutomationResponseType":{"type":"string","enum":["MANUAL","AI"]},"AutomationSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"integrationId":{"type":"string"},"postId":{"type":"string","nullable":true},"triggerType":{"allOf":[{"$ref":"#/components/schemas/AutomationTriggerType"}]},"trigger":{"type":"array","items":{"type":"string"}},"response":{"type":"string","nullable":true},"aiPrompt":{"type":"string","nullable":true},"responseType":{"allOf":[{"$ref":"#/components/schemas/AutomationResponseType"}]},"dmCount":{"type":"number"},"commentCount":{"type":"number"},"isEnabled":{"type":"boolean"},"approvalStatus":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","projectId","integrationId","triggerType","trigger","responseType","dmCount","commentCount","isEnabled","createdAt","updatedAt"]},"PaginatedAutomationsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AutomationSummaryDto"}},"nextCursor":{"type":"string","nullable":true}},"required":["items"]},"AutomationLimitsDto":{"type":"object","properties":{"totalCount":{"type":"number"},"enabledCount":{"type":"number"},"allowed":{"type":"boolean"}},"required":["totalCount","enabledCount","allowed"]},"AutomationDetailDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string"},"integrationId":{"type":"string"},"postId":{"type":"string","nullable":true},"triggerType":{"allOf":[{"$ref":"#/components/schemas/AutomationTriggerType"}]},"trigger":{"type":"array","items":{"type":"string"}},"response":{"type":"string","nullable":true},"aiPrompt":{"type":"string","nullable":true},"responseType":{"allOf":[{"$ref":"#/components/schemas/AutomationResponseType"}]},"dmCount":{"type":"number"},"commentCount":{"type":"number"},"isEnabled":{"type":"boolean"},"approvalStatus":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"complianceStatus":{"type":"string","nullable":true},"complianceViolations":{"type":"array","items":{"type":"string"}}},"required":["id","teamId","projectId","integrationId","triggerType","trigger","responseType","dmCount","commentCount","isEnabled","createdAt","updatedAt","complianceViolations"]},"CreateAutomationDto":{"type":"object","properties":{"triggerType":{"allOf":[{"$ref":"#/components/schemas/AutomationTriggerType"}]},"trigger":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string"}},"response":{"type":"string"},"aiPrompt":{"type":"string"},"responseType":{"allOf":[{"$ref":"#/components/schemas/AutomationResponseType"}]},"integrationId":{"type":"string"},"postId":{"type":"string"}},"required":["triggerType","trigger","responseType","integrationId"]},"UpdateAutomationDto":{"type":"object","properties":{"triggerType":{"allOf":[{"$ref":"#/components/schemas/AutomationTriggerType"}]},"trigger":{"maxItems":20,"type":"array","items":{"type":"string"}},"response":{"type":"string"},"aiPrompt":{"type":"string"},"responseType":{"allOf":[{"$ref":"#/components/schemas/AutomationResponseType"}]},"integrationId":{"type":"string"},"postId":{"type":"string"},"expectedUpdatedAt":{"type":"string"}}},"AutomationExecutionStatus":{"type":"string","enum":["PENDING","MATCHED","SUCCEEDED","FAILED","FALLBACK_HANDOFF","SUPPRESSED","RETRIED","DEAD_LETTER"]},"AutomationExecutionRunSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string","nullable":true},"integrationId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"triggerType":{"allOf":[{"$ref":"#/components/schemas/AutomationTriggerType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/AutomationExecutionStatus"}]},"stage":{"type":"string","nullable":true},"matchedKeyword":{"type":"string","nullable":true},"responseType":{"type":"string","nullable":true},"failureCategory":{"type":"string","nullable":true},"failureCode":{"type":"string","nullable":true},"failureMessage":{"type":"string","nullable":true},"startedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","runId","teamId","triggerType","status","startedAt","createdAt","updatedAt"]},"PaginatedExecutionRunsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AutomationExecutionRunSummaryDto"}},"nextCursor":{"type":"string","nullable":true}},"required":["items"]},"TriggerEventType":{"type":"string","enum":["DM","COMMENT"]},"PreflightRequestDto":{"type":"object","properties":{"triggerType":{"allOf":[{"$ref":"#/components/schemas/TriggerEventType"}]},"message":{"type":"string"},"username":{"type":"string"},"platform":{"type":"string"},"timestamp":{"type":"string"},"metadata":{"type":"object"}},"required":["triggerType"]},"ConditionEvaluationDto":{"type":"object","properties":{"operator":{"type":"string"},"expected":{"type":"object"},"actual":{"type":"object"},"matched":{"type":"boolean"},"negate":{"type":"boolean"}},"required":["operator","expected","actual","matched","negate"]},"StepStatus":{"type":"string","enum":["success","failed","skipped","queued"]},"PreflightStepDto":{"type":"object","properties":{"name":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/StepStatus"}]},"duration":{"type":"number"},"output":{"type":"string"},"error":{"type":"string"}},"required":["name","status","duration"]},"PreflightResultDto":{"type":"object","properties":{"success":{"type":"boolean"},"matched":{"type":"boolean"},"automationId":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ConditionEvaluationDto"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PreflightStepDto"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"reasonCode":{"type":"string"},"reason":{"type":"string"},"duration":{"type":"number"},"timestamp":{"type":"string"}},"required":["success","matched","automationId","conditions","steps","warnings","errors","duration","timestamp"]},"TriggerTypeBreakdownDto":{"type":"object","properties":{"COMMENT":{"type":"number"},"DM":{"type":"number"}},"required":["COMMENT","DM"]},"ResponseTypeBreakdownDto":{"type":"object","properties":{"MANUAL":{"type":"number"},"AI":{"type":"number"}},"required":["MANUAL","AI"]},"ExecutionMetricsDto":{"type":"object","properties":{"executionsToday":{"type":"number"},"executionsThisWeek":{"type":"number"},"successRate":{"type":"number","description":"Success rate as percentage (0-100)"},"failureRate":{"type":"number","description":"Failure rate as percentage (0-100)"},"retryCount":{"type":"number"},"averageLatency":{"type":"number","nullable":true,"description":"Average latency in ms for completed runs"},"longestExecution":{"type":"number","nullable":true,"description":"Longest execution time in ms"},"executionsByTriggerType":{"$ref":"#/components/schemas/TriggerTypeBreakdownDto"},"executionsByResponseType":{"$ref":"#/components/schemas/ResponseTypeBreakdownDto"}},"required":["executionsToday","executionsThisWeek","successRate","failureRate","retryCount","executionsByTriggerType","executionsByResponseType"]},"FailureSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"automationId":{"type":"string","nullable":true},"failureCategory":{"type":"string","nullable":true},"failureCode":{"type":"string","nullable":true},"failureMessage":{"type":"string","nullable":true},"stack":{"type":"string","nullable":true,"description":"Error stack trace (from metadata)"},"attemptsMade":{"type":"number","description":"Number of retry attempts made"},"isDeadLetter":{"type":"boolean","description":"Whether this run is a dead-letter candidate (exhausted retries)"},"occurredAt":{"type":"string"}},"required":["id","runId","attemptsMade","isDeadLetter","occurredAt"]},"PaginatedFailuresDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FailureSummaryDto"}},"nextCursor":{"type":"string","nullable":true},"totalFailed":{"type":"number"}},"required":["items","totalFailed"]},"TimelineEventDto":{"type":"object","properties":{"event":{"type":"string"},"timestamp":{"type":"string"},"details":{"type":"object","nullable":true}},"required":["event","timestamp"]},"ExecutionTimelineDto":{"type":"object","properties":{"runId":{"type":"string"},"automationId":{"type":"string"},"teamId":{"type":"string"},"projectId":{"type":"string","nullable":true},"triggerType":{"type":"string"},"responseType":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEventDto"}}},"required":["runId","automationId","teamId","triggerType","responseType","events"]},"OperationalCommandResultDto":{"type":"object","properties":{"success":{"type":"boolean"},"runId":{"type":"string"},"message":{"type":"string","nullable":true}},"required":["success","runId"]},"AdTargetingAgeRangeDto":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]},"AdTargetingDto":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"string"}},"ageRange":{"$ref":"#/components/schemas/AdTargetingAgeRangeDto"},"gender":{"type":"string","enum":["all","male","female"]},"interests":{"type":"array","items":{"type":"string"}},"behaviors":{"type":"array","items":{"type":"string"}},"customAudiences":{"type":"array","items":{"type":"string"}},"lookalike":{"type":"array","items":{"type":"string"}}},"required":["locations","interests"]},"AdCampaignSettingsDto":{"type":"object","properties":{"bidStrategy":{"type":"string"},"optimization":{"type":"string"},"autoOptimize":{"type":"boolean"}},"required":["autoOptimize"]},"CreateAdCampaignDto":{"type":"object","properties":{"businessProfileId":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["meta","google","tiktok","linkedin"]},"objective":{"type":"string"},"productIds":{"type":"array","items":{"type":"string"}},"catalogId":{"type":"string"},"budgetType":{"type":"string","enum":["daily","lifetime"]},"budgetAmount":{"type":"number"},"startDate":{"type":"number","description":"Epoch ms"},"endDate":{"type":"number","description":"Epoch ms"},"runContinuously":{"type":"boolean"},"targeting":{"$ref":"#/components/schemas/AdTargetingDto"},"status":{"type":"string","enum":["draft","pending","active","paused","completed"]},"settings":{"$ref":"#/components/schemas/AdCampaignSettingsDto"}},"required":["name","platform","objective","productIds","budgetType","budgetAmount","startDate","runContinuously"]},"AdCampaignResponseDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"businessProfileId":{"type":"string","nullable":true},"name":{"type":"string"},"platform":{"type":"string","enum":["meta","google","tiktok","linkedin"]},"objective":{"type":"string"},"status":{"type":"string","enum":["draft","pending","active","paused","completed"]},"budgetType":{"type":"string","enum":["daily","lifetime"]},"budgetAmount":{"type":"number"},"startDate":{"type":"number"},"endDate":{"type":"number","nullable":true},"runContinuously":{"type":"boolean"},"productIds":{"type":"array","items":{"type":"string"}},"catalogId":{"type":"string","nullable":true},"targeting":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdTargetingDto"}]},"settings":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdCampaignSettingsDto"}]},"externalCampaignId":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["id","teamId","businessProfileId","name","platform","objective","status","budgetType","budgetAmount","startDate","endDate","runContinuously","productIds","catalogId","externalCampaignId","lastError","createdAt","updatedAt"]},"LaunchAdCampaignPlatformResultResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"externalCampaignId":{"type":"string"},"error":{"type":"string"}},"required":["success"]},"LaunchAdCampaignResponseDto":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/AdCampaignResponseDto"},"platformResult":{"$ref":"#/components/schemas/LaunchAdCampaignPlatformResultResponseDto"}},"required":["campaign"]},"UpdateAdCampaignDto":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["draft","pending","active","paused","completed"]},"productIds":{"type":"array","items":{"type":"string"}},"budgetType":{"type":"string","enum":["daily","lifetime"]},"budgetAmount":{"type":"number"},"startDate":{"type":"number","description":"Epoch ms"},"endDate":{"type":"number","description":"Epoch ms"},"runContinuously":{"type":"boolean"},"targeting":{"$ref":"#/components/schemas/AdTargetingDto"},"settings":{"$ref":"#/components/schemas/AdCampaignSettingsDto"}}},"AdCampaignActionResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"platformSyncScheduled":{"type":"boolean"}},"required":["success"]},"AdCreativeMediaItemDto":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string","enum":["image","video"]},"thumbnailUrl":{"type":"string"}},"required":["url","type"]},"CreateAdCreativeDto":{"type":"object","properties":{"campaignId":{"type":"string"},"type":{"type":"string","enum":["image","video","carousel","collection"]},"headline":{"type":"string"},"body":{"type":"string"},"callToAction":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/AdCreativeMediaItemDto"}},"aiGenerated":{"type":"boolean"},"generationPrompt":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]}},"required":["campaignId","type","headline","body","callToAction","media"]},"AdCreativeCampaignResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["meta","google","tiktok","linkedin"]}},"required":["id","name","platform"]},"AdCreativeResponseDto":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"type":{"type":"string","enum":["image","video","carousel","collection"]},"headline":{"type":"string"},"body":{"type":"string"},"callToAction":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/AdCreativeMediaItemDto"}},"aiGenerated":{"type":"boolean"},"generationPrompt":{"type":"string","nullable":true},"status":{"type":"string","enum":["draft","active","paused","archived"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"campaign":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AdCreativeCampaignResponseDto"}]}},"required":["id","campaignId","type","headline","body","callToAction","media","aiGenerated","generationPrompt","status","createdAt","updatedAt"]},"UpdateAdCreativeDto":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","carousel","collection"]},"headline":{"type":"string"},"body":{"type":"string"},"callToAction":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/AdCreativeMediaItemDto"}},"status":{"type":"string","enum":["draft","active","paused","archived"]}}},"GenerateAdCreativeCopyDto":{"type":"object","properties":{"teamId":{"type":"string"},"platform":{"type":"string","enum":["meta","google","tiktok","linkedin"]},"objective":{"type":"string"},"productName":{"type":"string"},"productDescription":{"type":"string"}},"required":["teamId","platform","objective","productName"]},"GenerateAdCreativeCopyResponseDto":{"type":"object","properties":{"headline":{"type":"string"},"body":{"type":"string"},"description":{"type":"string"},"callToAction":{"type":"string"},"generated":{"type":"boolean"}},"required":["headline","body","callToAction","generated"]},"AdAutoRulesDto":{"type":"object","properties":{"pauseOutOfStock":{"type":"boolean"},"resumeInStock":{"type":"boolean"},"pauseLowROAS":{"type":"boolean"},"pauseLowROASThreshold":{"type":"number"},"pauseLowROASDays":{"type":"number"},"increaseBudgetHighROAS":{"type":"boolean"},"increaseBudgetPercentage":{"type":"number"},"increaseBudgetThreshold":{"type":"number"},"notifyBudgetThreshold":{"type":"boolean"},"notifyBudgetPercentage":{"type":"number"}},"required":["pauseOutOfStock","resumeInStock","pauseLowROAS","pauseLowROASThreshold","pauseLowROASDays","increaseBudgetHighROAS","increaseBudgetPercentage","increaseBudgetThreshold","notifyBudgetThreshold","notifyBudgetPercentage"]},"AdAiSettingsDto":{"type":"object","properties":{"tone":{"type":"string"},"language":{"type":"string"},"includeEmojis":{"type":"boolean"},"includeUrgency":{"type":"boolean"},"autoABTest":{"type":"boolean"}},"required":["tone","language","includeEmojis","includeUrgency","autoABTest"]},"SaveAdSettingsDto":{"type":"object","properties":{"autoRules":{"$ref":"#/components/schemas/AdAutoRulesDto"},"aiSettings":{"$ref":"#/components/schemas/AdAiSettingsDto"}},"required":["autoRules","aiSettings"]},"AdSettingsResponseDto":{"type":"object","properties":{"teamId":{"type":"string"},"autoRules":{"$ref":"#/components/schemas/AdAutoRulesDto"},"aiSettings":{"$ref":"#/components/schemas/AdAiSettingsDto"},"isDefault":{"type":"boolean"}},"required":["teamId","autoRules","aiSettings","isDefault"]},"GeneralStatDto":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"change":{"type":"string"},"decimalPlaces":{"type":"number"},"prefix":{"type":"string"},"postfix":{"type":"string"}},"required":["name","value","decimalPlaces"]},"MediaStatsDto":{"type":"object","properties":{"count":{"type":"number"},"usedSpace":{"type":"number"},"totalSpace":{"type":"number"},"totalImagesSize":{"type":"number"},"totalVideosSize":{"type":"number"}},"required":["count","usedSpace","totalSpace","totalImagesSize","totalVideosSize"]},"EngagementTrendPointDto":{"type":"object","properties":{"date":{"type":"string"},"engagements":{"type":"number"}},"required":["date","engagements"]},"EngagementTrendByPlatformDto":{"type":"object","properties":{"platform":{"type":"string"},"date":{"type":"string"},"engagements":{"type":"number"}},"required":["platform","date","engagements"]},"InsightCoverageRowDto":{"type":"object","properties":{"platformKey":{"type":"string"},"platform":{"type":"string"},"status":{"type":"string"},"periodEngagements":{"type":"number"},"sharedBaselineValue":{"type":"number"},"providedMetrics":{"type":"string"},"sharedBaseline":{"type":"string"},"caveat":{"type":"string"}},"required":["platform","status","periodEngagements","sharedBaselineValue","providedMetrics","sharedBaseline","caveat"]},"InsightsDto":{"type":"object","properties":{"totalEngagements":{"type":"number"},"engagementPeriodChange":{"type":"number"},"totalReach":{"type":"number"},"reachPeriodChange":{"type":"number"},"totalInteractions":{"type":"number"},"interactionsPeriodChange":{"type":"number"},"totalViews":{"type":"number"},"viewsPeriodChange":{"type":"number"},"totalLikes":{"type":"number"},"totalComments":{"type":"number"},"totalShares":{"type":"number"},"totalSaves":{"type":"number"},"engagementTrendByPeriod":{"type":"array","items":{"$ref":"#/components/schemas/EngagementTrendPointDto"}},"engagementTrendByPlatform":{"type":"array","items":{"$ref":"#/components/schemas/EngagementTrendByPlatformDto"}},"insightCoverageRows":{"type":"array","items":{"$ref":"#/components/schemas/InsightCoverageRowDto"}},"totalEngagementsByPlatforms":{"type":"object"}},"required":["totalEngagements","engagementPeriodChange","totalReach","reachPeriodChange","totalInteractions","interactionsPeriodChange","totalViews","viewsPeriodChange","totalLikes","totalComments","totalShares","totalSaves"]},"OperationsTrendPointDto":{"type":"object","properties":{"date":{"type":"string"},"leads":{"type":"number"},"posts":{"type":"number"},"activityEvents":{"type":"number"}},"required":["date","leads","posts","activityEvents"]},"OperationsDto":{"type":"object","properties":{"trendByPeriod":{"type":"array","items":{"$ref":"#/components/schemas/OperationsTrendPointDto"}},"projects":{"type":"object"},"integrations":{"type":"object"}},"required":["trendByPeriod","projects","integrations"]},"TeamAnalyticsResponseDto":{"type":"object","properties":{"general":{"type":"array","items":{"$ref":"#/components/schemas/GeneralStatDto"}},"totalIntegrations":{"type":"number"},"media":{"$ref":"#/components/schemas/MediaStatsDto"},"insights":{"$ref":"#/components/schemas/InsightsDto"},"operations":{"$ref":"#/components/schemas/OperationsDto"},"publishing":{"$ref":"#/components/schemas/PublishingPipelineDto"},"leads":{"$ref":"#/components/schemas/LeadFunnelDto"},"activity":{"$ref":"#/components/schemas/DashboardActivitySummaryDto"},"platforms":{"$ref":"#/components/schemas/PlatformHealthDto"}},"required":["general","totalIntegrations","media","insights","operations","publishing","leads","activity","platforms"]},"AttributionSummaryDto":{"type":"object","properties":{"events":{"type":"number"},"leadsCaptured":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["events","leadsCaptured","conversions","revenue"]},"AttributionPlatformBucketDto":{"type":"object","properties":{"platform":{"type":"string"},"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["platform","events","conversions","revenue"]},"AttributionCampaignBucketDto":{"type":"object","properties":{"campaign":{"type":"string"},"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["campaign","events","conversions","revenue"]},"AttributionProjectBucketDto":{"type":"object","properties":{"projectId":{"type":"string"},"projectName":{"type":"string"},"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["events","conversions","revenue"]},"AttributionFeatureBucketDto":{"type":"object","properties":{"feature":{"type":"string"},"events":{"type":"number"},"conversions":{"type":"number"},"revenue":{"type":"number"}},"required":["feature","events","conversions","revenue"]},"TeamAttributionSummaryResponseDto":{"type":"object","properties":{"totals":{"$ref":"#/components/schemas/AttributionSummaryDto"},"platformBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/AttributionPlatformBucketDto"}},"campaignBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/AttributionCampaignBucketDto"}},"projectBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/AttributionProjectBucketDto"}},"featureBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/AttributionFeatureBucketDto"}}},"required":["totals","platformBreakdown","campaignBreakdown","projectBreakdown","featureBreakdown"]},"AccountDeletionStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending_email_confirmation","scheduled","cancelled","processing","completed","failed"]},"scheduledFor":{"type":"object","nullable":true}},"required":["status"]},"AccountDeletionTokenDto":{"type":"object","properties":{}},"DeleteMediaDto":{"type":"object","properties":{"fileName":{"type":"string","description":"Stored media filename"},"fileId":{"type":"string","description":"Stored media file id"}}},"UpdateAbuseIncidentStatusDto":{"type":"object","properties":{}},"ExecuteAbuseResponseActionDto":{"type":"object","properties":{}},"CreateAdminInvestigationDto":{"type":"object","properties":{}},"CreateAdminActionProposalDto":{"type":"object","properties":{}},"ReviewAdminActionProposalDto":{"type":"object","properties":{}},"SendLaunchAlertTestDto":{"type":"object","properties":{}},"StockMediaSrc":{"type":"object","properties":{"original":{"type":"string"},"large2x":{"type":"string"},"large":{"type":"string"},"medium":{"type":"string"},"small":{"type":"string"},"tiny":{"type":"string"},"portrait":{"type":"string"},"landscape":{"type":"string"}},"required":["original"]},"StockMediaUser":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}},"StockMediaVideoFile":{"type":"object","properties":{"id":{"type":"number"},"quality":{"type":"string"},"file_type":{"type":"string"},"link":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"fps":{"type":"number"}}},"StockMediaVideoPicture":{"type":"object","properties":{"id":{"type":"number"},"nr":{"type":"number"},"picture":{"type":"string"}}},"StockMediaItem":{"type":"object","properties":{"provider":{"type":"string","enum":["pexels","unsplash"]},"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"photographer":{"type":"string"},"photographerUrl":{"type":"string"},"photographer_url":{"type":"string"},"photographerId":{"type":"number"},"photographer_id":{"type":"number"},"sourceUrl":{"type":"string"},"previewUrl":{"type":"string"},"fullUrl":{"type":"string"},"url":{"type":"string"},"thumbnail":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"color":{"type":"string"},"avg_color":{"type":"string"},"blurHash":{"type":"string"},"attribution":{"type":"string"},"attributionUrl":{"type":"string"},"src":{"$ref":"#/components/schemas/StockMediaSrc"},"alt":{"type":"string"},"source":{"type":"string"},"duration":{"type":"number"},"user":{"$ref":"#/components/schemas/StockMediaUser"},"videoFiles":{"type":"array","items":{"$ref":"#/components/schemas/StockMediaVideoFile"}},"videoPictures":{"type":"array","items":{"$ref":"#/components/schemas/StockMediaVideoPicture"}},"video_files":{"type":"array","items":{"$ref":"#/components/schemas/StockMediaVideoFile"}},"video_pictures":{"type":"array","items":{"$ref":"#/components/schemas/StockMediaVideoPicture"}},"liked":{"type":"boolean"}},"required":["provider","id","previewUrl","fullUrl"]},"StockMediaSearchResponseDto":{"type":"object","properties":{"provider":{"type":"string","enum":["pexels","unsplash"]},"type":{"type":"string","enum":["photos","videos"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/StockMediaItem"}},"page":{"type":"number"},"perPage":{"type":"number"},"totalResults":{"type":"number"},"nextPage":{"type":"number"}},"required":["provider","type","items","page","perPage"]},"DownloadZipItemDto":{"type":"object","properties":{"url":{"type":"string","description":"Remote URL to include in the zip archive"},"filename":{"type":"string","description":"Filename to use inside the zip archive"}},"required":["url","filename"]},"DownloadZipDto":{"type":"object","properties":{"urls":{"type":"array","items":{"$ref":"#/components/schemas/DownloadZipItemDto"}},"zipName":{"type":"string","default":"downloaded-files.zip"}},"required":["urls"]},"VideoTrimDto":{"type":"object","properties":{"videoUrl":{"type":"string","description":"URL of the video to trim","example":"https://example.com/video.mp4"},"startTime":{"type":"number","description":"Start time for trimming in seconds","example":10.5,"minimum":0},"endTime":{"type":"number","description":"End time for trimming in seconds","example":60.5,"minimum":0},"duration":{"type":"number","description":"Duration of the trimmed video in seconds","example":50,"minimum":0.1,"maximum":3600},"teamId":{"type":"string","description":"Team ID","example":"team_123"},"projectId":{"type":"string","description":"Project ID","example":"project_456"},"ownerId":{"type":"string","description":"Owner ID","example":"owner_789"},"userId":{"type":"string","description":"User ID","example":"user_101"},"fileName":{"type":"string","description":"Output filename (without extension)","example":"trimmed_video"},"quality":{"type":"string","description":"Quality setting for the trimmed video","enum":["low","medium","high"],"default":"medium"}},"required":["videoUrl","startTime","endTime","duration","teamId","projectId","ownerId","userId","fileName"]},"ImageGenerationDTO":{"type":"object","properties":{}},"ImagePromptGenerationDTO":{"type":"object","properties":{"script":{"type":"string","description":"Script text to generate image prompts from","minLength":50}},"required":["script"]},"MediaMetadataDto":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video"]},"fileName":{"type":"string"},"mimeType":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"durationSeconds":{"type":"number"},"source":{"type":"string","enum":["upload","library","stock"]}},"required":["kind"]},"GeneratePostContentDto":{"type":"object","properties":{"teamId":{"type":"string"},"projectId":{"type":"string"},"prompt":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"contentType":{"type":"string"},"language":{"type":"string"},"tone":{"type":"string"},"includeHashtags":{"type":"boolean"},"variantCount":{"type":"number","enum":[1,2,3]},"idempotencyKey":{"type":"string"},"currentCaption":{"type":"string"},"postMode":{"type":"string","enum":["feed","story","short_video","long_video"]},"mediaMetadata":{"type":"array","items":{"$ref":"#/components/schemas/MediaMetadataDto"}},"useMediaContext":{"type":"boolean","description":"Explicit opt-in to use one attached image as supporting visual context."},"mediaIds":{"description":"At most one image media ID to analyse/reuse when useMediaContext is true.","type":"array","items":{"type":"string"}},"productId":{"type":"string"}},"required":["teamId","projectId","prompt","platforms","contentType","language","tone","includeHashtags","variantCount"]},"GeneratePostContentResponseDto":{"type":"object","properties":{"variants":{"type":"array","items":{"type":"string"}}},"required":["variants"]},"Object":{"type":"object","properties":{}}}}}