{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wasync-app/json-schema/wasync-app-account-response-schema.json",
  "title": "AccountResponse",
  "description": "Slot quota and connection health for the token's workspace. camelCase, like the rest of v1.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wasync-app-openapi.json#/components/schemas/AccountResponse",
  "type": "object",
  "required": [
    "slots",
    "connections"
  ],
  "properties": {
    "slots": {
      "type": "object",
      "required": [
        "total",
        "used",
        "available",
        "nextExpiry"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "description": "Connection slots the workspace holds in total."
        },
        "used": {
          "type": "integer",
          "description": "Slots already consumed by existing connections."
        },
        "available": {
          "type": "integer",
          "description": "Slots you can still fill with `POST /connections` and have the connection come up licensed."
        },
        "nextExpiry": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the next slot expires — renew before this date so a slot never lapses underneath a paying customer. `null` when nothing is due to expire."
        }
      }
    },
    "connections": {
      "type": "object",
      "required": [
        "total",
        "connected",
        "needsReconnect"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "description": "Connections in the workspace."
        },
        "connected": {
          "type": "integer",
          "description": "Currently live sessions."
        },
        "needsReconnect": {
          "type": "integer",
          "description": "Numbers waiting for their owner to scan a fresh QR — the same state that fires `connection.disconnected`."
        }
      }
    }
  }
}