{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adadiamonds-com/json-schema/adadiamonds-com-job-schema.json",
  "title": "Job",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adadiamonds-com-openapi.json#/components/schemas/Job",
  "type": "object",
  "required": [
    "object",
    "id",
    "type",
    "status",
    "status_url",
    "created_at",
    "expires_at"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "job"
    },
    "id": {
      "type": "string",
      "description": "Opaque signed job id. Valid for 24 hours."
    },
    "type": {
      "type": "string",
      "const": "export"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "succeeded"
      ]
    },
    "progress": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "export": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "diamonds",
            "engagement-rings",
            "jewelry"
          ]
        },
        "format": {
          "type": "string",
          "enum": [
            "jsonl",
            "json"
          ]
        },
        "filters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "status_url": {
      "type": "string",
      "format": "uri"
    },
    "result_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Set once `status` is `succeeded`."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "note": {
      "type": "string"
    }
  }
}