/** Booking pricing V1 schemas — lines, taxes, policy evidence, schedules. */ import { z } from "zod"; export declare const pricingLineV1: z.ZodObject<{ kind: z.ZodEnum<{ base: "base"; addon: "addon"; accommodation: "accommodation"; supplement: "supplement"; discount: "discount"; fee: "fee"; }>; label: z.ZodString; quantity: z.ZodOptional; unitAmount: z.ZodNumber; totalAmount: z.ZodNumber; taxIncluded: z.ZodOptional; pricingBasis: z.ZodOptional>; componentId: z.ZodOptional; optionId: z.ZodOptional; optionUnitId: z.ZodOptional; authority: z.ZodOptional>; }, z.core.$strip>; export declare const pricingTaxV1: z.ZodObject<{ code: z.ZodString; label: z.ZodString; rate: z.ZodNumber; amount: z.ZodNumber; base: z.ZodNumber; includedInPrice: z.ZodOptional; scope: z.ZodOptional>; componentId: z.ZodOptional; }, z.core.$strip>; export declare const bookingPolicyEvidenceV1: z.ZodObject<{ cancellation: z.ZodOptional; bookingTerms: z.ZodOptional; }, z.core.$strip>; /** * One promotional offer applied to a quote. Structurally identical to the * `AppliedOffer` interface in `./promotions-contract.ts` — that file declares * the evaluator seam, this schema is the wire form carried on the quote and * frozen onto `PricingBasis.appliedOffers` at commit. */ export declare const pricingAppliedOfferV1: z.ZodObject<{ offerId: z.ZodString; offerName: z.ZodString; discountAppliedCents: z.ZodNumber; discountedPriceCents: z.ZodNumber; currency: z.ZodString; discountKind: z.ZodEnum<{ percentage: "percentage"; fixed_amount: "fixed_amount"; }>; discountPercent: z.ZodNullable; discountAmountCents: z.ZodNullable; appliedCode: z.ZodNullable; stackable: z.ZodBoolean; }, z.core.$strip>; export type PricingAppliedOfferV1 = z.infer; /** * Verdict on a promotion code the caller supplied. Present only when a code * was sent, and carried on an **available** quote: a rejected code does not * make the target unbookable, it just does not discount it. Without this a * client has no way to tell "your code is wrong" from "this departure cannot * be priced", which is exactly the conflation voyant#4615 reported. */ export declare const promotionCodeStatusV1: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"code_valid">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_found">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_expired">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_yet_valid">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_applicable">; reason: z.ZodEnum<{ currency: "currency"; scope: "scope"; min_pax: "min_pax"; eligibility: "eligibility"; }>; }, z.core.$strip>], "kind">; export type PromotionCodeStatusV1 = z.infer; export declare const pricingBreakdownV1: z.ZodObject<{ currency: z.ZodString; lines: z.ZodArray; label: z.ZodString; quantity: z.ZodOptional; unitAmount: z.ZodNumber; totalAmount: z.ZodNumber; taxIncluded: z.ZodOptional; pricingBasis: z.ZodOptional>; componentId: z.ZodOptional; optionId: z.ZodOptional; optionUnitId: z.ZodOptional; authority: z.ZodOptional>; }, z.core.$strip>>; taxes: z.ZodArray; scope: z.ZodOptional>; componentId: z.ZodOptional; }, z.core.$strip>>; subtotal: z.ZodNumber; taxTotal: z.ZodNumber; total: z.ZodNumber; appliedOffers: z.ZodOptional; discountPercent: z.ZodNullable; discountAmountCents: z.ZodNullable; appliedCode: z.ZodNullable; stackable: z.ZodBoolean; }, z.core.$strip>>>; promotionCodeStatus: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_found">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_expired">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_yet_valid">; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"code_not_applicable">; reason: z.ZodEnum<{ currency: "currency"; scope: "scope"; min_pax: "min_pax"; eligibility: "eligibility"; }>; }, z.core.$strip>], "kind">>; policyEvidence: z.ZodOptional; bookingTerms: z.ZodOptional; }, z.core.$strip>>; componentPolicies: z.ZodOptional; bookingTerms: z.ZodOptional; componentId: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export type PricingBreakdownV1 = z.infer; /** * Policy evidence reduced to what identifies the policy. * * Everything that decides whether a quote still stands survives: * `policyId`, `policyVersionId`, `version` and the `rules` themselves. Only the * capture instant is dropped, and only inside the evidence subtree. * * The recursion is deliberate. `cancellation` and `bookingTerms` are typed * `unknown` because a supplier's terms are its own shape, so there is no field * list to walk; the statable invariant — no capture instant anywhere inside * policy evidence contributes to identity — is the one that survives the shape * changing underneath it. */ export declare function policyEvidenceIdentity(evidence: T): T; /** * The pricing, reduced to what a price fingerprint is allowed to depend on. * * A price fingerprint answers one question: has this quote's price moved since * we issued it. Commit re-composes the quote and compares, so anything in the * input that changes on every compose makes that comparison unconditionally * false — the quote is declared superseded, the hold is released, and no * booking can ever be made (voyant#4689). * * `policyEvidence.cancellation.capturedAt` was exactly that. Everything else * here is left alone: money, taxes, applied offers and the policy's own * identity all belong in the fingerprint, because a genuine change to any of * them genuinely does supersede the quote. */ export declare function priceFingerprintInput(pricing: T): T; export declare const bookingPaymentScheduleV1: z.ZodObject<{ scheduleType: z.ZodEnum<{ other: "other"; deposit: "deposit"; installment: "installment"; balance: "balance"; hold: "hold"; }>; status: z.ZodEnum<{ pending: "pending"; cancelled: "cancelled"; due: "due"; paid: "paid"; waived: "waived"; expired: "expired"; }>; dueDate: z.ZodString; currency: z.ZodString; amountCents: z.ZodNumber; notes: z.ZodOptional>; }, z.core.$strip>; /** * One row of the collection plan a shopper is shown before they commit. * * `scheduleType` mirrors finance's `PaymentScheduleEntryType`, which is a * narrower set than {@link bookingPaymentScheduleV1}'s: this describes what * `computePaymentSchedule` emits, not what a persisted schedule row may later * become. `"full"` is the collapse case — a policy with no deposit, a departure * too close for one, or a split that would leave a zero-cent partner. * * Nothing pins the mirror declaratively; the assignment in * `sessions-payment-production.ts` does it structurally, and a fourth entry * type in finance fails to compile there. */ export declare const bookingPaymentPlanEntryV1: z.ZodObject<{ scheduleType: z.ZodEnum<{ deposit: "deposit"; balance: "balance"; full: "full"; }>; amountCents: z.ZodNumber; currency: z.ZodString; dueDate: z.ZodString; }, z.core.$strip>; /** * What the shopper will actually be charged, and when — published on the Quote * so a storefront can state the terms at the moment the shopper agrees to them. * * A shopper under a deposit policy used to review a total, accept a contract * naming that total, and then be charged something else, because nothing * carried the plan until Commit answered `payment_required` — after the review * step and after contract acceptance (voyant#4741). * * This is a pure projection over the Quote's total and the selected departure: * `resolveEffectivePaymentPolicy` then `computePaymentSchedule`, the same two * calls Commit makes. It is computed, never stored, so it cannot drift from the * Quote it is published on — and it is outside `pricing`, so it stays out of * the price fingerprint that supersession compares. * * `dueNowCents` is `entries[0].amountCents`, named separately because it is the * one number the pay button has to agree with. * * `payInFullCents` is the second button. A deposit is an option the operator * extends, not an obligation, so a shopper who would rather settle the whole * booking now may — by sending `payInFull` on Commit (voyant#4742). Publishing * the amount is what makes that a choice rather than a guess: a storefront can * render "Pay deposit €189.00" and "Pay in full €378.00" as two real options. * Null when there is nothing to choose, which today means the plan already * collects the whole total now, and is the seam an operator who has a reason * to refuse full prepayment would answer through. */ export declare const bookingPaymentPlanV1: z.ZodObject<{ policySource: z.ZodEnum<{ supplier: "supplier"; category: "category"; booking: "booking"; proposal: "proposal"; listing: "listing"; operator_default: "operator_default"; }>; currency: z.ZodString; totalCents: z.ZodNumber; dueNowCents: z.ZodNumber; payInFullCents: z.ZodNullable; entries: z.ZodArray; amountCents: z.ZodNumber; currency: z.ZodString; dueDate: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type BookingPaymentPlanEntryV1 = z.infer; export type BookingPaymentPlanV1 = z.infer;