{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/advisorppc-com/json-schema/advisorppc-com-connector-out-schema.json",
  "title": "ConnectorOut",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/advisorppc-com-openapi.json#/components/schemas/ConnectorOut",
  "properties": {
    "slug": {
      "type": "string",
      "title": "Slug"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "category": {
      "type": "string",
      "title": "Category"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "mode": {
      "type": "string",
      "title": "Mode",
      "default": "api_key"
    },
    "granted_scopes": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Granted Scopes"
    },
    "connected_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Connected At"
    },
    "account_email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Email"
    },
    "runtime_state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Runtime State"
    },
    "runtime_detail": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Runtime Detail"
    },
    "bridge_auto_connect": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Bridge Auto Connect"
    },
    "activation_state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Activation State"
    },
    "activation_detail": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Activation Detail"
    },
    "identity_inventory_state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Identity Inventory State"
    },
    "selected_scope_state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Selected Scope State"
    },
    "account_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Account Count"
    },
    "accounts": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ConnectorAccountOut"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Accounts"
    },
    "connections": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ConnectorConnectionOut"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Connections"
    },
    "can_select_connection": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Can Select Connection"
    },
    "connect_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Connect Url"
    },
    "requested_scopes": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requested Scopes"
    },
    "review_available": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Review Available"
    },
    "can_disconnect": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Can Disconnect"
    }
  },
  "type": "object",
  "required": [
    "slug",
    "name",
    "category",
    "status"
  ],
  "$defs": {
    "ConnectorAccountOut": {
      "properties": {
        "account_id": {
          "type": "string",
          "title": "Account Id"
        },
        "account_name": {
          "type": "string",
          "title": "Account Name"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Currency"
        },
        "is_managed": {
          "type": "boolean",
          "title": "Is Managed",
          "default": false
        },
        "is_default": {
          "type": "boolean",
          "title": "Is Default",
          "default": false
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status"
        },
        "is_manager": {
          "type": "boolean",
          "title": "Is Manager",
          "default": false
        },
        "parent_manager_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Parent Manager Id"
        }
      },
      "type": "object",
      "required": [
        "account_id",
        "account_name"
      ],
      "title": "ConnectorAccountOut"
    },
    "ConnectorConnectionOut": {
      "properties": {
        "service": {
          "type": "string",
          "title": "Service"
        },
        "credential_id": {
          "type": "integer",
          "title": "Credential Id"
        },
        "account_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Account Email"
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active"
        },
        "connected_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Connected At"
        }
      },
      "type": "object",
      "required": [
        "service",
        "credential_id",
        "is_active"
      ],
      "title": "ConnectorConnectionOut"
    }
  }
}