- Remove validation wrapper functions from common/validation.ts (use Zod schemas directly) - Delete duplicate CheckoutItem/CheckoutTotals/CheckoutCart/OrderCreateResponse from orders/contract.ts - Delete empty orders/checkout.ts - Remove unused MIGRATION_STEPS/MIGRATION_TRANSFER_ITEMS UI constants from auth/forms.ts - Standardize checkout/contract.ts to not re-export schema types - Fix customer/providers/index.ts to not re-export contract types through providers barrel
24 lines
693 B
TypeScript
24 lines
693 B
TypeScript
/**
|
|
* Checkout Domain - Contract
|
|
*
|
|
* Business constants and helpers for the checkout flow.
|
|
*/
|
|
|
|
// Re-export ORDER_TYPE from orders domain for convenience
|
|
export { ORDER_TYPE, type OrderTypeValue } from "../orders/contract.js";
|
|
|
|
/**
|
|
* Checkout-specific order types (subset of ORDER_TYPE, excludes "Other")
|
|
* These are the types that can be ordered through checkout.
|
|
*/
|
|
export const CHECKOUT_ORDER_TYPE = {
|
|
INTERNET: "Internet",
|
|
SIM: "SIM",
|
|
VPN: "VPN",
|
|
} as const;
|
|
|
|
export type CheckoutOrderTypeValue = (typeof CHECKOUT_ORDER_TYPE)[keyof typeof CHECKOUT_ORDER_TYPE];
|
|
|
|
// Schema-derived types (OrderType, PriceBreakdownItem, CartItem)
|
|
// are exported from index.ts, not contract.ts.
|