{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle-transportation-management/json-schema/oracle-transportation-management-export-statuses-schema.json",
  "title": "exportStatuses",
  "description": "Extended standard status message with additional Data Replication status data.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-transportation-management-data-export-openapi.yml#/components/schemas/exportStatuses",
  "allOf": [
    {
      "$ref": "#/$defs/oraStatuses"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "description": "Specifies the full request status.",
          "type": "object",
          "properties": {
            "body": {
              "type": "object",
              "properties": {
                "requestID": {
                  "description": "Export Request ID",
                  "type": "string"
                },
                "submitDate": {
                  "description": "Date/Time at which the request was submitted.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/dateTimeType"
                    }
                  ]
                },
                "externalRef": {
                  "description": "External reference passed in request message. Can be used to correlate the request.",
                  "type": "string"
                },
                "tables": {
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/exportStatusItemType"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "dateTimeType": {
      "properties": {
        "value": {
          "description": "Date in ISO 8601 format",
          "type": "string",
          "format": "date-time"
        },
        "timezone": {
          "description": "Timezone in Olson database format",
          "type": "string"
        }
      }
    },
    "exportStatusItemType": {
      "description": "Specifies the status of an individual request item.",
      "properties": {
        "itemID": {
          "description": "The unique request item ID within this request.",
          "type": "string"
        },
        "itemName": {
          "description": "Name of table providing the content for this item.",
          "type": "string"
        },
        "externalRef": {
          "description": "External reference passed in request item. Can be used to correlate the request item.",
          "type": "string"
        },
        "progress": {
          "$ref": "#/$defs/progressType"
        },
        "totalResults": {
          "description": "The total number of records matching the filter criteria for this item.",
          "type": "string"
        },
        "offset": {
          "description": "Specifies the offset within a result set from which to start replicating content. Defaults to 0.",
          "type": "integer",
          "format": "int32"
        },
        "partSize": {
          "description": "Specifies any limit applied to the number of records to be included within any part for this item.",
          "type": "integer",
          "format": "int32"
        },
        "totalRecordCount": {
          "description": "The total number of records in all parts for this item..",
          "type": "string"
        },
        "parts": {
          "description": "Information for each part within the item.",
          "properties": {
            "count": {
              "description": "Total number of parts produced (so far if still in progress) for the item.",
              "type": "integer",
              "format": "int32"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/partType"
              }
            }
          }
        }
      }
    },
    "links": {
      "properties": {
        "rel": {
          "type": "string"
        },
        "href": {
          "type": "string"
        }
      }
    },
    "oraStatuses": {
      "properties": {
        "progress": {
          "$ref": "#/$defs/progressType"
        },
        "startTime": {
          "description": "Time at which the transaction starts.",
          "allOf": [
            {
              "$ref": "#/$defs/dateTimeType"
            }
          ]
        },
        "completed": {
          "description": "Indicates the completion status of the message.",
          "type": "boolean"
        },
        "endTime": {
          "description": "Time at which the transaction ended.",
          "allOf": [
            {
              "$ref": "#/$defs/dateTimeType"
            }
          ]
        },
        "context": {
          "description": "Context information specific to the type of request.",
          "type": "string"
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/links"
          }
        }
      }
    },
    "partType": {
      "description": "Details for each part exported.",
      "properties": {
        "partName": {
          "description": "The unique file name for the part. See online API documentation for naming standard.",
          "type": "string"
        },
        "recordCount": {
          "description": "Total number of data rows contained in the part.",
          "type": "integer",
          "format": "int32"
        },
        "checksum": {
          "description": "A hash of the file contents using the algorithm specified in the request. Defaults to MD5.",
          "type": "string"
        },
        "errorStatus": {
          "description": "Error status from the external system if the transport of the exported file fails.",
          "type": "string"
        }
      }
    },
    "progressType": {
      "description": "Indicates the completion status.",
      "type": "string",
      "enum": [
        "processing",
        "pending",
        "failed",
        "interrupted",
        "succeeded",
        "cancelling",
        "cancelled",
        "unknown"
      ]
    }
  }
}