@final-commerce/common 2.8.0 → 2.8.1-online.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -190,7 +190,8 @@ declare enum Platform {
190
190
  declare enum OrderPlatform {
191
191
  POS = "in-store",
192
192
  WOO_COMMERCE = "woo-commerce",
193
- PUBLIC_API = "public-api"
193
+ PUBLIC_API = "public-api",
194
+ ONLINE_STORE = "online-store"
194
195
  }
195
196
  declare enum CustomerPlatform {
196
197
  POS = "in-store",
@@ -443,6 +444,43 @@ declare enum ResourceAvailabilityState {
443
444
  NO_HOURS_IN_RANGE = "noHoursInRange"
444
445
  }
445
446
 
447
+ declare enum ShippingZoneKind {
448
+ COUNTRY = "country",
449
+ PROVINCE = "province",
450
+ CITY = "city",
451
+ EVERYWHERE = "everywhere"
452
+ }
453
+ declare enum ShippingOptionType {
454
+ SHIP = "ship",
455
+ PICKUP = "pickup"
456
+ }
457
+ declare enum ShippingRateType {
458
+ FLAT = "flat"
459
+ }
460
+ declare enum ShippingChannel {
461
+ WEB = "web",
462
+ POS = "pos"
463
+ }
464
+ declare enum ShippingNoOptionReason {
465
+ INCOMPLETE = "INCOMPLETE",
466
+ ADDRESS_MISMATCH = "ADDRESS_MISMATCH",
467
+ NO_COVERAGE = "NO_COVERAGE",
468
+ BLOCKED = "BLOCKED",
469
+ NO_OPTION = "NO_OPTION"
470
+ }
471
+ declare enum ShippingZoneError {
472
+ NO_PLACES = "NO_PLACES",
473
+ INVALID_PLACE = "INVALID_PLACE",
474
+ DUPLICATE_PLACE = "DUPLICATE_PLACE",
475
+ NO_WEBSITE_OPTION = "NO_WEBSITE_OPTION",
476
+ INVALID_PRICE = "INVALID_PRICE",
477
+ INVALID_DAYS = "INVALID_DAYS",
478
+ INVALID_TIERS = "INVALID_TIERS",
479
+ NO_CHANNEL = "NO_CHANNEL",
480
+ PICKUP_WITHOUT_STORE = "PICKUP_WITHOUT_STORE",
481
+ MISSING_NAME = "MISSING_NAME"
482
+ }
483
+
446
484
  interface CurrencyConfig {
447
485
  minorUnits: number;
448
486
  symbol: string;
@@ -1659,6 +1697,112 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1659
1697
  };
1660
1698
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1661
1699
 
1700
+ interface ShippingPlace {
1701
+ country: string;
1702
+ province?: string | null;
1703
+ city?: string | null;
1704
+ }
1705
+ interface ShippingPriceTier {
1706
+ from: number;
1707
+ price: number;
1708
+ }
1709
+ interface ShippingOptionRule {
1710
+ id: string;
1711
+ type: ShippingOptionType | `${ShippingOptionType}`;
1712
+ rate?: ShippingRateType | `${ShippingRateType}`;
1713
+ name?: string | null;
1714
+ price: number;
1715
+ priceByTotal?: ShippingPriceTier[] | null;
1716
+ freeOver?: number | null;
1717
+ minDays?: number | null;
1718
+ maxDays?: number | null;
1719
+ channels: (ShippingChannel | `${ShippingChannel}`)[];
1720
+ outletId?: string | null;
1721
+ }
1722
+ interface ShippingZoneRule {
1723
+ id: string;
1724
+ kind: ShippingZoneKind | `${ShippingZoneKind}`;
1725
+ places: ShippingPlace[];
1726
+ ships: boolean;
1727
+ message?: string | null;
1728
+ options: ShippingOptionRule[];
1729
+ }
1730
+ interface AddressLike {
1731
+ country?: string | null;
1732
+ state?: string | null;
1733
+ province?: string | null;
1734
+ city?: string | null;
1735
+ postCode?: string | null;
1736
+ postalCode?: string | null;
1737
+ zip?: string | null;
1738
+ }
1739
+ interface NormalizedAddress {
1740
+ country?: string;
1741
+ province?: string;
1742
+ cityKey?: string;
1743
+ postCode?: string;
1744
+ }
1745
+ interface ShippingQuoteOption {
1746
+ optionId: string;
1747
+ zoneId: string;
1748
+ type: ShippingOptionType | `${ShippingOptionType}`;
1749
+ name: string | null;
1750
+ amount: number;
1751
+ amountToFree: number | null;
1752
+ minDays: number | null;
1753
+ maxDays: number | null;
1754
+ outletId: string | null;
1755
+ }
1756
+ interface ShippingResolution {
1757
+ zoneId: string | null;
1758
+ options: ShippingQuoteOption[];
1759
+ reason: ShippingNoOptionReason | null;
1760
+ message: string | null;
1761
+ shipsToCountries: string[];
1762
+ }
1763
+ interface ResolveShippingInput {
1764
+ zones: ShippingZoneRule[];
1765
+ address: AddressLike | null | undefined;
1766
+ itemsTotal: number;
1767
+ channel: ShippingChannel | `${ShippingChannel}`;
1768
+ }
1769
+
1770
+ declare function normalizeCountry(value: string | null | undefined): string | undefined;
1771
+ interface CountryOption {
1772
+ code: string;
1773
+ name: string;
1774
+ }
1775
+ declare function listCountries(locale?: string): CountryOption[];
1776
+
1777
+ interface Province {
1778
+ code: string;
1779
+ name: string;
1780
+ nameFr: string;
1781
+ postalLetters: string[];
1782
+ aliases?: string[];
1783
+ }
1784
+ declare const CANADA_PROVINCES: readonly Province[];
1785
+ declare function normalizeProvince(country: string | undefined, value: string | null | undefined): string | undefined;
1786
+ declare function listProvinces(country: string): readonly Province[];
1787
+ declare function provincesForPostCode(country: string | undefined, postCode: string | undefined): string[];
1788
+
1789
+ declare const EVERYWHERE_KEY = "*";
1790
+ declare function normalizeCityKey(value: string | null | undefined): string | undefined;
1791
+ declare function normalizePostCode(value: string | null | undefined): string | undefined;
1792
+ declare function normalizeAddress(address: AddressLike | null | undefined): NormalizedAddress;
1793
+ declare function postCodeMatchesProvince(address: NormalizedAddress): boolean;
1794
+ declare function placeKey(place: ShippingPlace): string | undefined;
1795
+ declare function addressPlaceKeys(address: NormalizedAddress): string[];
1796
+
1797
+ declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
1798
+ declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
1799
+
1800
+ interface ShippingZoneProblem {
1801
+ code: ShippingZoneError;
1802
+ optionId?: string;
1803
+ }
1804
+ declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1805
+
1662
1806
  interface CurrencyRate {
1663
1807
  rate: number;
1664
1808
  country: string;
@@ -1670,6 +1814,25 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1670
1814
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1671
1815
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1672
1816
 
1817
+ declare enum ProcessorType {
1818
+ FINAL_PAY = "Terminal",
1819
+ TAP_TO_PAY = "TapToPay",
1820
+ MOTO = "Moto",
1821
+ CLOUD = "Cloud",
1822
+ BLUETOOTH = "Bluetooth",
1823
+ CASH = "Cash",
1824
+ CUSTOM_PAY = "CustomPay",
1825
+ VENDARA = "Vendara",
1826
+ REDEEM = "Redeem",
1827
+ INTEGRATION = "Integration",
1828
+ PAYMENT_LINK = "PaymentLink",
1829
+ ONLINE_PAYMENT = "OnlinePayment",
1830
+ EXTERNAL = "External"
1831
+ }
1832
+
1833
+ declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1834
+ type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1835
+
1673
1836
  declare const EXPENSE_PAYMENT_METHOD_PRESETS: readonly ["Cash", "Cheque", "Credit card", "Direct debit", "E-Transfer", "Wire transfer"];
1674
1837
  declare const EXPENSE_NAME_MAX_LENGTH = 40;
1675
1838
  declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
@@ -1708,4 +1871,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1708
1871
  }];
1709
1872
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1710
1873
 
1711
- export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, presentAt, removeFragment, resolveFamily, resolveModifiersForProduct, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, violatesFinancialInvariant, windowEndsAt, withinPresence };
1874
+ export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AddressLike, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CountryOption, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EVERYWHERE_KEY, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, type NormalizedAddress, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, type Province, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveShippingInput, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, ShippingChannel, ShippingNoOptionReason, type ShippingOptionRule, ShippingOptionType, type ShippingPlace, type ShippingPriceTier, type ShippingQuoteOption, ShippingRateType, type ShippingResolution, ShippingZoneError, ShippingZoneKind, type ShippingZoneProblem, type ShippingZoneRule, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, listCountries, listProvinces, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };
package/dist/index.d.ts CHANGED
@@ -190,7 +190,8 @@ declare enum Platform {
190
190
  declare enum OrderPlatform {
191
191
  POS = "in-store",
192
192
  WOO_COMMERCE = "woo-commerce",
193
- PUBLIC_API = "public-api"
193
+ PUBLIC_API = "public-api",
194
+ ONLINE_STORE = "online-store"
194
195
  }
195
196
  declare enum CustomerPlatform {
196
197
  POS = "in-store",
@@ -443,6 +444,43 @@ declare enum ResourceAvailabilityState {
443
444
  NO_HOURS_IN_RANGE = "noHoursInRange"
444
445
  }
445
446
 
447
+ declare enum ShippingZoneKind {
448
+ COUNTRY = "country",
449
+ PROVINCE = "province",
450
+ CITY = "city",
451
+ EVERYWHERE = "everywhere"
452
+ }
453
+ declare enum ShippingOptionType {
454
+ SHIP = "ship",
455
+ PICKUP = "pickup"
456
+ }
457
+ declare enum ShippingRateType {
458
+ FLAT = "flat"
459
+ }
460
+ declare enum ShippingChannel {
461
+ WEB = "web",
462
+ POS = "pos"
463
+ }
464
+ declare enum ShippingNoOptionReason {
465
+ INCOMPLETE = "INCOMPLETE",
466
+ ADDRESS_MISMATCH = "ADDRESS_MISMATCH",
467
+ NO_COVERAGE = "NO_COVERAGE",
468
+ BLOCKED = "BLOCKED",
469
+ NO_OPTION = "NO_OPTION"
470
+ }
471
+ declare enum ShippingZoneError {
472
+ NO_PLACES = "NO_PLACES",
473
+ INVALID_PLACE = "INVALID_PLACE",
474
+ DUPLICATE_PLACE = "DUPLICATE_PLACE",
475
+ NO_WEBSITE_OPTION = "NO_WEBSITE_OPTION",
476
+ INVALID_PRICE = "INVALID_PRICE",
477
+ INVALID_DAYS = "INVALID_DAYS",
478
+ INVALID_TIERS = "INVALID_TIERS",
479
+ NO_CHANNEL = "NO_CHANNEL",
480
+ PICKUP_WITHOUT_STORE = "PICKUP_WITHOUT_STORE",
481
+ MISSING_NAME = "MISSING_NAME"
482
+ }
483
+
446
484
  interface CurrencyConfig {
447
485
  minorUnits: number;
448
486
  symbol: string;
@@ -1659,6 +1697,112 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1659
1697
  };
1660
1698
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1661
1699
 
1700
+ interface ShippingPlace {
1701
+ country: string;
1702
+ province?: string | null;
1703
+ city?: string | null;
1704
+ }
1705
+ interface ShippingPriceTier {
1706
+ from: number;
1707
+ price: number;
1708
+ }
1709
+ interface ShippingOptionRule {
1710
+ id: string;
1711
+ type: ShippingOptionType | `${ShippingOptionType}`;
1712
+ rate?: ShippingRateType | `${ShippingRateType}`;
1713
+ name?: string | null;
1714
+ price: number;
1715
+ priceByTotal?: ShippingPriceTier[] | null;
1716
+ freeOver?: number | null;
1717
+ minDays?: number | null;
1718
+ maxDays?: number | null;
1719
+ channels: (ShippingChannel | `${ShippingChannel}`)[];
1720
+ outletId?: string | null;
1721
+ }
1722
+ interface ShippingZoneRule {
1723
+ id: string;
1724
+ kind: ShippingZoneKind | `${ShippingZoneKind}`;
1725
+ places: ShippingPlace[];
1726
+ ships: boolean;
1727
+ message?: string | null;
1728
+ options: ShippingOptionRule[];
1729
+ }
1730
+ interface AddressLike {
1731
+ country?: string | null;
1732
+ state?: string | null;
1733
+ province?: string | null;
1734
+ city?: string | null;
1735
+ postCode?: string | null;
1736
+ postalCode?: string | null;
1737
+ zip?: string | null;
1738
+ }
1739
+ interface NormalizedAddress {
1740
+ country?: string;
1741
+ province?: string;
1742
+ cityKey?: string;
1743
+ postCode?: string;
1744
+ }
1745
+ interface ShippingQuoteOption {
1746
+ optionId: string;
1747
+ zoneId: string;
1748
+ type: ShippingOptionType | `${ShippingOptionType}`;
1749
+ name: string | null;
1750
+ amount: number;
1751
+ amountToFree: number | null;
1752
+ minDays: number | null;
1753
+ maxDays: number | null;
1754
+ outletId: string | null;
1755
+ }
1756
+ interface ShippingResolution {
1757
+ zoneId: string | null;
1758
+ options: ShippingQuoteOption[];
1759
+ reason: ShippingNoOptionReason | null;
1760
+ message: string | null;
1761
+ shipsToCountries: string[];
1762
+ }
1763
+ interface ResolveShippingInput {
1764
+ zones: ShippingZoneRule[];
1765
+ address: AddressLike | null | undefined;
1766
+ itemsTotal: number;
1767
+ channel: ShippingChannel | `${ShippingChannel}`;
1768
+ }
1769
+
1770
+ declare function normalizeCountry(value: string | null | undefined): string | undefined;
1771
+ interface CountryOption {
1772
+ code: string;
1773
+ name: string;
1774
+ }
1775
+ declare function listCountries(locale?: string): CountryOption[];
1776
+
1777
+ interface Province {
1778
+ code: string;
1779
+ name: string;
1780
+ nameFr: string;
1781
+ postalLetters: string[];
1782
+ aliases?: string[];
1783
+ }
1784
+ declare const CANADA_PROVINCES: readonly Province[];
1785
+ declare function normalizeProvince(country: string | undefined, value: string | null | undefined): string | undefined;
1786
+ declare function listProvinces(country: string): readonly Province[];
1787
+ declare function provincesForPostCode(country: string | undefined, postCode: string | undefined): string[];
1788
+
1789
+ declare const EVERYWHERE_KEY = "*";
1790
+ declare function normalizeCityKey(value: string | null | undefined): string | undefined;
1791
+ declare function normalizePostCode(value: string | null | undefined): string | undefined;
1792
+ declare function normalizeAddress(address: AddressLike | null | undefined): NormalizedAddress;
1793
+ declare function postCodeMatchesProvince(address: NormalizedAddress): boolean;
1794
+ declare function placeKey(place: ShippingPlace): string | undefined;
1795
+ declare function addressPlaceKeys(address: NormalizedAddress): string[];
1796
+
1797
+ declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
1798
+ declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
1799
+
1800
+ interface ShippingZoneProblem {
1801
+ code: ShippingZoneError;
1802
+ optionId?: string;
1803
+ }
1804
+ declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1805
+
1662
1806
  interface CurrencyRate {
1663
1807
  rate: number;
1664
1808
  country: string;
@@ -1670,6 +1814,25 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1670
1814
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1671
1815
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1672
1816
 
1817
+ declare enum ProcessorType {
1818
+ FINAL_PAY = "Terminal",
1819
+ TAP_TO_PAY = "TapToPay",
1820
+ MOTO = "Moto",
1821
+ CLOUD = "Cloud",
1822
+ BLUETOOTH = "Bluetooth",
1823
+ CASH = "Cash",
1824
+ CUSTOM_PAY = "CustomPay",
1825
+ VENDARA = "Vendara",
1826
+ REDEEM = "Redeem",
1827
+ INTEGRATION = "Integration",
1828
+ PAYMENT_LINK = "PaymentLink",
1829
+ ONLINE_PAYMENT = "OnlinePayment",
1830
+ EXTERNAL = "External"
1831
+ }
1832
+
1833
+ declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1834
+ type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1835
+
1673
1836
  declare const EXPENSE_PAYMENT_METHOD_PRESETS: readonly ["Cash", "Cheque", "Credit card", "Direct debit", "E-Transfer", "Wire transfer"];
1674
1837
  declare const EXPENSE_NAME_MAX_LENGTH = 40;
1675
1838
  declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
@@ -1708,4 +1871,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1708
1871
  }];
1709
1872
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1710
1873
 
1711
- export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, presentAt, removeFragment, resolveFamily, resolveModifiersForProduct, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, violatesFinancialInvariant, windowEndsAt, withinPresence };
1874
+ export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AddressLike, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CountryOption, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EVERYWHERE_KEY, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, type NormalizedAddress, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, type Province, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveShippingInput, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, ShippingChannel, ShippingNoOptionReason, type ShippingOptionRule, ShippingOptionType, type ShippingPlace, type ShippingPriceTier, type ShippingQuoteOption, ShippingRateType, type ShippingResolution, ShippingZoneError, ShippingZoneKind, type ShippingZoneProblem, type ShippingZoneRule, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, listCountries, listProvinces, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };