@final-commerce/common 2.5.1-preprod.4 → 2.6.0-staging.2

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
@@ -224,8 +224,7 @@ declare enum InventorySpecificActionType {
224
224
  APPLIED_FROM_WOO = "APPLIED_FROM_WOO",
225
225
  PO_RECEIVED = "PO_RECEIVED",
226
226
  EXTERNAL_SALE = "EXTERNAL_SALE",
227
- EXTERNAL_RESTOCK = "EXTERNAL_RESTOCK",
228
- CUSTOM = "CUSTOM"
227
+ EXTERNAL_RESTOCK = "EXTERNAL_RESTOCK"
229
228
  }
230
229
  declare enum ExtensionCategory {
231
230
  SYNC = "sync",
@@ -391,7 +390,8 @@ declare enum StripeCurrencyCode {
391
390
  declare enum ProductType {
392
391
  SIMPLE = "simple",
393
392
  VARIABLE = "variable",
394
- BOOKING = "booking"
393
+ BOOKING = "booking",
394
+ COMPOSITE = "composite"
395
395
  }
396
396
  declare enum ProductStatus {
397
397
  ACTIVE = "active",
@@ -663,43 +663,6 @@ interface EndOfSessionReport {
663
663
  minorUnits?: number;
664
664
  }
665
665
 
666
- declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
667
- declare function isAdyenRolloutCountry(alpha2: string): boolean;
668
- declare const AFFIRM_PRICE_PLANS: readonly ["core", "standard", "signature"];
669
- type AffirmPricePlan = (typeof AFFIRM_PRICE_PLANS)[number];
670
- declare function isAffirmPricePlan(value: unknown): value is AffirmPricePlan;
671
- declare const AFFIRM_COUNTRY_CODES: Set<string>;
672
- declare function isAffirmCountry(alpha2: string | undefined): boolean;
673
- declare const BNPL_METHOD_STATUS: {
674
- readonly ACTIVE: "active";
675
- readonly PENDING: "pending";
676
- readonly UNAVAILABLE: "unavailable";
677
- readonly UNKNOWN: "unknown";
678
- };
679
- type BnplMethodStatus = (typeof BNPL_METHOD_STATUS)[keyof typeof BNPL_METHOD_STATUS];
680
- declare const BNPL_SKIP_REASON: {
681
- readonly PENDING: "pending";
682
- readonly NO_SUPPORT_EMAIL: "no_support_email";
683
- readonly NO_CURRENCY: "no_currency";
684
- readonly NO_BUSINESS_LINE: "no_business_line";
685
- };
686
- type BnplSkipReason = (typeof BNPL_SKIP_REASON)[keyof typeof BNPL_SKIP_REASON];
687
-
688
- interface AdyenBnplSettings {
689
- affirmPricePlan?: AffirmPricePlan;
690
- affirm: BnplMethodStatus;
691
- available: boolean;
692
- }
693
- interface AdyenBnplSkippedStore {
694
- storeId: string;
695
- reason: BnplSkipReason;
696
- }
697
- interface AdyenBnplUpdateResult {
698
- updated: string[];
699
- requested: string[];
700
- skipped: AdyenBnplSkippedStore[];
701
- }
702
-
703
666
  declare const CURRENCY_CONFIG: Record<CurrencyCode | string, CurrencyConfig>;
704
667
  declare function getCurrencyConfig(currency: CurrencyCode): CurrencyConfig;
705
668
  declare function getMinorUnitMultiplier(currency: CurrencyCode): number;
@@ -750,6 +713,85 @@ declare function generateMongoID(): string;
750
713
  declare function getCurrentISODate(): string;
751
714
  declare function normalizeMongoIdString(value: unknown): string | null;
752
715
 
716
+ interface CompositePriceItem {
717
+ extraCharge: number;
718
+ quantity: number;
719
+ available: boolean;
720
+ }
721
+ interface CompositePricePart {
722
+ min: number;
723
+ items: CompositePriceItem[];
724
+ }
725
+ declare const compositeItemCost: (item: CompositePriceItem) => number;
726
+ declare function cheapestCompositeItem(items: CompositePriceItem[]): number | undefined;
727
+ declare function cheapestCompositePrice(parts: CompositePricePart[]): number | undefined;
728
+
729
+ type ModifierSelectionType = 'single' | 'multiple' | 'quantity';
730
+ interface ResolvedModifierChoice {
731
+ _id: string;
732
+ name: string;
733
+ price: number;
734
+ isDefault?: boolean;
735
+ defaultQuantity?: number;
736
+ unavailableOutletIds?: string[];
737
+ sortOrder: number;
738
+ }
739
+ interface ResolvedModifier {
740
+ _id: string;
741
+ name: string;
742
+ selectionType: ModifierSelectionType;
743
+ allowQuantity?: boolean;
744
+ required: boolean;
745
+ min?: number | null;
746
+ max?: number | null;
747
+ sortOrder: number;
748
+ choices: ResolvedModifierChoice[];
749
+ }
750
+
751
+ interface ModifierChoiceRow {
752
+ _id: string;
753
+ name: string;
754
+ price?: number;
755
+ sortOrder?: number;
756
+ isDefault?: boolean;
757
+ defaultQuantity?: number;
758
+ unavailableOutletIds?: string[];
759
+ }
760
+ interface ModifierRow {
761
+ _id: string;
762
+ name: string;
763
+ selectionType: ModifierSelectionType;
764
+ allowQuantity?: boolean;
765
+ choices?: ModifierChoiceRow[];
766
+ isDeleted?: boolean;
767
+ }
768
+ interface CategoryModifierRow {
769
+ _id: string;
770
+ modifierId: string;
771
+ categoryId: string;
772
+ required?: boolean;
773
+ min?: number | null;
774
+ max?: number | null;
775
+ sortOrder?: number;
776
+ isDeleted?: boolean;
777
+ }
778
+ interface CategoryRow {
779
+ _id: string;
780
+ parentId?: string | null;
781
+ isDeleted?: boolean;
782
+ }
783
+ declare function ancestorChain(categoryId: string, categoriesById: Map<string, CategoryRow>): string[];
784
+ interface ResolveInputs {
785
+ categoryIds: string[];
786
+ modifiers: ModifierRow[];
787
+ categoryModifiers: CategoryModifierRow[];
788
+ categories: CategoryRow[];
789
+ }
790
+ declare function resolveModifiersForProduct(inputs: ResolveInputs): ResolvedModifier[];
791
+ declare function isChoiceAvailableAtOutlet(choice: ResolvedModifierChoice, outletId: string): boolean;
792
+ declare function hasSellableChoice(modifier: ResolvedModifier, outletId: string): boolean;
793
+ declare const modifiersSellable: (modifiers: ResolvedModifier[], outletId: string) => boolean;
794
+
753
795
  interface Measurable {
754
796
  name: string;
755
797
  abbreviation: string;
@@ -780,6 +822,105 @@ interface MeasurementUnit {
780
822
  sellable?: false;
781
823
  }
782
824
 
825
+ type CompositeItemUnavailable = 'deleted' | 'inactive' | 'hidden' | 'empty' | 'out_of_stock' | 'by_date' | 'fully_booked' | 'marked_sold_out';
826
+
827
+ interface CompositeShelf {
828
+ pool: string;
829
+ unit?: Measurable;
830
+ backorder: boolean;
831
+ unresolved?: boolean;
832
+ }
833
+ interface CompositeAvailabilityRows {
834
+ variantProducts: ReadonlyMap<string, string>;
835
+ productStatuses: ReadonlyMap<string, string | undefined>;
836
+ categoryVariants: ReadonlyMap<string, readonly string[]>;
837
+ bookableProductIds: ReadonlySet<string>;
838
+ outlet?: {
839
+ hiddenProductIds: ReadonlySet<string>;
840
+ unsellableProductIds: ReadonlySet<string>;
841
+ shelves: ReadonlyMap<string, CompositeShelf>;
842
+ poolStock: ReadonlyMap<string, number | null>;
843
+ bookableSeats?: ReadonlyMap<string, number>;
844
+ markedVariantIds: ReadonlySet<string>;
845
+ };
846
+ }
847
+ declare function poolStockAt(rows: readonly {
848
+ outletId: unknown;
849
+ manageStock?: boolean;
850
+ quantity?: number;
851
+ }[], outletId: string): number | null;
852
+ declare function compositeVariantInStock(variantId: string, quantity: number, outlet: NonNullable<CompositeAvailabilityRows['outlet']>): boolean;
853
+ declare function compositeItemUnavailable(item: {
854
+ variantId?: unknown;
855
+ categoryId?: unknown;
856
+ quantity: number;
857
+ }, rows: CompositeAvailabilityRows): CompositeItemUnavailable | null;
858
+ interface CompositeStockPart {
859
+ min: number;
860
+ items: readonly {
861
+ id: string;
862
+ variantId?: unknown;
863
+ categoryId?: unknown;
864
+ quantity: number;
865
+ }[];
866
+ }
867
+ interface CompositeMakeableRow {
868
+ itemIds: string[];
869
+ partIndex?: number;
870
+ uses: number;
871
+ has: number | null;
872
+ makes: number | null;
873
+ }
874
+ type CompositeMakeable = {
875
+ byDate: true;
876
+ } | {
877
+ count: number | null;
878
+ rows: CompositeMakeableRow[];
879
+ limitedBy?: number;
880
+ };
881
+ declare function compositeMakeable(parts: readonly CompositeStockPart[], rows: CompositeAvailabilityRows): CompositeMakeable;
882
+ interface PoolDrawing {
883
+ variantId: string;
884
+ stockVariantId?: string;
885
+ quantity: number;
886
+ unit?: Measurable;
887
+ }
888
+ declare const poolOf: (line: PoolDrawing) => string;
889
+ declare function poolDemand(lines: readonly (PoolDrawing & {
890
+ components?: readonly PoolDrawing[];
891
+ })[]): Map<string, number>;
892
+ declare function poolShortfall(demand: ReadonlyMap<string, number>, poolStock: ReadonlyMap<string, number | null>, backordered?: ReadonlySet<string>): {
893
+ poolId: string;
894
+ available: number;
895
+ wanted: number;
896
+ } | null;
897
+
898
+ interface CompositeReservationOrder {
899
+ lineItems?: readonly {
900
+ internalId?: string;
901
+ components?: readonly {
902
+ productId: unknown;
903
+ }[];
904
+ }[];
905
+ reservations?: readonly {
906
+ bookingId?: unknown;
907
+ productId: unknown;
908
+ lineItemInternalId?: string;
909
+ componentIndex?: number;
910
+ price?: number;
911
+ total?: number;
912
+ }[];
913
+ }
914
+ declare function compositeModifierMismatches(lineItems: readonly {
915
+ internalId?: string;
916
+ components?: readonly unknown[];
917
+ modifiers?: readonly {
918
+ modifierName?: string;
919
+ componentIndex?: number;
920
+ }[];
921
+ }[]): string[];
922
+ declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
923
+
783
924
  declare const SYSTEM_FAMILY_IDS: {
784
925
  readonly COUNT: "count";
785
926
  readonly WEIGHT: "weight-metric";
@@ -842,21 +983,6 @@ declare function isConditionOperator(value: string): value is ConditionOperator;
842
983
  type PathMode = 'strict' | 'permissive';
843
984
  declare const PATH_MODES: readonly PathMode[];
844
985
 
845
- interface OrderStatusDefinition {
846
- id: string;
847
- label: string;
848
- color?: string;
849
- icon?: string;
850
- fulfillmentState?: FulfillmentState;
851
- requiresPaymentState?: PaymentState[];
852
- }
853
- interface OrderStatusValidationError {
854
- index: number;
855
- field: string;
856
- message: string;
857
- }
858
- declare function validateOrderStatuses(statuses: unknown): OrderStatusValidationError[];
859
-
860
986
  interface OrderPaymentMethod {
861
987
  id?: string;
862
988
  amount?: number;
@@ -1030,7 +1156,6 @@ interface StoredStateConfig {
1030
1156
  validInitialStates: StatePair[];
1031
1157
  enforceValidInitialStates?: boolean;
1032
1158
  displayStateMap: DisplayStateRule[];
1033
- orderStatuses?: OrderStatusDefinition[];
1034
1159
  createdAt: Date;
1035
1160
  updatedAt: Date;
1036
1161
  }
@@ -1152,16 +1277,6 @@ declare function setOrderState(order: OrderStateWritable, paymentState: PaymentS
1152
1277
 
1153
1278
  declare function inferStatesFromLegacyStatus(order: OrderLikeForLegacyInference): StatePair;
1154
1279
 
1155
- interface OrderLikeForInCart {
1156
- inCart?: {
1157
- active: boolean;
1158
- } | null;
1159
- status?: string;
1160
- fulfillmentState?: string;
1161
- }
1162
- declare function hasInCartFlag(order: OrderLikeForInCart): boolean;
1163
- declare function isInCart(order: OrderLikeForInCart): boolean;
1164
-
1165
1280
  interface OrderMutationData extends OrderStateWritable {
1166
1281
  total?: number;
1167
1282
  balance?: number;
@@ -1463,6 +1578,9 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1463
1578
  };
1464
1579
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1465
1580
 
1581
+ declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
1582
+ declare function isAdyenRolloutCountry(alpha2: string): boolean;
1583
+
1466
1584
  interface CurrencyRate {
1467
1585
  rate: number;
1468
1586
  country: string;
@@ -1474,4 +1592,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1474
1592
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1475
1593
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1476
1594
 
1477
- export { ADYEN_ROLLOUT_COUNTRY_CODES, 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, CompanyType, 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, type EndOfSessionReport, 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 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, 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 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, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, 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, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, presentAt, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, violatesFinancialInvariant, windowEndsAt, withinPresence };
1595
+ export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, 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, type EndOfSessionReport, 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 OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, 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, 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, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, 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, violatesFinancialInvariant, windowEndsAt, withinPresence };
package/dist/index.d.ts CHANGED
@@ -224,8 +224,7 @@ declare enum InventorySpecificActionType {
224
224
  APPLIED_FROM_WOO = "APPLIED_FROM_WOO",
225
225
  PO_RECEIVED = "PO_RECEIVED",
226
226
  EXTERNAL_SALE = "EXTERNAL_SALE",
227
- EXTERNAL_RESTOCK = "EXTERNAL_RESTOCK",
228
- CUSTOM = "CUSTOM"
227
+ EXTERNAL_RESTOCK = "EXTERNAL_RESTOCK"
229
228
  }
230
229
  declare enum ExtensionCategory {
231
230
  SYNC = "sync",
@@ -391,7 +390,8 @@ declare enum StripeCurrencyCode {
391
390
  declare enum ProductType {
392
391
  SIMPLE = "simple",
393
392
  VARIABLE = "variable",
394
- BOOKING = "booking"
393
+ BOOKING = "booking",
394
+ COMPOSITE = "composite"
395
395
  }
396
396
  declare enum ProductStatus {
397
397
  ACTIVE = "active",
@@ -663,43 +663,6 @@ interface EndOfSessionReport {
663
663
  minorUnits?: number;
664
664
  }
665
665
 
666
- declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
667
- declare function isAdyenRolloutCountry(alpha2: string): boolean;
668
- declare const AFFIRM_PRICE_PLANS: readonly ["core", "standard", "signature"];
669
- type AffirmPricePlan = (typeof AFFIRM_PRICE_PLANS)[number];
670
- declare function isAffirmPricePlan(value: unknown): value is AffirmPricePlan;
671
- declare const AFFIRM_COUNTRY_CODES: Set<string>;
672
- declare function isAffirmCountry(alpha2: string | undefined): boolean;
673
- declare const BNPL_METHOD_STATUS: {
674
- readonly ACTIVE: "active";
675
- readonly PENDING: "pending";
676
- readonly UNAVAILABLE: "unavailable";
677
- readonly UNKNOWN: "unknown";
678
- };
679
- type BnplMethodStatus = (typeof BNPL_METHOD_STATUS)[keyof typeof BNPL_METHOD_STATUS];
680
- declare const BNPL_SKIP_REASON: {
681
- readonly PENDING: "pending";
682
- readonly NO_SUPPORT_EMAIL: "no_support_email";
683
- readonly NO_CURRENCY: "no_currency";
684
- readonly NO_BUSINESS_LINE: "no_business_line";
685
- };
686
- type BnplSkipReason = (typeof BNPL_SKIP_REASON)[keyof typeof BNPL_SKIP_REASON];
687
-
688
- interface AdyenBnplSettings {
689
- affirmPricePlan?: AffirmPricePlan;
690
- affirm: BnplMethodStatus;
691
- available: boolean;
692
- }
693
- interface AdyenBnplSkippedStore {
694
- storeId: string;
695
- reason: BnplSkipReason;
696
- }
697
- interface AdyenBnplUpdateResult {
698
- updated: string[];
699
- requested: string[];
700
- skipped: AdyenBnplSkippedStore[];
701
- }
702
-
703
666
  declare const CURRENCY_CONFIG: Record<CurrencyCode | string, CurrencyConfig>;
704
667
  declare function getCurrencyConfig(currency: CurrencyCode): CurrencyConfig;
705
668
  declare function getMinorUnitMultiplier(currency: CurrencyCode): number;
@@ -750,6 +713,85 @@ declare function generateMongoID(): string;
750
713
  declare function getCurrentISODate(): string;
751
714
  declare function normalizeMongoIdString(value: unknown): string | null;
752
715
 
716
+ interface CompositePriceItem {
717
+ extraCharge: number;
718
+ quantity: number;
719
+ available: boolean;
720
+ }
721
+ interface CompositePricePart {
722
+ min: number;
723
+ items: CompositePriceItem[];
724
+ }
725
+ declare const compositeItemCost: (item: CompositePriceItem) => number;
726
+ declare function cheapestCompositeItem(items: CompositePriceItem[]): number | undefined;
727
+ declare function cheapestCompositePrice(parts: CompositePricePart[]): number | undefined;
728
+
729
+ type ModifierSelectionType = 'single' | 'multiple' | 'quantity';
730
+ interface ResolvedModifierChoice {
731
+ _id: string;
732
+ name: string;
733
+ price: number;
734
+ isDefault?: boolean;
735
+ defaultQuantity?: number;
736
+ unavailableOutletIds?: string[];
737
+ sortOrder: number;
738
+ }
739
+ interface ResolvedModifier {
740
+ _id: string;
741
+ name: string;
742
+ selectionType: ModifierSelectionType;
743
+ allowQuantity?: boolean;
744
+ required: boolean;
745
+ min?: number | null;
746
+ max?: number | null;
747
+ sortOrder: number;
748
+ choices: ResolvedModifierChoice[];
749
+ }
750
+
751
+ interface ModifierChoiceRow {
752
+ _id: string;
753
+ name: string;
754
+ price?: number;
755
+ sortOrder?: number;
756
+ isDefault?: boolean;
757
+ defaultQuantity?: number;
758
+ unavailableOutletIds?: string[];
759
+ }
760
+ interface ModifierRow {
761
+ _id: string;
762
+ name: string;
763
+ selectionType: ModifierSelectionType;
764
+ allowQuantity?: boolean;
765
+ choices?: ModifierChoiceRow[];
766
+ isDeleted?: boolean;
767
+ }
768
+ interface CategoryModifierRow {
769
+ _id: string;
770
+ modifierId: string;
771
+ categoryId: string;
772
+ required?: boolean;
773
+ min?: number | null;
774
+ max?: number | null;
775
+ sortOrder?: number;
776
+ isDeleted?: boolean;
777
+ }
778
+ interface CategoryRow {
779
+ _id: string;
780
+ parentId?: string | null;
781
+ isDeleted?: boolean;
782
+ }
783
+ declare function ancestorChain(categoryId: string, categoriesById: Map<string, CategoryRow>): string[];
784
+ interface ResolveInputs {
785
+ categoryIds: string[];
786
+ modifiers: ModifierRow[];
787
+ categoryModifiers: CategoryModifierRow[];
788
+ categories: CategoryRow[];
789
+ }
790
+ declare function resolveModifiersForProduct(inputs: ResolveInputs): ResolvedModifier[];
791
+ declare function isChoiceAvailableAtOutlet(choice: ResolvedModifierChoice, outletId: string): boolean;
792
+ declare function hasSellableChoice(modifier: ResolvedModifier, outletId: string): boolean;
793
+ declare const modifiersSellable: (modifiers: ResolvedModifier[], outletId: string) => boolean;
794
+
753
795
  interface Measurable {
754
796
  name: string;
755
797
  abbreviation: string;
@@ -780,6 +822,105 @@ interface MeasurementUnit {
780
822
  sellable?: false;
781
823
  }
782
824
 
825
+ type CompositeItemUnavailable = 'deleted' | 'inactive' | 'hidden' | 'empty' | 'out_of_stock' | 'by_date' | 'fully_booked' | 'marked_sold_out';
826
+
827
+ interface CompositeShelf {
828
+ pool: string;
829
+ unit?: Measurable;
830
+ backorder: boolean;
831
+ unresolved?: boolean;
832
+ }
833
+ interface CompositeAvailabilityRows {
834
+ variantProducts: ReadonlyMap<string, string>;
835
+ productStatuses: ReadonlyMap<string, string | undefined>;
836
+ categoryVariants: ReadonlyMap<string, readonly string[]>;
837
+ bookableProductIds: ReadonlySet<string>;
838
+ outlet?: {
839
+ hiddenProductIds: ReadonlySet<string>;
840
+ unsellableProductIds: ReadonlySet<string>;
841
+ shelves: ReadonlyMap<string, CompositeShelf>;
842
+ poolStock: ReadonlyMap<string, number | null>;
843
+ bookableSeats?: ReadonlyMap<string, number>;
844
+ markedVariantIds: ReadonlySet<string>;
845
+ };
846
+ }
847
+ declare function poolStockAt(rows: readonly {
848
+ outletId: unknown;
849
+ manageStock?: boolean;
850
+ quantity?: number;
851
+ }[], outletId: string): number | null;
852
+ declare function compositeVariantInStock(variantId: string, quantity: number, outlet: NonNullable<CompositeAvailabilityRows['outlet']>): boolean;
853
+ declare function compositeItemUnavailable(item: {
854
+ variantId?: unknown;
855
+ categoryId?: unknown;
856
+ quantity: number;
857
+ }, rows: CompositeAvailabilityRows): CompositeItemUnavailable | null;
858
+ interface CompositeStockPart {
859
+ min: number;
860
+ items: readonly {
861
+ id: string;
862
+ variantId?: unknown;
863
+ categoryId?: unknown;
864
+ quantity: number;
865
+ }[];
866
+ }
867
+ interface CompositeMakeableRow {
868
+ itemIds: string[];
869
+ partIndex?: number;
870
+ uses: number;
871
+ has: number | null;
872
+ makes: number | null;
873
+ }
874
+ type CompositeMakeable = {
875
+ byDate: true;
876
+ } | {
877
+ count: number | null;
878
+ rows: CompositeMakeableRow[];
879
+ limitedBy?: number;
880
+ };
881
+ declare function compositeMakeable(parts: readonly CompositeStockPart[], rows: CompositeAvailabilityRows): CompositeMakeable;
882
+ interface PoolDrawing {
883
+ variantId: string;
884
+ stockVariantId?: string;
885
+ quantity: number;
886
+ unit?: Measurable;
887
+ }
888
+ declare const poolOf: (line: PoolDrawing) => string;
889
+ declare function poolDemand(lines: readonly (PoolDrawing & {
890
+ components?: readonly PoolDrawing[];
891
+ })[]): Map<string, number>;
892
+ declare function poolShortfall(demand: ReadonlyMap<string, number>, poolStock: ReadonlyMap<string, number | null>, backordered?: ReadonlySet<string>): {
893
+ poolId: string;
894
+ available: number;
895
+ wanted: number;
896
+ } | null;
897
+
898
+ interface CompositeReservationOrder {
899
+ lineItems?: readonly {
900
+ internalId?: string;
901
+ components?: readonly {
902
+ productId: unknown;
903
+ }[];
904
+ }[];
905
+ reservations?: readonly {
906
+ bookingId?: unknown;
907
+ productId: unknown;
908
+ lineItemInternalId?: string;
909
+ componentIndex?: number;
910
+ price?: number;
911
+ total?: number;
912
+ }[];
913
+ }
914
+ declare function compositeModifierMismatches(lineItems: readonly {
915
+ internalId?: string;
916
+ components?: readonly unknown[];
917
+ modifiers?: readonly {
918
+ modifierName?: string;
919
+ componentIndex?: number;
920
+ }[];
921
+ }[]): string[];
922
+ declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
923
+
783
924
  declare const SYSTEM_FAMILY_IDS: {
784
925
  readonly COUNT: "count";
785
926
  readonly WEIGHT: "weight-metric";
@@ -842,21 +983,6 @@ declare function isConditionOperator(value: string): value is ConditionOperator;
842
983
  type PathMode = 'strict' | 'permissive';
843
984
  declare const PATH_MODES: readonly PathMode[];
844
985
 
845
- interface OrderStatusDefinition {
846
- id: string;
847
- label: string;
848
- color?: string;
849
- icon?: string;
850
- fulfillmentState?: FulfillmentState;
851
- requiresPaymentState?: PaymentState[];
852
- }
853
- interface OrderStatusValidationError {
854
- index: number;
855
- field: string;
856
- message: string;
857
- }
858
- declare function validateOrderStatuses(statuses: unknown): OrderStatusValidationError[];
859
-
860
986
  interface OrderPaymentMethod {
861
987
  id?: string;
862
988
  amount?: number;
@@ -1030,7 +1156,6 @@ interface StoredStateConfig {
1030
1156
  validInitialStates: StatePair[];
1031
1157
  enforceValidInitialStates?: boolean;
1032
1158
  displayStateMap: DisplayStateRule[];
1033
- orderStatuses?: OrderStatusDefinition[];
1034
1159
  createdAt: Date;
1035
1160
  updatedAt: Date;
1036
1161
  }
@@ -1152,16 +1277,6 @@ declare function setOrderState(order: OrderStateWritable, paymentState: PaymentS
1152
1277
 
1153
1278
  declare function inferStatesFromLegacyStatus(order: OrderLikeForLegacyInference): StatePair;
1154
1279
 
1155
- interface OrderLikeForInCart {
1156
- inCart?: {
1157
- active: boolean;
1158
- } | null;
1159
- status?: string;
1160
- fulfillmentState?: string;
1161
- }
1162
- declare function hasInCartFlag(order: OrderLikeForInCart): boolean;
1163
- declare function isInCart(order: OrderLikeForInCart): boolean;
1164
-
1165
1280
  interface OrderMutationData extends OrderStateWritable {
1166
1281
  total?: number;
1167
1282
  balance?: number;
@@ -1463,6 +1578,9 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
1463
1578
  };
1464
1579
  declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1465
1580
 
1581
+ declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
1582
+ declare function isAdyenRolloutCountry(alpha2: string): boolean;
1583
+
1466
1584
  interface CurrencyRate {
1467
1585
  rate: number;
1468
1586
  country: string;
@@ -1474,4 +1592,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
1474
1592
  declare const OtherFixedRates: Record<string, CurrencyRate>;
1475
1593
  declare const COUNTRY_CURRENCIES: Record<string, string>;
1476
1594
 
1477
- export { ADYEN_ROLLOUT_COUNTRY_CODES, 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, CompanyType, 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, type EndOfSessionReport, 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 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, 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 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, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, 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, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, presentAt, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, violatesFinancialInvariant, windowEndsAt, withinPresence };
1595
+ export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, 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, type EndOfSessionReport, 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 OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, 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, 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, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, 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, violatesFinancialInvariant, windowEndsAt, withinPresence };