feat(backend): add publish readiness contract and pricing diagnostics
add backend readiness contract for publish prechecks add pricing diagnostics to explain publish-blocking conditions make publish decisions more explicit and easier to debug for clients
This commit is contained in:
@@ -1,27 +1,13 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class PricingExplainMatchedRule(BaseModel):
|
||||
matched_rule_level: str
|
||||
matched_target_ref: str
|
||||
pricing_category_id: str
|
||||
amount: str
|
||||
currency: str
|
||||
|
||||
|
||||
class PricingExplainResponse(BaseModel):
|
||||
class PricingCoverageResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
seat_id: str | None
|
||||
element_id: str | None
|
||||
sector_id: str | None
|
||||
group_id: str | None
|
||||
row_label: str | None
|
||||
seat_number: str | None
|
||||
has_price: bool
|
||||
reason_code: str
|
||||
reason_message: str
|
||||
matched_rule: PricingExplainMatchedRule | None
|
||||
total_seats: int
|
||||
priced_seats: int
|
||||
unpriced_seats: int
|
||||
coverage_percent: float
|
||||
|
||||
|
||||
class UnpricedSeatItem(BaseModel):
|
||||
@@ -36,17 +22,31 @@ class UnpricedSeatItem(BaseModel):
|
||||
reason_message: str
|
||||
|
||||
|
||||
class UnpricedSeatsResponse(BaseModel):
|
||||
class UnpricedSeatListResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
total: int
|
||||
items: list[UnpricedSeatItem]
|
||||
|
||||
|
||||
class PricingCoverageSummaryResponse(BaseModel):
|
||||
class ExplainMatchedRule(BaseModel):
|
||||
matched_rule_level: str
|
||||
matched_target_ref: str
|
||||
pricing_category_id: str
|
||||
amount: str
|
||||
currency: str
|
||||
|
||||
|
||||
class ExplainSeatPriceResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
total_seats: int
|
||||
priced_seats: int
|
||||
unpriced_seats: int
|
||||
coverage_percent: float
|
||||
seat_id: str
|
||||
element_id: str | None
|
||||
sector_id: str | None
|
||||
group_id: str | None
|
||||
row_label: str | None
|
||||
seat_number: str | None
|
||||
has_price: bool
|
||||
reason_code: str
|
||||
reason_message: str
|
||||
matched_rule: ExplainMatchedRule | None
|
||||
|
||||
Reference in New Issue
Block a user