{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fillo-so/json-schema/fillo-so-integration-connections-schema.json",
  "title": "IntegrationConnections",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fillo-so-openapi.json#/components/schemas/IntegrationConnections",
  "type": "object",
  "required": [
    "accounts",
    "selected",
    "discordServers"
  ],
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "label",
          "selected",
          "projectCount",
          "formDestinationCount"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "notion",
              "slack",
              "hubspot",
              "discord"
            ]
          },
          "label": {
            "type": "string",
            "description": "The account's display name — also the exact value a removal must confirm with."
          },
          "selected": {
            "type": "boolean",
            "description": "True when the key's project currently uses this account."
          },
          "projectCount": {
            "type": "integer"
          },
          "formDestinationCount": {
            "type": "integer"
          }
        }
      }
    },
    "selected": {
      "type": "object",
      "required": [
        "notion",
        "slack",
        "hubspot",
        "discord"
      ],
      "properties": {
        "notion": {
          "type": [
            "string",
            "null"
          ]
        },
        "slack": {
          "type": [
            "string",
            "null"
          ]
        },
        "hubspot": {
          "type": [
            "string",
            "null"
          ]
        },
        "discord": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "description": "The account id this project uses for each provider, or null."
    },
    "discordServers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "guildId",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "guildId": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}