feat: prepare ARR for controlled public deployment
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"$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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://arr.local/schemas/arr-submit-processing-result-v1.json",
|
||||
"title": "arr_submit_processing_result input",
|
||||
"description": "One attempt-bound ARR direct result submission. ARR computes payload identity and never accepts a caller-supplied hash.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"submission_grant",
|
||||
"job_id",
|
||||
"attempt_no",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"submission_grant": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9_-]{32,128}$"
|
||||
},
|
||||
"job_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
||||
},
|
||||
"attempt_no": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 9999
|
||||
},
|
||||
"payload": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "../../arr-opera-daily-ingest/references/structured-result.schema.json"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"status": { "const": "success" },
|
||||
"activation_eligible": { "const": true },
|
||||
"business_date": { "type": "string", "format": "date" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
191
database/contracts/booking-row-parse-result.schema.json
Normal file
191
database/contracts/booking-row-parse-result.schema.json
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://arr.local/contracts/booking-row-parse-result.schema.json",
|
||||
"title": "ARR Booking Source Row Parse Result",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"result_schema_version",
|
||||
"status",
|
||||
"source_row",
|
||||
"processor_version",
|
||||
"rule_set_sha256",
|
||||
"group_code_raw",
|
||||
"group_code_key",
|
||||
"type_of_room_raw",
|
||||
"no_of_rooms",
|
||||
"room_items",
|
||||
"warnings",
|
||||
"errors"
|
||||
],
|
||||
"properties": {
|
||||
"result_schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"status": {
|
||||
"enum": ["accepted", "needs_review", "failed"]
|
||||
},
|
||||
"source_row": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["worksheet", "row_no", "sha256"],
|
||||
"properties": {
|
||||
"worksheet": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"row_no": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"sha256": {
|
||||
"$ref": "#/$defs/sha256"
|
||||
}
|
||||
}
|
||||
},
|
||||
"processor_version": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"rule_set_sha256": {
|
||||
"$ref": "#/$defs/sha256"
|
||||
},
|
||||
"group_code_raw": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"group_code_key": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"type_of_room_raw": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"no_of_rooms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"room_items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/roomItem"
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/message"
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"const": "accepted"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"room_items": {
|
||||
"minItems": 1
|
||||
},
|
||||
"errors": {
|
||||
"maxItems": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"const": "failed"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"errors": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"$defs": {
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{64}$"
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["code", "message"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"roomItem": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"item_no",
|
||||
"room_type_raw",
|
||||
"room_type_code",
|
||||
"quantity",
|
||||
"unit_price",
|
||||
"currency_code",
|
||||
"price_token_raw",
|
||||
"source_fragment"
|
||||
],
|
||||
"properties": {
|
||||
"item_no": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"room_type_raw": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"room_type_code": {
|
||||
"type": ["string", "null"],
|
||||
"minLength": 1
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"unit_price": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"currency_code": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[A-Z]{3}$"
|
||||
},
|
||||
"price_token_raw": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"source_fragment": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user