{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/sso_connections.schema.json",
  "title": "tables/sso_connections.json",
  "description": "The rows of the table sso_connections that belong to the workspace, one object per row, keyed by the database's column names.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "organization_id": {
        "type": "string",
        "format": "uuid"
      },
      "provider": {
        "type": "string",
        "enum": [
          "okta",
          "entra",
          "google"
        ]
      },
      "issuer": {
        "type": "string"
      },
      "client_id": {
        "type": "string"
      },
      "managed": {
        "type": "boolean"
      },
      "enabled": {
        "type": "boolean"
      },
      "trust_provider_mfa": {
        "type": "boolean"
      },
      "provision_members": {
        "type": "boolean"
      },
      "provision_role": {
        "type": "string"
      },
      "provision_domains": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "read_directory": {
        "type": "boolean"
      },
      "directory_synced_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "directory_result": {
        "type": [
          "string",
          "null"
        ]
      },
      "nightly_read_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "nightly_read_since": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "nightly_paused_reason": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "person_removed",
          "access_lost",
          "integrations_off",
          null
        ]
      },
      "created_by": {
        "type": "string",
        "format": "uuid"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "revision": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "organization_id",
      "provider",
      "issuer",
      "client_id",
      "managed",
      "enabled",
      "trust_provider_mfa",
      "provision_members",
      "provision_role",
      "provision_domains",
      "read_directory",
      "directory_synced_at",
      "directory_result",
      "nightly_read_by",
      "nightly_read_since",
      "nightly_paused_reason",
      "created_by",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
