import { UIDLEcommerceRegionalPricing, UIDLEcommerceSettings } from '@teleporthq/teleport-types'; /** * The storefront half of shipping zones + tax jurisdictions, as the source * fragments `ecommerce-context-generator.ts` splices into `EcommerceProvider`. * * Kept out of the context generator because it is one self-contained concern — * load three tables, read where the checkout is sending the order, price the * basket for it — and every fragment is emitted ONLY for a store that has the * feature. A store without it gets none of this code and prices exactly as it * always did. * * The arithmetic itself is `RegionalPricing.generateRegionalPricingHelperCode`, * shared with the `cart-get-total` workflow handler: the amount the provider * shows and the amount the place-order workflow charges come from one rule. */ /** The three user-database tables the zones, rates and tax rows live in. */ export declare const REGIONAL_PRICING_TABLES: { zones: string; rates: string; taxRates: string; }; /** * The feature's baked settings when this store prices by destination, or null. * * Needs a datasource: the rows are read through `/api/data//select`, and a * project without one has nowhere to keep them. */ export declare const resolveRegionalPricing: (ecommerceSettings: UIDLEcommerceSettings, dataSourceId: string | null | undefined) => UIDLEcommerceRegionalPricing | null; /** * The store's own single-rate settings, which the quote falls back to wherever * no zone or tax row applies — the same values the provider prices a store * WITHOUT regions from. */ export interface RegionalPricingStoreDefaults { deliveryEnabled: boolean; storePickupEnabled: boolean; deliveryPrice: number; freeDeliveryEnabled: boolean; freeDeliveryThreshold: number; defaultTaxRate: number; defaultTaxIncluded: boolean; } /** * Module-scope declarations: the shared rule, the baked lookup tables, the * loaders the provider's effects call, and the pure projections from a quote to * what the pages bind. */ export declare const generateRegionalPricingModuleCode: (regional: UIDLEcommerceRegionalPricing, store: RegionalPricingStoreDefaults) => string; /** * Provider-body state and effects. Declares `regionalConfig`, * `checkoutDestination`, `selectedShippingRateId` and the memoised * `regionalQuote` the render reads. * * Emitted AFTER `settings` and `cartItems` exist, because the quote reads both. */ export declare const generateRegionalPricingProviderCode: () => string; //# sourceMappingURL=ecommerce-regional-pricing-code.d.ts.map