{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/astranexo-com/json-schema/astranexo-com-archive-export-schema.json",
  "title": "ArchiveExport",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/astranexo-com-archivo-api-openapi.yml#/components/schemas/ArchiveExport",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "environment": {
      "$ref": "#/$defs/Environment"
    },
    "from": {
      "type": "string",
      "format": "date"
    },
    "to": {
      "type": "string",
      "format": "date"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "ready",
        "failed",
        "expired"
      ]
    },
    "documents": {
      "type": [
        "integer",
        "null"
      ]
    },
    "size_bytes": {
      "type": [
        "integer",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "Environment": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ],
      "description": "Ambiente de Hacienda. Con claves de Aster lo decide la clave."
    }
  }
}