{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recal/json-schema/recal-auth-connection-schema.json",
  "title": "AuthConnection",
  "description": "OAuth Connection",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recal-organization-api-openapi.yml#/components/schemas/AuthConnection",
  "type": "object",
  "properties": {
    "alive": {
      "type": "boolean"
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[\\w%+.-]+@[\\d.A-Za-z-]+\\.[A-Za-z]{2,}$",
          "format": "email"
        },
        {
          "type": "null"
        }
      ]
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))(T((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([,.]\\d+(?!:))?)?(\\17[0-5]\\d([,.]\\d+)?)?([Zz]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
        },
        {
          "type": "null"
        }
      ],
      "format": "date-time"
    },
    "provider": {
      "enum": [
        "google",
        "microsoft"
      ]
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "type": {
      "type": "string"
    },
    "accessToken": {},
    "refreshToken": {}
  },
  "required": [
    "alive",
    "email",
    "expiresAt",
    "provider",
    "scope",
    "type"
  ]
}