{"openapi":"3.0.0","paths":{"/auth/me":{"get":{"operationId":"AuthController_getProfile","summary":"Get current user profile","description":"Returns user profile. Creates user and organization on first call.","parameters":[],"responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Auth"],"security":[{"bearer":[]}]}},"/deployments":{"post":{"operationId":"DeploymentsController_deploy","summary":"Deploy application","description":"Deploys an application to AWS ECS using the provided configuration and image","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployRequestDto"}}}},"responses":{"201":{"description":"Deployment successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Deployments"]},"get":{"operationId":"DeploymentsController_listDeployments","summary":"List deployments","description":"Returns a paginated list of deployments for the specified organization","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (0-indexed)","schema":{"default":0,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"type":"string"}},{"name":"sortDir","required":false,"in":"query","description":"Sort direction (asc or desc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search query to filter results","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID to filter deployments","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project ID to filter deployments","schema":{"type":"string"}},{"name":"serviceId","required":false,"in":"query","description":"Service ID to filter deployments","schema":{"type":"string"}},{"name":"environment","required":false,"in":"query","description":"Environment name to filter deployments","schema":{"type":"string"}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived deployments","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Paginated list of deployments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Deployments"]}},"/deployments/active-teardowns":{"get":{"operationId":"DeploymentsController_getActiveTeardowns","summary":"List active teardowns","description":"Returns teardown deployments currently in progress","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project ID to filter","schema":{"type":"string"}}],"responses":{"200":{"description":"Active teardowns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveTeardownListDto"}}}}},"tags":["Deployments"]}},"/deployments/rollback":{"post":{"operationId":"DeploymentsController_rollback","summary":"Rollback deployment","description":"Rolls back a deployment to a previous template version","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequestDto"}}}},"responses":{"201":{"description":"Rollback successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EcsDeployResultDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Deployments"]}},"/deployments/{id}/cancel":{"post":{"operationId":"DeploymentsController_cancelDeployment","summary":"Cancel deployment","description":"Marks a running deployment as failed and enqueues a teardown to clean up created resources","parameters":[{"name":"id","required":true,"in":"path","description":"Deployment ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Deployment cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDeploymentResponseDto"}}}},"400":{"description":"Cannot cancel a teardown deployment"},"404":{"description":"Deployment not found"},"409":{"description":"Deployment already in terminal state"}},"tags":["Deployments"]}},"/deployments/{id}/progress":{"get":{"operationId":"DeploymentsController_getProgress","summary":"Get deployment progress","description":"Returns the current status and step progress for a deployment","parameters":[{"name":"id","required":true,"in":"path","description":"Deployment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Deployment progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentProgressResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Deployment not found"}},"tags":["Deployments"]}},"/logs":{"get":{"operationId":"LogsController_listLogs","summary":"Query CloudWatch logs","description":"Retrieves CloudWatch logs for a deployed service","parameters":[{"name":"serviceName","required":true,"in":"query","description":"Service name","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project ID to resolve AWS connection","schema":{"type":"string"}},{"name":"environmentName","required":false,"in":"query","description":"Environment name","schema":{"type":"string"}},{"name":"logGroupName","required":false,"in":"query","description":"CloudWatch log group name","schema":{"type":"string"}},{"name":"logStreamPrefix","required":false,"in":"query","description":"Log stream prefix","schema":{"type":"string"}},{"name":"startTime","required":false,"in":"query","description":"Start time in Unix milliseconds","schema":{"type":"number"}},{"name":"endTime","required":false,"in":"query","description":"End time in Unix milliseconds","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of events to return","schema":{"type":"number"}},{"name":"nextToken","required":false,"in":"query","description":"Pagination token","schema":{"type":"string"}},{"name":"region","required":false,"in":"query","description":"AWS region","schema":{"type":"string"}},{"name":"roleArn","required":false,"in":"query","description":"ARN of the IAM role to assume","schema":{"type":"string"}},{"name":"externalId","required":false,"in":"query","description":"External ID for assuming the role","schema":{"type":"string"}}],"responses":{"200":{"description":"Logs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogQueryResultDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Logs"]}},"/health":{"get":{"operationId":"HealthController_status","summary":"Check service health","description":"Returns the health status of the API and database connection","parameters":[],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}},"503":{"description":"Service is unhealthy"}},"tags":["Health"]}},"/discover":{"post":{"operationId":"DiscoveryController_discover","summary":"Discover AWS environment","description":"Discovers available AWS resources and configuration options for deployment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryRequestDto"}}}},"responses":{"200":{"description":"Discovery successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Discovery"]}},"/onboarding/infrastructure-defaults":{"get":{"operationId":"OnboardingController_getInfrastructureDefaults","summary":"Get default infrastructure settings for all resource types","parameters":[],"responses":{"200":{"description":"Infrastructure defaults","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfrastructureDefaultsResponseDto"}}}}},"tags":["Onboarding"]}},"/onboarding/aws-setup":{"post":{"operationId":"OnboardingController_awsSetup","summary":"Validate AWS role and discover environment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsSetupRequestDto"}}}},"responses":{"200":{"description":"AWS setup validated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsSetupResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/onboarding/smart-setup":{"post":{"operationId":"OnboardingController_smartSetup","summary":"Create onboarding defaults with smart setup","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartSetupRequestDto"}}}},"responses":{"200":{"description":"Smart setup prepared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartSetupResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/onboarding/progress":{"post":{"operationId":"OnboardingController_saveProgress","summary":"Save onboarding progress","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingProgressRequestDto"}}}},"responses":{"200":{"description":"Progress saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingProgressResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/onboarding/progress/{organizationId}":{"get":{"operationId":"OnboardingController_getProgress","summary":"Get onboarding progress","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Progress fetched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingProgressResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Not a member of the requested organization"},"404":{"description":"Progress not found"}},"tags":["Onboarding"]}},"/onboarding/github-installation":{"post":{"operationId":"OnboardingController_saveGitHubInstallation","summary":"Save GitHub installation for an organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveGitHubInstallationRequestDto"}}}},"responses":{"200":{"description":"GitHub installation saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallationResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Not a member of the requested organization"}},"tags":["Onboarding"]}},"/onboarding/github-installations":{"get":{"operationId":"OnboardingController_listGitHubInstallations","summary":"List GitHub installations for an organization","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"GitHub installations listed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallationsListResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Not a member of the requested organization"}},"tags":["Onboarding"]}},"/onboarding/github-installation/{organizationId}":{"get":{"operationId":"OnboardingController_getGitHubInstallation","summary":"Get GitHub installation for an organization","parameters":[{"name":"organizationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"GitHub installation fetched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallationResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Not a member of the requested organization"},"404":{"description":"GitHub installation not found"}},"tags":["Onboarding"]}},"/onboarding/analyze-repo":{"post":{"operationId":"OnboardingController_analyzeRepo","summary":"Analyze repository","description":"Analyzes an existing repository to detect framework, configuration, and missing files","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRepoRequestDto"}}}},"responses":{"200":{"description":"Repository analyzed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRepoResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/onboarding/generate-config":{"post":{"operationId":"OnboardingController_generateConfig","summary":"Generate configuration","description":"Generates strictops.yml, Dockerfile, and workflow files for a repository","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateConfigRequestDto"}}}},"responses":{"200":{"description":"Configuration generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateConfigResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/onboarding/verify-setup":{"post":{"operationId":"OnboardingController_verifySetup","summary":"Verify setup","description":"Verifies that a repository is properly configured for StrictOps deployment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySetupRequestDto"}}}},"responses":{"200":{"description":"Setup verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySetupResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["Onboarding"]}},"/github/owners":{"get":{"operationId":"GitHubController_listOwners","summary":"List GitHub owners for an installation","description":"Returns the GitHub account (org or user) associated with a given installation ID","parameters":[{"name":"installationId","required":true,"in":"query","description":"GitHub App installation ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Owners retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOwnersResponseDto"}}}},"400":{"description":"Invalid request"}},"tags":["GitHub"]}},"/github/repositories":{"get":{"operationId":"GitHubController_listRepositories","summary":"List repositories for an installation","description":"Returns repositories accessible to the given GitHub App installation","parameters":[{"name":"installationId","required":true,"in":"query","description":"GitHub App installation ID","schema":{"type":"number"}}],"responses":{"200":{"description":"Repositories retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubRepositoriesResponseDto"}}}},"400":{"description":"Invalid request"}},"tags":["GitHub"]}},"/github/installations":{"get":{"operationId":"GitHubController_listInstallations","summary":"List existing GitHub App installations","description":"Returns all accounts that have installed the GitHub App. Useful for reconnecting after a DB reset.","parameters":[],"responses":{"200":{"description":"Installations retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallationsResponseDto"}}}}},"tags":["GitHub"]}},"/github/install-url":{"get":{"operationId":"GitHubController_getInstallUrl","summary":"Get GitHub App installation URL","description":"Returns the URL to install the GitHub App","parameters":[{"name":"state","required":false,"in":"query","description":"Optional state parameter for OAuth flow","schema":{"type":"string"}},{"name":"redirectUri","required":false,"in":"query","description":"Redirect URI after installation","schema":{"type":"string"}}],"responses":{"200":{"description":"Installation URL retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallUrlResponseDto"}}}},"400":{"description":"Invalid request"}},"tags":["GitHub"]}},"/github/callback":{"get":{"operationId":"GitHubController_handleInstallCallback","summary":"Handle GitHub App installation callback","description":"Processes the callback after GitHub App installation","parameters":[{"name":"installation_id","required":false,"in":"query","description":"GitHub installation ID","schema":{"type":"string"}},{"name":"setup_action","required":false,"in":"query","description":"Setup action type","schema":{"type":"string"}},{"name":"state","required":false,"in":"query","description":"OAuth state parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Callback processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallCallbackResponseDto"}}}},"400":{"description":"Invalid request"}},"tags":["GitHub"]}},"/github/bootstrap":{"post":{"operationId":"GitHubController_bootstrapRepository","summary":"Bootstrap new repository","description":"Queues a job to create a new repository, set up GitHub Actions, and perform initial build and deployment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubBootstrapRequestDto"}}}},"responses":{"202":{"description":"Bootstrap job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncGitHubBootstrapResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["GitHub"]}},"/github/bootstrap-project":{"post":{"operationId":"GitHubController_bootstrapProject","summary":"Bootstrap project from template","description":"Creates multiple repositories and services from a project template, sets up GitHub Actions, and deploys all services","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBootstrapRequestDto"}}}},"responses":{"202":{"description":"Project bootstrap job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBootstrapResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["GitHub"]}},"/github/webhook":{"post":{"operationId":"GitHubController_handleWebhook","summary":"Handle GitHub webhook","description":"Processes GitHub webhook events (push, installation, etc.). Authenticated via x-hub-signature-256 HMAC-SHA256.","parameters":[{"name":"x-hub-signature-256","in":"header","description":"HMAC-SHA256 of the raw body, prefixed sha256=","required":true,"schema":{"type":"string"}},{"name":"x-github-event","in":"header","description":"GitHub event type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook processed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubWebhookResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing or invalid webhook signature"}},"tags":["GitHub"]}},"/api-tokens":{"post":{"operationId":"ApiTokenController_createToken","summary":"Create API token","description":"Creates a new API token. The plaintext token is only returned once.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiTokenRequestDto"}}}},"responses":{"201":{"description":"Token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiTokenResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"}},"tags":["API Tokens"]},"get":{"operationId":"ApiTokenController_listTokens","summary":"List API tokens","description":"Returns a list of API tokens for the organization. Token secrets are not returned.","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID to filter tokens","schema":{"type":"string"}}],"responses":{"200":{"description":"List of tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["API Tokens"]}},"/api-tokens/{id}":{"delete":{"operationId":"ApiTokenController_revokeToken","summary":"Revoke API token","description":"Revokes an API token. The token will no longer be valid for authentication.","parameters":[{"name":"id","required":true,"in":"path","description":"Token ID","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Token revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiTokenResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Token not found"}},"tags":["API Tokens"]}},"/services/preview-yaml":{"post":{"operationId":"ServiceController_previewYaml","summary":"Preview YAML","description":"Returns generated strictops.yml for the project without deploying","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewYamlRequestDto"}}}},"responses":{"200":{"description":"Generated YAML","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewYamlResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}},"tags":["Services"]}},"/services":{"post":{"operationId":"ServiceController_createService","summary":"Create service","description":"Creates a new service for the project. Optionally triggers deployment.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceRequestDto"}}}},"responses":{"201":{"description":"Service created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceWithDeployResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"409":{"description":"Service with this name already exists"}},"tags":["Services"]},"get":{"operationId":"ServiceController_listServices","summary":"List services","description":"Returns a list of services for the project","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID to filter services","schema":{"type":"string"}}],"responses":{"200":{"description":"List of services","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Services"]}},"/services/{id}":{"get":{"operationId":"ServiceController_getService","summary":"Get service","description":"Returns a service by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Service details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Service not found"}},"tags":["Services"]}},"/projects":{"post":{"operationId":"ProjectController_createProject","summary":"Create project","description":"Creates a new project for the organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequestDto"}}}},"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"409":{"description":"Project with this slug already exists"}},"tags":["Projects"]},"get":{"operationId":"ProjectController_listProjects","summary":"List projects","description":"Returns a list of projects for the organization","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID to filter projects","schema":{"type":"string"}}],"responses":{"200":{"description":"List of projects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Projects"]}},"/projects/{id}":{"get":{"operationId":"ProjectController_getProject","summary":"Get project","description":"Returns a project by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}},"tags":["Projects"]},"put":{"operationId":"ProjectController_updateProject","summary":"Update project","description":"Updates a project name and/or description","parameters":[{"name":"id","required":true,"in":"path","description":"Project ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequestDto"}}}},"responses":{"200":{"description":"Project updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}},"tags":["Projects"]},"delete":{"operationId":"ProjectController_deleteProject","summary":"Delete project","description":"Deletes a project and cascades to its resources","parameters":[{"name":"id","required":true,"in":"path","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Project deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"},"409":{"description":"Retained resources must be deleted first"}},"tags":["Projects"]}},"/v1/deployments":{"post":{"operationId":"V1DeploymentsController_createDeployment","summary":"Create deployment (Manual mode)","description":"Creates a new deployment using API token authentication. Use this endpoint from CI/CD pipelines or the StrictOps CLI. AWS credentials are resolved from the organization's stored connection.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateDeploymentRequestDto"}}}},"responses":{"201":{"description":"Deployment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateDeploymentResponseDto"}}}},"400":{"description":"Invalid request or missing AWS connection"},"401":{"description":"Unauthorized"}},"tags":["V1 Deployments"],"security":[{"bearer":[]}]}},"/v1/deployments/{id}":{"get":{"operationId":"V1DeploymentsController_getDeploymentStatus","summary":"Get deployment status","description":"Returns the current status of a deployment","parameters":[{"name":"id","required":true,"in":"path","description":"Deployment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Deployment status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DeploymentStatusResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Deployment not found"}},"tags":["V1 Deployments"],"security":[{"bearer":[]}]}},"/v1/whoami":{"get":{"operationId":"V1WhoamiController_whoami","summary":"Verify API token","description":"Returns organization info for the authenticated token. Used by the CLI to verify token validity.","parameters":[],"responses":{"200":{"description":"Token info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WhoamiResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["V1"],"security":[{"bearer":[]}]}},"/billing/plans":{"get":{"operationId":"BillingController_getPlans","summary":"List pricing plans","description":"Returns all available pricing plans.","parameters":[],"responses":{"200":{"description":"Pricing plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingPlansResponseDto"}}}}},"tags":["Billing"]}},"/billing/subscription":{"get":{"operationId":"BillingController_getSubscription","summary":"Get subscription","description":"Returns the current subscription for an organization.","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Current subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponseDto"}}}}},"tags":["Billing"]}},"/billing/checkout":{"post":{"operationId":"BillingController_createCheckoutSession","summary":"Create checkout session","description":"Creates a Stripe checkout session for subscribing to a plan.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequestDto"}}}},"responses":{"201":{"description":"Checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}}}},"400":{"description":"Invalid tier or missing Stripe price"}},"tags":["Billing"]}},"/billing/portal":{"post":{"operationId":"BillingController_createBillingPortalSession","summary":"Create billing portal session","description":"Creates a Stripe billing portal session for managing subscription.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingPortalRequestDto"}}}},"responses":{"201":{"description":"Portal session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResponseDto"}}}},"404":{"description":"No subscription found"}},"tags":["Billing"]}},"/billing/cancel":{"post":{"operationId":"BillingController_cancelSubscription","summary":"Cancel subscription","description":"Cancels the subscription at the end of the current billing period.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequestDto"}}}},"responses":{"200":{"description":"Subscription canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingActionResponseDto"}}}},"404":{"description":"No active subscription found"}},"tags":["Billing"]}},"/billing/resume":{"post":{"operationId":"BillingController_resumeSubscription","summary":"Resume subscription","description":"Resumes a subscription that was set to cancel at period end.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionRequestDto"}}}},"responses":{"200":{"description":"Subscription resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingActionResponseDto"}}}},"404":{"description":"No subscription found"}},"tags":["Billing"]}},"/billing/webhook":{"post":{"operationId":"BillingController_handleWebhook","summary":"Stripe webhook","description":"Receives Stripe webhook events.","parameters":[],"responses":{"200":{"description":"Webhook processed"}},"tags":["Billing"]}},"/services/{serviceId}/monitoring/metrics":{"get":{"operationId":"MonitoringController_queryMetrics","summary":"Query metric datapoints from CloudWatch","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}},{"name":"metrics","required":true,"in":"query","description":"Metric names to query","schema":{"type":"array","items":{"type":"string"}}},{"name":"from","required":true,"in":"query","description":"Start time (ISO 8601)","schema":{"type":"string"}},{"name":"to","required":true,"in":"query","description":"End time (ISO 8601)","schema":{"type":"string"}},{"name":"period","required":false,"in":"query","description":"Period in seconds (60, 300, or 3600)","schema":{"default":60,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsQueryResponseDto"}}}}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/health":{"get":{"operationId":"MonitoringController_getHealth","summary":"Get service health status","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatusResponseDto"}}}}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/config":{"get":{"operationId":"MonitoringController_getConfig","summary":"Get monitoring config","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringConfigResponseDto"}}}}},"tags":["Monitoring"]},"put":{"operationId":"MonitoringController_updateConfig","summary":"Update monitoring config","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMonitoringConfigDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringConfigResponseDto"}}}}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/alarms":{"get":{"operationId":"MonitoringController_listAlarms","summary":"List alarm configs","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/alarms/{metricName}":{"put":{"operationId":"MonitoringController_upsertAlarm","summary":"Create or update alarm threshold","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"metricName","required":true,"in":"path","description":"Metric name","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAlarmDto"}}}},"responses":{"200":{"description":""}},"tags":["Monitoring"]},"delete":{"operationId":"MonitoringController_deleteAlarm","summary":"Delete alarm","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"metricName","required":true,"in":"path","description":"Metric name","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/alarms/provision":{"post":{"operationId":"MonitoringController_provisionAlarms","summary":"Provision default alarms in customer AWS account","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionAlarmsDto"}}}},"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/alerts":{"get":{"operationId":"MonitoringController_listAlerts","summary":"List alert events","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/scaling":{"get":{"operationId":"MonitoringController_getScaling","summary":"Get scaling config and recent actions","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]},"put":{"operationId":"MonitoringController_updateScaling","summary":"Update scaling config","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScalingConfigDto"}}}},"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/scaling/execute":{"post":{"operationId":"MonitoringController_executeScale","summary":"Execute manual scale","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteScaleDto"}}}},"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/scaling/actions/{actionId}/approve":{"post":{"operationId":"MonitoringController_approveAction","summary":"Approve a pending scaling action","parameters":[{"name":"actionId","required":true,"in":"path","description":"Scaling action ID","schema":{"type":"string"}},{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{}}],"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/scaling/actions/{actionId}/reject":{"post":{"operationId":"MonitoringController_rejectAction","summary":"Reject a pending scaling action","parameters":[{"name":"actionId","required":true,"in":"path","description":"Scaling action ID","schema":{"type":"string"}},{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{}}],"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/scaling/history":{"get":{"operationId":"MonitoringController_getScalingHistory","summary":"Get scaling action history","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","description":"Environment name","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/deploy-markers":{"get":{"operationId":"MonitoringController_getDeployMarkers","summary":"Get deploy markers for chart overlay","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","schema":{"type":"string"}},{"name":"from","required":true,"in":"query","schema":{"type":"string"}},{"name":"to","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/certificates":{"get":{"operationId":"MonitoringController_getCertificates","summary":"Get certificate expiry status","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/services/{serviceId}/monitoring/quotas":{"get":{"operationId":"MonitoringController_getQuotas","summary":"Get service quota warnings","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/organizations/{orgId}/monitoring/channels":{"get":{"operationId":"AlertChannelController_listChannels","summary":"List alert channels for org","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]},"post":{"operationId":"AlertChannelController_createChannel","summary":"Create alert channel","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAlertChannelDto"}}}},"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/organizations/{orgId}/monitoring/channels/{channelId}":{"put":{"operationId":"AlertChannelController_updateChannel","summary":"Update alert channel","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"channelId","required":true,"in":"path","description":"Alert channel ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAlertChannelDto"}}}},"responses":{"200":{"description":""}},"tags":["Monitoring"]},"delete":{"operationId":"AlertChannelController_deleteChannel","summary":"Delete alert channel","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"channelId","required":true,"in":"path","description":"Alert channel ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Monitoring"]}},"/organizations/{orgId}/monitoring/channels/{channelId}/test":{"post":{"operationId":"AlertChannelController_testChannel","summary":"Send test notification","parameters":[{"name":"orgId","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}},{"name":"channelId","required":true,"in":"path","description":"Alert channel ID","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Monitoring"]}},"/dashboard/summary":{"get":{"operationId":"DashboardController_getSummary","summary":"Get dashboard summary","description":"Returns aggregated dashboard data for the specified organization","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"projectId","required":false,"in":"query","description":"Project ID for project-scoped summary","schema":{"type":"string"}}],"responses":{"200":{"description":"Dashboard summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummaryDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Dashboard"]}},"/teardown/projects/{projectName}/services/{serviceName}/environments/{environment}":{"delete":{"operationId":"TeardownController_deleteServiceFromEnvironment","summary":"Tear down a service from an environment","parameters":[{"name":"projectName","required":true,"in":"path","description":"Project name","schema":{"type":"string"}},{"name":"serviceName","required":true,"in":"path","description":"Service name","schema":{"type":"string"}},{"name":"environment","required":true,"in":"path","description":"Environment name","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"dryRun","required":false,"in":"query","description":"Preview what would be deleted","schema":{"default":false,"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownRequestDto"}}}},"responses":{"200":{"description":"Teardown result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownResultDto"}}}},"400":{"description":"Invalid request or missing confirmation"},"409":{"description":"Active deployments in progress"}},"tags":["Teardown"]}},"/teardown/projects/{projectName}/environments/{environment}":{"delete":{"operationId":"TeardownController_deleteEnvironment","summary":"Tear down an entire environment","parameters":[{"name":"projectName","required":true,"in":"path","description":"Project name","schema":{"type":"string"}},{"name":"environment","required":true,"in":"path","description":"Environment name","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"dryRun","required":false,"in":"query","description":"Preview what would be deleted","schema":{"default":false,"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownRequestDto"}}}},"responses":{"200":{"description":"Teardown result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownResultDto"}}}},"400":{"description":"Invalid request or missing confirmation"},"409":{"description":"Active deployments in progress"}},"tags":["Teardown"]}},"/teardown/projects/{projectName}":{"delete":{"operationId":"TeardownController_deleteProject","summary":"Tear down an entire project","parameters":[{"name":"projectName","required":true,"in":"path","description":"Project name","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"dryRun","required":false,"in":"query","description":"Preview what would be deleted","schema":{"default":false,"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownRequestDto"}}}},"responses":{"200":{"description":"Teardown result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeardownResultDto"}}}},"400":{"description":"Invalid request or missing confirmation"},"409":{"description":"Active deployments in progress"}},"tags":["Teardown"]}},"/environments":{"get":{"operationId":"EnvironmentController_listEnvironments","summary":"List environments","description":"Returns environments for a project","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of environments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Environments"]}},"/environments/{id}":{"get":{"operationId":"EnvironmentController_getEnvironment","summary":"Get environment","description":"Returns a single environment by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Environment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Environment details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Environment not found"}},"tags":["Environments"]},"delete":{"operationId":"EnvironmentController_removeEnvironment","summary":"Remove environment","description":"Removes a single NOT_FOUND environment from the database","parameters":[{"name":"id","required":true,"in":"path","description":"Environment ID","schema":{"type":"string"}}],"responses":{"204":{"description":"Environment removed"},"400":{"description":"Environment is not NOT_FOUND"},"401":{"description":"Unauthorized"},"404":{"description":"Environment not found"}},"tags":["Environments"]}},"/environments/{id}/check":{"post":{"operationId":"EnvironmentController_checkEnvironmentStatus","summary":"Check environment status","description":"Checks the current CloudFormation stack status for an environment","parameters":[{"name":"id","required":true,"in":"path","description":"Environment ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Status check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCheckResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Environment not found"}},"tags":["Environments"]}},"/environments/check-all":{"post":{"operationId":"EnvironmentController_checkAllEnvironments","summary":"Check all environments","description":"Checks CloudFormation stack status for all environments in a project","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Bulk check results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEnvironmentCheckResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Environments"]}},"/environments/cleanup":{"post":{"operationId":"EnvironmentController_cleanupNotFound","summary":"Bulk remove NOT_FOUND environments","description":"Deletes all NOT_FOUND environments for a project from the database","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Cleanup result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCleanupResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Environments"]}},"/organizations/{id}":{"get":{"operationId":"OrganizationController_getOrganization","summary":"Get organization","description":"Returns an organization by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Organization details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Organization not found"}},"tags":["Organizations"]},"put":{"operationId":"OrganizationController_updateOrganization","summary":"Update organization","description":"Updates an organization name or AI feature opt-in","parameters":[{"name":"id","required":true,"in":"path","description":"Organization ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationRequestDto"}}}},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Organization not found"}},"tags":["Organizations"]}},"/templates":{"get":{"operationId":"TemplatesController_listTemplates","summary":"List project templates","description":"Returns available project templates for bootstrapping","parameters":[],"responses":{"200":{"description":"List of templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponseDto"}}}}},"tags":["Templates"]}},"/templates/services":{"get":{"operationId":"TemplatesController_listServiceTemplates","summary":"List service templates","description":"Returns available service templates, optionally filtered by type","parameters":[{"name":"type","required":false,"in":"query","description":"Filter by service type","schema":{"enum":["WEB","API","WORKER"],"type":"string"}}],"responses":{"200":{"description":"List of service templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTemplateListResponseDto"}}}}},"tags":["Templates"]}},"/aws-connections":{"post":{"operationId":"AwsConnectionController_create","summary":"Create AWS connection","description":"Creates a new AWS connection for the organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAwsConnectionRequestDto"}}}},"responses":{"201":{"description":"AWS connection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsConnectionDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"409":{"description":"Connection with this name already exists"}},"tags":["AWS Connections"]},"get":{"operationId":"AwsConnectionController_list","summary":"List AWS connections","description":"Returns AWS connections for the organization","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of AWS connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsConnectionListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["AWS Connections"]}},"/aws-connections/{id}":{"get":{"operationId":"AwsConnectionController_getById","summary":"Get AWS connection","description":"Returns an AWS connection by ID","parameters":[{"name":"id","required":true,"in":"path","description":"AWS connection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"AWS connection details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsConnectionDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"AWS connection not found"}},"tags":["AWS Connections"]},"put":{"operationId":"AwsConnectionController_update","summary":"Update AWS connection","description":"Updates an AWS connection","parameters":[{"name":"id","required":true,"in":"path","description":"AWS connection ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAwsConnectionRequestDto"}}}},"responses":{"200":{"description":"AWS connection updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwsConnectionDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"AWS connection not found"},"409":{"description":"Connection with this name already exists"}},"tags":["AWS Connections"]},"delete":{"operationId":"AwsConnectionController_delete","summary":"Delete AWS connection","description":"Deletes an AWS connection (fails if projects still reference it)","parameters":[{"name":"id","required":true,"in":"path","description":"AWS connection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"AWS connection deleted"},"400":{"description":"Cannot delete — projects still reference this connection"},"401":{"description":"Unauthorized"},"404":{"description":"AWS connection not found"}},"tags":["AWS Connections"]}},"/v1/services/{serviceId}/env/{environment}":{"get":{"operationId":"EnvVarsController_listEnvVars","summary":"List environment variables for a service","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"path","description":"Environment name (e.g. dev, prod)","schema":{"type":"string"}},{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Environment variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvVarListResponseDto"}}}},"400":{"description":"Missing project context"},"404":{"description":"Service or project not found"}},"tags":["Environment Variables"],"security":[{"bearer":[]}]},"put":{"operationId":"EnvVarsController_setEnvVars","summary":"Set environment variables for a service (batch upsert)","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"path","description":"Environment name (e.g. dev, prod)","schema":{"type":"string"}},{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetEnvVarsRequestDto"}}}},"responses":{"200":{"description":"Variables set"},"400":{"description":"Invalid request"},"404":{"description":"Service or project not found"}},"tags":["Environment Variables"],"security":[{"bearer":[]}]}},"/v1/services/{serviceId}/env/{environment}/{name}":{"delete":{"operationId":"EnvVarsController_deleteEnvVar","summary":"Delete an environment variable","parameters":[{"name":"serviceId","required":true,"in":"path","description":"Service ID","schema":{"type":"string"}},{"name":"environment","required":true,"in":"path","description":"Environment name (e.g. dev, prod)","schema":{"type":"string"}},{"name":"name","required":true,"in":"path","description":"Variable name","schema":{"type":"string"}},{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Variable deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEnvVarResponseDto"}}}},"400":{"description":"Missing project context"},"404":{"description":"Service or project not found"}},"tags":["Environment Variables"],"security":[{"bearer":[]}]}},"/resources/overview":{"get":{"operationId":"ResourceController_getOverview","summary":"Get resource overview","description":"Returns aggregated resource counts by type for a project","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Resource overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceOverviewResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Resources"]}},"/resources":{"get":{"operationId":"ResourceController_listResources","summary":"List resources","description":"Returns resources for a project, optionally filtered by type","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Filter by resource type","schema":{"enum":["DATABASE","IMAGE_STORE","STORAGE","QUEUE","CACHE"],"type":"string"}}],"responses":{"200":{"description":"List of resources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceListResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Resources"]}},"/resources/{id}":{"get":{"operationId":"ResourceController_getResource","summary":"Get resource","description":"Returns a single resource by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Resource details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Resource not found"}},"tags":["Resources"]}},"/resources/{id}/health-check":{"post":{"operationId":"ResourceController_checkHealth","summary":"Check resource health","description":"Runs a live health check against AWS for this resource","parameters":[{"name":"id","required":true,"in":"path","description":"Resource ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Health check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceHealthCheckResponseDto"}}}},"400":{"description":"Bad request (no AWS connection)"},"401":{"description":"Unauthorized"},"404":{"description":"Resource not found"}},"tags":["Resources"]}},"/resources/{id}/images":{"get":{"operationId":"ResourceController_getImages","summary":"List ECR images","description":"Returns container images for an IMAGE_STORE resource","parameters":[{"name":"id","required":true,"in":"path","description":"Resource ID","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number (0-indexed)","schema":{"type":"string"}},{"name":"pageSize","required":false,"in":"query","description":"Items per page","schema":{"type":"string"}},{"name":"tag","required":false,"in":"query","description":"Filter by tag prefix","schema":{"type":"string"}}],"responses":{"200":{"description":"List of ECR images","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EcrImageListResponseDto"}}}},"400":{"description":"Resource is not an image store or missing AWS connection"},"401":{"description":"Unauthorized"},"404":{"description":"Resource not found"}},"tags":["Resources"]}},"/resources/sync":{"post":{"operationId":"ResourceController_syncResources","summary":"Sync resources from AWS","description":"Discovers resources from CloudFormation stacks and upserts them","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Sync result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceSyncResponseDto"}}}},"400":{"description":"Bad request (no AWS connection)"},"401":{"description":"Unauthorized"}},"tags":["Resources"]}},"/resources/{id}/force-delete":{"delete":{"operationId":"ResourceController_forceDeleteDatabase","summary":"Force delete a retained database","description":"Disables deletion protection and deletes the RDS instance from the customer AWS account","parameters":[{"name":"id","required":true,"in":"path","description":"Resource ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceDeleteDatabaseRequestDto"}}}},"responses":{"200":{"description":"Database deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceDeleteDatabaseResponseDto"}}}},"400":{"description":"Bad request (not a retained database, invalid confirmation, or no AWS connection)"},"401":{"description":"Unauthorized"},"404":{"description":"Resource not found"}},"tags":["Resources"]}},"/service-dependencies":{"post":{"operationId":"ServiceDependencyController_createDependency","summary":"Create dependency","description":"Creates a dependency link between a service and a target service or resource","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceDependencyRequestDto"}}}},"responses":{"201":{"description":"Dependency created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDependencyResponseDto"}}}},"400":{"description":"Invalid request"},"404":{"description":"Target not found"}},"tags":["Service Dependencies"]},"get":{"operationId":"ServiceDependencyController_listByService","summary":"List dependencies by service","description":"Returns all dependencies for a given service","parameters":[{"name":"serviceId","required":true,"in":"query","description":"Service ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of dependencies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDependencyListResponseDto"}}}}},"tags":["Service Dependencies"]}},"/service-dependencies/by-project":{"get":{"operationId":"ServiceDependencyController_listByProject","summary":"List dependencies by project","description":"Returns all dependencies for all services in a project","parameters":[{"name":"projectId","required":true,"in":"query","description":"Project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of dependencies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDependencyListResponseDto"}}}}},"tags":["Service Dependencies"]}},"/service-dependencies/{id}":{"delete":{"operationId":"ServiceDependencyController_deleteDependency","summary":"Delete dependency","description":"Removes a dependency link","parameters":[{"name":"id","required":true,"in":"path","description":"Dependency ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Dependency deleted"},"404":{"description":"Dependency not found"}},"tags":["Service Dependencies"]}},"/notifications":{"get":{"operationId":"NotificationController_listNotifications","summary":"List notifications for the current user","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (0-indexed)","schema":{"default":0,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Number of items per page","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"type":"string"}},{"name":"sortDir","required":false,"in":"query","description":"Sort direction","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Search query to filter results","schema":{"type":"string"}},{"name":"unreadOnly","required":false,"in":"query","description":"Only return unread notifications","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponseDto"}}}}},"tags":["Notifications"],"security":[{"bearer":[]}]}},"/notifications/unread-count":{"get":{"operationId":"NotificationController_getUnreadCount","summary":"Get unread notification count","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponseDto"}}}}},"tags":["Notifications"],"security":[{"bearer":[]}]}},"/notifications/{id}/read":{"post":{"operationId":"NotificationController_markRead","summary":"Mark a notification as read","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Notifications"],"security":[{"bearer":[]}]}},"/notifications/read-all":{"post":{"operationId":"NotificationController_markAllRead","summary":"Mark all notifications as read","parameters":[],"responses":{"200":{"description":""}},"tags":["Notifications"],"security":[{"bearer":[]}]}},"/ai-assistant/chat":{"post":{"operationId":"AiAssistantController_sendMessage","summary":"Send a chat message","description":"Sends a message to the AI assistant and receives a response. Creates a new conversation if conversationId is not provided.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageRequestDto"}}}},"responses":{"201":{"description":"Message sent and response received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendChatMessageResponseDto"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"404":{"description":"Conversation not found"}},"tags":["AI Assistant"]}},"/ai-assistant/conversations":{"get":{"operationId":"AiAssistantController_listConversations","summary":"List conversations","description":"Returns a list of conversations for the user within the organization.","parameters":[{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}},{"name":"userId","required":true,"in":"query","description":"User ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["AI Assistant"]}},"/ai-assistant/conversations/{id}":{"get":{"operationId":"AiAssistantController_getConversation","summary":"Get conversation detail","description":"Returns the full conversation including all messages.","parameters":[{"name":"id","required":true,"in":"path","description":"Conversation ID","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Conversation detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Conversation not found"}},"tags":["AI Assistant"]},"delete":{"operationId":"AiAssistantController_deleteConversation","summary":"Delete conversation","description":"Deletes a conversation and all its messages.","parameters":[{"name":"id","required":true,"in":"path","description":"Conversation ID","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Organization ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Conversation deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConversationResponseDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Conversation not found"}},"tags":["AI Assistant"]}}},"info":{"title":"StrictOps Control Plane API","description":"API for managing deployments, logs, and GitHub integration for StrictOps","version":"1.0","contact":{}},"tags":[{"name":"Health","description":"Health check endpoints"},{"name":"Deployments","description":"Deployment management endpoints"},{"name":"Logs","description":"CloudWatch logs endpoints"},{"name":"Discovery","description":"AWS resource discovery endpoints"},{"name":"GitHub","description":"GitHub integration endpoints"},{"name":"Billing","description":"Pricing and subscription management"}],"servers":[],"components":{"securitySchemes":{"JWT":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Enter your JWT token"}},"schemas":{"ProjectSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"Project ID"},"name":{"type":"string","description":"Project name"},"slug":{"type":"string","description":"Project slug"}},"required":["id","name","slug"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"email":{"type":"string","description":"User email"},"name":{"type":"string","description":"User display name"},"organizationId":{"type":"string","description":"Organization ID"},"organizationName":{"type":"string","description":"Organization name"},"role":{"type":"string","description":"User role in organization"},"projects":{"description":"Projects in the organization","type":"array","items":{"$ref":"#/components/schemas/ProjectSummaryDto"}}},"required":["id","email","organizationId","organizationName","role","projects"]},"DeployRequestDto":{"type":"object","properties":{"strictopsYaml":{"type":"string","description":"Contents of strictops.yml file"},"imageUri":{"type":"string","description":"URI of the Docker image to deploy"},"region":{"type":"string","description":"AWS region"},"accountId":{"type":"string","description":"AWS account ID"},"vpcId":{"type":"string","description":"VPC ID"},"publicSubnetIds":{"description":"List of public subnet IDs","type":"array","items":{"type":"string"}},"environmentName":{"type":"string","description":"Target environment name"},"environments":{"description":"List of environments to deploy","type":"array","items":{"type":"string"}},"clusterName":{"type":"string","description":"ECS cluster name"},"logGroupName":{"type":"string","description":"CloudWatch log group name"},"stackName":{"type":"string","description":"CloudFormation stack name"},"templateVersion":{"type":"string","description":"Template version"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume for deployment"},"externalId":{"type":"string","description":"External ID for assuming the role"}},"required":["strictopsYaml","imageUri","roleArn","externalId"]},"DeployResponseDto":{"type":"object","properties":{"templateVersion":{"type":"string","description":"Template version used for deployment"},"environments":{"type":"object","description":"Deployment results per environment","additionalProperties":{"type":"object"}}},"required":["templateVersion","environments"]},"DeploymentListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Deployment ID"},"serviceId":{"type":"string","description":"Service ID"},"serviceName":{"type":"string","description":"Service name","nullable":true},"serviceType":{"type":"string","description":"Service type","nullable":true,"enum":["WEB","API","WORKER"]},"repoFullName":{"type":"string","description":"Full repository name","nullable":true},"commitSha":{"type":"string","description":"Git commit SHA","nullable":true},"environment":{"type":"string","description":"Target environment"},"deploymentType":{"type":"string","description":"Deployment type","nullable":true,"enum":["PROJECT_BOOTSTRAP","SERVICE_BOOTSTRAP","SERVICE_DEPLOY","MANUAL_DEPLOY","TEARDOWN_SERVICE","TEARDOWN_ENVIRONMENT","TEARDOWN_PROJECT"]},"environments":{"description":"Target environments","type":"array","items":{"type":"string"}},"serviceNames":{"description":"Service names involved","type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"errorMessage":{"type":"string","description":"Error message if deployment failed","nullable":true},"serviceUrl":{"type":"string","description":"Deployed service URL","nullable":true},"stackId":{"type":"string","description":"CloudFormation stack ID","nullable":true},"region":{"type":"string","description":"AWS region","nullable":true},"createdAt":{"type":"string","description":"When deployment was created"},"completedAt":{"type":"string","description":"When deployment completed","nullable":true},"archivedAt":{"type":"string","description":"When deployment was archived","nullable":true}},"required":["id","serviceId","environment","environments","serviceNames","status","createdAt"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"number","description":"Current page number (0-indexed)"},"pageSize":{"type":"number","description":"Number of items per page"},"totalCount":{"type":"number","description":"Total number of items across all pages"},"totalPages":{"type":"number","description":"Total number of pages"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPreviousPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["page","pageSize","totalCount","totalPages","hasNextPage","hasPreviousPage"]},"DeploymentListResponseDto":{"type":"object","properties":{"deployments":{"description":"List of deployments","type":"array","items":{"$ref":"#/components/schemas/DeploymentListItemDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMeta"}]}},"required":["deployments","pagination"]},"ActiveTeardownDto":{"type":"object","properties":{"id":{"type":"string","description":"Deployment ID"},"deploymentType":{"type":"string","description":"Deployment type","enum":["TEARDOWN_SERVICE","TEARDOWN_ENVIRONMENT","TEARDOWN_PROJECT"]},"status":{"type":"string","description":"Deployment status","enum":["QUEUED","RUNNING"]},"requestPayload":{"type":"object","description":"Request payload with teardown parameters"},"createdAt":{"type":"string","description":"When the teardown was created"}},"required":["id","deploymentType","status","requestPayload","createdAt"]},"ActiveTeardownListDto":{"type":"object","properties":{"teardowns":{"description":"Active teardown deployments","type":"array","items":{"$ref":"#/components/schemas/ActiveTeardownDto"}}},"required":["teardowns"]},"RollbackRequestDto":{"type":"object","properties":{"strictopsYaml":{"type":"string","description":"Contents of strictops.yml file"},"imageUri":{"type":"string","description":"URI of the Docker image to rollback to"},"region":{"type":"string","description":"AWS region"},"accountId":{"type":"string","description":"AWS account ID"},"vpcId":{"type":"string","description":"VPC ID"},"publicSubnetIds":{"description":"List of public subnet IDs","type":"array","items":{"type":"string"}},"targetTemplateVersion":{"type":"string","description":"Template version to rollback to"},"environmentName":{"type":"string","description":"Target environment name"},"clusterName":{"type":"string","description":"ECS cluster name"},"logGroupName":{"type":"string","description":"CloudWatch log group name"},"stackName":{"type":"string","description":"CloudFormation stack name"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume for rollback"},"externalId":{"type":"string","description":"External ID for assuming the role"}},"required":["strictopsYaml","imageUri","targetTemplateVersion","roleArn","externalId"]},"EcsDeployResultDto":{"type":"object","properties":{"serviceName":{"type":"string","description":"Service name"},"clusterArn":{"type":"string","description":"ARN of the ECS cluster"},"serviceArn":{"type":"string","description":"ARN of the ECS service"},"taskDefinitionArn":{"type":"string","description":"ARN of the task definition"},"executionRoleArn":{"type":"string","description":"ARN of the execution role"},"taskRoleArn":{"type":"string","description":"ARN of the task role"},"serviceUrl":{"type":"object","description":"URL where the service is accessible","nullable":true},"logGroupName":{"type":"string","description":"CloudWatch log group name"},"loadBalancerDnsName":{"type":"object","description":"DNS name of the load balancer","nullable":true},"repositoryUri":{"type":"string","description":"URI of the ECR repository"},"repositoryName":{"type":"string","description":"Name of the ECR repository"},"templateVersion":{"type":"string","description":"Template version used for deployment"}},"required":["serviceName","clusterArn","serviceArn","taskDefinitionArn","executionRoleArn","taskRoleArn","serviceUrl","logGroupName","loadBalancerDnsName","repositoryUri","repositoryName","templateVersion"]},"CancelDeploymentResponseDto":{"type":"object","properties":{"cancelled":{"type":"boolean"},"teardownDeploymentId":{"type":"string"}},"required":["cancelled"]},"DeploymentStepDto":{"type":"object","properties":{"name":{"type":"string","description":"Step name identifier"},"label":{"type":"string","description":"Human-readable step label"},"stepOrder":{"type":"number","description":"Step order in sequence"},"status":{"type":"string","description":"Step status","enum":["PENDING","RUNNING","COMPLETED","FAILED"]},"errorMessage":{"type":"string","description":"Error message if step failed","nullable":true},"metadata":{"type":"object","description":"Step metadata","nullable":true},"startedAt":{"type":"string","description":"When the step started","nullable":true},"completedAt":{"type":"string","description":"When the step completed","nullable":true}},"required":["name","label","stepOrder","status"]},"DeploymentProgressResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Deployment ID"},"serviceId":{"type":"string","description":"Service ID"},"repoFullName":{"type":"string","description":"Full repository name","nullable":true},"commitSha":{"type":"string","description":"Git commit SHA","nullable":true},"environment":{"type":"string","description":"Target environment"},"deploymentType":{"type":"string","description":"Deployment type","nullable":true,"enum":["PROJECT_BOOTSTRAP","SERVICE_BOOTSTRAP","SERVICE_DEPLOY","MANUAL_DEPLOY","TEARDOWN_SERVICE","TEARDOWN_ENVIRONMENT","TEARDOWN_PROJECT"]},"status":{"type":"string","description":"Deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"errorMessage":{"type":"string","description":"Error message if deployment failed","nullable":true},"errorStep":{"type":"string","description":"Step where error occurred","nullable":true},"actionsRunUrl":{"type":"string","description":"GitHub Actions run URL","nullable":true},"serviceUrl":{"type":"string","description":"Deployed service URL","nullable":true},"serviceUrls":{"type":"object","description":"Service URLs per environment","additionalProperties":{"type":"string"},"nullable":true,"example":{"dev":"http://dev-alb-123.us-east-1.elb.amazonaws.com","prod":"http://prod-alb-456.us-east-1.elb.amazonaws.com"}},"stackId":{"type":"string","description":"CloudFormation stack ID","nullable":true},"region":{"type":"string","description":"AWS region","nullable":true},"requestPayload":{"type":"object","description":"Original request payload"},"resultPayload":{"type":"object","description":"Deployment result payload","nullable":true},"startedAt":{"type":"string","description":"When deployment started","nullable":true},"completedAt":{"type":"string","description":"When deployment completed","nullable":true},"createdAt":{"type":"string","description":"When deployment was created"},"steps":{"description":"Deployment steps","type":"array","items":{"$ref":"#/components/schemas/DeploymentStepDto"}}},"required":["id","serviceId","environment","status","requestPayload","createdAt","steps"]},"CloudWatchLogEventDto":{"type":"object","properties":{"message":{"type":"string","description":"Log message"},"timestamp":{"type":"number","description":"Timestamp in Unix milliseconds"},"ingestionTime":{"type":"number","description":"Ingestion time in Unix milliseconds"},"logStreamName":{"type":"string","description":"Name of the log stream"},"eventId":{"type":"string","description":"Event ID"}},"required":["message","timestamp"]},"LogQueryResultDto":{"type":"object","properties":{"logGroupName":{"type":"string","description":"CloudWatch log group name"},"logStreamPrefix":{"type":"string","description":"Log stream prefix"},"events":{"description":"Log events","type":"array","items":{"$ref":"#/components/schemas/CloudWatchLogEventDto"}},"nextToken":{"type":"string","description":"Pagination token for next page"}},"required":["logGroupName","logStreamPrefix","events"]},"HealthResponseDto":{"type":"object","properties":{"ok":{"type":"boolean","description":"Overall health status"},"database":{"type":"string","description":"Database connection status","enum":["ok","error","disabled"]}},"required":["ok","database"]},"DiscoveryRequestDto":{"type":"object","properties":{"region":{"type":"string","description":"AWS region"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"}},"required":["roleArn","externalId"]},"DiscoveryDefaultsDto":{"type":"object","properties":{"region":{"type":"string","description":"Default AWS region"},"accountId":{"type":"string","description":"AWS account ID"},"vpcId":{"type":"string","description":"Default VPC ID"},"publicSubnetIds":{"description":"List of public subnet IDs","type":"array","items":{"type":"string"}},"strictopsTemplate":{"type":"string","description":"Default strictops.yml template"}},"required":["region","accountId","vpcId","publicSubnetIds","strictopsTemplate"]},"AwsVpcSubnetOptionDto":{"type":"object","properties":{"subnetId":{"type":"string","description":"Subnet ID"},"availabilityZone":{"type":"string","description":"Availability zone"},"cidrBlock":{"type":"string","description":"CIDR block"},"isDefault":{"type":"boolean","description":"Whether this is the default subnet"}},"required":["subnetId","isDefault"]},"AwsVpcOptionDto":{"type":"object","properties":{"vpcId":{"type":"string","description":"VPC ID"},"name":{"type":"string","description":"VPC name"},"cidrBlock":{"type":"string","description":"CIDR block"},"isDefault":{"type":"boolean","description":"Whether this is the default VPC"},"subnets":{"description":"Subnets in this VPC","type":"array","items":{"$ref":"#/components/schemas/AwsVpcSubnetOptionDto"}}},"required":["vpcId","isDefault","subnets"]},"SizingProfileDto":{"type":"object","properties":{"name":{"type":"string","description":"Profile name (small, medium, large)","example":"small"},"cpu":{"type":"string","description":"CPU allocation","example":"256"},"memory":{"type":"string","description":"Memory allocation","example":"512"}},"required":["name","cpu","memory"]},"DiscoveryOptionsDto":{"type":"object","properties":{"regions":{"description":"Available AWS regions","type":"array","items":{"type":"string"}},"vpcs":{"description":"Available VPCs","type":"array","items":{"$ref":"#/components/schemas/AwsVpcOptionDto"}},"sizingProfiles":{"description":"Available sizing profiles","type":"array","items":{"$ref":"#/components/schemas/SizingProfileDto"}}},"required":["regions","vpcs","sizingProfiles"]},"DiscoveryResponseDto":{"type":"object","properties":{"defaults":{"description":"Default configuration values","allOf":[{"$ref":"#/components/schemas/DiscoveryDefaultsDto"}]},"options":{"description":"Available configuration options","allOf":[{"$ref":"#/components/schemas/DiscoveryOptionsDto"}]}},"required":["defaults","options"]},"ProfileSizingDto":{"type":"object","properties":{"name":{"type":"string","description":"Profile name","example":"small"},"cpu":{"type":"string","description":"CPU units (e.g. 512)","example":"512"},"memory":{"type":"string","description":"Memory in MB (e.g. 1024)","example":"1024"}},"required":["name","cpu","memory"]},"EnvironmentResourceDefaultsDto":{"type":"object","properties":{"logRetentionDays":{"type":"number","description":"Log retention in days","example":90},"rdsInstanceClass":{"type":"string","description":"RDS instance class","example":"db.t3.small"},"rdsMultiAz":{"type":"boolean","description":"Whether RDS is multi-AZ","example":true},"rdsDeletionProtection":{"type":"boolean","description":"Whether deletion protection is enabled","example":true},"rdsBackupRetentionDays":{"type":"number","description":"Backup retention in days","example":7}},"required":["logRetentionDays","rdsInstanceClass","rdsMultiAz","rdsDeletionProtection","rdsBackupRetentionDays"]},"EnvironmentDefaultsGroupDto":{"type":"object","properties":{"prod":{"description":"Production environment defaults","allOf":[{"$ref":"#/components/schemas/EnvironmentResourceDefaultsDto"}]},"nonprod":{"description":"Non-production environment defaults","allOf":[{"$ref":"#/components/schemas/EnvironmentResourceDefaultsDto"}]}},"required":["prod","nonprod"]},"DatabaseDefaultsDto":{"type":"object","properties":{"engine":{"type":"string","description":"Database engine","example":"postgres"},"engineVersion":{"type":"string","description":"Engine version","example":"16.3"},"allocatedStorageGb":{"type":"number","description":"Initial storage in GB","example":20},"maxAllocatedStorageGb":{"type":"number","description":"Maximum storage in GB","example":100},"encrypted":{"type":"boolean","description":"Whether storage is encrypted","example":true},"storageType":{"type":"string","description":"Storage type","example":"gp3"}},"required":["engine","engineVersion","allocatedStorageGb","maxAllocatedStorageGb","encrypted","storageType"]},"CacheDefaultsDto":{"type":"object","properties":{"engine":{"type":"string","description":"Cache engine","example":"redis"},"engineVersion":{"type":"string","description":"Engine version","example":"7.1"},"nodeType":{"type":"string","description":"Default node type","example":"cache.t3.micro"},"encrypted":{"type":"boolean","description":"Whether encryption is enabled","example":true}},"required":["engine","engineVersion","nodeType","encrypted"]},"StorageDefaultsDto":{"type":"object","properties":{"encryption":{"type":"string","description":"Encryption algorithm","example":"AES256"},"versioning":{"type":"boolean","description":"Whether versioning is enabled","example":true},"publicAccessBlocked":{"type":"boolean","description":"Whether public access is blocked","example":true},"deletionPolicy":{"type":"string","description":"Deletion policy","example":"RETAIN"}},"required":["encryption","versioning","publicAccessBlocked","deletionPolicy"]},"QueueDefaultsDto":{"type":"object","properties":{"messageRetentionDays":{"type":"number","description":"Message retention in days","example":14},"deadLetterQueue":{"type":"boolean","description":"Whether a dead-letter queue is created","example":true},"maxReceiveCount":{"type":"number","description":"Max receive count before dead-letter","example":3},"deletionPolicy":{"type":"string","description":"Deletion policy","example":"RETAIN"}},"required":["messageRetentionDays","deadLetterQueue","maxReceiveCount","deletionPolicy"]},"InfrastructureDefaultsResponseDto":{"type":"object","properties":{"profiles":{"description":"Available sizing profiles","type":"array","items":{"$ref":"#/components/schemas/ProfileSizingDto"}},"defaultReplicas":{"type":"number","description":"Default number of replicas","example":1},"environment":{"description":"Per-environment resource defaults","allOf":[{"$ref":"#/components/schemas/EnvironmentDefaultsGroupDto"}]},"database":{"description":"Database defaults","allOf":[{"$ref":"#/components/schemas/DatabaseDefaultsDto"}]},"cache":{"description":"Cache defaults","allOf":[{"$ref":"#/components/schemas/CacheDefaultsDto"}]},"storage":{"description":"Storage defaults","allOf":[{"$ref":"#/components/schemas/StorageDefaultsDto"}]},"queue":{"description":"Queue defaults","allOf":[{"$ref":"#/components/schemas/QueueDefaultsDto"}]}},"required":["profiles","defaultReplicas","environment","database","cache","storage","queue"]},"AwsSetupRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID to look up stored AWS connection"},"region":{"type":"string","description":"AWS region"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role (optional if organizationId provided)"}},"required":["roleArn"]},"RoleValidationDto":{"type":"object","properties":{"ok":{"type":"boolean","description":"Whether the role was successfully assumed"},"error":{"type":"string","description":"Validation error message"}},"required":["ok"]},"AwsSetupResponseDto":{"type":"object","properties":{"roleValidation":{"description":"Role validation result","allOf":[{"$ref":"#/components/schemas/RoleValidationDto"}]},"discovery":{"description":"Discovered AWS environment","allOf":[{"$ref":"#/components/schemas/DiscoveryResponseDto"}]}},"required":["roleValidation","discovery"]},"SmartSetupRequestDto":{"type":"object","properties":{"orgName":{"type":"string","description":"Organization name"},"installationId":{"type":"number","description":"GitHub installation ID"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region"}},"required":["orgName","installationId","roleArn"]},"OrganizationSetupDto":{"type":"object","properties":{"name":{"type":"string","description":"Organization name"},"slug":{"type":"string","description":"Organization slug"}},"required":["name","slug"]},"GitHubSetupDto":{"type":"object","properties":{"installationId":{"type":"number","description":"GitHub installation ID"}},"required":["installationId"]},"AwsSetupDto":{"type":"object","properties":{"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"}},"required":["roleArn","externalId"]},"SmartSetupDefaultsDto":{"type":"object","properties":{"environments":{"description":"Default deployment environments","type":"array","items":{"type":"string"}},"sizingProfile":{"type":"string","description":"Default sizing profile"},"repositoryVisibility":{"type":"string","description":"Default repository visibility","enum":["private","public"]},"template":{"type":"string","description":"Default app template","example":"nextjs"}},"required":["environments","sizingProfile","repositoryVisibility","template"]},"SmartSetupOptionsDto":{"type":"object","properties":{"environments":{"description":"Supported deployment environments","type":"array","items":{"type":"string"}},"repositoryVisibilities":{"type":"array","description":"Repository visibility options","items":{"type":"string","enum":["private","public"]}},"templates":{"description":"Supported templates","type":"array","items":{"type":"string"}}},"required":["environments","repositoryVisibilities","templates"]},"SmartSetupResponseDto":{"type":"object","properties":{"organization":{"description":"Organization details","allOf":[{"$ref":"#/components/schemas/OrganizationSetupDto"}]},"github":{"description":"GitHub connection info","allOf":[{"$ref":"#/components/schemas/GitHubSetupDto"}]},"aws":{"description":"AWS connection info","allOf":[{"$ref":"#/components/schemas/AwsSetupDto"}]},"discovery":{"description":"Discovered AWS environment","allOf":[{"$ref":"#/components/schemas/DiscoveryResponseDto"}]},"defaults":{"description":"Default values applied for onboarding","allOf":[{"$ref":"#/components/schemas/SmartSetupDefaultsDto"}]},"options":{"description":"Available onboarding options","allOf":[{"$ref":"#/components/schemas/SmartSetupOptionsDto"}]}},"required":["organization","github","aws","discovery","defaults","options"]},"OnboardingProgressRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"step":{"type":"string","description":"Current onboarding step","example":"connect-aws"},"data":{"type":"object","description":"Progress payload"}},"required":["organizationId","step"]},"OnboardingProgressResponseDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"step":{"type":"string","description":"Current onboarding step"},"data":{"type":"object","description":"Progress payload"},"updatedAt":{"type":"string","description":"Last updated timestamp"}},"required":["organizationId","step","updatedAt"]},"SaveGitHubInstallationRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"installationId":{"type":"number","description":"GitHub App installation ID"}},"required":["organizationId","installationId"]},"GitHubInstallationResponseDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"installationId":{"type":"number","description":"GitHub App installation ID"},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Last updated timestamp"}},"required":["organizationId","installationId","createdAt","updatedAt"]},"GitHubInstallationsListResponseDto":{"type":"object","properties":{"installations":{"description":"GitHub installations for the organization","type":"array","items":{"$ref":"#/components/schemas/GitHubInstallationResponseDto"}}},"required":["installations"]},"AnalyzeRepoRequestDto":{"type":"object","properties":{"owner":{"type":"string","description":"Repository owner (organization or user)"},"repo":{"type":"string","description":"Repository name"},"installationId":{"type":"number","description":"GitHub App installation ID"}},"required":["owner","repo","installationId"]},"DetectedConfigDto":{"type":"object","properties":{"framework":{"type":"string","description":"Detected framework","nullable":true},"version":{"type":"string","description":"Detected framework version","nullable":true},"language":{"type":"string","description":"Detected language","nullable":true},"port":{"type":"number","description":"Detected port","nullable":true},"hasDockerfile":{"type":"boolean","description":"Whether repository has a Dockerfile"},"hasStrictOpsYml":{"type":"boolean","description":"Whether repository has strictops.yml"},"hasHealthEndpoint":{"type":"boolean","description":"Whether repository has a health endpoint"},"packageManager":{"type":"string","description":"Detected package manager","nullable":true}},"required":["hasDockerfile","hasStrictOpsYml","hasHealthEndpoint"]},"SuggestedConfigDto":{"type":"object","properties":{"serviceName":{"type":"string","description":"Suggested service name"},"type":{"type":"string","description":"Suggested service type"},"port":{"type":"number","description":"Suggested port"},"profile":{"type":"string","description":"Suggested sizing profile"},"replicas":{"type":"number","description":"Suggested number of replicas"},"healthCheckPath":{"type":"string","description":"Suggested health check path"}},"required":["serviceName","type","port","profile","replicas","healthCheckPath"]},"AnalyzeRepoResponseDto":{"type":"object","properties":{"detected":{"description":"Detected configuration","allOf":[{"$ref":"#/components/schemas/DetectedConfigDto"}]},"suggestions":{"description":"Suggested configuration","allOf":[{"$ref":"#/components/schemas/SuggestedConfigDto"}]},"missingFiles":{"description":"List of missing files required for deployment","type":"array","items":{"type":"string"}}},"required":["detected","suggestions","missingFiles"]},"GenerateConfigRequestDto":{"type":"object","properties":{"owner":{"type":"string","description":"Repository owner (organization or user)"},"repo":{"type":"string","description":"Repository name"},"serviceName":{"type":"string","description":"Service name"},"profile":{"type":"string","description":"Sizing profile","enum":["small","medium","large"]},"replicas":{"type":"number","description":"Number of replicas"},"healthCheckPath":{"type":"string","description":"Health check path"},"environments":{"description":"Environments to deploy","type":"array","items":{"type":"string"}},"type":{"type":"string","description":"Service type (web, api, worker)"},"port":{"type":"number","description":"Detected port"}},"required":["owner","repo","serviceName"]},"GeneratedFileDto":{"type":"object","properties":{"path":{"type":"string","description":"File path"},"content":{"type":"string","description":"File content"}},"required":["path","content"]},"GenerateConfigResponseDto":{"type":"object","properties":{"files":{"description":"Generated files","type":"array","items":{"$ref":"#/components/schemas/GeneratedFileDto"}}},"required":["files"]},"VerifySetupRequestDto":{"type":"object","properties":{"owner":{"type":"string","description":"Repository owner (organization or user)"},"repo":{"type":"string","description":"Repository name"},"installationId":{"type":"number","description":"GitHub App installation ID"}},"required":["owner","repo","installationId"]},"VerifySetupResponseDto":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether all checks passed"},"checks":{"type":"object","description":"Individual check results"}},"required":["valid","checks"]},"GitHubOwnerDto":{"type":"object","properties":{"login":{"type":"string","description":"GitHub account login name"},"type":{"type":"string","description":"Account type","enum":["User","Organization"]},"avatarUrl":{"type":"string","description":"Avatar URL"}},"required":["login","type"]},"GitHubOwnersResponseDto":{"type":"object","properties":{"owners":{"description":"Available GitHub owners","type":"array","items":{"$ref":"#/components/schemas/GitHubOwnerDto"}}},"required":["owners"]},"GitHubRepositoryDto":{"type":"object","properties":{"id":{"type":"number","description":"GitHub repository ID"},"name":{"type":"string","description":"Repository name"},"fullName":{"type":"string","description":"Full repository name (owner/repo)"},"ownerLogin":{"type":"string","description":"Owner login name"},"defaultBranch":{"type":"string","description":"Default branch name"},"private":{"type":"boolean","description":"Whether the repository is private"},"language":{"type":"string","description":"Primary programming language","nullable":true},"description":{"type":"string","description":"Repository description","nullable":true},"updatedAt":{"type":"string","description":"Last updated timestamp (ISO 8601)","nullable":true}},"required":["id","name","fullName","ownerLogin","private"]},"GitHubRepositoriesResponseDto":{"type":"object","properties":{"repositories":{"description":"List of repositories","type":"array","items":{"$ref":"#/components/schemas/GitHubRepositoryDto"}}},"required":["repositories"]},"GitHubInstallationItemDto":{"type":"object","properties":{"installationId":{"type":"number","description":"GitHub App installation ID"},"account":{"description":"GitHub account info","allOf":[{"$ref":"#/components/schemas/GitHubOwnerDto"}]}},"required":["installationId","account"]},"GitHubInstallationsResponseDto":{"type":"object","properties":{"installations":{"description":"List of existing GitHub App installations","type":"array","items":{"$ref":"#/components/schemas/GitHubInstallationItemDto"}}},"required":["installations"]},"GitHubInstallUrlResponseDto":{"type":"object","properties":{"url":{"type":"string","description":"GitHub App installation URL"}},"required":["url"]},"GitHubInstallCallbackResponseDto":{"type":"object","properties":{"installationId":{"type":"number","description":"GitHub installation ID"},"tokenExpiresAt":{"type":"string","description":"Token expiration timestamp"},"setupAction":{"type":"string","description":"Setup action type"},"state":{"type":"string","description":"OAuth state parameter"}},"required":["installationId","tokenExpiresAt"]},"GitHubBootstrapRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"projectId":{"type":"string","description":"Project ID"},"serviceId":{"type":"string","description":"Service ID"},"installationId":{"type":"number","description":"GitHub installation ID"},"owner":{"type":"string","description":"GitHub repository owner"},"repoName":{"type":"string","description":"Repository name"},"description":{"type":"string","description":"Repository description"},"private":{"type":"boolean","description":"Whether the repository should be private"},"templateVersion":{"type":"string","description":"Template version"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region"},"accountId":{"type":"string","description":"AWS account ID"},"vpcId":{"type":"string","description":"VPC ID"},"publicSubnetIds":{"description":"List of public subnet IDs","type":"array","items":{"type":"string"}},"strictopsApiUrl":{"type":"string","description":"StrictOps API URL"},"retryFromDeploymentId":{"type":"string","description":"ID of failed deployment being retried"}},"required":["organizationId","serviceId","installationId","owner","repoName","roleArn","externalId"]},"AsyncGitHubBootstrapResponseDto":{"type":"object","properties":{"deploymentId":{"type":"string","description":"Deployment ID to track progress"},"status":{"type":"string","description":"Initial deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]}},"required":["deploymentId","status"]},"ProjectBootstrapRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"projectId":{"type":"string","description":"Project ID (created if not provided)"},"templateId":{"type":"string","description":"Template ID (e.g., saas-starter, nextjs, api-only)"},"projectName":{"type":"string","description":"Project name (used for repo prefix and project slug)"},"installationId":{"type":"number","description":"GitHub installation ID"},"owner":{"type":"string","description":"GitHub repository owner"},"private":{"type":"boolean","description":"Whether repositories should be private"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region"},"accountId":{"type":"string","description":"AWS account ID"},"vpcId":{"type":"string","description":"VPC ID"},"publicSubnetIds":{"description":"List of public subnet IDs","type":"array","items":{"type":"string"}},"awsConnectionId":{"type":"string","description":"AWS connection ID to link to the project"},"stackStrategy":{"type":"string","description":"Stack strategy: SHARED puts all envs in one stack, SPLIT isolates prod","enum":["SHARED","SPLIT","ISOLATED"]},"environments":{"description":"Environment names (e.g. dev, stage, prod). Falls back to template defaults if not provided.","type":"array","items":{"type":"string"}},"productionEnvironments":{"description":"Names of production environments (e.g. prod). Used for stack grouping and workflow config.","type":"array","items":{"type":"string"}}},"required":["organizationId","templateId","projectName","installationId","owner","roleArn","externalId"]},"ProjectBootstrapServiceInfoDto":{"type":"object","properties":{"id":{"type":"string","description":"Service ID"},"name":{"type":"string","description":"Service name"},"repoName":{"type":"string","description":"Repository name"}},"required":["id","name","repoName"]},"ProjectBootstrapResponseDto":{"type":"object","properties":{"deploymentId":{"type":"string","description":"Deployment ID to track progress"},"projectId":{"type":"string","description":"Project ID"},"services":{"description":"Created services","type":"array","items":{"$ref":"#/components/schemas/ProjectBootstrapServiceInfoDto"}},"status":{"type":"string","description":"Initial deployment status","enum":["QUEUED"]}},"required":["deploymentId","projectId","services","status"]},"GitHubWebhookResponseDto":{"type":"object","properties":{"ok":{"type":"boolean","description":"Whether the webhook was processed successfully"},"event":{"type":"string","description":"GitHub event type"},"action":{"type":"string","description":"Event action"}},"required":["ok","event"]},"CreateApiTokenRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the token"},"organizationId":{"type":"string","description":"Organization ID the token belongs to"},"projectId":{"type":"string","description":"Project ID to scope the token to"},"serviceId":{"type":"string","description":"Service ID to scope the token to"},"permissions":{"description":"Token permissions","type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","description":"Token expiration date (ISO 8601)"}},"required":["name","organizationId"]},"CreateApiTokenResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Token ID"},"name":{"type":"string","description":"Human-readable name for the token"},"token":{"type":"string","description":"The plaintext token (only shown once)"},"tokenPrefix":{"type":"string","description":"Token prefix for identification"},"permissions":{"description":"Token permissions","type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","description":"Token expiration date","nullable":true},"createdAt":{"type":"string","description":"When the token was created"}},"required":["id","name","token","tokenPrefix","permissions","createdAt"]},"ApiTokenListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Token ID"},"name":{"type":"string","description":"Human-readable name for the token"},"tokenPrefix":{"type":"string","description":"Token prefix for identification"},"permissions":{"description":"Token permissions","type":"array","items":{"type":"string"}},"projectId":{"type":"string","description":"Project ID the token is scoped to","nullable":true},"serviceId":{"type":"string","description":"Service ID the token is scoped to","nullable":true},"lastUsedAt":{"type":"string","description":"When the token was last used","nullable":true},"expiresAt":{"type":"string","description":"Token expiration date","nullable":true},"createdAt":{"type":"string","description":"When the token was created"},"revokedAt":{"type":"string","description":"When the token was revoked","nullable":true}},"required":["id","name","tokenPrefix","permissions","createdAt"]},"ApiTokenListResponseDto":{"type":"object","properties":{"tokens":{"description":"List of API tokens","type":"array","items":{"$ref":"#/components/schemas/ApiTokenListItemDto"}}},"required":["tokens"]},"RevokeApiTokenResponseDto":{"type":"object","properties":{"revoked":{"type":"boolean","description":"Whether the token was revoked"}},"required":["revoked"]},"PreviewNewServiceDto":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"profile":{"type":"string","description":"Service profile","enum":["SMALL","MEDIUM","LARGE"]},"environments":{"description":"Environments for this service","type":"array","items":{"type":"string"}}},"required":["name"]},"PreviewYamlRequestDto":{"type":"object","properties":{"projectId":{"type":"string","description":"Project ID"},"newService":{"description":"New service to include in the preview","allOf":[{"$ref":"#/components/schemas/PreviewNewServiceDto"}]}},"required":["projectId"]},"PreviewYamlResponseDto":{"type":"object","properties":{"yaml":{"type":"string","description":"Generated strictops.yml content"}},"required":["yaml"]},"CreateServiceDependencyInputDto":{"type":"object","properties":{"targetType":{"type":"string","description":"Type of dependency target","enum":["SERVICE","RESOURCE"]},"targetServiceId":{"type":"string","description":"Target service ID (when targetType is SERVICE)"},"targetResourceId":{"type":"string","description":"Target resource ID (when targetType is RESOURCE)"},"envVarName":{"type":"string","description":"Environment variable name (e.g. DATABASE_URL)"},"envVarTemplate":{"type":"string","description":"Optional env var value template override"}},"required":["targetType","envVarName"]},"CreateServiceRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"projectId":{"type":"string","description":"Project ID the service belongs to"},"repositoryUrl":{"type":"string","description":"Repository URL (e.g., https://github.com/org/repo)"},"installationId":{"type":"number","description":"GitHub App installation ID"},"integrationMode":{"type":"string","description":"Integration mode","enum":["GITHUB_APP","MANUAL"]},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"profile":{"type":"string","description":"Service profile (sizing)","enum":["SMALL","MEDIUM","LARGE"]},"environments":{"description":"Environment names to create for this service","type":"array","items":{"type":"string"}},"deploy":{"type":"boolean","description":"If true, triggers a deployment after creating the service"},"dependencies":{"description":"Dependencies to create for this service","type":"array","items":{"$ref":"#/components/schemas/CreateServiceDependencyInputDto"}}},"required":["name","projectId"]},"ServiceEnvironmentUrlDto":{"type":"object","properties":{"environmentName":{"type":"string","description":"Environment name (e.g. production, dev)"},"url":{"type":"string","description":"Deployed service URL","nullable":true},"deploymentId":{"type":"string","description":"Deployment ID that produced this URL"},"lastDeployedAt":{"type":"string","description":"When the deployment completed","nullable":true}},"required":["environmentName","deploymentId"]},"ServiceResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Service ID"},"name":{"type":"string","description":"Service name"},"projectId":{"type":"string","description":"Project ID"},"repositoryUrl":{"type":"string","description":"Repository URL","nullable":true},"installationId":{"type":"number","description":"GitHub App installation ID","nullable":true},"integrationMode":{"type":"string","description":"Integration mode","enum":["GITHUB_APP","MANUAL"]},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"profile":{"type":"string","description":"Service profile","enum":["SMALL","MEDIUM","LARGE"]},"createdAt":{"type":"string","description":"When the service was created"},"updatedAt":{"type":"string","description":"When the service was last updated"},"environmentUrls":{"description":"Deployed environment URLs","type":"array","items":{"$ref":"#/components/schemas/ServiceEnvironmentUrlDto"}}},"required":["id","name","projectId","integrationMode","type","profile","createdAt","updatedAt","environmentUrls"]},"CreateServiceWithDeployResponseDto":{"type":"object","properties":{"service":{"description":"Created service","allOf":[{"$ref":"#/components/schemas/ServiceResponseDto"}]},"deploymentId":{"type":"string","description":"Deployment ID if deploy was requested","nullable":true},"status":{"type":"string","description":"Deployment status","nullable":true}},"required":["service"]},"ServiceListResponseDto":{"type":"object","properties":{"services":{"description":"List of services","type":"array","items":{"$ref":"#/components/schemas/ServiceResponseDto"}}},"required":["services"]},"CreateProjectRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID the project belongs to"},"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description"},"defaultEnvironments":{"description":"Default environments for new services","type":"array","items":{"type":"string"}},"productionEnvironments":{"description":"Environments classified as production","type":"array","items":{"type":"string"}},"awsConnectionId":{"type":"string","description":"AWS connection ID to link to this project"},"stackStrategy":{"type":"string","description":"Stack strategy: SHARED puts all envs in one stack, SPLIT isolates prod","enum":["SHARED","SPLIT","ISOLATED"]}},"required":["organizationId","name"]},"ProjectResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Project ID"},"organizationId":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Project name"},"slug":{"type":"string","description":"Project slug (unique per org)"},"description":{"type":"string","description":"Project description","nullable":true},"defaultEnvironments":{"description":"Default environments for new services","type":"array","items":{"type":"string"}},"productionEnvironments":{"description":"Environments classified as production","type":"array","items":{"type":"string"}},"stackStrategy":{"type":"string","description":"Stack strategy (SHARED or SPLIT)","enum":["SHARED","SPLIT","ISOLATED"]},"awsConnectionId":{"type":"string","description":"Linked AWS connection ID","nullable":true},"currentYaml":{"type":"string","description":"Current generated strictops.yml content","nullable":true},"currentYamlAt":{"type":"string","description":"When the current YAML was last updated","nullable":true},"createdAt":{"type":"string","description":"When the project was created"},"updatedAt":{"type":"string","description":"When the project was last updated"}},"required":["id","organizationId","name","slug","defaultEnvironments","productionEnvironments","stackStrategy","createdAt","updatedAt"]},"ProjectListResponseDto":{"type":"object","properties":{"projects":{"description":"List of projects","type":"array","items":{"$ref":"#/components/schemas/ProjectResponseDto"}}},"required":["projects"]},"UpdateProjectRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description"},"defaultEnvironments":{"description":"Default environments for new services","type":"array","items":{"type":"string"}},"productionEnvironments":{"description":"Environments classified as production","type":"array","items":{"type":"string"}},"awsConnectionId":{"type":"string","description":"AWS connection ID to link to this project"},"stackStrategy":{"type":"string","description":"Stack strategy: SHARED puts all envs in one stack, SPLIT isolates prod","enum":["SHARED","SPLIT","ISOLATED"]}}},"V1CreateDeploymentRequestDto":{"type":"object","properties":{"strictopsYaml":{"type":"string","description":"Contents of strictops.yml file"},"imageUri":{"type":"string","description":"URI of the Docker image to deploy"},"projectId":{"type":"string","description":"Project ID (required if org has multiple projects)"},"serviceId":{"type":"string","description":"Service ID (required if token is not scoped to a service)"},"environment":{"type":"string","description":"Target environment name (defaults to \"production\")"},"commitSha":{"type":"string","description":"Git commit SHA for tracking"}},"required":["strictopsYaml","imageUri"]},"V1CreateDeploymentResponseDto":{"type":"object","properties":{"deploymentId":{"type":"string","description":"Deployment ID to track progress"},"status":{"type":"string","description":"Initial deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]}},"required":["deploymentId","status"]},"V1DeploymentStatusResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Deployment ID"},"serviceId":{"type":"string","description":"Service ID"},"environment":{"type":"string","description":"Target environment"},"status":{"type":"string","description":"Deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"errorMessage":{"type":"string","description":"Error message if deployment failed","nullable":true},"serviceUrl":{"type":"string","description":"Deployed service URL","nullable":true},"stackId":{"type":"string","description":"CloudFormation stack ID","nullable":true},"region":{"type":"string","description":"AWS region","nullable":true},"createdAt":{"type":"string","description":"When deployment was created"},"completedAt":{"type":"string","description":"When deployment completed","nullable":true}},"required":["id","serviceId","environment","status","createdAt"]},"V1WhoamiResponseDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"organizationName":{"type":"string","description":"Organization name"}},"required":["organizationId","organizationName"]},"PricingPlanDto":{"type":"object","properties":{"tier":{"type":"string","description":"Tier identifier","enum":["FREE","STARTER","PROFESSIONAL"]},"name":{"type":"string","description":"Display name"},"monthlyPrice":{"type":"number","description":"Monthly price in dollars"},"features":{"description":"List of included features","type":"array","items":{"type":"string"}}},"required":["tier","name","monthlyPrice","features"]},"PricingPlansResponseDto":{"type":"object","properties":{"plans":{"description":"Available pricing plans","type":"array","items":{"$ref":"#/components/schemas/PricingPlanDto"}}},"required":["plans"]},"SubscriptionResponseDto":{"type":"object","properties":{"tier":{"type":"string","description":"Current subscription tier","enum":["FREE","STARTER","PROFESSIONAL"]},"status":{"type":"string","description":"Subscription status"},"stripeCustomerId":{"type":"string","description":"Stripe customer ID","nullable":true},"stripeSubscriptionId":{"type":"string","description":"Stripe subscription ID","nullable":true},"currentPeriodEnd":{"type":"string","description":"Current period end date","nullable":true},"cancelAtPeriodEnd":{"type":"boolean","description":"Whether subscription cancels at period end"}},"required":["tier","status","cancelAtPeriodEnd"]},"CreateCheckoutSessionRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"email":{"type":"string","description":"Contact email for the customer"},"organizationName":{"type":"string","description":"Organization display name"},"tier":{"type":"string","description":"Target pricing tier","enum":["STARTER","PROFESSIONAL"]},"successUrl":{"type":"string","description":"URL to redirect to after successful checkout"},"cancelUrl":{"type":"string","description":"URL to redirect to if checkout is canceled"}},"required":["organizationId","email","organizationName","tier","successUrl","cancelUrl"]},"CheckoutSessionResponseDto":{"type":"object","properties":{"checkoutUrl":{"type":"string","description":"Stripe checkout session URL"}},"required":["checkoutUrl"]},"CreateBillingPortalRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"returnUrl":{"type":"string","description":"URL to return to after portal session"}},"required":["organizationId","returnUrl"]},"BillingPortalResponseDto":{"type":"object","properties":{"portalUrl":{"type":"string","description":"Stripe billing portal URL"}},"required":["portalUrl"]},"CancelSubscriptionRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"}},"required":["organizationId"]},"BillingActionResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the action succeeded"}},"required":["success"]},"MetricDatapointResponseDto":{"type":"object","properties":{"metric":{"type":"string","description":"Metric name"},"value":{"type":"number","description":"Metric value"},"timestamp":{"type":"string","description":"Timestamp (ISO 8601)"}},"required":["metric","value","timestamp"]},"MetricsQueryResponseDto":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID"},"environment":{"type":"string","description":"Environment name"},"datapoints":{"description":"Metric datapoints","type":"array","items":{"$ref":"#/components/schemas/MetricDatapointResponseDto"}}},"required":["serviceId","environment","datapoints"]},"HealthStatusMetricDto":{"type":"object","properties":{"metric":{"type":"string","description":"Metric name"},"value":{"type":"number","description":"Latest value"},"status":{"type":"string","description":"Metric status"}},"required":["metric","value","status"]},"HealthStatusResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Overall health status","enum":["healthy","degraded","unhealthy"]},"metrics":{"description":"Individual metric statuses","type":"array","items":{"$ref":"#/components/schemas/HealthStatusMetricDto"}},"checkedAt":{"type":"string","description":"Time of health check (ISO 8601)"}},"required":["status","metrics","checkedAt"]},"MonitoringConfigResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Config ID"},"serviceId":{"type":"string","description":"Service ID"},"environment":{"type":"string","description":"Environment name"},"enabled":{"type":"boolean","description":"Whether monitoring is enabled"},"createdAt":{"type":"string","description":"Created at (ISO 8601)"},"updatedAt":{"type":"string","description":"Updated at (ISO 8601)"}},"required":["id","serviceId","environment","enabled","createdAt","updatedAt"]},"UpdateMonitoringConfigDto":{"type":"object","properties":{"environment":{"type":"string","description":"Environment name"},"enabled":{"type":"boolean","description":"Whether monitoring is enabled"}},"required":["environment","enabled"]},"UpsertAlarmDto":{"type":"object","properties":{"environment":{"type":"string","description":"Environment name"},"threshold":{"type":"number","description":"Alarm threshold"},"comparisonOp":{"type":"string"},"evaluationPeriods":{"type":"number"},"period":{"type":"number"},"statistic":{"type":"string"},"enabled":{"type":"boolean"}},"required":["environment","threshold"]},"ProvisionAlarmsDto":{"type":"object","properties":{"environment":{"type":"string","description":"Environment name"}},"required":["environment"]},"UpdateScalingConfigDto":{"type":"object","properties":{"environment":{"type":"string","description":"Environment name"},"mode":{"type":"string"},"minTasks":{"type":"number"},"maxTasks":{"type":"number"},"targetCpuPercent":{"type":"number"},"targetMemPercent":{"type":"number"},"cooldownSeconds":{"type":"number"},"scaleUpStep":{"type":"number"},"scaleDownStep":{"type":"number"}},"required":["environment"]},"ExecuteScaleDto":{"type":"object","properties":{"environment":{"type":"string","description":"Environment name"},"desiredTasks":{"type":"number","description":"Desired task count"}},"required":["environment","desiredTasks"]},"CreateAlertChannelDto":{"type":"object","properties":{"type":{"type":"string","description":"Channel type","enum":["email","slack","webhook","pagerduty"]},"name":{"type":"string","description":"Channel name"},"config":{"type":"object","description":"Channel config (type-specific)"},"isDefault":{"type":"boolean"}},"required":["type","name","config"]},"UpdateAlertChannelDto":{"type":"object","properties":{"name":{"type":"string"},"config":{"type":"object"},"enabled":{"type":"boolean"}}},"EnvironmentHealthDto":{"type":"object","properties":{"healthy":{"type":"number","description":"Number of healthy (ACTIVE) environments"},"total":{"type":"number","description":"Total number of environments"}},"required":["healthy","total"]},"DeploymentCountsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of deployments"},"succeeded":{"type":"number","description":"Number of succeeded deployments"},"failed":{"type":"number","description":"Number of failed deployments"},"running":{"type":"number","description":"Number of running deployments"},"queued":{"type":"number","description":"Number of queued deployments"}},"required":["total","succeeded","failed","running","queued"]},"LatestEnvironmentDto":{"type":"object","properties":{"name":{"type":"string","description":"Environment name"},"status":{"type":"string","description":"Status of the latest deployment","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"region":{"type":"string","description":"AWS region"},"lastDeployedAt":{"type":"string","description":"When the latest deployment completed or was created","nullable":true},"serviceUrl":{"type":"string","description":"Deployed service URL","nullable":true},"deploymentId":{"type":"string","description":"Deployment ID of the latest deployment"},"repoFullName":{"type":"string","description":"Full repository name","nullable":true}},"required":["name","status","region","deploymentId"]},"DashboardServiceDto":{"type":"object","properties":{"id":{"type":"string","description":"Service ID"},"name":{"type":"string","description":"Service name"},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"profile":{"type":"string","description":"Service profile","enum":["SMALL","MEDIUM","LARGE"]},"latestDeploymentStatus":{"type":"string","description":"Status of the latest deployment","nullable":true},"latestDeploymentAt":{"type":"string","description":"When the latest deployment completed","nullable":true}},"required":["id","name","type","profile"]},"DashboardResourceCountsDto":{"type":"object","properties":{"databases":{"type":"number","description":"Number of databases"},"imageStores":{"type":"number","description":"Number of image stores"},"storage":{"type":"number","description":"Number of storage buckets"},"queues":{"type":"number","description":"Number of queues"},"caches":{"type":"number","description":"Number of caches"}},"required":["databases","imageStores","storage","queues","caches"]},"RecentDeploymentDto":{"type":"object","properties":{"id":{"type":"string","description":"Deployment ID"},"serviceName":{"type":"string","description":"Service name"},"environment":{"type":"string","description":"Target environment"},"status":{"type":"string","description":"Deployment status","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"createdAt":{"type":"string","description":"When the deployment was created"},"completedAt":{"type":"string","description":"When the deployment completed","nullable":true}},"required":["id","serviceName","environment","status","createdAt"]},"DashboardSummaryDto":{"type":"object","properties":{"environmentCount":{"type":"number","description":"Number of environments"},"serviceCount":{"type":"number","description":"Number of distinct services"},"environmentHealth":{"description":"Environment health counts","allOf":[{"$ref":"#/components/schemas/EnvironmentHealthDto"}]},"deploymentCounts":{"description":"Deployment counts by status","allOf":[{"$ref":"#/components/schemas/DeploymentCountsDto"}]},"latestEnvironments":{"description":"Latest deployment per environment","type":"array","items":{"$ref":"#/components/schemas/LatestEnvironmentDto"}},"services":{"description":"Services with latest deployment status","type":"array","items":{"$ref":"#/components/schemas/DashboardServiceDto"}},"resourceCounts":{"description":"Resource counts by type","allOf":[{"$ref":"#/components/schemas/DashboardResourceCountsDto"}]},"recentDeployments":{"description":"Last 10 deployments","type":"array","items":{"$ref":"#/components/schemas/RecentDeploymentDto"}}},"required":["environmentCount","serviceCount","environmentHealth","deploymentCounts","latestEnvironments","services","resourceCounts","recentDeployments"]},"TeardownRequestDto":{"type":"object","properties":{"roleArn":{"type":"string","description":"ARN of the IAM role to assume for teardown"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region (defaults to us-east-1)"},"confirm":{"type":"string","description":"Confirmation string required when dryRun is false"},"retainResources":{"type":"boolean","description":"Whether to retain databases and storage after teardown (default: true)","default":true}},"required":["roleArn","externalId"]},"ResourceInfoDto":{"type":"object","properties":{"arn":{"type":"string","description":"Resource ARN"},"resourceType":{"type":"string","description":"Resource type (e.g. cloudformation:stack, ecs:service)"},"action":{"type":"string","description":"Action that will be taken","enum":["delete","update"]}},"required":["arn","resourceType","action"]},"TeardownResultDto":{"type":"object","properties":{"dryRun":{"type":"boolean","description":"Whether this was a dry run"},"stacksDeleted":{"description":"Stacks that were deleted","type":"array","items":{"type":"string"}},"stacksUpdated":{"description":"Stacks that were updated (partial removal)","type":"array","items":{"type":"string"}},"resourcesDiscovered":{"description":"Resources discovered in scope","type":"array","items":{"$ref":"#/components/schemas/ResourceInfoDto"}},"deploymentsArchived":{"type":"number","description":"Number of deployment records archived"},"warning":{"type":"string","description":"Warning about shared stack or other affected resources"},"deploymentId":{"type":"string","description":"Deployment ID for async teardown tracking (non-dry-run only)"}},"required":["dryRun","stacksDeleted","stacksUpdated","resourcesDiscovered","deploymentsArchived"]},"EnvironmentResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Environment ID"},"name":{"type":"string","description":"Environment name (e.g., dev, prod)"},"projectId":{"type":"string","description":"Project ID"},"stackName":{"type":"string","description":"CloudFormation stack name","nullable":true},"status":{"type":"string","description":"Environment status","enum":["ACTIVE","DRIFTED","NOT_FOUND","UNKNOWN"]},"lastCheckedAt":{"type":"string","description":"Last time status was checked","nullable":true},"lastCheckError":{"type":"string","description":"Last check error message","nullable":true},"createdAt":{"type":"string","description":"When the environment was created"},"updatedAt":{"type":"string","description":"When the environment was last updated"}},"required":["id","name","projectId","status","createdAt","updatedAt"]},"EnvironmentListResponseDto":{"type":"object","properties":{"environments":{"description":"List of environments","type":"array","items":{"$ref":"#/components/schemas/EnvironmentResponseDto"}}},"required":["environments"]},"EnvironmentCheckResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Environment ID"},"status":{"type":"string","description":"Updated status","enum":["ACTIVE","DRIFTED","NOT_FOUND","UNKNOWN"]},"lastCheckError":{"type":"string","description":"Error message if check failed","nullable":true},"lastCheckedAt":{"type":"string","description":"When the check was performed"}},"required":["id","status","lastCheckedAt"]},"BulkEnvironmentCheckResponseDto":{"type":"object","properties":{"results":{"description":"Results for each checked environment","type":"array","items":{"$ref":"#/components/schemas/EnvironmentCheckResponseDto"}}},"required":["results"]},"EnvironmentCleanupResponseDto":{"type":"object","properties":{"removed":{"type":"number","description":"Number of NOT_FOUND environments removed"}},"required":["removed"]},"OrganizationResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"slug":{"type":"string","description":"Organization slug","nullable":true},"subscriptionTier":{"type":"string","description":"Subscription tier"},"logAnalysisEnabled":{"type":"boolean","description":"Whether the org has opted into AI log analysis on failed deploys"},"createdAt":{"type":"string","description":"When the organization was created"},"updatedAt":{"type":"string","description":"When the organization was last updated"}},"required":["id","name","subscriptionTier","logAnalysisEnabled","createdAt","updatedAt"]},"UpdateOrganizationRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Organization name"},"logAnalysisEnabled":{"type":"boolean","description":"Per-org opt-in for sending failed-deploy logs to OpenAI/Anthropic for AI-assisted root cause analysis. Requires the control plane to also have LOG_ANALYSIS_ENABLED=true."}}},"TemplateServiceDto":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"profile":{"type":"string","description":"Sizing profile","enum":["SMALL","MEDIUM","LARGE"]},"template":{"type":"string","description":"Template identifier"}},"required":["name","type","profile","template"]},"TemplateResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Template ID"},"label":{"type":"string","description":"Display label"},"description":{"type":"string","description":"Template description"},"services":{"description":"Services included in the template","type":"array","items":{"$ref":"#/components/schemas/TemplateServiceDto"}},"database":{"type":"boolean","description":"Whether the template includes a database"},"defaultEnvironments":{"description":"Default environment names","type":"array","items":{"type":"string"}}},"required":["id","label","description","services","database","defaultEnvironments"]},"TemplateListResponseDto":{"type":"object","properties":{"templates":{"description":"Available project templates","type":"array","items":{"$ref":"#/components/schemas/TemplateResponseDto"}}},"required":["templates"]},"ServiceTemplateDto":{"type":"object","properties":{"id":{"type":"string","description":"Template ID"},"label":{"type":"string","description":"Display label"},"description":{"type":"string","description":"Template description"},"type":{"type":"string","description":"Service type","enum":["WEB","API","WORKER"]},"repoUrl":{"type":"string","description":"Template repository URL"},"template":{"type":"string","description":"Template identifier"}},"required":["id","label","description","type","repoUrl","template"]},"ServiceTemplateListResponseDto":{"type":"object","properties":{"templates":{"description":"Available service templates","type":"array","items":{"$ref":"#/components/schemas/ServiceTemplateDto"}}},"required":["templates"]},"CreateAwsConnectionRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Connection name (unique within org)"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region"}},"required":["organizationId","name","roleArn","externalId"]},"AwsConnectionDto":{"type":"object","properties":{"id":{"type":"string","description":"Connection ID"},"organizationId":{"type":"string","description":"Organization ID"},"name":{"type":"string","description":"Connection name"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region","nullable":true},"createdAt":{"type":"string","description":"Created timestamp"},"updatedAt":{"type":"string","description":"Last updated timestamp"}},"required":["id","organizationId","name","roleArn","externalId","createdAt","updatedAt"]},"AwsConnectionListResponseDto":{"type":"object","properties":{"connections":{"description":"List of AWS connections","type":"array","items":{"$ref":"#/components/schemas/AwsConnectionDto"}}},"required":["connections"]},"UpdateAwsConnectionRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"Connection name"},"roleArn":{"type":"string","description":"ARN of the IAM role to assume"},"externalId":{"type":"string","description":"External ID for assuming the role"},"region":{"type":"string","description":"AWS region"}}},"EnvVarDto":{"type":"object","properties":{"name":{"type":"string","description":"Variable name","example":"DATABASE_URL"},"value":{"type":"string","description":"Variable value (masked for secrets)","example":"postgres://..."},"isSecret":{"type":"boolean","description":"Whether this variable is stored as SecureString"}},"required":["name","value","isSecret"]},"EnvVarListResponseDto":{"type":"object","properties":{"variables":{"description":"Environment variables","type":"array","items":{"$ref":"#/components/schemas/EnvVarDto"}},"serviceName":{"type":"string","description":"Service name"},"environment":{"type":"string","description":"Environment name"}},"required":["variables","serviceName","environment"]},"SetEnvVarItemDto":{"type":"object","properties":{"name":{"type":"string","description":"Variable name (uppercase letters, digits, underscores)","example":"API_KEY"},"value":{"type":"string","description":"Variable value"},"secret":{"type":"boolean","description":"Store as SecureString","default":false}},"required":["name","value"]},"SetEnvVarsRequestDto":{"type":"object","properties":{"variables":{"description":"Variables to set","type":"array","items":{"$ref":"#/components/schemas/SetEnvVarItemDto"}}},"required":["variables"]},"DeleteEnvVarResponseDto":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the variable was deleted"}},"required":["deleted"]},"ResourceCountsDto":{"type":"object","properties":{"total":{"type":"number","description":"Total count"},"active":{"type":"number","description":"Active count"},"failed":{"type":"number","description":"Failed count"}},"required":["total","active","failed"]},"ResourceOverviewResponseDto":{"type":"object","properties":{"databases":{"description":"Database resource counts","allOf":[{"$ref":"#/components/schemas/ResourceCountsDto"}]},"imageStores":{"description":"Image store resource counts","allOf":[{"$ref":"#/components/schemas/ResourceCountsDto"}]},"storage":{"description":"Storage resource counts","allOf":[{"$ref":"#/components/schemas/ResourceCountsDto"}]},"queues":{"description":"Queue resource counts","allOf":[{"$ref":"#/components/schemas/ResourceCountsDto"}]},"cache":{"description":"Cache resource counts","allOf":[{"$ref":"#/components/schemas/ResourceCountsDto"}]}},"required":["databases","imageStores","storage","queues","cache"]},"ResourceResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Resource ID"},"projectId":{"type":"string","description":"Project ID"},"type":{"type":"string","description":"Resource type","enum":["DATABASE","IMAGE_STORE","STORAGE","QUEUE","CACHE"]},"name":{"type":"string","description":"Resource name"},"stackName":{"type":"string","description":"CloudFormation stack name","nullable":true},"status":{"type":"string","description":"Resource status","enum":["ACTIVE","CREATING","FAILED","DELETING","NOT_FOUND","RETAINED","UNKNOWN"]},"region":{"type":"string","description":"AWS region","nullable":true},"endpoint":{"type":"string","description":"Connection endpoint","nullable":true},"port":{"type":"string","description":"Connection port","nullable":true},"engine":{"type":"string","description":"Database engine (e.g. postgres)","nullable":true},"engineVersion":{"type":"string","description":"Database engine version","nullable":true},"instanceClass":{"type":"string","description":"Database instance class","nullable":true},"secretArn":{"type":"string","description":"Secrets Manager ARN for credentials","nullable":true},"securityGroupId":{"type":"string","description":"Security group ID","nullable":true},"repositoryUri":{"type":"string","description":"ECR repository URI","nullable":true},"repositoryName":{"type":"string","description":"ECR repository name","nullable":true},"metadata":{"type":"object","description":"Additional metadata","nullable":true},"lastSyncedAt":{"type":"string","description":"Last time this resource was synced from AWS","nullable":true},"lastSyncError":{"type":"string","description":"Last sync error message","nullable":true},"healthStatus":{"type":"string","description":"Live health status from AWS","nullable":true,"enum":["healthy","warning","error","unknown"]},"lastHealthCheckedAt":{"type":"string","description":"When the health was last checked","nullable":true},"createdAt":{"type":"string","description":"When the resource record was created"},"updatedAt":{"type":"string","description":"When the resource record was last updated"}},"required":["id","projectId","type","name","status","createdAt","updatedAt"]},"ResourceListResponseDto":{"type":"object","properties":{"resources":{"description":"List of resources","type":"array","items":{"$ref":"#/components/schemas/ResourceResponseDto"}}},"required":["resources"]},"ResourceHealthCheckResponseDto":{"type":"object","properties":{"resourceId":{"type":"string","description":"Resource ID"},"healthStatus":{"type":"string","description":"Health status","enum":["healthy","warning","error","unknown","not_found"]},"checkedAt":{"type":"string","description":"When the check was performed"},"details":{"type":"object","description":"Additional health check details","nullable":true}},"required":["resourceId","healthStatus","checkedAt"]},"EcrImageDto":{"type":"object","properties":{"digest":{"type":"string","description":"Image digest (sha256)"},"tags":{"description":"Image tags","type":"array","items":{"type":"string"}},"sizeBytes":{"type":"number","description":"Image size in bytes"},"pushedAt":{"type":"string","description":"When the image was pushed","nullable":true},"lastPulledAt":{"type":"string","description":"When the image was last pulled","nullable":true}},"required":["digest","tags","sizeBytes"]},"EcrImageListResponseDto":{"type":"object","properties":{"items":{"description":"List of images","type":"array","items":{"$ref":"#/components/schemas/EcrImageDto"}},"pagination":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMeta"}]}},"required":["items","pagination"]},"ResourceSyncResponseDto":{"type":"object","properties":{"synced":{"type":"number","description":"Total resources synced"},"created":{"type":"number","description":"Resources created"},"updated":{"type":"number","description":"Resources updated"},"errors":{"description":"Errors encountered during sync","type":"array","items":{"type":"string"}}},"required":["synced","created","updated","errors"]},"ForceDeleteDatabaseRequestDto":{"type":"object","properties":{"confirm":{"type":"string","description":"Confirmation string: \"delete {resource name}\""},"createFinalSnapshot":{"type":"boolean","description":"Create a final RDS snapshot before deletion","default":false}},"required":["confirm"]},"ForceDeleteDatabaseResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the deletion was successful"},"resourceId":{"type":"string","description":"ID of the deleted resource"},"snapshotId":{"type":"string","description":"ID of the final snapshot, if one was created","nullable":true}},"required":["success","resourceId","snapshotId"]},"CreateServiceDependencyRequestDto":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID that has the dependency"},"targetType":{"type":"string","description":"Type of dependency target","enum":["SERVICE","RESOURCE"]},"targetServiceId":{"type":"string","description":"Target service ID (when targetType is SERVICE)"},"targetResourceId":{"type":"string","description":"Target resource ID (when targetType is RESOURCE)"},"envVarName":{"type":"string","description":"Environment variable name (e.g. DATABASE_URL)"},"envVarTemplate":{"type":"string","description":"Optional env var value template override"}},"required":["serviceId","targetType","envVarName"]},"ServiceDependencyResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Dependency ID"},"serviceId":{"type":"string","description":"Service ID"},"targetType":{"type":"string","description":"Target type","enum":["SERVICE","RESOURCE"]},"targetServiceId":{"type":"string","description":"Target service ID","nullable":true},"targetResourceId":{"type":"string","description":"Target resource ID","nullable":true},"envVarName":{"type":"string","description":"Environment variable name"},"envVarTemplate":{"type":"string","description":"Env var value template","nullable":true},"targetServiceName":{"type":"string","description":"Target service name","nullable":true},"targetResourceName":{"type":"string","description":"Target resource name","nullable":true},"targetResourceType":{"type":"string","description":"Target resource type","nullable":true},"createdAt":{"type":"string","description":"When created"},"updatedAt":{"type":"string","description":"When last updated"}},"required":["id","serviceId","targetType","envVarName","createdAt","updatedAt"]},"ServiceDependencyListResponseDto":{"type":"object","properties":{"dependencies":{"description":"List of service dependencies","type":"array","items":{"$ref":"#/components/schemas/ServiceDependencyResponseDto"}}},"required":["dependencies"]},"NotificationResponseDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["DEPLOY_SUCCESS","DEPLOY_FAILED","TEARDOWN_COMPLETE","TEARDOWN_FAILED","ALERT_TRIGGERED","ALERT_RESOLVED"]},"title":{"type":"string"},"body":{"type":"string"},"metadata":{"type":"object","nullable":true},"read":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","type","title","body","read","createdAt"]},"NotificationListResponseDto":{"type":"object","properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponseDto"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["notifications","pagination"]},"UnreadCountResponseDto":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"]},"ChatMessageContextDto":{"type":"object","properties":{"deploymentId":{"type":"string","description":"Deployment ID for context"},"serviceId":{"type":"string","description":"Service ID for context"},"currentPage":{"type":"string","description":"Current page or route the user is on"}}},"SendChatMessageRequestDto":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization ID"},"userId":{"type":"string","description":"User ID"},"message":{"type":"string","description":"The message content"},"conversationId":{"type":"string","description":"Conversation ID to continue (omit for new conversation)"},"context":{"description":"Context information for the conversation","allOf":[{"$ref":"#/components/schemas/ChatMessageContextDto"}]}},"required":["organizationId","userId","message"]},"ChatSourceDto":{"type":"object","properties":{"type":{"type":"string","description":"Source type (documentation, schema, error_catalog)"},"path":{"type":"string","description":"Source path or identifier"},"excerpt":{"type":"string","description":"Relevant excerpt from the source"}},"required":["type","path"]},"ChatMessageDto":{"type":"object","properties":{"id":{"type":"string","description":"Message ID"},"role":{"type":"string","description":"Role (USER or ASSISTANT)","enum":["USER","ASSISTANT"]},"content":{"type":"string","description":"Message content"},"sources":{"description":"Sources used (for assistant messages)","type":"array","items":{"$ref":"#/components/schemas/ChatSourceDto"}},"createdAt":{"type":"string","description":"When the message was created"}},"required":["id","role","content","createdAt"]},"SendChatMessageResponseDto":{"type":"object","properties":{"conversationId":{"type":"string","description":"Conversation ID"},"message":{"description":"The assistant response message","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]}},"required":["conversationId","message"]},"ConversationListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID"},"title":{"type":"string","description":"Conversation title"},"createdAt":{"type":"string","description":"When the conversation was created"},"updatedAt":{"type":"string","description":"When the conversation was last updated"}},"required":["id","createdAt","updatedAt"]},"ListConversationsResponseDto":{"type":"object","properties":{"conversations":{"description":"List of conversations","type":"array","items":{"$ref":"#/components/schemas/ConversationListItemDto"}}},"required":["conversations"]},"ConversationDetailDto":{"type":"object","properties":{"id":{"type":"string","description":"Conversation ID"},"title":{"type":"string","description":"Conversation title"},"context":{"description":"Context information","allOf":[{"$ref":"#/components/schemas/ChatMessageContextDto"}]},"messages":{"description":"Messages in the conversation","type":"array","items":{"$ref":"#/components/schemas/ChatMessageDto"}},"createdAt":{"type":"string","description":"When the conversation was created"}},"required":["id","messages","createdAt"]},"DeleteConversationResponseDto":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the conversation was deleted"}},"required":["deleted"]}}}}