{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/leadmagic-io/json-schema/leadmagic-io-job-detail-response-schema.json",
  "title": "JobDetailResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/leadmagic-io-leadmagic-openapi-3-1-openapi.json#/components/schemas/JobDetailResponse",
  "allOf": [
    {
      "$ref": "#/$defs/JobSnapshot"
    },
    {
      "type": "object",
      "properties": {
        "links": {
          "type": "object",
          "properties": {
            "statusUrl": {
              "type": "string"
            },
            "streamUrl": {
              "type": "string"
            },
            "wsUrl": {
              "type": "string"
            },
            "resultsUrl": {
              "type": "string"
            },
            "rowsUrl": {
              "type": "string"
            },
            "errorsUrl": {
              "type": "string"
            },
            "eventsUrl": {
              "type": "string"
            },
            "eventsExportUrl": {
              "type": "string"
            },
            "logsUrl": {
              "type": "string"
            },
            "downloadUrl": {
              "type": "string"
            },
            "progressUrl": {
              "type": "string"
            },
            "token": {
              "type": "string"
            },
            "exp": {
              "type": "integer"
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "JobSnapshot": {
      "type": "object",
      "required": [
        "job_id",
        "status",
        "total_rows",
        "processed_items",
        "succeeded_items",
        "failed_items",
        "skipped_items",
        "created_at"
      ],
      "properties": {
        "job_id": {
          "type": "string",
          "format": "uuid"
        },
        "status": {
          "type": "string"
        },
        "products": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "submission_product": {
          "type": [
            "string",
            "null"
          ]
        },
        "submission_endpoint": {
          "type": [
            "string",
            "null"
          ]
        },
        "execution_mode": {
          "type": [
            "string",
            "null"
          ]
        },
        "total_rows": {
          "type": "integer"
        },
        "processed_items": {
          "type": "integer"
        },
        "succeeded_items": {
          "type": "integer"
        },
        "failed_items": {
          "type": "integer"
        },
        "skipped_items": {
          "type": "integer"
        },
        "total_credits_consumed": {
          "type": [
            "string",
            "null"
          ]
        },
        "total_duration_ms": {
          "type": [
            "integer",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "started_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "last_progress_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "file_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "callback_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "callback_event": {
          "type": [
            "string",
            "null"
          ]
        },
        "priority": {
          "type": [
            "integer",
            "null"
          ]
        },
        "output_transform": {
          "type": [
            "object",
            "null"
          ],
          "description": "Optional output transform applied to result rows."
        }
      }
    }
  }
}