@final-commerce/common 2.10.0 → 2.11.0

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",
@@ -452,6 +453,43 @@ declare enum ResourceAvailabilityState {
452
453
  NO_HOURS_IN_RANGE = "noHoursInRange"
453
454
  }
454
455
 
456
+ declare enum ShippingZoneKind {
457
+ COUNTRY = "country",
458
+ PROVINCE = "province",
459
+ CITY = "city",
460
+ EVERYWHERE = "everywhere"
461
+ }
462
+ declare enum ShippingOptionType {
463
+ SHIP = "ship",
464
+ PICKUP = "pickup"
465
+ }
466
+ declare enum ShippingRateType {
467
+ FLAT = "flat"
468
+ }
469
+ declare enum ShippingChannel {
470
+ WEB = "web",
471
+ POS = "pos"
472
+ }
473
+ declare enum ShippingNoOptionReason {
474
+ INCOMPLETE = "INCOMPLETE",
475
+ ADDRESS_MISMATCH = "ADDRESS_MISMATCH",
476
+ NO_COVERAGE = "NO_COVERAGE",
477
+ BLOCKED = "BLOCKED",
478
+ NO_OPTION = "NO_OPTION"
479
+ }
480
+ declare enum ShippingZoneError {
481
+ NO_PLACES = "NO_PLACES",
482
+ INVALID_PLACE = "INVALID_PLACE",
483
+ DUPLICATE_PLACE = "DUPLICATE_PLACE",
484
+ NO_WEBSITE_OPTION = "NO_WEBSITE_OPTION",
485
+ INVALID_PRICE = "INVALID_PRICE",
486
+ INVALID_DAYS = "INVALID_DAYS",
487
+ INVALID_TIERS = "INVALID_TIERS",
488
+ NO_CHANNEL = "NO_CHANNEL",
489
+ PICKUP_WITHOUT_STORE = "PICKUP_WITHOUT_STORE",
490
+ MISSING_NAME = "MISSING_NAME"
491
+ }
492
+
455
493
  declare enum SalesLineAction {
456
494
  SALE = "sale",
457
495
  REFUND = "refund"
@@ -534,6 +572,11 @@ interface FeesTuple {
534
572
  refundedFees: number;
535
573
  netFees: number;
536
574
  }
575
+ interface ShippingTuple {
576
+ grossShipping: number;
577
+ refundedShipping: number;
578
+ netShipping: number;
579
+ }
537
580
  interface ModifiersTuple {
538
581
  grossModifiers: number;
539
582
  refundedModifiers: number;
@@ -564,6 +607,7 @@ interface SalesSummary {
564
607
  discounts: DiscountsTuple;
565
608
  refundsItems: number;
566
609
  fees: FeesTuple;
610
+ shipping?: ShippingTuple;
567
611
  modifiers?: ModifiersTuple;
568
612
  taxes?: TaxesTuple;
569
613
  totalSales: number;
@@ -1003,6 +1047,46 @@ declare function compositeModifierMismatches(lineItems: readonly {
1003
1047
  }[]): string[];
1004
1048
  declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
1005
1049
 
1050
+ type IdLike = string | {
1051
+ toString(): string;
1052
+ };
1053
+ interface StockLineComponent {
1054
+ productId: IdLike;
1055
+ variantId: IdLike;
1056
+ quantity: number;
1057
+ stockQuantity?: number | null;
1058
+ unitId?: IdLike | null;
1059
+ stockVariantId?: IdLike | null;
1060
+ }
1061
+ interface StockLine {
1062
+ internalId?: string | null;
1063
+ productId?: IdLike | null;
1064
+ variantId?: IdLike | null;
1065
+ name?: string | null;
1066
+ stockQuantity?: number | null;
1067
+ unitId?: IdLike | null;
1068
+ stockVariantId?: IdLike | null;
1069
+ components?: readonly StockLineComponent[] | null;
1070
+ }
1071
+ interface StockReservationLink {
1072
+ lineItemInternalId?: string | null;
1073
+ componentIndex?: number | null;
1074
+ }
1075
+ interface LineStockMove {
1076
+ productId: string;
1077
+ variantId: string;
1078
+ fields: {
1079
+ quantity: number;
1080
+ stockQuantity?: number;
1081
+ unitId?: string;
1082
+ stockVariantId?: string;
1083
+ compositeProductId?: string;
1084
+ compositeName?: string;
1085
+ };
1086
+ componentIndex?: number;
1087
+ }
1088
+ declare function lineStockMoves(item: StockLine, quantity: number, reservations?: readonly StockReservationLink[]): LineStockMove[];
1089
+
1006
1090
  declare const SYSTEM_FAMILY_IDS: {
1007
1091
  readonly COUNT: "count";
1008
1092
  readonly WEIGHT: "weight-metric";
@@ -1705,6 +1789,115 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1705
1789
  };
1706
1790
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1707
1791
 
1792
+ interface ShippingPlace {
1793
+ country: string;
1794
+ province?: string | null;
1795
+ city?: string | null;
1796
+ }
1797
+ interface ShippingPriceTier {
1798
+ from: number;
1799
+ price: number;
1800
+ }
1801
+ interface ShippingOptionRule {
1802
+ id: string;
1803
+ type: ShippingOptionType | `${ShippingOptionType}`;
1804
+ rate?: ShippingRateType | `${ShippingRateType}`;
1805
+ name?: string | null;
1806
+ price: number;
1807
+ priceByTotal?: ShippingPriceTier[] | null;
1808
+ freeOver?: number | null;
1809
+ minDays?: number | null;
1810
+ maxDays?: number | null;
1811
+ channels: (ShippingChannel | `${ShippingChannel}`)[];
1812
+ outletId?: string | null;
1813
+ }
1814
+ interface ShippingZoneRule {
1815
+ id: string;
1816
+ kind: ShippingZoneKind | `${ShippingZoneKind}`;
1817
+ places: ShippingPlace[];
1818
+ ships: boolean;
1819
+ message?: string | null;
1820
+ options: ShippingOptionRule[];
1821
+ }
1822
+ interface AddressLike {
1823
+ country?: string | null;
1824
+ state?: string | null;
1825
+ province?: string | null;
1826
+ city?: string | null;
1827
+ postCode?: string | null;
1828
+ postalCode?: string | null;
1829
+ zip?: string | null;
1830
+ }
1831
+ interface NormalizedAddress {
1832
+ country?: string;
1833
+ province?: string;
1834
+ cityKey?: string;
1835
+ postCode?: string;
1836
+ }
1837
+ interface ShippingQuoteOption {
1838
+ optionId: string;
1839
+ zoneId: string;
1840
+ type: ShippingOptionType | `${ShippingOptionType}`;
1841
+ name: string | null;
1842
+ amount: number;
1843
+ amountToFree: number | null;
1844
+ minDays: number | null;
1845
+ maxDays: number | null;
1846
+ outletId: string | null;
1847
+ }
1848
+ interface ShippingResolution {
1849
+ zoneId: string | null;
1850
+ options: ShippingQuoteOption[];
1851
+ reason: ShippingNoOptionReason | null;
1852
+ message: string | null;
1853
+ shipsToCountries: string[];
1854
+ }
1855
+ interface ResolveShippingInput {
1856
+ zones: ShippingZoneRule[];
1857
+ address: AddressLike | null | undefined;
1858
+ itemsTotal: number;
1859
+ channel: ShippingChannel | `${ShippingChannel}`;
1860
+ }
1861
+
1862
+ declare function normalizeCountry(value: string | null | undefined): string | undefined;
1863
+ interface CountryOption {
1864
+ code: string;
1865
+ name: string;
1866
+ }
1867
+ declare function listCountries(locale?: string): CountryOption[];
1868
+ declare const SHIPPING_COUNTRIES: readonly string[];
1869
+ declare function shipsToCountry(code: string | null | undefined): boolean;
1870
+ declare function listShippingCountries(locale?: string): CountryOption[];
1871
+
1872
+ interface Province {
1873
+ code: string;
1874
+ name: string;
1875
+ nameFr: string;
1876
+ postalLetters: string[];
1877
+ aliases?: string[];
1878
+ }
1879
+ declare const CANADA_PROVINCES: readonly Province[];
1880
+ declare function normalizeProvince(country: string | undefined, value: string | null | undefined): string | undefined;
1881
+ declare function listProvinces(country: string): readonly Province[];
1882
+ declare function provincesForPostCode(country: string | undefined, postCode: string | undefined): string[];
1883
+
1884
+ declare const EVERYWHERE_KEY = "*";
1885
+ declare function normalizeCityKey(value: string | null | undefined): string | undefined;
1886
+ declare function normalizePostCode(value: string | null | undefined): string | undefined;
1887
+ declare function normalizeAddress(address: AddressLike | null | undefined): NormalizedAddress;
1888
+ declare function postCodeMatchesProvince(address: NormalizedAddress): boolean;
1889
+ declare function placeKey(place: ShippingPlace): string | undefined;
1890
+ declare function addressPlaceKeys(address: NormalizedAddress): string[];
1891
+
1892
+ declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
1893
+ declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
1894
+
1895
+ interface ShippingZoneProblem {
1896
+ code: ShippingZoneError;
1897
+ optionId?: string;
1898
+ }
1899
+ declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1900
+
1708
1901
  interface CurrencyRate {
1709
1902
  rate: number;
1710
1903
  country: string;
@@ -1716,6 +1909,25 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1716
1909
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1717
1910
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1718
1911
 
1912
+ declare enum ProcessorType {
1913
+ FINAL_PAY = "Terminal",
1914
+ TAP_TO_PAY = "TapToPay",
1915
+ MOTO = "Moto",
1916
+ CLOUD = "Cloud",
1917
+ BLUETOOTH = "Bluetooth",
1918
+ CASH = "Cash",
1919
+ CUSTOM_PAY = "CustomPay",
1920
+ VENDARA = "Vendara",
1921
+ REDEEM = "Redeem",
1922
+ INTEGRATION = "Integration",
1923
+ PAYMENT_LINK = "PaymentLink",
1924
+ ONLINE_PAYMENT = "OnlinePayment",
1925
+ EXTERNAL = "External"
1926
+ }
1927
+
1928
+ declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1929
+ type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1930
+
1719
1931
  declare const EXPENSE_PAYMENT_METHOD_PRESETS: readonly ["Cash", "Cheque", "Credit card", "Direct debit", "E-Transfer", "Wire transfer"];
1720
1932
  declare const EXPENSE_NAME_MAX_LENGTH = 40;
1721
1933
  declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
@@ -1754,22 +1966,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1754
1966
  }];
1755
1967
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1756
1968
 
1757
- declare enum ProcessorType {
1758
- FINAL_PAY = "Terminal",
1759
- TAP_TO_PAY = "TapToPay",
1760
- MOTO = "Moto",
1761
- CLOUD = "Cloud",
1762
- BLUETOOTH = "Bluetooth",
1763
- CASH = "Cash",
1764
- CUSTOM_PAY = "CustomPay",
1765
- VENDARA = "Vendara",
1766
- REDEEM = "Redeem",
1767
- INTEGRATION = "Integration",
1768
- PAYMENT_LINK = "PaymentLink",
1769
- EXTERNAL = "External"
1770
- }
1771
-
1772
- declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1773
- type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1774
-
1775
- 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, type AssignUserChange, 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, HttpMethod, 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 OrderLikeForAssignedUsers, 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, ProductSalesChartStep, ProductSalesReportCompare, 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, SalesLineAction, SalesLineSourceArray, 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, applyAssignment, 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, currentAssignees, 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, orderAssignments, 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 };
1969
+ 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, type AssignUserChange, 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, HttpMethod, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, type LineStockMove, 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 OrderLikeForAssignedUsers, 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, ProductSalesChartStep, ProductSalesReportCompare, 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, SHIPPING_COUNTRIES, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, SalesLineAction, SalesLineSourceArray, 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, type ShippingTuple, 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 StockLine, type StockLineComponent, type StockReservationLink, 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, applyAssignment, 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, currentAssignees, 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, lineStockMoves, listCountries, listProvinces, listShippingCountries, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shipsToCountry, 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",
@@ -452,6 +453,43 @@ declare enum ResourceAvailabilityState {
452
453
  NO_HOURS_IN_RANGE = "noHoursInRange"
453
454
  }
454
455
 
456
+ declare enum ShippingZoneKind {
457
+ COUNTRY = "country",
458
+ PROVINCE = "province",
459
+ CITY = "city",
460
+ EVERYWHERE = "everywhere"
461
+ }
462
+ declare enum ShippingOptionType {
463
+ SHIP = "ship",
464
+ PICKUP = "pickup"
465
+ }
466
+ declare enum ShippingRateType {
467
+ FLAT = "flat"
468
+ }
469
+ declare enum ShippingChannel {
470
+ WEB = "web",
471
+ POS = "pos"
472
+ }
473
+ declare enum ShippingNoOptionReason {
474
+ INCOMPLETE = "INCOMPLETE",
475
+ ADDRESS_MISMATCH = "ADDRESS_MISMATCH",
476
+ NO_COVERAGE = "NO_COVERAGE",
477
+ BLOCKED = "BLOCKED",
478
+ NO_OPTION = "NO_OPTION"
479
+ }
480
+ declare enum ShippingZoneError {
481
+ NO_PLACES = "NO_PLACES",
482
+ INVALID_PLACE = "INVALID_PLACE",
483
+ DUPLICATE_PLACE = "DUPLICATE_PLACE",
484
+ NO_WEBSITE_OPTION = "NO_WEBSITE_OPTION",
485
+ INVALID_PRICE = "INVALID_PRICE",
486
+ INVALID_DAYS = "INVALID_DAYS",
487
+ INVALID_TIERS = "INVALID_TIERS",
488
+ NO_CHANNEL = "NO_CHANNEL",
489
+ PICKUP_WITHOUT_STORE = "PICKUP_WITHOUT_STORE",
490
+ MISSING_NAME = "MISSING_NAME"
491
+ }
492
+
455
493
  declare enum SalesLineAction {
456
494
  SALE = "sale",
457
495
  REFUND = "refund"
@@ -534,6 +572,11 @@ interface FeesTuple {
534
572
  refundedFees: number;
535
573
  netFees: number;
536
574
  }
575
+ interface ShippingTuple {
576
+ grossShipping: number;
577
+ refundedShipping: number;
578
+ netShipping: number;
579
+ }
537
580
  interface ModifiersTuple {
538
581
  grossModifiers: number;
539
582
  refundedModifiers: number;
@@ -564,6 +607,7 @@ interface SalesSummary {
564
607
  discounts: DiscountsTuple;
565
608
  refundsItems: number;
566
609
  fees: FeesTuple;
610
+ shipping?: ShippingTuple;
567
611
  modifiers?: ModifiersTuple;
568
612
  taxes?: TaxesTuple;
569
613
  totalSales: number;
@@ -1003,6 +1047,46 @@ declare function compositeModifierMismatches(lineItems: readonly {
1003
1047
  }[]): string[];
1004
1048
  declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
1005
1049
 
1050
+ type IdLike = string | {
1051
+ toString(): string;
1052
+ };
1053
+ interface StockLineComponent {
1054
+ productId: IdLike;
1055
+ variantId: IdLike;
1056
+ quantity: number;
1057
+ stockQuantity?: number | null;
1058
+ unitId?: IdLike | null;
1059
+ stockVariantId?: IdLike | null;
1060
+ }
1061
+ interface StockLine {
1062
+ internalId?: string | null;
1063
+ productId?: IdLike | null;
1064
+ variantId?: IdLike | null;
1065
+ name?: string | null;
1066
+ stockQuantity?: number | null;
1067
+ unitId?: IdLike | null;
1068
+ stockVariantId?: IdLike | null;
1069
+ components?: readonly StockLineComponent[] | null;
1070
+ }
1071
+ interface StockReservationLink {
1072
+ lineItemInternalId?: string | null;
1073
+ componentIndex?: number | null;
1074
+ }
1075
+ interface LineStockMove {
1076
+ productId: string;
1077
+ variantId: string;
1078
+ fields: {
1079
+ quantity: number;
1080
+ stockQuantity?: number;
1081
+ unitId?: string;
1082
+ stockVariantId?: string;
1083
+ compositeProductId?: string;
1084
+ compositeName?: string;
1085
+ };
1086
+ componentIndex?: number;
1087
+ }
1088
+ declare function lineStockMoves(item: StockLine, quantity: number, reservations?: readonly StockReservationLink[]): LineStockMove[];
1089
+
1006
1090
  declare const SYSTEM_FAMILY_IDS: {
1007
1091
  readonly COUNT: "count";
1008
1092
  readonly WEIGHT: "weight-metric";
@@ -1705,6 +1789,115 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1705
1789
  };
1706
1790
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1707
1791
 
1792
+ interface ShippingPlace {
1793
+ country: string;
1794
+ province?: string | null;
1795
+ city?: string | null;
1796
+ }
1797
+ interface ShippingPriceTier {
1798
+ from: number;
1799
+ price: number;
1800
+ }
1801
+ interface ShippingOptionRule {
1802
+ id: string;
1803
+ type: ShippingOptionType | `${ShippingOptionType}`;
1804
+ rate?: ShippingRateType | `${ShippingRateType}`;
1805
+ name?: string | null;
1806
+ price: number;
1807
+ priceByTotal?: ShippingPriceTier[] | null;
1808
+ freeOver?: number | null;
1809
+ minDays?: number | null;
1810
+ maxDays?: number | null;
1811
+ channels: (ShippingChannel | `${ShippingChannel}`)[];
1812
+ outletId?: string | null;
1813
+ }
1814
+ interface ShippingZoneRule {
1815
+ id: string;
1816
+ kind: ShippingZoneKind | `${ShippingZoneKind}`;
1817
+ places: ShippingPlace[];
1818
+ ships: boolean;
1819
+ message?: string | null;
1820
+ options: ShippingOptionRule[];
1821
+ }
1822
+ interface AddressLike {
1823
+ country?: string | null;
1824
+ state?: string | null;
1825
+ province?: string | null;
1826
+ city?: string | null;
1827
+ postCode?: string | null;
1828
+ postalCode?: string | null;
1829
+ zip?: string | null;
1830
+ }
1831
+ interface NormalizedAddress {
1832
+ country?: string;
1833
+ province?: string;
1834
+ cityKey?: string;
1835
+ postCode?: string;
1836
+ }
1837
+ interface ShippingQuoteOption {
1838
+ optionId: string;
1839
+ zoneId: string;
1840
+ type: ShippingOptionType | `${ShippingOptionType}`;
1841
+ name: string | null;
1842
+ amount: number;
1843
+ amountToFree: number | null;
1844
+ minDays: number | null;
1845
+ maxDays: number | null;
1846
+ outletId: string | null;
1847
+ }
1848
+ interface ShippingResolution {
1849
+ zoneId: string | null;
1850
+ options: ShippingQuoteOption[];
1851
+ reason: ShippingNoOptionReason | null;
1852
+ message: string | null;
1853
+ shipsToCountries: string[];
1854
+ }
1855
+ interface ResolveShippingInput {
1856
+ zones: ShippingZoneRule[];
1857
+ address: AddressLike | null | undefined;
1858
+ itemsTotal: number;
1859
+ channel: ShippingChannel | `${ShippingChannel}`;
1860
+ }
1861
+
1862
+ declare function normalizeCountry(value: string | null | undefined): string | undefined;
1863
+ interface CountryOption {
1864
+ code: string;
1865
+ name: string;
1866
+ }
1867
+ declare function listCountries(locale?: string): CountryOption[];
1868
+ declare const SHIPPING_COUNTRIES: readonly string[];
1869
+ declare function shipsToCountry(code: string | null | undefined): boolean;
1870
+ declare function listShippingCountries(locale?: string): CountryOption[];
1871
+
1872
+ interface Province {
1873
+ code: string;
1874
+ name: string;
1875
+ nameFr: string;
1876
+ postalLetters: string[];
1877
+ aliases?: string[];
1878
+ }
1879
+ declare const CANADA_PROVINCES: readonly Province[];
1880
+ declare function normalizeProvince(country: string | undefined, value: string | null | undefined): string | undefined;
1881
+ declare function listProvinces(country: string): readonly Province[];
1882
+ declare function provincesForPostCode(country: string | undefined, postCode: string | undefined): string[];
1883
+
1884
+ declare const EVERYWHERE_KEY = "*";
1885
+ declare function normalizeCityKey(value: string | null | undefined): string | undefined;
1886
+ declare function normalizePostCode(value: string | null | undefined): string | undefined;
1887
+ declare function normalizeAddress(address: AddressLike | null | undefined): NormalizedAddress;
1888
+ declare function postCodeMatchesProvince(address: NormalizedAddress): boolean;
1889
+ declare function placeKey(place: ShippingPlace): string | undefined;
1890
+ declare function addressPlaceKeys(address: NormalizedAddress): string[];
1891
+
1892
+ declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
1893
+ declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
1894
+
1895
+ interface ShippingZoneProblem {
1896
+ code: ShippingZoneError;
1897
+ optionId?: string;
1898
+ }
1899
+ declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1900
+
1708
1901
  interface CurrencyRate {
1709
1902
  rate: number;
1710
1903
  country: string;
@@ -1716,6 +1909,25 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1716
1909
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1717
1910
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1718
1911
 
1912
+ declare enum ProcessorType {
1913
+ FINAL_PAY = "Terminal",
1914
+ TAP_TO_PAY = "TapToPay",
1915
+ MOTO = "Moto",
1916
+ CLOUD = "Cloud",
1917
+ BLUETOOTH = "Bluetooth",
1918
+ CASH = "Cash",
1919
+ CUSTOM_PAY = "CustomPay",
1920
+ VENDARA = "Vendara",
1921
+ REDEEM = "Redeem",
1922
+ INTEGRATION = "Integration",
1923
+ PAYMENT_LINK = "PaymentLink",
1924
+ ONLINE_PAYMENT = "OnlinePayment",
1925
+ EXTERNAL = "External"
1926
+ }
1927
+
1928
+ declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1929
+ type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1930
+
1719
1931
  declare const EXPENSE_PAYMENT_METHOD_PRESETS: readonly ["Cash", "Cheque", "Credit card", "Direct debit", "E-Transfer", "Wire transfer"];
1720
1932
  declare const EXPENSE_NAME_MAX_LENGTH = 40;
1721
1933
  declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
@@ -1754,22 +1966,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1754
1966
  }];
1755
1967
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1756
1968
 
1757
- declare enum ProcessorType {
1758
- FINAL_PAY = "Terminal",
1759
- TAP_TO_PAY = "TapToPay",
1760
- MOTO = "Moto",
1761
- CLOUD = "Cloud",
1762
- BLUETOOTH = "Bluetooth",
1763
- CASH = "Cash",
1764
- CUSTOM_PAY = "CustomPay",
1765
- VENDARA = "Vendara",
1766
- REDEEM = "Redeem",
1767
- INTEGRATION = "Integration",
1768
- PAYMENT_LINK = "PaymentLink",
1769
- EXTERNAL = "External"
1770
- }
1771
-
1772
- declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
1773
- type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
1774
-
1775
- 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, type AssignUserChange, 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, HttpMethod, 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 OrderLikeForAssignedUsers, 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, ProductSalesChartStep, ProductSalesReportCompare, 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, SalesLineAction, SalesLineSourceArray, 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, applyAssignment, 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, currentAssignees, 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, orderAssignments, 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 };
1969
+ 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, type AssignUserChange, 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, HttpMethod, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, type LineStockMove, 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 OrderLikeForAssignedUsers, 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, ProductSalesChartStep, ProductSalesReportCompare, 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, SHIPPING_COUNTRIES, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, SalesLineAction, SalesLineSourceArray, 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, type ShippingTuple, 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 StockLine, type StockLineComponent, type StockReservationLink, 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, applyAssignment, 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, currentAssignees, 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, lineStockMoves, listCountries, listProvinces, listShippingCountries, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shipsToCountry, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };