{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/callidus-legal-ai/json-schema/callidus-legal-ai-act-as-response-schema.json",
  "title": "ActAsResponse",
  "description": "A customer-scoped access token. No refresh token, by design; see ``act_as``.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/callidus-legal-ai-desktop-oauth-api-openapi.yml#/components/schemas/ActAsResponse",
  "properties": {
    "access_token": {
      "type": "string",
      "title": "Access Token"
    },
    "token_type": {
      "type": "string",
      "title": "Token Type",
      "default": "bearer"
    },
    "expires_in": {
      "type": "integer",
      "title": "Expires In"
    },
    "user": {
      "$ref": "#/$defs/DesktopUser"
    },
    "impersonated_by": {
      "type": "string",
      "title": "Impersonated By"
    }
  },
  "type": "object",
  "required": [
    "access_token",
    "expires_in",
    "user",
    "impersonated_by"
  ],
  "$defs": {
    "DesktopUser": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "email": {
          "type": "string",
          "title": "Email"
        },
        "role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Role"
        },
        "beta_access": {
          "type": "boolean",
          "title": "Beta Access",
          "default": false
        },
        "enterprise_client_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Enterprise Client Id"
        },
        "pricing_tier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pricing Tier"
        },
        "is_subscribed": {
          "type": "boolean",
          "title": "Is Subscribed"
        }
      },
      "type": "object",
      "required": [
        "id",
        "email",
        "is_subscribed"
      ],
      "title": "DesktopUser",
      "description": "Profile returned alongside tokens so the app can gate its UI without a second call.\n\nThe server still enforces every gate on each request; this is convenience."
    }
  }
}