{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowra-dev/json-schema/flowra-dev-connected-account-item-dto-success-response-schema.json",
  "title": "ConnectedAccountItemDtoSuccessResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowra-dev-connected-accounts-api-openapi.yml#/components/schemas/ConnectedAccountItemDtoSuccessResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "Success status"
    },
    "message": {
      "type": "string",
      "description": "Success message"
    },
    "data": {
      "type": "object",
      "properties": {
        "toolkit": {
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Toolkit slug"
            },
            "name": {
              "type": "string",
              "description": "Display name from the toolkit record"
            },
            "logo": {
              "type": [
                "string",
                "null"
              ],
              "description": "Logo image URL from the toolkit record"
            }
          },
          "required": [
            "slug"
          ]
        },
        "authConfig": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Auth config ID"
            },
            "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"
            },
            "isProviderManaged": {
              "type": "boolean",
              "description": "Whether the auth is provider-managed (by Local or Composio)"
            },
            "isDisabled": {
              "type": "boolean",
              "description": "Whether the auth config is disabled"
            },
            "deprecated": {
              "type": "object",
              "description": "Deprecated auth config info",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "required": [
            "id",
            "authScheme",
            "isProviderManaged",
            "isDisabled",
            "deprecated"
          ]
        },
        "id": {
          "type": "string",
          "description": "Connected account ID"
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional display name set in the dashboard"
        },
        "label": {
          "type": "string",
          "description": "Human label: displayName, else provider identity (email/username/shop), else toolkit name. Never a UUID."
        },
        "eUID": {
          "type": "string",
          "description": "External User ID (eUID)"
        },
        "status": {
          "enum": [
            "INITIALIZING",
            "INITIATED",
            "ACTIVE",
            "FAILED",
            "EXPIRED",
            "INACTIVE"
          ],
          "type": "string",
          "description": "Account status"
        },
        "createdAt": {
          "type": "string",
          "description": "Creation timestamp"
        },
        "updatedAt": {
          "type": "string",
          "description": "Last update timestamp"
        },
        "state": {
          "type": "object",
          "properties": {
            "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"
            },
            "val": {
              "type": "object",
              "description": "State value - complex object with different structures based on auth scheme",
              "additionalProperties": true
            }
          },
          "required": [
            "authScheme",
            "val"
          ]
        },
        "statusReason": {
          "type": "string",
          "description": "Status reason"
        },
        "isDisabled": {
          "type": "boolean",
          "description": "Whether the account is disabled"
        },
        "testRequestEndpoint": {
          "type": "string",
          "description": "Test request endpoint"
        },
        "deprecated": {
          "type": "object",
          "properties": {
            "labels": {
              "description": "Labels associated with the connected account",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "uuid": {
              "type": "string",
              "description": "UUID of the connected account"
            }
          },
          "required": [
            "labels",
            "uuid"
          ]
        },
        "data": {
          "type": [
            "object",
            "null"
          ],
          "description": "Provider-specific payload (e.g. Composio connected account `data`)",
          "additionalProperties": true
        },
        "params": {
          "type": [
            "object",
            "null"
          ],
          "description": "Connection parameters (e.g. Composio `params`)",
          "additionalProperties": true
        }
      },
      "required": [
        "toolkit",
        "authConfig",
        "id",
        "label",
        "eUID",
        "status",
        "createdAt",
        "updatedAt",
        "state",
        "isDisabled",
        "deprecated"
      ]
    }
  },
  "required": [
    "success",
    "message",
    "data"
  ]
}