{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/storeradar-io/json-schema/storeradar-io-export-schema.json",
  "title": "Export",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/storeradar-io-openapi.json#/components/schemas/Export",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "completed",
        "failed",
        "no_rows",
        "entitlement_lapsed",
        "purged"
      ],
      "description": "Closed set. Branch on this, not on the HTTP status."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "row_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "truncated": {
      "type": "boolean",
      "description": "The scope hit the 2000000-row ceiling, so the file is complete-looking but short."
    },
    "file_expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Present while downloadable."
    },
    "download_url": {
      "type": "string",
      "description": "Presigned; present only when status is completed."
    }
  },
  "required": [
    "id",
    "status",
    "truncated"
  ]
}