{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://arr.local/schemas/arr-submit-processing-result-receipt-v1.json",
  "title": "arr_submit_processing_result receipt",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "contract_version",
    "status",
    "job_id",
    "attempt_no",
    "business_date",
    "daily_version_id",
    "version_no",
    "record_count"
  ],
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "arr-direct-ingestion-1"
    },
    "status": {
      "type": "string",
      "enum": ["committed", "already_committed"]
    },
    "job_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
    },
    "attempt_no": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9999
    },
    "business_date": {
      "type": "string",
      "format": "date"
    },
    "daily_version_id": {
      "type": "integer",
      "minimum": 1
    },
    "version_no": {
      "type": "integer",
      "minimum": 1
    },
    "record_count": {
      "type": "integer",
      "minimum": 0
    }
  }
}
