{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getoneprofile-ai/json-schema/getoneprofile-ai-ai-app-request-read-schema-schema.json",
  "title": "AiAppRequestReadSchema",
  "description": "An AI app asking to connect, as the consent page shows it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getoneprofile-ai-ai-apps-api-openapi.yml#/components/schemas/AiAppRequestReadSchema",
  "properties": {
    "app_name": {
      "description": "What to call the app.",
      "title": "App Name",
      "type": "string"
    },
    "brand": {
      "$ref": "#/$defs/AiAppBrand",
      "description": "Whose mark to show beside the name."
    },
    "is_local": {
      "description": "Whether the app runs on this computer.",
      "title": "Is Local",
      "type": "boolean"
    },
    "recognised": {
      "description": "Whether the app is recognised by a host its maker controls; an unrecognised app is shown as unverified.",
      "title": "Recognised",
      "type": "boolean"
    },
    "redirect_host": {
      "description": "Where the person returns after answering.",
      "title": "Redirect Host",
      "type": "string"
    },
    "workspaces": {
      "items": {
        "$ref": "#/$defs/AiAppWorkspaceChoiceSchema"
      },
      "title": "Workspaces",
      "type": "array"
    }
  },
  "required": [
    "app_name",
    "brand",
    "recognised",
    "is_local",
    "redirect_host",
    "workspaces"
  ],
  "type": "object",
  "$defs": {
    "AiAppBrand": {
      "description": "Whose mark the dashboard shows beside a connected app.",
      "enum": [
        "claude",
        "chatgpt",
        "other"
      ],
      "title": "AiAppBrand",
      "type": "string"
    },
    "AiAppWorkspaceChoiceSchema": {
      "description": "A workspace the person may connect the app to.",
      "properties": {
        "can_write": {
          "description": "Whether an AI app may make changes in this workspace (a paid plan).",
          "title": "Can Write",
          "type": "boolean"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "workspace_id": {
          "title": "Workspace Id",
          "type": "string"
        }
      },
      "required": [
        "workspace_id",
        "name",
        "can_write"
      ],
      "title": "AiAppWorkspaceChoiceSchema",
      "type": "object"
    }
  }
}