{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-email-result-schema.json",
  "title": "EmailResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-email-api-openapi.yml#/components/schemas/EmailResult",
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "expiresAt": {
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "purpose": {
          "enum": [
            "login",
            "recover"
          ],
          "type": "string"
        },
        "recoveryKey": {
          "type": "string"
        },
        "token": {
          "pattern": "^rgt_[a-f0-9]{64}$",
          "type": "string"
        }
      },
      "required": [
        "id",
        "token",
        "expiresAt",
        "purpose"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "emailVerified": {
          "type": "boolean"
        },
        "expiresAt": {
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "number": {
          "pattern": "^[1-9][0-9]{9}$",
          "type": "string"
        },
        "purpose": {
          "const": "signup",
          "type": "string"
        },
        "recoveryKey": {
          "type": "string"
        },
        "scopes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "token": {
          "pattern": "^rgt_[a-f0-9]{64}$",
          "type": "string"
        }
      },
      "required": [
        "id",
        "token",
        "expiresAt",
        "purpose",
        "number",
        "scopes"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "ok": {
          "const": true,
          "type": "boolean"
        },
        "purpose": {
          "const": "verify",
          "type": "string"
        }
      },
      "required": [
        "ok",
        "purpose"
      ],
      "type": "object"
    }
  ]
}