{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Job",
  "title": "Job",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for the job.",
      "example": "abc123"
    },
    "mode": {
      "type": "string",
      "description": "The mode of the job.",
      "example": "example_value"
    },
    "type": {
      "type": "string",
      "description": "The type of the job.",
      "example": "example_value"
    },
    "status": {
      "type": "integer",
      "description": "The status code of the job. 0 = Active/Queued, 1 = Complete, 2 = Cancelled.",
      "example": 10
    },
    "progress": {
      "type": "integer",
      "description": "The progress of the job as a percentage.",
      "example": 10
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the job was created.",
      "example": "2026-01-15T10:30:00Z"
    },
    "startedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the job started running.",
      "example": "2026-01-15T10:30:00Z"
    },
    "endedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the job finished.",
      "example": "2026-01-15T10:30:00Z"
    },
    "finishCode": {
      "type": "integer",
      "description": "The completion code. 0 = success, 1 = error, 2 = cancelled.",
      "example": 10
    },
    "title": {
      "type": "string",
      "description": "A description of what the job is doing.",
      "example": "Example Title"
    },
    "subtitle": {
      "type": "string",
      "description": "Additional detail about the job.",
      "example": "example_value"
    },
    "statusNotes": {
      "type": "object",
      "properties": {
        "statusNote": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          }
        }
      },
      "example": "example_value"
    },
    "extractRefreshJob": {
      "type": "object",
      "properties": {
        "datasource": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "workbook": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        }
      },
      "example": "example_value"
    }
  }
}