{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mdflow-cz/json-schema/mdflow-cz-team-workspace-schema.json",
  "title": "TeamWorkspace",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mdflow-cz-openapi.json#/components/schemas/TeamWorkspace",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "account_id",
    "name",
    "description",
    "created_at",
    "updated_at",
    "access_level",
    "account_access_state"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "The Team account this workspace belongs to."
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "access_level": {
      "type": "string",
      "enum": [
        "read",
        "write"
      ],
      "description": "The token's effective access in this workspace right now: its cap intersected with the creator's current permission."
    },
    "account_access_state": {
      "type": "string",
      "enum": [
        "setup",
        "active",
        "grace",
        "read_only",
        "deleting"
      ],
      "description": "The Team account's lifecycle state. Writes succeed only while it is active."
    }
  }
}