{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowra-dev/json-schema/flowra-dev-create-auth-config-dto-schema.json",
  "title": "CreateAuthConfigDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowra-dev-auth-configs-api-openapi.yml#/components/schemas/CreateAuthConfigDto",
  "type": "object",
  "properties": {
    "toolkit": {
      "$ref": "#/$defs/Toolkit1Dto"
    },
    "authConfig": {
      "description": "Auth configuration",
      "oneOf": [
        {
          "$ref": "#/$defs/ComposioManagedAuthConfigDto"
        },
        {
          "$ref": "#/$defs/CustomAuthConfigDto"
        }
      ]
    }
  },
  "required": [
    "toolkit",
    "authConfig"
  ],
  "$defs": {
    "ComposioManagedAuthConfigDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "use_provider_managed_auth"
          ],
          "description": "Auth config type"
        },
        "name": {
          "type": "string",
          "description": "Ignored: server allocates a unique internal name (e.g. gmail-9qmlw6) for Composio sync"
        },
        "displayName": {
          "type": "string",
          "description": "Optional UI label (not sent to Composio as the sync name)"
        },
        "credentials": {
          "type": "object",
          "description": "Credentials for provider-managed auth",
          "additionalProperties": true
        },
        "toolAccessConfig": {
          "$ref": "#/$defs/ComposioManagedAuthToolAccessConfigDto"
        },
        "restrictToFollowingTools": {
          "description": "Restricted tools",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "ComposioManagedAuthToolAccessConfigDto": {
      "type": "object",
      "properties": {
        "toolsForConnectedAccountCreation": {
          "description": "Tools for connected account creation",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CustomAuthConfigDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "use_custom_auth"
          ],
          "description": "Auth config type"
        },
        "name": {
          "type": "string",
          "description": "Ignored: server allocates a unique internal name (e.g. slack-9qmlw6) for Composio sync"
        },
        "displayName": {
          "type": "string",
          "description": "Optional UI label (not sent to Composio as the sync name)"
        },
        "authScheme": {
          "enum": [
            "OAUTH1",
            "OAUTH2",
            "S2S_OAUTH2",
            "API_KEY",
            "BASIC",
            "BEARER_TOKEN",
            "BILLCOM_AUTH",
            "GOOGLE_SERVICE_ACCOUNT",
            "NO_AUTH",
            "BASIC_WITH_JWT",
            "CALCOM_AUTH",
            "SERVICE_ACCOUNT",
            "SAML",
            "DCR_OAUTH",
            "COOKIE",
            "WHATSAPP_QR"
          ],
          "type": "string",
          "description": "Authentication scheme"
        },
        "credentials": {
          "type": "object",
          "description": "Credentials for custom auth",
          "additionalProperties": true
        },
        "proxyConfig": {
          "$ref": "#/$defs/CustomAuthProxyConfigDto"
        },
        "restrictToFollowingTools": {
          "description": "Restricted tools",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "toolAccessConfig": {
          "$ref": "#/$defs/CustomAuthToolAccessConfigDto"
        }
      },
      "required": [
        "type",
        "authScheme"
      ]
    },
    "CustomAuthProxyConfigDto": {
      "type": "object",
      "properties": {
        "proxyUrl": {
          "type": "string",
          "description": "Proxy URL"
        },
        "proxyAuthKey": {
          "type": "string",
          "description": "Proxy authentication key"
        }
      },
      "required": [
        "proxyUrl"
      ]
    },
    "CustomAuthToolAccessConfigDto": {
      "type": "object",
      "properties": {
        "toolsForConnectedAccountCreation": {
          "description": "Tools for connected account creation",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Toolkit1Dto": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string",
          "description": "Toolkit slug"
        }
      },
      "required": [
        "slug"
      ]
    }
  }
}