{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ExcelStatus",
  "title": "Excel status",
  "type": "object",
  "properties": {
    "lastGenerated": {
      "$ref": "#/components/schemas/DateTime",
      "description": "The date and time of when the generation of the most recent report was initiated."
    },
    "inProgress": {
      "type": "boolean",
      "description": "When true, the request was successful and the report is being generated. If false, the request was unsuccessful and the report is not being generated."
    },
    "queued": {
      "type": "string",
      "description": "The date and time of when a successful request was queued for the most recent report."
    },
    "success": {
      "type": "boolean",
      "description": "True if the requested report was successfully queued and false if the requested report was not able to be queued."
    },
    "errorMessage": {
      "type": "string",
      "description": "Error details in case the report generation request was unsuccessful."
    },
    "lastInvocationId": {
      "type": "string",
      "description": "A unique ID generated for this request."
    },
    "reportType": {
      "$ref": "#/components/schemas/ExcelStatus/definitions/excelReportTypes"
    },
    "fileSize": {
      "type": "integer",
      "nullable": true,
      "description": "The file size in Bytes is populated upon successful generation of the report."
    }
  },
  "definitions": {
    "excelReportTypes": {
      "type": "string",
      "enum": [
        "audit",
        "enhancedFinancials",
        "enhancedInvoices",
        "enhancedCashFlow"
      ],
      "description": "The type of the report requested in the query string."
    }
  },
  "examples": [
    {
      "lastGenerated": "2023-01-25T22:36:05.125Z",
      "inProgress": true,
      "queued": "2023-01-25T22:36:05.125Z",
      "success": true,
      "errorMessage": "string",
      "lastInvocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "reportType": "string",
      "fileSize": 0
    }
  ]
}