feat: add daily manual price review workflow
This commit is contained in:
@@ -3,97 +3,69 @@
|
||||
"title": "ARR Opera daily processing result",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"version",
|
||||
"status",
|
||||
"business_date",
|
||||
"message",
|
||||
"metrics",
|
||||
"outputs",
|
||||
"errors"
|
||||
],
|
||||
"required": ["version", "status", "business_date", "message", "metrics", "outputs", "errors"],
|
||||
"properties": {
|
||||
"version": { "type": "string", "const": "3.0" },
|
||||
"status": { "type": "string", "enum": ["success", "failed"] },
|
||||
"version": { "type": "string", "const": "4.0" },
|
||||
"status": { "type": "string", "enum": ["success", "review_required", "failed"] },
|
||||
"business_date": { "type": ["string", "null"], "format": "date" },
|
||||
"message": { "type": "string" },
|
||||
"message": { "type": "string", "minLength": 1 },
|
||||
"metrics": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"source_rows",
|
||||
"removed_by_rate_code",
|
||||
"removed_as_duplicates",
|
||||
"output_rows",
|
||||
"channels"
|
||||
],
|
||||
"required": ["source_rows", "removed_by_rate_code", "removed_as_duplicates", "output_rows", "candidate_rows", "review_required_rows", "review_issue_count", "channels"],
|
||||
"properties": {
|
||||
"source_rows": { "type": "integer", "minimum": 0 },
|
||||
"removed_by_rate_code": { "type": "integer", "minimum": 0 },
|
||||
"removed_as_duplicates": { "type": "integer", "minimum": 0 },
|
||||
"output_rows": { "type": "integer", "minimum": 0 },
|
||||
"channels": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/channel" }
|
||||
}
|
||||
"candidate_rows": { "type": "integer", "minimum": 0 },
|
||||
"review_required_rows": { "type": "integer", "minimum": 0 },
|
||||
"review_issue_count": { "type": "integer", "minimum": 0 },
|
||||
"channels": { "type": "array", "items": { "$ref": "#/$defs/channel" } }
|
||||
}
|
||||
},
|
||||
"outputs": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"daily_report",
|
||||
"structured_result",
|
||||
"exception_report"
|
||||
],
|
||||
"required": ["daily_report", "structured_result", "exception_report"],
|
||||
"properties": {
|
||||
"daily_report": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[^/\\\\]+\\.xlsx$"
|
||||
},
|
||||
"structured_result": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[^/\\\\]+\\.json$"
|
||||
},
|
||||
"exception_report": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[^/\\\\]+\\.xlsx$"
|
||||
}
|
||||
"daily_report": { "type": ["string", "null"], "pattern": "^[^/\\\\]+\\.xlsx$" },
|
||||
"structured_result": { "type": ["string", "null"], "pattern": "^[^/\\\\]+\\.json$" },
|
||||
"exception_report": { "type": ["string", "null"], "pattern": "^[^/\\\\]+\\.xlsx$" }
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/error" }
|
||||
}
|
||||
"errors": { "type": "array", "items": { "$ref": "#/$defs/error" } }
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": { "status": { "const": "success" } },
|
||||
"required": ["status"]
|
||||
},
|
||||
"if": { "properties": { "status": { "const": "success" } }, "required": ["status"] },
|
||||
"then": {
|
||||
"properties": {
|
||||
"business_date": { "type": "string", "format": "date" },
|
||||
"outputs": {
|
||||
"properties": {
|
||||
"daily_report": { "type": "string" },
|
||||
"structured_result": { "type": "string" },
|
||||
"exception_report": { "type": "null" }
|
||||
}
|
||||
},
|
||||
"errors": { "maxItems": 0 }
|
||||
"errors": { "maxItems": 0 },
|
||||
"metrics": { "properties": { "candidate_rows": { "const": 0 }, "review_required_rows": { "const": 0 }, "review_issue_count": { "const": 0 } } },
|
||||
"outputs": { "properties": { "daily_report": { "type": "string" }, "structured_result": { "type": "string" }, "exception_report": { "type": "null" } } }
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "status": { "const": "review_required" } }, "required": ["status"] },
|
||||
"then": {
|
||||
"properties": {
|
||||
"outputs": {
|
||||
"properties": {
|
||||
"daily_report": { "type": "null" },
|
||||
"exception_report": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"errors": { "minItems": 1 }
|
||||
"business_date": { "type": "string", "format": "date" },
|
||||
"errors": { "minItems": 1 },
|
||||
"metrics": { "properties": { "output_rows": { "const": 0 }, "review_required_rows": { "minimum": 1 }, "review_issue_count": { "minimum": 1 }, "channels": { "maxItems": 0 } } },
|
||||
"outputs": { "properties": { "daily_report": { "type": "null" }, "structured_result": { "type": "string" }, "exception_report": { "type": "null" } } }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "status": { "const": "failed" } }, "required": ["status"] },
|
||||
"then": {
|
||||
"properties": {
|
||||
"errors": { "minItems": 1 },
|
||||
"metrics": { "properties": { "output_rows": { "const": 0 }, "candidate_rows": { "const": 0 }, "review_issue_count": { "const": 0 }, "channels": { "maxItems": 0 } } },
|
||||
"outputs": { "properties": { "daily_report": { "type": "null" }, "exception_report": { "type": "string" } } }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,24 +75,12 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["worksheet", "rows"],
|
||||
"properties": {
|
||||
"worksheet": { "type": "string", "minLength": 1 },
|
||||
"rows": { "type": "integer", "minimum": 0 }
|
||||
}
|
||||
"properties": { "worksheet": { "type": "string", "minLength": 1 }, "rows": { "type": "integer", "minimum": 0 } }
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"code",
|
||||
"stage",
|
||||
"source_location",
|
||||
"company_name",
|
||||
"rate_code",
|
||||
"effective_rate_amount",
|
||||
"confirmation_no",
|
||||
"message"
|
||||
],
|
||||
"required": ["code", "stage", "source_location", "company_name", "rate_code", "effective_rate_amount", "confirmation_no", "message"],
|
||||
"properties": {
|
||||
"code": { "type": "string", "minLength": 1 },
|
||||
"stage": { "type": "string", "minLength": 1 },
|
||||
|
||||
Reference in New Issue
Block a user