{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.clari.com/schemas/export-job",
  "title": "ClariExportJob",
  "description": "Represents the status and metadata of an asynchronous export job in the Clari API.",
  "type": "object",
  "properties": {
    "jobId": {
      "type": "string",
      "description": "Unique identifier for the export job.",
      "example": "6073683781a6da229df71e00"
    },
    "userId": {
      "type": "integer",
      "description": "Clari user ID of the user that initiated the job.",
      "example": 1
    },
    "orgId": {
      "type": "integer",
      "description": "Clari org ID of the organization that requested the export.",
      "example": 100
    },
    "status": {
      "type": "string",
      "description": "Current state of the export job.",
      "enum": ["QUEUED", "RUNNING", "DONE", "FAILED", "CANCELLED"]
    },
    "type": {
      "type": "string",
      "description": "The category of export job (e.g., forecast, activity, audit).",
      "example": "forecast"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the job was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the job was last updated."
    }
  },
  "required": ["jobId", "status"]
}
