{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/indices-io/json-schema/indices-io-connector-schema.json",
  "title": "Connector",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/indices-io-openapi.json#/components/schemas/Connector",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the object."
    },
    "display_name": {
      "type": "string",
      "description": "Short human-readable name of the connector."
    },
    "purpose": {
      "type": "string",
      "description": "What the connector does, as specified at publish time."
    },
    "website": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Website the connector operates against."
    },
    "input_schema": {
      "additionalProperties": true,
      "type": "object",
      "description": "JSON Schema for the connector's run arguments."
    },
    "output_schema": {
      "additionalProperties": true,
      "type": "object",
      "description": "JSON Schema for the connector's run results."
    },
    "required_secrets": {
      "items": {
        "$ref": "#/$defs/SecretSlotDefinition"
      },
      "type": "array",
      "description": "Secret slots that must be bound when running the connector."
    },
    "version": {
      "type": "integer",
      "description": "Version of the connector, starting at 1 and incremented by each revision."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the object was created."
    }
  },
  "type": "object",
  "required": [
    "id",
    "display_name",
    "purpose",
    "website",
    "input_schema",
    "output_schema",
    "version",
    "created_at"
  ],
  "$defs": {
    "SecretSlotDefinition": {
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the secret slot, used as the key in a run's secret_bindings."
        },
        "type": {
          "$ref": "#/$defs/SecretType",
          "description": "Type of secret required: 'login' or 'string'."
        },
        "supports_totp": {
          "type": "boolean",
          "description": "Whether the connector can perform 2FA/TOTP when the bound login has it configured. Logins without TOTP remain bindable. Only applicable for 'login' type.",
          "default": false
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What the bound secret is used for, when the connector declares it."
        }
      },
      "type": "object",
      "required": [
        "name",
        "type"
      ],
      "title": "SecretSlotDefinition"
    },
    "SecretType": {
      "type": "string",
      "enum": [
        "login",
        "string"
      ],
      "title": "SecretType"
    }
  }
}