{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarafintech/json-schema/clarafintech-extracted-document-page-v3-schema.json",
  "title": "ExtractedDocumentPageV3",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarafintech-extracted-documents-api-openapi.yml#/components/schemas/ExtractedDocumentPageV3",
  "type": "object",
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExtractedDocumentV3"
      }
    },
    "totalElements": {
      "type": "integer"
    },
    "totalPages": {
      "type": "integer"
    },
    "size": {
      "type": "integer"
    },
    "number": {
      "type": "integer"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "DocumentValidationStatus": {
      "type": "string",
      "enum": [
        "VALIDATED_BY_CLARA",
        "VALIDATED_BY_USER",
        "NOT_VERIFIED"
      ]
    },
    "ExtractedDocumentType": {
      "type": "string",
      "enum": [
        "MEXICAN_FISCAL_INVOICE",
        "INVOICE",
        "RECEIPT",
        "OTHER"
      ]
    },
    "ExtractedDocumentV3": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid"
        },
        "type": {
          "$ref": "#/$defs/ExtractedDocumentType"
        },
        "userUuid": {
          "type": "string",
          "format": "uuid"
        },
        "data": {
          "type": "object",
          "additionalProperties": true
        },
        "fileValidation": {
          "type": "object",
          "properties": {
            "status": {
              "$ref": "#/$defs/DocumentValidationStatus"
            },
            "date": {
              "type": "string",
              "format": "date-time"
            },
            "user": {
              "type": "string"
            },
            "userUuid": {
              "type": "string",
              "format": "uuid"
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  }
}