{
  "openapi": "3.1.0",
  "info": {
    "title": "Fullsea API",
    "description": "REST API of Fullsea (PLAN.md §6, docs/API.md). Errors use the `ErrorEnvelope` shape. Auth: the `fs_session` cookie plus `X-CSRF-Token` on non-GET requests, or `Authorization: Bearer fsk_…`.",
    "license": {
      "name": ""
    },
    "version": "v1"
  },
  "paths": {
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_authorization_server",
        "responses": {
          "200": {
            "description": "RFC 8414 authorization server metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizationServerMetadata"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_protected_resource",
        "responses": {
          "200": {
            "description": "RFC 9728 metadata of `/mcp` (also at `/.well-known/oauth-protected-resource`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceMetadata"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_list_affiliates",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Matches the code, the person's email, the PayPal email or the display name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AffiliateStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Partners (at most 200), best payable first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminAffiliateDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/commissions/{id}/reverse": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_reverse_commission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Commission id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReverseCommission"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reversed (unpaid) or clawed back from the next payout (paid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCommissionDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: already reversed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/ledger": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_affiliate_ledger",
        "parameters": [
          {
            "name": "affiliateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CommissionStatus"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CommissionKind"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commissions, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminCommissionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/overview": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_affiliates_overview",
        "responses": {
          "200": {
            "description": "The KPI strip",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAffiliatesOverviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-batches": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_list_payout_batches",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Batches, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PayoutBatchDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_create_payout_batch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePayoutBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Every payable commission of every affiliate due a payout locked into one payout each (never twice)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatchDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: nothing to pay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-batches/{id}": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_get_payout_batch",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Batch id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The batch and its payouts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatchDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-batches/{id}/mark-paid": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_mark_batch_paid",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Batch id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkBatchPaid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Every payout still queued is paid, its commissions too, and each affiliate gets a receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatchDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-batches/{id}/paypal-csv": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_payout_batch_csv",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Batch id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PayPal's Payouts web upload file (`text/csv`, no header row: email, amount, currency, reference, note, wallet); the batch becomes `exported`",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-preview": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_payout_preview",
        "responses": {
          "200": {
            "description": "What a batch created now would pay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutPreviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payout-totals": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_payout_totals",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paid out per affiliate in the calendar year",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AnnualPayoutTotalDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payouts/{id}/mark-failed": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_mark_payout_failed",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payout id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPayoutFailed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Its commissions are payable again; the affiliate is told",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatchDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/payouts/{id}/mark-paid": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_mark_payout_paid",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payout id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPayoutPaid"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "One payout paid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutBatchDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/referrals": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_affiliate_referrals",
        "parameters": [
          {
            "name": "affiliateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ReferralStatus"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Referrals, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminReferralDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/referrals/{id}/resolve": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_resolve_flag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Referral id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveFlag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Approved or disqualified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReferralDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/{id}": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_get_affiliate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Affiliate id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One partner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAffiliateDto"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_update_affiliate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Affiliate id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAffiliateTerms"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Terms, status and notes saved (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAffiliateDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/{id}/adjustments": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_create_adjustment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Affiliate id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdjustment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A payable bonus or deduction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCommissionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/{id}/landing": {
      "put": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_set_landing",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Affiliate id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLanding"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The `/go/<code>` page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAffiliateDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/affiliates/{id}/promo-code": {
      "put": {
        "tags": [
          "affiliates"
        ],
        "operationId": "admin_link_promo_code",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Affiliate id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkPromoCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Linked or unlinked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAffiliateDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: another affiliate has it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/attention": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_attention",
        "responses": {
          "200": {
            "description": "The attention queue, most urgent first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttentionQueueDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/badges": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_badges",
        "responses": {
          "200": {
            "description": "The navigation's live counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBadgesDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/billing/payments": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_billing_payments",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PaymentStatus"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PaymentKind"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payments (subscription invoices, top-ups), newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminPaymentDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/billing/subscriptions": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_billing_subscriptions",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionStatus"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscriptions with their packs and MRR, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminBillingSubscriptionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/brief": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_brief",
        "responses": {
          "200": {
            "description": "Counts, revenue, the attention queue, capacity and top movers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBriefDto"
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/builder-models": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "get_admin_builder_models",
        "responses": {
          "200": {
            "description": "The model policy in force: the committed file, the operator's override, what each plan gets and the history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelPolicyDto"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: admin role required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin"
        ],
        "operationId": "put_admin_builder_models",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelPolicy"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved and in force for the next options read and the next turn of every session, without a restart (audited `builder_models.policy_updated`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: the field and the policy file's rule it breaks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: admin role required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the policy changed since `baseRevision`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/builder-models/preview": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "preview_admin_builder_models",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewModelPolicy"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The override checked and previewed; nothing stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPolicyPreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: admin role required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/builder-models/revert": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "revert_admin_builder_models",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevertModelPolicy"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The committed file alone is in force again (audited `builder_models.policy_reverted`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModelPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: no reason, or nothing to revert",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: admin role required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the policy changed since `baseRevision`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/capacity": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_capacity",
        "responses": {
          "200": {
            "description": "Every cluster's pools with their runway, and object storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetCapacityDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_list_contracts",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "draft, quoted, active, expiring, expired, terminated (or all)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "in": "query",
            "description": "One team's contracts",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminContractDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_create_contract",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A draft ENT-<year>-<nnnn>",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: `overrides.<field>` names an override, the rest the term's fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts/{id}": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_get_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The contract, its quote, links and invoices, linked requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "No such contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_update_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractTermsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The draft's terms replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: not a draft (withdraw a quote to edit it)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts/{id}/activate": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_activate_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateContract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Active: its limits apply, the team's quota and placement are synced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: not a draft or quote, or the team holds another contract in force",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts/{id}/send": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_send_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Card: a Checkout link (quoted until paid); Net-30: a Stripe invoice and the contract active; custom: quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentContractDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: only a draft is sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: Stripe is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts/{id}/terminate": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_terminate_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminateContract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Terminated: Stripe subscription cancelled, open documents closed, the team back on plan + packs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a reason is needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: already ended",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/contracts/{id}/withdraw": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_withdraw_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The contract",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Back to a draft; its open link expired or invoice voided at Stripe",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminContractDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: not quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/nodes": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_dedicated_nodes",
        "responses": {
          "200": {
            "description": "Every node with its dedication and free capacity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DedicatedNodeDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/overrides/check": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_check_overrides",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckOverrides"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Valid or the reasons (by snake_case field), and the limits it gives",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverridesCheckDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/requests": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_list_requests",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "open (new and reviewing), new, reviewing, quoted, accepted, declined; none = all",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminCapacityRequestDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/requests/{id}": {
      "patch": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_update_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The request",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCapacityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status and assignee set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCapacityRequestDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enterprise/summary": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_enterprise_summary",
        "responses": {
          "200": {
            "description": "Contracts by state, the committed MRR, open and unassigned requests, dedicated nodes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseSummaryDto"
                }
              }
            }
          },
          "403": {
            "description": "Not an admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/events": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_events",
        "responses": {
          "200": {
            "description": "Server-Sent Events: `entity` for every resource change on the platform, `resync` after a gap",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/fleet-cost": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "get_fleet_cost",
        "responses": {
          "200": {
            "description": "The fleet cost the margin uses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetCostDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin"
        ],
        "operationId": "put_fleet_cost",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutFleetCost"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetCostDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a part is negative or over $1 000 000",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/jobs/{id}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Job id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDto"
                }
              }
            }
          },
          "404": {
            "description": "No such job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/managed-email": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "admin_managed_email",
        "responses": {
          "200": {
            "description": "The relay switch and every sender with today's counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminManagedEmailDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "advisor"
        ],
        "operationId": "put_admin_relay_switch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutRelaySwitch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The switch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminManagedEmailDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/managed-email/{id}/resume": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "admin_resume_sender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The stack sends again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSenderDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/managed-email/{id}/suspend": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "admin_suspend_sender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SenderDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The stack sends nothing until resumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSenderDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/mcp": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_mcp_overview",
        "responses": {
          "200": {
            "description": "The endpoint, the kill switch, the global allowlist and every admin's tokens",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMcpOverview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/mcp/tokens": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "create_admin_mcp_token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdminMcpToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The token; its secret is shown this once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAdminMcpToken"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: label, scopes, allowedCidrs or expiresInDays (at most 90)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/mcp/tokens/{id}/revoke": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "revoke_admin_mcp_token",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Token id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked: the next call with it is refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMcpTokenDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/movers": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_movers",
        "responses": {
          "200": {
            "description": "Top teams by AI spend and managed email over 24 h and 7 d",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopMoversDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/nodes/{id}/dedication": {
      "put": {
        "tags": [
          "enterprise"
        ],
        "operationId": "admin_set_node_dedication",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The node",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetNodeDedication"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Labelled and tainted for the team (or released); the teams' quota and placement sync is queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DedicatedNodeDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: it holds another team's database, or it is the last node of a contract in force",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the cluster refused or is unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/overage/charges": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_overage_charges",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OverageChargeStatus"
            }
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TeamId"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overage settlements and waivers of every team, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminOverageChargeDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/overage/ledger": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_overage_ledger",
        "parameters": [
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TeamId"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overage per team and billing period, newest period first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_OverageLedgerRowDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/resources": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_resources",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AdminResourceKind"
            }
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TeamId"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Part of the name or the team's name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live resources of one kind across every team, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminResourceDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/revenue": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_revenue",
        "responses": {
          "200": {
            "description": "MRR/ARR, movement, churn, margin and revenue at risk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/attention": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_support_attention",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "1–100 (20)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unanswered tickets at risk of, or past, their first-response SLA",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminSupportTicketDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/counts": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_support_counts",
        "responses": {
          "200": {
            "description": "Open, unassigned, at risk, breached, due within the hour",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportQueueCounts"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/events": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_support_events",
        "responses": {
          "200": {
            "description": "Server-Sent Events: `entity` (topic `support_tickets`, any team; a staff-only change has the nil team id), `resync`, `: ping`",
            "content": {
              "text/event-stream": {}
            }
          }
        }
      }
    },
    "/api/v1/admin/support/tickets": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_support_queue",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "`open` (default), `done`, `all` or a status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigned",
            "in": "query",
            "description": "`me`, `none`, `any` (default) or an operator's id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "description": "low, normal, high or urgent",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "A reference, or text in the subject, the requester or the team",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "From nextCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1–200 (50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The queue, what is owed first (unanswered by SLA due time)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminSupportTicketDto"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: admin role required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_get_support_ticket",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every message (notes and the draft too), the snapshot and the customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketDetail"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "support"
        ],
        "operationId": "admin_update_support_ticket",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSupportTicket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}/attachments/{attachment}": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "admin_get_support_attachment",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "description": "Attachment id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file (internal notes' files too)"
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}/diagnostics": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "admin_refresh_support_diagnostics",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A fresh, scrubbed snapshot (stored on the ticket)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportDiagnosticsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}/draft": {
      "put": {
        "tags": [
          "support"
        ],
        "operationId": "admin_put_support_draft",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutSupportDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The staff-only ai_draft, saved or replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportMessageDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "support"
        ],
        "operationId": "admin_discard_support_draft",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Discarded"
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}/draft/send": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "admin_send_support_draft",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSupportDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent as the operator's answer (emailed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportMessageDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/support/tickets/{reference}/messages": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "admin_post_support_message",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON, or `multipart/form-data` with the same fields plus `files`",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPostSupportMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A reply (emailed to the requester with the ticket's Reply-To and threading headers) or an internal note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportMessageDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_teams",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Part of the name, slug or a member's email.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "plan",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PlanCode"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Teams, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AdminTeamDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The Team 360° dossier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamDossierDto"
                }
              }
            }
          },
          "404": {
            "description": "No such team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/audit": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_audit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit events about the team, its members and resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AuditEventDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/credits": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_credits",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantTeamCredit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Adjusted (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/members": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_members",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Members, invitations, API keys (prefixes only), MCP tokens and connected agents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamMembersDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/read-only-view": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_view",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadOnlyViewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The team's dashboard through admin reads (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadOnlyTeamViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/reconcile-stripe": {
      "post": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_reconcile",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription read again from Stripe (audited)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeReconcileDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the team has no Stripe subscription",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/resources": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_resources",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every live resource of the team",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminResourceDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{id}/support": {
      "get": {
        "tags": [
          "admin"
        ],
        "operationId": "admin_team_support",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The team's support tickets, open first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSupportDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/advisor": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "advisor_overview",
        "responses": {
          "200": {
            "description": "Every app's and database's right-sizing advice and the Billing summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvisorOverviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/advisor/findings/{id}/apply": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "apply_advice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Finding id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resized through update_app / resize_database",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppliedAdvice"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: the size is not in the plan (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: nothing to apply, or a change is under way",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/advisor/findings/{id}/dismiss": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "dismiss_advice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Finding id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quiet for 30 days unless the advice changes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvisorFindingDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/advisor/refresh": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "refresh_advisor",
        "responses": {
          "200": {
            "description": "The advice read again from the last week now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvisorOverviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "get_affiliate",
        "responses": {
          "200": {
            "description": "The signed-in person's affiliate account and stats, or the terms to join",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateOverviewDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "join_affiliate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinAffiliate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Enrolled; a confirmation link goes to a PayPal address that is not the account's",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateOverviewDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: `code` or `payoutEmail`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: already enrolled, or the code is taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate/code-check": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "affiliate_code_check",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the code can be taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeAvailability"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate/commissions": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "list_affiliate_commissions",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ledger, newest first (no customer data)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_CommissionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate/payout-email": {
      "put": {
        "tags": [
          "affiliates"
        ],
        "operationId": "update_payout_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePayoutEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The new address waits for its confirmation link (the account's own address applies at once); the account's address gets a security alert",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateOverviewDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: `payoutEmail`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate/payout-email/confirm": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "confirm_payout_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPayoutEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The PayPal address is confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliateOverviewDto"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: unknown or expired link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliate/payouts": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "list_affiliate_payouts",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payouts, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PayoutDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliates/click": {
      "post": {
        "tags": [
          "affiliates"
        ],
        "operationId": "affiliate_click",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordClick"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Recorded (once per visitor, affiliate and day); with an active affiliate's code the answer sets `fs_ref` (and `fs_ref_sub`), host-only, Secure over https, SameSite=Lax, 60 days",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClickAck"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/affiliates/landing/{code}": {
      "get": {
        "tags": [
          "affiliates"
        ],
        "operationId": "affiliate_landing",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "Referral code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What `/go/<code>` shows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerLandingDto"
                }
              }
            }
          },
          "404": {
            "description": "No active affiliate has this code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/alerts/incidents/{id}/triage": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "get_incident_triage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Incident id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The incident's AI investigation: queued, running, done (likely cause, evidence, steps, one-click actions), failed or skipped with its reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriageDto"
                }
              }
            }
          },
          "404": {
            "description": "No investigation (AI triage is off, or it opened before it was on)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-keys": {
      "get": {
        "tags": [
          "api-keys"
        ],
        "operationId": "list_api_keys",
        "responses": {
          "200": {
            "description": "Active API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "api-keys"
        ],
        "operationId": "create_api_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created; the secret is shown once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedApiKey"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-keys/{id}": {
      "delete": {
        "tags": [
          "api-keys"
        ],
        "operationId": "revoke_api_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "API key id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          }
        }
      }
    },
    "/api/v1/apps": {
      "get": {
        "tags": [
          "apps"
        ],
        "operationId": "list_apps",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Apps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AppDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "apps"
        ],
        "operationId": "create_app",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created (and deploying unless deploy=false)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded or plan_restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "no_capacity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}": {
      "get": {
        "tags": [
          "apps"
        ],
        "operationId": "get_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app, its latest release and latest operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "apps"
        ],
        "operationId": "delete_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Deletion started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "apps"
        ],
        "operationId": "update_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/advice": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "app_advice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app's advice (`null` before the first reading)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/AdvisorFindingDto"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/autoscale": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_app_autoscale",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Autoscaling, the pool's ceiling and what the cluster reports",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoscaleDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "edge"
        ],
        "operationId": "put_app_autoscale",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAutoscale"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved; a config release rolls it out (none while paused)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoscaleUpdated"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: bounds, CPU target, or a maximum the pool cannot hold (in words)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: a cron job, an app with a volume, or a deploy under way",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/canary": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_app_canary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The running canary, the last few and whether one can start",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppCanaryDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "edge"
        ],
        "operationId": "start_app_canary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCanary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "A release deployed as a canary: once it runs it takes `percent` of requests beside the live release",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanaryStarted"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: percent 1–50, window 60–3600 s",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: not a web service, paused, a volume, no live release, a deploy or canary under way, or no room in the pool for its replica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/canary/abort": {
      "post": {
        "tags": [
          "edge"
        ],
        "operationId": "abort_app_canary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "`roll_back_canary`: every request goes back to the live release and the canary goes; its release is marked failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: no canary is running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/canary/promote": {
      "post": {
        "tags": [
          "edge"
        ],
        "operationId": "promote_app_canary",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "`promote_canary`: the canary's release rolls out to every replica, then the split and the canary go",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: no canary takes requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/deploy": {
      "post": {
        "tags": [
          "apps"
        ],
        "operationId": "deploy_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Release queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseWithOperation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/edge": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_app_edge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app's edge controls, all off by default",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppEdgeDto"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "edge"
        ],
        "operationId": "update_app_edge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAppEdge"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved; the edge applies it within seconds (no redeploy). A password lock turned on without a password answers its generated `password` once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppEdgeUpdated"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a CIDR, the rate, the password or the message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: edge controls come with every paid plan (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: not a web service, or the app is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/edge/open": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "open_app_edge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "return",
            "in": "query",
            "description": "The page on the app's own address to go back to",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Signed in as the owner: back to the app's host with a one-time hand-off (60 s); not signed in: to /login, coming back here"
          },
          "400": {
            "description": "validation_failed: `return` is not an address of this app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "A page saying the app is private to its owner's Fullsea account"
          }
        }
      }
    },
    "/api/v1/apps/{id}/edge/password": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_app_edge_password",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The password lock's user and password (the owner only)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgePasswordDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no password lock was ever set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/exec": {
      "post": {
        "tags": [
          "apps"
        ],
        "operationId": "exec_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "It ran: exit code, duration and the output with the app's secrets hidden (a non-zero exit or a timeout is a 200 too)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResultDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: command, workingDir, timeoutSeconds, or confirm not true",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: the role cannot reveal secrets (the terminal's permission)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not the caller's app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the app is paused, deploying, a cron job, or has no running, ready instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many runs of the team at once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the app's cluster did not answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/github": {
      "get": {
        "tags": [
          "github"
        ],
        "operationId": "get_app_github",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app's GitHub link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppGithubDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "github"
        ],
        "operationId": "put_app_github",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppGithub"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Which installation clones the repository, and whether a push deploys the app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppGithubDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: not a Git app on GitHub, or no connected installation reaches it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/health": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "app_health",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app's Health Strip: state, 30-day uptime, latency, memory and the issue cards that need attention (none while calm)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStripDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/logs": {
      "get": {
        "tags": [
          "apps"
        ],
        "operationId": "app_logs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lines",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sinceSeconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Log lines",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppLogs"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/probes": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "operationId": "create_probe",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The probe, checked from the next minute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProbeDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed (path, expectedStatus, keyword, latencyThresholdMs, intervalSeconds; not a web app)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: that method and path is already probed, or 10 probes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/releases": {
      "get": {
        "tags": [
          "apps"
        ],
        "operationId": "list_releases",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Releases, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReleaseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/restart": {
      "post": {
        "tags": [
          "apps"
        ],
        "operationId": "restart_app",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Restart started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/terminal": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "terminal_info",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a terminal opens (and why not), its limits and the open sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerminalInfoDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/terminal/ws": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "terminal_ws",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cols",
            "in": "query",
            "description": "Columns (default 80)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "rows",
            "in": "query",
            "description": "Rows (default 24)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "101": {
            "description": "A WebSocket: binary frames are keystrokes and output; text frames are TerminalClientMessage / TerminalServerMessage JSON"
          },
          "403": {
            "description": "The Origin is not the web app's",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not the caller's app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/traffic": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "app_traffic",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requests, 2xx–5xx, bytes and P50/P95/P99 from the ingress in 1-, 5- or 30-minute buckets; `available: false` with a reason when the app's region has no request metrics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrafficDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed (range)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/apps/{id}/uptime": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "app_uptime",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "90 days of the app's address, its probes and its custom domains' certificates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UptimeDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/artifacts": {
      "get": {
        "tags": [
          "artifacts"
        ],
        "operationId": "list_artifacts",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "description": "Only this project's",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "description": "Only this builder session's",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectChat",
            "in": "query",
            "description": "Only files shared in their project's own chat (the workbench), not the co-pilot's",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "sql_export | volume_export | workspace_file | exec_output | chat_upload | generated",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "From nextCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1–200 (50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The team's downloadable files that have not expired, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ArtifactDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/artifacts/transfers/{operationId}": {
      "get": {
        "tags": [
          "artifacts"
        ],
        "operationId": "get_data_transfer",
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "description": "The export's or import's operation",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The transfer as it stands: running, or its outcome (count, error) and an export's file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTransferDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such transfer of the team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/artifacts/uploads": {
      "post": {
        "tags": [
          "artifacts"
        ],
        "operationId": "upload_chat_file",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "The file's name (sanitized; its extension picks the type).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "description": "The workbench's project: a small text file is also placed in its workspace at `.uploads/<name>`.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "requestBody": {
          "description": "The file (at most 10 MiB) with the browser's Content-Type for it: .csv .tsv .json .sql .yml .yaml .txt .md .xml .pdf",
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A chat_upload artifact (a small text file is also in the project's workspace at metadata.workspacePath)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: the type, its MIME type or its content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the team's downloadable files use what the plan keeps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "413": {
            "description": "Larger than 10 MiB"
          }
        }
      }
    },
    "/api/v1/artifacts/{id}": {
      "get": {
        "tags": [
          "artifacts"
        ],
        "operationId": "get_artifact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Artifact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found: another team's, expired or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "artifacts"
        ],
        "operationId": "delete_artifact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Artifact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted with its file"
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/artifacts/{id}/download": {
      "get": {
        "tags": [
          "artifacts"
        ],
        "operationId": "download_artifact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Artifact id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file, streamed: Content-Disposition: attachment, X-Content-Type-Options: nosniff, Cache-Control: private, no-store",
            "content": {
              "application/octet-stream": {}
            }
          },
          "404": {
            "description": "not_found: another team's, expired or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/addons": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "get_billing_addons",
        "responses": {
          "200": {
            "description": "The capacity packs the plan sells, what is held, their prices at the plan's interval and the current period",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingAddonsDto"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "operationId": "put_billing_addons",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAddons"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Changed on the subscription in one prorated Stripe change (an increase is charged now, a decrease credited on the next invoice) and synced from Stripe's answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingAddonsDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: an unknown pack, one named twice, or more than its maximum",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: no plan that sells packs (`details.upgrade`), or the card was declined (nothing changed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the last payment failed; update the card before adding packs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: Stripe is not reachable, or no price is configured for the plan's interval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/auto-topup": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "get_auto_topup",
        "responses": {
          "200": {
            "description": "Automatic top-up settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopupDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "operationId": "put_auto_topup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAutoTopup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoTopupDto"
                }
              }
            }
          },
          "400": {
            "description": "Threshold or pack out of range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "No card saved yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/capacity-requests": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "post_billing_capacity_request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCapacityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Recorded for the active team; a high-priority support ticket is opened",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacityRequestDto"
                }
              }
            }
          },
          "202": {
            "description": "A filled honeypot: answered, not recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacityRequestAccepted"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: the fields that are wrong",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: five requests an hour per address or team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/checkout": {
      "post": {
        "tags": [
          "billing"
        ],
        "operationId": "billing_checkout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A Stripe Checkout Session (mode=subscription), monthly or annual",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already subscribed: change plans in the portal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/enterprise": {
      "get": {
        "tags": [
          "enterprise"
        ],
        "operationId": "get_billing_enterprise",
        "responses": {
          "200": {
            "description": "The contract Billing shows (in force, else quoted with its Pay link, else the last that ended; `null` without one) and the team's capacity requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnterpriseBillingDto"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/overflow": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "get_billing_overflow",
        "responses": {
          "200": {
            "description": "The team's overflow setting (switch, cap, frozen), the period's month-to-date meter per metric, the projected period total, the cap's 50/80/100 % state, the upgrade nudge and the newest settlements",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverflowDto"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "billing"
        ],
        "operationId": "put_billing_overflow",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOverflow"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved (the tenant namespaces' quotas follow)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverflowDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a cap outside 0–10 000 000 cents, below what accrued plus what is reserved beyond the plan this period (`minimumCapCents`), or a team overflow is not offered to (Free, a payment due). Switching overflow off withdraws the team's acceptance of paid overflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: the role may not manage billing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/overflow/accept": {
      "post": {
        "tags": [
          "billing"
        ],
        "operationId": "post_billing_overflow_accept",
        "parameters": [
          {
            "name": "X-Fullsea-Accept-Overflow",
            "in": "header",
            "description": "`true` accepts (or `?acceptOverflow=true`)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The team accepted paid overflow (recorded with who, how and the cap shown); what it holds beyond the plan may run and is billed from now on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OverflowDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: overflow is not open for the team (off, frozen, no card, not offered)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: the role may not manage billing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "overflow_acceptance_required: the quote of what the team holds beyond the plan (`details`: `OverflowAcceptance`); send it again accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/payments": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "list_payments",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices, top-ups and automatic top-ups, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PaymentDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/portal": {
      "post": {
        "tags": [
          "billing"
        ],
        "operationId": "billing_portal",
        "responses": {
          "200": {
            "description": "A Billing Portal session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/subscription": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "get_billing",
        "responses": {
          "200": {
            "description": "Plan, subscription, credits, trial and automatic top-ups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStateDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/topup": {
      "post": {
        "tags": [
          "billing"
        ],
        "operationId": "billing_topup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A Stripe Checkout Session (mode=payment) for one top-up pack",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Not a pack on sale",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/billing/verify-card": {
      "post": {
        "tags": [
          "billing"
        ],
        "operationId": "billing_verify_card",
        "responses": {
          "200": {
            "description": "A Stripe Checkout Session (mode=setup): save a card, nothing charged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets": {
      "get": {
        "tags": [
          "storage"
        ],
        "operationId": "list_buckets",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "description": "Only this project's",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "From nextCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1–200 (50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's buckets that are not deleted, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_BucketDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "create_bucket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBucket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The bucket (its edge records written) and what it costs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketChange"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: name, quotaGib or corsRules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: the plan has no Object Storage (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded: buckets or the Object Storage pool (details.upgrade names the pack and the bigger plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: a bucket of that name exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the edge did not take it (nothing was created)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}": {
      "get": {
        "tags": [
          "storage"
        ],
        "operationId": "get_bucket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The bucket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "storage"
        ],
        "operationId": "delete_bucket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "deleting: refused at the edge at once, its keys revoked, its objects erased by a drain job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketChange"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "storage"
        ],
        "operationId": "update_bucket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBucket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The bucket and what the change costs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketChange"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded: the pool does not hold the new quota",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the bucket is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the edge did not take it (reverted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}/attach": {
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "attach_bucket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachBucketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The app's S3_* variables set (sealed; no secret answered), the app restarting",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachBucketResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}/keys": {
      "get": {
        "tags": [
          "storage"
        ],
        "operationId": "list_bucket_keys",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Its keys and the owner's all-bucket keys (never a secret)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_BucketKeyDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "create_bucket_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBucketKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The key and its secret, shown this once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedBucketKey"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}/keys/{key}": {
      "delete": {
        "tags": [
          "storage"
        ],
        "operationId": "revoke_bucket_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Key id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked (refused at the edge within seconds)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketKeyDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}/keys/{key}/reveal": {
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "reveal_bucket_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Key id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The secret of a key an agent created, once, within the hour",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedBucketKey"
                }
              }
            }
          },
          "409": {
            "description": "conflict: shown before, or the hour has passed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/buckets/{id}/objects": {
      "get": {
        "tags": [
          "storage"
        ],
        "operationId": "list_bucket_objects",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "Only keys under it",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "description": "`/`: one folder level",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "From nextCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1–1000 (200)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of objects and folders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BucketObjectsPage"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "presign_bucket_object",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bucket id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresignObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A short-lived URL for one upload, download or delete straight at the S3 endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresignedObject"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the upload does not fit what the bucket has left",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/builder/options": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "get_builder_options",
        "responses": {
          "200": {
            "description": "The models and effort levels this person's next session may use, the policy's default and their own (no session)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/builder/preferences": {
      "patch": {
        "tags": [
          "projects"
        ],
        "operationId": "patch_builder_preferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBuilderPreferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The person's default for new sessions, saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a model or effort level not offered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: the plan does not reach it on Fullsea's key (`details.upgrade`, reason `plan_required`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/capacity-requests": {
      "post": {
        "tags": [
          "enterprise"
        ],
        "operationId": "post_capacity_request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCapacityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Recorded (signed out, no team) with its support ticket; a honeypot hit gets the same answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapacityRequestAccepted"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: per address (the abuse report's limit) and per contact address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "tags": [
          "catalog"
        ],
        "operationId": "get_catalog",
        "responses": {
          "200": {
            "description": "Sizes, engines, runtimes and plans",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compose/import": {
      "post": {
        "tags": [
          "workbench"
        ],
        "operationId": "compose_import",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "One stack in a new project; its apps deploy once its databases are available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StackWithOperation"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed (as for the preview, or nothing to create)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: Free does not publish (`details.upgrade`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "plan_restricted or quota_exceeded: what the whole import needs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compose/preview": {
      "post": {
        "tags": [
          "workbench"
        ],
        "operationId": "compose_preview",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "What an import creates (apps, managed databases, volumes, the order), what is skipped or not carried over and why, and whether the plan holds it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComposePreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: `yaml` (not valid, no services, a depends_on cycle), `gitUrl`, `gitRef` or `env`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/connected-agents": {
      "get": {
        "tags": [
          "oauth"
        ],
        "operationId": "list_connected_agents",
        "responses": {
          "200": {
            "description": "Agents connected with OAuth, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectedAgentDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/connected-agents/{id}": {
      "delete": {
        "tags": [
          "oauth"
        ],
        "operationId": "revoke_connected_agent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The connection (grant) id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Disconnected: every token of the connection stops working"
          },
          "404": {
            "description": "Not one of the caller's",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/copilot/options": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "get_copilot_options",
        "responses": {
          "200": {
            "description": "The account co-pilot's models, effort levels and current choice",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/copilot/preferences": {
      "patch": {
        "tags": [
          "projects"
        ],
        "operationId": "patch_copilot_preferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBuilderPreferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved for the co-pilot session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/credits": {
      "get": {
        "tags": [
          "credits"
        ],
        "operationId": "get_credits",
        "parameters": [
          {
            "name": "bucket",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CreditBucket"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CreditKind"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance (both buckets, reserved, available) and one page of the ledger with running balances, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/csrf": {
      "get": {
        "tags": [
          "identity"
        ],
        "operationId": "get_csrf",
        "responses": {
          "200": {
            "description": "The CSRF token of the cookie session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsrfDto"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases": {
      "get": {
        "tags": [
          "databases"
        ],
        "operationId": "list_databases",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Databases",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_DatabaseDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "databases"
        ],
        "operationId": "create_database",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabase"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created and provisioning",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseWithOperation"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded or plan_restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}": {
      "get": {
        "tags": [
          "databases"
        ],
        "operationId": "get_database",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The database",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "databases"
        ],
        "operationId": "delete_database",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Deletion started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/advice": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "database_advice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The database's advice (`null` before the first reading)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/AdvisorFindingDto"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/credentials": {
      "get": {
        "tags": [
          "databases"
        ],
        "operationId": "database_credentials",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseCredentials"
                }
              }
            }
          },
          "409": {
            "description": "Not available yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_overview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schemas and tables with row estimates and sizes, or the key count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataOverviewDto"
                }
              }
            }
          },
          "409": {
            "description": "The database is not available (yet)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/cell": {
      "post": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_cell",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CellRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "One value in full (up to 1 MiB)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CellValueDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/export": {
      "post": {
        "tags": [
          "databases"
        ],
        "operationId": "export_database_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "The export queued for the worker: its operation and running card; the file comes with GET /api/v1/artifacts/transfers/{operationId} once it succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportStarted"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: not one read-only query, an unsafe table name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the database is not available, or the team keeps no more files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/key": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_key",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One key with a preview of its value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyValueDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/keys": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_keys",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "query",
            "description": "A `SCAN … MATCH` glob (default `*`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The cursor of the previous page (`0` or absent: the start).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Keys to look at per page (10 to 1000, default 200).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One SCAN page with each key's type, TTL, size and length (Redis, Valkey)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeysDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/rows": {
      "post": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_rows",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RowsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "One page of rows, sorted and filtered on the server in a read-only session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RowsDto"
                }
              }
            }
          },
          "400": {
            "description": "An unknown column, a json sort, or the engine's own error for a filter value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/data/structure": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "data_structure",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schema",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Columns (typed), indexes and constraints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TableStructureDto"
                }
              }
            }
          },
          "404": {
            "description": "No such table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/health": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "database_health",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connections and cache hit ratio from the engine, memory, restarts and the disk with its 'full in ~N days' forecast",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseHealthDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/pitr": {
      "get": {
        "tags": [
          "databases"
        ],
        "operationId": "database_pitr",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the database is archived continuously and its restorable window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PitrOverview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/pitr/restore": {
      "post": {
        "tags": [
          "databases"
        ],
        "operationId": "restore_database_to_point",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreToPoint"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "A new database is being filled with the data as it was at `at` (operation restore_point_in_time)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PitrRestore"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: `at` outside the restorable window, or a bad name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "plan_restricted or quota_exceeded (the new database)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Not archived continuously, or a restore already running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/databases/{id}/resize": {
      "get": {
        "tags": [
          "databases"
        ],
        "operationId": "database_resize_options",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What the database may be resized to now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseResizeOptions"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "databases"
        ],
        "operationId": "resize_database",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Database id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResizeDatabase"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Nothing to change (operation null)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseUpdate"
                }
              }
            }
          },
          "202": {
            "description": "Resize queued (operation resize_database)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseUpdate"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: no field, storage smaller than now or over 1024 GiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "plan_restricted or quota_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Not available, busy, or the storage class cannot grow volumes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "no_capacity on the node holding the volume, or the cluster unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "tags": [
          "events"
        ],
        "operationId": "entity_events",
        "responses": {
          "200": {
            "description": "Server-Sent Events: `event: entity` with an EntityEventDto per change of the caller's resources, `event: resync` after the server reconnected to the database, `: ping` comments every 15 s. The stream ends after 30 minutes or when the session does; reconnect.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/EntityEventDto"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many open streams for this person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/github": {
      "get": {
        "tags": [
          "github"
        ],
        "operationId": "github_overview",
        "responses": {
          "200": {
            "description": "Whether GitHub sign-in and the App are configured, the connected installations and the caller's Git apps on GitHub",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubIntegrationDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/github/install": {
      "post": {
        "tags": [
          "github"
        ],
        "operationId": "github_install",
        "responses": {
          "200": {
            "description": "The App's install page on GitHub; sets the `fs_github_state` cookie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubRedirect"
                }
              }
            }
          },
          "503": {
            "description": "The App is not configured on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/github/installations/{id}": {
      "delete": {
        "tags": [
          "github"
        ],
        "operationId": "github_forget_installation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The connected installation's id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fullsea forgot the installation (it stays installed on GitHub)"
          }
        }
      }
    },
    "/api/v1/integrations/github/repos": {
      "get": {
        "tags": [
          "github"
        ],
        "operationId": "github_repositories",
        "parameters": [
          {
            "name": "installationId",
            "in": "query",
            "description": "One installation; every connected installation when absent.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repositories the connected installations reach, most recently pushed first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubRepositoriesDto"
                }
              }
            }
          },
          "503": {
            "description": "GitHub did not answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integrations/github/repos/{owner}/{repo}/branches": {
      "get": {
        "tags": [
          "github"
        ],
        "operationId": "github_branches",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "description": "Repository owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "description": "Repository name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "installationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The repository's branches (the first 100)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GithubBranchDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invitations/accept": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "accept_invitation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Joined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedInvitation"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with another address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Used, withdrawn or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invitations/decline": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "decline_invitation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Declined"
          }
        }
      }
    },
    "/api/v1/invitations/preview": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "preview_invitation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "What the emailed link offers (no sign-in needed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationPreviewDto"
                }
              }
            }
          },
          "404": {
            "description": "Unknown link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "identity"
        ],
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "The signed-in user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/health": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "monitoring_health",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every app's strip (or a project's)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HealthStripDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/issues": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "list_issues",
        "parameters": [
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppId"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Error groups (stack traces, error lines, 5xx bursts), most recently seen first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ErrorGroupDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/monitoring/issues/{id}": {
      "patch": {
        "tags": [
          "monitoring"
        ],
        "operationId": "update_issue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Issue id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIssue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resolved, ignored or open again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorGroupDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/oauth/authorize": {
      "get": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_consent",
        "parameters": [
          {
            "name": "response_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resource",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What the consent page shows the signed-in person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthConsentDto"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request: the request is refused (`details.redirectTo` when the person may be sent back to the client with the error)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "An API key: only the signed-in person connects agents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_decide",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Where the browser goes: the client's redirect URI with `code` and `state`, or `error=access_denied`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthRedirect"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request (as for GET)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/operations/{id}": {
      "get": {
        "tags": [
          "operations"
        ],
        "operationId": "get_operation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Operation id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/operations/{id}/events": {
      "get": {
        "tags": [
          "operations"
        ],
        "operationId": "operation_events",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Operation id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "waitMs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events after `after`, long-polled up to waitMs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationEvents"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/probes/{id}": {
      "delete": {
        "tags": [
          "monitoring"
        ],
        "operationId": "delete_probe",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Probe id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted with its rules (their incidents resolved)"
          }
        }
      },
      "patch": {
        "tags": [
          "monitoring"
        ],
        "operationId": "update_probe",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Probe id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The probe (a changed check starts over)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProbeDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/probes/{id}/check": {
      "post": {
        "tags": [
          "monitoring"
        ],
        "operationId": "check_probe",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Probe id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Checked now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProbeDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "list_projects",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1..=200, default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ProjectDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "projects"
        ],
        "operationId": "create_project",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "get_project",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDto"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/builder/options": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "get_project_builder_options",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project builder's models, effort levels and current choice",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/builder/preferences": {
      "patch": {
        "tags": [
          "projects"
        ],
        "operationId": "patch_project_builder_preferences",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBuilderPreferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved; a live agent switches between turns without a restart (the `session_config` event says what it runs on)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderOptionsDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a model or effort level not offered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: the plan does not reach it on Fullsea's key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/environments": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_project_environments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Staging and pull request previews, and the preview settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectEnvironmentsDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "edge"
        ],
        "operationId": "create_project_environment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEnvironment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "`staging`: a copy of every app in its own namespace, each deploying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentDto"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded: the copies do not fit the pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: staging exists, or the project has no app to copy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/environments/{environment}": {
      "delete": {
        "tags": [
          "edge"
        ],
        "operationId": "delete_project_environment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "description": "Environment id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Its copies are deleted, then its namespace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/files/download": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "download_project_file",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One workspace file as an attachment (nosniff)",
            "content": {
              "application/octet-stream": {}
            }
          },
          "400": {
            "description": "validation_failed: an unsafe or hidden path",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: larger than FULLSEA_WORKSPACE_DOWNLOAD_MAX_MIB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/github-sync": {
      "get": {
        "tags": [
          "github"
        ],
        "operationId": "get_github_sync",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Where the workspace was last pushed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubSyncStatus"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "github"
        ],
        "operationId": "post_github_sync",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GithubSyncRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The workspace is a commit on the branch (or nothing changed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubSyncResult"
                }
              }
            }
          },
          "409": {
            "description": "conflict: a push is under way, the branch moved, or (`details.reason = create_on_github`, `details.createUrl`) GitHub needs the person to create the repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/handover": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "offer_handover",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferHandover"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Offered: the link is emailed (7 days)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferDto"
                }
              }
            }
          },
          "409": {
            "description": "An offer is open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "teams"
        ],
        "operationId": "withdraw_handover",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Withdrawn"
          }
        }
      }
    },
    "/api/v1/projects/{id}/map": {
      "get": {
        "tags": [
          "workbench"
        ],
        "operationId": "project_map",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project's domains, apps, databases and volumes and what connects them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectMapDto"
                }
              }
            }
          },
          "404": {
            "description": "Not the caller's project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/monitoring": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "monitoring_board",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project's board: layout, strips, databases, status page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringBoardDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/monitoring/layout": {
      "put": {
        "tags": [
          "monitoring"
        ],
        "operationId": "put_board_layout",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BoardLayoutDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The layout made whole (each widget once)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardLayoutDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/preview": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "get_project_preview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project's private preview (`preview: null` until one was started)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectPreview"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/preview/open": {
      "get": {
        "tags": [
          "projects"
        ],
        "operationId": "open_project_preview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "The page to land on (default /)",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "To the preview host's one-time hand-off (`/__fullsea/handoff?token=…&to=…`, 60 s), which sets that host's own cookie and lands on `path`. Sessions only."
          },
          "401": {
            "description": "Not signed in (an HTML page)"
          },
          "404": {
            "description": "Not the caller's project (an HTML page)"
          }
        }
      }
    },
    "/api/v1/projects/{id}/preview/restart": {
      "post": {
        "tags": [
          "projects"
        ],
        "operationId": "restart_project_preview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Started again with its last command, port and path (`status: failed` with the exit code and the end of its output when the dev server did not come up)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewDto"
                }
              }
            }
          },
          "404": {
            "description": "No such project, or no preview yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the builder or the sandbox cannot be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/previews": {
      "put": {
        "tags": [
          "edge"
        ],
        "operationId": "put_project_previews",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutPreviewSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Pull request previews on or off, and the commit status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewSettingsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/routes": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "get_project_routes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project's route tables and the hostnames a new one may use",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRoutesDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "edge"
        ],
        "operationId": "create_project_routes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutRouteTable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A route table on the project's own address or a verified custom domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteTableDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a path, an app not of this project or listening on no port, another cluster, or a hostname the project does not hold",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the hostname has a table, or the project has five",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/routes/{route}": {
      "put": {
        "tags": [
          "edge"
        ],
        "operationId": "update_project_routes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "route",
            "in": "path",
            "description": "Route table id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutRouteTable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The table's paths replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteTableDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "edge"
        ],
        "operationId": "delete_project_routes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "route",
            "in": "path",
            "description": "Route table id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The hostname stops routing"
          }
        }
      }
    },
    "/api/v1/projects/{id}/status-page": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "get_status_page",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page and whether the plan includes one",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPageSettingsDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "monitoring"
        ],
        "operationId": "put_status_page",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutStatusPage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "On or off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPageSettingsDto"
                }
              }
            }
          },
          "402": {
            "description": "payment_required with details.upgrade: the plan has no public status page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the address is taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/transfer": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "transfer_project",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferProject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Every row of the project moved into the team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferredProject"
                }
              }
            }
          },
          "402": {
            "description": "The receiving team's plan cannot hold it; details.upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "A slug or hostname exists there, or a database is open to the outside",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/triage": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "get_triage_settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project's AI triage toggle and the account's monthly budget",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriageSettingsDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "advisor"
        ],
        "operationId": "put_triage_settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutTriageSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriageSettingsDto"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: AI triage comes with Pro (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}/uptime": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "project_uptime",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The uptime of the project's web apps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UptimeDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/secret-requests": {
      "get": {
        "tags": [
          "secrets"
        ],
        "operationId": "list_secret_requests",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "pending | fulfilled | declined | expired",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's requests, newest first (at most 100): key names, never values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_SecretRequestDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/secret-requests/{id}": {
      "get": {
        "tags": [
          "secrets"
        ],
        "operationId": "get_secret_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Secret request id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request: the app, the variables asked for and which it already has",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretRequestDto"
                }
              }
            }
          },
          "404": {
            "description": "Not the caller's",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/secret-requests/{id}/decline": {
      "post": {
        "tags": [
          "secrets"
        ],
        "operationId": "decline_secret_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Secret request id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Declined: the waiting agent is told so",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretRequestDto"
                }
              }
            }
          },
          "409": {
            "description": "No longer pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/secret-requests/{id}/fulfil": {
      "post": {
        "tags": [
          "secrets"
        ],
        "operationId": "fulfil_secret_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Secret request id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfilSecretRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Fulfilled: every asked key is set on the app (save the values with PATCH /apps/{id}/env first)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretRequestDto"
                }
              }
            }
          },
          "409": {
            "description": "A key is not set yet, or the request is no longer pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stacks": {
      "get": {
        "tags": [
          "templates"
        ],
        "operationId": "list_stacks",
        "parameters": [
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ProjectId"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's stacks, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_StackDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stacks/{id}": {
      "get": {
        "tags": [
          "templates"
        ],
        "operationId": "get_stack",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stack, its resources, hooks and outputs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StackDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "templates"
        ],
        "operationId": "delete_stack",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Every resource of the stack is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StackWithOperation"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stacks/{id}/managed-email": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "get_managed_email",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stack's managed email and today's usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedEmailDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "advisor"
        ],
        "operationId": "put_managed_email",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutManagedEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Saved; the stack's app is rolled out with the settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedEmailDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: the from address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: managed email comes with Starter (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the template cannot send through the relay, or a deploy runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stacks/{id}/outputs/reveal": {
      "post": {
        "tags": [
          "templates"
        ],
        "operationId": "reveal_stack_outputs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stack id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every output with its value, sensitive ones included",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StackOutputsDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/status/{slug}": {
      "get": {
        "tags": [
          "monitoring"
        ],
        "operationId": "public_status",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "The page's address",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public, cacheable (max-age 30 s): services, 90-day uptime and the last 14 days' incidents by name and time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicStatusDto"
                }
              }
            }
          },
          "404": {
            "description": "No such page (or it is off)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/storage": {
      "get": {
        "tags": [
          "storage"
        ],
        "operationId": "get_storage",
        "responses": {
          "200": {
            "description": "The Fast NVMe, Shared HDD and Object Storage pools (reserved and allowed, with packs), the bucket count and the S3 endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageOverviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/support/tickets": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "list_support_tickets",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "`open` (not resolved or closed), `done`, a status; empty: all",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "From nextCursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "1–200 (50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The team's tickets, newest activity first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_SupportTicketDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "create_support_ticket",
        "requestBody": {
          "description": "JSON, or `multipart/form-data` with the same fields plus `files` (at most 5, 10 MiB each: PNG, JPEG, GIF, WebP, PDF, text and log files, CSV, JSON, ZIP, gzip)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupportTicket"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Opened with the diagnostic snapshot; priority and first-response due time from the plan",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportTicketDetail"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: subject, body, category, resource or a file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: 20 tickets an hour per person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/support/tickets/{reference}": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "get_support_ticket",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket and its thread (never an internal note or a draft)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportTicketDetail"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such ticket in the team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/support/tickets/{reference}/attachments/{attachment}": {
      "get": {
        "tags": [
          "support"
        ],
        "operationId": "get_support_attachment",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "description": "Attachment id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file: images inline, anything else as a download (nosniff, a sandboxing CSP)"
          }
        }
      }
    },
    "/api/v1/support/tickets/{reference}/messages": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "post_support_message",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "JSON `{body}`, or `multipart/form-data` with `body` and `files`",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostSupportMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Added; the ticket is open again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportMessageDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/support/tickets/{reference}/status": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "set_support_status",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "Ticket id, `FS-1001` or `1001`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSupportStatus"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resolved, closed or reopened",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportTicketDto"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: a customer may set resolved, closed or open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams": {
      "get": {
        "tags": [
          "teams"
        ],
        "operationId": "list_teams",
        "responses": {
          "200": {
            "description": "The caller's teams (personal first) and the invitations and transfers addressed to them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamListDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "create_team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A new team owned by the caller, on Free",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSummaryDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the caller owns ten teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/{team}": {
      "get": {
        "tags": [
          "teams"
        ],
        "operationId": "get_team",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The team, its members, invitations, outgoing transfers, seats and what the caller may do",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "teams"
        ],
        "operationId": "delete_team",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteTeam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Members go at once; the purge deletes every resource and the team's rows"
          },
          "403": {
            "description": "Owners only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the personal team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "teams"
        ],
        "operationId": "rename_team",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTeam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Renamed (owners and admins)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSummaryDto"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the personal team keeps its name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/{team}/invitations": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "create_invitation",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Invited: the link is emailed (7 days)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDto"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: every seat is taken; details.upgrade seats one more",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: a member, or an open invitation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/{team}/invitations/{id}": {
      "delete": {
        "tags": [
          "teams"
        ],
        "operationId": "revoke_invitation",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Invitation id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Withdrawn: the seat frees"
          }
        }
      }
    },
    "/api/v1/teams/{team}/invitations/{id}/resend": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "resend_invitation",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Invitation id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A new link, 7 more days",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/{team}/leave": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "leave_team",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Left"
          },
          "409": {
            "description": "conflict: the last owner of a team with others, or the personal team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/{team}/members/{user}": {
      "delete": {
        "tags": [
          "teams"
        ],
        "operationId": "remove_member",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user",
            "in": "path",
            "description": "User id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed: their access ends at once"
          }
        }
      },
      "patch": {
        "tags": [
          "teams"
        ],
        "operationId": "set_member_role",
        "parameters": [
          {
            "name": "team",
            "in": "path",
            "description": "Team id or slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user",
            "in": "path",
            "description": "User id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMember"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The member's new role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            }
          },
          "403": {
            "description": "An admin cannot grant owner or touch an owner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: the last owner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates": {
      "get": {
        "tags": [
          "templates"
        ],
        "operationId": "list_templates",
        "responses": {
          "200": {
            "description": "The template gallery (public: no session or key needed)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateSummaryDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{code}": {
      "get": {
        "tags": [
          "templates"
        ],
        "operationId": "get_template",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "Template code (wordpress, n8n, …)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template with its deploy form (public)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDto"
                }
              }
            }
          },
          "404": {
            "description": "No such template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{code}/deploy": {
      "post": {
        "tags": [
          "templates"
        ],
        "operationId": "deploy_template",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "Template code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployTemplate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Every resource created in one transaction; the stack deploys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StackWithOperation"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed (name, projectId, inputs.<name>)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded (what the whole stack needs) or plan_restricted (names the plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfers/accept": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "accept_transfer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptTransfer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The project moved into a team the caller owns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferredProject"
                }
              }
            }
          },
          "402": {
            "description": "That team's plan cannot hold it; details.upgrade",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with another address, or not an owner of the team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfers/decline": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "decline_transfer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Declined"
          }
        }
      }
    },
    "/api/v1/transfers/preview": {
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "preview_transfer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "What the emailed link offers (no sign-in needed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferPreviewDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage-actions/{id}/apply": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "apply_triage_action",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Action id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Applied through the normal path; its operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppliedTriageAction"
                }
              }
            }
          },
          "402": {
            "description": "payment_required: the size is not in the plan (details.upgrade)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: decided already, or the resource cannot take it now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage-actions/{id}/dismiss": {
      "post": {
        "tags": [
          "advisor"
        ],
        "operationId": "dismiss_triage_action",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Action id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriageActionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triages": {
      "get": {
        "tags": [
          "advisor"
        ],
        "operationId": "list_triages",
        "responses": {
          "200": {
            "description": "The account's 50 newest investigations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TriageDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/uploads": {
      "post": {
        "tags": [
          "uploads"
        ],
        "operationId": "prepare_upload",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareUpload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A presigned PUT (10 minutes, 100 MiB) and the command that packs and uploads the current directory; then `POST /api/v1/apps` or `…/deploy` with `source: {kind: \"upload\", uploadId}`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparedUpload"
                }
              }
            }
          },
          "404": {
            "description": "not_found: the app or project is not the caller's",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: 20 uploads already wait to be deployed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "provider_unavailable: the object store cannot hand out upload links",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "tags": [
          "catalog"
        ],
        "operationId": "get_usage",
        "responses": {
          "200": {
            "description": "Plan limits, usage and AI credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/volumes/{id}/files": {
      "get": {
        "tags": [
          "artifacts"
        ],
        "operationId": "list_volume_files",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "Relative to the volume's root; empty for the root.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One folder of the volume (at most 500 entries, folders first)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeListing"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such volume or folder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/volumes/{id}/files/export": {
      "post": {
        "tags": [
          "artifacts"
        ],
        "operationId": "export_volume_file",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VolumePathQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "A file, or a folder as .tar.gz, as an artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such file or folder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/volumes/{id}/mounts": {
      "post": {
        "tags": [
          "workloads"
        ],
        "operationId": "add_volume_mount",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddVolumeMount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Mounted: the volume with every mount, and the app's config release",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeWithOperation"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: mountPath",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such volume or app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "conflict: a Fast Local NVMe volume already mounted elsewhere, another cluster, already mounted there or at that path, a database's image, five volumes already, a deploy under way",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/volumes/{id}/mounts/{appId}": {
      "delete": {
        "tags": [
          "workloads"
        ],
        "operationId": "remove_volume_mount",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appId",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unmounted (files kept; the oldest other mount becomes the first), and the app's config release",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeWithOperation"
                }
              }
            }
          },
          "404": {
            "description": "The app does not mount it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/volumes/{id}/resize": {
      "get": {
        "tags": [
          "workloads"
        ],
        "operationId": "volume_resize_options",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "How far the volume may grow, or why it cannot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeResizeOptions"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "workloads"
        ],
        "operationId": "resize_volume",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Volume id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResizeVolume"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Already that size (operation null)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeWithOperation"
                }
              }
            }
          },
          "202": {
            "description": "Growth queued (operation resize_volume)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeWithOperation"
                }
              }
            }
          },
          "400": {
            "description": "validation_failed: smaller than now, or over 500 GiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "quota_exceeded: the plan's storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Being deleted, busy, or a storage class that cannot grow a volume holding data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "no_capacity on the cluster, or the cluster unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/email-inbound/{secret}": {
      "post": {
        "tags": [
          "support"
        ],
        "operationId": "email_inbound_webhook",
        "parameters": [
          {
            "name": "secret",
            "in": "path",
            "description": "FULLSEA_SUPPORT_INBOUND_SECRET",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Twilio-Email-Event-Webhook-Signature",
            "in": "header",
            "description": "base64 ECDSA P-256 signature of the timestamp and the raw body (required with FULLSEA_SUPPORT_INBOUND_PUBLIC_KEY)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "X-Twilio-Email-Event-Webhook-Timestamp",
            "in": "header",
            "description": "Signed with the body",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "description": "SendGrid Inbound Parse's parsed form (from, to, cc, subject, text, html, headers, envelope, SPF, dkim, spam_score, charsets, attachment-info, attachment1…n)",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "threaded, opened or ignored (with the reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundEmailResult"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: a missing or bad signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such route (wrong or no secret)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/github": {
      "post": {
        "tags": [
          "github"
        ],
        "operationId": "github_webhook",
        "responses": {
          "200": {
            "description": "Handled (or `duplicate`: this X-GitHub-Delivery was handled before)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GithubWebhookAck"
                }
              }
            }
          },
          "401": {
            "description": "X-Hub-Signature-256 is missing or does not match the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "503": {
            "description": "The App is not configured on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/edge/gate/{id}": {
      "get": {
        "tags": [
          "edge"
        ],
        "operationId": "edge_gate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "App id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Let the request through (Traefik's forwardAuth reads the forwarded headers)"
          },
          "302": {
            "description": "The account lock: to the API's sign-in hand-off, or back to the page with the app's cookie"
          },
          "403": {
            "description": "A private app's page for someone else, or a used or expired hand-off"
          },
          "503": {
            "description": "The branded maintenance page (Retry-After: 300)"
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "tags": [
          "health"
        ],
        "operationId": "healthz",
        "responses": {
          "200": {
            "description": "The process is up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthDto"
                }
              }
            }
          }
        }
      }
    },
    "/internal/storage/usage": {
      "post": {
        "tags": [
          "storage"
        ],
        "operationId": "post_storage_usage",
        "parameters": [
          {
            "name": "X-Fullsea-Signature",
            "in": "header",
            "description": "sha256=<hex HMAC-SHA256 of the body with FULLSEA_EDGE_USAGE_SECRET>",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsageReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Applied (or applied before: the same id changes nothing)"
          },
          "400": {
            "description": "invalid_request: not a usage report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated: a bad signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/authorize": {
      "get": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_authorize",
        "parameters": [
          {
            "name": "response_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resource",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "To the consent page `<web>/oauth/consent?<the same query>`, or back to the client's redirect URI with `error` (PKCE S256 required, scope `mcp`, resource `<api>/mcp`)"
          }
        }
      }
    },
    "/oauth/register": {
      "post": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "RFC 7591: a public client (no secret)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_redirect_uri or invalid_client_metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Too many registrations from this address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/revoke": {
      "post": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_revoke",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RevokeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "RFC 7009: revoked (a refresh token ends its grant), or nothing to revoke"
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "tags": [
          "oauth"
        ],
        "operationId": "oauth_token",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An access token (1 h, audience `<api>/mcp`) and a new refresh token (30 days)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, invalid_grant (a reused code or refresh token also revokes its grant), invalid_scope, invalid_target or unsupported_grant_type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "invalid_client",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/readyz": {
      "get": {
        "tags": [
          "health"
        ],
        "operationId": "readyz",
        "responses": {
          "200": {
            "description": "Database reachable and schema current",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyDto"
                }
              }
            }
          },
          "503": {
            "description": "Not ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptTransfer": {
        "type": "object",
        "description": "`POST /api/v1/transfers/accept`",
        "required": [
          "token"
        ],
        "properties": {
          "keepSender": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamRole",
                "description": "Keep the person who sent the project as a member with this role (`null`: they lose access)."
              }
            ]
          },
          "teamId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamId",
                "description": "A team the caller owns (default: their personal team)."
              }
            ]
          },
          "token": {
            "type": "string"
          }
        }
      },
      "AcceptedInvitation": {
        "type": "object",
        "description": "`POST /api/v1/invitations/accept`: the team joined.",
        "required": [
          "team"
        ],
        "properties": {
          "team": {
            "$ref": "#/components/schemas/TeamSummaryDto"
          }
        }
      },
      "AccessMode": {
        "type": "string",
        "description": "`volumes.access_mode`: how many nodes may mount the claim at once.",
        "enum": [
          "Rwo",
          "Rwx"
        ]
      },
      "ActivateContract": {
        "type": "object",
        "description": "`POST …/contracts/{id}/activate`.",
        "properties": {
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` = the draft's start, else now."
          }
        }
      },
      "AddNode": {
        "type": "object",
        "description": "`POST /api/v1/admin/clusters/{id}/nodes`; `name` defaults to `<cluster>-agent-<n>`, `role` to `agent`.",
        "properties": {
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NodeRole"
              }
            ]
          },
          "sshUser": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AddVolumeMount": {
        "type": "object",
        "description": "`POST /api/v1/volumes/{id}/mounts`: a Shared App Disk mounted into one more app of the same owner and cluster\n(the app is redeployed with it).",
        "required": [
          "appId"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "mountPath": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default: the volume's own mount path."
          }
        }
      },
      "AddonAddsDto": {
        "type": "object",
        "description": "What one pack (or the packs held) adds to the plan's pool.",
        "required": [
          "cpuMillis",
          "memoryMib",
          "storageGib"
        ],
        "properties": {
          "cpuMillis": {
            "type": "integer",
            "format": "int64",
            "description": "Burst vCPU in millicores (what the plan's CPU pool counts)."
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "objectStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "The Object Storage pool."
          },
          "sharedStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "The Shared HDD pool."
          },
          "storageGib": {
            "type": "integer",
            "format": "int64",
            "description": "The Fast NVMe pool."
          }
        }
      },
      "AddonDto": {
        "type": "object",
        "description": "A pack of `config/plans.v1.json` (`CatalogDto.addons`).",
        "required": [
          "code",
          "name",
          "monthlyPriceUsd",
          "annualPriceUsd",
          "adds",
          "plans",
          "maxQuantity"
        ],
        "properties": {
          "adds": {
            "$ref": "#/components/schemas/AddonAddsDto"
          },
          "annualPriceUsd": {
            "type": "string",
            "description": "`\"200.00\"` a year (with an annual plan)."
          },
          "code": {
            "type": "string",
            "description": "`capacity_4g`, `storage_nvme_50g`, `storage_hdd_100g`, `storage_s3_100g`"
          },
          "maxQuantity": {
            "type": "integer",
            "format": "int32",
            "description": "The most one account may hold.",
            "minimum": 0
          },
          "monthlyPriceUsd": {
            "type": "string",
            "description": "`\"20.00\"` a month."
          },
          "name": {
            "type": "string"
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanCode"
            },
            "description": "The plans it is sold on."
          }
        }
      },
      "AddonHint": {
        "type": "object",
        "description": "Packs that make room on the plan held now: `UpgradeOffer.addon` of a `quota_exceeded` offer whose cheapest fit is\nmore packs rather than a bigger plan (`recommendedPlan` is then the plan held now), or of a storage pool's offer,\nwhich names both side by side (`recommendedPlan` the bigger plan, PLAN.md §18.ST3).",
        "required": [
          "code",
          "quantity",
          "added",
          "addedMonthlyUsd"
        ],
        "properties": {
          "added": {
            "type": "integer",
            "format": "int32",
            "description": "How many more than now.",
            "minimum": 0
          },
          "addedMonthlyUsd": {
            "type": "number",
            "format": "double",
            "description": "What the added packs cost a month, in dollars (`20`)."
          },
          "code": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "description": "The quantity to hold in all (the Billing page's stepper value).",
            "minimum": 0
          }
        }
      },
      "AddonLineDto": {
        "type": "object",
        "description": "One pack on `GET /api/v1/billing/addons`.",
        "required": [
          "addon",
          "quantity",
          "unitPriceCents",
          "purchasable"
        ],
        "properties": {
          "addon": {
            "$ref": "#/components/schemas/AddonDto"
          },
          "purchasable": {
            "type": "boolean",
            "description": "A Stripe price is configured for the interval, so it can be added."
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "description": "Held now.",
            "minimum": 0
          },
          "unitPriceCents": {
            "type": "integer",
            "format": "int64",
            "description": "One pack's price for one period of `interval`, in cents."
          }
        }
      },
      "AddonRevenueDto": {
        "type": "object",
        "description": "One add-on pack's share of recurring revenue.",
        "required": [
          "addonCode",
          "quantity",
          "mrrCents"
        ],
        "properties": {
          "addonCode": {
            "type": "string"
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "quantity": {
            "type": "integer",
            "format": "int64",
            "description": "Packs held on paying subscriptions."
          }
        }
      },
      "AddonsSummaryDto": {
        "type": "object",
        "description": "The packs counted in the person's limits (`Me.addons`, `UsageDto.addons`): `Entitlements` are the plan's plus\n`adds`.",
        "required": [
          "packs",
          "adds"
        ],
        "properties": {
          "adds": {
            "$ref": "#/components/schemas/AddonAddsDto"
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HeldAddonDto"
            },
            "description": "Held packs with a quantity above zero, by code."
          }
        }
      },
      "AdminAffiliateDto": {
        "type": "object",
        "description": "One partner in the admin's table and drawer.",
        "required": [
          "id",
          "userId",
          "userEmail",
          "code",
          "status",
          "payoutEmail",
          "payoutEmailVerified",
          "commissionBps",
          "minPayoutCents",
          "landing",
          "notes",
          "campaignSpendCents",
          "clicks",
          "signups",
          "paidReferrals",
          "referredMrrCents",
          "referredRevenueCents",
          "payableCents",
          "pendingCents",
          "paidCents",
          "flaggedReferrals",
          "createdAt"
        ],
        "properties": {
          "campaignSpendCents": {
            "type": "integer",
            "format": "int64"
          },
          "clicks": {
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "type": "string"
          },
          "commissionBps": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "flaggedReferrals": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "landing": {
            "$ref": "#/components/schemas/LandingConfigDto"
          },
          "minPayoutCents": {
            "type": "integer",
            "format": "int64"
          },
          "notes": {
            "type": "string"
          },
          "paidCents": {
            "type": "integer",
            "format": "int64"
          },
          "paidReferrals": {
            "type": "integer",
            "format": "int64"
          },
          "payableCents": {
            "type": "integer",
            "format": "int64"
          },
          "payoutEmail": {
            "type": "string"
          },
          "payoutEmailVerified": {
            "type": "boolean"
          },
          "pendingCents": {
            "type": "integer",
            "format": "int64"
          },
          "pendingPayoutEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "promoCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "promoCodeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurringMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` = lifetime"
          },
          "referredMrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Net commissionable revenue of this partner's referred teams over the last 30 days."
          },
          "referredRevenueCents": {
            "type": "integer",
            "format": "int64",
            "description": "All-time net commissionable revenue (with `campaignSpendCents`: the partner's ROI)."
          },
          "signups": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/AffiliateStatus"
          },
          "userEmail": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AdminAffiliatesOverviewDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/affiliates/overview`: the KPI strip.",
        "required": [
          "referredMrrCents",
          "activeAffiliates",
          "readyToPayCount",
          "readyToPayCents",
          "pendingCents",
          "flaggedReferrals"
        ],
        "properties": {
          "activeAffiliates": {
            "type": "integer",
            "format": "int64"
          },
          "flaggedReferrals": {
            "type": "integer",
            "format": "int64"
          },
          "pendingCents": {
            "type": "integer",
            "format": "int64"
          },
          "readyToPayCents": {
            "type": "integer",
            "format": "int64"
          },
          "readyToPayCount": {
            "type": "integer",
            "format": "int64",
            "description": "Affiliates a batch would pay now (active, confirmed PayPal address, payable ≥ their minimum)."
          },
          "referredMrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Net commissionable revenue of referred teams over the last 30 days."
          }
        }
      },
      "AdminApiKeyDto": {
        "type": "object",
        "description": "An API key: its name and prefix, never its secret.",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "createdBy",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "`fsk_…` and the first characters."
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AdminAppDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AppDto"
          },
          {
            "type": "object",
            "required": [
              "ownerEmail"
            ],
            "properties": {
              "ownerEmail": {
                "type": "string"
              }
            }
          }
        ],
        "description": "`GET /api/v1/admin/apps` items: `AppDto & {ownerEmail}`."
      },
      "AdminBadgesDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/badges`: the navigation's live counts.",
        "required": [
          "failedJobs",
          "openReports",
          "poolAlerts",
          "nodeAlerts",
          "pastDue",
          "attention"
        ],
        "properties": {
          "attention": {
            "type": "integer",
            "format": "int64",
            "description": "Every attention item."
          },
          "failedJobs": {
            "type": "integer",
            "format": "int64",
            "description": "`failed` and `dead` jobs."
          },
          "nodeAlerts": {
            "type": "integer",
            "format": "int64",
            "description": "Nodes not ready, or ready and under pressure."
          },
          "openReports": {
            "type": "integer",
            "format": "int64"
          },
          "overageAlerts": {
            "type": "integer",
            "format": "int64",
            "description": "Area OV: teams at 80 % of their overflow cap or more, or frozen."
          },
          "pastDue": {
            "type": "integer",
            "format": "int64"
          },
          "poolAlerts": {
            "type": "integer",
            "format": "int64",
            "description": "Enabled pool credentials cooling down or failing."
          },
          "support": {
            "$ref": "#/components/schemas/SupportQueueCounts",
            "description": "Area SD: the support desk's queue counts (the Support desk badge: red when anything is breached or due\nwithin the hour)."
          }
        }
      },
      "AdminBillingSubscriptionDto": {
        "type": "object",
        "description": "One row of `GET /api/v1/admin/billing/subscriptions`.",
        "required": [
          "id",
          "team",
          "subscription",
          "addons",
          "mrrCents",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamAddonDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Plan and packs while it pays (`active`, `past_due`); `0` otherwise."
          },
          "subscription": {
            "$ref": "#/components/schemas/SubscriptionDto"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AdminBriefDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/brief`: the executive overview in one read.",
        "required": [
          "counts",
          "revenue",
          "attention",
          "capacity",
          "movers",
          "generatedAt"
        ],
        "properties": {
          "attention": {
            "$ref": "#/components/schemas/AttentionQueueDto"
          },
          "capacity": {
            "$ref": "#/components/schemas/FleetCapacityDto"
          },
          "counts": {
            "$ref": "#/components/schemas/AdminOverview"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "movers": {
            "$ref": "#/components/schemas/TopMoversDto"
          },
          "revenue": {
            "$ref": "#/components/schemas/RevenueDto"
          },
          "support": {
            "$ref": "#/components/schemas/SupportQueueCounts",
            "description": "Area SD: the support desk's queue counts."
          }
        }
      },
      "AdminCapacityRequestDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CapacityRequestDto"
          },
          {
            "type": "object",
            "properties": {
              "assignedEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assignedTo": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UserId"
                  }
                ]
              },
              "contractId": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/EnterpriseContractId"
                  }
                ]
              },
              "teamId": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TeamId"
                  }
                ]
              },
              "teamName": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ],
        "description": "A capacity request in the admin's inbox."
      },
      "AdminCatalogEntry": {
        "type": "object",
        "required": [
          "code",
          "kind",
          "name",
          "status",
          "enabled"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/CatalogKind"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EngineStatus"
          }
        }
      },
      "AdminCommissionDto": {
        "type": "object",
        "description": "One ledger row as the admin sees it.",
        "required": [
          "id",
          "affiliateId",
          "code",
          "kind",
          "planLabel",
          "eligibleAmountCents",
          "commissionBps",
          "commissionCents",
          "status",
          "maturesAt",
          "createdAt"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "commissionBps": {
            "type": "integer",
            "format": "int32"
          },
          "commissionCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "eligibleAmountCents": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/CommissionKind"
          },
          "maturesAt": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payoutId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "planLabel": {
            "type": "string"
          },
          "referralId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "referredTeamId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reversedReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CommissionStatus"
          },
          "stripeChargeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "stripeInvoiceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "subId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AdminConnectedAgentDto": {
        "type": "object",
        "description": "An OAuth-connected agent (MCP OAuth 2.1).",
        "required": [
          "clientName",
          "userEmail",
          "scope",
          "createdAt"
        ],
        "properties": {
          "clientName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          }
        }
      },
      "AdminContractDetailDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/enterprise/contracts/{id}`.",
        "required": [
          "contract",
          "quote",
          "invoices",
          "requests",
          "ownerEmail"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/AdminContractDto"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractInvoiceDto"
            }
          },
          "ownerEmail": {
            "type": "string",
            "description": "The team's owner (who Stripe and the reminders write to)."
          },
          "quote": {
            "$ref": "#/components/schemas/ContractQuoteDto"
          },
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminCapacityRequestDto"
            }
          },
          "subscriptionStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "The team's plan subscription status (`null` = none)."
          }
        }
      },
      "AdminContractDto": {
        "type": "object",
        "description": "A contract as the admin sees it.",
        "required": [
          "id",
          "teamId",
          "teamName",
          "contractCode",
          "status",
          "billingMode",
          "billingInterval",
          "commitCents",
          "monthlyCents",
          "overrides",
          "slaTier",
          "notes",
          "termIntervals",
          "autoRenew",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "autoRenew": {
            "type": "boolean"
          },
          "billingInterval": {
            "type": "string"
          },
          "billingMode": {
            "type": "string"
          },
          "commitCents": {
            "type": "integer",
            "format": "int64"
          },
          "contractCode": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserId"
              }
            ]
          },
          "createdByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "dedicatedClusterId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClusterId"
              }
            ]
          },
          "dedicatedNodeLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "endsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/EnterpriseContractId"
          },
          "monthlyCents": {
            "type": "integer",
            "format": "int64",
            "description": "The commitment per month (MRR)."
          },
          "notes": {
            "type": "string"
          },
          "overrides": {
            "description": "The stored overrides (normalised)."
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "slaTier": {
            "$ref": "#/components/schemas/SlaTier"
          },
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "stripePriceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "stripeSubscriptionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamId": {
            "$ref": "#/components/schemas/TeamId"
          },
          "teamName": {
            "type": "string"
          },
          "termIntervals": {
            "type": "integer",
            "format": "int32",
            "description": "The term in billing intervals (used when no end date is set).",
            "minimum": 0
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AdminCreditAdjustment": {
        "type": "object",
        "description": "`POST /api/v1/admin/users/{id}/credits` → `CreditsDto`",
        "required": [
          "amountCents",
          "note"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64",
            "description": "Positive grants (into the purchased bucket, so it rolls over), negative takes away (allowance first)."
          },
          "note": {
            "type": "string"
          }
        }
      },
      "AdminDatabaseDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseDto"
          },
          {
            "type": "object",
            "required": [
              "ownerEmail"
            ],
            "properties": {
              "ownerEmail": {
                "type": "string"
              }
            }
          }
        ],
        "description": "`GET /api/v1/admin/databases` items: `DatabaseDto & {ownerEmail}`."
      },
      "AdminInvitationDto": {
        "type": "object",
        "required": [
          "email",
          "role",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          }
        }
      },
      "AdminManagedEmailDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/managed-email`",
        "required": [
          "relayEnabled",
          "senders"
        ],
        "properties": {
          "relayEnabled": {
            "type": "boolean",
            "description": "The platform switch: off pauses every stack's sending."
          },
          "senders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminSenderDto"
            }
          }
        }
      },
      "AdminMcpOverview": {
        "type": "object",
        "description": "`GET /api/v1/admin/mcp`: what the settings page shows to connect an agent.",
        "required": [
          "endpoint",
          "enabled",
          "globalAllowedCidrs",
          "scopes",
          "maxTtlDays",
          "tools",
          "tokens"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The kill switch (`adminMcpEnabled` of `/api/v1/admin/settings`)."
          },
          "endpoint": {
            "type": "string",
            "description": "`<public URL>/admin/mcp`."
          },
          "globalAllowedCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`FULLSEA_ADMIN_MCP_ALLOWED_CIDRS`: every call must come from one of them (empty: any)."
          },
          "maxTtlDays": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminMcpTokenDto"
            },
            "description": "Every admin's tokens, live and recently ended, newest first."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AdminMcpTokenDto": {
        "type": "object",
        "description": "One `fsadm_` admin token (never its secret).",
        "required": [
          "id",
          "label",
          "tokenPrefix",
          "scopes",
          "allowedCidrs",
          "status",
          "expiresAt",
          "createdAt",
          "adminUserId",
          "adminEmail"
        ],
        "properties": {
          "adminEmail": {
            "type": "string"
          },
          "adminUserId": {
            "$ref": "#/components/schemas/UserId",
            "description": "The admin it acts as."
          },
          "allowedCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Canonical CIDRs; empty: any address the global allowlist lets through."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/AdminMcpTokenId"
          },
          "label": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastUsedIp": {
            "type": [
              "string",
              "null"
            ]
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`admin:read`, `admin:ops`, `admin:billing`, `admin:infra`."
          },
          "status": {
            "$ref": "#/components/schemas/AdminMcpTokenStatus"
          },
          "tokenPrefix": {
            "type": "string",
            "description": "`fsadm_` + 8 characters."
          }
        }
      },
      "AdminMcpTokenId": {
        "type": "string",
        "format": "uuid",
        "description": "`admin_mcp_tokens.id`"
      },
      "AdminMcpTokenStatus": {
        "type": "string",
        "description": "Whether a token still opens the endpoint.",
        "enum": [
          "active",
          "expired",
          "revoked"
        ]
      },
      "AdminMemberDto": {
        "type": "object",
        "required": [
          "userId",
          "email",
          "role",
          "status",
          "platformRole",
          "joinedAt"
        ],
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "platformRole": {
            "$ref": "#/components/schemas/UserRole"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatus"
          },
          "userId": {
            "$ref": "#/components/schemas/UserId"
          }
        }
      },
      "AdminMessageKind": {
        "type": "string",
        "enum": [
          "reply",
          "note"
        ]
      },
      "AdminModelPolicyDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/builder-models`, and the answer of `PUT` and `POST …/revert`: the model policy in force, the\ncommitted file, the override and its history.",
        "required": [
          "revision",
          "overridden",
          "file",
          "effective",
          "preview",
          "history"
        ],
        "properties": {
          "effective": {
            "$ref": "#/components/schemas/ModelsPolicy",
            "description": "The file with the override: what every options read and every builder turn uses."
          },
          "file": {
            "$ref": "#/components/schemas/ModelsPolicy",
            "description": "The committed file (`config/builder_models.v1.json`, or `FULLSEA_BUILDER_MODELS_FILE`) as loaded."
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelPolicyRevisionDto"
            },
            "description": "The newest revisions (at most 20), newest first."
          },
          "overridden": {
            "type": "boolean",
            "description": "An override is in force (else the committed file alone)."
          },
          "override": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PolicyOverride",
                "description": "What differs from the file; `null`: the file alone."
              }
            ]
          },
          "preview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanModelsDto"
            },
            "description": "Per plan, what its turns on Fullsea's key may use under `effective`, the cheapest plan first."
          },
          "problem": {
            "type": [
              "string",
              "null"
            ],
            "description": "The stored override does not fit the file in full (a deploy changed the file): what was left out, or why the\nfile alone is in force."
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "description": "The revision in force (`0`: none was ever saved); a change names it as `baseRevision`."
          }
        }
      },
      "AdminOverageChargeDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OverageChargeDto"
          },
          {
            "type": "object",
            "required": [
              "team"
            ],
            "properties": {
              "team": {
                "$ref": "#/components/schemas/TeamRefDto"
              }
            }
          }
        ],
        "description": "One settlement of any team (`GET /api/v1/admin/overage/charges`)."
      },
      "AdminOverview": {
        "type": "object",
        "description": "`GET /api/v1/admin/overview` — capacity and allocated are across active clusters.",
        "required": [
          "users",
          "activeSubscriptions",
          "apps",
          "databases",
          "clusters",
          "nodesReady",
          "nodesTotal",
          "capacity",
          "allocated",
          "jobsQueued",
          "jobsFailed"
        ],
        "properties": {
          "activeSubscriptions": {
            "type": "integer",
            "format": "int64"
          },
          "allocated": {
            "$ref": "#/components/schemas/Capacity"
          },
          "apps": {
            "type": "integer",
            "format": "int64"
          },
          "capacity": {
            "$ref": "#/components/schemas/Capacity"
          },
          "clusters": {
            "type": "integer",
            "format": "int64"
          },
          "databases": {
            "type": "integer",
            "format": "int64"
          },
          "jobsFailed": {
            "type": "integer",
            "format": "int64"
          },
          "jobsQueued": {
            "type": "integer",
            "format": "int64"
          },
          "nodesReady": {
            "type": "integer",
            "format": "int64"
          },
          "nodesTotal": {
            "type": "integer",
            "format": "int64"
          },
          "users": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AdminPaymentDto": {
        "type": "object",
        "description": "A payment as the admin sees it.",
        "required": [
          "id",
          "team",
          "kind",
          "status",
          "amountCents",
          "currency",
          "description",
          "createdAt"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "creditCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "failureMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/PaymentKind"
          },
          "planCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "stripeInvoiceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          }
        }
      },
      "AdminPayoutDto": {
        "type": "object",
        "required": [
          "id",
          "batchId",
          "batchCode",
          "affiliateId",
          "code",
          "payoutEmail",
          "amountCents",
          "currency",
          "status",
          "createdAt"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "batchCode": {
            "type": "string"
          },
          "batchId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payoutEmail": {
            "type": "string"
          },
          "paypalTransactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PayoutStatus"
          }
        }
      },
      "AdminPostSupportMessage": {
        "type": "object",
        "description": "`POST /api/v1/admin/support/tickets/{ref}/messages`",
        "required": [
          "body",
          "kind"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AdminMessageKind",
            "description": "`reply` (to the customer, by email too) | `note` (staff only)"
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketStatus",
                "description": "The status after a reply (default `waiting_on_customer`)."
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "AdminReferralDto": {
        "type": "object",
        "description": "One referral as the admin sees it (the referred person's address is shown to admins only).",
        "required": [
          "id",
          "affiliateId",
          "code",
          "referredTeamId",
          "referredUserId",
          "referredEmail",
          "attributionSource",
          "status",
          "createdAt"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "attributionSource": {
            "$ref": "#/components/schemas/AttributionSource"
          },
          "code": {
            "type": "string"
          },
          "commissionExpiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "firstPaidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fraudReason": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FraudReason"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "referredEmail": {
            "type": "string"
          },
          "referredTeamId": {
            "type": "string",
            "format": "uuid"
          },
          "referredUserId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/ReferralStatus"
          },
          "subId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AdminResourceDto": {
        "type": "object",
        "description": "One live resource, any kind, with its team.",
        "required": [
          "kind",
          "id",
          "name",
          "status",
          "team",
          "createdAt"
        ],
        "properties": {
          "clusterName": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "A database's engine and version; an app's runtime or source kind."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/AdminResourceKind"
          },
          "name": {
            "type": "string"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "projectName": {
            "type": [
              "string",
              "null"
            ]
          },
          "quotaBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app or database size, the template of a stack, the volume tier."
          },
          "status": {
            "type": "string"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "storageGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "An app's public URL; a domain's app."
          },
          "usedBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "A bucket's stored bytes, a shared volume's measured use."
          }
        }
      },
      "AdminResourceKind": {
        "type": "string",
        "description": "The kinds the Workloads (apps, stacks, domains) and Data & Storage (databases, volumes, buckets) hubs list.",
        "enum": [
          "app",
          "stack",
          "domain",
          "database",
          "volume",
          "bucket"
        ]
      },
      "AdminSenderDto": {
        "type": "object",
        "description": "One sender in /admin.",
        "required": [
          "stackId",
          "stackName",
          "userId",
          "userEmail",
          "enabled",
          "status",
          "fromAddress",
          "sentToday",
          "refusedToday",
          "bouncedToday",
          "complaintsToday",
          "updatedAt"
        ],
        "properties": {
          "bouncedToday": {
            "type": "integer",
            "format": "int64"
          },
          "complaintsToday": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "fromAddress": {
            "type": "string"
          },
          "refusedToday": {
            "type": "integer",
            "format": "int64"
          },
          "sentToday": {
            "type": "integer",
            "format": "int64"
          },
          "stackId": {
            "$ref": "#/components/schemas/StackId"
          },
          "stackName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ManagedEmailStatus"
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "userEmail": {
            "type": "string"
          },
          "userId": {
            "$ref": "#/components/schemas/UserId",
            "description": "Who answers for the sending team (its first owner) and their address."
          }
        }
      },
      "AdminSubscriptionDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SubscriptionDto"
          },
          {
            "type": "object",
            "required": [
              "userId",
              "email",
              "createdAt"
            ],
            "properties": {
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "email": {
                "type": "string"
              },
              "userId": {
                "$ref": "#/components/schemas/UserId"
              }
            }
          }
        ],
        "description": "`SubscriptionDto & {userId, email, createdAt}`."
      },
      "AdminSupportTicketDetail": {
        "type": "object",
        "description": "A ticket with everything operators see.",
        "required": [
          "ticket",
          "messages",
          "customer",
          "replyTo"
        ],
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SupportCustomerDto"
          },
          "diagnostics": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SupportDiagnosticsDto"
              }
            ]
          },
          "draft": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SupportMessageDto",
                "description": "The `ai_draft` waiting to be sent, if any (also in `messages`)."
              }
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportMessageDto"
            },
            "description": "Every message, internal notes and the `ai_draft` included."
          },
          "replyTo": {
            "type": "string"
          },
          "ticket": {
            "$ref": "#/components/schemas/AdminSupportTicketDto"
          }
        }
      },
      "AdminSupportTicketDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SupportTicketDto"
          },
          {
            "type": "object",
            "required": [
              "requesterEmail",
              "sla",
              "hasDraft"
            ],
            "properties": {
              "assignee": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SupportStaffDto"
                  }
                ]
              },
              "hasDraft": {
                "type": "boolean",
                "description": "A staff-only `ai_draft` waits to be sent."
              },
              "planCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The team's plan code (`None` for a guest)."
              },
              "requesterEmail": {
                "type": "string"
              },
              "sla": {
                "$ref": "#/components/schemas/SupportSlaDto"
              },
              "teamId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "teamName": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ],
        "description": "A ticket in the operators' queue."
      },
      "AdminTeamDossierDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/teams/{id}`: the Team 360° header and its Overview & Billing tab.",
        "required": [
          "team",
          "addons",
          "cardOnFile",
          "credits",
          "aiSpend30dCents",
          "allocated",
          "limits",
          "payments",
          "creditEntries",
          "suspension",
          "attention"
        ],
        "properties": {
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamAddonDto"
            }
          },
          "aiSpend30dCents": {
            "type": "integer",
            "format": "int64",
            "description": "AI credit the team's builder turns spent in the last 30 days, cents."
          },
          "allocated": {
            "$ref": "#/components/schemas/Capacity"
          },
          "attention": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttentionItemDto"
            },
            "description": "The queue's items about this team."
          },
          "cardOnFile": {
            "type": "boolean"
          },
          "creditEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditEntryDto"
            }
          },
          "creditSources": {
            "$ref": "#/components/schemas/CreditSourcesDto",
            "description": "What `credits.purchasedCents` (the credit that rolls over) is made of: it is not all bought."
          },
          "credits": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "enterprise": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamEnterpriseDto",
                "description": "The team's enterprise contract (area EN), `null` without one."
              }
            ]
          },
          "limits": {
            "$ref": "#/components/schemas/Capacity"
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminPaymentDto"
            }
          },
          "stripeCustomerId": {
            "type": [
              "string",
              "null"
            ],
            "description": "`cus_…` (an identifier, not a secret)."
          },
          "subscription": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionDto"
              }
            ]
          },
          "suspension": {
            "$ref": "#/components/schemas/SuspensionDto",
            "description": "The owner's kill-switch record (suspending a team suspends its owner)."
          },
          "team": {
            "$ref": "#/components/schemas/AdminTeamDto"
          }
        }
      },
      "AdminTeamDto": {
        "type": "object",
        "description": "One row of `GET /api/v1/admin/teams`.",
        "required": [
          "team",
          "planCode",
          "mrrCents",
          "members",
          "apps",
          "databases",
          "suspended",
          "createdAt"
        ],
        "properties": {
          "apps": {
            "type": "integer",
            "format": "int64"
          },
          "contractCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The code of the team's contract in force (`ENT-2026-0001`)."
          },
          "contractMrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Of it, the contract's commitment, monthly-normalised (area EN)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "databases": {
            "type": "integer",
            "format": "int64"
          },
          "interval": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BillingInterval"
              }
            ]
          },
          "members": {
            "type": "integer",
            "format": "int64"
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "The team's recurring revenue: the plan and packs while it pays, plus an enterprise contract in force."
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode",
            "description": "The plan the newest `active|trialing|past_due` subscription sets; `free` without one."
          },
          "subscriptionStatus": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            ]
          },
          "suspended": {
            "type": "boolean",
            "description": "The owner is suspended (the kill-switch), so the team is."
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          }
        }
      },
      "AdminTeamMembersDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/teams/{id}/members`: members and keys (prefixes only, no secret).",
        "required": [
          "members",
          "invitations",
          "apiKeys",
          "mcpTokensActive",
          "connectedAgents"
        ],
        "properties": {
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminApiKeyDto"
            }
          },
          "connectedAgents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminConnectedAgentDto"
            }
          },
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminInvitationDto"
            }
          },
          "mcpTokenNewestAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "mcpTokensActive": {
            "type": "integer",
            "format": "int64",
            "description": "Builder MCP session tokens in force (they carry no prefix; only how many and the newest)."
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminMemberDto"
            }
          }
        }
      },
      "AdminUserDetail": {
        "type": "object",
        "description": "`GET /api/v1/admin/users/{id}`",
        "required": [
          "user",
          "apps",
          "databases",
          "allocations",
          "credits"
        ],
        "properties": {
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllocationDto"
            }
          },
          "apps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppDto"
            }
          },
          "credits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditEntryDto"
            }
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatabaseDto"
            }
          },
          "subscription": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionDto"
              }
            ]
          },
          "suspension": {
            "$ref": "#/components/schemas/SuspensionDto",
            "description": "The kill-switch's record and its newest `suspend_user` / `resume_user` operation."
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserTeamDto"
            },
            "description": "The teams the person belongs to, each a link to its Team 360° dossier (PLAN.md §21.AD)."
          },
          "user": {
            "$ref": "#/components/schemas/AdminUserDto"
          }
        }
      },
      "AdminUserDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserDto"
          },
          {
            "type": "object",
            "required": [
              "planCode",
              "apps",
              "databases",
              "allocated",
              "creditBalanceCents"
            ],
            "properties": {
              "allocated": {
                "$ref": "#/components/schemas/Capacity"
              },
              "apps": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "creditBalanceCents": {
                "type": "integer",
                "format": "int64"
              },
              "databases": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "planCode": {
                "$ref": "#/components/schemas/PlanCode"
              }
            }
          }
        ],
        "description": "`UserDto & {planCode, apps, databases, allocated, creditBalanceCents}`."
      },
      "AdvisorFindingDto": {
        "type": "object",
        "description": "One app's or database's advice.",
        "required": [
          "id",
          "resourceKind",
          "resourceId",
          "resourceName",
          "verdict",
          "currentSize",
          "freedMemoryMib",
          "monthlyValueCents",
          "inPlan",
          "stats",
          "computedAt"
        ],
        "properties": {
          "appliedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "confidence": {
            "type": [
              "string",
              "null"
            ],
            "description": "`low` | `medium` | `high`"
          },
          "currentSize": {
            "type": "string"
          },
          "dismissedUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Dismissed (\"Not now\") until then."
          },
          "freedMemoryMib": {
            "type": "integer",
            "format": "int64",
            "description": "Memory of the plan's pool that comes back (downsize, positive) or is needed (upsize, negative), replicas\ncounted."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "inPlan": {
            "type": "boolean",
            "description": "The plan has the target size; else `upgrade` names the plan that has it."
          },
          "monthlyValueCents": {
            "type": "integer",
            "format": "int64",
            "description": "What that memory is worth of the plan a month (cents): its share of the plan's pool times the price."
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AdvisorReasonDto"
              }
            ]
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "resourceKind": {
            "type": "string",
            "description": "`app` | `database`"
          },
          "resourceName": {
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/AdvisorStatsDto"
          },
          "targetSize": {
            "type": [
              "string",
              "null"
            ]
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer"
              }
            ]
          },
          "verdict": {
            "type": "string",
            "description": "`learning` (not enough data yet) | `fits` | `downsize` | `upsize`"
          }
        }
      },
      "AdvisorOverviewDto": {
        "type": "object",
        "description": "`GET /api/v1/advisor`",
        "required": [
          "summary",
          "findings"
        ],
        "properties": {
          "computedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvisorFindingDto"
            },
            "description": "Every app's and database's advice (dismissed ones included, with `dismissedUntil`)."
          },
          "summary": {
            "$ref": "#/components/schemas/AdvisorSummaryDto"
          }
        }
      },
      "AdvisorReasonDto": {
        "type": "object",
        "description": "Why a bigger size.",
        "required": [
          "kind"
        ],
        "properties": {
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "kind": {
            "type": "string",
            "description": "`oom_killed` | `memory_high` | `cpu_busy`"
          },
          "latencyP95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        }
      },
      "AdvisorStatsDto": {
        "type": "object",
        "description": "The week of figures a finding was read from (per pod).",
        "required": [
          "samples",
          "coverageHours",
          "memoryPeakMib",
          "memoryP95Mib",
          "memoryLimitMib",
          "cpuP95Millis",
          "cpuLimitMillis",
          "oomKills",
          "restarts",
          "replicas"
        ],
        "properties": {
          "coverageHours": {
            "type": "number",
            "format": "double"
          },
          "cpuLimitMillis": {
            "type": "integer",
            "format": "int64"
          },
          "cpuP95Millis": {
            "type": "number",
            "format": "double"
          },
          "latencyP95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "memoryLimitMib": {
            "type": "integer",
            "format": "int64"
          },
          "memoryP95Mib": {
            "type": "number",
            "format": "double"
          },
          "memoryPeakMib": {
            "type": "number",
            "format": "double"
          },
          "oomKills": {
            "type": "integer",
            "format": "int64"
          },
          "replicas": {
            "type": "integer",
            "format": "int64"
          },
          "restarts": {
            "type": "integer",
            "format": "int64"
          },
          "samples": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AdvisorSummaryDto": {
        "type": "object",
        "description": "The Billing summary: what the advice frees and asks for.",
        "required": [
          "freeableMemoryMib",
          "freeableValueCents",
          "downsizes",
          "upsizes",
          "learning",
          "planMemoryMib"
        ],
        "properties": {
          "downsizes": {
            "type": "integer",
            "format": "int64"
          },
          "freeableMemoryMib": {
            "type": "integer",
            "format": "int64",
            "description": "Memory the downsizes free (MiB) and its monthly value of the plan (cents)."
          },
          "freeableValueCents": {
            "type": "integer",
            "format": "int64"
          },
          "learning": {
            "type": "integer",
            "format": "int64",
            "description": "Resources still gathering a day of data."
          },
          "planMemoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "upsizes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AffiliateOverviewDto": {
        "type": "object",
        "description": "`GET /api/v1/affiliate`: the signed-in person's affiliate account, or `enrolled: false` and the terms.",
        "required": [
          "enrolled",
          "terms",
          "channels"
        ],
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelStatsDto"
            },
            "description": "Clicks, sign-ups and paid referrals per channel tag (`subId: null` = links without one), newest activity\nfirst."
          },
          "enrolled": {
            "type": "boolean"
          },
          "profile": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AffiliateProfileDto"
              }
            ]
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AffiliateStatsDto"
              }
            ]
          },
          "terms": {
            "$ref": "#/components/schemas/ProgramTermsDto"
          }
        }
      },
      "AffiliateProfileDto": {
        "type": "object",
        "required": [
          "code",
          "link",
          "refLink",
          "status",
          "payoutEmail",
          "payoutEmailVerified",
          "commissionBps",
          "minPayoutCents",
          "hasLandingPage",
          "createdAt"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "commissionBps": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasLandingPage": {
            "type": "boolean",
            "description": "An admin set up a co-branded `/go/<code>` page."
          },
          "link": {
            "type": "string",
            "description": "`https://fullsea.io/go/<code>`"
          },
          "minPayoutCents": {
            "type": "integer",
            "format": "int64"
          },
          "payoutEmail": {
            "type": "string"
          },
          "payoutEmailVerified": {
            "type": "boolean",
            "description": "Payouts wait until the PayPal address is confirmed."
          },
          "pendingPayoutEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "A change waiting for its confirmation link."
          },
          "promoCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Stripe promotion code linked to this affiliate, if any."
          },
          "recurringMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` = lifetime"
          },
          "refLink": {
            "type": "string",
            "description": "`https://fullsea.io/?ref=<code>`: append `&via=<channel>` to any page's address."
          },
          "status": {
            "$ref": "#/components/schemas/AffiliateStatus"
          }
        }
      },
      "AffiliateStatsDto": {
        "type": "object",
        "description": "Net cents (refunds and clawbacks taken off) and counts.",
        "required": [
          "payableCents",
          "pendingCents",
          "processingCents",
          "paidCents",
          "totalEarnedCents",
          "clicks",
          "signups",
          "paidReferrals"
        ],
        "properties": {
          "clicks": {
            "type": "integer",
            "format": "int64"
          },
          "paidCents": {
            "type": "integer",
            "format": "int64"
          },
          "paidReferrals": {
            "type": "integer",
            "format": "int64"
          },
          "payableCents": {
            "type": "integer",
            "format": "int64",
            "description": "Cleared and not in a payout yet."
          },
          "pendingCents": {
            "type": "integer",
            "format": "int64",
            "description": "Within the 30-day hold."
          },
          "processingCents": {
            "type": "integer",
            "format": "int64",
            "description": "In a payout that has not been paid yet."
          },
          "signups": {
            "type": "integer",
            "format": "int64"
          },
          "totalEarnedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Everything earned and not reversed."
          }
        }
      },
      "AffiliateStatus": {
        "type": "string",
        "description": "`affiliates.status`: only `active` affiliates earn and are paid; `closed` is an affiliate whose account was\ndeleted (the code stays taken, the ledger stays).",
        "enum": [
          "PendingApproval",
          "Active",
          "Paused",
          "Banned",
          "Closed"
        ]
      },
      "AgentCredentialDto": {
        "type": "object",
        "required": [
          "kind",
          "hint",
          "updatedAt"
        ],
        "properties": {
          "hint": {
            "type": "string",
            "description": "`\"…\" + last 4`"
          },
          "kind": {
            "$ref": "#/components/schemas/AgentCredentialKind"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentCredentialKind": {
        "type": "string",
        "description": "`agent_credentials.kind`: the environment variable the agent process receives (PLAN.md §2.1).",
        "enum": [
          "AnthropicApiKey",
          "ClaudeSubscriptionToken"
        ]
      },
      "AgentCredentialOptions": {
        "type": "object",
        "description": "The options part of `GET /api/v1/agent-credential`.",
        "required": [
          "subscriptionAllowed"
        ],
        "properties": {
          "subscriptionAllowed": {
            "type": "boolean"
          }
        }
      },
      "AgentCredentialState": {
        "type": "object",
        "description": "`GET /api/v1/agent-credential` → `{credential, subscriptionAllowed}`.",
        "required": [
          "subscriptionAllowed"
        ],
        "properties": {
          "credential": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCredentialDto"
              }
            ]
          },
          "subscriptionAllowed": {
            "type": "boolean",
            "description": "`FULLSEA_ALLOW_CLAUDE_SUBSCRIPTION`"
          }
        }
      },
      "AgentPoolDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/agent-pool`: every slot with its load, the fallback key and the builder replicas.",
        "required": [
          "credentials",
          "fallbackKeyConfigured",
          "platformKeyEnabled",
          "replicas",
          "policy"
        ],
        "properties": {
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PoolCredentialDto"
            }
          },
          "fallbackKeyConfigured": {
            "type": "boolean",
            "description": "`FULLSEA_PLATFORM_ANTHROPIC_API_KEY` is set on the API (the builder's fallback slot when it is set there too)."
          },
          "platformKeyEnabled": {
            "type": "boolean",
            "description": "The admin switch for every platform turn (`/admin/settings`)."
          },
          "policy": {
            "type": "string",
            "description": "The rule of what may be pooled, in words."
          },
          "replicas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuilderReplicaDto"
            },
            "description": "Builder turns running now, by replica."
          }
        }
      },
      "AlertRuleId": {
        "type": "string",
        "format": "uuid",
        "description": "`alert_rules.id`"
      },
      "AllocationDto": {
        "type": "object",
        "required": [
          "id",
          "userId",
          "email",
          "clusterId",
          "clusterName",
          "resourceKind",
          "resourceId",
          "resourceName",
          "cpuMillis",
          "memoryMib",
          "storageGib",
          "status",
          "createdAt"
        ],
        "properties": {
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "cpuLimitMillis": {
            "type": "integer",
            "format": "int64",
            "description": "The CPU limit the plan's pool counts (burst vCPU)."
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64",
            "description": "The CPU request a node reserves (catalog v2 `cpuRequestMillis`)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/AllocationId"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "releasedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "resourceKind": {
            "$ref": "#/components/schemas/ResourceKind"
          },
          "resourceName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AllocationStatus"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "userId": {
            "$ref": "#/components/schemas/UserId"
          }
        }
      },
      "AllocationId": {
        "type": "string",
        "format": "uuid",
        "description": "`allocations.id`"
      },
      "AllocationStatus": {
        "type": "string",
        "description": "`allocations.status`",
        "enum": [
          "Active",
          "Released"
        ]
      },
      "AnnualPayoutTotalDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/affiliates/payout-totals?year=`: one row per affiliate paid that calendar year (bookkeeping).",
        "required": [
          "year",
          "affiliateId",
          "code",
          "payoutEmails",
          "totalCents",
          "payoutCount"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "payoutCount": {
            "type": "integer",
            "format": "int64"
          },
          "payoutEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every PayPal address paid that year."
          },
          "totalCents": {
            "type": "integer",
            "format": "int64"
          },
          "year": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ApiKeyDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ApiKeyId"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "The first 12 characters of the secret (`fsk_` + 8)."
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyScope"
            }
          }
        }
      },
      "ApiKeyId": {
        "type": "string",
        "format": "uuid",
        "description": "`api_keys.id`"
      },
      "ApiKeyScope": {
        "type": "string",
        "description": "`api_keys.scopes` elements: `api` opens the REST API, `mcp` the MCP endpoint.",
        "enum": [
          "Api",
          "Mcp"
        ]
      },
      "AppCanaryDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/canary`: the running canary (if any) and the last few.",
        "required": [
          "recent",
          "canStart"
        ],
        "properties": {
          "active": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CanaryDto"
              }
            ]
          },
          "canStart": {
            "type": "boolean",
            "description": "A canary can start now (a web app with a live release, no deploy or canary under way)."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, when it cannot."
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanaryDto"
            }
          }
        }
      },
      "AppDetail": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}`: the app with its latest release and latest operation.",
        "required": [
          "app"
        ],
        "properties": {
          "app": {
            "$ref": "#/components/schemas/AppDto"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          },
          "release": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseDto"
              }
            ]
          },
          "volumes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VolumeDto"
            },
            "description": "The volumes mounted into the app."
          }
        }
      },
      "AppDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "source",
          "size",
          "replicas",
          "port",
          "envKeys",
          "status",
          "clusterId",
          "clusterName",
          "namespace",
          "createdAt",
          "updatedAt",
          "kind"
        ],
        "properties": {
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The container arguments replacing the image's `CMD` (`null` = the image's own)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentReleaseId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseId"
              }
            ]
          },
          "envKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the environment variables; values are never returned."
          },
          "healthCheckPath": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP health check path (`null` = TCP checks on the port)."
          },
          "id": {
            "$ref": "#/components/schemas/AppId"
          },
          "internalUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the user's other apps reach it: `http://<slug>:<port>` (private), `http://app-<slug>` (web)."
          },
          "kind": {
            "$ref": "#/components/schemas/AppKind",
            "description": "`web | private | worker | cron` (PLAN.md §15.3)."
          },
          "name": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "replicas": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "schedule": {
            "type": [
              "string",
              "null"
            ],
            "description": "A cron app's 5-field schedule."
          },
          "size": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/AppSource"
          },
          "status": {
            "$ref": "#/components/schemas/AppStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "A cron app's IANA time zone."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "workspaceUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its in-cluster Service by its full name, which the project's builder workspace (the sandbox and its preview)\nreaches too (PLAN.md §18.F2): `http://app-<slug>.<namespace>.svc.cluster.local` (web),\n`http://<slug>.<namespace>.svc.cluster.local:<port>` (private); `null` for workers and cron jobs."
          }
        }
      },
      "AppEdgeDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/edge`: an app's edge controls, every one off by default.",
        "required": [
          "appId",
          "applies",
          "available",
          "passwordLock",
          "accountLock",
          "allowCidrs",
          "blockCidrs",
          "maintenance"
        ],
        "properties": {
          "accountLock": {
            "type": "boolean",
            "description": "Only the app's owner, signed in to Fullsea, gets through."
          },
          "allowCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Only these ranges reach the app (empty: everyone)."
          },
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "applies": {
            "type": "boolean",
            "description": "The app answers on an address (a web service): edge controls apply. Other kinds have none."
          },
          "available": {
            "type": "boolean",
            "description": "The plan includes edge controls (every plan that publishes)."
          },
          "blockCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "These ranges are answered 403 before anything else."
          },
          "maintenance": {
            "$ref": "#/components/schemas/MaintenanceDto"
          },
          "passwordLock": {
            "$ref": "#/components/schemas/PasswordLockDto"
          },
          "rateLimit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RateLimitDto",
                "description": "The whole-app rule when it counts per second (it is in `rateLimits` too), as before per-path rules; `null`\nwhen there is none or it counts per minute."
              }
            ]
          },
          "rateLimits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateLimitRuleDto"
            },
            "description": "Every rate-limit rule, shortest path first: the whole app (`/`) and paths, per second or per minute."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "AppEdgeUpdated": {
        "type": "object",
        "description": "The answer to `PATCH …/edge`: the settings, and a generated password once.",
        "required": [
          "edge"
        ],
        "properties": {
          "edge": {
            "$ref": "#/components/schemas/AppEdgeDto"
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only when this change generated it; read it again with `GET …/edge/password`."
          }
        }
      },
      "AppEnvDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/env`: the app's own variables, then the project variables it inherits. After a `PATCH`,\n`release` and `operation` are the redeploy that rolls the change out (`null` when nothing was deployed: the app\nhas no live release yet, or it is paused and picks the change up when it resumes).",
        "required": [
          "appId",
          "revealed",
          "entries"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvEntryDto"
            }
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "release": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseDto"
              }
            ]
          },
          "revealed": {
            "type": "boolean"
          }
        }
      },
      "AppGithubDto": {
        "type": "object",
        "description": "An app's GitHub link (`GET`/`PUT /api/v1/apps/{id}/github`).",
        "required": [
          "appId",
          "appName",
          "autoDeploy"
        ],
        "properties": {
          "accountLogin": {
            "type": [
              "string",
              "null"
            ]
          },
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "autoDeploy": {
            "type": "boolean",
            "description": "A push to the branch deploys the app."
          },
          "branch": {
            "type": [
              "string",
              "null"
            ],
            "description": "The branch the app deploys (its `gitRef`); `None` = the repository's default branch."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The connected installation the worker mints clone tokens from."
          },
          "repository": {
            "type": [
              "string",
              "null"
            ],
            "description": "`owner/repo` when the app's Git URL is a repository on this GitHub."
          }
        }
      },
      "AppId": {
        "type": "string",
        "format": "uuid",
        "description": "`apps.id`"
      },
      "AppKind": {
        "type": "string",
        "description": "`apps.kind`: how an app runs. The kind is fixed when the app is created.",
        "enum": [
          "Web",
          "Private",
          "Worker",
          "Cron"
        ]
      },
      "AppLogs": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/logs?lines=`",
        "required": [
          "appId",
          "lines"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AppSource": {
        "type": "object",
        "description": "Where an app's code comes from: the project workspace, a prebuilt image, a Git repository, or a folder an\noutside agent uploaded (`upload` with `uploadId` from `POST /api/v1/uploads` or the MCP `prepare_upload`).",
        "required": [
          "kind"
        ],
        "properties": {
          "gitRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "gitUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/SourceKind"
          },
          "uploadId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UploadId",
                "description": "`upload`: the uploaded folder (PLAN.md §18.K); one release builds it."
              }
            ]
          }
        }
      },
      "AppStatus": {
        "type": "string",
        "description": "`apps.status`",
        "enum": [
          "Pending",
          "Building",
          "Deploying",
          "Running",
          "Failed",
          "Stopped",
          "Deleting",
          "Deleted",
          "Paused"
        ]
      },
      "AppliedAdvice": {
        "type": "object",
        "description": "`POST /api/v1/advisor/findings/{id}/apply`",
        "required": [
          "finding"
        ],
        "properties": {
          "finding": {
            "$ref": "#/components/schemas/AdvisorFindingDto"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          }
        }
      },
      "AppliedTriageAction": {
        "type": "object",
        "description": "`POST /api/v1/triage-actions/{id}/apply`",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/TriageActionDto"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "The operation the change started (follow it in the operation log)."
              }
            ]
          }
        }
      },
      "ApprovalDto": {
        "type": "object",
        "required": [
          "id",
          "tool",
          "summary",
          "impact",
          "input",
          "status",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ApprovalId"
          },
          "impact": {
            "$ref": "#/components/schemas/ApprovalImpact"
          },
          "input": {
            "description": "The tool's arguments as the agent sent them."
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId",
                "description": "The builder session's project; `None` for the account co-pilot."
              }
            ]
          },
          "sessionId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BuilderSessionId"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "summary": {
            "type": "string",
            "description": "\"Delete the app todo\""
          },
          "tool": {
            "type": "string",
            "description": "The MCP action asked for, as `tool.action` (`app_lifecycle.delete`, `manage_database.delete`) or the tool of\none without actions (`create_app`)."
          }
        }
      },
      "ApprovalId": {
        "type": "string",
        "format": "uuid",
        "description": "`approvals.id` (PLAN.md §15.9)"
      },
      "ApprovalImpact": {
        "type": "object",
        "description": "What approving does, for the person to judge.",
        "required": [
          "target",
          "deletes",
          "reversible",
          "costChange"
        ],
        "properties": {
          "costChange": {
            "type": "string",
            "description": "The effect on the plan and the bill, one sentence."
          },
          "dataLoss": {
            "type": [
              "string",
              "null"
            ],
            "description": "The data lost for good; `None` when nothing is lost."
          },
          "deletes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What goes away, one phrase each."
          },
          "frees": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FreedResources"
              }
            ]
          },
          "import": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ImportPreview",
                "description": "Area AR: what a `database_sql` `import` brings in (the database and table, the file, its columns, how many\nrows or statements), so the card shows them as its own sections; absent for every other action."
              }
            ]
          },
          "reversible": {
            "type": "boolean"
          },
          "target": {
            "$ref": "#/components/schemas/ApprovalTarget"
          }
        }
      },
      "ApprovalPayload": {
        "type": "object",
        "description": "`approval_requested`, `approval_decided`",
        "required": [
          "approval"
        ],
        "properties": {
          "approval": {
            "$ref": "#/components/schemas/ApprovalDto"
          }
        }
      },
      "ApprovalStatus": {
        "type": "string",
        "description": "`approvals.status`: `consumed` = approved and the tool ran.",
        "enum": [
          "Pending",
          "Approved",
          "Rejected",
          "Expired",
          "Consumed"
        ]
      },
      "ApprovalTarget": {
        "type": "object",
        "description": "What an approval acts on.",
        "required": [
          "kind",
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "description": "`app`, `database`, …"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ArtifactDto": {
        "type": "object",
        "description": "`GET /api/v1/artifacts/{id}`: one file a team may download until `expiresAt`.",
        "required": [
          "id",
          "kind",
          "filename",
          "mimeType",
          "sizeBytes",
          "metadata",
          "downloadPath",
          "expiresAt",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "downloadPath": {
            "type": "string",
            "description": "`/api/v1/artifacts/{id}/download` (the dashboard's session cookie or an API key)."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "filename": {
            "type": "string",
            "description": "The name it downloads as (sanitized)."
          },
          "id": {
            "$ref": "#/components/schemas/ArtifactId"
          },
          "kind": {
            "$ref": "#/components/schemas/ArtifactKind"
          },
          "metadata": {
            "$ref": "#/components/schemas/ArtifactMetadata"
          },
          "mimeType": {
            "type": "string"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "sessionId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BuilderSessionId"
              }
            ]
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ArtifactId": {
        "type": "string",
        "format": "uuid",
        "description": "`session_artifacts.id`: a downloadable file (an export, a shared workspace file, a chat upload, exec output)"
      },
      "ArtifactKind": {
        "type": "string",
        "description": "`session_artifacts.kind` (area AR, PLAN.md §24.AR): where a downloadable file came from.",
        "enum": [
          "SqlExport",
          "VolumeExport",
          "WorkspaceFile",
          "ExecOutput",
          "ChatUpload",
          "Generated"
        ]
      },
      "ArtifactMetadata": {
        "type": "object",
        "description": "What the card beside a file's name shows; every field is optional. Creators may add keys of their own (area EX:\n`app`, `command`, `exitCode`), which are kept as they are.",
        "properties": {
          "columns": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The column names of an export."
          },
          "database": {
            "type": [
              "string",
              "null"
            ],
            "description": "The database's name (an export)."
          },
          "format": {
            "type": [
              "string",
              "null"
            ],
            "description": "`csv` | `json` | `ndjson` | `sql` (an export)."
          },
          "formulaGuard": {
            "type": "boolean",
            "description": "Text cells starting with `=`, `+`, `-`, `@` got a leading `'` (CSV exports; PLAN.md §24.AR)."
          },
          "rowCount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Rows written (an export) or read (an import's source).",
            "minimum": 0
          },
          "sourcePath": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where it was copied from: a workspace path, a path on a volume."
          },
          "table": {
            "type": [
              "string",
              "null"
            ],
            "description": "The table exported, when one was named."
          },
          "truncated": {
            "type": "boolean",
            "description": "The export stopped at the plan's row or size ceiling."
          },
          "volume": {
            "type": [
              "string",
              "null"
            ],
            "description": "The volume's name (a volume file)."
          },
          "workspacePath": {
            "type": [
              "string",
              "null"
            ],
            "description": "A chat upload's copy in the project's workspace (`.uploads/<name>`)."
          }
        }
      },
      "AtRiskDto": {
        "type": "object",
        "description": "Revenue that may not arrive.",
        "required": [
          "pastDueSubscriptions",
          "pastDueMrrCents",
          "cancellingSubscriptions",
          "cancellingMrrCents",
          "failedPayments30d",
          "failedPayments30dCents"
        ],
        "properties": {
          "cancellingMrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "cancellingSubscriptions": {
            "type": "integer",
            "format": "int64",
            "description": "Subscriptions set to end at the period's end, and what they bring today."
          },
          "failedPayments30d": {
            "type": "integer",
            "format": "int64"
          },
          "failedPayments30dCents": {
            "type": "integer",
            "format": "int64"
          },
          "pastDueMrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "pastDueSubscriptions": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AttachBucketRequest": {
        "type": "object",
        "description": "`POST /api/v1/buckets/{id}/attach`: mint a bucket key for `appId` and put it in the app's sealed environment as\n`<envPrefix>S3_ENDPOINT`, `S3_REGION`, `S3_BUCKET`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY` and, when public,\n`S3_PUBLIC_URL`; a running app restarts with them. The secret is never answered.",
        "required": [
          "appId"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "envPrefix": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upper-case letters, digits and `_`, ending in `_` (`MEDIA_` → `MEDIA_S3_BUCKET`); default none."
          }
        },
        "additionalProperties": false
      },
      "AttachBucketResult": {
        "type": "object",
        "description": "What an attach did (no secret).",
        "required": [
          "bucket",
          "appId",
          "appName",
          "key",
          "envKeys",
          "costSummary"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "bucket": {
            "$ref": "#/components/schemas/BucketDto"
          },
          "costSummary": {
            "$ref": "#/components/schemas/CostSummary"
          },
          "envKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The variable names set on the app."
          },
          "key": {
            "$ref": "#/components/schemas/BucketKeyDto",
            "description": "The key minted for the app (its secret is in the app's sealed env only)."
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "The redeploy that picks them up (`null` when the app is not deployed)."
              }
            ]
          }
        }
      },
      "AttachmentId": {
        "type": "string",
        "format": "uuid",
        "description": "`builder_attachments.id`"
      },
      "AttachmentRef": {
        "type": "object",
        "description": "A stored attachment as `user_message.attachments` lists it; `GET …/attachments/{id}` answers the bytes.",
        "required": [
          "id",
          "mediaType",
          "size"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/AttachmentId"
          },
          "mediaType": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "AttentionActionDto": {
        "type": "object",
        "required": [
          "kind",
          "path"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AttentionActionKind"
          },
          "path": {
            "type": "string",
            "description": "`POST` target of an API action (`/api/v1/admin/jobs/{id}/retry`); the page path of `open`."
          }
        }
      },
      "AttentionActionKind": {
        "type": "string",
        "description": "A one-click action on an item: `retry_job` posts to `path`; `open` goes to the item's page; `assign_to_me`\npatches the support ticket at `path` with `{\"assignee\": \"me\"}`.",
        "enum": [
          "retry_job",
          "open",
          "assign_to_me"
        ]
      },
      "AttentionCountDto": {
        "type": "object",
        "description": "How many items of a kind exist, and how many the queue lists.",
        "required": [
          "kind",
          "total",
          "listed"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AttentionKind"
          },
          "listed": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AttentionItemDto": {
        "type": "object",
        "description": "One thing that needs an operator.",
        "required": [
          "id",
          "kind",
          "severity",
          "summary",
          "target",
          "href",
          "since",
          "facts",
          "actions"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttentionActionDto"
            }
          },
          "facts": {
            "type": "object",
            "description": "Kind-specific numbers and words (`attempts`, `lastError`, `pool`, `usedBps`, `mrrCents` …)."
          },
          "href": {
            "type": "string",
            "description": "The admin page that deals with it."
          },
          "id": {
            "type": "string",
            "description": "`<kind>:<target id>` (a node under pressure adds the pool: `node_pressure:<id>:memory`)."
          },
          "kind": {
            "$ref": "#/components/schemas/AttentionKind"
          },
          "severity": {
            "$ref": "#/components/schemas/AttentionSeverity"
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "description": "Since when it needs attention (the failure, the report, the cooldown, the last update)."
          },
          "summary": {
            "type": "string",
            "description": "One English sentence (the admin MCP's text, and what a client shows for a kind it does not know)."
          },
          "target": {
            "$ref": "#/components/schemas/AttentionTargetDto"
          },
          "team": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamRefDto"
              }
            ]
          }
        }
      },
      "AttentionKind": {
        "type": "string",
        "description": "What an attention item is about. New kinds are appended (support tickets, capacity requests, overflow caps …);\na client shows an unknown kind by its `summary`.",
        "enum": [
          "job_failed",
          "abuse_report",
          "node_not_ready",
          "node_pressure",
          "pool_cooldown",
          "pool_error",
          "past_due",
          "overage",
          "support_sla",
          "capacity_request",
          "contract_expiring",
          "contract_invoice_overdue"
        ]
      },
      "AttentionQueueDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/attention`: most urgent first, then the longest waiting.",
        "required": [
          "items",
          "counts",
          "generatedAt"
        ],
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttentionCountDto"
            }
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttentionItemDto"
            }
          }
        }
      },
      "AttentionSeverity": {
        "type": "string",
        "description": "How urgent an attention item is; the queue sorts by this, most urgent first.",
        "enum": [
          "Critical",
          "High",
          "Medium",
          "Low"
        ]
      },
      "AttentionTargetDto": {
        "type": "object",
        "description": "What the item points at.",
        "required": [
          "kind",
          "id",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "description": "`job`, `abuse_report`, `node`, `pool_credential`, `subscription` (new kinds add their own)."
          },
          "label": {
            "type": "string",
            "description": "The job kind, the reported host, the node or credential name, the team."
          }
        }
      },
      "AttributionSource": {
        "type": "string",
        "description": "`affiliate_referrals.attribution_source`",
        "enum": [
          "LinkCookie",
          "PromoCode",
          "AdminManual"
        ]
      },
      "AuditEventDto": {
        "type": "object",
        "required": [
          "id",
          "action",
          "targetKind",
          "details",
          "createdAt"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "actorEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "actorUserId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserId"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "details": {},
          "id": {
            "$ref": "#/components/schemas/AuditEventId"
          },
          "targetId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "targetKind": {
            "type": "string"
          }
        }
      },
      "AuditEventId": {
        "type": "string",
        "format": "uuid",
        "description": "`audit_events.id`"
      },
      "AuthorKind": {
        "type": "string",
        "description": "`support_messages.author_kind`. `ai_draft` and internal notes are staff-only: never in a customer read.",
        "enum": [
          "Customer",
          "Admin",
          "AiDraft",
          "System"
        ]
      },
      "AuthorizationServerMetadata": {
        "type": "object",
        "description": "`GET /.well-known/oauth-authorization-server` (RFC 8414).",
        "required": [
          "issuer",
          "authorization_endpoint",
          "token_endpoint",
          "registration_endpoint",
          "revocation_endpoint",
          "response_types_supported",
          "response_modes_supported",
          "grant_types_supported",
          "code_challenge_methods_supported",
          "token_endpoint_auth_methods_supported",
          "revocation_endpoint_auth_methods_supported",
          "scopes_supported",
          "service_documentation"
        ],
        "properties": {
          "authorization_endpoint": {
            "type": "string"
          },
          "code_challenge_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grant_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "issuer": {
            "type": "string"
          },
          "registration_endpoint": {
            "type": "string"
          },
          "response_modes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revocation_endpoint": {
            "type": "string"
          },
          "revocation_endpoint_auth_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "service_documentation": {
            "type": "string"
          },
          "token_endpoint": {
            "type": "string"
          },
          "token_endpoint_auth_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AuthorizeRequest": {
        "type": "object",
        "description": "An authorization request (RFC 6749 §4.1.1 with PKCE and RFC 8707's `resource`) as `/oauth/authorize`\nreceived it. The consent page reads it from its own address and sends it back unchanged.",
        "properties": {
          "client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "code_challenge": {
            "type": [
              "string",
              "null"
            ]
          },
          "code_challenge_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "redirect_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource": {
            "type": [
              "string",
              "null"
            ]
          },
          "response_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AutoTopupDto": {
        "type": "object",
        "description": "`GET/PUT /api/v1/billing/auto-topup`",
        "required": [
          "enabled",
          "thresholdCents",
          "packCents",
          "cardOnFile",
          "chargesToday",
          "maxPerDay"
        ],
        "properties": {
          "cardOnFile": {
            "type": "boolean",
            "description": "A card is saved to charge (verified, or saved with a top-up or the subscription)."
          },
          "chargesToday": {
            "type": "integer",
            "format": "int64",
            "description": "Charges started today (UTC); at most `maxPerDay`."
          },
          "enabled": {
            "type": "boolean"
          },
          "lastFailedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastFailure": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last charge failed (automatic top-ups were turned off then)."
          },
          "maxPerDay": {
            "type": "integer",
            "format": "int64"
          },
          "packCents": {
            "type": "integer",
            "format": "int64",
            "description": "One of `topupPacksCents`."
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Charge when the available credit falls under this (100..=10000)."
          }
        }
      },
      "AutoscaleDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/autoscale`.",
        "required": [
          "enabled",
          "ceiling",
          "applies"
        ],
        "properties": {
          "applies": {
            "type": "boolean",
            "description": "The app can autoscale (web, private and worker apps without a volume)."
          },
          "ceiling": {
            "type": "integer",
            "format": "int32",
            "description": "The most replicas of this size the maximum may reach next to everything else: the plan's pool, plus the paid\noverflow the team's cap (and the memory ceiling) still allows when overflow is open (PLAN.md §21.OV).",
            "minimum": 0
          },
          "cpuPercent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "includedCeiling": {
            "type": "integer",
            "format": "int32",
            "description": "The most replicas the plan's pool alone holds (with its packs and contract): replicas running above it are\nbilled in paid overflow each hour, up to the maximum; a maximum above it asks for acceptance when it is the\nteam's first step into overflow.",
            "minimum": 0
          },
          "maxReplicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "minReplicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "overflowCapCents": {
            "type": "integer",
            "format": "int64",
            "description": "The team's monthly overflow cap."
          },
          "overflowOpen": {
            "type": "boolean",
            "description": "Overflow can add room beyond the plan now: eligible, on, not frozen, a card on file and cap left."
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AutoscaleStatusDto"
              }
            ]
          }
        }
      },
      "AutoscaleQuoteDto": {
        "type": "object",
        "description": "The autoscaling terms of a quote (PLAN.md §21.OV): admission and the cap weigh the maximum, the meter bills the\nreplicas running each hour.",
        "required": [
          "maxReplicas",
          "includedReplicas",
          "perReplicaHourlyMicrousd",
          "atMaximumMonthCents"
        ],
        "properties": {
          "atMaximumMonthCents": {
            "type": "integer",
            "format": "int64",
            "description": "The team's overflow for a whole month if the app ran at its maximum all month."
          },
          "includedReplicas": {
            "type": "integer",
            "format": "int32",
            "description": "The replicas of this size the plan's pool holds next to everything else; the ones running above it are\nbilled in overflow.",
            "minimum": 0
          },
          "maxReplicas": {
            "type": "integer",
            "format": "int32",
            "description": "The most replicas autoscaling may run.",
            "minimum": 0
          },
          "perReplicaHourlyMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "What each replica running beyond the plan costs an hour (micro-USD)."
          }
        }
      },
      "AutoscaleState": {
        "type": "string",
        "description": "How an app's autoscaler stands.",
        "enum": [
          "active",
          "metrics_warming_up",
          "failing"
        ]
      },
      "AutoscaleStatusDto": {
        "type": "object",
        "required": [
          "currentReplicas",
          "desiredReplicas"
        ],
        "properties": {
          "currentCpuPercent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "currentReplicas": {
            "type": "integer",
            "format": "int32"
          },
          "desiredReplicas": {
            "type": "integer",
            "format": "int32"
          },
          "lastScaleTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot scale, in Kubernetes' words: only when `state` is `failing`."
          },
          "state": {
            "$ref": "#/components/schemas/AutoscaleState",
            "description": "How the autoscaler stands (QA v5: the minute after a rollout read as an error)."
          }
        }
      },
      "AutoscaleUpdated": {
        "type": "object",
        "description": "The answer to `PUT …/autoscale`: the setting and the rollout it started (if any).",
        "required": [
          "autoscale"
        ],
        "properties": {
          "autoscale": {
            "$ref": "#/components/schemas/AutoscaleDto"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          }
        }
      },
      "BackupPolicyDto": {
        "type": "object",
        "description": "Which database and volumes are backed up as one unit (keys of `creates`).",
        "required": [
          "databases",
          "volumes"
        ],
        "properties": {
          "databases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "volumes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BatchStatus": {
        "type": "string",
        "description": "`affiliate_payout_batches.status`",
        "enum": [
          "Draft",
          "Exported",
          "Processing",
          "Completed",
          "Partial"
        ]
      },
      "BillingAddonsDto": {
        "type": "object",
        "description": "`GET /api/v1/billing/addons` (also the answer of `PUT`).",
        "required": [
          "available",
          "planCode",
          "interval",
          "packs",
          "adds",
          "periodTotalCents"
        ],
        "properties": {
          "adds": {
            "$ref": "#/components/schemas/AddonAddsDto",
            "description": "What the held packs add."
          },
          "available": {
            "type": "boolean",
            "description": "Packs can be changed now: a paid subscription in good standing on a plan that sells them."
          },
          "interval": {
            "$ref": "#/components/schemas/BillingInterval",
            "description": "The plan's billing interval; packs bill at the same one."
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonLineDto"
            },
            "description": "The packs sold on the plan (every pack of the catalogue when the plan sells none), with what is held."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The current period, for the prorated share a change costs now."
          },
          "periodTotalCents": {
            "type": "integer",
            "format": "int64",
            "description": "What the held packs cost per period of `interval`, in cents."
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "unavailableReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, in one sentence (`null` when available)."
          }
        }
      },
      "BillingInterval": {
        "type": "string",
        "description": "How often a subscription is billed (`subscriptions.billing_interval`, `CheckoutRequest.interval`, PLAN.md\n§15.4). An annual subscription is paid once a year and still gets its AI credit every month.",
        "enum": [
          "Month",
          "Year"
        ]
      },
      "BillingStateDto": {
        "type": "object",
        "description": "`GET /api/v1/billing/subscription` (also the answer of cancel / resume).",
        "required": [
          "plan",
          "portalAvailable",
          "credits",
          "trial",
          "instantCredit",
          "autoTopup",
          "topupPacksCents",
          "annualPlans"
        ],
        "properties": {
          "annualPlans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanCode"
            },
            "description": "Plans that can be bought billed yearly (an annual price is configured)."
          },
          "autoTopup": {
            "$ref": "#/components/schemas/AutoTopupDto"
          },
          "credits": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "creditsRenewAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the allowance next renews to `credits.monthlyCents` (the period end, or an annual plan's next monthly\nanniversary); `null` without a paid plan."
          },
          "instantCredit": {
            "$ref": "#/components/schemas/InstantCreditDto",
            "description": "The instant build credit of a Google sign-up."
          },
          "plan": {
            "$ref": "#/components/schemas/PlanDto"
          },
          "portalAvailable": {
            "type": "boolean",
            "description": "The user has a Stripe customer, so the Billing Portal can open."
          },
          "subscription": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionDto"
              }
            ]
          },
          "topupPacksCents": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The top-up packs on sale, in cents: `[500, 1500, 5000, 10000]`."
          },
          "trial": {
            "$ref": "#/components/schemas/TrialDto"
          }
        }
      },
      "BoardDatabaseDto": {
        "type": "object",
        "description": "A database of the project, for the Compute & database widget.",
        "required": [
          "id",
          "name",
          "engine",
          "status"
        ],
        "properties": {
          "engine": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "BoardLayoutDto": {
        "type": "object",
        "description": "The widgets of a board in order, each shown or hidden (small JSON per project).",
        "required": [
          "widgets"
        ],
        "properties": {
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WidgetSlot"
            }
          }
        },
        "additionalProperties": false
      },
      "BucketAppDto": {
        "type": "object",
        "description": "An app a bucket is attached to.",
        "required": [
          "appId",
          "appName",
          "accessKeyId",
          "envPrefix"
        ],
        "properties": {
          "accessKeyId": {
            "type": "string",
            "description": "The access key minted for it."
          },
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "envPrefix": {
            "type": "string",
            "description": "The variables' prefix (`\"\"` for `S3_ENDPOINT`, `MEDIA_` for `MEDIA_S3_ENDPOINT`)."
          }
        }
      },
      "BucketChange": {
        "type": "object",
        "description": "The answer of a bucket create, update or delete: the bucket and what the change costs.",
        "required": [
          "bucket",
          "costSummary"
        ],
        "properties": {
          "bucket": {
            "$ref": "#/components/schemas/BucketDto"
          },
          "costSummary": {
            "$ref": "#/components/schemas/CostSummary"
          }
        }
      },
      "BucketDto": {
        "type": "object",
        "description": "One bucket (`GET /api/v1/buckets`, `GET /api/v1/buckets/{id}`).",
        "required": [
          "id",
          "name",
          "status",
          "publicAccess",
          "endpoint",
          "region",
          "quotaBytes",
          "quotaGib",
          "usedBytes",
          "objectCount",
          "corsRules",
          "activeKeys",
          "attachedApps",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "activeKeys": {
            "type": "integer",
            "format": "int32",
            "description": "Access keys not revoked (bucket keys plus all-bucket keys of the owner).",
            "minimum": 0
          },
          "attachedApps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketAppDto"
            },
            "description": "Apps it is attached to (their `S3_*` variables name it)."
          },
          "corsRules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CorsRule"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "endpoint": {
            "type": "string",
            "description": "The S3 endpoint (`https://s3.fullsea.io`), path-style or `https://<name>.s3.fullsea.io`."
          },
          "id": {
            "$ref": "#/components/schemas/BucketId"
          },
          "name": {
            "type": "string",
            "description": "The S3 bucket name (unique per owner): what `S3_BUCKET` holds."
          },
          "objectCount": {
            "type": "integer",
            "format": "int64"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "publicAccess": {
            "type": "boolean",
            "description": "Its objects can be read by anyone at `publicUrl` (no listing)."
          },
          "publicSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The CDN path segment while public (`acme-uploads-k3x9qa`)."
          },
          "publicUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "`https://cdn.fullsea.io/<publicSlug>` while public."
          },
          "quotaBytes": {
            "type": "integer",
            "format": "int64",
            "description": "The most it may hold, in bytes (a whole number of GiB, reserved from the plan's Object Storage pool)."
          },
          "quotaGib": {
            "type": "integer",
            "format": "int64"
          },
          "region": {
            "type": "string",
            "description": "Always `auto`."
          },
          "status": {
            "$ref": "#/components/schemas/BucketStatus",
            "description": "`active`; `deleting` (refused at the edge at once, its objects being erased); `deleted`."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "usedBytes": {
            "type": "integer",
            "format": "int64",
            "description": "What it holds, as the edge last reported (reconciled daily from a listing)."
          }
        }
      },
      "BucketId": {
        "type": "string",
        "format": "uuid",
        "description": "`storage_buckets.id`: an S3 bucket (one prefix of the tenant-objects R2 bucket)"
      },
      "BucketKeyDto": {
        "type": "object",
        "description": "One access key (its secret is never shown again after [`CreatedBucketKey`]).",
        "required": [
          "id",
          "label",
          "accessKeyId",
          "permissions",
          "createdAt"
        ],
        "properties": {
          "accessKeyId": {
            "type": "string",
            "description": "`fs3_` + 20 characters: `S3_ACCESS_KEY_ID`."
          },
          "appId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppId",
                "description": "The app it was minted for by an attach."
              }
            ]
          },
          "bucketId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BucketId",
                "description": "The bucket it is limited to; `null` = every bucket of its owner."
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/StorageKeyId"
          },
          "label": {
            "type": "string"
          },
          "permissions": {
            "$ref": "#/components/schemas/BucketPermission"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "BucketObjectDto": {
        "type": "object",
        "description": "One object of `GET /api/v1/buckets/{id}/objects`.",
        "required": [
          "key",
          "sizeBytes"
        ],
        "properties": {
          "cdnUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its public address while the bucket is public."
          },
          "etag": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "type": "string"
          },
          "lastModified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BucketObjectsPage": {
        "type": "object",
        "description": "A page of a bucket's objects.",
        "required": [
          "prefix",
          "objects",
          "prefixes"
        ],
        "properties": {
          "delimiter": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BucketObjectDto"
            }
          },
          "prefix": {
            "type": "string"
          },
          "prefixes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The \"folders\" one level down (with `delimiter`), each ending in it."
          }
        }
      },
      "BucketPermission": {
        "type": "string",
        "description": "What an access key may do (`storage_keys.permissions`, the edge's `key:` record).",
        "enum": [
          "Read",
          "ReadWrite"
        ]
      },
      "BucketStatus": {
        "type": "string",
        "description": "`storage_buckets.status`: `deleting` blocks every request at the edge at once while the worker drains the\nprefix; `deleted` once it is empty.",
        "enum": [
          "Active",
          "Deleting",
          "Deleted"
        ]
      },
      "BuilderEvent": {
        "type": "object",
        "description": "One SSE `data:` of `GET /v1/projects/{id}/events` (`event: builder`, `id: <seq>`).",
        "required": [
          "seq",
          "at",
          "kind",
          "payload"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "$ref": "#/components/schemas/BuilderEventKind"
          },
          "payload": {
            "description": "One of the `*Payload` types below, by `kind`."
          },
          "seq": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BuilderEventKind": {
        "type": "string",
        "description": "`builder_events.kind` (PLAN.md §6.4).",
        "enum": [
          "UserMessage",
          "AgentMessageChunk",
          "AgentThoughtChunk",
          "ToolCall",
          "ToolCallUpdate",
          "Plan",
          "TurnStarted",
          "TurnEnded",
          "Status",
          "Error",
          "ApprovalRequested",
          "ApprovalDecided",
          "Card",
          "SecretRequested",
          "SecretResolved",
          "SessionConfig"
        ]
      },
      "BuilderOptionsDto": {
        "type": "object",
        "description": "`GET /api/v1/builder/options`, `GET /api/v1/projects/{id}/builder/options`, `GET /api/v1/copilot/options`, and\nthe answer of each `PATCH …/preferences`.",
        "required": [
          "models",
          "effortLevels",
          "current",
          "defaults",
          "userDefault",
          "unlocked",
          "reported",
          "policyRevision"
        ],
        "properties": {
          "credential": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TurnCredential",
                "description": "The credential the next turn would run on (`null`: none is connected and the platform key is off)."
              }
            ]
          },
          "current": {
            "$ref": "#/components/schemas/ModelChoiceDto",
            "description": "What the next turn runs on (the session's choice, else the person's default, else the policy's)."
          },
          "defaults": {
            "$ref": "#/components/schemas/ModelChoiceDto",
            "description": "The policy's default as this team may use it."
          },
          "effortLevels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffortOptionDto"
            },
            "description": "From the least to the most thinking."
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelOptionDto"
            },
            "description": "In the picker's order."
          },
          "permissionMode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The permission mode the session's agent runs in (`auto`, or the adapter's fallback such as `acceptEdits` for\na model without Auto mode); `null` before it ran."
          },
          "policyRevision": {
            "type": "integer",
            "format": "int64",
            "description": "Area MP: the revision of the model policy these rows come from (`0`: the committed file, never overridden).\nA prompt sends it back (`policyRevision`): a choice offered under an older revision that the policy in force no\nlonger allows falls back calmly to the next choice instead of failing."
          },
          "reported": {
            "type": "boolean",
            "description": "The rows come from what the agent reported (else from the policy alone, before an agent ran)."
          },
          "session": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ModelPreferenceDto",
                "description": "The session's own choice; `null` for the account-wide read."
              }
            ]
          },
          "unlocked": {
            "type": "boolean",
            "description": "An own Anthropic key or Claude subscription: every model and level the agent reports, no plan locks."
          },
          "userDefault": {
            "$ref": "#/components/schemas/ModelPreferenceDto",
            "description": "The person's default for new sessions (\"Use as my default\")."
          }
        }
      },
      "BuilderReplicaDto": {
        "type": "object",
        "description": "Turns one builder replica runs now.",
        "required": [
          "instance",
          "runningTurns"
        ],
        "properties": {
          "instance": {
            "type": "string",
            "description": "`FULLSEA_BUILDER_INSTANCE_ID`."
          },
          "runningTurns": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "BuilderSessionId": {
        "type": "string",
        "format": "uuid",
        "description": "`builder_sessions.id`"
      },
      "BuilderState": {
        "type": "object",
        "description": "`GET /v1/projects/{id}/state`",
        "required": [
          "status",
          "running",
          "lastSeq"
        ],
        "properties": {
          "lastSeq": {
            "type": "integer",
            "format": "int64"
          },
          "running": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/BuilderStatus"
          }
        }
      },
      "BuilderStatus": {
        "type": "string",
        "description": "`builder_sessions.status`",
        "enum": [
          "Idle",
          "Running",
          "Error",
          "Stopped"
        ]
      },
      "BuilderTicket": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/builder/ticket`: a `fsbt_…` bearer for `fullsea-builder`, bound to user + project.",
        "required": [
          "ticket",
          "builderUrl",
          "expiresAt"
        ],
        "properties": {
          "builderUrl": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "ticket": {
            "type": "string"
          }
        }
      },
      "CanaryDto": {
        "type": "object",
        "required": [
          "id",
          "appId",
          "releaseId",
          "releaseNumber",
          "percent",
          "windowSecs",
          "autoRollback",
          "autoPromote",
          "status",
          "createdAt"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "autoPromote": {
            "type": "boolean"
          },
          "autoRollback": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/CanaryId"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "What happened, in words (why it was rolled back, …)."
          },
          "observation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CanaryObservationDto"
              }
            ]
          },
          "operationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "percent": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "releaseId": {
            "$ref": "#/components/schemas/ReleaseId"
          },
          "releaseNumber": {
            "type": "integer",
            "format": "int32"
          },
          "stableReleaseId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseId"
              }
            ]
          },
          "stableReleaseNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/CanaryStatus"
          },
          "verdict": {
            "type": [
              "string",
              "null"
            ],
            "description": "`waiting | healthy | worse` once judged."
          },
          "windowSecs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CanaryId": {
        "type": "string",
        "format": "uuid",
        "description": "`canaries.id`"
      },
      "CanaryObservationDto": {
        "type": "object",
        "description": "What the canary was last judged on.",
        "required": [
          "elapsedSecs",
          "podsReady",
          "restarts",
          "oomKills",
          "source"
        ],
        "properties": {
          "canary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TrafficSampleDto"
              }
            ]
          },
          "elapsedSecs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "oomKills": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "podsReady": {
            "type": "boolean"
          },
          "restarts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "source": {
            "type": "string",
            "description": "`pods` (no traffic numbers on this cluster) or `traffic` (the ingress's requests per side)."
          },
          "stable": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TrafficSampleDto"
              }
            ]
          }
        }
      },
      "CanaryStarted": {
        "type": "object",
        "description": "The answer to `POST …/canary`.",
        "required": [
          "canary",
          "release",
          "operation"
        ],
        "properties": {
          "canary": {
            "$ref": "#/components/schemas/CanaryDto"
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          },
          "release": {
            "$ref": "#/components/schemas/ReleaseDto"
          }
        }
      },
      "CanaryStatus": {
        "type": "string",
        "description": "`canaries.status`",
        "enum": [
          "Starting",
          "Running",
          "Promoting",
          "Promoted",
          "RollingBack",
          "RolledBack",
          "Failed"
        ]
      },
      "CapHoldDto": {
        "type": "object",
        "description": "An autoscaled app whose reserved maximum holds the cap's floor up (`OverflowDto.minimumCapHeldBy`).",
        "required": [
          "appId",
          "name",
          "maxReplicas",
          "runningReplicas"
        ],
        "properties": {
          "appId": {
            "type": "string",
            "format": "uuid"
          },
          "maxReplicas": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "runningReplicas": {
            "type": "integer",
            "format": "int32",
            "description": "What it runs now (the meter's count).",
            "minimum": 0
          }
        }
      },
      "Capacity": {
        "type": "object",
        "required": [
          "cpuMillis",
          "memoryMib",
          "storageGib"
        ],
        "properties": {
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "CapacityPoolDto": {
        "type": "object",
        "required": [
          "pool",
          "unit",
          "allocated",
          "capacity",
          "ceiling",
          "runway"
        ],
        "properties": {
          "allocated": {
            "type": "integer",
            "format": "int64",
            "description": "Allocated (what placement counts)."
          },
          "capacity": {
            "type": "integer",
            "format": "int64"
          },
          "ceiling": {
            "type": "integer",
            "format": "int64",
            "description": "What placement lets it fill: all CPU, memory less the headroom, 80 % of disks."
          },
          "measured": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "What the nodes or the export report in use, when they report it (LVM free, the NFS export)."
          },
          "pool": {
            "$ref": "#/components/schemas/CapacityPoolKind"
          },
          "runway": {
            "$ref": "#/components/schemas/RunwayDto"
          },
          "unit": {
            "type": "string",
            "description": "`millicores`, `MiB` or `GiB`."
          },
          "usedBps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "`max(allocated, measured) / capacity`; `null` without capacity."
          }
        }
      },
      "CapacityPoolKind": {
        "type": "string",
        "description": "A pool a cluster offers.",
        "enum": [
          "cpu",
          "memory",
          "nvme",
          "nfs"
        ]
      },
      "CapacityRequestAccepted": {
        "type": "object",
        "description": "The answer to a signed-out request (also to a honeypot hit).",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "CapacityRequestDto": {
        "type": "object",
        "description": "A capacity request as its team sees it.",
        "required": [
          "id",
          "status",
          "contactName",
          "contactEmail",
          "companyName",
          "wantsDedicatedNodes",
          "notes",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contractCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The contract drafted from it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/CapacityRequestId"
          },
          "notes": {
            "type": "string"
          },
          "preferredRegion": {
            "type": [
              "string",
              "null"
            ]
          },
          "requestedObjectGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "requestedRamGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "requestedStorageGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "status": {
            "type": "string",
            "description": "`new`, `reviewing`, `quoted`, `accepted`, `declined`."
          },
          "ticketId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The support ticket it opened (`null` until the support desk has one)."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "wantsDedicatedNodes": {
            "type": "boolean"
          }
        }
      },
      "CapacityRequestId": {
        "type": "string",
        "format": "uuid",
        "description": "`capacity_requests.id`: a self-serve request for custom capacity or dedicated nodes"
      },
      "CardPayload": {
        "type": "object",
        "description": "`card`",
        "required": [
          "card"
        ],
        "properties": {
          "card": {
            "$ref": "#/components/schemas/ChatCardDto"
          }
        }
      },
      "CardStack": {
        "type": "object",
        "description": "The stack a `templates` `deploy` card shows (the chat reads the rest through `GET /api/v1/stacks/{id}`, and\nreveals passwords through `POST /stacks/{id}/outputs/reveal`).",
        "required": [
          "id",
          "name",
          "templateName"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/StackId"
          },
          "name": {
            "type": "string"
          },
          "templateName": {
            "type": "string"
          }
        }
      },
      "CatalogDto": {
        "type": "object",
        "description": "`GET /api/v1/catalog`",
        "required": [
          "sizes",
          "databases",
          "runtimes",
          "plans"
        ],
        "properties": {
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonDto"
            },
            "description": "Capacity packs sold on top of paid plans (PLAN.md §18.Y)."
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EngineDto"
            }
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanDto"
            }
          },
          "runtimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuntimeDto"
            }
          },
          "sharedStorageOffered": {
            "type": "boolean",
            "description": "Shared App Disks (`shared_nfs` volumes) can be created: a cluster offers them, or a development stand-in\ndoes (PLAN.md §18.ST2). `false`: only Fast Local NVMe volumes."
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SizeDto"
            }
          }
        }
      },
      "CatalogKind": {
        "type": "string",
        "description": "What an admin catalog entry (`catalog_overrides.code`) refers to.",
        "enum": [
          "Database",
          "Runtime",
          "Size"
        ]
      },
      "CellDto": {
        "type": "object",
        "description": "One value; `null` in JSON is SQL `NULL`.",
        "required": [
          "value",
          "truncated",
          "length"
        ],
        "properties": {
          "length": {
            "type": "integer",
            "format": "int64",
            "description": "Its full length in characters (bytes for binary).",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "The full value is longer (`POST …/data/cell` shows all of it)."
          },
          "value": {
            "type": "string",
            "description": "The value as text (binary as hex), cut at 1000 characters."
          }
        }
      },
      "CellKind": {
        "type": "string",
        "description": "How a column's values are shown.",
        "enum": [
          "number",
          "boolean",
          "text",
          "json",
          "binary",
          "time",
          "other"
        ]
      },
      "CellRequest": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/data/cell`: one value in full (up to 1 MiB).",
        "required": [
          "table",
          "column"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RowFilter"
            }
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "rowKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The row's `rowKeys` entry; without one, the row at `offset` of the same sort and filters."
          },
          "schema": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RowSort"
              }
            ]
          },
          "table": {
            "type": "string"
          }
        }
      },
      "CellValueDto": {
        "type": "object",
        "required": [
          "column",
          "kind",
          "truncated",
          "length"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/CellKind"
          },
          "length": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "Longer than 1 MiB: cut there."
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` for SQL `NULL`."
          }
        }
      },
      "CertificateDto": {
        "type": "object",
        "description": "A custom domain's certificate.",
        "required": [
          "domainId",
          "hostname",
          "health"
        ],
        "properties": {
          "checkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "daysLeft": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "domainId": {
            "$ref": "#/components/schemas/DomainId"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "health": {
            "$ref": "#/components/schemas/CertificateHealth"
          },
          "hostname": {
            "type": "string"
          },
          "issuer": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CertificateHealth": {
        "type": "string",
        "description": "What Fullsea knows about a custom domain's certificate.",
        "enum": [
          "Valid",
          "Expiring",
          "Expired",
          "Unreachable",
          "Unchecked"
        ]
      },
      "ChannelStatsDto": {
        "type": "object",
        "required": [
          "clicks",
          "signups",
          "paidReferrals",
          "earnedCents"
        ],
        "properties": {
          "clicks": {
            "type": "integer",
            "format": "int64"
          },
          "earnedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Net commission earned through this channel."
          },
          "paidReferrals": {
            "type": "integer",
            "format": "int64"
          },
          "signups": {
            "type": "integer",
            "format": "int64"
          },
          "subId": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` = links without a channel tag."
          }
        }
      },
      "ChatCardDto": {
        "type": "object",
        "description": "A card the server drew for a tool call of this session (PLAN.md §18.C): never from what the model wrote.",
        "required": [
          "id",
          "kind",
          "tool",
          "createdAt"
        ],
        "properties": {
          "artifact": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactDto",
                "description": "Area AR, `artifact`: the file to download (an export, a shared workspace file, a volume file)."
              }
            ]
          },
          "costSummary": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CostSummary",
                "description": "`storage_cost`, and an `upgrade` of a full storage pool: what the change costs and the pool after it."
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ChatCardId"
          },
          "kind": {
            "$ref": "#/components/schemas/ChatCardKind"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The refusal's sentence (`upgrade`, `publish_wall`)."
          },
          "publishWall": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PublishWall"
              }
            ]
          },
          "stack": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CardStack"
              }
            ]
          },
          "tool": {
            "type": "string",
            "description": "The action's label (`create_app`, `deploy_app`, `templates.deploy`, `manage_database.create`, …)."
          },
          "transfer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TransferCardDto",
                "description": "Area AR, `data_transfer` (and the `artifact` card of a finished export): the worker's export or import. The\nnewest card of an operation replaces the earlier ones in the chat."
              }
            ]
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "`upgrade`, and `publish_wall` too: the offer (`reason` says which card)."
              }
            ]
          }
        }
      },
      "ChatCardId": {
        "type": "string",
        "format": "uuid",
        "description": "`chat_cards.id` (PLAN.md §18.C)"
      },
      "ChatCardKind": {
        "type": "string",
        "description": "`chat_cards.kind` (PLAN.md §18.C): what a server-drawn chat card shows.",
        "enum": [
          "Upgrade",
          "PublishWall",
          "StackDeploy",
          "StorageCost",
          "Artifact",
          "DataTransfer"
        ]
      },
      "CheckOverrides": {
        "type": "object",
        "description": "`POST /api/v1/admin/enterprise/overrides/check`: live validation of the editor.",
        "required": [
          "overrides"
        ],
        "properties": {
          "overrides": {},
          "teamId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamId",
                "description": "Preview the limits on this team's plan and packs."
              }
            ]
          }
        }
      },
      "CheckoutRequest": {
        "type": "object",
        "description": "`POST /api/v1/billing/checkout` — `starter`, `pro`, `scale` or `business`, billed `month` (default) or `year`.",
        "required": [
          "planCode"
        ],
        "properties": {
          "interval": {
            "$ref": "#/components/schemas/BillingInterval"
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "returnTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where Stripe sends the person back (PLAN.md §18.C): a dashboard path such as\n`/app/projects/<id>?resume=deploy` (`fullsea_domain::billing::checked_return_to`; anything else is refused\nwith `validation_failed`). Default: Billing."
          }
        }
      },
      "CheckoutResponse": {
        "type": "object",
        "required": [
          "checkoutUrl"
        ],
        "properties": {
          "checkoutUrl": {
            "type": "string"
          }
        }
      },
      "ClickAck": {
        "type": "object",
        "required": [
          "accepted"
        ],
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "The code is an active affiliate's: the cookies are set."
          }
        }
      },
      "ClientRegistrationRequest": {
        "type": "object",
        "description": "`POST /oauth/register` (RFC 7591). Unknown metadata is ignored; only public clients are registered.",
        "properties": {
          "client_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": [
              "string",
              "null"
            ]
          },
          "software_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "software_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_endpoint_auth_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only `none` is offered (public clients with PKCE); another value is answered with `none`."
          }
        }
      },
      "ClientRegistrationResponse": {
        "type": "object",
        "description": "`POST /oauth/register` → 201.",
        "required": [
          "client_id",
          "client_id_issued_at",
          "client_name",
          "redirect_uris",
          "grant_types",
          "response_types",
          "token_endpoint_auth_method",
          "scope"
        ],
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_id_issued_at": {
            "type": "integer",
            "format": "int64"
          },
          "client_name": {
            "type": "string"
          },
          "client_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": "string"
          },
          "software_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "software_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_endpoint_auth_method": {
            "type": "string"
          }
        }
      },
      "ClusterCapacityDto": {
        "type": "object",
        "required": [
          "clusterId",
          "name",
          "region",
          "status",
          "nodesReady",
          "nodesTotal",
          "pools",
          "createdAt"
        ],
        "properties": {
          "bindingPool": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CapacityPoolKind",
                "description": "The pool that fills first (`null` when none can be forecast)."
              }
            ]
          },
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "nodesReady": {
            "type": "integer",
            "format": "int64"
          },
          "nodesTotal": {
            "type": "integer",
            "format": "int64"
          },
          "pools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacityPoolDto"
            }
          },
          "region": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ClusterStatus"
          }
        }
      },
      "ClusterDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "region",
          "status",
          "apiServerUrl",
          "ingressDomain",
          "ingressScheme",
          "externalHost",
          "registryPush",
          "registryPull",
          "provisioner",
          "nodesReady",
          "nodesTotal",
          "capacity",
          "allocated",
          "createdAt"
        ],
        "properties": {
          "allocated": {
            "$ref": "#/components/schemas/Capacity"
          },
          "apiServerUrl": {
            "type": "string"
          },
          "capacity": {
            "$ref": "#/components/schemas/Capacity"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "externalHost": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "ingressDomain": {
            "type": "string"
          },
          "ingressPort": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "ingressScheme": {
            "type": "string"
          },
          "lastSyncError": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastSyncedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "nodesReady": {
            "type": "integer",
            "format": "int64"
          },
          "nodesTotal": {
            "type": "integer",
            "format": "int64"
          },
          "provisioner": {
            "$ref": "#/components/schemas/Provisioner"
          },
          "region": {
            "type": "string"
          },
          "registryPull": {
            "type": "string"
          },
          "registryPush": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ClusterStatus"
          }
        }
      },
      "ClusterId": {
        "type": "string",
        "format": "uuid",
        "description": "`clusters.id`"
      },
      "ClusterStatus": {
        "type": "string",
        "description": "`clusters.status`: only `active` clusters receive new placements.",
        "enum": [
          "Active",
          "Draining",
          "Disabled"
        ]
      },
      "CodeAvailability": {
        "type": "object",
        "required": [
          "code",
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "description": "The code as it would be saved (lowercased)."
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "`length`, `characters`, `hyphens`, `reserved`, `taken`"
          }
        }
      },
      "CommissionDto": {
        "type": "object",
        "description": "One ledger row as the affiliate sees it: never who paid.",
        "required": [
          "id",
          "createdAt",
          "kind",
          "planLabel",
          "commissionCents",
          "status",
          "maturesAt"
        ],
        "properties": {
          "commissionCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/CommissionKind"
          },
          "maturesAt": {
            "type": "string",
            "format": "date-time",
            "description": "When a pending commission clears."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "An adjustment's reason."
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "planLabel": {
            "type": "string",
            "description": "`Pro · Monthly`, `Refund`, `Bonus`"
          },
          "status": {
            "$ref": "#/components/schemas/CommissionStatus"
          },
          "subId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The channel tag of the referral."
          }
        }
      },
      "CommissionKind": {
        "type": "string",
        "description": "`affiliate_commissions.kind`",
        "enum": [
          "RecurringInvoice",
          "Clawback",
          "AdminAdjustment"
        ]
      },
      "CommissionStatus": {
        "type": "string",
        "description": "`affiliate_commissions.status`: `pending` for [`HOLD_DAYS`], then `payable`; `processing` once locked into a\npayout, `paid` when the payout is; `reversed` when a refund, a dispute or an admin took it back before then.",
        "enum": [
          "Pending",
          "Payable",
          "Processing",
          "Paid",
          "Reversed"
        ]
      },
      "ComposeAppDto": {
        "type": "object",
        "required": [
          "service",
          "name",
          "kind",
          "size",
          "replicas",
          "env",
          "dependsOn",
          "volumes"
        ],
        "properties": {
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "env": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeEnvDto"
            }
          },
          "gitRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "gitUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "healthCheckPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/AppKind"
          },
          "name": {
            "type": "string",
            "description": "Added to the stack's name to make the app's name (`<stack>-<name>`)."
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "replicas": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "service": {
            "type": "string",
            "description": "The Compose service."
          },
          "size": {
            "type": "string"
          },
          "volumes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compose volumes it mounts."
          }
        }
      },
      "ComposeDatabaseDto": {
        "type": "object",
        "required": [
          "service",
          "name",
          "engine",
          "version",
          "size",
          "storageGib",
          "absorbedVolumes"
        ],
        "properties": {
          "absorbedVolumes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compose volumes that held its data (the managed database keeps its own storage)."
          },
          "engine": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "ComposeEnvDto": {
        "type": "object",
        "description": "A variable an app gets, and what it now refers to.",
        "required": [
          "key",
          "links",
          "added"
        ],
        "properties": {
          "added": {
            "type": "boolean",
            "description": "Added by the import (the app depends on a database no variable named)."
          },
          "key": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeLinkDto"
            },
            "description": "The Compose services (and fields: `url`, `host`, `password`, `internalHost`…) it was rewired to; empty when\nit is kept as written."
          }
        }
      },
      "ComposeLinkDto": {
        "type": "object",
        "required": [
          "service",
          "field"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "service": {
            "type": "string"
          }
        }
      },
      "ComposeNoteDto": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "service": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ComposePreviewDto": {
        "type": "object",
        "description": "What an import would create, and whether the person's plan holds it.",
        "required": [
          "name",
          "apps",
          "databases",
          "volumes",
          "skipped",
          "unsupported",
          "notes",
          "order",
          "missingVariables",
          "memoryMib",
          "cpuMillis",
          "storageGib",
          "fitsPlan",
          "planProblems"
        ],
        "properties": {
          "apps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeAppDto"
            }
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeDatabaseDto"
            }
          },
          "fitsPlan": {
            "type": "boolean",
            "description": "The person's plan publishes and holds all of it (on an empty account; the create checks what is left)."
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64",
            "description": "Memory (MiB), CPU limit (millicores) and storage (GiB) the import holds of a plan."
          },
          "minPlan": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PlanCode",
                "description": "The first plan that holds everything (`null`: none does)."
              }
            ]
          },
          "missingVariables": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`${VAR}`s without a value (read as empty)."
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeNoteDto"
            }
          },
          "order": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compose services in the order Fullsea creates them."
          },
          "planProblems": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why it does not (\"PostgreSQL in Large\", \"3 apps\"), in words."
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeSkippedDto"
            }
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "unsupported": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeUnsupportedDto"
            }
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "The upgrade that holds it, when the plan does not."
              }
            ]
          },
          "volumes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComposeVolumeDto"
            }
          }
        }
      },
      "ComposeRequest": {
        "type": "object",
        "description": "`POST /api/v1/compose/preview` and `POST /api/v1/compose/import`.",
        "required": [
          "yaml"
        ],
        "properties": {
          "env": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `.env` text whose values fill `${VAR}` placeholders (never stored)."
          },
          "gitRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "gitUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Git repository `build:` services are built from (its root), and its branch, tag or commit."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The stack's and new project's name (default: the file's `name:` or \"Compose import\")."
          },
          "yaml": {
            "type": "string",
            "description": "The `docker-compose.yml` text (at most 256 KiB)."
          }
        }
      },
      "ComposeSkippedDto": {
        "type": "object",
        "required": [
          "service",
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          },
          "service": {
            "type": "string"
          }
        }
      },
      "ComposeUnsupportedDto": {
        "type": "object",
        "description": "A key that is not carried over.",
        "required": [
          "key",
          "reason",
          "harmless"
        ],
        "properties": {
          "harmless": {
            "type": "boolean",
            "description": "Dropping it changes nothing that matters on Fullsea (`restart`, `labels`, …)."
          },
          "key": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "service": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` for a top-level key."
          }
        }
      },
      "ComposeVolumeDto": {
        "type": "object",
        "required": [
          "volume",
          "name",
          "service",
          "mountPath",
          "sizeGib"
        ],
        "properties": {
          "mountPath": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "service": {
            "type": "string",
            "description": "The service it is mounted in."
          },
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          },
          "volume": {
            "type": "string",
            "description": "The Compose volume."
          }
        }
      },
      "ConfirmPayoutEmail": {
        "type": "object",
        "description": "`POST /api/v1/affiliate/payout-email/confirm`: the token of the emailed link (`/app/affiliates#confirm=<token>`:\nin the fragment, so it never reaches a server log, analytics or a `Referer`; the page posts it).",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "ConnectedAgentDto": {
        "type": "object",
        "description": "`GET /api/v1/connected-agents` items: one consent with a token still working.",
        "required": [
          "id",
          "clientId",
          "clientName",
          "scope",
          "createdAt"
        ],
        "properties": {
          "clientId": {
            "$ref": "#/components/schemas/OAuthClientId"
          },
          "clientName": {
            "type": "string"
          },
          "clientUri": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/OAuthGrantId",
            "description": "The grant: `DELETE /api/v1/connected-agents/{id}` revokes it with every token."
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          },
          "softwareId": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The team the agent acts in (chosen at consent)."
          }
        }
      },
      "ConsentAccount": {
        "type": "object",
        "description": "The person granting access (the signed-in account; teams will add the team picked here).",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ContractInvoiceDto": {
        "type": "object",
        "description": "A Checkout link or a Stripe invoice a contract was billed with.",
        "required": [
          "id",
          "kind",
          "amountCents",
          "currency",
          "status",
          "createdAt"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "A Net-30 invoice's due date."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "description": "`checkout` (card customers) or `invoice` (Net-30)."
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "`open`, `paid`, `void`, `expired`."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Checkout page or the invoice's hosted page (`null` once a link expired)."
          }
        }
      },
      "ContractQuoteDto": {
        "type": "object",
        "description": "What a contract sells: money per interval and term, the team's limits before and after, the rates.",
        "required": [
          "contractCode",
          "commitCents",
          "billingInterval",
          "monthlyCents",
          "planCode",
          "current",
          "withContract",
          "slaTier",
          "rates",
          "dedicatedNodes",
          "dedicatedNodeCount"
        ],
        "properties": {
          "billingInterval": {
            "type": "string"
          },
          "commitCents": {
            "type": "integer",
            "format": "int64"
          },
          "contractCode": {
            "type": "string"
          },
          "current": {
            "$ref": "#/components/schemas/Entitlements",
            "description": "Plan + packs today."
          },
          "dedicatedNodeCount": {
            "type": "integer",
            "format": "int64",
            "description": "Ready nodes carrying the team's dedicated label (what dedicated placement will count)."
          },
          "dedicatedNodes": {
            "type": "boolean"
          },
          "monthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode",
            "description": "The team's base plan."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteRateDto"
            }
          },
          "slaTier": {
            "$ref": "#/components/schemas/SlaTier"
          },
          "termIntervals": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Intervals in the term (`null` = open-ended).",
            "minimum": 0
          },
          "termTotalCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "What the whole term commits (`null` = open-ended)."
          },
          "withContract": {
            "$ref": "#/components/schemas/Entitlements",
            "description": "Plan + packs + the contract's overrides."
          }
        }
      },
      "ContractSummaryDto": {
        "type": "object",
        "description": "The enterprise contract a team's limits come from.",
        "required": [
          "contractCode"
        ],
        "properties": {
          "contractCode": {
            "type": "string",
            "description": "`ENT-2026-0001`"
          },
          "dedicatedNodeLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "The node label of its dedicated nodes; `null` = the shared pool."
          },
          "endsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` = open-ended."
          },
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ContractTermsInput": {
        "type": "object",
        "description": "A draft's terms (`POST` creates with them, `PUT …/{id}` replaces them; drafts only).",
        "required": [
          "billingMode",
          "billingInterval",
          "commitCents"
        ],
        "properties": {
          "autoRenew": {
            "type": "boolean"
          },
          "billingInterval": {
            "type": "string"
          },
          "billingMode": {
            "type": "string"
          },
          "commitCents": {
            "type": "integer",
            "format": "int64",
            "description": "The commitment per interval, cents."
          },
          "dedicatedClusterId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClusterId",
                "description": "Keep them on this cluster (`null` = any cluster with such nodes)."
              }
            ]
          },
          "dedicatedNodes": {
            "type": "boolean",
            "description": "Run the team's workloads on nodes dedicated to it (`fullsea.io/dedicated-team=<team id>`)."
          },
          "endsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` = one interval after the start, × `termIntervals`."
          },
          "notes": {
            "type": "string"
          },
          "overrides": {
            "description": "`EntitlementOverrides` as a JSON object (unknown fields are refused)."
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` = when activated."
          },
          "termIntervals": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Intervals in the term when `endsAt` is not given (default 1; a year billed monthly is 12).",
            "minimum": 0
          }
        }
      },
      "CorsRule": {
        "type": "object",
        "description": "One CORS rule (`storage_buckets.cors_rules`, the edge records' `corsRules`; the JSON shape is camelCase).",
        "required": [
          "allowedOrigins",
          "allowedMethods"
        ],
        "properties": {
          "allowedHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Request headers a browser may send (`*` = any, one `*` each: `x-amz-meta-*`); case-insensitive."
          },
          "allowedMethods": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Of `GET`, `PUT`, `POST`, `DELETE`, `HEAD`."
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`https://example.com`, `http://localhost:3000`, `https://*.example.com` or `*`."
          },
          "exposeHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Response headers the page may read (`ETag`)."
          },
          "maxAgeSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How long a browser may cache the preflight (at most a day).",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CostSummary": {
        "type": "object",
        "description": "What a storage change costs, on every create, resize and attach (REST and MCP `structuredContent.costSummary`;\nthe chat's cost pill reads it): included in the plan, or the pack price that would make room.",
        "required": [
          "includedInPlan",
          "extraMonthlyUsd",
          "planName",
          "poolLabel",
          "beforeUsedGib",
          "afterUsedGib",
          "limitGib"
        ],
        "properties": {
          "addonHint": {
            "type": [
              "string",
              "null"
            ],
            "description": "`+100 GiB available for $5/mo` when the plan sells the pool's pack."
          },
          "afterUsedGib": {
            "type": "number",
            "format": "double"
          },
          "beforeUsedGib": {
            "type": "number",
            "format": "double"
          },
          "extraMonthlyUsd": {
            "type": "number",
            "format": "double",
            "description": "What it adds to the monthly bill (0 when it fits the plan's pool)."
          },
          "includedInPlan": {
            "type": "boolean"
          },
          "limitGib": {
            "type": "integer",
            "format": "int64"
          },
          "planName": {
            "type": "string"
          },
          "poolLabel": {
            "type": "string",
            "description": "`Object Storage`, `Shared HDD`, `Fast NVMe`."
          }
        }
      },
      "CreateAdjustment": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/{id}/adjustments`: a bonus (positive) or a deduction (negative), payable at once.",
        "required": [
          "amountCents",
          "note"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "note": {
            "type": "string",
            "description": "Shown to the affiliate."
          }
        }
      },
      "CreateAdminMcpToken": {
        "type": "object",
        "description": "`POST /api/v1/admin/mcp/tokens`",
        "required": [
          "label",
          "scopes"
        ],
        "properties": {
          "allowedCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Addresses or CIDRs it may be used from (at most 20); empty: any."
          },
          "expiresInDays": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1–90 (default 30).",
            "minimum": 0
          },
          "label": {
            "type": "string",
            "description": "What it is for (\"Laptop Claude Code\"), 1–80 characters."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "At least one of `admin:read`, `admin:ops`, `admin:billing`, `admin:infra`."
          }
        },
        "additionalProperties": false
      },
      "CreateApiKey": {
        "type": "object",
        "description": "`POST /api/v1/api-keys`",
        "required": [
          "name",
          "scopes"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyScope"
            }
          }
        }
      },
      "CreateApp": {
        "type": "object",
        "description": "`POST /api/v1/apps` (and the MCP `create_app` tool).",
        "required": [
          "name",
          "source"
        ],
        "properties": {
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Replaces the image's `CMD` (its `ENTRYPOINT` still runs)."
          },
          "deploy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Default `true`: create the first release and deploy it."
          },
          "env": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "healthCheckPath": {
            "type": [
              "string",
              "null"
            ],
            "description": "Web and private services: an HTTP path the readiness and liveness checks GET."
          },
          "kind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppKind",
                "description": "Default `web`; the plan decides which kinds are allowed (`Entitlements.appKinds`)."
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Default 8080.",
            "minimum": 0
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "replicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Default 1.",
            "minimum": 0
          },
          "schedule": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required for `cron`: 5 fields (`0 3 * * *`) or `@daily`-style."
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default: the smallest size the plan allows."
          },
          "source": {
            "$ref": "#/components/schemas/AppSource"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "`cron` only; IANA name, default `UTC`."
          },
          "volumes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/NewAppVolume"
            },
            "description": "New volumes mounted into the app (they count toward the plan's storage and `maxVolumes`)."
          }
        }
      },
      "CreateBucket": {
        "type": "object",
        "description": "`POST /api/v1/buckets` → 201 [`BucketChange`].",
        "required": [
          "name"
        ],
        "properties": {
          "corsRules": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CorsRule"
            }
          },
          "name": {
            "type": "string",
            "description": "3–63 lower-case letters, digits and hyphens."
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "publicAccess": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Public from the start (default private)."
          },
          "quotaGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Whole GiB reserved from the Object Storage pool (default 10, or what is left when less)."
          }
        },
        "additionalProperties": false
      },
      "CreateBucketKey": {
        "type": "object",
        "description": "`POST /api/v1/buckets/{id}/keys` → 201 [`CreatedBucketKey`].",
        "required": [
          "label"
        ],
        "properties": {
          "allBuckets": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Valid for every bucket of the owner instead of this one (default `false`)."
          },
          "label": {
            "type": "string",
            "description": "What it is for (`laptop`, `ci`), at most 64 characters."
          },
          "permissions": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BucketPermission",
                "description": "Default `read_write`."
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "CreateCapacityRequest": {
        "type": "object",
        "description": "`POST /api/v1/capacity-requests` (signed out) and `POST /api/v1/billing/capacity-requests` (signed in, linked to\nthe team): a request for custom capacity or dedicated servers.",
        "required": [
          "contactName",
          "contactEmail",
          "companyName"
        ],
        "properties": {
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "preferredRegion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free text: `eu-west`, `Canada`, …"
          },
          "requestedObjectGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Object storage wanted, GiB."
          },
          "requestedRamGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Memory wanted in total, GiB."
          },
          "requestedStorageGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Fast NVMe storage wanted, GiB."
          },
          "wantsDedicatedNodes": {
            "type": "boolean"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "Left empty by people (a honeypot for bots: a filled one is accepted and dropped)."
          }
        }
      },
      "CreateContract": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ContractTermsInput"
          },
          {
            "type": "object",
            "properties": {
              "capacityRequestId": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CapacityRequestId",
                    "description": "Drafted from this request (linked, and its team used when `teamId` is absent)."
                  }
                ]
              },
              "ownerEmail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "teamId": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TeamId"
                  }
                ]
              }
            }
          }
        ],
        "description": "`POST /api/v1/admin/enterprise/contracts`: a new draft. The team is `teamId`, else the capacity request's team,\nelse the personal team of the account `ownerEmail` names."
      },
      "CreateDatabase": {
        "type": "object",
        "description": "`POST /api/v1/databases` (and MCP `manage_database` `create`).",
        "required": [
          "name"
        ],
        "properties": {
          "allowedCidrs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "With `externalAccess`: the source CIDRs allowed (default: anywhere)."
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default `postgres`."
          },
          "externalAccess": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Default `false`: reachable only from apps in the cluster. `true` needs a plan with external access."
          },
          "name": {
            "type": "string"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default: the smallest size the plan allows."
          },
          "storageGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Default: the engine's default storage."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default: the engine's default version."
          }
        }
      },
      "CreateEnvironment": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/environments`.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "`staging` (pull request previews are made by GitHub's webhooks)."
          }
        },
        "additionalProperties": false
      },
      "CreateInvitation": {
        "type": "object",
        "description": "`POST /api/v1/teams/{team}/invitations`",
        "required": [
          "email",
          "role"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          }
        }
      },
      "CreatePayoutBatch": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/payout-batches`",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreatePoolCredential": {
        "type": "object",
        "description": "`POST /api/v1/admin/agent-pool/credentials`.",
        "required": [
          "label",
          "provider",
          "secret"
        ],
        "properties": {
          "baseUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTPS; required for `custom_proxy` (an Anthropic-compatible gateway), optional otherwise."
          },
          "enabled": {
            "type": "boolean"
          },
          "label": {
            "type": "string",
            "description": "1–80 characters."
          },
          "maxConcurrentTurns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1–1000 (default 4).",
            "minimum": 0
          },
          "provider": {
            "$ref": "#/components/schemas/PoolProvider"
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required for `bedrock` (an AWS region) and `vertex` (a location such as `us-east5` or `global`)."
          },
          "secret": {
            "type": "string",
            "description": "An Anthropic API key (`sk-ant-…`, never a Claude subscription token), a gateway key, a Bedrock API\nkey, or a Vertex service-account key (JSON)."
          },
          "tier": {
            "$ref": "#/components/schemas/PoolTier"
          },
          "weight": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1–100 (default 1).",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "CreateProject": {
        "type": "object",
        "description": "`POST /api/v1/projects`",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "CreateSupportTicket": {
        "type": "object",
        "description": "`POST /api/v1/support/tickets` (JSON, or `multipart/form-data` with the same fields plus `files`).",
        "required": [
          "subject",
          "category",
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/TicketCategory"
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resourceKind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketResourceKind"
              }
            ]
          },
          "subject": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateTeam": {
        "type": "object",
        "description": "`POST /api/v1/teams`",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "CreateVolume": {
        "type": "object",
        "description": "`POST /api/v1/volumes` → 201. With `appId` the volume is mounted into that app at `mountPath` (default `/data`)\nand the app is redeployed with it.",
        "required": [
          "name",
          "sizeGib"
        ],
        "properties": {
          "appId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppId"
              }
            ]
          },
          "mountPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          },
          "tier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VolumeTier",
                "description": "`shared_nfs` or `local_nvme`. Absent: a Shared App Disk where the cluster offers one (never for a database's\nimage), else a local disk."
              }
            ]
          }
        }
      },
      "CreatedAdminMcpToken": {
        "type": "object",
        "description": "`POST /api/v1/admin/mcp/tokens` → 201: the secret is shown this once.",
        "required": [
          "token",
          "secret"
        ],
        "properties": {
          "secret": {
            "type": "string",
            "description": "`fsadm_…`: shown once, stored only as its SHA-256."
          },
          "token": {
            "$ref": "#/components/schemas/AdminMcpTokenDto"
          }
        }
      },
      "CreatedApiKey": {
        "type": "object",
        "description": "`POST /api/v1/api-keys` → 201; the secret is shown once.",
        "required": [
          "apiKey",
          "secret"
        ],
        "properties": {
          "apiKey": {
            "$ref": "#/components/schemas/ApiKeyDto"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "CreatedBucketKey": {
        "type": "object",
        "description": "A new key with its secret, shown this once (Fullsea keeps it sealed; it cannot be shown again).",
        "required": [
          "key",
          "secretAccessKey",
          "endpoint",
          "region",
          "bucket"
        ],
        "properties": {
          "bucket": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "key": {
            "$ref": "#/components/schemas/BucketKeyDto"
          },
          "region": {
            "type": "string"
          },
          "secretAccessKey": {
            "type": "string",
            "description": "`S3_SECRET_ACCESS_KEY`: 40 characters."
          }
        }
      },
      "CreditBalance": {
        "type": "object",
        "description": "The credit of one account. `balanceCents = allowanceCents + purchasedCents` and may be negative after an\noverrunning turn; `availableCents = balanceCents − reservedCents` is what a new builder turn may spend.",
        "required": [
          "balanceCents",
          "allowanceCents",
          "purchasedCents",
          "reservedCents",
          "availableCents",
          "monthlyCents",
          "signupCents"
        ],
        "properties": {
          "allowanceCents": {
            "type": "integer",
            "format": "int64",
            "description": "Monthly grants and the trial: topped up to the plan's amount each period, never accumulates."
          },
          "availableCents": {
            "type": "integer",
            "format": "int64"
          },
          "balanceCents": {
            "type": "integer",
            "format": "int64"
          },
          "instantCents": {
            "type": "integer",
            "format": "int64",
            "description": "The instant build credit a Google sign-up gets once, no card (the default plan's `aiCreditsInstantCents`)."
          },
          "monthlyCents": {
            "type": "integer",
            "format": "int64",
            "description": "The plan's monthly grant (`aiCreditsMonthlyCents`)."
          },
          "purchasedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Top-ups: roll over forever, spent after the allowance."
          },
          "reservedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Held by running builder turns."
          },
          "signupCents": {
            "type": "integer",
            "format": "int64",
            "description": "The free trial credit a verified card unlocks once (the default plan's `aiCreditsCardTrialCents`)."
          }
        }
      },
      "CreditBucket": {
        "type": "string",
        "description": "`credit_ledger.bucket`",
        "enum": [
          "Allowance",
          "Purchased"
        ]
      },
      "CreditEntryDto": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "bucket",
          "amountCents",
          "description",
          "reference",
          "details",
          "createdAt"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64",
            "description": "Rounded toward zero; negative for debits."
          },
          "balanceAfterCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The balance (both buckets) right after this entry; `null` where it is not computed (admin lists)."
          },
          "bucket": {
            "$ref": "#/components/schemas/CreditBucket",
            "description": "`allowance` or `purchased`; a debit across both is two entries with the same reference."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "description": "A sentence for people (\"Monthly AI credit (Pro)\", \"Top-up $25.00\", \"Builder turn\", …)."
          },
          "details": {},
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/CreditKind"
          },
          "reference": {
            "type": "string",
            "description": "`signup`, `trial`, `instant`, `invoice:<id>`, `annual:<sub>:<yyyy-mm>`, `topup:<cs>`, `auto_topup:<pi>`,\n`turn:<session>:<seq>`, `adjustment:<uuid>`"
          }
        }
      },
      "CreditKind": {
        "type": "string",
        "description": "`credit_ledger.kind`",
        "enum": [
          "GrantSignup",
          "GrantPeriod",
          "TurnDebit",
          "Adjustment",
          "Topup",
          "TrialGrant",
          "InstantGrant"
        ]
      },
      "CreditSourcesDto": {
        "type": "object",
        "description": "The rolling-over credit of a team (`CreditBalance.purchasedCents`) by where it came from, the oldest credit spent\nfirst (`fullsea_domain::credits::rollover_split`). Cents, rounded toward zero; the parts sum to the bucket's\nbalance unless it is overspent (then every part is 0).",
        "required": [
          "signupGrantCents",
          "topupCents",
          "autoTopupCents",
          "supportCents"
        ],
        "properties": {
          "autoTopupCents": {
            "type": "integer",
            "format": "int64",
            "description": "Automatic top-ups."
          },
          "signupGrantCents": {
            "type": "integer",
            "format": "int64",
            "description": "Granted at sign-up (the instant build credit), never paid for."
          },
          "supportCents": {
            "type": "integer",
            "format": "int64",
            "description": "Given by support (credit adjustments)."
          },
          "topupCents": {
            "type": "integer",
            "format": "int64",
            "description": "Top-up packs bought through Checkout."
          }
        }
      },
      "CreditsDto": {
        "type": "object",
        "description": "`GET /api/v1/credits`: the balance and one page of the ledger, newest first.",
        "required": [
          "balance",
          "entries"
        ],
        "properties": {
          "balance": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditEntryDto"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next (older) page; `null` on the last one."
          }
        }
      },
      "CreditsQuery": {
        "type": "object",
        "description": "`GET /api/v1/credits?bucket=&kind=&cursor=&limit=` (limit 1..=200, default 100).",
        "properties": {
          "bucket": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreditBucket"
              }
            ]
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreditKind"
              }
            ]
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CronRunDto": {
        "type": "object",
        "description": "One run of a cron app (`GET /api/v1/apps/{id}/runs`, newest first; the cluster keeps the last 3 successful and\n3 failed runs). `POST /api/v1/apps/{id}/run` → 201 with the run it started.",
        "required": [
          "name",
          "trigger",
          "status"
        ],
        "properties": {
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a run failed (`BackoffLimitExceeded`, `DeadlineExceeded`, a container's exit)."
          },
          "name": {
            "type": "string",
            "description": "The Job's name."
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/CronRunStatus"
          },
          "trigger": {
            "$ref": "#/components/schemas/CronRunTrigger"
          }
        }
      },
      "CronRunStatus": {
        "type": "string",
        "description": "A cron app run's state (`CronRunDto.status`).",
        "enum": [
          "Running",
          "Succeeded",
          "Failed"
        ]
      },
      "CronRunTrigger": {
        "type": "string",
        "description": "How a cron app run started.",
        "enum": [
          "Scheduled",
          "Manual"
        ]
      },
      "CsrfDto": {
        "type": "object",
        "description": "`GET /api/v1/csrf`",
        "required": [
          "csrfToken"
        ],
        "properties": {
          "csrfToken": {
            "type": "string"
          }
        }
      },
      "DataColumnDto": {
        "type": "object",
        "required": [
          "name",
          "dataType",
          "kind",
          "nullable",
          "primaryKey"
        ],
        "properties": {
          "dataType": {
            "type": "string",
            "description": "The engine's type (`timestamp with time zone`, `varchar(255)`)."
          },
          "default": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/CellKind"
          },
          "name": {
            "type": "string"
          },
          "nullable": {
            "type": "boolean"
          },
          "primaryKey": {
            "type": "boolean"
          }
        }
      },
      "DataConstraintDto": {
        "type": "object",
        "required": [
          "name",
          "kind",
          "definition"
        ],
        "properties": {
          "definition": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "`primary key`, `unique`, `foreign key`, `check` or `exclusion`."
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DataExportRequest": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/data/export`: one table, or one read-only query, as a file.",
        "properties": {
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "description": "The download's name (default `<table or database>-<date>.<format>`)."
          },
          "format": {
            "$ref": "#/components/schemas/ExportFormat"
          },
          "formulaGuard": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "CSV: guard cells against spreadsheet formulas (default true)."
          },
          "localDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The person's date where they are (`YYYY-MM-DD`; the dashboard sends its own): the default name's date. Without\nit, or more than a day from UTC's, the name carries UTC's date marked `Z` (`orders-2026-12-01Z.csv`)."
          },
          "sql": {
            "type": [
              "string",
              "null"
            ],
            "description": "One `SELECT` (or `WITH … SELECT`, `VALUES`, `TABLE`); never with `table`."
          },
          "table": {
            "type": [
              "string",
              "null"
            ],
            "description": "`schema.table` or `table`."
          }
        },
        "additionalProperties": false
      },
      "DataExportStarted": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/data/export` → 202: the export queued for the worker; follow `operation`\n(`GET /api/v1/operations/{id}/events?waitMs=`), then read [`DataTransferDto`].",
        "required": [
          "operation",
          "transfer"
        ],
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          },
          "transfer": {
            "$ref": "#/components/schemas/TransferCardDto",
            "description": "`state: running`, with the file's name and where it comes from."
          }
        }
      },
      "DataIndexDto": {
        "type": "object",
        "required": [
          "name",
          "definition",
          "unique",
          "primary"
        ],
        "properties": {
          "definition": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          },
          "unique": {
            "type": "boolean"
          }
        }
      },
      "DataOverviewDto": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/data`: what the browser can show.",
        "required": [
          "databaseId",
          "engine",
          "mode",
          "schemas",
          "tables",
          "readOnly"
        ],
        "properties": {
          "databaseId": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "engine": {
            "type": "string"
          },
          "keyCount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Redis/Valkey: how many keys the database holds."
          },
          "mode": {
            "type": "string",
            "description": "`sql` (tables) or `keys` (Redis, Valkey)."
          },
          "readOnly": {
            "type": "boolean",
            "description": "Always true: the browser never writes (the SQL console does)."
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Postgres schemas with tables (MySQL/MariaDB: one, `null`-named)."
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataTableDto"
            }
          }
        }
      },
      "DataTableDto": {
        "type": "object",
        "description": "One table or view in the overview.",
        "required": [
          "name",
          "kind"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "`table`, `view` or `materialized view`."
          },
          "name": {
            "type": "string"
          },
          "rowsEstimate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The engine's estimate (`null` when it has none yet)."
          },
          "schema": {
            "type": [
              "string",
              "null"
            ],
            "description": "Postgres schema; `null` for MySQL and MariaDB (the database itself)."
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Table plus indexes, in bytes."
          }
        }
      },
      "DataTransferDto": {
        "type": "object",
        "description": "`GET /api/v1/artifacts/transfers/{operationId}`: a worker's export or import as it stands — running, or its\noutcome, and once an export succeeded its file.",
        "required": [
          "operation",
          "transfer"
        ],
        "properties": {
          "artifact": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactDto"
              }
            ]
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          },
          "transfer": {
            "$ref": "#/components/schemas/TransferCardDto"
          }
        }
      },
      "DatabaseCredentials": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/credentials` (`409 conflict` until `available`). Redis and Valkey have no user or\ndatabase to pick: `username` is `default` (the ACL user the password belongs to) and `databaseName` is `0`.",
        "required": [
          "databaseId",
          "engine",
          "username",
          "password",
          "databaseName",
          "internalHost",
          "internalPort",
          "internalUrl"
        ],
        "properties": {
          "databaseId": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "databaseName": {
            "type": "string"
          },
          "engine": {
            "type": "string"
          },
          "externalUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "From outside, TLS required: `postgres://…?sslmode=require`, `mysql://…?ssl-mode=REQUIRED`, `rediss://…`."
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "The TLS host and port from outside; `null` while external access is off."
          },
          "internalHost": {
            "type": "string",
            "description": "For apps in the cluster."
          },
          "internalPort": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "internalUrl": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "username": {
            "type": "string"
          }
        }
      },
      "DatabaseDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "engine",
          "version",
          "size",
          "storageGib",
          "status",
          "clusterId",
          "clusterName",
          "namespace",
          "createdAt",
          "updatedAt",
          "externalAccess",
          "allowedCidrs"
        ],
        "properties": {
          "allowedCidrs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Source CIDRs external access is limited to; empty = anywhere."
          },
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "engine": {
            "type": "string"
          },
          "externalAccess": {
            "type": "boolean",
            "description": "Opt-in access from outside Fullsea, over TLS only (off for new databases)."
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "The TLS host clients connect to from outside (`<slug>-<handle>.<db domain>`, also the TLS server name);\n`null` while external access is off."
          },
          "id": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "name": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The port from outside: the engine family's (5432, 3306, 6379), shared by every database; `null` while\nexternal access is off.",
            "minimum": 0
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "size": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DatabaseStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "DatabaseHealthDto": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/health`: connections and cache hit ratio read from the engine now, the disk and its\nforecast from the samples.",
        "required": [
          "databaseId",
          "name",
          "engine",
          "status",
          "disk",
          "restarts24h",
          "oomKills24h",
          "canResize",
          "measuredAt"
        ],
        "properties": {
          "activeConnections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "cacheHitPercent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Reads served from memory (percent): Postgres' buffer cache, InnoDB's buffer pool, Redis keyspace hits."
          },
          "canResize": {
            "type": "boolean",
            "description": "The plan has a bigger size or more storage to move to (opens the database's Resize dialog)."
          },
          "cpuMillis": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "databaseId": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "disk": {
            "$ref": "#/components/schemas/DiskHealthDto"
          },
          "engine": {
            "type": "string"
          },
          "maxConnections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "measuredAt": {
            "type": "string",
            "format": "date-time"
          },
          "memoryLimitMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "memoryMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "name": {
            "type": "string"
          },
          "oomKills24h": {
            "type": "integer",
            "format": "int32"
          },
          "restarts24h": {
            "type": "integer",
            "format": "int32"
          },
          "statsError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the engine's numbers are missing (not running, did not answer)."
          },
          "status": {
            "type": "string"
          }
        }
      },
      "DatabaseId": {
        "type": "string",
        "format": "uuid",
        "description": "`databases.id`"
      },
      "DatabaseResizeOptions": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/resize`: what the database may be resized to right now.",
        "required": [
          "databaseId",
          "size",
          "storageGib",
          "sizes",
          "storage"
        ],
        "properties": {
          "databaseId": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "A resize queued or under way (its progress), else `null`."
              }
            ]
          },
          "size": {
            "type": "string",
            "description": "The size and volume it runs with now."
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResizeSizeOption"
            },
            "description": "Every size of the catalog, in catalog order, with whether this database may move to it."
          },
          "storage": {
            "$ref": "#/components/schemas/StorageGrowth"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "DatabaseStatus": {
        "type": "string",
        "description": "`databases.status`",
        "enum": [
          "Pending",
          "Provisioning",
          "Available",
          "Failed",
          "Deleting",
          "Deleted"
        ]
      },
      "DatabaseUpdate": {
        "type": "object",
        "description": "`PATCH /api/v1/databases/{id}` → 200: the database as it now reads and the operation applying the change\n(`null` when nothing changed).",
        "required": [
          "database"
        ],
        "properties": {
          "database": {
            "$ref": "#/components/schemas/DatabaseDto"
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          }
        }
      },
      "DatabaseWithOperation": {
        "type": "object",
        "description": "`POST /api/v1/databases` → 201",
        "required": [
          "database",
          "operation"
        ],
        "properties": {
          "database": {
            "$ref": "#/components/schemas/DatabaseDto"
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          }
        }
      },
      "DedicatedNodeDto": {
        "type": "object",
        "description": "A node and its dedication (`GET /api/v1/admin/enterprise/nodes`).",
        "required": [
          "id",
          "clusterId",
          "clusterName",
          "name",
          "role",
          "status",
          "schedulable",
          "contractInForce",
          "otherTaints",
          "cpuAllocatableMillis",
          "memoryAllocatableMib",
          "cpuFreeMillis",
          "memoryFreeMib",
          "storageAllocatableGib"
        ],
        "properties": {
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "contractInForce": {
            "type": "boolean",
            "description": "That team holds a contract in force with dedicated nodes."
          },
          "cpuAllocatableMillis": {
            "type": "integer",
            "format": "int64"
          },
          "cpuFreeMillis": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "$ref": "#/components/schemas/NodeId"
          },
          "memoryAllocatableMib": {
            "type": "integer",
            "format": "int64"
          },
          "memoryFreeMib": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "otherTaints": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other `NoSchedule`/`NoExecute` taints (a build node, …): such a node takes no tenant placement."
          },
          "role": {
            "type": "string"
          },
          "schedulable": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "storageAllocatableGib": {
            "type": "integer",
            "format": "int64"
          },
          "teamId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamId",
                "description": "The team it is dedicated to (`null` = the shared pool or another taint)."
              }
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DeleteTeam": {
        "type": "object",
        "description": "`DELETE /api/v1/teams/{team}`: the team's name, typed again.",
        "required": [
          "confirm"
        ],
        "properties": {
          "confirm": {
            "type": "string"
          }
        }
      },
      "DeployApp": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/deploy`; without `source` the app's current source is deployed again.",
        "properties": {
          "source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppSource"
              }
            ]
          }
        }
      },
      "DeploySummaryDto": {
        "type": "object",
        "description": "The deploy an error group was last seen under: what a \"Fix with AI\" prompt attaches.",
        "required": [
          "releaseId",
          "number",
          "trigger",
          "source",
          "summary"
        ],
        "properties": {
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "imageRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "previousNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The release before it, when there is one."
          },
          "releaseId": {
            "$ref": "#/components/schemas/ReleaseId"
          },
          "runtime": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "description": "`workspace`, `git` or `image`."
          },
          "summary": {
            "type": "string",
            "description": "One sentence: \"r7 deployed from the workspace 12 minutes before the first error (r6 before it)\"."
          },
          "trigger": {
            "type": "string",
            "description": "`deploy`, `config` or `rollback`."
          }
        }
      },
      "DeployTemplate": {
        "type": "object",
        "description": "`POST /api/v1/templates/{code}/deploy`. `inputs` maps input names to strings or booleans; absent ones take\ntheir defaults, an empty generated password is generated. Without `projectId` the stack gets a new project\nnamed like it (an AI starter always does).",
        "required": [
          "name"
        ],
        "properties": {
          "inputs": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "DiagnosticAddon": {
        "type": "object",
        "required": [
          "code",
          "quantity"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DiagnosticFact": {
        "type": "object",
        "required": [
          "label",
          "value"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "DiagnosticIncident": {
        "type": "object",
        "required": [
          "id",
          "ruleName",
          "kind",
          "resourceName",
          "message",
          "openedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "resourceName": {
            "type": "string"
          },
          "ruleName": {
            "type": "string"
          }
        }
      },
      "DiagnosticLogs": {
        "type": "object",
        "required": [
          "source",
          "lines"
        ],
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why there are no lines, when there are none."
          },
          "source": {
            "type": "string",
            "description": "`runtime` (the workload's own output) | `build` (the failed deploy's log)"
          }
        }
      },
      "DiagnosticOperation": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "targetKind",
          "targetId",
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "targetId": {
            "type": "string",
            "format": "uuid"
          },
          "targetKind": {
            "type": "string"
          }
        }
      },
      "DiagnosticPlan": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "interval": {
            "type": [
              "string",
              "null"
            ],
            "description": "`month` | `year`, when subscribed."
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The subscription's status (`active`, `past_due`, …); `None` on Free."
          }
        }
      },
      "DiagnosticResource": {
        "type": "object",
        "required": [
          "kind",
          "id",
          "facts"
        ],
        "properties": {
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticFact"
            },
            "description": "Size, engine, URL and the like."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/TicketResourceKind"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DiskHealthDto": {
        "type": "object",
        "description": "The disk of a database, and when it would be full.",
        "properties": {
          "capacityMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "fullInDays": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Days until full at that rate; `null` when not growing or not enough history."
          },
          "growthMibPerDay": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "MiB a day over the last week (negative: shrinking)."
          },
          "percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "usedMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        }
      },
      "DomainId": {
        "type": "string",
        "format": "uuid",
        "description": "`domains.id`"
      },
      "EdgePasswordDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/edge/password` (the owner only).",
        "required": [
          "user",
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          },
          "user": {
            "type": "string"
          }
        }
      },
      "EdgeRouteId": {
        "type": "string",
        "format": "uuid",
        "description": "`edge_routes.id`"
      },
      "EffortLevel": {
        "type": "object",
        "description": "One effort level of the policy (the adapter's `effort` option value).",
        "required": [
          "id",
          "label",
          "short",
          "minPlan"
        ],
        "properties": {
          "costly": {
            "type": "boolean",
            "description": "Uses noticeably more credit (the picker shows a soft hint)."
          },
          "hint": {
            "type": [
              "string",
              "null"
            ],
            "description": "One line in the picker."
          },
          "id": {
            "type": "string",
            "description": "`medium`"
          },
          "label": {
            "type": "string",
            "description": "`Medium`"
          },
          "minPlan": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "short": {
            "type": "string",
            "description": "The pill's short form on a narrow screen (`Med`)."
          }
        },
        "additionalProperties": false
      },
      "EffortOptionDto": {
        "type": "object",
        "description": "One effort level the picker offers.",
        "required": [
          "value",
          "label",
          "short",
          "costly"
        ],
        "properties": {
          "costly": {
            "type": "boolean",
            "description": "Uses noticeably more credit: the picker shows a soft hint."
          },
          "hint": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string",
            "description": "`Medium`"
          },
          "locked": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ModelLockDto"
              }
            ]
          },
          "short": {
            "type": "string",
            "description": "The pill's form on a narrow screen (`Med`)."
          },
          "value": {
            "type": "string",
            "description": "`medium`"
          }
        }
      },
      "EffortOverride": {
        "type": "object",
        "description": "What an override changes in one effort level: the cheapest plan that may use it (so, per plan, up to which\neffort its platform-key turns go).",
        "properties": {
          "minPlan": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PlanCode"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "EngineDto": {
        "type": "object",
        "required": [
          "code",
          "name",
          "versions",
          "defaultVersion",
          "status",
          "enabled",
          "defaultSize",
          "defaultStorageGib",
          "port"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "defaultSize": {
            "type": "string"
          },
          "defaultStorageGib": {
            "type": "integer",
            "format": "int64"
          },
          "defaultVersion": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "description": "`false` when an admin disabled it (`catalog_overrides`)."
          },
          "minSize": {
            "type": [
              "string",
              "null"
            ],
            "description": "The smallest size the engine runs in; `null` = any size."
          },
          "name": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "$ref": "#/components/schemas/EngineStatus"
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EngineFamily": {
        "type": "string",
        "description": "What a preview database is for, one of each per project at most (`preview_databases.family`).",
        "enum": [
          "Postgres",
          "Mysql",
          "Redis"
        ]
      },
      "EngineStatus": {
        "type": "string",
        "description": "A catalog engine's status: `planned` entries are listed but cannot be created (PLAN.md §5).",
        "enum": [
          "Available",
          "Planned"
        ]
      },
      "EnterpriseBillingDto": {
        "type": "object",
        "description": "`GET /api/v1/billing/enterprise`: the contract the Billing page shows (`null` without one) and the team's\ncapacity requests.",
        "required": [
          "requests"
        ],
        "properties": {
          "contract": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamContractDto"
              }
            ]
          },
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacityRequestDto"
            }
          }
        }
      },
      "EnterpriseContractId": {
        "type": "string",
        "format": "uuid",
        "description": "`enterprise_contracts.id`"
      },
      "EnterpriseSummaryDto": {
        "type": "object",
        "description": "The enterprise figures the admin overview and the attention queue read (`GET /api/v1/admin/enterprise/summary`).",
        "required": [
          "contractsInForce",
          "drafts",
          "quoted",
          "expiringSoon",
          "committedMonthlyCents",
          "openRequests",
          "unassignedRequests",
          "dedicatedNodes"
        ],
        "properties": {
          "committedMonthlyCents": {
            "type": "integer",
            "format": "int64",
            "description": "Σ monthly commitment of the contracts in force."
          },
          "contractsInForce": {
            "type": "integer",
            "format": "int64"
          },
          "dedicatedNodes": {
            "type": "integer",
            "format": "int64",
            "description": "Nodes dedicated to a team."
          },
          "drafts": {
            "type": "integer",
            "format": "int64"
          },
          "expiringSoon": {
            "type": "integer",
            "format": "int64",
            "description": "Contracts in force ending within 60 days."
          },
          "openRequests": {
            "type": "integer",
            "format": "int64",
            "description": "Capacity requests that are `new` or `reviewing`."
          },
          "quoted": {
            "type": "integer",
            "format": "int64"
          },
          "unassignedRequests": {
            "type": "integer",
            "format": "int64",
            "description": "Open requests nobody is assigned to."
          }
        }
      },
      "Entitlements": {
        "type": "object",
        "required": [
          "canPublishLive",
          "maxApps",
          "maxDatabases",
          "cpuMillis",
          "memoryMib",
          "storageGib",
          "sizes",
          "engines",
          "appKinds",
          "maxVolumes",
          "backupRetentionDays",
          "onDemandBackups",
          "alertChannels",
          "externalDbAccess",
          "maxConcurrentTurns",
          "publicStatusPage",
          "priorityBuilds",
          "builder",
          "aiCreditsMonthlyCents",
          "aiCreditsInstantCents",
          "aiCreditsCardTrialCents"
        ],
        "properties": {
          "aiCreditsCardTrialCents": {
            "type": "integer",
            "format": "int64",
            "description": "Granted once when a card no other account used is verified (free: 125)."
          },
          "aiCreditsInstantCents": {
            "type": "integer",
            "format": "int64",
            "description": "Granted once at a Google sign-up, no card (free: 75)."
          },
          "aiCreditsMonthlyCents": {
            "type": "integer",
            "format": "int64",
            "description": "Granted each paid billing period (top-up to this amount)."
          },
          "aiTriage": {
            "type": "boolean",
            "description": "An incident may start a read-only AI investigation (PLAN.md §18.A; Pro and up)."
          },
          "alertChannels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`email`, `webhook`, `slack`, `discord`, `telegram`"
          },
          "appKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`web`, `private`, `worker`, `cron`"
          },
          "backupRetentionDays": {
            "type": "integer",
            "format": "int32",
            "description": "`0` = no automated backups.",
            "minimum": 0
          },
          "builder": {
            "type": "boolean"
          },
          "canPublishLive": {
            "type": "boolean",
            "description": "Apps, databases, volumes and stacks may be created and deployed (Free: `false`, it builds and previews)."
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64",
            "description": "The CPU pool: the sum of the CPU limits (burst vCPU, `SizeDto.cpuLimitMillis`) of what the user runs."
          },
          "engines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalDbAccess": {
            "type": "boolean"
          },
          "managedEmailDaily": {
            "type": "integer",
            "format": "int32",
            "description": "Messages a day the managed outbound email relay accepts for the account (`0`: none).",
            "minimum": 0
          },
          "maxApps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "maxBuckets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Object Storage buckets; `null` = unlimited.",
            "minimum": 0
          },
          "maxConcurrentTurns": {
            "type": "integer",
            "format": "int32",
            "description": "Builder turns that may run at once across the account.",
            "minimum": 0
          },
          "maxCustomDomains": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` = unlimited.",
            "minimum": 0
          },
          "maxDatabases": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "maxTeamSeats": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Team members including the owner; `null` = unlimited. Not enforced until teams land.",
            "minimum": 0
          },
          "maxVolumes": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "objectStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "The Object Storage pool, GiB: the sum of the bucket quotas (Tier 3)."
          },
          "onDemandBackups": {
            "type": "boolean"
          },
          "priorityBuilds": {
            "type": "boolean"
          },
          "publicStatusPage": {
            "type": "boolean"
          },
          "sharedStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "The Shared App Disk pool in GiB (`shared_nfs` volumes; they do not count toward `storageGib`)."
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EntityEventDto": {
        "type": "object",
        "description": "One change: which row, and its status afterwards. Nothing else: the page re-reads the row through its usual\nroute.",
        "required": [
          "topic",
          "id",
          "teamId",
          "op"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "op": {
            "$ref": "#/components/schemas/EntityOp"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The row's status after the change (`running`, `approved`, …)."
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "description": "The team the row belongs to (the stream carries the caller's active team only)."
          },
          "topic": {
            "$ref": "#/components/schemas/EntityTopic"
          }
        }
      },
      "EntityOp": {
        "type": "string",
        "description": "What happened to the row (a soft delete is an `update` to the status `deleted`).",
        "enum": [
          "insert",
          "update",
          "delete"
        ]
      },
      "EntityTopic": {
        "type": "string",
        "description": "The table a change happened in.",
        "enum": [
          "apps",
          "databases",
          "volumes",
          "stacks",
          "domains",
          "backups",
          "approvals",
          "operations",
          "secret_requests",
          "chat_cards",
          "support_tickets",
          "affiliate_commissions",
          "affiliate_payouts",
          "storage_buckets"
        ]
      },
      "EnvEntryDto": {
        "type": "object",
        "description": "One variable. `value` is `null` unless the request asked to reveal values.",
        "required": [
          "key",
          "source",
          "overridden"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "overridden": {
            "type": "boolean",
            "description": "A project variable the app sets itself (the app's value wins), or an app variable that replaces the\nproject's."
          },
          "source": {
            "$ref": "#/components/schemas/EnvSource"
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EnvPatch": {
        "type": "object",
        "description": "`PATCH /api/v1/apps/{id}/env` and `PATCH /api/v1/projects/{id}/env`: keys in `set` are added or replaced, keys\nin `unset` removed; every other key keeps its value.",
        "properties": {
          "set": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "unset": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EnvSource": {
        "type": "string",
        "description": "Where an app's variable comes from.",
        "enum": [
          "app",
          "project"
        ]
      },
      "EnvironmentAppDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/AppId"
          },
          "name": {
            "type": "string"
          },
          "sourceAppId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppId",
                "description": "The production app it copies."
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EnvironmentDatabaseDto": {
        "type": "object",
        "description": "A database of an environment (PLAN.md §27.EN): fresh and empty when made, of the engine, version, size and storage\nof the production database its copies use, which their variables name in that one's place. An ordinary database\nof the team otherwise (`GET /databases/{id}`, credentials, SQL), deleted with the environment.",
        "required": [
          "id",
          "name",
          "engine",
          "version",
          "size",
          "storageGib",
          "status"
        ],
        "properties": {
          "engine": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "name": {
            "type": "string",
            "description": "`<production name> (<environment>)`."
          },
          "size": {
            "type": "string"
          },
          "sourceDatabaseId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DatabaseId",
                "description": "The production database it stands in for."
              }
            ]
          },
          "sourceName": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DatabaseStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "EnvironmentDto": {
        "type": "object",
        "required": [
          "id",
          "projectId",
          "name",
          "kind",
          "status",
          "apps",
          "databases",
          "ownDatabases",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "apps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvironmentAppDto"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvironmentDatabaseDto"
            },
            "description": "Its own databases, one for each production database its copies use (live ones; none before v6)."
          },
          "id": {
            "$ref": "#/components/schemas/EnvironmentId"
          },
          "kind": {
            "$ref": "#/components/schemas/EnvironmentKind"
          },
          "name": {
            "type": "string",
            "description": "`staging` or `pr-<number>`."
          },
          "ownDatabases": {
            "type": "boolean",
            "description": "Made with databases of its own. `false` for an environment made before environments had them: its copies keep\ntheir source's variables, and it gets databases only when it is deleted and made again."
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "pullRequest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PullRequestDto"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EnvironmentStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnvironmentId": {
        "type": "string",
        "format": "uuid",
        "description": "`environments.id`"
      },
      "EnvironmentKind": {
        "type": "string",
        "description": "`environments.kind`",
        "enum": [
          "Staging",
          "Preview"
        ]
      },
      "EnvironmentStatus": {
        "type": "string",
        "description": "`environments.status`",
        "enum": [
          "Active",
          "Deleting",
          "Deleted"
        ]
      },
      "ErrorCode": {
        "type": "string",
        "description": "The 13 wire codes. The HTTP status is [`ErrorCode::status`]; a route answering `501` for a feature that has not\nlanded uses `internal` with `retryable: false`.",
        "enum": [
          "invalid_request",
          "validation_failed",
          "unauthenticated",
          "forbidden",
          "not_found",
          "conflict",
          "quota_exceeded",
          "plan_restricted",
          "no_capacity",
          "payment_required",
          "rate_limited",
          "provider_unavailable",
          "internal",
          "overflow_acceptance_required"
        ]
      },
      "ErrorEnvelope": {
        "type": "object",
        "description": "Every non-2xx response of `fullsea-api` and `fullsea-builder`.",
        "required": [
          "code",
          "message",
          "requestId",
          "retryable"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "details": {
            "description": "`validation_failed`: [`ValidationDetails`]; `quota_exceeded`: [`QuotaDetails`]; `payment_required`:\n[`PaymentDetails`] (`upgrade`, when an upgrade or a top-up lifts the refusal)."
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          }
        }
      },
      "ErrorGroupDto": {
        "type": "object",
        "description": "Repeated errors of one app grouped by fingerprint (stack traces with numbers, ids and addresses taken out), or\na burst of 5xx answers.",
        "required": [
          "id",
          "appId",
          "appName",
          "kind",
          "status",
          "title",
          "sample",
          "fingerprint",
          "count",
          "count5m",
          "count24h",
          "firstSeenAt",
          "lastSeenAt"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64"
          },
          "count24h": {
            "type": "integer",
            "format": "int64"
          },
          "count5m": {
            "type": "integer",
            "format": "int64"
          },
          "deploy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeploySummaryDto"
              }
            ]
          },
          "fingerprint": {
            "type": "string"
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ErrorGroupId"
          },
          "kind": {
            "$ref": "#/components/schemas/ErrorGroupKind"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "sample": {
            "type": "string",
            "description": "The newest occurrence as logged (up to 8 KiB): the stack trace \"Fix with AI\" sends."
          },
          "status": {
            "$ref": "#/components/schemas/ErrorGroupStatus"
          },
          "title": {
            "type": "string",
            "description": "The error's first line (\"TypeError: Cannot read properties of undefined (reading 'id')\")."
          }
        }
      },
      "ErrorGroupId": {
        "type": "string",
        "format": "uuid",
        "description": "`error_groups.id`: repeated errors of an app grouped by fingerprint"
      },
      "ErrorGroupKind": {
        "type": "string",
        "description": "`error_groups.kind`",
        "enum": [
          "Exception",
          "LogError",
          "Http5xx"
        ]
      },
      "ErrorGroupStatus": {
        "type": "string",
        "description": "`error_groups.status`",
        "enum": [
          "Open",
          "Resolved",
          "Ignored"
        ]
      },
      "ErrorPayload": {
        "type": "object",
        "description": "`error`; `code` is an `ErrorCode` wire name such as `payment_required` when one applies. A turn the spend\nguardrail stopped carries the out-of-credit offer (`upgrade`, PLAN.md §18.0) the chat shows as a card.",
        "required": [
          "message"
        ],
        "properties": {
          "code": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorCode"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer"
              }
            ]
          }
        }
      },
      "EventLevel": {
        "type": "string",
        "description": "`operation_events.level`",
        "enum": [
          "Info",
          "Warn",
          "Error"
        ]
      },
      "ExecAppRequest": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/exec`",
        "required": [
          "command"
        ],
        "properties": {
          "command": {
            "$ref": "#/components/schemas/ExecCommand"
          },
          "confirm": {
            "type": "boolean",
            "description": "Must be `true`: the command runs in the live app and may change its files and data."
          },
          "timeoutSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "workingDir": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ExecArtifactDto": {
        "type": "object",
        "description": "The whole output of a run past the inline cap, as a download (area AR's artifacts).",
        "required": [
          "id",
          "filename",
          "sizeBytes",
          "downloadPath"
        ],
        "properties": {
          "downloadPath": {
            "type": "string",
            "description": "`/api/v1/artifacts/{id}/download` (the team's own, signed in)."
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "filename": {
            "type": "string",
            "description": "`exec-<app>-<UTC time>Z.txt`"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ExecCommand": {
        "oneOf": [
          {
            "type": "string",
            "description": "`\"npx prisma migrate deploy\"`, run as `sh -c '<line>'`."
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`[\"wp\", \"plugin\", \"list\"]`."
          }
        ],
        "description": "What to run: one command line (run with `sh -c`, so pipes, `&&` and `$VAR` work) or its arguments (run as they\nare, no shell)."
      },
      "ExecResultDto": {
        "type": "object",
        "description": "How a run went.",
        "required": [
          "appId",
          "app",
          "instance",
          "command",
          "timedOut",
          "timeoutSeconds",
          "durationMs",
          "truncated",
          "outputBytes",
          "redactions",
          "stdout",
          "stderr"
        ],
        "properties": {
          "app": {
            "type": "string",
            "description": "The app's name."
          },
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "artifact": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExecArtifactDto",
                "description": "The whole output when it was cut (before the streams, so a client that cuts a long answer keeps it)."
              }
            ]
          },
          "command": {
            "type": "string",
            "description": "The command as run, secrets hidden."
          },
          "durationMs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "exitCode": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` when it was stopped by the timeout."
          },
          "instance": {
            "type": "string",
            "description": "The pod it ran in."
          },
          "outputBytes": {
            "type": "integer",
            "format": "int64",
            "description": "Bytes printed on both streams.",
            "minimum": 0
          },
          "redactions": {
            "type": "integer",
            "format": "int32",
            "description": "Secrets hidden in the output and the command.",
            "minimum": 0
          },
          "stderr": {
            "type": "string"
          },
          "stdout": {
            "type": "string",
            "description": "What it printed, secrets hidden; past 64 KiB together (12 KiB in an agent's answer) its first and last parts\nwith a note where bytes were cut."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP only: what the agent is told (the outcome, the command, what was hidden or cut and where the whole output\nis), first, so it survives a client that cuts a long answer (docs/MCP.md \"Answers\")."
          },
          "timedOut": {
            "type": "boolean"
          },
          "timeoutSeconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean",
            "description": "Something was cut: the whole output is in `artifact` when there is one."
          },
          "workingDir": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExportFormat": {
        "type": "string",
        "description": "What an export writes.",
        "enum": [
          "csv",
          "json",
          "ndjson",
          "sql"
        ]
      },
      "FamilyOverride": {
        "type": "object",
        "description": "What an override changes in one family; an absent field keeps the file's.",
        "properties": {
          "creditMultiplier": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "hidden": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`true`: offered to nobody; `false`: offered (a family the file hides)."
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "minPlan": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PlanCode",
                "description": "The cheapest plan whose platform-key turns may use it."
              }
            ]
          },
          "tagline": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "FieldError": {
        "type": "object",
        "description": "One invalid field of `validation_failed`.",
        "required": [
          "path",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "description": "`name`, `source.image`, `env.PORT`…"
          }
        }
      },
      "FilterOp": {
        "type": "string",
        "description": "A filter of the row grid.",
        "enum": [
          "eq",
          "ne",
          "lt",
          "lte",
          "gt",
          "gte",
          "contains",
          "starts_with",
          "is_null",
          "not_null"
        ]
      },
      "FlagAction": {
        "type": "string",
        "enum": [
          "approve",
          "disqualify"
        ]
      },
      "FleetCapacityDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/capacity`",
        "required": [
          "clusters",
          "objectStorage",
          "generatedAt"
        ],
        "properties": {
          "clusters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClusterCapacityDto"
            }
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "objectStorage": {
            "$ref": "#/components/schemas/ObjectStorageDto"
          }
        }
      },
      "FleetCostDto": {
        "type": "object",
        "description": "`GET|PUT /api/v1/admin/fleet-cost`",
        "required": [
          "perNodeMonthlyCents",
          "fixedMonthlyCents",
          "configured",
          "billedNodes",
          "monthlyCents"
        ],
        "properties": {
          "billedNodes": {
            "type": "integer",
            "format": "int64"
          },
          "configured": {
            "type": "boolean",
            "description": "`false` while unset (both zero)."
          },
          "fixedMonthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "monthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "perNodeMonthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "FraudReason": {
        "type": "string",
        "description": "`affiliate_referrals.fraud_reason`: why a referral waits in the admin's flag queue.",
        "enum": [
          "SelfReferralUser",
          "SelfReferralEmail",
          "SelfReferralPayoutEmail",
          "SameCardFingerprint",
          "SameIp"
        ]
      },
      "FreedResources": {
        "type": "object",
        "description": "Plan resources an action gives back.",
        "required": [
          "cpuMillis",
          "memoryMib",
          "storageGib"
        ],
        "properties": {
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "FulfilSecretRequest": {
        "type": "object",
        "description": "`POST /api/v1/secret-requests/{id}/fulfil`: the keys just saved through the app's env route (names only; a\nvalue in the body is refused).",
        "required": [
          "keys"
        ],
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "GithubBranchDto": {
        "type": "object",
        "required": [
          "name",
          "commitSha",
          "protected"
        ],
        "properties": {
          "commitSha": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "protected": {
            "type": "boolean"
          }
        }
      },
      "GithubBranchesQuery": {
        "type": "object",
        "description": "`GET /api/v1/integrations/github/repos/{owner}/{repo}/branches?installationId=`",
        "required": [
          "installationId"
        ],
        "properties": {
          "installationId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "GithubInstallationDto": {
        "type": "object",
        "description": "A connected installation of the App on a GitHub account.",
        "required": [
          "id",
          "installationId",
          "accountLogin",
          "accountType",
          "suspended",
          "manageUrl",
          "createdAt"
        ],
        "properties": {
          "accountLogin": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "description": "`User` or `Organization`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "installationId": {
            "type": "integer",
            "format": "int64",
            "description": "GitHub's installation id."
          },
          "manageUrl": {
            "type": "string",
            "description": "Where the person changes repository access or uninstalls the App on GitHub."
          },
          "suspended": {
            "type": "boolean"
          }
        }
      },
      "GithubIntegrationDto": {
        "type": "object",
        "description": "`GET /api/v1/integrations/github`",
        "required": [
          "signInAvailable",
          "appAvailable",
          "installations",
          "apps"
        ],
        "properties": {
          "appAvailable": {
            "type": "boolean",
            "description": "The GitHub App is configured (`FULLSEA_GITHUB_APP_ID`): installations, private repositories, deploy on push,\nPush to GitHub."
          },
          "appUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The App's public page (`<web>/apps/<slug>`), when configured."
          },
          "apps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppGithubDto"
            },
            "description": "The person's Git apps and how each reaches GitHub."
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubInstallationDto"
            }
          },
          "signInAvailable": {
            "type": "boolean",
            "description": "Sign in with GitHub is offered (`FULLSEA_GITHUB_CLIENT_ID`)."
          }
        }
      },
      "GithubRedirect": {
        "type": "object",
        "description": "`{redirectUrl}`: where the browser goes next (GitHub's install page, or GitHub sign-in to link it).",
        "required": [
          "redirectUrl"
        ],
        "properties": {
          "redirectUrl": {
            "type": "string"
          }
        }
      },
      "GithubReposQuery": {
        "type": "object",
        "description": "`GET /api/v1/integrations/github/repos?installationId=`",
        "properties": {
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "One installation; every connected installation when absent."
          }
        }
      },
      "GithubRepositoriesDto": {
        "type": "object",
        "description": "`GET /api/v1/integrations/github/repos`",
        "required": [
          "items",
          "unavailable"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubRepositoryDto"
            }
          },
          "unavailable": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Installations GitHub did not answer for (suspended, removed on GitHub): their logins."
          }
        }
      },
      "GithubRepositoryDto": {
        "type": "object",
        "description": "A repository an installation reaches.",
        "required": [
          "installationId",
          "fullName",
          "name",
          "owner",
          "private",
          "cloneUrl",
          "htmlUrl"
        ],
        "properties": {
          "cloneUrl": {
            "type": "string",
            "description": "What an app's `source.gitUrl` takes."
          },
          "defaultBranch": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": "string"
          },
          "htmlUrl": {
            "type": "string"
          },
          "installationId": {
            "type": "string",
            "format": "uuid",
            "description": "The connected installation that reaches it."
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "private": {
            "type": "boolean"
          },
          "pushedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "GithubSyncDto": {
        "type": "object",
        "description": "The repository a project's workspace is pushed to.",
        "required": [
          "installationId",
          "repository",
          "branch",
          "url"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "installationId": {
            "type": "string",
            "format": "uuid"
          },
          "lastCommitSha": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastPushedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repository": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "GithubSyncRequest": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/github-sync`. Every field defaults to the project's last push (or: the only\ninstallation, a repository named after the project, private, `main`).",
        "properties": {
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit message (default \"Update from the Fullsea workbench\")."
          },
          "private": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "For a new repository (default `true`)."
          },
          "repository": {
            "type": [
              "string",
              "null"
            ],
            "description": "`name` (in the installation's account) or `owner/name`. Created when missing (organisations only: GitHub\nlets an app create repositories in organisations, not in personal accounts)."
          }
        }
      },
      "GithubSyncResult": {
        "type": "object",
        "description": "The answer of a push.",
        "required": [
          "sync",
          "created",
          "unchanged",
          "commitSha",
          "files"
        ],
        "properties": {
          "commitSha": {
            "type": "string"
          },
          "created": {
            "type": "boolean",
            "description": "The repository was created by this push."
          },
          "files": {
            "type": "integer",
            "format": "int32",
            "description": "Files in the pushed tree.",
            "minimum": 0
          },
          "sync": {
            "$ref": "#/components/schemas/GithubSyncDto"
          },
          "unchanged": {
            "type": "boolean",
            "description": "Nothing changed since the branch's last commit: no commit was made."
          }
        }
      },
      "GithubSyncStatus": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/github-sync`",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "The App is configured on this server."
          },
          "sync": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GithubSyncDto"
              }
            ]
          }
        }
      },
      "GithubWebhookAck": {
        "type": "object",
        "description": "`POST /api/v1/webhooks/github`",
        "required": [
          "received",
          "duplicate",
          "event",
          "deployed",
          "skipped"
        ],
        "properties": {
          "deployed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppId"
            },
            "description": "Apps a push queued a deploy for."
          },
          "duplicate": {
            "type": "boolean",
            "description": "This delivery id was handled before; nothing was done again."
          },
          "event": {
            "type": "string"
          },
          "received": {
            "type": "boolean"
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSkip"
            }
          }
        }
      },
      "GrantTeamCredit": {
        "type": "object",
        "description": "`POST /api/v1/admin/teams/{id}/credits`",
        "required": [
          "amountCents",
          "note"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64",
            "description": "Signed: a negative amount takes credit away."
          },
          "note": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "HealthDto": {
        "type": "object",
        "description": "`GET /healthz` → `{\"status\": \"ok\", \"service\": \"fullsea-api\"}`.",
        "required": [
          "status",
          "service"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "HealthState": {
        "type": "string",
        "description": "How an app is doing in one word (the Health Strip's dot).",
        "enum": [
          "Healthy",
          "Degraded",
          "Down",
          "Paused",
          "Deploying",
          "NotDeployed",
          "Unknown"
        ]
      },
      "HealthStripDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/health`: one calm line per app (`● Healthy · 99.98% · 68 ms · 180/512 MiB`) and the\nissue cards, empty while nothing needs attention.",
        "required": [
          "appId",
          "appName",
          "state",
          "hasAddress",
          "issues"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "checkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cpuLimitMillis": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "cpuMillis": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "errorPercent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Share of the last hour's requests answered 5xx (percent)."
          },
          "hasAddress": {
            "type": "boolean",
            "description": "The app has a public address (web apps)."
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IssueCardDto"
            }
          },
          "latencyMs": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "P95 of the last hour's requests (`latencySource: \"traffic\"`), else the last check's time\n(`\"check\"`), in ms."
          },
          "latencySource": {
            "type": [
              "string",
              "null"
            ]
          },
          "memoryLimitMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "memoryMib": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "requestsPerMinute": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Requests per minute over the last five minutes; `null` without request metrics."
          },
          "state": {
            "$ref": "#/components/schemas/HealthState"
          },
          "uptimePercent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Uptime of the app's address over the last 30 days (percent, two decimals); `null` before any check or for\nan app without an address."
          }
        }
      },
      "HeldAddonDto": {
        "type": "object",
        "description": "A pack and how many of it.",
        "required": [
          "code",
          "quantity"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "HookStatus": {
        "type": "string",
        "description": "One hook's state in `stacks.hooks`.",
        "enum": [
          "Pending",
          "Running",
          "Succeeded",
          "Failed",
          "Skipped"
        ]
      },
      "ImportFormat": {
        "type": "string",
        "description": "How a data import loads its file.",
        "enum": [
          "csv",
          "tsv",
          "sql"
        ]
      },
      "ImportPreview": {
        "type": "object",
        "description": "An import as the approval card shows it before anything runs.",
        "required": [
          "database",
          "engine",
          "format",
          "source",
          "sizeBytes",
          "columns",
          "rowsEstimate"
        ],
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The header row (CSV, TSV)."
          },
          "database": {
            "type": "string"
          },
          "destructive": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A script's statements that remove or overwrite data, each with why (`DROP TABLE leads (DROP TABLE\nremoves it and everything in it)`); empty for CSV and TSV, which only add rows."
          },
          "engine": {
            "type": "string"
          },
          "format": {
            "$ref": "#/components/schemas/ImportFormat"
          },
          "rowsEstimate": {
            "type": "integer",
            "format": "int64",
            "description": "Rows estimated from the file's size and its first rows (statements for a script).",
            "minimum": 0
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "source": {
            "type": "string",
            "description": "The file's name and size."
          },
          "table": {
            "type": [
              "string",
              "null"
            ],
            "description": "The table rows go into (none for a SQL script)."
          }
        }
      },
      "ImportSource": {
        "oneOf": [
          {
            "type": "object",
            "description": "A chat upload (or any artifact of the team).",
            "required": [
              "artifact"
            ],
            "properties": {
              "artifact": {
                "type": "object",
                "description": "A chat upload (or any artifact of the team).",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/ArtifactId"
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "description": "An object of one of the team's buckets.",
            "required": [
              "bucket"
            ],
            "properties": {
              "bucket": {
                "type": "object",
                "description": "An object of one of the team's buckets.",
                "required": [
                  "bucket",
                  "key"
                ],
                "properties": {
                  "bucket": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "description": "What a data import reads."
      },
      "InboundEmailResult": {
        "type": "object",
        "description": "What the inbound email webhook did with one message (`POST /api/v1/webhooks/email-inbound/{secret}`).",
        "required": [
          "outcome"
        ],
        "properties": {
          "outcome": {
            "type": "string",
            "description": "`threaded` (appended to a ticket) | `opened` (a new ticket) | `ignored`"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it was ignored (an auto-reply, an unauthenticated sender, a loop, …)."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "IncidentId": {
        "type": "string",
        "format": "uuid",
        "description": "`alert_incidents.id`"
      },
      "InputKind": {
        "type": "string",
        "description": "An input's form control.",
        "enum": [
          "Text",
          "Email",
          "Password",
          "Select",
          "Bool"
        ]
      },
      "InstantCreditDto": {
        "type": "object",
        "description": "The instant build credit (PLAN.md §18.P): granted once when an account is created through Google, no card.",
        "required": [
          "creditCents"
        ],
        "properties": {
          "creditCents": {
            "type": "integer",
            "format": "int64",
            "description": "What a Google sign-up gets (the free plan's `aiCreditsInstantCents`, 75)."
          },
          "grantedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this account got it; `null` when it did not (made with email, a password or a passkey, or held back by\nthe per-address daily limit or the human check)."
          }
        }
      },
      "InvitationDto": {
        "type": "object",
        "description": "An open invitation.",
        "required": [
          "id",
          "teamId",
          "teamName",
          "email",
          "role",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/TeamInvitationId"
          },
          "invitedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          },
          "teamId": {
            "$ref": "#/components/schemas/TeamId"
          },
          "teamName": {
            "type": "string"
          }
        }
      },
      "InvitationPreviewDto": {
        "type": "object",
        "description": "`POST /api/v1/invitations/preview`: what an invitation link offers (no sign-in needed).",
        "required": [
          "teamName",
          "email",
          "role",
          "expiresAt",
          "state"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "invitedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          },
          "state": {
            "$ref": "#/components/schemas/LinkState"
          },
          "teamName": {
            "type": "string"
          }
        }
      },
      "IssueCardDto": {
        "type": "object",
        "description": "Something about an app that needs attention: an open incident, a burst of errors, a burst of 5xx answers.",
        "required": [
          "kind",
          "severity",
          "title",
          "at"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The error's first line, or the incident's message."
          },
          "errorGroupId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ErrorGroupId"
              }
            ]
          },
          "incidentId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IncidentId"
              }
            ]
          },
          "kind": {
            "type": "string",
            "description": "`incident`, `errors` (an error group seen in the last five minutes) or `http_5xx`."
          },
          "severity": {
            "type": "string",
            "description": "`warning` or `critical`."
          },
          "title": {
            "type": "string",
            "description": "One line: \"14 errors in 5 min\", \"Down for 3 minutes\"."
          }
        }
      },
      "JobDto": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "status",
          "attempts",
          "maxAttempts",
          "runAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/JobId"
          },
          "kind": {
            "type": "string"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "runAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "JobId": {
        "type": "string",
        "format": "uuid",
        "description": "`jobs.id`"
      },
      "JobStatus": {
        "type": "string",
        "description": "`jobs.status`: `failed` = a fatal error (not retried), `dead` = retries exhausted. Both can be retried by an\nadmin.",
        "enum": [
          "Queued",
          "Running",
          "Succeeded",
          "Failed",
          "Dead"
        ]
      },
      "JoinAffiliate": {
        "type": "object",
        "description": "`POST /api/v1/affiliate`: join.",
        "required": [
          "code",
          "payoutEmail"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "payoutEmail": {
            "type": "string"
          }
        }
      },
      "JoinCommand": {
        "type": "object",
        "description": "`GET /api/v1/admin/clusters/{id}/join-command`",
        "required": [
          "command",
          "notes"
        ],
        "properties": {
          "command": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "KeyDto": {
        "type": "object",
        "required": [
          "key",
          "type"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "length": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Characters of a string, items of a list, set, sorted set, hash or stream."
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Bytes the key and its value hold (`MEMORY USAGE`)."
          },
          "ttlMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Milliseconds left; `null` when the key never expires."
          },
          "type": {
            "type": "string",
            "description": "`string`, `list`, `set`, `zset`, `hash`, `stream`, …"
          }
        }
      },
      "KeyItemDto": {
        "type": "object",
        "description": "One item of a list, set, sorted set, hash or stream.",
        "required": [
          "value"
        ],
        "properties": {
          "field": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hash field, stream entry id; `null` for lists and sets."
          },
          "score": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sorted sets."
          },
          "value": {
            "type": "string"
          }
        }
      },
      "KeyValueDto": {
        "type": "object",
        "required": [
          "key",
          "items",
          "truncated",
          "missing"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyItemDto"
            },
            "description": "Lists, sets, sorted sets, hashes and streams: the first 50 items."
          },
          "key": {
            "$ref": "#/components/schemas/KeyDto"
          },
          "missing": {
            "type": "boolean",
            "description": "The key does not exist (any more)."
          },
          "truncated": {
            "type": "boolean"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Strings: the first 4 KiB."
          }
        }
      },
      "KeysDto": {
        "type": "object",
        "required": [
          "keys",
          "cursor",
          "pattern"
        ],
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The cursor of the next page; `0` when the scan is complete."
          },
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyDto"
            }
          },
          "pattern": {
            "type": "string"
          }
        }
      },
      "LandingConfigDto": {
        "type": "object",
        "description": "The landing page settings (`/go/<code>`).",
        "properties": {
          "bonusBadge": {
            "type": [
              "string",
              "null"
            ]
          },
          "headline": {
            "type": [
              "string",
              "null"
            ]
          },
          "presetPrompt": {
            "type": [
              "string",
              "null"
            ]
          },
          "presetTemplate": {
            "type": [
              "string",
              "null"
            ]
          },
          "subheadline": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LinkPromoCode": {
        "type": "object",
        "description": "`PUT /api/v1/admin/affiliates/{id}/promo-code`: link a Stripe promotion code created in the Stripe dashboard;\nboth `null` unlinks it.",
        "properties": {
          "promoCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "What customers type (`PARTNER50`)."
          },
          "promoCodeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "`promo_…`"
          }
        }
      },
      "LinkState": {
        "type": "string",
        "description": "Where a link stands.",
        "enum": [
          "open",
          "accepted",
          "withdrawn",
          "expired"
        ]
      },
      "MaintenanceDto": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shown on the maintenance page under the app's name."
          }
        }
      },
      "MaintenanceInput": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ManagedEmailDto": {
        "type": "object",
        "description": "`GET|PUT /api/v1/stacks/{id}/managed-email`",
        "required": [
          "stackId",
          "supported",
          "allowed",
          "enabled",
          "sendingDomain",
          "verifiedDomains",
          "dailyLimit",
          "sentToday",
          "stackSentToday",
          "stackRefusedToday",
          "port",
          "recent",
          "relayPaused"
        ],
        "properties": {
          "allowed": {
            "type": "boolean",
            "description": "The plan includes managed email (Starter and up)."
          },
          "dailyLimit": {
            "type": "integer",
            "format": "int64",
            "description": "The account's limit per UTC day and what it sent today (every stack)."
          },
          "enabled": {
            "type": "boolean"
          },
          "fromAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromName": {
            "type": [
              "string",
              "null"
            ]
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the stack connects (inside the platform only) and its username (the password is never shown)."
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "The rollout of the changed settings, after a `PUT`."
              }
            ]
          },
          "port": {
            "type": "integer",
            "format": "int64"
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelayMessageDto"
            }
          },
          "relayPaused": {
            "type": "boolean",
            "description": "The platform switch is off for now (sending is paused for everyone)."
          },
          "sendingDomain": {
            "type": "string",
            "description": "Fullsea's verified sending domain (an address on it needs no setup)."
          },
          "sentToday": {
            "type": "integer",
            "format": "int64"
          },
          "stackId": {
            "$ref": "#/components/schemas/StackId"
          },
          "stackRefusedToday": {
            "type": "integer",
            "format": "int64"
          },
          "stackSentToday": {
            "type": "integer",
            "format": "int64",
            "description": "This stack's sends and refusals since 00:00 UTC."
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ManagedEmailStatus"
              }
            ]
          },
          "statusReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "supported": {
            "type": "boolean",
            "description": "The stack's template knows how to send through the relay."
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer"
              }
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "verifiedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The person's verified custom domains an address may also be on."
          }
        }
      },
      "ManagedEmailStatus": {
        "type": "string",
        "description": "`managed_email.status`: `active` sends; `suspended` (an admin, or the abuse thresholds) refuses until an\nadmin lets it send again.",
        "enum": [
          "Active",
          "Suspended"
        ]
      },
      "MapEdgeDto": {
        "type": "object",
        "required": [
          "from",
          "to",
          "kind",
          "labels"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/MapEdgeKind"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The variables that make the connection (`DATABASE_URL`), or a volume's mount path."
          },
          "to": {
            "type": "string"
          }
        }
      },
      "MapEdgeKind": {
        "type": "string",
        "enum": [
          "routes",
          "uses",
          "calls",
          "mounts"
        ]
      },
      "MapNodeDto": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "resourceId",
          "name",
          "detail",
          "status",
          "href"
        ],
        "properties": {
          "appKind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppKind"
              }
            ]
          },
          "detail": {
            "type": "string",
            "description": "\"Web service · Small\", \"PostgreSQL 16 · Micro\", \"1 GiB at /data\"."
          },
          "engine": {
            "type": [
              "string",
              "null"
            ]
          },
          "href": {
            "type": "string",
            "description": "Where clicking it goes."
          },
          "id": {
            "type": "string",
            "description": "`app:<uuid>`, `database:<uuid>`, `volume:<uuid>`, `domain:<uuid>` (or `url:<app uuid>`)."
          },
          "kind": {
            "$ref": "#/components/schemas/MapNodeKind"
          },
          "name": {
            "type": "string"
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "stackId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The stack it belongs to."
          },
          "status": {
            "type": "string",
            "description": "The resource's status (the shared status words)."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "A domain's or web service's public address."
          }
        }
      },
      "MapNodeKind": {
        "type": "string",
        "enum": [
          "domain",
          "app",
          "database",
          "volume"
        ]
      },
      "MapStackDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "href"
        ],
        "properties": {
          "href": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "MarginDto": {
        "type": "object",
        "description": "The month so far: earned, spent, and what is left.",
        "required": [
          "revenueMtdCents",
          "fleetCostMtdCents",
          "aiCostMtdCents",
          "grossProfitMtdCents",
          "fleetCostConfigured",
          "billedNodes",
          "fleetMonthlyCents"
        ],
        "properties": {
          "aiCostMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "What platform-key builder turns cost at Anthropic this month (the `costUsd` each turn debit recorded)."
          },
          "billedNodes": {
            "type": "integer",
            "format": "int64",
            "description": "Nodes the fleet cost counts (every node not removed)."
          },
          "fleetCostConfigured": {
            "type": "boolean",
            "description": "`false` until an admin sets the fleet cost: the margin then leaves the fleet out and says so."
          },
          "fleetCostMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "The fleet's monthly cost (the `fleet_cost` setting) × the elapsed share of the month."
          },
          "fleetMonthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "grossProfitMtdCents": {
            "type": "integer",
            "format": "int64"
          },
          "marginBps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "`gross profit / revenue`; `null` without revenue."
          },
          "revenueMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Recurring revenue earned since the month began (`MRR × elapsed share of the month`) plus AI top-ups paid and\nthe month's overage."
          }
        }
      },
      "MarkBatchPaid": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/payout-batches/{id}/mark-paid`: PayPal ran the file.",
        "required": [
          "paypalBatchRef"
        ],
        "properties": {
          "paypalBatchRef": {
            "type": "string",
            "description": "PayPal's batch id."
          }
        }
      },
      "MarkPayoutFailed": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/payouts/{id}/mark-failed`: the commissions return to payable and the affiliate is\nasked to check their PayPal address.",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "MarkPayoutPaid": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/payouts/{id}/mark-paid`",
        "properties": {
          "paypalTransactionId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Me": {
        "type": "object",
        "description": "`GET /api/v1/me`. A `401 unauthenticated` means \"not signed in\".",
        "required": [
          "user",
          "plan",
          "entitlements",
          "usage",
          "builderAvailable",
          "platformCredential",
          "credits"
        ],
        "properties": {
          "addons": {
            "$ref": "#/components/schemas/AddonsSummaryDto",
            "description": "The capacity packs counted in `entitlements`."
          },
          "agentCredential": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentCredentialDto",
                "description": "`null` = no Claude credential connected."
              }
            ]
          },
          "builderAvailable": {
            "type": "boolean",
            "description": "`false` when neither the user nor the platform has a usable Claude credential."
          },
          "credits": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "entitlements": {
            "$ref": "#/components/schemas/Entitlements",
            "description": "The team's effective entitlements: the plan's, plus what its capacity packs add (`addons`, PLAN.md §18.Y),\nwith an enterprise contract's overrides applied (`policy`, PLAN.md §21.F)."
          },
          "pendingInvitations": {
            "type": "integer",
            "format": "int32",
            "description": "… and how many invitations and project transfers wait for them (the switcher shows them too).",
            "minimum": 0
          },
          "plan": {
            "$ref": "#/components/schemas/PlanDto"
          },
          "platformCredential": {
            "type": "boolean",
            "description": "`FULLSEA_PLATFORM_ANTHROPIC_API_KEY` is configured and `platform_key_enabled` is on."
          },
          "policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PolicyDto",
                "description": "The team's effective policy beyond `entitlements` (PLAN.md §21.F): its enterprise contract, SLA tier and\noverflow policy."
              }
            ]
          },
          "team": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamSummaryDto",
                "description": "The team this request acts in (`X-Fullsea-Team`, else the personal team); `plan`, `entitlements`, `usage`\nand `credits` are its."
              }
            ]
          },
          "teamCount": {
            "type": "integer",
            "format": "int32",
            "description": "How many teams the person belongs to (the switcher shows from 2) …",
            "minimum": 0
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "user": {
            "$ref": "#/components/schemas/UserDto"
          }
        }
      },
      "MemberDto": {
        "type": "object",
        "description": "One member of a team.",
        "required": [
          "userId",
          "email",
          "role",
          "joinedAt",
          "isYou"
        ],
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "isYou": {
            "type": "boolean",
            "description": "The caller."
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          },
          "userId": {
            "$ref": "#/components/schemas/UserId"
          }
        }
      },
      "ModelChoiceDto": {
        "type": "object",
        "description": "A model and effort with their labels.",
        "required": [
          "model",
          "modelLabel"
        ],
        "properties": {
          "effort": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` for a model without an effort setting."
          },
          "effortLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": "string"
          },
          "modelLabel": {
            "type": "string"
          }
        }
      },
      "ModelFamily": {
        "type": "object",
        "description": "One model family of the policy.",
        "required": [
          "id",
          "match",
          "alias",
          "label",
          "tagline",
          "creditMultiplier",
          "minPlan"
        ],
        "properties": {
          "alias": {
            "type": "string",
            "description": "What a session asks the adapter for before it has reported its models (the adapter resolves an alias to the\nfamily's newest model)."
          },
          "creditMultiplier": {
            "type": "number",
            "format": "double",
            "description": "What a turn costs relative to the default family (`1`), as a badge."
          },
          "hidden": {
            "type": "boolean",
            "description": "Offered to nobody, on any credential: its models are left out of the picker like `hiddenValues` (an\noperator's switch, PLAN.md §26.3; absent: offered)."
          },
          "id": {
            "type": "string",
            "description": "`sonnet`"
          },
          "label": {
            "type": "string",
            "description": "`Sonnet`: the picker's pill and the cost note."
          },
          "match": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Lower-case substrings of a reported model's value or name that make it this family's (`[\"sonnet\"]`)."
          },
          "minPlan": {
            "$ref": "#/components/schemas/PlanCode",
            "description": "The cheapest plan whose platform-key turns may use it."
          },
          "tagline": {
            "type": "string",
            "description": "One line under the label."
          }
        },
        "additionalProperties": false
      },
      "ModelLockDto": {
        "type": "object",
        "description": "Why a row is locked: the plan that opens it on Fullsea's key (an own Claude key opens everything).",
        "required": [
          "plan",
          "planName"
        ],
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/PlanCode",
            "description": "The cheapest plan that opens it."
          },
          "planName": {
            "type": "string",
            "description": "Its name (`Starter`): the picker's badge says \"Starter+\"."
          }
        }
      },
      "ModelOptionDto": {
        "type": "object",
        "description": "One model the picker offers.",
        "required": [
          "value",
          "label"
        ],
        "properties": {
          "creditMultiplier": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Credit use relative to the default model (`1`); `null` when the policy does not know the model."
          },
          "effortLevels": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The effort levels it offers, once the agent reported them; `null`: not known yet (every level is offered and\nthe agent clamps)."
          },
          "family": {
            "type": [
              "string",
              "null"
            ],
            "description": "The policy's family (`sonnet`); `null` for a model only an own credential sees."
          },
          "label": {
            "type": "string",
            "description": "`Sonnet`: the pill and the cost note."
          },
          "locked": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ModelLockDto",
                "description": "`null`: open to this team on this credential."
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The agent's name with its version (`Sonnet 5.5`); `null` before the agent reported."
          },
          "tagline": {
            "type": [
              "string",
              "null"
            ],
            "description": "One line under the label."
          },
          "value": {
            "type": "string",
            "description": "What a choice sends (`sonnet`, or a provider's full model id)."
          }
        }
      },
      "ModelPolicyPreviewDto": {
        "type": "object",
        "description": "The answer of `POST …/preview`.",
        "required": [
          "effective",
          "preview",
          "changes"
        ],
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyChange"
            },
            "description": "What saving it would change in the policy in force."
          },
          "effective": {
            "$ref": "#/components/schemas/ModelsPolicy",
            "description": "The file with this override."
          },
          "preview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanModelsDto"
            }
          }
        }
      },
      "ModelPolicyRevisionDto": {
        "type": "object",
        "description": "One revision of the override.",
        "required": [
          "revision",
          "reverted",
          "changes",
          "reason",
          "at"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "by": {
            "type": [
              "string",
              "null"
            ],
            "description": "The operator's address (`null`: an erased account)."
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyChange"
            },
            "description": "Each field's value in force before and after."
          },
          "reason": {
            "type": "string",
            "description": "The operator's reason."
          },
          "reverted": {
            "type": "boolean",
            "description": "Back to the committed file."
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ModelPreferenceDto": {
        "type": "object",
        "description": "A stored preference (either half may be unset: the next source decides it).",
        "properties": {
          "effort": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ModelsPolicy": {
        "type": "object",
        "description": "`config/builder_models.v1.json`.",
        "required": [
          "version",
          "defaultFamily",
          "defaultEffort",
          "families",
          "effortLevels"
        ],
        "properties": {
          "defaultEffort": {
            "type": "string",
            "description": "The effort level likewise."
          },
          "defaultFamily": {
            "type": "string",
            "description": "The family a session runs on until someone picks another."
          },
          "effortLevels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffortLevel"
            },
            "description": "From the least to the most thinking (a clamp moves down this list)."
          },
          "families": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelFamily"
            },
            "description": "In the picker's order; a reported model is the first family it matches."
          },
          "hiddenValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Reported values never offered (the adapter's `default` sentinel: \"whatever Claude Code recommends\")."
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "MonitoringBoardDto": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/monitoring`: the board of a project.",
        "required": [
          "projectId",
          "projectName",
          "layout",
          "apps",
          "databases",
          "statusPage"
        ],
        "properties": {
          "apps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthStripDto"
            }
          },
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardDatabaseDto"
            }
          },
          "layout": {
            "$ref": "#/components/schemas/BoardLayoutDto"
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "projectName": {
            "type": "string"
          },
          "statusPage": {
            "$ref": "#/components/schemas/StatusPageSettingsDto"
          }
        }
      },
      "MoverBoardDto": {
        "type": "object",
        "description": "The top five teams over the last day and the last week.",
        "required": [
          "day",
          "week"
        ],
        "properties": {
          "day": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MoverDto"
            }
          },
          "week": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MoverDto"
            }
          }
        }
      },
      "MoverDto": {
        "type": "object",
        "required": [
          "team",
          "value",
          "previous"
        ],
        "properties": {
          "previous": {
            "type": "integer",
            "format": "int64",
            "description": "The same measure in the window before."
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          },
          "value": {
            "type": "integer",
            "format": "int64",
            "description": "AI spend in cents, or messages sent."
          }
        }
      },
      "NewAppVolume": {
        "type": "object",
        "description": "`CreateApp.volumes[]`: a new volume mounted into the new app.",
        "required": [
          "name",
          "sizeGib",
          "mountPath"
        ],
        "properties": {
          "mountPath": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          },
          "tier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VolumeTier",
                "description": "As `CreateVolume.tier`."
              }
            ]
          }
        }
      },
      "NodeAllocatable": {
        "type": "object",
        "required": [
          "cpuMillis",
          "memoryMib",
          "pods"
        ],
        "properties": {
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "pods": {
            "type": "integer",
            "format": "int32"
          },
          "storageGib": {
            "type": "integer",
            "format": "int64",
            "description": "Allocatable ephemeral storage (the disk local volumes share); `0` when the node does not report it."
          }
        }
      },
      "NodeCompute": {
        "type": "object",
        "required": [
          "cpuMillis",
          "memoryMib"
        ],
        "properties": {
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "NodeDto": {
        "type": "object",
        "required": [
          "id",
          "clusterId",
          "clusterName",
          "name",
          "role",
          "status",
          "schedulable",
          "capacity",
          "allocatable",
          "requested",
          "hostsDatabases",
          "createdAt"
        ],
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "allocatable": {
            "$ref": "#/components/schemas/NodeAllocatable"
          },
          "capacity": {
            "$ref": "#/components/schemas/NodeCompute"
          },
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "hostsDatabases": {
            "type": "integer",
            "format": "int64",
            "description": "Live databases whose volume is on this node (removal is refused unless forced)."
          },
          "id": {
            "$ref": "#/components/schemas/NodeId"
          },
          "kubeletVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastSeenAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "providerRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "requested": {
            "$ref": "#/components/schemas/NodeCompute"
          },
          "role": {
            "$ref": "#/components/schemas/NodeRole"
          },
          "schedulable": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/NodeStatus"
          }
        }
      },
      "NodeId": {
        "type": "string",
        "format": "uuid",
        "description": "`nodes.id`"
      },
      "NodeRole": {
        "type": "string",
        "description": "`nodes.role`",
        "enum": [
          "Server",
          "Agent"
        ]
      },
      "NodeStatus": {
        "type": "string",
        "description": "`nodes.status`",
        "enum": [
          "Provisioning",
          "Ready",
          "NotReady",
          "Cordoned",
          "Draining",
          "Removing",
          "Removed",
          "Failed"
        ]
      },
      "NodeWithOperation": {
        "type": "object",
        "required": [
          "node",
          "operation"
        ],
        "properties": {
          "node": {
            "$ref": "#/components/schemas/NodeDto"
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          }
        }
      },
      "OAuthClientDto": {
        "type": "object",
        "description": "The client asking for access, as the consent page shows it. Its name is what the client registered itself\nwith: nothing vouches for it, so the page also shows where the browser goes back to.",
        "required": [
          "clientId",
          "name",
          "registeredAt",
          "redirectHost"
        ],
        "properties": {
          "clientId": {
            "$ref": "#/components/schemas/OAuthClientId"
          },
          "name": {
            "type": "string"
          },
          "redirectHost": {
            "type": "string",
            "description": "`localhost:53682`: where the person is sent back after answering."
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time"
          },
          "softwareId": {
            "type": [
              "string",
              "null"
            ]
          },
          "uri": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OAuthClientId": {
        "type": "string",
        "format": "uuid",
        "description": "`oauth_clients.id`: a dynamically registered MCP client (its `client_id`)"
      },
      "OAuthConsentDto": {
        "type": "object",
        "description": "`GET /api/v1/oauth/authorize?<the request>`: what the consent page asks about.",
        "required": [
          "client",
          "scope",
          "resource",
          "account",
          "staysConnectedDays"
        ],
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ConsentAccount"
          },
          "client": {
            "$ref": "#/components/schemas/OAuthClientDto"
          },
          "resource": {
            "type": "string",
            "description": "The MCP server the access is for (`<api>/mcp`)."
          },
          "scope": {
            "type": "string",
            "description": "`mcp`."
          },
          "staysConnectedDays": {
            "type": "integer",
            "format": "int32",
            "description": "How long the agent stays connected without being used again, in days (the refresh token's lifetime).",
            "minimum": 0
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamSummaryDto"
            },
            "description": "The teams the agent may act in (PLAN.md §18.T): every team of the person, personal first. The agent acts\nwith the person's role in the one chosen (`OAuthDecision.teamId`)."
          }
        }
      },
      "OAuthDecision": {
        "type": "object",
        "description": "`POST /api/v1/oauth/authorize`: the person's answer to the request.",
        "required": [
          "request",
          "allow"
        ],
        "properties": {
          "allow": {
            "type": "boolean"
          },
          "request": {
            "$ref": "#/components/schemas/AuthorizeRequest"
          },
          "teamId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamId",
                "description": "The team the agent acts in (default: the personal team); the person must be a member."
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "OAuthErrorBody": {
        "type": "object",
        "description": "The error body of the protocol endpoints (RFC 6749 §5.2, RFC 7591 §3.2.2).",
        "required": [
          "error",
          "error_description"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "error_description": {
            "type": "string"
          }
        }
      },
      "OAuthGrantId": {
        "type": "string",
        "format": "uuid",
        "description": "`oauth_tokens.grant_id`: one consent (a connected agent) and every token issued for it"
      },
      "OAuthRedirect": {
        "type": "object",
        "description": "`POST /api/v1/oauth/authorize` → 200: where the browser goes next (the client's redirect URI with `code` and\n`state`, or `error=access_denied`).",
        "required": [
          "redirectTo"
        ],
        "properties": {
          "redirectTo": {
            "type": "string"
          }
        }
      },
      "ObjectListQuery": {
        "type": "object",
        "description": "`GET /api/v1/buckets/{id}/objects?prefix=&delimiter=/&cursor=&limit=`",
        "properties": {
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "delimiter": {
            "type": [
              "string",
              "null"
            ],
            "description": "`/` lists one folder level (the rest as `prefixes`); absent lists every key under `prefix`."
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1–1000 (default 200).",
            "minimum": 0
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ObjectOperation": {
        "type": "string",
        "description": "What a presigned URL is for.",
        "enum": [
          "upload",
          "download",
          "delete"
        ]
      },
      "ObjectStorageDto": {
        "type": "object",
        "description": "Object storage is one R2 bucket for the platform: what the buckets hold and what their quotas sold.",
        "required": [
          "buckets",
          "usedBytes",
          "quotaBytes",
          "objects"
        ],
        "properties": {
          "buckets": {
            "type": "integer",
            "format": "int64"
          },
          "objects": {
            "type": "integer",
            "format": "int64"
          },
          "quotaBytes": {
            "type": "integer",
            "format": "int64"
          },
          "usedBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "OfferHandover": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/handover`: offer the project to a client by email.",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OperationDto": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "targetKind",
          "targetId",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/OperationId"
          },
          "kind": {
            "type": "string",
            "description": "`deploy_app`, `delete_app`, `restart_app`, `provision_database`, `delete_database`, `add_node`, `remove_node`"
          },
          "status": {
            "$ref": "#/components/schemas/OperationStatus"
          },
          "targetId": {
            "type": "string",
            "format": "uuid"
          },
          "targetKind": {
            "type": "string",
            "description": "`app`, `database`, `node`, …"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OperationEventDto": {
        "type": "object",
        "required": [
          "sequence",
          "at",
          "level",
          "message"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "level": {
            "$ref": "#/components/schemas/EventLevel"
          },
          "message": {
            "type": "string"
          },
          "sequence": {
            "type": "integer",
            "format": "int64",
            "description": "1, 2, 3, … per operation."
          }
        }
      },
      "OperationEvents": {
        "type": "object",
        "description": "`GET /api/v1/operations/{id}/events?after=<seq>&waitMs=<≤30000>`",
        "required": [
          "operation",
          "events"
        ],
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationEventDto"
            }
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          }
        }
      },
      "OperationId": {
        "type": "string",
        "format": "uuid",
        "description": "`operations.id`"
      },
      "OperationStatus": {
        "type": "string",
        "description": "`operations.status`",
        "enum": [
          "Queued",
          "Running",
          "Succeeded",
          "Failed"
        ]
      },
      "OutputKind": {
        "type": "string",
        "description": "How an output is shown.",
        "enum": [
          "Url",
          "Text",
          "Email",
          "Password"
        ]
      },
      "OverageChargeDto": {
        "type": "object",
        "description": "A settlement: an end-of-cycle invoice item set, a mid-cycle invoice, or an admin waiver (negative).",
        "required": [
          "id",
          "kind",
          "status",
          "amountCents",
          "periodStart",
          "periodEnd",
          "lines",
          "createdAt"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "failureMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/OverageChargeKind"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverageChargeLineDto"
            }
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "A waiver's reason."
          },
          "status": {
            "$ref": "#/components/schemas/OverageChargeStatus"
          },
          "stripeInvoiceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "`in_…` (the subscription's renewal invoice, or the charge's own)."
          }
        }
      },
      "OverageChargeKind": {
        "type": "string",
        "description": "`overage_charges.kind` (0048): an end-of-cycle settlement, a mid-cycle threshold invoice, or an admin waiver\n(a negative amount).",
        "enum": [
          "CycleEnd",
          "MidCycleThreshold",
          "AdminWaiver"
        ]
      },
      "OverageChargeLineDto": {
        "type": "object",
        "description": "One line of a settlement (an invoice item).",
        "required": [
          "metric",
          "unitsE4",
          "amountCents",
          "capped",
          "description"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "capped": {
            "type": "boolean",
            "description": "The cap cut it."
          },
          "description": {
            "type": "string"
          },
          "metric": {
            "$ref": "#/components/schemas/OverageMetric"
          },
          "unitsE4": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "OverageChargeStatus": {
        "type": "string",
        "description": "`overage_charges.status` (0048).",
        "enum": [
          "Pending",
          "Invoiced",
          "Paid",
          "Failed",
          "Waived"
        ]
      },
      "OverageLedgerRowDto": {
        "type": "object",
        "description": "One team's overage in one billing period: what the meter accrued, what settlements claimed and charged, and what\nwas given back.",
        "required": [
          "team",
          "periodStart",
          "periodEnd",
          "hours",
          "accruedCents",
          "billedCents",
          "unbilledCents",
          "chargedCents",
          "paidCents",
          "waivedCents",
          "failed",
          "enabled",
          "current"
        ],
        "properties": {
          "accruedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Every snapshot's charge summed (after the cap), cents."
          },
          "billedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Of it, claimed by a settlement."
          },
          "chargedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Settlements' amounts that ask for money (end of cycle, mid-cycle), and what of it was paid."
          },
          "current": {
            "type": "boolean",
            "description": "The period has not ended."
          },
          "enabled": {
            "type": "boolean",
            "description": "The team's overflow setting now (`null` cap: the plan's default, no stored row)."
          },
          "failed": {
            "type": "boolean",
            "description": "A settlement of the period failed."
          },
          "frozenReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "hours": {
            "type": "integer",
            "format": "int64",
            "description": "Hours with any overage metered."
          },
          "monthlyCapCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "paidCents": {
            "type": "integer",
            "format": "int64"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          },
          "unbilledCents": {
            "type": "integer",
            "format": "int64"
          },
          "waivedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Waivers (positive: what was given back)."
          }
        }
      },
      "OverageMetric": {
        "type": "string",
        "description": "`overage_snapshots.metric` (0048): what is metered beyond the included policy, and the key of a rate card.",
        "enum": [
          "RamGib",
          "NvmeGib",
          "SharedHddGib",
          "ObjectGib",
          "ExtraApps",
          "ExtraDatabases",
          "ExtraVolumes",
          "ExtraSeats",
          "ManagedEmailK"
        ]
      },
      "OverageRateDto": {
        "type": "object",
        "description": "One rate of the overage rate card.",
        "required": [
          "metric",
          "unit",
          "microusd"
        ],
        "properties": {
          "metric": {
            "$ref": "#/components/schemas/OverageMetric"
          },
          "microusd": {
            "type": "integer",
            "format": "int64",
            "description": "Micro-USD per unit."
          },
          "unit": {
            "type": "string",
            "description": "What one unit is priced per: `GiB-month`, `slot-month`, `seat-month`, `1000 messages`."
          }
        }
      },
      "OverflowAcceptance": {
        "type": "object",
        "description": "`overflow_acceptance_required.details` (409): what accepting the change into paid overflow costs. Repeat the\nrequest with `X-Fullsea-Accept-Overflow: true` (or `?acceptOverflow=true`) to accept it; a change that stays within\nthe plan, or adds to overflow already running, never asks.",
        "required": [
          "quote",
          "acceptHeader"
        ],
        "properties": {
          "acceptHeader": {
            "type": "string",
            "description": "`X-Fullsea-Accept-Overflow`"
          },
          "quote": {
            "$ref": "#/components/schemas/OverflowQuoteDto"
          }
        }
      },
      "OverflowBeyondDto": {
        "type": "object",
        "description": "One metric that runs beyond the plan in a quote: `ram_gib` 1.25 GiB (`unitsE4` 12 500), `extra_apps` 1.",
        "required": [
          "metric",
          "unitsE4"
        ],
        "properties": {
          "metric": {
            "$ref": "#/components/schemas/OverageMetric"
          },
          "unitsE4": {
            "type": "integer",
            "format": "int64",
            "description": "Ten-thousandths of the metric's unit (GiB, apps, …) beyond the plan."
          }
        }
      },
      "OverflowDto": {
        "type": "object",
        "description": "`GET /api/v1/billing/overflow`: the team's overflow setting and its live meter.",
        "required": [
          "eligible",
          "enabled",
          "open",
          "hasPaymentMethod",
          "monthlyCapCents",
          "capIsDefault",
          "minimumCapCents",
          "accruedCents",
          "unbilledCents",
          "hourlyMicrousd",
          "projectedCents",
          "capPercent",
          "state",
          "metrics",
          "midCycleThresholdCents",
          "charges"
        ],
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "The team accepted paid overflow (PLAN.md §21.OV): nothing beyond the plan is billed, nor may scale, before it."
          },
          "acceptedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "acceptedVia": {
            "type": [
              "string",
              "null"
            ],
            "description": "`dashboard`, `api`, `mcp`, `admin` or `backfill`."
          },
          "accruedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Charged this period so far (month to date)."
          },
          "capIsDefault": {
            "type": "boolean"
          },
          "capPercent": {
            "type": "integer",
            "format": "int32",
            "description": "Accrued as a share of the cap.",
            "minimum": 0
          },
          "charges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverageChargeDto"
            },
            "description": "The newest settlements, newest first."
          },
          "defaultCapCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The plan's default cap (`null` on Free)."
          },
          "eligible": {
            "type": "boolean",
            "description": "A paid plan on an active subscription of a team that is not suspended."
          },
          "enabled": {
            "type": "boolean"
          },
          "frozenReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "graceEndsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "While frozen after a failed payment: when the grace ends and the team goes to the operators."
          },
          "hasPaymentMethod": {
            "type": "boolean"
          },
          "hourlyMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "What runs beyond the policy costs this much an hour (micro-USD)."
          },
          "ineligibleReason": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OverflowIneligible"
              }
            ]
          },
          "maxOverflowMemoryMib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The most memory (MiB) beyond the plan; `null` under an enterprise contract."
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverflowMetricDto"
            }
          },
          "midCycleThresholdCents": {
            "type": "integer",
            "format": "int64"
          },
          "minimumCapCents": {
            "type": "integer",
            "format": "int64",
            "description": "The lowest cap the team can set now: what already accrued plus what is **reserved** beyond the plan (each\nautoscaled app at its maximum, as admission weighs it) for the rest of the period, rounded up to a dollar;\nlower would let what is reserved run past what is paid for. An operator may set any cap."
          },
          "minimumCapHeldBy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapHoldDto"
            },
            "description": "The autoscaled apps whose maximums hold `minimumCapCents` above what runs now (empty when none do): lowering\ntheir maximums lowers the floor."
          },
          "monthlyCapCents": {
            "type": "integer",
            "format": "int64"
          },
          "nudge": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeNudgeDto"
              }
            ]
          },
          "open": {
            "type": "boolean",
            "description": "Eligible, on, not frozen and a card on file: requests beyond the plan are admitted within the cap."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The overage billing period (a month; annual plans settle monthly). `null` without a subscription."
          },
          "projectedCents": {
            "type": "integer",
            "format": "int64",
            "description": "Accrued plus the hourly charge for every hour left in the period."
          },
          "state": {
            "$ref": "#/components/schemas/OverflowMeterState"
          },
          "unacceptedBeyond": {
            "type": "boolean",
            "description": "Without an acceptance: what the team holds reaches beyond the plan (an autoscaling maximum saved before, a\ndowngrade, a removed pack). None of it is billed and the namespace is held to the plan until the team accepts\npaid overflow or lowers it."
          },
          "unacceptedReservations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapHoldDto"
            },
            "description": "The autoscaled apps among it, with their maximums (lower one to stay within the plan)."
          },
          "unbilledCents": {
            "type": "integer",
            "format": "int64",
            "description": "Of it, not invoiced yet."
          }
        }
      },
      "OverflowIneligible": {
        "type": "string",
        "description": "Why a team may not use overflow at all (`OverflowPolicy.ineligible`).",
        "enum": [
          "NotConfigured",
          "FreePlan",
          "Suspended",
          "SubscriptionNotActive"
        ]
      },
      "OverflowMeterState": {
        "type": "string",
        "description": "Where the cap stands this period (from what has accrued).",
        "enum": [
          "ok",
          "half",
          "warning",
          "reached"
        ]
      },
      "OverflowMetricDto": {
        "type": "object",
        "description": "One metric of the month-to-date meter.",
        "required": [
          "metric",
          "label",
          "rateUnit",
          "rateMicrousd",
          "unitRateMicrousd",
          "overageNowE4",
          "hourlyMicrousd",
          "periodUnitsE4",
          "periodMicrousd"
        ],
        "properties": {
          "hourlyMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "What that costs an hour (micro-USD)."
          },
          "label": {
            "type": "string",
            "description": "`Memory overflow (with its vCPU)`"
          },
          "metric": {
            "$ref": "#/components/schemas/OverageMetric"
          },
          "overageNowE4": {
            "type": "integer",
            "format": "int64",
            "description": "Beyond the included policy right now (ten-thousandths: GiB, slots, seats); `0` for managed email."
          },
          "periodMicrousd": {
            "type": "integer",
            "format": "int64"
          },
          "periodUnitsE4": {
            "type": "integer",
            "format": "int64",
            "description": "Metered this period: units (GiB-hours, slot-hours, × 1 000 messages) and their charge."
          },
          "rateMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "Micro-USD per rate unit (contract rates included)."
          },
          "rateUnit": {
            "type": "string",
            "description": "The card's unit: `GiB-month`, `slot-month`, `seat-month`, `1000 messages`."
          },
          "unitRateMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "What one metered unit costs: per unit-hour (per 1 000 messages for managed email)."
          }
        }
      },
      "OverflowOffer": {
        "type": "object",
        "description": "`quota_exceeded.details.overflow`: why the request did not run in overflow, and whether Billing can change that.",
        "required": [
          "reason",
          "message",
          "fixableInBilling",
          "monthlyCapCents",
          "billingPath"
        ],
        "properties": {
          "billingPath": {
            "type": "string",
            "description": "`/app/billing#overflow`"
          },
          "fixableInBilling": {
            "type": "boolean",
            "description": "Switching overflow on, raising the cap or adding a card in Billing would let it run."
          },
          "message": {
            "type": "string",
            "description": "One sentence for the person."
          },
          "monthlyCapCents": {
            "type": "integer",
            "format": "int64"
          },
          "projectedCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The period's projected overage with this request (`cap` only)."
          },
          "reason": {
            "type": "string",
            "description": "`ineligible`, `disabled`, `frozen`, `no_payment_method`, `ceiling`, `cap`"
          }
        }
      },
      "OverflowPolicyDto": {
        "type": "object",
        "description": "Overflow beyond the included limits (overage billing, PLAN.md §21.OV): whether the team may use it, its switch,\ncap and rates.",
        "required": [
          "eligible",
          "enabled",
          "open",
          "monthlyCapCents",
          "capIsDefault",
          "rates",
          "midCycleThresholdCents"
        ],
        "properties": {
          "capIsDefault": {
            "type": "boolean",
            "description": "The cap is the plan's default (the team has not set one)."
          },
          "eligible": {
            "type": "boolean",
            "description": "A paid plan on an active subscription of a team that is not suspended."
          },
          "enabled": {
            "type": "boolean",
            "description": "The team's switch (on by default on paid plans)."
          },
          "frozenReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why new overflow is frozen (`payment_failed`, an admin's reason); `null` = not frozen."
          },
          "ineligibleReason": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OverflowIneligible",
                "description": "Why not, when not eligible."
              }
            ]
          },
          "maxOverflowMemoryMib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The most memory (MiB) the team may use beyond its included memory; `null` under an enterprise contract."
          },
          "midCycleThresholdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Unbilled overage (cents) that is invoiced at once."
          },
          "monthlyCapCents": {
            "type": "integer",
            "format": "int64",
            "description": "The monthly overflow spend cap (`0`: a hard cap at the included limits)."
          },
          "open": {
            "type": "boolean",
            "description": "Eligible, switched on and not frozen."
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverageRateDto"
            },
            "description": "The rate card, contract rates included."
          }
        }
      },
      "OverflowQuoteDto": {
        "type": "object",
        "description": "What a change would cost in overflow (the MCP approval card and cost summary).",
        "required": [
          "inOverflow",
          "crossesIntoOverflow",
          "hourlyMicrousd",
          "addedHourlyMicrousd",
          "projectedCents",
          "fullMonthCents",
          "accruedCents",
          "monthlyCapCents",
          "ramOverflowMib",
          "summary"
        ],
        "properties": {
          "accruedCents": {
            "type": "integer",
            "format": "int64"
          },
          "addedHourlyMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "What the change adds an hour."
          },
          "autoscale": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AutoscaleQuoteDto",
                "description": "An autoscaling maximum (a new one, or a new size of an autoscaled app): overflow is billed for the replicas\nrunning each hour, up to the maximum; `hourlyMicrousd` and `fullMonthCents` above are at the maximum."
              }
            ]
          },
          "beyond": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverflowBeyondDto"
            },
            "description": "What runs beyond the plan after the change, metric by metric (empty within it)."
          },
          "crossesIntoOverflow": {
            "type": "boolean",
            "description": "It takes a team that ran within its policy into paid overflow."
          },
          "fullMonthCents": {
            "type": "integer",
            "format": "int64",
            "description": "A whole month at the new hourly charge."
          },
          "hourlyMicrousd": {
            "type": "integer",
            "format": "int64",
            "description": "Every hour while it runs, after the change (micro-USD)."
          },
          "inOverflow": {
            "type": "boolean",
            "description": "The change runs (partly) beyond the included policy."
          },
          "monthlyCapCents": {
            "type": "integer",
            "format": "int64"
          },
          "needsAcceptance": {
            "type": "boolean",
            "description": "It puts more beyond the plan while the team has not accepted paid overflow: it needs the acceptance\n(`409 overflow_acceptance_required` without it)."
          },
          "nudge": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeNudgeDto",
                "description": "The upgrade arbitrage nudge, when the team would run in overflow and a bigger plan costs less."
              }
            ]
          },
          "projectedCents": {
            "type": "integer",
            "format": "int64",
            "description": "The rest of this period at the new hourly charge, plus what accrued."
          },
          "ramOverflowMib": {
            "type": "integer",
            "format": "int64",
            "description": "Memory beyond the plan after the change."
          },
          "refusal": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OverflowOffer",
                "description": "Why it would be refused (`null` = admitted)."
              }
            ]
          },
          "summary": {
            "type": "string",
            "description": "One line: `Using 2 GiB overflow above your Pro 6 GiB pool — $0.022/hr ($8/GiB-mo), $14.20 / $150 cap used\nthis month`."
          }
        }
      },
      "OverridesCheckDto": {
        "type": "object",
        "description": "The editor's answer: valid or the reason, and the limits it gives.",
        "required": [
          "valid",
          "errors",
          "sizes"
        ],
        "properties": {
          "effective": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Entitlements",
                "description": "The limits with these overrides (with `teamId`)."
              }
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "description": "Why not (the field when one is named)."
          },
          "normalized": {
            "description": "The overrides as stored (fields in order, empty ones left out)."
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every size code the overrides may name (the plan sizes and the contract-only ones)."
          },
          "valid": {
            "type": "boolean"
          }
        }
      },
      "Page_AdminBillingSubscriptionDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One row of `GET /api/v1/admin/billing/subscriptions`.",
              "required": [
                "id",
                "team",
                "subscription",
                "addons",
                "mrrCents",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "addons": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamAddonDto"
                  }
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "mrrCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Plan and packs while it pays (`active`, `past_due`); `0` otherwise."
                },
                "subscription": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                },
                "team": {
                  "$ref": "#/components/schemas/TeamRefDto"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminCommissionDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One ledger row as the admin sees it.",
              "required": [
                "id",
                "affiliateId",
                "code",
                "kind",
                "planLabel",
                "eligibleAmountCents",
                "commissionBps",
                "commissionCents",
                "status",
                "maturesAt",
                "createdAt"
              ],
              "properties": {
                "affiliateId": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "string"
                },
                "commissionBps": {
                  "type": "integer",
                  "format": "int32"
                },
                "commissionCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "eligibleAmountCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "$ref": "#/components/schemas/CommissionKind"
                },
                "maturesAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "paidAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "payoutId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "planLabel": {
                  "type": "string"
                },
                "referralId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "referredTeamId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "reversedReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/CommissionStatus"
                },
                "stripeChargeId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stripeInvoiceId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "subId": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminOverageChargeDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/OverageChargeDto"
                },
                {
                  "type": "object",
                  "required": [
                    "team"
                  ],
                  "properties": {
                    "team": {
                      "$ref": "#/components/schemas/TeamRefDto"
                    }
                  }
                }
              ],
              "description": "One settlement of any team (`GET /api/v1/admin/overage/charges`)."
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminPaymentDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A payment as the admin sees it.",
              "required": [
                "id",
                "team",
                "kind",
                "status",
                "amountCents",
                "currency",
                "description",
                "createdAt"
              ],
              "properties": {
                "amountCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "creditCents": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "currency": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "failureMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "$ref": "#/components/schemas/PaymentKind"
                },
                "planCode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/PaymentStatus"
                },
                "stripeInvoiceId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "team": {
                  "$ref": "#/components/schemas/TeamRefDto"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminReferralDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One referral as the admin sees it (the referred person's address is shown to admins only).",
              "required": [
                "id",
                "affiliateId",
                "code",
                "referredTeamId",
                "referredUserId",
                "referredEmail",
                "attributionSource",
                "status",
                "createdAt"
              ],
              "properties": {
                "affiliateId": {
                  "type": "string",
                  "format": "uuid"
                },
                "attributionSource": {
                  "$ref": "#/components/schemas/AttributionSource"
                },
                "code": {
                  "type": "string"
                },
                "commissionExpiresAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "firstPaidAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "fraudReason": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/FraudReason"
                    }
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "referredEmail": {
                  "type": "string"
                },
                "referredTeamId": {
                  "type": "string",
                  "format": "uuid"
                },
                "referredUserId": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "$ref": "#/components/schemas/ReferralStatus"
                },
                "subId": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminResourceDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One live resource, any kind, with its team.",
              "required": [
                "kind",
                "id",
                "name",
                "status",
                "team",
                "createdAt"
              ],
              "properties": {
                "clusterName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "engine": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A database's engine and version; an app's runtime or source kind."
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "$ref": "#/components/schemas/AdminResourceKind"
                },
                "name": {
                  "type": "string"
                },
                "projectId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "projectName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quotaBytes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "size": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app or database size, the template of a stack, the volume tier."
                },
                "status": {
                  "type": "string"
                },
                "statusMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "storageGib": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "team": {
                  "$ref": "#/components/schemas/TeamRefDto"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "An app's public URL; a domain's app."
                },
                "usedBytes": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "A bucket's stored bytes, a shared volume's measured use."
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminSupportTicketDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SupportTicketDto"
                },
                {
                  "type": "object",
                  "required": [
                    "requesterEmail",
                    "sla",
                    "hasDraft"
                  ],
                  "properties": {
                    "assignee": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/SupportStaffDto"
                        }
                      ]
                    },
                    "hasDraft": {
                      "type": "boolean",
                      "description": "A staff-only `ai_draft` waits to be sent."
                    },
                    "planCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The team's plan code (`None` for a guest)."
                    },
                    "requesterEmail": {
                      "type": "string"
                    },
                    "sla": {
                      "$ref": "#/components/schemas/SupportSlaDto"
                    },
                    "teamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "teamName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              ],
              "description": "A ticket in the operators' queue."
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AdminTeamDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One row of `GET /api/v1/admin/teams`.",
              "required": [
                "team",
                "planCode",
                "mrrCents",
                "members",
                "apps",
                "databases",
                "suspended",
                "createdAt"
              ],
              "properties": {
                "apps": {
                  "type": "integer",
                  "format": "int64"
                },
                "contractCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The code of the team's contract in force (`ENT-2026-0001`)."
                },
                "contractMrrCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Of it, the contract's commitment, monthly-normalised (area EN)."
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "databases": {
                  "type": "integer",
                  "format": "int64"
                },
                "interval": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/BillingInterval"
                    }
                  ]
                },
                "members": {
                  "type": "integer",
                  "format": "int64"
                },
                "mrrCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The team's recurring revenue: the plan and packs while it pays, plus an enterprise contract in force."
                },
                "planCode": {
                  "$ref": "#/components/schemas/PlanCode",
                  "description": "The plan the newest `active|trialing|past_due` subscription sets; `free` without one."
                },
                "subscriptionStatus": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/SubscriptionStatus"
                    }
                  ]
                },
                "suspended": {
                  "type": "boolean",
                  "description": "The owner is suspended (the kill-switch), so the team is."
                },
                "team": {
                  "$ref": "#/components/schemas/TeamRefDto"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AppDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "slug",
                "source",
                "size",
                "replicas",
                "port",
                "envKeys",
                "status",
                "clusterId",
                "clusterName",
                "namespace",
                "createdAt",
                "updatedAt",
                "kind"
              ],
              "properties": {
                "clusterId": {
                  "$ref": "#/components/schemas/ClusterId"
                },
                "clusterName": {
                  "type": "string"
                },
                "command": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "The container arguments replacing the image's `CMD` (`null` = the image's own)."
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "currentReleaseId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ReleaseId"
                    }
                  ]
                },
                "envKeys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Names of the environment variables; values are never returned."
                },
                "healthCheckPath": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "HTTP health check path (`null` = TCP checks on the port)."
                },
                "id": {
                  "$ref": "#/components/schemas/AppId"
                },
                "internalUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "How the user's other apps reach it: `http://<slug>:<port>` (private), `http://app-<slug>` (web)."
                },
                "kind": {
                  "$ref": "#/components/schemas/AppKind",
                  "description": "`web | private | worker | cron` (PLAN.md §15.3)."
                },
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                },
                "port": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "replicas": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                },
                "schedule": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A cron app's 5-field schedule."
                },
                "size": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "source": {
                  "$ref": "#/components/schemas/AppSource"
                },
                "status": {
                  "$ref": "#/components/schemas/AppStatus"
                },
                "statusMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "timezone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A cron app's IANA time zone."
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspaceUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Its in-cluster Service by its full name, which the project's builder workspace (the sandbox and its preview)\nreaches too (PLAN.md §18.F2): `http://app-<slug>.<namespace>.svc.cluster.local` (web),\n`http://<slug>.<namespace>.svc.cluster.local:<port>` (private); `null` for workers and cron jobs."
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_ArtifactDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "`GET /api/v1/artifacts/{id}`: one file a team may download until `expiresAt`.",
              "required": [
                "id",
                "kind",
                "filename",
                "mimeType",
                "sizeBytes",
                "metadata",
                "downloadPath",
                "expiresAt",
                "createdAt"
              ],
              "properties": {
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "downloadPath": {
                  "type": "string",
                  "description": "`/api/v1/artifacts/{id}/download` (the dashboard's session cookie or an API key)."
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "filename": {
                  "type": "string",
                  "description": "The name it downloads as (sanitized)."
                },
                "id": {
                  "$ref": "#/components/schemas/ArtifactId"
                },
                "kind": {
                  "$ref": "#/components/schemas/ArtifactKind"
                },
                "metadata": {
                  "$ref": "#/components/schemas/ArtifactMetadata"
                },
                "mimeType": {
                  "type": "string"
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "sessionId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/BuilderSessionId"
                    }
                  ]
                },
                "sizeBytes": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_AuditEventDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "action",
                "targetKind",
                "details",
                "createdAt"
              ],
              "properties": {
                "action": {
                  "type": "string"
                },
                "actorEmail": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "actorUserId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/UserId"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "details": {},
                "id": {
                  "$ref": "#/components/schemas/AuditEventId"
                },
                "targetId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "targetKind": {
                  "type": "string"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_BucketDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One bucket (`GET /api/v1/buckets`, `GET /api/v1/buckets/{id}`).",
              "required": [
                "id",
                "name",
                "status",
                "publicAccess",
                "endpoint",
                "region",
                "quotaBytes",
                "quotaGib",
                "usedBytes",
                "objectCount",
                "corsRules",
                "activeKeys",
                "attachedApps",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "activeKeys": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Access keys not revoked (bucket keys plus all-bucket keys of the owner).",
                  "minimum": 0
                },
                "attachedApps": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BucketAppDto"
                  },
                  "description": "Apps it is attached to (their `S3_*` variables name it)."
                },
                "corsRules": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CorsRule"
                  }
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "endpoint": {
                  "type": "string",
                  "description": "The S3 endpoint (`https://s3.fullsea.io`), path-style or `https://<name>.s3.fullsea.io`."
                },
                "id": {
                  "$ref": "#/components/schemas/BucketId"
                },
                "name": {
                  "type": "string",
                  "description": "The S3 bucket name (unique per owner): what `S3_BUCKET` holds."
                },
                "objectCount": {
                  "type": "integer",
                  "format": "int64"
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "publicAccess": {
                  "type": "boolean",
                  "description": "Its objects can be read by anyone at `publicUrl` (no listing)."
                },
                "publicSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The CDN path segment while public (`acme-uploads-k3x9qa`)."
                },
                "publicUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "`https://cdn.fullsea.io/<publicSlug>` while public."
                },
                "quotaBytes": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The most it may hold, in bytes (a whole number of GiB, reserved from the plan's Object Storage pool)."
                },
                "quotaGib": {
                  "type": "integer",
                  "format": "int64"
                },
                "region": {
                  "type": "string",
                  "description": "Always `auto`."
                },
                "status": {
                  "$ref": "#/components/schemas/BucketStatus",
                  "description": "`active`; `deleting` (refused at the edge at once, its objects being erased); `deleted`."
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "usedBytes": {
                  "type": "integer",
                  "format": "int64",
                  "description": "What it holds, as the edge last reported (reconciled daily from a listing)."
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_BucketKeyDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One access key (its secret is never shown again after [`CreatedBucketKey`]).",
              "required": [
                "id",
                "label",
                "accessKeyId",
                "permissions",
                "createdAt"
              ],
              "properties": {
                "accessKeyId": {
                  "type": "string",
                  "description": "`fs3_` + 20 characters: `S3_ACCESS_KEY_ID`."
                },
                "appId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/AppId",
                      "description": "The app it was minted for by an attach."
                    }
                  ]
                },
                "bucketId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/BucketId",
                      "description": "The bucket it is limited to; `null` = every bucket of its owner."
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "$ref": "#/components/schemas/StorageKeyId"
                },
                "label": {
                  "type": "string"
                },
                "permissions": {
                  "$ref": "#/components/schemas/BucketPermission"
                },
                "revokedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_CommissionDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One ledger row as the affiliate sees it: never who paid.",
              "required": [
                "id",
                "createdAt",
                "kind",
                "planLabel",
                "commissionCents",
                "status",
                "maturesAt"
              ],
              "properties": {
                "commissionCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "$ref": "#/components/schemas/CommissionKind"
                },
                "maturesAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When a pending commission clears."
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "An adjustment's reason."
                },
                "paidAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "planLabel": {
                  "type": "string",
                  "description": "`Pro · Monthly`, `Refund`, `Bonus`"
                },
                "status": {
                  "$ref": "#/components/schemas/CommissionStatus"
                },
                "subId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The channel tag of the referral."
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_DatabaseDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "slug",
                "engine",
                "version",
                "size",
                "storageGib",
                "status",
                "clusterId",
                "clusterName",
                "namespace",
                "createdAt",
                "updatedAt",
                "externalAccess",
                "allowedCidrs"
              ],
              "properties": {
                "allowedCidrs": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Source CIDRs external access is limited to; empty = anywhere."
                },
                "clusterId": {
                  "$ref": "#/components/schemas/ClusterId"
                },
                "clusterName": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "engine": {
                  "type": "string"
                },
                "externalAccess": {
                  "type": "boolean",
                  "description": "Opt-in access from outside Fullsea, over TLS only (off for new databases)."
                },
                "host": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The TLS host clients connect to from outside (`<slug>-<handle>.<db domain>`, also the TLS server name);\n`null` while external access is off."
                },
                "id": {
                  "$ref": "#/components/schemas/DatabaseId"
                },
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                },
                "port": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "The port from outside: the engine family's (5432, 3306, 6379), shared by every database; `null` while\nexternal access is off.",
                  "minimum": 0
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "size": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/DatabaseStatus"
                },
                "statusMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "storageGib": {
                  "type": "integer",
                  "format": "int64"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "version": {
                  "type": "string"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_OverageLedgerRowDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One team's overage in one billing period: what the meter accrued, what settlements claimed and charged, and what\nwas given back.",
              "required": [
                "team",
                "periodStart",
                "periodEnd",
                "hours",
                "accruedCents",
                "billedCents",
                "unbilledCents",
                "chargedCents",
                "paidCents",
                "waivedCents",
                "failed",
                "enabled",
                "current"
              ],
              "properties": {
                "accruedCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Every snapshot's charge summed (after the cap), cents."
                },
                "billedCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Of it, claimed by a settlement."
                },
                "chargedCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Settlements' amounts that ask for money (end of cycle, mid-cycle), and what of it was paid."
                },
                "current": {
                  "type": "boolean",
                  "description": "The period has not ended."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "The team's overflow setting now (`null` cap: the plan's default, no stored row)."
                },
                "failed": {
                  "type": "boolean",
                  "description": "A settlement of the period failed."
                },
                "frozenReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hours": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Hours with any overage metered."
                },
                "monthlyCapCents": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "paidCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "periodEnd": {
                  "type": "string",
                  "format": "date-time"
                },
                "periodStart": {
                  "type": "string",
                  "format": "date-time"
                },
                "team": {
                  "$ref": "#/components/schemas/TeamRefDto"
                },
                "unbilledCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "waivedCents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Waivers (positive: what was given back)."
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_PaymentDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One row of `GET /api/v1/billing/payments` (`Page<PaymentDto>`).",
              "required": [
                "id",
                "kind",
                "status",
                "amountCents",
                "currency",
                "description",
                "createdAt"
              ],
              "properties": {
                "amountCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "creditCents": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64",
                  "description": "The AI credit a top-up added."
                },
                "currency": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "failureMessage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "$ref": "#/components/schemas/PaymentKind"
                },
                "planCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The plan of a subscription payment."
                },
                "receiptUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Stripe's hosted invoice or receipt."
                },
                "status": {
                  "$ref": "#/components/schemas/PaymentStatus"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_PayoutBatchDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "batchCode",
                "status",
                "totalCents",
                "payoutCount",
                "createdAt",
                "payouts"
              ],
              "properties": {
                "batchCode": {
                  "type": "string",
                  "description": "`PAY-2026-12-01`"
                },
                "completedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "exportedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "payoutCount": {
                  "type": "integer",
                  "format": "int32"
                },
                "payouts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminPayoutDto"
                  }
                },
                "paypalBatchRef": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/BatchStatus"
                },
                "totalCents": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_PayoutDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One payout as the affiliate sees it.",
              "required": [
                "id",
                "createdAt",
                "payoutEmail",
                "amountCents",
                "currency",
                "status"
              ],
              "properties": {
                "amountCents": {
                  "type": "integer",
                  "format": "int64"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "currency": {
                  "type": "string"
                },
                "failureReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "paidAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "payoutEmail": {
                  "type": "string",
                  "description": "The PayPal address it was sent to (as it was then)."
                },
                "paypalRef": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "PayPal's transaction or batch reference."
                },
                "status": {
                  "$ref": "#/components/schemas/PayoutStatus"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_ProjectDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "slug",
                "createdAt",
                "updatedAt",
                "appCount",
                "databaseCount"
              ],
              "properties": {
                "appCount": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "databaseCount": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                },
                "id": {
                  "$ref": "#/components/schemas/ProjectId"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_SecretRequestDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "`GET /api/v1/secret-requests/{id}` (also the payload of the builder's `secret_requested` / `secret_resolved`).",
              "required": [
                "id",
                "appId",
                "appName",
                "secrets",
                "status",
                "savedKeys",
                "existingKeys",
                "createdAt",
                "expiresAt"
              ],
              "properties": {
                "appId": {
                  "$ref": "#/components/schemas/AppId"
                },
                "appName": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "existingKeys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Which of the asked keys the app already has (names only): the form says it replaces them."
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "$ref": "#/components/schemas/SecretRequestId"
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "resolvedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "savedKeys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The keys the person saved (names only), once `fulfilled`."
                },
                "secrets": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SecretField"
                  }
                },
                "sessionId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/BuilderSessionId",
                      "description": "The builder session asking (its chat shows the card); `null` for an outside agent (API key)."
                    }
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/SecretRequestStatus"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_StackDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A stack: what one deploy of a template created, and how far it got.",
              "required": [
                "id",
                "name",
                "slug",
                "kind",
                "templateCode",
                "templateName",
                "templateVersion",
                "templateIcon",
                "status",
                "resources",
                "hooks",
                "outputs",
                "inputs",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "backupNote": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "backupUnitId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "The backup unit of the template's backup policy taken once the stack was ready (`GET /backups?unitId=`);\n`null` before, or when there is none — then `backupNote` says why."
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "hooks": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StackHookDto"
                  }
                },
                "id": {
                  "$ref": "#/components/schemas/StackId"
                },
                "inputs": {
                  "type": "object",
                  "description": "The non-secret inputs it was deployed with."
                },
                "kind": {
                  "$ref": "#/components/schemas/TemplateKind"
                },
                "name": {
                  "type": "string"
                },
                "operationId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/OperationId",
                      "description": "The deploy (or delete) operation; its events are the stack's log."
                    }
                  ]
                },
                "outputs": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StackOutputDto"
                  }
                },
                "projectId": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ProjectId"
                    }
                  ]
                },
                "readyAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StackResourceDto"
                  }
                },
                "slug": {
                  "type": "string"
                },
                "starterPrompt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "AI starters: the first prompt for the builder."
                },
                "status": {
                  "$ref": "#/components/schemas/StackStatus"
                },
                "statusMessage": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Why it failed, or what it waits for."
                },
                "templateCode": {
                  "type": "string"
                },
                "templateIcon": {
                  "type": "string"
                },
                "templateName": {
                  "type": "string"
                },
                "templateVersion": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Page_SupportTicketDto": {
        "type": "object",
        "description": "`{items, nextCursor}`; `nextCursor` is `null` on the last page.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A ticket as its customer sees it.",
              "required": [
                "id",
                "number",
                "reference",
                "subject",
                "category",
                "priority",
                "status",
                "lastMessageAt",
                "messageCount",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "category": {
                  "$ref": "#/components/schemas/TicketCategory"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "firstRespondedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "firstResponseDueAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the first answer is due (the plan's or contract's first-response SLA)."
                },
                "id": {
                  "$ref": "#/components/schemas/SupportTicketId"
                },
                "lastMessageAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "messageCount": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Messages the reader can see."
                },
                "number": {
                  "type": "integer",
                  "format": "int32",
                  "description": "`1001`"
                },
                "priority": {
                  "$ref": "#/components/schemas/TicketPriority"
                },
                "reference": {
                  "type": "string",
                  "description": "`FS-1001`"
                },
                "resolvedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "resourceId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "resourceKind": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/TicketResourceKind"
                    }
                  ]
                },
                "resourceName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The resource's name when it still exists."
                },
                "status": {
                  "$ref": "#/components/schemas/TicketStatus"
                },
                "subject": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PaidMovementDto": {
        "type": "object",
        "description": "New paying subscriptions, churned ones and the difference in one window.",
        "required": [
          "window",
          "newPaid",
          "churned",
          "net"
        ],
        "properties": {
          "churned": {
            "type": "integer",
            "format": "int64"
          },
          "net": {
            "type": "integer",
            "format": "int64"
          },
          "newPaid": {
            "type": "integer",
            "format": "int64"
          },
          "window": {
            "type": "string",
            "description": "`24h`, `7d` or `30d`."
          }
        }
      },
      "PartnerLandingDto": {
        "type": "object",
        "description": "`GET /api/v1/affiliates/landing/{code}`: what the optional co-branded page `/go/<code>` shows. Every field but\nthe code is optional.",
        "required": [
          "code"
        ],
        "properties": {
          "bonusBadge": {
            "type": [
              "string",
              "null"
            ],
            "description": "`50% off your first month`"
          },
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"Recommended by …\""
          },
          "headline": {
            "type": [
              "string",
              "null"
            ]
          },
          "presetPrompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pre-filled into the prompt box."
          },
          "presetTemplate": {
            "type": [
              "string",
              "null"
            ],
            "description": "A template slug (`/templates/<slug>`)."
          },
          "promoCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Stripe promotion code to enter at checkout, when one is linked."
          },
          "subheadline": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PasswordLockDto": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user name visitors type (the password is read back with `GET …/edge/password`)."
          }
        }
      },
      "PasswordLockInput": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "10–128 characters; omitted: the current one, or a generated one."
          },
          "regenerate": {
            "type": "boolean",
            "description": "Generate a new password even when one is set."
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default `fullsea` (or the current one)."
          }
        },
        "additionalProperties": false
      },
      "PaymentDetails": {
        "type": "object",
        "description": "`payment_required.details` (and the builder's out-of-credit refusal).",
        "required": [
          "upgrade"
        ],
        "properties": {
          "upgrade": {
            "$ref": "#/components/schemas/UpgradeOffer"
          }
        }
      },
      "PaymentDto": {
        "type": "object",
        "description": "One row of `GET /api/v1/billing/payments` (`Page<PaymentDto>`).",
        "required": [
          "id",
          "kind",
          "status",
          "amountCents",
          "currency",
          "description",
          "createdAt"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "creditCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The AI credit a top-up added."
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "failureMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/PaymentKind"
          },
          "planCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The plan of a subscription payment."
          },
          "receiptUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stripe's hosted invoice or receipt."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          }
        }
      },
      "PaymentKind": {
        "type": "string",
        "description": "`payments.kind`",
        "enum": [
          "Subscription",
          "Topup",
          "AutoTopup"
        ]
      },
      "PaymentStatus": {
        "type": "string",
        "description": "`payments.status`: `pending` only while an automatic top-up waits for Stripe's answer.",
        "enum": [
          "Pending",
          "Paid",
          "Failed"
        ]
      },
      "PayoutBatchDto": {
        "type": "object",
        "required": [
          "id",
          "batchCode",
          "status",
          "totalCents",
          "payoutCount",
          "createdAt",
          "payouts"
        ],
        "properties": {
          "batchCode": {
            "type": "string",
            "description": "`PAY-2026-12-01`"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "exportedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payoutCount": {
            "type": "integer",
            "format": "int32"
          },
          "payouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminPayoutDto"
            }
          },
          "paypalBatchRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/BatchStatus"
          },
          "totalCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PayoutDto": {
        "type": "object",
        "description": "One payout as the affiliate sees it.",
        "required": [
          "id",
          "createdAt",
          "payoutEmail",
          "amountCents",
          "currency",
          "status"
        ],
        "properties": {
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payoutEmail": {
            "type": "string",
            "description": "The PayPal address it was sent to (as it was then)."
          },
          "paypalRef": {
            "type": [
              "string",
              "null"
            ],
            "description": "PayPal's transaction or batch reference."
          },
          "status": {
            "$ref": "#/components/schemas/PayoutStatus"
          }
        }
      },
      "PayoutPreviewDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/affiliates/payout-preview`",
        "required": [
          "items",
          "totalCents",
          "skipped"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutPreviewItem"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PayoutSkipped"
            }
          },
          "totalCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PayoutPreviewItem": {
        "type": "object",
        "description": "One affiliate a batch created now would pay.",
        "required": [
          "affiliateId",
          "code",
          "payoutEmail",
          "amountCents",
          "commissionCount"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "amountCents": {
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "type": "string"
          },
          "commissionCount": {
            "type": "integer",
            "format": "int64"
          },
          "payoutEmail": {
            "type": "string"
          }
        }
      },
      "PayoutSkipped": {
        "type": "object",
        "description": "An affiliate with a payable balance a batch would not pay, and why.",
        "required": [
          "affiliateId",
          "code",
          "payableCents",
          "reason"
        ],
        "properties": {
          "affiliateId": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "payableCents": {
            "type": "integer",
            "format": "int64"
          },
          "reason": {
            "type": "string",
            "description": "`below_minimum`, `email_unconfirmed`, `not_active`"
          }
        }
      },
      "PayoutStatus": {
        "type": "string",
        "description": "`affiliate_payouts.status`",
        "enum": [
          "Queued",
          "Sent",
          "Paid",
          "Failed",
          "Cancelled"
        ]
      },
      "Permission": {
        "type": "string",
        "description": "What an action needs. Each REST route family and MCP action names one ([`allows`] decides).",
        "enum": [
          "View",
          "Edit",
          "Deploy",
          "RevealSecrets",
          "WriteSql",
          "UseBuilder",
          "Delete",
          "ManageDomains",
          "Approve",
          "ManageMembers",
          "ManageApiKeys",
          "ManageIntegrations",
          "ConfigureTriage",
          "ManageBucketAccess",
          "ManageBilling",
          "TransferProject",
          "DeleteTeam"
        ]
      },
      "PitrBasePoint": {
        "type": "object",
        "description": "One point a restore can start from.",
        "required": [
          "at",
          "kind"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "The earliest time a restore from it can reach."
          },
          "kind": {
            "type": "string",
            "description": "`full`, `diff` (PostgreSQL base backups) or `dump` (MySQL/MariaDB)."
          }
        }
      },
      "PitrOverview": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/pitr`: whether the database is archived continuously, and from when to when it can\nbe restored.",
        "required": [
          "databaseId",
          "status",
          "retentionDays",
          "basePoints"
        ],
        "properties": {
          "basePoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PitrBasePoint"
            }
          },
          "databaseId": {
            "$ref": "#/components/schemas/DatabaseId"
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it is archived, in plain words (\"changes are archived every 4 minutes\")."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it is off or failing, and what to do; `null` when all is well."
          },
          "restorableFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The restorable window (both ends included); `null` until a base backup and some archive exist."
          },
          "restorableUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "restore": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "A point-in-time restore of this database queued or running (into a new database)."
              }
            ]
          },
          "retentionDays": {
            "type": "integer",
            "format": "int32",
            "description": "The plan's backup retention: how far back a restore can go.",
            "minimum": 0
          },
          "rpoMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "At most this many minutes of changes would be lost with the server.",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "description": "`off` (not archived), `starting`, `active`, `failing`, `stopping`, `stopped` (no longer archived; what is\narchived stays restorable), `restoring` (this database is being filled from another's archive)."
          }
        }
      },
      "PitrRestore": {
        "type": "object",
        "description": "The new database and the operation filling it.",
        "required": [
          "database",
          "operation",
          "at"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "The moment the new database holds the data of."
          },
          "database": {
            "$ref": "#/components/schemas/DatabaseDto"
          },
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          }
        }
      },
      "PlanCode": {
        "type": "string",
        "description": "A plan code (`PlanDto.code`).",
        "enum": [
          "Free",
          "Starter",
          "Pro",
          "Scale",
          "Business"
        ]
      },
      "PlanDto": {
        "type": "object",
        "required": [
          "code",
          "name",
          "monthlyPriceUsd",
          "annualPriceUsd",
          "entitlements",
          "purchasable"
        ],
        "properties": {
          "annualPriceUsd": {
            "type": "string",
            "description": "`\"150.00\"`: a year paid up front (ten months)."
          },
          "code": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "entitlements": {
            "$ref": "#/components/schemas/Entitlements"
          },
          "monthlyPriceUsd": {
            "type": "string",
            "description": "`\"15.00\"`"
          },
          "name": {
            "type": "string"
          },
          "purchasable": {
            "type": "boolean",
            "description": "A paid plan (it names a Stripe price)."
          }
        }
      },
      "PlanEntry": {
        "type": "object",
        "description": "One entry of a `plan` payload.",
        "required": [
          "content",
          "status",
          "priority"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "`pending` | `in_progress` | `completed`"
          }
        }
      },
      "PlanModelsDto": {
        "type": "object",
        "description": "What one plan's turns on Fullsea's key may use (the admin's preview; an own Claude key opens everything the agent\nreports).",
        "required": [
          "plan",
          "planName",
          "families",
          "efforts"
        ],
        "properties": {
          "efforts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The effort level ids it may use, least to most thinking."
          },
          "families": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The family ids it may use, in the policy's order."
          },
          "plan": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "planName": {
            "type": "string",
            "description": "`Starter`"
          }
        }
      },
      "PlanPayload": {
        "type": "object",
        "description": "`plan`",
        "required": [
          "entries"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanEntry"
            }
          }
        }
      },
      "PlanRevenueDto": {
        "type": "object",
        "description": "One plan's share of recurring revenue.",
        "required": [
          "planCode",
          "subscriptions",
          "mrrCents"
        ],
        "properties": {
          "mrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "subscriptions": {
            "type": "integer",
            "format": "int64",
            "description": "Paying subscriptions (`active` and `past_due`) on the plan."
          }
        }
      },
      "PlatformSettingsDto": {
        "type": "object",
        "description": "`GET/PATCH /api/v1/admin/settings`",
        "required": [
          "platformKeyEnabled",
          "adminMcpEnabled"
        ],
        "properties": {
          "adminMcpEnabled": {
            "type": "boolean",
            "description": "The admin MCP's kill switch (area AM): `POST /admin/mcp` answers `403` to every token while it is off.\nUnset, it follows `FULLSEA_ADMIN_MCP_ENABLED`."
          },
          "platformKeyEnabled": {
            "type": "boolean"
          }
        }
      },
      "PolicyChange": {
        "type": "object",
        "description": "One field whose value differs between two policies: the audit's and the history's \"what\".",
        "required": [
          "field",
          "from",
          "to"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "`families.opus.minPlan`, `effortLevels.max.minPlan`, `defaultFamily`, …"
          },
          "from": {
            "type": "object",
            "description": "The value before (`null`: the field did not exist)."
          },
          "to": {
            "type": "object"
          }
        }
      },
      "PolicyDto": {
        "type": "object",
        "description": "`Me.policy` (PLAN.md §20, §21.F): what sits on top of the plan and its packs — the enterprise contract in force,\nits SLA tier and the overflow policy. `Me.entitlements` already holds the resulting limits.",
        "required": [
          "slaTier",
          "overflow"
        ],
        "properties": {
          "contract": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ContractSummaryDto",
                "description": "The enterprise contract in force; `null` without one."
              }
            ]
          },
          "overflow": {
            "$ref": "#/components/schemas/OverflowPolicyDto"
          },
          "slaTier": {
            "$ref": "#/components/schemas/SlaTier",
            "description": "`standard` without a contract."
          }
        }
      },
      "PolicyOverride": {
        "type": "object",
        "description": "An operator's override of the policy file (`/admin/settings`, `builder_model_policy_revisions`, migration 0063):\nonly what it names changes, by family and level id. Families are not added, removed or re-matched here: that is\nthe file's (a deploy).",
        "properties": {
          "defaultEffort": {
            "type": [
              "string",
              "null"
            ]
          },
          "defaultFamily": {
            "type": [
              "string",
              "null"
            ]
          },
          "effortLevels": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EffortOverride"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "families": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FamilyOverride"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "PoolCredentialDto": {
        "type": "object",
        "description": "One slot of the pool.",
        "required": [
          "id",
          "label",
          "provider",
          "secretHint",
          "tier",
          "maxConcurrentTurns",
          "weight",
          "enabled",
          "health",
          "runningTurns",
          "affinitySessions",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "affinitySessions": {
            "type": "integer",
            "format": "int32",
            "description": "Projects whose last platform turn ran on it (their prompt-cache affinity).",
            "minimum": 0
          },
          "baseUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "cooldownUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean"
          },
          "health": {
            "$ref": "#/components/schemas/PoolSlotHealth"
          },
          "id": {
            "$ref": "#/components/schemas/PoolCredentialId"
          },
          "label": {
            "type": "string"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the provider said the last time it refused a turn (never a secret)."
          },
          "lastErrorAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "maxConcurrentTurns": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "provider": {
            "$ref": "#/components/schemas/PoolProvider"
          },
          "region": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bedrock's AWS region or Vertex's location."
          },
          "rotatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "runningTurns": {
            "type": "integer",
            "format": "int32",
            "description": "Turns running on it now, on every builder replica.",
            "minimum": 0
          },
          "secretHint": {
            "type": "string",
            "description": "`…` and the secret's last four characters (a Vertex key: its service account's email)."
          },
          "tier": {
            "$ref": "#/components/schemas/PoolTier"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "weight": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "PoolCredentialId": {
        "type": "string",
        "format": "uuid",
        "description": "`platform_agent_credentials.id`: one slot of the agent credential pool (PLAN.md §18.B)"
      },
      "PoolProvider": {
        "type": "string",
        "description": "`platform_agent_credentials.provider`: where a slot's turns go.",
        "enum": [
          "AnthropicApi",
          "Bedrock",
          "Vertex",
          "CustomProxy"
        ]
      },
      "PoolSlotHealth": {
        "type": "string",
        "description": "What the scheduler would do with a slot now.",
        "enum": [
          "ready",
          "full",
          "cooling",
          "disabled"
        ]
      },
      "PoolTier": {
        "type": "string",
        "description": "`platform_agent_credentials.tier`: who may use a slot. Free plans run on `free` slots only, paid plans on\n`paid` and `priority` slots, so a burst of free sign-ups never rate-limits a paying customer's key.",
        "enum": [
          "Free",
          "Paid",
          "Priority"
        ]
      },
      "PortalResponse": {
        "type": "object",
        "required": [
          "portalUrl"
        ],
        "properties": {
          "portalUrl": {
            "type": "string"
          }
        }
      },
      "PostSupportMessage": {
        "type": "object",
        "description": "`POST /api/v1/support/tickets/{ref}/messages` (JSON, or `multipart/form-data` with `body` and `files`).",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PrepareUpload": {
        "type": "object",
        "description": "`POST /api/v1/uploads`: both optional. `appId`: the upload is for a deploy of this app (only it may use it);\n`projectId`: a new app from it joins this project when its create names none.",
        "properties": {
          "appId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppId"
              }
            ]
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "PreparedUpload": {
        "type": "object",
        "description": "`POST /api/v1/uploads` → 201 (and the MCP `prepare_upload` result): where and how to upload the archive.",
        "required": [
          "uploadId",
          "url",
          "method",
          "headers",
          "expiresAt",
          "maxBytes",
          "command"
        ],
        "properties": {
          "command": {
            "type": "string",
            "description": "A shell command (sh, bash or zsh; macOS or Linux) that packs the current directory as a `.tar.gz` and uploads\nit: inside a Git checkout the files Git lists (tracked and untracked, `.gitignore` respected), elsewhere the\nfolder without `node_modules`, `.git` and build outputs; `.env` files never."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the URL stops working (10 minutes)."
          },
          "headers": {
            "type": "object",
            "description": "Headers the upload must send as they are (none today).",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "maxBytes": {
            "type": "integer",
            "format": "int64",
            "description": "The largest archive accepted (100 MiB).",
            "minimum": 0
          },
          "method": {
            "type": "string",
            "description": "Always `PUT`."
          },
          "uploadId": {
            "$ref": "#/components/schemas/UploadId"
          },
          "url": {
            "type": "string",
            "description": "The presigned URL: the credential itself, never log it."
          }
        }
      },
      "PresignObject": {
        "type": "object",
        "description": "`POST /api/v1/buckets/{id}/objects`: a short-lived URL for the browser to upload, download or delete one object\nstraight at the S3 endpoint (no object passes through the API).",
        "required": [
          "key",
          "operation"
        ],
        "properties": {
          "contentType": {
            "type": [
              "string",
              "null"
            ],
            "description": "upload: the file's type (sent back as `Content-Type`)."
          },
          "key": {
            "type": "string"
          },
          "operation": {
            "$ref": "#/components/schemas/ObjectOperation"
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "upload: its size, checked against what the bucket has left before the URL is handed out."
          }
        },
        "additionalProperties": false
      },
      "PresignedObject": {
        "type": "object",
        "required": [
          "key",
          "method",
          "url",
          "headers",
          "expiresAt"
        ],
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "headers": {
            "type": "object",
            "description": "Headers to send as they are (upload: `Content-Type`).",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "key": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "description": "`PUT`, `GET` or `DELETE`."
          },
          "url": {
            "type": "string"
          }
        }
      },
      "PreviewDatabaseDto": {
        "type": "object",
        "description": "A temporary preview database (PLAN.md §18.F2): a small database next to the project's sandbox that only its\npreview and its builder reach. Its data resets; it is never billed, backed up or published, and it goes with the\npreview. Never its password.",
        "required": [
          "id",
          "projectId",
          "name",
          "engine",
          "version",
          "family",
          "status",
          "envVar",
          "host",
          "port",
          "temporary",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "engine": {
            "type": "string",
            "description": "The catalog engine (`postgres`, `mysql`, `mariadb`, `redis`, `valkey`) and its version."
          },
          "envVar": {
            "type": "string",
            "description": "The variable the preview's dev server gets its URL in (`DATABASE_URL`, `REDIS_URL`)."
          },
          "family": {
            "$ref": "#/components/schemas/EngineFamily",
            "description": "One of each per project: `postgres`, `mysql` (MySQL, MariaDB), `redis` (Redis, Valkey)."
          },
          "host": {
            "type": "string",
            "description": "Where it answers inside the sandbox cluster (`pdb-<project>-<family>.<namespace>.svc.cluster.local`)."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed, in words."
          },
          "name": {
            "type": "string",
            "description": "The name the agent gave it."
          },
          "port": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "status": {
            "$ref": "#/components/schemas/PreviewDatabaseStatus"
          },
          "temporary": {
            "type": "boolean",
            "description": "Always true: the workbench labels it \"Preview database · temporary\"."
          },
          "version": {
            "type": "string"
          }
        }
      },
      "PreviewDatabaseStatus": {
        "type": "string",
        "description": "`preview_databases.status`",
        "enum": [
          "Starting",
          "Ready",
          "Failed"
        ]
      },
      "PreviewDto": {
        "type": "object",
        "description": "A project's private preview.",
        "required": [
          "projectId",
          "status",
          "previewUrl",
          "previewOrigin",
          "openUrl",
          "port",
          "path",
          "command",
          "startedAt",
          "idleSecs"
        ],
        "properties": {
          "command": {
            "type": "string",
            "description": "What runs (`sh -c`, in the workspace, with `PORT` set)."
          },
          "exitCode": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The dev server's exit code when it ended by itself."
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When a starting or running preview stops unless a request comes first (`FULLSEA_PREVIEW_IDLE_SECS` after the\nlast one); `None` once it ended."
          },
          "idleSecs": {
            "type": "integer",
            "format": "int64",
            "description": "`FULLSEA_PREVIEW_IDLE_SECS`",
            "minimum": 0
          },
          "logTail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end of the dev server's output (at most 8 KiB) when it failed."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed or stopped, in words."
          },
          "openUrl": {
            "type": "string",
            "description": "`/api/v1/projects/{id}/preview/open?path=…` on the dashboard origin: the hand-off that signs the owner in to the\npreview host and lands on `path` (what the workbench frames and \"open in a new tab\" opens)."
          },
          "path": {
            "type": "string",
            "description": "The page opened first."
          },
          "port": {
            "type": "integer",
            "format": "int32",
            "description": "The port the dev server listens on (in the sandbox; with the local runner, on the builder's host).",
            "minimum": 0
          },
          "previewOrigin": {
            "type": "string",
            "description": "The preview's origin (`https://preview-<project id>.<domain>`): the only origin whose console-bridge messages\nthe workbench reads."
          },
          "previewUrl": {
            "type": "string",
            "description": "`https://preview-<project id>.<domain>/<path>`: only its owner gets through (a signed hand-off from the\ndashboard sets a cookie of that host alone)."
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/PreviewStatus"
          }
        }
      },
      "PreviewModelPolicy": {
        "type": "object",
        "description": "`POST /api/v1/admin/builder-models/preview`: an override checked and previewed, nothing stored.",
        "required": [
          "override"
        ],
        "properties": {
          "override": {
            "$ref": "#/components/schemas/PolicyOverride"
          }
        },
        "additionalProperties": false
      },
      "PreviewSettingsDto": {
        "type": "object",
        "description": "Pull request previews of a project.",
        "required": [
          "enabled",
          "commitStatus",
          "repositories"
        ],
        "properties": {
          "commitStatus": {
            "type": "boolean",
            "description": "Report each preview's outcome to GitHub as a commit status (the App needs `statuses: write`)."
          },
          "enabled": {
            "type": "boolean"
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Repositories of the project's apps linked through the GitHub App (what a pull request must be on)."
          }
        }
      },
      "PreviewStatus": {
        "type": "string",
        "description": "`previews.status`",
        "enum": [
          "Starting",
          "Running",
          "Failed",
          "Stopped",
          "Expired"
        ]
      },
      "ProbeDto": {
        "type": "object",
        "description": "A custom endpoint probe.",
        "required": [
          "id",
          "appId",
          "name",
          "method",
          "path",
          "intervalSeconds",
          "enabled",
          "status",
          "createdAt"
        ],
        "properties": {
          "alertRuleId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AlertRuleId",
                "description": "The `probe_down` rule that alerts on it, if any."
              }
            ]
          },
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean"
          },
          "expectedStatus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null`: any answer under 400."
          },
          "failingSince": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ProbeId"
          },
          "intervalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "description": "The body must contain it (case-sensitive)."
          },
          "lastCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last check failed, in words."
          },
          "lastLatencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "lastStatusCode": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "latencyThresholdMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Slower than this counts as failed."
          },
          "method": {
            "$ref": "#/components/schemas/ProbeMethod"
          },
          "name": {
            "type": "string"
          },
          "p95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "P95 of the last 24 hours' checks (ms)."
          },
          "path": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UptimeStatus"
          },
          "uptime24h": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Uptime of the last 24 hours (percent)."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address checked (the app's address plus the path); `null` until the app has one."
          }
        }
      },
      "ProbeId": {
        "type": "string",
        "format": "uuid",
        "description": "`probes.id`: a custom endpoint check of an app"
      },
      "ProbeInput": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/probes` (201); `PATCH /api/v1/probes/{id}` takes the same fields, each optional.",
        "properties": {
          "alert": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Alert when it fails (a `probe_down` rule on the account's channels); `false` removes that rule."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "expectedStatus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`0` clears it (any answer under 400)."
          },
          "intervalSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "description": "`\"\"` clears it."
          },
          "latencyThresholdMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`0` clears it."
          },
          "method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProbeMethod"
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ProbeMethod": {
        "type": "string",
        "description": "`probes.method`",
        "enum": [
          "Get",
          "Head",
          "Post"
        ]
      },
      "ProgramTermsDto": {
        "type": "object",
        "description": "The program's standard terms (shown before joining).",
        "required": [
          "commissionBps",
          "minPayoutCents",
          "holdDays",
          "cookieDays"
        ],
        "properties": {
          "commissionBps": {
            "type": "integer",
            "format": "int32",
            "description": "2500 = 25 %"
          },
          "cookieDays": {
            "type": "integer",
            "format": "int64"
          },
          "holdDays": {
            "type": "integer",
            "format": "int64"
          },
          "minPayoutCents": {
            "type": "integer",
            "format": "int64"
          },
          "recurringMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` = lifetime"
          }
        }
      },
      "ProjectDto": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "createdAt",
          "updatedAt",
          "appCount",
          "databaseCount"
        ],
        "properties": {
          "appCount": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "databaseCount": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProjectEnvDto": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/env`. After a change, `redeployed` names the apps a new release was queued for.",
        "required": [
          "projectId",
          "revealed",
          "entries"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvEntryDto"
            }
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "redeployed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppId"
            }
          },
          "revealed": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ProjectEnvironmentsDto": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/environments`.",
        "required": [
          "environments",
          "previews",
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnvironmentDto"
            }
          },
          "previews": {
            "$ref": "#/components/schemas/PreviewSettingsDto"
          }
        }
      },
      "ProjectId": {
        "type": "string",
        "format": "uuid",
        "description": "`projects.id`; the workspace directory is `<FULLSEA_WORKSPACES_ROOT>/<project id>`"
      },
      "ProjectMapDto": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/map`.",
        "required": [
          "projectId",
          "projectName",
          "nodes",
          "edges",
          "stacks",
          "generatedAt"
        ],
        "properties": {
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MapEdgeDto"
            }
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MapNodeDto"
            }
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "projectName": {
            "type": "string"
          },
          "stacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MapStackDto"
            }
          }
        }
      },
      "ProjectNeedsDto": {
        "type": "object",
        "description": "What a project needs of the team that receives it.",
        "required": [
          "apps",
          "databases",
          "volumes",
          "cpuMillis",
          "memoryMib",
          "storageGib",
          "sharedStorageGib"
        ],
        "properties": {
          "apps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "databases": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "sharedStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "GiB of its Shared App Disks (the plan's `sharedStorageGib`; not in `storageGib`)."
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "volumes": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "ProjectPreview": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/preview`",
        "properties": {
          "databases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreviewDatabaseDto"
            },
            "description": "The project's temporary preview databases (PLAN.md §18.F2: a plan that cannot publish gets these instead of\nreal databases while it builds); empty for most projects."
          },
          "preview": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PreviewDto",
                "description": "`None` until a preview was started for the project."
              }
            ]
          }
        }
      },
      "ProjectRoutesDto": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/routes`.",
        "required": [
          "tables",
          "customDomains",
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "customDomains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Verified custom domains of the project's apps, which a table may take over."
          },
          "suggestedHostname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The project's own address (`<label>-<handle>.<apps domain>`) a new table may use, with `label` = the\nproject's slug."
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteTableDto"
            }
          }
        }
      },
      "ProjectTransferId": {
        "type": "string",
        "format": "uuid",
        "description": "`project_transfers.id`: an emailed offer to take over a project (agency client transfer)"
      },
      "PromptAccepted": {
        "type": "object",
        "description": "`POST /v1/projects/{id}/prompt` → 202 (409 while a turn runs; 402 `payment_required` when a platform-key turn has\nno credit left).",
        "required": [
          "seq"
        ],
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PromptAttachment": {
        "type": "object",
        "description": "One image of a prompt, base64 (standard alphabet, padding optional); or (area AR) a file attached in the chat,\nuploaded first (`POST /api/v1/artifacts/uploads`) and named by its `artifactId` (`mediaType` and `data` are then\nleft out). At most [`MAX_ATTACHMENTS`] of each.",
        "properties": {
          "artifactId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactId",
                "description": "Area AR: a chat upload of the session's team (an artifact), instead of an image."
              }
            ]
          },
          "data": {
            "type": "string"
          },
          "mediaType": {
            "type": "string",
            "description": "`image/png` | `image/jpeg` | `image/gif` | `image/webp`"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PromptFileRef": {
        "type": "object",
        "description": "A file a prompt carried (area AR), as `user_message.files` lists it: the chat shows a chip, the agent gets\n`artifactId` (and the workspace copy's path).",
        "required": [
          "artifactId",
          "name",
          "mediaType",
          "size"
        ],
        "properties": {
          "artifactId": {
            "$ref": "#/components/schemas/ArtifactId"
          },
          "mediaType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "workspacePath": {
            "type": [
              "string",
              "null"
            ],
            "description": "`.uploads/<name>` in the project's workspace (small text files of a workbench)."
          }
        }
      },
      "PromptIntent": {
        "type": "string",
        "description": "What kind of thing a prompt asks for: the prompt box's mode pills (master plan §6.1).",
        "enum": [
          "web_app",
          "website",
          "store",
          "bot",
          "slides",
          "dashboard",
          "automation",
          "api",
          "manage"
        ]
      },
      "PromptRequest": {
        "type": "object",
        "description": "`POST /v1/projects/{id}/prompt` (and `/v1/account/prompt`): the text and at most\n[`MAX_ATTACHMENTS`] images; `text` may be empty when an image is attached. `intent` is the mode pill the\nperson chose in the prompt box (PLAN.md §18.0): the builder tells the agent one fixed line for it and never\nstores or shows that line.",
        "required": [
          "text"
        ],
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptAttachment"
            }
          },
          "effort": {
            "type": [
              "string",
              "null"
            ],
            "description": "Area MX: the effort level likewise."
          },
          "intent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PromptIntent"
              }
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Area MX: the model this turn (and the session from now on) runs on, picked right before sending: a value of\nthe options' `models` (400 when not offered, 402 when the plan does not reach it on Fullsea's key)."
          },
          "policyRevision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Area MP: the options' `policyRevision` the choice was offered under. When the model policy changed since and\nno longer allows the choice (an operator hid the family or raised its plan), the turn falls back calmly to the\nsession's, the person's or the policy's default and the chat says so, instead of a 400 / 402."
          },
          "text": {
            "type": "string"
          }
        }
      },
      "ProtectedResourceMetadata": {
        "type": "object",
        "description": "`GET /.well-known/oauth-protected-resource[/mcp]` (RFC 9728).",
        "required": [
          "resource",
          "authorization_servers",
          "scopes_supported",
          "bearer_methods_supported",
          "resource_name",
          "resource_documentation"
        ],
        "properties": {
          "authorization_servers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bearer_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resource": {
            "type": "string",
            "description": "`<api>/mcp`: the audience every token for it is bound to."
          },
          "resource_documentation": {
            "type": "string"
          },
          "resource_name": {
            "type": "string"
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Provisioner": {
        "type": "string",
        "description": "`clusters.provisioner`: how nodes are added and removed (PLAN.md §2.1).",
        "enum": [
          "K3d",
          "Ssh",
          "Manual"
        ]
      },
      "PublicComponentDto": {
        "type": "object",
        "description": "One service on a public status page.",
        "required": [
          "name",
          "state",
          "days"
        ],
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UptimeDayDto"
            }
          },
          "name": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/StatusState"
          },
          "uptime90d": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        }
      },
      "PublicIncidentDto": {
        "type": "object",
        "description": "An incident as a public page tells it: what and when, never the message.",
        "required": [
          "component",
          "title",
          "resolved",
          "openedAt"
        ],
        "properties": {
          "component": {
            "type": "string"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "resolved": {
            "type": "boolean"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "\"Not answering\", \"Elevated errors\", \"Slow answers\", \"Certificate expiring\", \"Restarting\"."
          }
        }
      },
      "PublicStatusDto": {
        "type": "object",
        "description": "`GET /api/v1/status/{slug}` (public, cacheable for 30 s): no names but the page's title and its services'.",
        "required": [
          "slug",
          "title",
          "state",
          "components",
          "incidents",
          "updatedAt"
        ],
        "properties": {
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicComponentDto"
            }
          },
          "incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicIncidentDto"
            },
            "description": "The last 14 days, newest first."
          },
          "slug": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/StatusState"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublishWall": {
        "type": "object",
        "description": "`structuredContent.publishWall` (PLAN.md §18.C): what a Free account's app would be once published, and the plan\nthat publishes it.",
        "required": [
          "appName",
          "recommendedPlan",
          "monthlyUsd",
          "highlights"
        ],
        "properties": {
          "appName": {
            "type": "string",
            "description": "The app (or stack) the call tried to publish."
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "monthlyUsd": {
            "type": "number",
            "format": "double"
          },
          "previewData": {
            "type": "boolean",
            "description": "The project's preview keeps its data in temporary preview databases (PLAN.md §18.F2): the card says that data\nstays in the preview (publishing creates a real database; nothing is copied)."
          },
          "previewUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The private preview of the project (area V), when one runs."
          },
          "recommendedPlan": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The public URL it gets once live (`null` for a kind without one, or before a cluster is known)."
          }
        }
      },
      "PullRequestDto": {
        "type": "object",
        "required": [
          "repository",
          "number"
        ],
        "properties": {
          "branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "headSha": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "reportedState": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit status last sent to GitHub (`pending | success | failure | error`)."
          },
          "repository": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PutAddons": {
        "type": "object",
        "description": "`PUT /api/v1/billing/addons`: the quantity wanted of each named pack (`0` removes it); packs not named keep\ntheirs. Increases are prorated and charged now; decreases are credited on the next invoice.",
        "required": [
          "packs"
        ],
        "properties": {
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HeldAddonDto"
            }
          }
        }
      },
      "PutAgentCredential": {
        "type": "object",
        "description": "`PUT /api/v1/agent-credential`",
        "required": [
          "kind",
          "secret"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AgentCredentialKind"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "PutAutoTopup": {
        "type": "object",
        "description": "`PUT /api/v1/billing/auto-topup`",
        "required": [
          "enabled",
          "thresholdCents",
          "packCents"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "packCents": {
            "type": "integer",
            "format": "int64"
          },
          "thresholdCents": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PutAutoscale": {
        "type": "object",
        "description": "`PUT /api/v1/apps/{id}/autoscale`: `enabled: false` goes back to the fixed replica count.",
        "required": [
          "enabled"
        ],
        "properties": {
          "cpuPercent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Average CPU it keeps each replica at, 20–95 % (default 70).",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "maxReplicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "minReplicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "PutEnv": {
        "type": "object",
        "description": "`PUT /api/v1/projects/{id}/env`: the whole project environment.",
        "properties": {
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "PutFleetCost": {
        "type": "object",
        "description": "`PUT /api/v1/admin/fleet-cost`",
        "required": [
          "perNodeMonthlyCents",
          "fixedMonthlyCents"
        ],
        "properties": {
          "fixedMonthlyCents": {
            "type": "integer",
            "format": "int64"
          },
          "perNodeMonthlyCents": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "PutManagedEmail": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "fromAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "On the sending domain or a verified custom domain (default: `<stack slug>@<sending domain>`)."
          },
          "fromName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name (default: the stack's name)."
          }
        },
        "additionalProperties": false
      },
      "PutPreviewSettings": {
        "type": "object",
        "description": "`PUT /api/v1/projects/{id}/previews`.",
        "required": [
          "enabled"
        ],
        "properties": {
          "commitStatus": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PutRelaySwitch": {
        "type": "object",
        "required": [
          "relayEnabled"
        ],
        "properties": {
          "relayEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PutRouteTable": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/routes` / `PUT …/routes/{routeId}` (`hostname`/`label` only on create).",
        "required": [
          "paths"
        ],
        "properties": {
          "hostname": {
            "type": [
              "string",
              "null"
            ],
            "description": "A verified custom domain of one of the project's apps…"
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "…or a label for an address of its own: `<label>-<handle>.<apps domain>` (default: the project's slug)."
          },
          "paths": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutePathDto"
            }
          }
        },
        "additionalProperties": false
      },
      "PutStatusPage": {
        "type": "object",
        "description": "`PUT /api/v1/projects/{id}/status-page`",
        "required": [
          "enabled"
        ],
        "properties": {
          "appIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AppId"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default: derived from the project's name (and kept once chosen)."
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "PutSupportDraft": {
        "type": "object",
        "description": "`PUT /api/v1/admin/support/tickets/{ref}/draft`: saves (or replaces) the ticket's `ai_draft`.",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PutTriageSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "monthlyCapCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "0 to 5000 (the account's, shared by its projects)."
          }
        },
        "additionalProperties": false
      },
      "QuotaDetails": {
        "type": "object",
        "description": "`quota_exceeded.details`",
        "required": [
          "resource",
          "limit",
          "used",
          "requested"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "overflow": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OverflowOffer",
                "description": "Why it did not run in paid overflow beyond the plan (PLAN.md §21.OV), and whether Billing can change that;\nabsent where overflow does not apply."
              }
            ]
          },
          "requested": {
            "type": "integer",
            "format": "int64"
          },
          "resource": {
            "$ref": "#/components/schemas/QuotaResource"
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "The cheapest bigger plan that holds it; absent when none does."
              }
            ]
          },
          "used": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "QuotaResource": {
        "type": "string",
        "description": "`quota_exceeded.details.resource`",
        "enum": [
          "Apps",
          "Databases",
          "Cpu",
          "Memory",
          "Storage",
          "Volumes",
          "SharedStorage",
          "ObjectStorage",
          "Buckets"
        ]
      },
      "QuoteRateDto": {
        "type": "object",
        "description": "One rate of the quote: the card's and the contract's.",
        "required": [
          "metric",
          "unit"
        ],
        "properties": {
          "contractMicrousd": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "defaultMicrousd": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "metric": {
            "$ref": "#/components/schemas/OverageMetric"
          },
          "unit": {
            "type": "string"
          }
        }
      },
      "RateLimitDto": {
        "type": "object",
        "required": [
          "requestsPerSecond"
        ],
        "properties": {
          "burst": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Requests allowed at once on top of the rate (default twice the rate, at least 10).",
            "minimum": 0
          },
          "requestsPerSecond": {
            "type": "integer",
            "format": "int32",
            "description": "Requests per second per visitor address.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "RateLimitRuleDto": {
        "type": "object",
        "description": "One rate-limit rule: `requests` per `period` per visitor address, `burst` at once, on `path` and everything under\nit. A rule on a path is its own router ahead of the app's other routes; a request counts against the rule of the\nlongest path it is under and against the whole-app rule.",
        "required": [
          "path",
          "period",
          "requests",
          "burst"
        ],
        "properties": {
          "burst": {
            "type": "integer",
            "format": "int32",
            "description": "Requests allowed at once.",
            "minimum": 0
          },
          "path": {
            "type": "string",
            "description": "`/` (the whole app) or a prefix such as `/login` (it and `/login/…`, never `/loginx`)."
          },
          "period": {
            "$ref": "#/components/schemas/RatePeriod"
          },
          "requests": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "RateLimitRuleInput": {
        "type": "object",
        "description": "One rule `PATCH …/edge` sets or removes (`rateLimits`); the rules of paths it does not name stay.",
        "required": [
          "requests"
        ],
        "properties": {
          "burst": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Default per second twice the rate, at least 10; per minute the rate itself (the eleventh of \"10 a minute\"\nat once is refused, 429, until the minute refills). At most 20000.",
            "minimum": 0
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default `/` (the whole app); `/login/` and `/login/*` mean `/login`."
          },
          "period": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RatePeriod",
                "description": "Default `second`."
              }
            ]
          },
          "requests": {
            "type": "integer",
            "format": "int32",
            "description": "1–10000 per visitor address per period; 0 removes the path's rule.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "RatePeriod": {
        "type": "string",
        "description": "`app_edge_rate_limits.period`: what a rate-limit rule counts its requests per.",
        "enum": [
          "Second",
          "Minute"
        ]
      },
      "ReadOnlyProjectDto": {
        "type": "object",
        "description": "A project of the team with its resources, as its members see it.",
        "required": [
          "name",
          "resources"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "`null` for resources outside any project."
          },
          "name": {
            "type": "string"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminResourceDto"
            }
          }
        }
      },
      "ReadOnlyTeamViewDto": {
        "type": "object",
        "description": "The team's dashboard rendered through admin reads: no customer session or token is minted, and the view is in\nthe audit log (`team.read_only_view`).",
        "required": [
          "team",
          "allocated",
          "limits",
          "credits",
          "projects",
          "auditEventId",
          "viewedAt"
        ],
        "properties": {
          "allocated": {
            "$ref": "#/components/schemas/Capacity"
          },
          "auditEventId": {
            "type": "string",
            "format": "uuid"
          },
          "credits": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "limits": {
            "$ref": "#/components/schemas/Capacity"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadOnlyProjectDto"
            }
          },
          "team": {
            "$ref": "#/components/schemas/AdminTeamDto"
          },
          "viewedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReadOnlyViewRequest": {
        "type": "object",
        "description": "`POST /api/v1/admin/teams/{id}/read-only-view`",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the operator looks (recorded in the audit log)."
          }
        },
        "additionalProperties": false
      },
      "ReadyDto": {
        "type": "object",
        "description": "`GET /readyz` → 200 when ready, 503 otherwise, with the same body.",
        "required": [
          "status",
          "database",
          "schema"
        ],
        "properties": {
          "database": {
            "type": "boolean",
            "description": "The database answers."
          },
          "schema": {
            "type": "boolean",
            "description": "Every embedded migration is applied."
          },
          "status": {
            "type": "string",
            "description": "`ready` | `not_ready`"
          }
        }
      },
      "RecordClick": {
        "type": "object",
        "description": "`POST /api/v1/affiliates/click`: a visit carrying `?ref=<code>` (any page) or `/go/<code>`. The answer sets the\n`fs_ref` (and `fs_ref_sub`) cookies when the code is an active affiliate's.",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page the visitor landed on (path only)."
          },
          "referrer": {
            "type": [
              "string",
              "null"
            ],
            "description": "`document.referrer` (only its host is kept)."
          },
          "sub": {
            "type": [
              "string",
              "null"
            ],
            "description": "The channel tag (`via` or `sub`): a slug of 1–32 `a-z0-9-_`; anything else is dropped."
          }
        }
      },
      "ReferralStatus": {
        "type": "string",
        "description": "`affiliate_referrals.status`",
        "enum": [
          "SignedUp",
          "Converted",
          "FlaggedFraud",
          "Disqualified"
        ]
      },
      "RegisterCluster": {
        "type": "object",
        "description": "`POST /api/v1/admin/clusters` (the same fields as `fullsea-api cluster register`).",
        "required": [
          "name",
          "kubeconfig",
          "ingressDomain",
          "externalHost",
          "registryPush",
          "registryPull",
          "provisioner"
        ],
        "properties": {
          "externalHost": {
            "type": "string"
          },
          "ingressDomain": {
            "type": "string"
          },
          "ingressPort": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "ingressScheme": {
            "type": [
              "string",
              "null"
            ]
          },
          "kubeconfig": {
            "type": "string",
            "description": "The kubeconfig YAML; sealed at rest, never returned."
          },
          "name": {
            "type": "string"
          },
          "provisioner": {
            "$ref": "#/components/schemas/Provisioner"
          },
          "provisionerConfig": {
            "type": [
              "object",
              "null"
            ],
            "description": "k3d: `{clusterName}`; ssh: `{serverUrl, joinToken}`.",
            "additionalProperties": {},
            "propertyNames": {
              "type": "string"
            }
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "registryPull": {
            "type": "string"
          },
          "registryPush": {
            "type": "string"
          }
        }
      },
      "RelayMessageDto": {
        "type": "object",
        "description": "One message the relay handled (never its content or recipients).",
        "required": [
          "id",
          "at",
          "recipients",
          "sizeBytes",
          "status"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipients": {
            "type": "integer",
            "format": "int64"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "$ref": "#/components/schemas/RelayMessageStatus"
          }
        }
      },
      "RelayMessageStatus": {
        "type": "string",
        "description": "`managed_email_messages.status`",
        "enum": [
          "Sent",
          "Refused",
          "Bounced",
          "Failed"
        ]
      },
      "ReleaseDto": {
        "type": "object",
        "required": [
          "id",
          "appId",
          "number",
          "source",
          "status",
          "buildLog",
          "createdAt",
          "trigger",
          "securityProfile"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "buildLog": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/ReleaseId"
          },
          "imageRef": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "operationId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationId"
              }
            ]
          },
          "push": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleasePushDto",
                "description": "A GitHub push started it (deploy on push): the branch, the commit and its message."
              }
            ]
          },
          "redeployOf": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseId",
                "description": "The release whose image a `config` or `rollback` release deploys again."
              }
            ]
          },
          "runtime": {
            "type": [
              "string",
              "null"
            ],
            "description": "`static | node | python | dockerfile | image` once known."
          },
          "securityProfile": {
            "$ref": "#/components/schemas/SecurityProfile",
            "description": "`restricted` (Fullsea-built images: non-root, no capabilities) or `baseline`."
          },
          "source": {
            "$ref": "#/components/schemas/AppSource"
          },
          "status": {
            "$ref": "#/components/schemas/ReleaseStatus"
          },
          "trigger": {
            "$ref": "#/components/schemas/ReleaseTrigger",
            "description": "Why the release exists: `deploy` (the source), `config` (a settings change, same image), `rollback`."
          }
        }
      },
      "ReleaseId": {
        "type": "string",
        "format": "uuid",
        "description": "`app_releases.id`"
      },
      "ReleasePushDto": {
        "type": "object",
        "description": "The push behind a release: `Push to main · abc1234` and the commit message's first line.",
        "required": [
          "branch",
          "commit"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "commit": {
            "type": "string",
            "description": "The full commit id."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The commit message's first line (at most 200 characters)."
          }
        }
      },
      "ReleaseStatus": {
        "type": "string",
        "description": "`app_releases.status`",
        "enum": [
          "Queued",
          "Building",
          "Deploying",
          "Live",
          "Failed",
          "Superseded"
        ]
      },
      "ReleaseTrigger": {
        "type": "string",
        "description": "`app_releases.trigger`: why a release exists.",
        "enum": [
          "Deploy",
          "Config",
          "Rollback"
        ]
      },
      "ReleaseWithOperation": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/deploy` → 202",
        "required": [
          "release",
          "operation"
        ],
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          },
          "release": {
            "$ref": "#/components/schemas/ReleaseDto"
          }
        }
      },
      "RemoveNode": {
        "type": "object",
        "description": "`POST /api/v1/admin/nodes/{id}/remove`",
        "properties": {
          "force": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ResizeDatabase": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/resize` (PLAN.md §18.D): a new size and/or a bigger volume. Either may be left out;\nstorage only grows.",
        "properties": {
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "A size code of the catalog the plan includes (bigger or smaller); default: the current size."
          },
          "storageGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The new volume size in GiB, at least the current one; default: the current size."
          }
        },
        "additionalProperties": false
      },
      "ResizeSizeOption": {
        "type": "object",
        "description": "One size of [`DatabaseResizeOptions::sizes`].",
        "required": [
          "code",
          "allowed"
        ],
        "properties": {
          "allowed": {
            "type": "boolean",
            "description": "The database may move to it now (always `false` for the current size)."
          },
          "code": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, as a sentence (plan, engine minimum, quota, the node holding the volume); `null` when allowed or\ncurrent."
          }
        }
      },
      "ResizeVolume": {
        "type": "object",
        "description": "`POST /api/v1/volumes/{id}/resize` (area ST1): the volume's new size. Volumes only grow.",
        "required": [
          "sizeGib"
        ],
        "properties": {
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ResolveFlag": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/referrals/{id}/resolve`: a flagged referral is approved (it earns from then on)\nor disqualified (its unpaid commissions are reversed).",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "$ref": "#/components/schemas/FlagAction",
            "description": "`approve` or `disqualify`"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ResourceKind": {
        "type": "string",
        "description": "`allocations.resource_kind`",
        "enum": [
          "App",
          "Database",
          "Volume"
        ]
      },
      "RestoreToPoint": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/pitr/restore` (Tier 3 in MCP): a new database holding this one's data as it was at\n`at`. `name` defaults to `<name>-<yyyymmdd-hhmm>`; size and version are the source's.",
        "required": [
          "at"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "RevenueDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/revenue`: recurring revenue at list prices (`config/plans.v1.json`), its movement, churn, the\nmonth's margin and revenue at risk.",
        "required": [
          "mrrCents",
          "arrCents",
          "planMrrCents",
          "addonMrrCents",
          "payingSubscriptions",
          "trialingSubscriptions",
          "byPlan",
          "byAddon",
          "topupsMtdCents",
          "topupsMtdCount",
          "monthStart",
          "margin",
          "movement",
          "churnBase",
          "atRisk",
          "generatedAt"
        ],
        "properties": {
          "addonMrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "arrCents": {
            "type": "integer",
            "format": "int64"
          },
          "atRisk": {
            "$ref": "#/components/schemas/AtRiskDto"
          },
          "byAddon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonRevenueDto"
            }
          },
          "byPlan": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanRevenueDto"
            }
          },
          "churn30dBps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Paid subscriptions that ended in the last 30 days over those paying 30 days ago; `null` without a base."
          },
          "churnBase": {
            "type": "integer",
            "format": "int64"
          },
          "contractMrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Area EN: the commitments of the enterprise contracts in force (`active`, `expiring`), monthly-normalised (a\nquarter's commit / 3, a year's / 12). They come on top of the base plans and are in `mrrCents`/`arrCents`."
          },
          "contractsInForce": {
            "type": "integer",
            "format": "int64"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "margin": {
            "$ref": "#/components/schemas/MarginDto"
          },
          "monthStart": {
            "type": "string",
            "format": "date-time"
          },
          "movement": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaidMovementDto"
            },
            "description": "`24h`, `7d`, `30d`."
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "Base plans and add-on packs of `active` and `past_due` subscriptions; an annual price counts a twelfth."
          },
          "overageMeteredMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Overage metered in hours of this UTC month (after the caps)."
          },
          "overageMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Area OV: what overage brings this UTC month: `overageMeteredMtdCents` less `overageWaivedMtdCents`, never\nbelow zero (a waiver may give back an earlier month's overage; it is shown, not netted past zero). It counts in\nthe margin's revenue, not in MRR."
          },
          "overageUnbilledCents": {
            "type": "integer",
            "format": "int64",
            "description": "Of all overage metered so far, what no settlement has claimed yet."
          },
          "overageWaivedMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "Overage given back by waivers this month (a positive amount; the waiver charges themselves are negative)."
          },
          "payingSubscriptions": {
            "type": "integer",
            "format": "int64"
          },
          "planMrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "topupsMtdCents": {
            "type": "integer",
            "format": "int64",
            "description": "AI credit top-ups (Checkout and automatic) paid since the month began."
          },
          "topupsMtdCount": {
            "type": "integer",
            "format": "int64"
          },
          "trialingSubscriptions": {
            "type": "integer",
            "format": "int64",
            "description": "`trialing` subscriptions (not counted in MRR until they pay)."
          }
        }
      },
      "ReverseCommission": {
        "type": "object",
        "description": "`POST /api/v1/admin/affiliates/commissions/{id}/reverse`: an unpaid commission is reversed, a paid one clawed\nback from the next payout.",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RevertModelPolicy": {
        "type": "object",
        "description": "`POST /api/v1/admin/builder-models/revert`: back to the committed file.",
        "required": [
          "reason"
        ],
        "properties": {
          "baseRevision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reason": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "RevokeRequest": {
        "type": "object",
        "description": "`POST /oauth/revoke` (RFC 7009): always 200.",
        "properties": {
          "client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_type_hint": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RollbackApp": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/rollback`: deploy an earlier live release's image again (default: the one before the\ncurrent release).",
        "properties": {
          "releaseId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseId"
              }
            ]
          }
        }
      },
      "RotatePoolCredential": {
        "type": "object",
        "description": "`POST /api/v1/admin/agent-pool/credentials/{id}/rotate`: the new secret (same rules as on create).",
        "required": [
          "secret"
        ],
        "properties": {
          "secret": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "RoutePathDto": {
        "type": "object",
        "description": "One path of a route table.",
        "required": [
          "path",
          "appId"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filled in answers."
          },
          "path": {
            "type": "string",
            "description": "`/` or a prefix such as `/api` (`/api` matches `/api` and `/api/…`, never `/apix`)."
          },
          "stripPrefix": {
            "type": "boolean",
            "description": "The app receives the path without the prefix (`/api/users` → `/users`)."
          }
        }
      },
      "RouteTableDto": {
        "type": "object",
        "required": [
          "id",
          "projectId",
          "hostname",
          "url",
          "paths",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "hostname": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/EdgeRouteId"
          },
          "paths": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutePathDto"
            }
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "RowFilter": {
        "type": "object",
        "required": [
          "column",
          "op"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "op": {
            "$ref": "#/components/schemas/FilterOp"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unused for `is_null` / `not_null`."
          }
        }
      },
      "RowSort": {
        "type": "object",
        "required": [
          "column"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "descending": {
            "type": "boolean"
          }
        }
      },
      "RowsDto": {
        "type": "object",
        "required": [
          "columns",
          "rows",
          "rowKeys",
          "offset",
          "limit",
          "hasMore",
          "totalExact"
        ],
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataColumnDto"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "rowKeys": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Each row's locator for `…/data/cell` (Postgres `ctid`, else the primary key as JSON; `null` when the table\nhas neither and the row is found by its position)."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CellDto"
                  }
                ]
              }
            }
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Rows matching the filters: exact when counted (small tables), else the engine's estimate."
          },
          "totalExact": {
            "type": "boolean"
          }
        }
      },
      "RowsRequest": {
        "type": "object",
        "description": "`POST /api/v1/databases/{id}/data/rows`: one page of a table's rows (read-only).",
        "required": [
          "table"
        ],
        "properties": {
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RowFilter"
            }
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1 to 200 (default 50).",
            "minimum": 0
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "schema": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RowSort"
              }
            ]
          },
          "table": {
            "type": "string"
          }
        }
      },
      "RunContainerCommand": {
        "type": "object",
        "description": "One run: the command, where and how long.",
        "required": [
          "command"
        ],
        "properties": {
          "command": {
            "$ref": "#/components/schemas/ExecCommand"
          },
          "timeoutSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "1–120 (default 30): the command is stopped then.",
            "minimum": 0
          },
          "workingDir": {
            "type": [
              "string",
              "null"
            ],
            "description": "An absolute directory inside the container (default: the image's working directory)."
          }
        }
      },
      "RuntimeDto": {
        "type": "object",
        "required": [
          "code",
          "name",
          "description"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "RunwayDto": {
        "type": "object",
        "required": [
          "state",
          "historyDays"
        ],
        "properties": {
          "days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "growthPerDay": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Units of the pool a day (least squares over the window); `null` without a fit."
          },
          "historyDays": {
            "type": "integer",
            "format": "int64",
            "description": "The days of history the forecast looked at (at most 30)."
          },
          "state": {
            "$ref": "#/components/schemas/RunwayState"
          }
        }
      },
      "RunwayState": {
        "type": "string",
        "description": "Whether a runway could be forecast.",
        "enum": [
          "forecast",
          "not_enough_history",
          "not_growing",
          "full",
          "no_capacity"
        ]
      },
      "SeatsDto": {
        "type": "object",
        "description": "Seats: members plus open invitations, against the team's effective `maxTeamSeats` (its plan, packs and any\nenterprise contract; `null` = unlimited).",
        "required": [
          "used"
        ],
        "properties": {
          "max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "When every seat is taken: the cheapest plan that seats one more person, the same offer an invitation would\nbe refused with (402). Absent while a seat is free, under an enterprise contract (its seats are negotiated),\nor when no plan has more."
              }
            ]
          },
          "used": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "SecretField": {
        "type": "object",
        "description": "One variable the agent asks for.",
        "required": [
          "key",
          "label"
        ],
        "properties": {
          "helpUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the person finds the value (an `https://` page of the provider)."
          },
          "key": {
            "type": "string",
            "description": "The environment variable (`SLACK_BOT_TOKEN`): letters, digits and `_`, not starting with a digit."
          },
          "label": {
            "type": "string",
            "description": "What the person sees above the field (\"Slack bot token\")."
          }
        },
        "additionalProperties": false
      },
      "SecretRequestDto": {
        "type": "object",
        "description": "`GET /api/v1/secret-requests/{id}` (also the payload of the builder's `secret_requested` / `secret_resolved`).",
        "required": [
          "id",
          "appId",
          "appName",
          "secrets",
          "status",
          "savedKeys",
          "existingKeys",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "existingKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Which of the asked keys the app already has (names only): the form says it replaces them."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/SecretRequestId"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "savedKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The keys the person saved (names only), once `fulfilled`."
          },
          "secrets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecretField"
            }
          },
          "sessionId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BuilderSessionId",
                "description": "The builder session asking (its chat shows the card); `null` for an outside agent (API key)."
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SecretRequestStatus"
          }
        }
      },
      "SecretRequestId": {
        "type": "string",
        "format": "uuid",
        "description": "`secret_requests.id` (PLAN.md §18.C)"
      },
      "SecretRequestPayload": {
        "type": "object",
        "description": "`secret_requested`, `secret_resolved` (builder events).",
        "required": [
          "secretRequest"
        ],
        "properties": {
          "secretRequest": {
            "$ref": "#/components/schemas/SecretRequestDto"
          }
        }
      },
      "SecretRequestStatus": {
        "type": "string",
        "description": "`secret_requests.status` (PLAN.md §18.C): the same lifecycle as an approval's, without `consumed`.",
        "enum": [
          "Pending",
          "Fulfilled",
          "Declined",
          "Expired"
        ]
      },
      "SecretRequestsQuery": {
        "type": "object",
        "description": "`GET /api/v1/secret-requests?status=`",
        "properties": {
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SecretRequestStatus"
              }
            ]
          }
        }
      },
      "SecurityProfile": {
        "type": "string",
        "description": "`app_releases.security_profile`: the Pod Security Standard a release's pods meet.",
        "enum": [
          "Restricted",
          "Baseline"
        ]
      },
      "SendSupportDraft": {
        "type": "object",
        "description": "`POST /api/v1/admin/support/tickets/{ref}/draft/send`: sends the draft (edited to `body` when given).",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketStatus"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "SenderDecision": {
        "type": "object",
        "description": "`POST /api/v1/admin/managed-email/{stack}/suspend|resume`",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "SentContractDto": {
        "type": "object",
        "description": "`POST …/contracts/{id}/send`: what went out.",
        "required": [
          "contract"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/AdminContractDto"
          },
          "invoice": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ContractInvoiceDto",
                "description": "The Checkout link or invoice made (`null` for `custom_manual`)."
              }
            ]
          }
        }
      },
      "SessionConfigPayload": {
        "type": "object",
        "description": "`session_config`: the model, effort or permission mode the live agent runs on changed. `notice` (once per\nsession) is the calm sentence the chat shows when the model has no Auto mode.",
        "properties": {
          "effort": {
            "type": [
              "string",
              "null"
            ]
          },
          "effortLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "modelLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "notice": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissionFallback": {
            "type": "boolean",
            "description": "The mode is the adapter's fallback because the model has no Auto mode."
          },
          "permissionMode": {
            "type": [
              "string",
              "null"
            ],
            "description": "`auto`, or the adapter's fallback."
          }
        }
      },
      "SetAppGithub": {
        "type": "object",
        "description": "`PUT /api/v1/apps/{id}/github`",
        "required": [
          "autoDeploy"
        ],
        "properties": {
          "autoDeploy": {
            "type": "boolean"
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "One of the person's installations (`null` clears it; the worker then finds one by the repository's owner)."
          }
        }
      },
      "SetLanding": {
        "type": "object",
        "description": "`PUT /api/v1/admin/affiliates/{id}/landing`",
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"Recommended by …\"; `null` removes it."
          },
          "landing": {
            "$ref": "#/components/schemas/LandingConfigDto"
          }
        }
      },
      "SetNodeDedication": {
        "type": "object",
        "description": "`PUT /api/v1/admin/nodes/{id}/dedication`: dedicate the node to a team (label + `NoSchedule` taint), or\nreturn it to the shared pool (`teamId: null`).",
        "properties": {
          "teamId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TeamId"
              }
            ]
          }
        }
      },
      "SetSupportStatus": {
        "type": "object",
        "description": "`POST /api/v1/support/tickets/{ref}/status`: a customer marks it `resolved`, `closed`, or reopens it (`open`).",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/TicketStatus"
          }
        },
        "additionalProperties": false
      },
      "SizeDto": {
        "type": "object",
        "description": "One size of `GET /api/v1/catalog` (catalog v2): the CPU it is guaranteed and may burst to, and its memory.",
        "required": [
          "code",
          "name",
          "cpuRequestMillis",
          "cpuLimitMillis",
          "memoryMib"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "cpuLimitMillis": {
            "type": "integer",
            "format": "int64",
            "description": "`limits.cpu`: the burst vCPU, what the plan's CPU pool counts."
          },
          "cpuRequestMillis": {
            "type": "integer",
            "format": "int64",
            "description": "`requests.cpu`: guaranteed, what a node reserves."
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SlaState": {
        "type": "string",
        "description": "Where a ticket stands against its first-response SLA.",
        "enum": [
          "None",
          "Met",
          "MissedResponded",
          "OnTrack",
          "AtRisk",
          "Breached"
        ]
      },
      "SlaTier": {
        "type": "string",
        "description": "A support SLA tier (`EntitlementOverrides.sla_tier`, PLAN.md §20). Teams without a contract are `standard`.",
        "enum": [
          "Standard",
          "Enterprise4h",
          "MissionCritical1h"
        ]
      },
      "SourceKind": {
        "type": "string",
        "description": "`apps.source_kind` / `app_releases.source_kind`; `upload` is a folder an outside agent uploaded\n(`source_uploads`, PLAN.md §18.K).",
        "enum": [
          "Workspace",
          "Image",
          "Git",
          "Upload"
        ]
      },
      "StackDto": {
        "type": "object",
        "description": "A stack: what one deploy of a template created, and how far it got.",
        "required": [
          "id",
          "name",
          "slug",
          "kind",
          "templateCode",
          "templateName",
          "templateVersion",
          "templateIcon",
          "status",
          "resources",
          "hooks",
          "outputs",
          "inputs",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "backupNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "backupUnitId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The backup unit of the template's backup policy taken once the stack was ready (`GET /backups?unitId=`);\n`null` before, or when there is none — then `backupNote` says why."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "hooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StackHookDto"
            }
          },
          "id": {
            "$ref": "#/components/schemas/StackId"
          },
          "inputs": {
            "type": "object",
            "description": "The non-secret inputs it was deployed with."
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "name": {
            "type": "string"
          },
          "operationId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationId",
                "description": "The deploy (or delete) operation; its events are the stack's log."
              }
            ]
          },
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StackOutputDto"
            }
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "readyAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StackResourceDto"
            }
          },
          "slug": {
            "type": "string"
          },
          "starterPrompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "AI starters: the first prompt for the builder."
          },
          "status": {
            "$ref": "#/components/schemas/StackStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed, or what it waits for."
          },
          "templateCode": {
            "type": "string"
          },
          "templateIcon": {
            "type": "string"
          },
          "templateName": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StackHookDto": {
        "type": "object",
        "required": [
          "name",
          "label",
          "status",
          "attempts"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32",
            "description": "Pods started so far (the first try and its retries).",
            "minimum": 0
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "label": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/HookStatus"
          }
        }
      },
      "StackId": {
        "type": "string",
        "format": "uuid",
        "description": "`stacks.id`: what a template deployed (PLAN.md §15.7)"
      },
      "StackOutputDto": {
        "type": "object",
        "description": "An output. A `sensitive` one has `value: null` until `POST /stacks/{id}/outputs/reveal`.",
        "required": [
          "name",
          "label",
          "kind",
          "sensitive"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/OutputKind"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StackOutputsDto": {
        "type": "object",
        "description": "`POST /api/v1/stacks/{id}/outputs/reveal`: every output with its value.",
        "required": [
          "stackId",
          "outputs"
        ],
        "properties": {
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StackOutputDto"
            }
          },
          "stackId": {
            "$ref": "#/components/schemas/StackId"
          }
        }
      },
      "StackResourceDto": {
        "type": "object",
        "description": "One resource of a stack, as it is now.",
        "required": [
          "kind",
          "key",
          "label",
          "id",
          "name",
          "slug",
          "status"
        ],
        "properties": {
          "appKind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppKind"
              }
            ]
          },
          "engine": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The app, database or volume id (`/app/apps/{id}`, `/app/databases/{id}`, `/app/volumes`)."
          },
          "key": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/StackResourceKind"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "The resource's own status (`running`, `available`, `ready`, …; `deleted` once it is gone)."
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Web apps: the public URL."
          }
        }
      },
      "StackResourceKind": {
        "type": "string",
        "description": "What a stack resource is.",
        "enum": [
          "App",
          "Database",
          "Volume"
        ]
      },
      "StackStatus": {
        "type": "string",
        "description": "`stacks.status`: `provisioning` while its resources come up, `configuring` while its hooks run, then\n`ready` or `failed` (with a message); `deleting` → `deleted` after `DELETE /stacks/{id}`.",
        "enum": [
          "Provisioning",
          "Configuring",
          "Ready",
          "Failed",
          "Deleting",
          "Deleted"
        ]
      },
      "StackWithOperation": {
        "type": "object",
        "description": "`POST /templates/{code}/deploy` (201) and `DELETE /stacks/{id}` (202).",
        "required": [
          "stack",
          "operation"
        ],
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/OperationDto"
          },
          "stack": {
            "$ref": "#/components/schemas/StackDto"
          }
        }
      },
      "StartCanary": {
        "type": "object",
        "description": "`POST /api/v1/apps/{id}/canary`: deploy a new release that takes `percent` of the requests beside the live one.",
        "properties": {
          "autoPromote": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Promote by itself once healthy over the window (default off)."
          },
          "autoRollback": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Roll back by itself when clearly worse (default on)."
          },
          "percent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "1–50, default 10.",
            "minimum": 0
          },
          "source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppSource",
                "description": "A new source for the release; without it the app's current source."
              }
            ]
          },
          "windowSecs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "How long it is watched before it counts as healthy: 60–3600 s, default 300.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "StatusPageDto": {
        "type": "object",
        "description": "A project's status page as its owner sees it.",
        "required": [
          "id",
          "projectId",
          "slug",
          "title",
          "enabled",
          "appIds",
          "url",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "appIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppId"
            },
            "description": "The apps it shows; empty: every web app of the project."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "$ref": "#/components/schemas/StatusPageId"
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "description": "`<web origin>/status/<slug>`"
          }
        }
      },
      "StatusPageId": {
        "type": "string",
        "format": "uuid",
        "description": "`status_pages.id`: a project's public status page"
      },
      "StatusPageSettingsDto": {
        "type": "object",
        "description": "`GET|PUT /api/v1/projects/{id}/status-page`: the page (if any) and whether the plan includes one.",
        "required": [
          "allowed"
        ],
        "properties": {
          "allowed": {
            "type": "boolean",
            "description": "The plan includes public status pages (`public_status_page`: Pro and up)."
          },
          "page": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StatusPageDto"
              }
            ]
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "The cheapest plan that does, when this one does not."
              }
            ]
          }
        }
      },
      "StatusPayload": {
        "type": "object",
        "description": "`status`",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/BuilderStatus"
          }
        }
      },
      "StatusState": {
        "type": "string",
        "description": "The overall state a public status page shows.",
        "enum": [
          "Operational",
          "Degraded",
          "Outage",
          "Unknown"
        ]
      },
      "StorageGrowth": {
        "type": "object",
        "description": "Whether the database's volume can grow on its cluster.",
        "required": [
          "canGrow",
          "maxGib"
        ],
        "properties": {
          "canGrow": {
            "type": "boolean",
            "description": "The volume's storage class allows growing it in place."
          },
          "maxGib": {
            "type": "integer",
            "format": "int64",
            "description": "The most GiB it may have (the plan's storage left, at most 1024); equal to `storageGib` when it cannot grow."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot grow and what to do instead; `null` when it can."
          },
          "storageClass": {
            "type": [
              "string",
              "null"
            ],
            "description": "The volume's storage class (`local-path` on k3d), when known."
          }
        }
      },
      "StorageKeyId": {
        "type": "string",
        "format": "uuid",
        "description": "`storage_keys.id`: an S3 access key of a bucket or of every bucket of its owner"
      },
      "StorageOverviewDto": {
        "type": "object",
        "description": "`GET /api/v1/storage`: the three pools, the bucket count and the packs.",
        "required": [
          "planName",
          "pools",
          "buckets",
          "endpoint"
        ],
        "properties": {
          "buckets": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "endpoint": {
            "type": "string",
            "description": "The S3 endpoint every bucket uses."
          },
          "maxBuckets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`null` = unlimited.",
            "minimum": 0
          },
          "planName": {
            "type": "string"
          },
          "pools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoragePoolDto"
            }
          }
        }
      },
      "StoragePackDto": {
        "type": "object",
        "description": "A storage pack's code, size and price (`config/plans.v1.json`).",
        "required": [
          "code",
          "name",
          "addsGib",
          "monthlyUsd",
          "annualUsd"
        ],
        "properties": {
          "addsGib": {
            "type": "integer",
            "format": "int64",
            "description": "GiB one pack adds to the pool."
          },
          "annualUsd": {
            "type": "number",
            "format": "double"
          },
          "code": {
            "type": "string"
          },
          "monthlyUsd": {
            "type": "number",
            "format": "double"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "StoragePoolDto": {
        "type": "object",
        "description": "One storage pool's headroom (`GET /api/v1/storage`, MCP `account_overview`).",
        "required": [
          "pool",
          "label",
          "usedGib",
          "limitGib",
          "freeGib"
        ],
        "properties": {
          "freeGib": {
            "type": "number",
            "format": "double"
          },
          "label": {
            "type": "string",
            "description": "`Fast NVMe`, `Shared HDD`, `Object Storage`."
          },
          "limitGib": {
            "type": "integer",
            "format": "int64",
            "description": "The plan's pool plus packs, GiB."
          },
          "pack": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StoragePackDto",
                "description": "The pack that grows it, when the plan sells one."
              }
            ]
          },
          "pool": {
            "type": "string",
            "description": "`nvme`, `shared_hdd`, `object_storage`."
          },
          "usedGib": {
            "type": "number",
            "format": "double",
            "description": "Reserved now (volume and database disks, shared volumes, bucket quotas), GiB."
          }
        }
      },
      "StripeReconcileDto": {
        "type": "object",
        "description": "`POST /api/v1/admin/teams/{id}/reconcile-stripe`: the team's subscription read again from Stripe.",
        "required": [
          "changed",
          "message"
        ],
        "properties": {
          "after": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionDto"
              }
            ]
          },
          "before": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionDto"
              }
            ]
          },
          "changed": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "description": "What happened, in one sentence."
          }
        }
      },
      "SubscriptionDto": {
        "type": "object",
        "required": [
          "planCode",
          "status",
          "cancelAtPeriodEnd"
        ],
        "properties": {
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "currentPeriodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "interval": {
            "$ref": "#/components/schemas/BillingInterval",
            "description": "`month` or `year`."
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "stripeSubscriptionId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SubscriptionStatus": {
        "type": "string",
        "description": "`subscriptions.status` (Stripe's subscription statuses).",
        "enum": [
          "Incomplete",
          "IncompleteExpired",
          "Trialing",
          "Active",
          "PastDue",
          "Canceled",
          "Unpaid",
          "Paused"
        ]
      },
      "SupportAttachmentDto": {
        "type": "object",
        "description": "One file of a message (a screenshot or a log). `url` is the API path that serves it to whoever may read the\nticket (images inline, anything else as a download).",
        "required": [
          "id",
          "filename",
          "contentType",
          "sizeBytes",
          "url"
        ],
        "properties": {
          "contentType": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "url": {
            "type": "string"
          }
        }
      },
      "SupportCustomerDto": {
        "type": "object",
        "description": "The customer beside a ticket (the operators' side panel).",
        "required": [
          "requesterEmail",
          "guest",
          "suspended",
          "apps",
          "databases",
          "volumes",
          "otherTickets"
        ],
        "properties": {
          "apps": {
            "type": "integer",
            "format": "int64",
            "description": "Apps, databases and volumes the team runs."
          },
          "databases": {
            "type": "integer",
            "format": "int64"
          },
          "guest": {
            "type": "boolean",
            "description": "No account matches the sender (a ticket opened by email)."
          },
          "memberCount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "otherTickets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportTicketDto"
            },
            "description": "The team's other tickets, newest first (at most 10)."
          },
          "ownerEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "planCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "planName": {
            "type": [
              "string",
              "null"
            ]
          },
          "requesterEmail": {
            "type": "string"
          },
          "requesterName": {
            "type": [
              "string",
              "null"
            ]
          },
          "requesterUserId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "suspended": {
            "type": "boolean",
            "description": "The owner's account is suspended."
          },
          "teamId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "teamSlug": {
            "type": [
              "string",
              "null"
            ]
          },
          "volumes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "SupportDiagnosticsDto": {
        "type": "object",
        "description": "The diagnostic snapshot attached when the ticket was opened (or refreshed by an operator): scrubbed of every\nsecret before it was stored.",
        "required": [
          "addons",
          "failedOperations",
          "incidents",
          "redactions"
        ],
        "properties": {
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticAddon"
            },
            "description": "Active capacity packs (`code × quantity`)."
          },
          "capturedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failedOperations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticOperation"
            },
            "description": "The team's last failed operations (newest first, at most 5): their error sentences only."
          },
          "incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiagnosticIncident"
            },
            "description": "Open alert incidents of the team."
          },
          "logs": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DiagnosticLogs",
                "description": "The last log lines of the attached resource (at most 30)."
              }
            ]
          },
          "plan": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DiagnosticPlan",
                "description": "`{code, name, interval, status}` of the team's plan."
              }
            ]
          },
          "redactions": {
            "type": "integer",
            "format": "int32",
            "description": "How many strings the scrubber changed.",
            "minimum": 0
          },
          "resource": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DiagnosticResource"
              }
            ]
          },
          "slaTier": {
            "type": [
              "string",
              "null"
            ],
            "description": "The enterprise contract's SLA tier, when one applies."
          }
        }
      },
      "SupportMessageDto": {
        "type": "object",
        "description": "One message of a ticket's thread.",
        "required": [
          "id",
          "authorKind",
          "body",
          "attachments",
          "internal",
          "via",
          "createdAt"
        ],
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportAttachmentDto"
            }
          },
          "authorKind": {
            "$ref": "#/components/schemas/AuthorKind",
            "description": "`customer` | `admin` | `system`; operators also see `ai_draft`."
          },
          "authorName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name (or email) of who wrote it; `Fullsea Support` for an operator in a customer read."
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/SupportMessageId"
          },
          "internal": {
            "type": "boolean",
            "description": "A staff-only note (operators only; never in a customer read)."
          },
          "via": {
            "type": "string",
            "description": "`web` | `email`"
          }
        }
      },
      "SupportMessageId": {
        "type": "string",
        "format": "uuid",
        "description": "`support_messages.id`"
      },
      "SupportQueueCounts": {
        "type": "object",
        "description": "The queue's counts (the admin nav badge and the overview).",
        "required": [
          "open",
          "unassigned",
          "atRisk",
          "breached",
          "dueWithinHour"
        ],
        "properties": {
          "atRisk": {
            "type": "integer",
            "format": "int64"
          },
          "breached": {
            "type": "integer",
            "format": "int64"
          },
          "dueWithinHour": {
            "type": "integer",
            "format": "int64",
            "description": "Due within the hour or overdue (the badge turns red)."
          },
          "open": {
            "type": "integer",
            "format": "int64",
            "description": "Not resolved or closed."
          },
          "unassigned": {
            "type": "integer",
            "format": "int64",
            "description": "Owed a first answer, nobody assigned."
          }
        }
      },
      "SupportSlaDto": {
        "type": "object",
        "description": "Where a ticket stands against its first-response SLA.",
        "required": [
          "state"
        ],
        "properties": {
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "remainingSecs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Seconds until due (negative: overdue); `None` once answered or without a due time."
          },
          "state": {
            "$ref": "#/components/schemas/SlaState"
          }
        }
      },
      "SupportStaffDto": {
        "type": "object",
        "description": "Someone on Fullsea's side.",
        "required": [
          "id",
          "email"
        ],
        "properties": {
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SupportTicketDetail": {
        "type": "object",
        "description": "A ticket with its thread (customer read).",
        "required": [
          "ticket",
          "messages",
          "replyTo"
        ],
        "properties": {
          "diagnostics": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SupportDiagnosticsDto"
              }
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportMessageDto"
            }
          },
          "replyTo": {
            "type": "string",
            "description": "The address replies by email go to (`support+fs-1001@reply.fullsea.io`)."
          },
          "ticket": {
            "$ref": "#/components/schemas/SupportTicketDto"
          }
        }
      },
      "SupportTicketDto": {
        "type": "object",
        "description": "A ticket as its customer sees it.",
        "required": [
          "id",
          "number",
          "reference",
          "subject",
          "category",
          "priority",
          "status",
          "lastMessageAt",
          "messageCount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "category": {
            "$ref": "#/components/schemas/TicketCategory"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "firstRespondedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "firstResponseDueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the first answer is due (the plan's or contract's first-response SLA)."
          },
          "id": {
            "$ref": "#/components/schemas/SupportTicketId"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "messageCount": {
            "type": "integer",
            "format": "int64",
            "description": "Messages the reader can see."
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "`1001`"
          },
          "priority": {
            "$ref": "#/components/schemas/TicketPriority"
          },
          "reference": {
            "type": "string",
            "description": "`FS-1001`"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resourceKind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketResourceKind"
              }
            ]
          },
          "resourceName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The resource's name when it still exists."
          },
          "status": {
            "$ref": "#/components/schemas/TicketStatus"
          },
          "subject": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SupportTicketId": {
        "type": "string",
        "format": "uuid",
        "description": "`support_tickets.id`"
      },
      "SuspensionDto": {
        "type": "object",
        "description": "When and why the account was suspended (both `null` while active), and the newest kill-switch operation\n(scaling workloads down or back up) to follow with `GET /operations/{id}/events`.",
        "properties": {
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "suspendedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "TableStructureDto": {
        "type": "object",
        "description": "`GET /api/v1/databases/{id}/data/structure?schema=&table=`.",
        "required": [
          "name",
          "kind",
          "columns",
          "indexes",
          "constraints"
        ],
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataColumnDto"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataConstraintDto"
            }
          },
          "indexes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataIndexDto"
            }
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rowsEstimate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "schema": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "TeamAddonDto": {
        "type": "object",
        "description": "A pack the team holds, at list price.",
        "required": [
          "addonCode",
          "name",
          "quantity",
          "mrrCents"
        ],
        "properties": {
          "addonCode": {
            "type": "string"
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "TeamContractDto": {
        "type": "object",
        "description": "The team's enterprise contract as its members see it (no notes, no Stripe ids).",
        "required": [
          "contractCode",
          "status",
          "billingMode",
          "billingInterval",
          "commitCents",
          "autoRenew",
          "slaTier",
          "dedicatedNodes",
          "limits",
          "customRates",
          "invoices"
        ],
        "properties": {
          "autoRenew": {
            "type": "boolean"
          },
          "billingInterval": {
            "type": "string",
            "description": "`month`, `quarter`, `year`."
          },
          "billingMode": {
            "type": "string",
            "description": "`stripe_subscription`, `stripe_invoice_net30`, `custom_manual`."
          },
          "commitCents": {
            "type": "integer",
            "format": "int64",
            "description": "The commitment per interval."
          },
          "contractCode": {
            "type": "string",
            "description": "`ENT-2026-0001`"
          },
          "customRates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverageRateDto"
            },
            "description": "Negotiated overage rates (the metrics the contract sets)."
          },
          "dedicatedNodes": {
            "type": "boolean",
            "description": "Workloads run on nodes dedicated to the team."
          },
          "endsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` = open-ended, or not started yet (see `termMonths`)."
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractInvoiceDto"
            }
          },
          "limits": {
            "$ref": "#/components/schemas/Entitlements",
            "description": "The team's limits under the contract (plan, packs and the contract's overrides)."
          },
          "payUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "The open Checkout link or invoice to pay, when there is one."
          },
          "poNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "slaTier": {
            "$ref": "#/components/schemas/SlaTier"
          },
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "`quoted` (waiting for payment), `active`, `expiring`, `expired`, `terminated`."
          },
          "termMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The term in months counted from the start, while it has no end date yet (a quote waiting for payment);\n`null` once the dates are set.",
            "minimum": 0
          }
        }
      },
      "TeamDedicatedNodeDto": {
        "type": "object",
        "description": "A node dedicated to the team.",
        "required": [
          "id",
          "clusterId",
          "name",
          "clusterName",
          "status"
        ],
        "properties": {
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/NodeId"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "TeamDetailDto": {
        "type": "object",
        "description": "`GET /api/v1/teams/{team}`: the team, its members, open invitations and outgoing transfers, seats, and what the\ncaller's role may do.",
        "required": [
          "team",
          "members",
          "invitations",
          "transfers",
          "seats",
          "permissions"
        ],
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationDto"
            }
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberDto"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "seats": {
            "$ref": "#/components/schemas/SeatsDto"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSummaryDto"
          },
          "transfers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferDto"
            }
          }
        }
      },
      "TeamEnterpriseDto": {
        "type": "object",
        "description": "The dossier's enterprise contract: the one in force, else the newest quoted, else the newest draft, else the newest\nthat ended — what it sells against the plan and packs, its invoices and the nodes dedicated to the team.",
        "required": [
          "contract",
          "quote",
          "invoices",
          "dedicatedNodes",
          "mrrCents",
          "contracts"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/AdminContractDto"
          },
          "contracts": {
            "type": "integer",
            "format": "int64",
            "description": "Every contract the team has had (any status)."
          },
          "dedicatedNodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamDedicatedNodeDto"
            },
            "description": "The nodes carrying the team's dedicated label, whatever the contract's status."
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractInvoiceDto"
            }
          },
          "mrrCents": {
            "type": "integer",
            "format": "int64",
            "description": "The commitment counted in the team's MRR (monthly-normalised; `0` unless the contract is in force)."
          },
          "quote": {
            "$ref": "#/components/schemas/ContractQuoteDto",
            "description": "`current` (plan + packs) and `withContract` limits, the negotiated rates, the dedicated node count."
          }
        }
      },
      "TeamId": {
        "type": "string",
        "format": "uuid",
        "description": "`teams.id`: who owns resources and billing. A personal team's id is its owner's user id\n([`TeamId::personal`]), so every user's personal team is known without a lookup."
      },
      "TeamInvitationId": {
        "type": "string",
        "format": "uuid",
        "description": "`team_invitations.id`: an emailed invitation to join a team"
      },
      "TeamListDto": {
        "type": "object",
        "description": "`GET /api/v1/teams`: every team of the caller (personal first) and what waits for them.",
        "required": [
          "items",
          "invitations",
          "transfers"
        ],
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationDto"
            },
            "description": "Open invitations addressed to the caller's email."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamSummaryDto"
            }
          },
          "transfers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferDto"
            },
            "description": "Open project transfers addressed to the caller's email."
          }
        }
      },
      "TeamRefDto": {
        "type": "object",
        "description": "A team as the admin pages name it: its name, whether it is someone's personal team, and the owner.",
        "required": [
          "id",
          "name",
          "slug",
          "personal",
          "ownerEmail"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TeamId"
          },
          "name": {
            "type": "string"
          },
          "ownerEmail": {
            "type": "string"
          },
          "ownerUserId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserId"
              }
            ]
          },
          "personal": {
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "TeamRole": {
        "type": "string",
        "description": "`team_members.role` / `team_invitations.role`.",
        "enum": [
          "Owner",
          "Admin",
          "Member",
          "Viewer"
        ]
      },
      "TeamSummaryDto": {
        "type": "object",
        "description": "A team as one of its members sees it.",
        "required": [
          "id",
          "slug",
          "name",
          "isPersonal",
          "role",
          "members",
          "planCode"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/TeamId"
          },
          "isPersonal": {
            "type": "boolean",
            "description": "The person's own team: created with the account, deleted with it, never left."
          },
          "members": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole",
            "description": "The caller's role in it."
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "TeamSupportDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/teams/{id}/support`: the team's tickets, open first (the dossier's Support tab).",
        "required": [
          "tickets",
          "open"
        ],
        "properties": {
          "open": {
            "type": "integer",
            "format": "int64",
            "description": "Not resolved or closed."
          },
          "tickets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminSupportTicketDto"
            }
          }
        }
      },
      "TemplateCategory": {
        "type": "string",
        "description": "The gallery's sections.",
        "enum": [
          "Cms",
          "Commerce",
          "Automation",
          "Analytics",
          "Starter"
        ]
      },
      "TemplateDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplateSummaryDto"
          },
          {
            "type": "object",
            "required": [
              "inputs",
              "hooks",
              "outputs"
            ],
            "properties": {
              "backup": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BackupPolicyDto"
                  }
                ]
              },
              "hooks": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateHookDto"
                }
              },
              "inputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateInputDto"
                }
              },
              "outputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateOutputDto"
                }
              },
              "starterPrompt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "AI starters: the first prompt the builder suggests."
              }
            }
          }
        ],
        "description": "`GET /api/v1/templates/{code}` (public): the card plus the form, the hooks, the outputs and the backup unit."
      },
      "TemplateHookDto": {
        "type": "object",
        "description": "A post-install hook (a Kubernetes Job once every resource is ready).",
        "required": [
          "name",
          "label",
          "image"
        ],
        "properties": {
          "image": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "when": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TemplateInputDto": {
        "type": "object",
        "description": "One field of the deploy form.",
        "required": [
          "name",
          "label",
          "type",
          "required",
          "options",
          "generated"
        ],
        "properties": {
          "default": {
            "type": [
              "object",
              "null"
            ],
            "description": "A string or a boolean; `null` = none. `defaultFrom: \"userEmail\"` means \"the signed-in person's email\"."
          },
          "defaultFrom": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TextFormat"
              }
            ]
          },
          "generated": {
            "type": "boolean",
            "description": "A password Fullsea generates when it is left empty."
          },
          "help": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": "string"
          },
          "maxLength": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "minLength": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateOptionDto"
            }
          },
          "placeholder": {
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/InputKind"
          }
        }
      },
      "TemplateKind": {
        "type": "string",
        "description": "`stacks.template_kind`: a running `stack` (WordPress…) or an AI `starter` (a seeded project workspace).",
        "enum": [
          "Stack",
          "Starter"
        ]
      },
      "TemplateOptionDto": {
        "type": "object",
        "required": [
          "value",
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "TemplateOutputDto": {
        "type": "object",
        "required": [
          "name",
          "label",
          "kind",
          "sensitive"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/OutputKind"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          },
          "when": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TemplateRequirementsDto": {
        "type": "object",
        "description": "What a template holds with its default inputs (counts toward the plan like any app, database or volume).",
        "required": [
          "cpuMillis",
          "memoryMib",
          "storageGib",
          "apps",
          "databases",
          "volumes"
        ],
        "properties": {
          "apps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "databases": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "sharedStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "Shared App Disks (the plan's `sharedStorageGib`)."
          },
          "storageGib": {
            "type": "integer",
            "format": "int64",
            "description": "Databases' and local volumes' disks (the plan's `storageGib`)."
          },
          "volumes": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "TemplateResourceDto": {
        "type": "object",
        "description": "One thing a template creates, with what it holds. `when` names the bool input that switches it on (`!name`:\non while the input is off); `null` = always.",
        "required": [
          "kind",
          "key",
          "label",
          "cpuMillis",
          "memoryMib",
          "storageGib"
        ],
        "properties": {
          "appKind": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppKind",
                "description": "Apps: web, private, worker or cron."
              }
            ]
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64",
            "description": "Requests (all replicas) and storage (a database's disk, a volume's size)."
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "Databases: engine code, its display name and version."
          },
          "engineName": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Apps: the image (`null` for an AI starter's app, built from its workspace)."
          },
          "key": {
            "type": "string",
            "description": "The blueprint's name for it (`web`, `db`, `content`)."
          },
          "kind": {
            "$ref": "#/components/schemas/StackResourceKind"
          },
          "label": {
            "type": "string"
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "mountPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "mountedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Volumes: the app (key) it is mounted into and where."
          },
          "replicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Apps and databases: the size code and its display name."
          },
          "sizeName": {
            "type": [
              "string",
              "null"
            ]
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "tier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VolumeTier",
                "description": "Volumes: `shared_nfs` (a Shared App Disk, counted in `sharedStorageGib`) or `local_nvme`."
              }
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "when": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TemplateSummaryDto": {
        "type": "object",
        "description": "A gallery card: `GET /api/v1/templates` (public).",
        "required": [
          "code",
          "kind",
          "name",
          "tagline",
          "description",
          "category",
          "icon",
          "version",
          "minPlan",
          "creates",
          "requirements"
        ],
        "properties": {
          "category": {
            "$ref": "#/components/schemas/TemplateCategory"
          },
          "code": {
            "type": "string"
          },
          "creates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateResourceDto"
            }
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string",
            "description": "A lucide icon name."
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "minPlan": {
            "$ref": "#/components/schemas/PlanCode",
            "description": "The cheapest plan that holds it with the default inputs (computed from what it creates)."
          },
          "name": {
            "type": "string"
          },
          "requirements": {
            "$ref": "#/components/schemas/TemplateRequirementsDto"
          },
          "tagline": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "TerminalClientMessage": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "cols",
              "rows",
              "type"
            ],
            "properties": {
              "cols": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "rows": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "type": {
                "type": "string",
                "enum": [
                  "resize"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ping"
                ]
              }
            }
          }
        ],
        "description": "Text frames the browser sends on `GET /api/v1/apps/{id}/terminal/ws` (binary frames are keystrokes)."
      },
      "TerminalInfoDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/terminal`: whether a terminal opens, and its limits.",
        "required": [
          "appId",
          "available",
          "idleTimeoutSecs",
          "maxSessionSecs",
          "maxSessions",
          "openSessions"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "available": {
            "type": "boolean"
          },
          "idleTimeoutSecs": {
            "type": "integer",
            "format": "int64",
            "description": "The connection closes after this long without input.",
            "minimum": 0
          },
          "maxSessionSecs": {
            "type": "integer",
            "format": "int64",
            "description": "…and after this long in all.",
            "minimum": 0
          },
          "maxSessions": {
            "type": "integer",
            "description": "Terminals one person may have open at once.",
            "minimum": 0
          },
          "openSessions": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, in words, when it is not."
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "The upgrade that opens it (a plan without terminals)."
              }
            ]
          }
        }
      },
      "TerminalServerMessage": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "session_id",
              "instance",
              "idle_timeout_secs",
              "max_session_secs",
              "type"
            ],
            "properties": {
              "idle_timeout_secs": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "instance": {
                "type": "string",
                "description": "The pod's name ends in a hash; shown so a person can tell restarts apart."
              },
              "max_session_secs": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "session_id": {
                "type": "string",
                "format": "uuid"
              },
              "type": {
                "type": "string",
                "enum": [
                  "ready"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "A warning the terminal shows (idle soon).",
            "required": [
              "message",
              "type"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "notice"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The shell ended (`code`) or the session was closed (`reason`).",
            "required": [
              "reason",
              "type"
            ],
            "properties": {
              "code": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "reason": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "exit"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "message",
              "type"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "error"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "pong"
                ]
              }
            }
          }
        ],
        "description": "Text frames the API sends (binary frames are the terminal's output)."
      },
      "TerminateContract": {
        "type": "object",
        "description": "`POST …/contracts/{id}/terminate`.",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "TextFormat": {
        "type": "string",
        "description": "A text input's extra rule.",
        "enum": [
          "Username",
          "Slug"
        ]
      },
      "TextPayload": {
        "type": "object",
        "description": "`agent_message_chunk`, `agent_thought_chunk` (and a `user_message` without attachments)",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string"
          }
        }
      },
      "TicketCategory": {
        "type": "string",
        "description": "`support_tickets.category`",
        "enum": [
          "Billing",
          "Deployment",
          "Database",
          "Domain",
          "Storage",
          "Enterprise",
          "Bug",
          "Abuse",
          "General"
        ]
      },
      "TicketPriority": {
        "type": "string",
        "description": "`support_tickets.priority`, lowest first (the derived order is the urgency order).",
        "enum": [
          "Low",
          "Normal",
          "High",
          "Urgent"
        ]
      },
      "TicketResourceKind": {
        "type": "string",
        "description": "`support_tickets.resource_kind`: what the customer had trouble with.",
        "enum": [
          "App",
          "Database",
          "Stack",
          "Domain",
          "Bucket",
          "Invoice"
        ]
      },
      "TicketStatus": {
        "type": "string",
        "description": "`support_tickets.status`.",
        "enum": [
          "Open",
          "WaitingOnCustomer",
          "WaitingOnTeam",
          "Resolved",
          "Closed"
        ]
      },
      "TokenBody": {
        "type": "object",
        "description": "A link's secret, sent in a body (never in a URL): `fsi_…` for an invitation, `fsx_…` for a transfer.",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "TokenRequest": {
        "type": "object",
        "description": "`POST /oauth/token` (form-encoded; JSON is accepted too): `authorization_code` or `refresh_token`.",
        "properties": {
          "client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "code_verifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "redirect_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "refresh_token": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource": {
            "type": [
              "string",
              "null"
            ]
          },
          "scope": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "description": "`POST /oauth/token` → 200.",
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "refresh_token",
          "scope"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "refresh_token": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "description": "`Bearer`."
          }
        }
      },
      "ToolCallPayload": {
        "type": "object",
        "description": "`tool_call`",
        "required": [
          "toolCallId",
          "title",
          "kind",
          "status"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "rawInput": {},
          "status": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "toolCallId": {
            "type": "string"
          }
        }
      },
      "ToolCallUpdatePayload": {
        "type": "object",
        "description": "`tool_call_update`",
        "required": [
          "toolCallId"
        ],
        "properties": {
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "rawInput": {
            "type": [
              "object",
              "null"
            ],
            "description": "A Fullsea tool's arguments once they are complete (the adapter's first `tool_call` carries them as they stood\nwhen the call began, usually `{}`): what names its action (`templates` `deploy`). At most 4 KiB; other tools'\ninputs (file contents) are never stored here."
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "toolCallId": {
            "type": "string"
          }
        }
      },
      "TopMoversDto": {
        "type": "object",
        "description": "`GET /api/v1/admin/movers`",
        "required": [
          "aiSpend",
          "smtp",
          "generatedAt"
        ],
        "properties": {
          "aiSpend": {
            "$ref": "#/components/schemas/MoverBoardDto",
            "description": "Platform-key builder turns debited, cents."
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "overage": {
            "$ref": "#/components/schemas/MoverBoardDto",
            "description": "Area OV: overage metered (cents, by the hours' buckets)."
          },
          "smtp": {
            "$ref": "#/components/schemas/MoverBoardDto",
            "description": "Managed email recipients sent."
          }
        }
      },
      "TopupRequest": {
        "type": "object",
        "description": "`POST /api/v1/billing/topup` → `CheckoutResponse`",
        "required": [
          "packCents"
        ],
        "properties": {
          "packCents": {
            "type": "integer",
            "format": "int64",
            "description": "One of `topupPacksCents`."
          },
          "returnTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "As `CheckoutRequest.returnTo` (`/app/projects/<id>?resume=1`). Default: Billing."
          }
        }
      },
      "TrafficDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/traffic?range=1h|24h|7d`: what the ingress saw for the app, in 1-minute (1h),\n5-minute (24h) or 30-minute (7d) buckets.",
        "required": [
          "appId",
          "range",
          "stepSeconds",
          "from",
          "to",
          "available",
          "totals",
          "points"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "available": {
            "type": "boolean",
            "description": "Fullsea reads this app's request metrics (a web app on a cluster whose ingress answers)."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "lastScrapedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the ingress was last read successfully."
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrafficPoint"
            }
          },
          "range": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why not, in words."
          },
          "stepSeconds": {
            "type": "integer",
            "format": "int64"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "totals": {
            "$ref": "#/components/schemas/TrafficTotals"
          }
        }
      },
      "TrafficPoint": {
        "type": "object",
        "description": "Requests of one bucket of a traffic chart.",
        "required": [
          "at",
          "requests",
          "status2xx",
          "status3xx",
          "status4xx",
          "status5xx",
          "bytesIn",
          "bytesOut"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "bytesIn": {
            "type": "integer",
            "format": "int64"
          },
          "bytesOut": {
            "type": "integer",
            "format": "int64"
          },
          "p50Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p99Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "perMinute": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Requests per minute in the bucket; `null` for a bucket without a reading (a gap)."
          },
          "requests": {
            "type": "integer",
            "format": "int64"
          },
          "status2xx": {
            "type": "integer",
            "format": "int64"
          },
          "status3xx": {
            "type": "integer",
            "format": "int64"
          },
          "status4xx": {
            "type": "integer",
            "format": "int64"
          },
          "status5xx": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "TrafficSampleDto": {
        "type": "object",
        "required": [
          "requests",
          "errors5xx"
        ],
        "properties": {
          "errors5xx": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "p95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "requests": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "TrafficTotals": {
        "type": "object",
        "description": "The whole range at once.",
        "required": [
          "requests",
          "status2xx",
          "status3xx",
          "status4xx",
          "status5xx",
          "bytesIn",
          "bytesOut"
        ],
        "properties": {
          "bytesIn": {
            "type": "integer",
            "format": "int64"
          },
          "bytesOut": {
            "type": "integer",
            "format": "int64"
          },
          "errorPercent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "5xx share of all requests (percent); `null` without requests."
          },
          "p50Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p95Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p99Ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "perMinute": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "requests": {
            "type": "integer",
            "format": "int64"
          },
          "status2xx": {
            "type": "integer",
            "format": "int64"
          },
          "status3xx": {
            "type": "integer",
            "format": "int64"
          },
          "status4xx": {
            "type": "integer",
            "format": "int64"
          },
          "status5xx": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "TransferCardDto": {
        "type": "object",
        "description": "The chat card of an export or import the worker runs (`data_transfer`, and the `artifact` card of a finished\nexport): the newest card of an `operationId` replaces the earlier ones.",
        "required": [
          "operationId",
          "direction",
          "state",
          "database",
          "filename",
          "format",
          "startedAt"
        ],
        "properties": {
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Done: rows exported or imported (statements of a SQL script).",
            "minimum": 0
          },
          "database": {
            "type": "string",
            "description": "The database's name."
          },
          "direction": {
            "$ref": "#/components/schemas/TransferDirection"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Failed: why, in a sentence (nothing was kept)."
          },
          "filename": {
            "type": "string",
            "description": "An export's file name; an import's source file."
          },
          "format": {
            "type": "string",
            "description": "`csv` | `json` | `ndjson` | `sql` | `tsv`."
          },
          "operationId": {
            "$ref": "#/components/schemas/OperationId"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "$ref": "#/components/schemas/TransferState"
          },
          "table": {
            "type": [
              "string",
              "null"
            ],
            "description": "The table exported or imported into (none for a query or a SQL script)."
          }
        }
      },
      "TransferDirection": {
        "type": "string",
        "description": "Which way a worker's data transfer goes.",
        "enum": [
          "export",
          "import"
        ]
      },
      "TransferDto": {
        "type": "object",
        "description": "An open project transfer offer.",
        "required": [
          "id",
          "projectId",
          "projectName",
          "fromTeamId",
          "fromTeamName",
          "email",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "fromTeamId": {
            "$ref": "#/components/schemas/TeamId"
          },
          "fromTeamName": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/ProjectTransferId"
          },
          "invitedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "projectName": {
            "type": "string"
          }
        }
      },
      "TransferPreviewDto": {
        "type": "object",
        "description": "`POST /api/v1/transfers/preview`: what a transfer link offers (no sign-in needed: the link is the secret). The\nteams that could receive it are the caller's owned teams of `GET /api/v1/teams`.",
        "required": [
          "projectName",
          "fromTeamName",
          "email",
          "expiresAt",
          "state",
          "needs"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "fromTeamName": {
            "type": "string"
          },
          "invitedByEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "needs": {
            "$ref": "#/components/schemas/ProjectNeedsDto"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectName": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/LinkState"
          }
        }
      },
      "TransferProject": {
        "type": "object",
        "description": "`POST /api/v1/projects/{id}/transfer`: move the project into another team the caller administers.",
        "required": [
          "teamId"
        ],
        "properties": {
          "teamId": {
            "$ref": "#/components/schemas/TeamId"
          }
        }
      },
      "TransferState": {
        "type": "string",
        "description": "Where a worker's data transfer is.",
        "enum": [
          "running",
          "succeeded",
          "failed"
        ]
      },
      "TransferredProject": {
        "type": "object",
        "description": "The project after it moved.",
        "required": [
          "projectId",
          "team",
          "needs"
        ],
        "properties": {
          "needs": {
            "$ref": "#/components/schemas/ProjectNeedsDto"
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSummaryDto"
          }
        }
      },
      "TriageActionDto": {
        "type": "object",
        "description": "One click the person may approve: it runs through the normal path (`rollback_app`, `restart_app`, `update_app`\nwith a bigger size, `resize_database`).",
        "required": [
          "id",
          "kind",
          "label",
          "resourceKind",
          "resourceId",
          "recommended",
          "status"
        ],
        "properties": {
          "decidedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "fromSize": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/TriageActionKind"
          },
          "label": {
            "type": "string",
            "description": "\"Roll back shop to release #6\", \"Move shop from Small to Medium\", \"Restart shop\"."
          },
          "operationId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationId"
              }
            ]
          },
          "recommended": {
            "type": "boolean",
            "description": "The agent named it (shown first, as the primary button)."
          },
          "releaseNumber": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The release a rollback goes to."
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "resourceKind": {
            "type": "string",
            "description": "`app` | `database`"
          },
          "status": {
            "$ref": "#/components/schemas/TriageActionStatus"
          },
          "toSize": {
            "type": [
              "string",
              "null"
            ],
            "description": "The size a scale-up moves to (`medium`) and from."
          }
        }
      },
      "TriageActionKind": {
        "type": "string",
        "description": "`triage_actions.kind`: what one click does, through the normal core path (`rollback_app`, `restart_app`,\n`update_app` with a bigger size, `resize_database`).",
        "enum": [
          "Rollback",
          "Restart",
          "ScaleUp"
        ]
      },
      "TriageActionStatus": {
        "type": "string",
        "description": "`triage_actions.status`",
        "enum": [
          "Offered",
          "Applied",
          "Failed",
          "Dismissed"
        ]
      },
      "TriageDto": {
        "type": "object",
        "description": "`GET /api/v1/alerts/incidents/{id}/triage`: the incident's investigation.",
        "required": [
          "id",
          "incidentId",
          "status",
          "evidence",
          "steps",
          "actions",
          "costCents",
          "createdAt"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriageActionDto"
            }
          },
          "costCents": {
            "type": "integer",
            "format": "int64",
            "description": "What the investigation cost (AI credit, cents)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "incidentId": {
            "$ref": "#/components/schemas/IncidentId"
          },
          "likelyCause": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it was skipped or failed, in a sentence."
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/TriageStatus"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TriageSettingsDto": {
        "type": "object",
        "description": "`GET|PUT /api/v1/projects/{id}/triage`: the project's toggle and the account's monthly budget.",
        "required": [
          "projectId",
          "enabled",
          "available",
          "monthlyCapCents",
          "spentThisMonthCents",
          "runsThisMonth",
          "maxRunCents"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "The plan includes AI triage (Pro and up)."
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRunCents": {
            "type": "integer",
            "format": "int64",
            "description": "What one investigation may spend at most (cents)."
          },
          "monthlyCapCents": {
            "type": "integer",
            "format": "int64",
            "description": "The account's monthly cap for investigations (cents)."
          },
          "projectId": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "runsThisMonth": {
            "type": "integer",
            "format": "int64"
          },
          "spentThisMonthCents": {
            "type": "integer",
            "format": "int64",
            "description": "This month's investigations so far (cents) and how many ran."
          },
          "upgrade": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UpgradeOffer",
                "description": "Present when the plan lacks it: what to upgrade to."
              }
            ]
          }
        }
      },
      "TriageStatus": {
        "type": "string",
        "description": "`incident_triages.status`: `queued` until a builder takes it, `running` while the agent investigates,\n`done` with a diagnosis, `failed` (the agent did not answer usefully, or stopped), `skipped` (the plan, the\ncap or the credit said no; `reason` says which).",
        "enum": [
          "Queued",
          "Running",
          "Done",
          "Failed",
          "Skipped"
        ]
      },
      "TrialDto": {
        "type": "object",
        "description": "The free trial credit (PLAN.md §15.4): unlocked once by verifying a card no other account used.",
        "required": [
          "state",
          "creditCents"
        ],
        "properties": {
          "cardVerifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "creditCents": {
            "type": "integer",
            "format": "int64",
            "description": "What the trial grants (the free plan's `aiCreditsCardTrialCents`, 125)."
          },
          "grantedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "state": {
            "$ref": "#/components/schemas/TrialState"
          }
        }
      },
      "TrialState": {
        "type": "string",
        "description": "Where a person stands with the free trial credit (`BillingStateDto.trial.state`).",
        "enum": [
          "Available",
          "Claimed",
          "CardAlreadyUsed"
        ]
      },
      "TurnCredential": {
        "type": "string",
        "description": "Which credential a turn runs on (`turn_started.credential`).",
        "enum": [
          "platform",
          "own_api_key",
          "own_subscription"
        ]
      },
      "TurnEndedPayload": {
        "type": "object",
        "description": "`turn_ended`: the turn's cost as the agent reported it (or, with `costEstimated`, the builder's lower-bound\nestimate from the usage it reported, when the agent stopped before reporting a cost); a debit only on the\nplatform key.",
        "required": [
          "stopReason"
        ],
        "properties": {
          "costEstimated": {
            "type": "boolean",
            "description": "`costUsd` is an estimate: no cost report arrived (present only when true)."
          },
          "costUsd": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "debitedCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "effort": {
            "type": [
              "string",
              "null"
            ]
          },
          "effortLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Area MX: the model and effort the agent ran the turn on (what it reported at the turn's end)."
          },
          "modelLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "stopReason": {
            "type": "string"
          }
        }
      },
      "TurnStartedPayload": {
        "type": "object",
        "description": "`turn_started`; area MX: the model and effort the turn runs on (absent in events stored before).",
        "required": [
          "credential"
        ],
        "properties": {
          "credential": {
            "$ref": "#/components/schemas/TurnCredential"
          },
          "effort": {
            "type": [
              "string",
              "null"
            ]
          },
          "effortLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "modelLabel": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateAffiliateTerms": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/affiliates/{id}`: the partner's terms, status and internal notes. Absent fields stay.",
        "properties": {
          "campaignSpendCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "commissionBps": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "100–5000 (1 %–50 %)."
          },
          "lifetime": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`true`: a referral earns for its lifetime (`recurringMonths` is ignored)."
          },
          "minPayoutCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "≥ 1000 ($10)."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why (recorded in the audit trail)."
          },
          "recurringMonths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Months a referral earns (≥ 1)."
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AffiliateStatus"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "UpdateApp": {
        "type": "object",
        "description": "`PATCH /api/v1/apps/{id}`; `env` replaces all values (`PATCH /apps/{id}/env` changes single keys). An empty\n`command` goes back to the image's own, an empty `healthCheckPath` back to TCP checks.",
        "properties": {
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "env": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "healthCheckPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "replicas": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "schedule": {
            "type": [
              "string",
              "null"
            ]
          },
          "size": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateAppEdge": {
        "type": "object",
        "description": "`PATCH /api/v1/apps/{id}/edge`: changes only what it names. A password lock turned on without a password gets a\ngenerated one (answered once in `password`).",
        "properties": {
          "accountLock": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allowCidrs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "blockCidrs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "maintenance": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MaintenanceInput"
              }
            ]
          },
          "passwordLock": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PasswordLockInput"
              }
            ]
          },
          "rateLimit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RateLimitDto",
                "description": "The whole-app rule per second, as before per-path rules; `null` removes the whole-app rule (whatever its\nperiod). Not together with `rateLimits`."
              }
            ]
          },
          "rateLimits": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/RateLimitRuleInput"
            },
            "description": "Rules to set (or with `requests: 0` remove), each on its path; at most 20 per app."
          }
        },
        "additionalProperties": false
      },
      "UpdateBucket": {
        "type": "object",
        "description": "`PATCH /api/v1/buckets/{id}`: what is named changes; the rest stays.",
        "properties": {
          "corsRules": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CorsRule"
            },
            "description": "Replaces the rules (`[]` removes them)."
          },
          "publicAccess": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`true` makes every object readable by anyone at `publicUrl`; `false` makes it private again (the slug goes)."
          },
          "quotaGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Grow, or shrink to no less than what it holds."
          }
        },
        "additionalProperties": false
      },
      "UpdateBuilderPreferences": {
        "type": "object",
        "description": "`PATCH /api/v1/projects/{id}/builder/preferences`, `PATCH /api/v1/copilot/preferences` (the session, applied to\nits live agent between turns without a restart) and `PATCH /api/v1/builder/preferences` (the person's default).",
        "properties": {
          "effort": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "saveAsDefault": {
            "type": "boolean",
            "description": "Also keep it as the person's default for new sessions."
          }
        },
        "additionalProperties": false
      },
      "UpdateCapacityRequest": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/enterprise/requests/{id}`: status and assignee.",
        "properties": {
          "assign": {
            "type": [
              "string",
              "null"
            ],
            "description": "`me`, an admin's user id, or `none` (`assignee` too: the attention queue's \"Assign to me\")."
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateCatalogEntry": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/catalog/{code}`",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "UpdateCluster": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/clusters/{id}`",
        "properties": {
          "externalHost": {
            "type": [
              "string",
              "null"
            ]
          },
          "ingressDomain": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClusterStatus"
              }
            ]
          }
        }
      },
      "UpdateIssue": {
        "type": "object",
        "description": "`PATCH /api/v1/monitoring/issues/{id}`",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ErrorGroupStatus"
          }
        },
        "additionalProperties": false
      },
      "UpdateMember": {
        "type": "object",
        "description": "`PATCH /api/v1/teams/{team}/members/{user}`",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          }
        }
      },
      "UpdateModelPolicy": {
        "type": "object",
        "description": "`PUT /api/v1/admin/builder-models`: the override in full (what equals the file is dropped), why, and the revision\nit was made from.",
        "required": [
          "override",
          "reason"
        ],
        "properties": {
          "baseRevision": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The `revision` the editor loaded; another change saved since → `409 conflict`. Absent: no check."
          },
          "override": {
            "$ref": "#/components/schemas/PolicyOverride"
          },
          "reason": {
            "type": "string",
            "description": "Why (4 to 500 characters): kept with the revision and in the audit log."
          }
        },
        "additionalProperties": false
      },
      "UpdateOverflow": {
        "type": "object",
        "description": "`PUT /api/v1/billing/overflow`: switch overflow on or off, set the monthly cap (`0` = a hard cap at the plan).",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "monthlyCapCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Whole cents, 0 to 10 000 000 ($100 000)."
          }
        },
        "additionalProperties": false
      },
      "UpdatePayoutEmail": {
        "type": "object",
        "description": "`PUT /api/v1/affiliate/payout-email`: a new PayPal address (confirmed by a link sent to it).",
        "required": [
          "payoutEmail"
        ],
        "properties": {
          "payoutEmail": {
            "type": "string"
          }
        }
      },
      "UpdatePlatformSettings": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/settings`: only what is given changes.",
        "properties": {
          "adminMcpEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "platformKeyEnabled": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "UpdatePoolCredential": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/agent-pool/credentials/{id}`: every field optional; `baseUrl` / `region` `\"\"` clear them.",
        "properties": {
          "baseUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "clearCooldown": {
            "type": "boolean",
            "description": "Ends a cooldown now and clears the last error."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxConcurrentTurns": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PoolTier"
              }
            ]
          },
          "weight": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "UpdateProject": {
        "type": "object",
        "description": "`PATCH /api/v1/projects/{id}`",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateSupportTicket": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/support/tickets/{ref}`: any of the fields.",
        "properties": {
          "assignee": {
            "type": [
              "string",
              "null"
            ],
            "description": "`me`, `none` or an operator's user id."
          },
          "category": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketCategory"
              }
            ]
          },
          "priority": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketPriority"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TicketStatus"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "UpdateTeam": {
        "type": "object",
        "description": "`PATCH /api/v1/teams/{team}`",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "UpdateUser": {
        "type": "object",
        "description": "`PATCH /api/v1/admin/users/{id}`",
        "properties": {
          "role": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserRole"
              }
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserStatus"
              }
            ]
          },
          "suspensionReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "With `status: suspended`: why (recorded, and sent in the `account_suspended` mail)."
          }
        }
      },
      "UpdateVolume": {
        "type": "object",
        "description": "`PATCH /api/v1/volumes/{id}`: `appId` attaches (an id) or detaches (`null`); `sizeGib` only grows; `mountPath`\nmoves the mount. Absent fields are unchanged.",
        "properties": {
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "mountPath": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeGib": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "UpgradeNudgeDto": {
        "type": "object",
        "description": "A bigger plan that makes the month cheaper than the projected overage (the upgrade arbitrage nudge).",
        "required": [
          "plan",
          "planName",
          "priceDeltaCents",
          "projectedOverageCents",
          "savesCents"
        ],
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "planName": {
            "type": "string"
          },
          "priceDeltaCents": {
            "type": "integer",
            "format": "int64",
            "description": "Its monthly price less the current plan's."
          },
          "projectedOverageCents": {
            "type": "integer",
            "format": "int64"
          },
          "savesCents": {
            "type": "integer",
            "format": "int64",
            "description": "What it saves a month (`Save $4/mo — Upgrade to Pro`)."
          }
        }
      },
      "UpgradeOffer": {
        "type": "object",
        "description": "An upgrade the person can take right now (PLAN.md §18.0): `details.upgrade` of a `402 payment_required` (publish,\nplan) or a `quota_exceeded`, of the builder's out-of-credit refusal, and (area C) MCP's\n`structuredContent.upgrade`. Built from the plan catalogue, so prices and highlights are the configured ones.",
        "required": [
          "reason",
          "headline",
          "recommendedPlan",
          "monthlyUsd",
          "highlights"
        ],
        "properties": {
          "addon": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AddonHint",
                "description": "More capacity packs on the plan held now, when they fit for less than a bigger plan (PLAN.md §18.Y; only on\n`quota_exceeded`, and `recommendedPlan` is then the plan held now). Absent otherwise."
              }
            ]
          },
          "explanation": {
            "type": "string",
            "description": "One sentence for the person on why this was refused, in plain words and from the plans config (\"Your Free plan\nbuilds and previews apps privately; publishing them for everyone needs a paid plan.\"): the card's body. The\nagent's sentence (MCP's `content` text, which names tools and Billing steps) is never shown to the person.\nEmpty only in cards stored before it existed."
          },
          "headline": {
            "type": "string",
            "description": "One sentence for the card's title (\"Go live with Starter for $15 a month\")."
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the recommended plan brings, in plain words (only what is live)."
          },
          "monthlyUsd": {
            "type": "number",
            "format": "double",
            "description": "The recommended plan's monthly price in dollars (`15`)."
          },
          "reason": {
            "$ref": "#/components/schemas/UpgradeReason"
          },
          "recommendedPlan": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "topupPackCents": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The top-up pack to offer (`out_of_credit`: 500); `null` otherwise."
          }
        }
      },
      "UpgradeReason": {
        "type": "string",
        "description": "Why an upgrade is offered (`UpgradeOffer.reason`, PLAN.md §18.0).",
        "enum": [
          "PublishLive",
          "QuotaExceeded",
          "PlanRequired",
          "OutOfCredit"
        ]
      },
      "UploadId": {
        "type": "string",
        "format": "uuid",
        "description": "`source_uploads.id`: a folder an outside agent uploads to build"
      },
      "UptimeDayDto": {
        "type": "object",
        "description": "One day of a 90-day bar.",
        "required": [
          "day",
          "checks",
          "failures"
        ],
        "properties": {
          "checks": {
            "type": "integer",
            "format": "int64"
          },
          "day": {
            "type": "string",
            "format": "date"
          },
          "failures": {
            "type": "integer",
            "format": "int64"
          },
          "uptimePercent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "`null`: nothing was checked that day."
          }
        }
      },
      "UptimeDto": {
        "type": "object",
        "description": "`GET /api/v1/apps/{id}/uptime`: the 90-day bar of the app's address, its last check, its probes and its\ncustom domains' certificates.",
        "required": [
          "appId",
          "appName",
          "status",
          "days",
          "probes",
          "certificates"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "certificates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CertificateDto"
            }
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UptimeDayDto"
            },
            "description": "90 days, oldest first; today last."
          },
          "failingSince": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastCheckedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastLatencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "probes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProbeDto"
            }
          },
          "status": {
            "$ref": "#/components/schemas/UptimeStatus"
          },
          "uptime30d": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "uptime90d": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UptimeStatus": {
        "type": "string",
        "description": "`uptime_checks.status`",
        "enum": [
          "Unknown",
          "Up",
          "Down"
        ]
      },
      "Usage": {
        "type": "object",
        "description": "What the user holds now: live app and database counts and the sums of active allocations as the plan counts\nthem (`cpuMillis` is the sum of CPU limits, against `Entitlements.cpuMillis`).",
        "required": [
          "apps",
          "databases",
          "cpuMillis",
          "memoryMib",
          "storageGib"
        ],
        "properties": {
          "apps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "cpuMillis": {
            "type": "integer",
            "format": "int64"
          },
          "databases": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "memoryMib": {
            "type": "integer",
            "format": "int64"
          },
          "sharedStorageGib": {
            "type": "integer",
            "format": "int64",
            "description": "GiB of the live `shared_nfs` volumes (against `Entitlements.sharedStorageGib`; not in `storageGib`)."
          },
          "storageGib": {
            "type": "integer",
            "format": "int64"
          },
          "volumes": {
            "type": "integer",
            "format": "int32",
            "description": "Live volumes (against `Entitlements.maxVolumes`).",
            "minimum": 0
          }
        }
      },
      "UsageDelta": {
        "type": "object",
        "required": [
          "bucketId",
          "bytes",
          "objects"
        ],
        "properties": {
          "bucketId": {
            "$ref": "#/components/schemas/BucketId"
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "description": "Bytes added (negative: removed)."
          },
          "objects": {
            "type": "integer",
            "format": "int64",
            "description": "Objects added (negative: removed)."
          }
        }
      },
      "UsageDto": {
        "type": "object",
        "description": "`GET /api/v1/usage`",
        "required": [
          "planCode",
          "limits",
          "used",
          "credits"
        ],
        "properties": {
          "addons": {
            "$ref": "#/components/schemas/AddonsSummaryDto",
            "description": "The capacity packs counted in `limits` (PLAN.md §18.Y)."
          },
          "credits": {
            "$ref": "#/components/schemas/CreditBalance"
          },
          "limits": {
            "$ref": "#/components/schemas/Entitlements",
            "description": "The plan's limits plus what its capacity packs add (`addons.adds`)."
          },
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "used": {
            "$ref": "#/components/schemas/Usage"
          }
        }
      },
      "UsageReport": {
        "type": "object",
        "description": "`POST /internal/storage/usage` (the edge, every minute; `X-Fullsea-Signature: sha256=<hex HMAC-SHA256 of the\nbody with FULLSEA_EDGE_USAGE_SECRET>`): what changed per bucket since its last report. Applied once per `id`.",
        "required": [
          "id",
          "at",
          "deltas"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "deltas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageDelta"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per report; a report sent again with the same id changes nothing."
          }
        }
      },
      "UserDto": {
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "status",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/UserId"
          },
          "lastLoginAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatus"
          }
        }
      },
      "UserId": {
        "type": "string",
        "format": "uuid",
        "description": "`users.id`"
      },
      "UserMessagePayload": {
        "type": "object",
        "description": "`user_message`",
        "required": [
          "text"
        ],
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentRef"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptFileRef"
            },
            "description": "Area AR: the files (chat uploads) it carried."
          },
          "text": {
            "type": "string"
          }
        }
      },
      "UserRole": {
        "type": "string",
        "description": "`users.role`",
        "enum": [
          "User",
          "Admin"
        ]
      },
      "UserStatus": {
        "type": "string",
        "description": "`users.status`; a suspended user is refused (`403 forbidden`) on every authenticated route.",
        "enum": [
          "Active",
          "Suspended"
        ]
      },
      "UserTeamDto": {
        "type": "object",
        "description": "A team a person belongs to (`AdminUserDetail.teams`).",
        "required": [
          "team",
          "role",
          "planCode"
        ],
        "properties": {
          "planCode": {
            "$ref": "#/components/schemas/PlanCode"
          },
          "role": {
            "$ref": "#/components/schemas/TeamRole"
          },
          "team": {
            "$ref": "#/components/schemas/TeamRefDto"
          }
        }
      },
      "ValidationDetails": {
        "type": "object",
        "description": "`validation_failed.details`",
        "required": [
          "fields"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          }
        }
      },
      "VolumeDto": {
        "type": "object",
        "description": "`GET /api/v1/volumes`, `GET /api/v1/volumes/{id}`.",
        "required": [
          "id",
          "name",
          "slug",
          "sizeGib",
          "mountPath",
          "status",
          "clusterId",
          "clusterName",
          "namespace",
          "claimName",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "accessMode": {
            "$ref": "#/components/schemas/AccessMode",
            "description": "`rwo` (ReadWriteOnce) or `rwx` (ReadWriteMany), from the tier."
          },
          "appId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppId",
                "description": "The app it is mounted into (`null` = detached)."
              }
            ]
          },
          "appName": {
            "type": [
              "string",
              "null"
            ]
          },
          "claimName": {
            "type": "string",
            "description": "The `PersistentVolumeClaim` (`vol-<slug>`)."
          },
          "clusterId": {
            "$ref": "#/components/schemas/ClusterId"
          },
          "clusterName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "$ref": "#/components/schemas/VolumeId"
          },
          "mountPath": {
            "type": "string"
          },
          "mounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VolumeMountDto"
            },
            "description": "Every app that mounts it: the first mount (`appId`, `mountPath`) and, for a Shared App Disk, the others."
          },
          "name": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "projectId": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectId"
              }
            ]
          },
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/VolumeStatus"
          },
          "statusMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "$ref": "#/components/schemas/VolumeTier",
            "description": "`local_nvme` (\"Fast Local NVMe\": one server, one replica) or `shared_nfs` (\"Shared App Disk\": every server,\nany number of replicas). PLAN.md §18.ST2."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "usedBytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Bytes in use on a Shared App Disk as its NFS server last reported (`null`: not measured yet, or a local disk)."
          }
        }
      },
      "VolumeEntryDto": {
        "type": "object",
        "description": "One entry of a volume directory.",
        "required": [
          "name",
          "kind",
          "sizeBytes"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "`file` | `dir` | `link` | `other`"
          },
          "modifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "VolumeId": {
        "type": "string",
        "format": "uuid",
        "description": "`volumes.id`"
      },
      "VolumeListing": {
        "type": "object",
        "description": "`GET /api/v1/volumes/{id}/files?path=`: one directory of a volume, directories first.",
        "required": [
          "path",
          "entries",
          "truncated"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VolumeEntryDto"
            }
          },
          "mountPath": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the app sees it (`/data/uploads`), when the volume is mounted."
          },
          "path": {
            "type": "string",
            "description": "Relative to the volume's root (`\"\"` is the root)."
          },
          "truncated": {
            "type": "boolean",
            "description": "More entries than were listed."
          }
        }
      },
      "VolumeMountDto": {
        "type": "object",
        "description": "One app a volume is mounted into.",
        "required": [
          "appId",
          "appName",
          "mountPath",
          "primary"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "appName": {
            "type": "string"
          },
          "mountPath": {
            "type": "string"
          },
          "primary": {
            "type": "boolean",
            "description": "The volume's first mount (`VolumeDto.appId`); further mounts follow it when it goes."
          }
        }
      },
      "VolumePathQuery": {
        "type": "object",
        "description": "`GET /api/v1/volumes/{id}/files?path=` and `POST …/files/export {path}`.",
        "properties": {
          "path": {
            "type": "string",
            "description": "Relative to the volume's root; empty for the root."
          }
        },
        "additionalProperties": false
      },
      "VolumeResizeOptions": {
        "type": "object",
        "description": "`GET /api/v1/volumes/{id}/resize` (area ST1): how far the volume may grow, or why it cannot, and a resize\nunder way.",
        "required": [
          "volumeId",
          "sizeGib",
          "canGrow",
          "maxGib"
        ],
        "properties": {
          "canGrow": {
            "type": "boolean",
            "description": "The volume's claim can grow in place on its cluster (its storage class allows it, or it holds no data yet)."
          },
          "maxGib": {
            "type": "integer",
            "format": "int64",
            "description": "The most GiB it may have (the plan's storage left, at most 1024); `sizeGib` when it cannot grow."
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto",
                "description": "A resize queued or running."
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it cannot grow and what to do instead; `null` when it can."
          },
          "sizeGib": {
            "type": "integer",
            "format": "int64"
          },
          "storageClass": {
            "type": [
              "string",
              "null"
            ],
            "description": "The claim's storage class (`local-path` on k3d, `fullsea-nvme` on SYS-1), when known."
          },
          "volumeId": {
            "$ref": "#/components/schemas/VolumeId"
          }
        }
      },
      "VolumeStatus": {
        "type": "string",
        "description": "`volumes.status`",
        "enum": [
          "Pending",
          "Ready",
          "Failed",
          "Deleting",
          "Deleted"
        ]
      },
      "VolumeTier": {
        "type": "string",
        "description": "`volumes.tier`",
        "enum": [
          "LocalNvme",
          "SharedNfs"
        ]
      },
      "VolumeWithOperation": {
        "type": "object",
        "description": "A volume change with the work it queued: the claim (`provision_volume`, `resize_volume`, `delete_volume`) and,\nwhen an app's mounts changed, the app's redeploy.",
        "required": [
          "volume"
        ],
        "properties": {
          "appRelease": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReleaseDto"
              }
            ]
          },
          "operation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationDto"
              }
            ]
          },
          "volume": {
            "$ref": "#/components/schemas/VolumeDto"
          }
        }
      },
      "WebhookAck": {
        "type": "object",
        "description": "`POST /webhooks/stripe` → `{\"received\": true}`.",
        "required": [
          "received"
        ],
        "properties": {
          "received": {
            "type": "boolean"
          }
        }
      },
      "WebhookSkip": {
        "type": "object",
        "description": "An app a push webhook did not deploy, and why.",
        "required": [
          "appId",
          "reason"
        ],
        "properties": {
          "appId": {
            "$ref": "#/components/schemas/AppId"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "WidgetId": {
        "type": "string",
        "description": "One of the five monitoring widgets (the board's layout names them).",
        "enum": [
          "Uptime",
          "Traffic",
          "Compute",
          "Logs",
          "Alerts"
        ]
      },
      "WidgetSlot": {
        "type": "object",
        "description": "One widget of a board's layout.",
        "required": [
          "id",
          "visible"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WidgetId"
          },
          "visible": {
            "type": "boolean"
          }
        }
      },
      "WorkspaceFile": {
        "type": "object",
        "description": "One file of `GET /api/v1/projects/{id}/files` (read-only listing of the workspace).",
        "required": [
          "path",
          "size"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Relative to the workspace root, `/`-separated."
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "WorkspaceFileContent": {
        "type": "object",
        "description": "`GET /api/v1/projects/{id}/files/content?path=`: one workspace file for the read-only viewer.",
        "required": [
          "path",
          "size",
          "binary",
          "tooLarge"
        ],
        "properties": {
          "binary": {
            "type": "boolean",
            "description": "A NUL byte in the first 8 KiB, or not UTF-8."
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTF-8 text; `None` when binary or too large."
          },
          "path": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "tooLarge": {
            "type": "boolean",
            "description": "Over the viewer's limit (1 MiB): not read."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "health",
      "description": "Liveness and readiness"
    },
    {
      "name": "identity",
      "description": "The signed-in user and the CSRF token"
    },
    {
      "name": "catalog",
      "description": "Sizes, engines, runtimes, plans and usage"
    },
    {
      "name": "credits",
      "description": "AI credits"
    },
    {
      "name": "billing",
      "description": "Plans, Checkout, top-ups, the card-gated trial and payments"
    },
    {
      "name": "projects",
      "description": "Projects and their builder workspaces"
    },
    {
      "name": "apps",
      "description": "Apps, releases and logs"
    },
    {
      "name": "databases",
      "description": "Managed databases"
    },
    {
      "name": "operations",
      "description": "Lifecycle operations, long-polled"
    },
    {
      "name": "api-keys",
      "description": "API keys for the REST API and MCP"
    },
    {
      "name": "templates",
      "description": "Templates (public) and the stacks they deploy"
    },
    {
      "name": "events",
      "description": "Live changes of the caller's resources (Server-Sent Events)"
    },
    {
      "name": "github",
      "description": "GitHub: the App's installations, repository pickers, deploy on push, Push to GitHub and the webhook"
    },
    {
      "name": "uploads",
      "description": "Local folders uploaded by outside agents to build (source upload)"
    },
    {
      "name": "oauth",
      "description": "MCP OAuth 2.1: metadata, client registration, consent, tokens, connected agents"
    },
    {
      "name": "secrets",
      "description": "Secrets an agent asked the person for (names only; values go to the app's env)"
    },
    {
      "name": "monitoring",
      "description": "Health Strips, HTTP traffic, uptime and probes, database health, issues, boards and public status pages"
    },
    {
      "name": "workbench",
      "description": "Workbench tools: the docker-compose importer, the data browser, the architecture map and the web terminal"
    },
    {
      "name": "edge",
      "description": "Edge controls, the gate, canary releases, autoscaling, path routes, environments and pull request previews"
    },
    {
      "name": "advisor",
      "description": "AI triage of incidents, right-sizing advice and managed outbound email for stacks"
    },
    {
      "name": "teams",
      "description": "Teams, members and roles, invitations and seats, project transfers and client handovers"
    },
    {
      "name": "storage",
      "description": "Object Storage buckets: keys, the file browser's presigned URLs, attaching a bucket to an app, the storage pools and the edge's usage reports"
    },
    {
      "name": "enterprise",
      "description": "Enterprise contracts (typed overrides, quotes, Stripe Checkout and Net-30 invoices, renewals), self-serve capacity requests and dedicated nodes"
    },
    {
      "name": "admin",
      "description": "The daily-ops admin (role admin): the executive brief, the attention queue, capacity and runway, top movers, teams and their dossiers, the read-only view, the resource hubs and billing"
    },
    {
      "name": "support",
      "description": "The support desk: tickets and their threads, files, the operators' queue, notes and drafts, the diagnostic snapshot and SendGrid Inbound Parse"
    },
    {
      "name": "affiliates",
      "description": "The partner program: referral clicks and the co-branded page, the affiliate's earnings and payouts, and the admin's partners, PayPal payout batches, ledger and fraud flags"
    },
    {
      "name": "artifacts",
      "description": "Downloadable files of a team (exports, shared workspace files, volume files, chat uploads), expiring after 7 days, and a volume's files"
    }
  ]
}