{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cqnce-app/json-schema/cqnce-app-auth-request-schema.json",
  "title": "AuthRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cqnce-app-openapi.yml#/components/schemas/AuthRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "projectId": {
      "type": "string",
      "format": "uuid"
    },
    "payload": {
      "type": "object",
      "description": "Arbitrary payload submitted with the request"
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "attachments": {
      "type": [
        "array",
        "null"
      ],
      "description": "Optional list of attachments (images or documents) sent with the request",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name of the attachment"
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the attachment content"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Public URL to the attachment (mutually exclusive with data)"
          },
          "data": {
            "type": "string",
            "description": "Base64-encoded attachment content (mutually exclusive with url)"
          }
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "APPROVED",
        "REJECTED",
        "EXPIRED",
        "CANCELLED"
      ]
    },
    "routingMode": {
      "type": "string",
      "enum": [
        "PARALLEL",
        "SERIAL",
        "MAJORITY",
        "CHAIN"
      ]
    },
    "rejectReasonRequired": {
      "type": "boolean"
    },
    "rejectReasonOptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "defaultRejectReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "callbackUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "wsClientId": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "resolvedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}