- unify typed API errors across draft, pricing and publish flows - add stale draft and publish-state mutation guards - add publish readiness contract and guarded publish flow - add sellability reason codes to test seat preview - add pricing diagnostics and strengthen snapshot/publish lifecycle consistency
56 lines
1.1 KiB
Python
56 lines
1.1 KiB
Python
from pydantic import BaseModel
|
|
|
|
|
|
class PricingCategoryMutationResponse(BaseModel):
|
|
pricing_category_id: str
|
|
scheme_id: str
|
|
name: str
|
|
code: str
|
|
|
|
|
|
class PricingCategoryDeleteResponse(BaseModel):
|
|
deleted: bool
|
|
pricing_category_id: str
|
|
|
|
|
|
class PriceRuleMutationResponse(BaseModel):
|
|
price_rule_id: str
|
|
scheme_id: str
|
|
pricing_category_id: str
|
|
target_type: str
|
|
target_ref: str
|
|
amount: str
|
|
currency: str
|
|
|
|
|
|
class PriceRuleDeleteResponse(BaseModel):
|
|
deleted: bool
|
|
price_rule_id: str
|
|
|
|
|
|
class PricingRuleDiagnosticsItem(BaseModel):
|
|
price_rule_id: str
|
|
pricing_category_id: str
|
|
target_type: str
|
|
target_ref: str
|
|
amount: str
|
|
currency: str
|
|
matched_seats_count: int
|
|
matched_seat_ids: list[str]
|
|
orphan: bool
|
|
orphan_reason: str | None
|
|
|
|
|
|
class PricingRuleDiagnosticsSummary(BaseModel):
|
|
total_rules: int
|
|
orphan_rules_count: int
|
|
active_rules_count: int
|
|
matched_seats_total: int
|
|
|
|
|
|
class PricingRuleDiagnosticsResponse(BaseModel):
|
|
scheme_id: str
|
|
scheme_version_id: str
|
|
summary: PricingRuleDiagnosticsSummary
|
|
items: list[PricingRuleDiagnosticsItem]
|