{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/advisorppc-com/json-schema/advisorppc-com-connected-accounts-envelope-schema.json",
  "title": "ConnectedAccountsEnvelope",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/advisorppc-com-native-projects-api-openapi.yml#/components/schemas/ConnectedAccountsEnvelope",
  "properties": {
    "all": {
      "items": {
        "$ref": "#/$defs/WorkspaceIntegrationOut"
      },
      "type": "array",
      "title": "All"
    }
  },
  "type": "object",
  "required": [
    "all"
  ],
  "$defs": {
    "AccountChatOut": {
      "properties": {
        "conversationId": {
          "type": "string",
          "title": "Conversationid"
        },
        "previewText": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Previewtext"
        },
        "lastMessageAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lastmessageat"
        },
        "messageCount": {
          "type": "integer",
          "title": "Messagecount",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "conversationId"
      ],
      "title": "AccountChatOut",
      "description": "The account's own chat thread, as its card should render it."
    },
    "WorkspaceIntegrationOut": {
      "properties": {
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "displayName": {
          "type": "string",
          "title": "Displayname"
        },
        "accountId": {
          "type": "string",
          "title": "Accountid"
        },
        "accountName": {
          "type": "string",
          "title": "Accountname"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "runtimeState": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Runtimestate"
        },
        "detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Currency"
        },
        "chattable": {
          "type": "boolean",
          "title": "Chattable",
          "default": false
        },
        "managed": {
          "type": "boolean",
          "title": "Managed",
          "default": false
        },
        "accountStatus": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Accountstatus"
        },
        "chat": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountChatOut"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "platform",
        "displayName",
        "accountId",
        "accountName",
        "status"
      ],
      "title": "WorkspaceIntegrationOut"
    }
  }
}