@final-commerce/common 2.11.0 → 2.11.1-online.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/bin/gate-done.mjs CHANGED
@@ -2,14 +2,13 @@
2
2
  /**
3
3
  * gate-done — pre-push hook.
4
4
  *
5
- * Runs four sweeps inside a 90-second wall-clock budget:
5
+ * Runs three sweeps inside a 90-second wall-clock budget:
6
6
  *
7
- * 1. npm audit — known CVE check against the installed dependency tree (warn only)
8
- * 2. gitleaks — credential / secret scanning (git log + staged)
9
- * 3. vitest — full test suite with coverage threshold enforcement
10
- * 4. bundle — size-limit or custom bundle-size script (if configured)
7
+ * 1. gitleaks — credential / secret scanning (git log + staged)
8
+ * 2. vitest — full test suite with coverage threshold enforcement
9
+ * 3. bundle — size-limit or custom bundle-size script (if configured)
11
10
  *
12
- * Any sweep failure except npm audit exits 1, blocking the push.
11
+ * Any sweep failure exits 1, blocking the push.
13
12
  * Budget overrun also exits 1.
14
13
  *
15
14
  * Install as Husky pre-push hook:
@@ -74,21 +73,9 @@ function ok(msg) {
74
73
  process.stdout.write(`\x1b[32m✔ [${elapsed()}s] ${msg}\x1b[0m\n`);
75
74
  }
76
75
 
77
- // ── 1. npm audit ─────────────────────────────────────────────────────────────
76
+ // ── 1. gitleaks ───────────────────────────────────────────────────────────────
78
77
 
79
- info('Sweep 1/4 — npm audit (known CVEs)…');
80
- checkBudget('npm audit');
81
-
82
- const auditResult = run('npm audit --audit-level=high');
83
- if (auditResult.status !== 0) {
84
- warn('npm audit found high or critical vulnerabilities. Run `npm audit` for details.');
85
- } else {
86
- ok('npm audit: no high/critical vulnerabilities.');
87
- }
88
-
89
- // ── 2. gitleaks ───────────────────────────────────────────────────────────────
90
-
91
- info('Sweep 2/4 — gitleaks secrets scan…');
78
+ info('Sweep 1/3 — gitleaks secrets scan…');
92
79
  checkBudget('gitleaks');
93
80
 
94
81
  const hasGitleaks = capture('command -v gitleaks 2>/dev/null').status === 0;
@@ -108,9 +95,9 @@ if (!hasGitleaks) {
108
95
  ok('gitleaks: no secrets detected.');
109
96
  }
110
97
 
111
- // ── 3. vitest coverage ────────────────────────────────────────────────────────
98
+ // ── 2. vitest coverage ────────────────────────────────────────────────────────
112
99
 
113
- info('Sweep 3/4 — Vitest test suite + coverage thresholds…');
100
+ info('Sweep 2/3 — Vitest test suite + coverage thresholds…');
114
101
  checkBudget('vitest');
115
102
 
116
103
  const vitestResult = run('npx vitest run --coverage');
@@ -121,9 +108,9 @@ if (vitestResult.status !== 0) {
121
108
 
122
109
  ok('Vitest: all tests passed, coverage thresholds met.');
123
110
 
124
- // ── 4. bundle size ────────────────────────────────────────────────────────────
111
+ // ── 3. bundle size ────────────────────────────────────────────────────────────
125
112
 
126
- info('Sweep 4/4 — bundle size audit…');
113
+ info('Sweep 3/3 — bundle size audit…');
127
114
  checkBudget('bundle audit');
128
115
 
129
116
  const pkgPath = resolve(process.cwd(), 'package.json');
package/dist/index.d.mts CHANGED
@@ -490,6 +490,25 @@ declare enum ShippingZoneError {
490
490
  MISSING_NAME = "MISSING_NAME"
491
491
  }
492
492
 
493
+ declare enum TaxRegistrationKind {
494
+ GST_HST = "GST_HST",
495
+ PST = "PST",
496
+ QST = "QST"
497
+ }
498
+ declare enum TaxSource {
499
+ MERCHANT = "merchant",
500
+ AUTOMATIC = "automatic"
501
+ }
502
+ declare enum OutOfProvinceTaxes {
503
+ AUTOMATIC = "automatic",
504
+ HOME = "home"
505
+ }
506
+ declare enum TaxWarningCode {
507
+ NOT_REGISTERED = "NOT_REGISTERED",
508
+ NO_RULES_FOR_PLACE = "NO_RULES_FOR_PLACE",
509
+ NO_TABLE = "NO_TABLE"
510
+ }
511
+
493
512
  declare enum SalesLineAction {
494
513
  SALE = "sale",
495
514
  REFUND = "refund"
@@ -1898,6 +1917,201 @@ interface ShippingZoneProblem {
1898
1917
  }
1899
1918
  declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1900
1919
 
1920
+ interface TaxRegistration {
1921
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
1922
+ place: string;
1923
+ number?: string | null;
1924
+ from?: string | null;
1925
+ }
1926
+
1927
+ declare const STANDARD_TAX_TYPE = "standard";
1928
+ type AutomaticTaxRowStatus = 'confirmed' | 'to_confirm';
1929
+ interface AutomaticTaxTypeRow {
1930
+ key: string;
1931
+ name: string;
1932
+ description?: string | null;
1933
+ sortOrder: number;
1934
+ active: boolean;
1935
+ }
1936
+ interface AutomaticTaxPart {
1937
+ code: string;
1938
+ name: string;
1939
+ rate: string;
1940
+ level: 'federal' | 'provincial';
1941
+ }
1942
+ interface AutomaticTaxRateRow {
1943
+ code: string;
1944
+ name: string;
1945
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
1946
+ places: string[];
1947
+ rate: string;
1948
+ from?: string | null;
1949
+ to?: string | null;
1950
+ order: number;
1951
+ compound: boolean;
1952
+ registrationPlace: string;
1953
+ harmonized: boolean;
1954
+ parts?: AutomaticTaxPart[] | null;
1955
+ sourceUrl?: string | null;
1956
+ status: AutomaticTaxRowStatus;
1957
+ }
1958
+ interface AutomaticTaxRuleRow {
1959
+ taxType: string;
1960
+ codes: string[];
1961
+ rate: string;
1962
+ from?: string | null;
1963
+ to?: string | null;
1964
+ sourceUrl?: string | null;
1965
+ status: AutomaticTaxRowStatus;
1966
+ note?: string | null;
1967
+ }
1968
+ interface AutomaticTaxTable {
1969
+ version: string;
1970
+ types: AutomaticTaxTypeRow[];
1971
+ rates: AutomaticTaxRateRow[];
1972
+ rules: AutomaticTaxRuleRow[];
1973
+ }
1974
+ declare function automaticTaxTableVersion(table: Omit<AutomaticTaxTable, 'version'>): string;
1975
+ declare function buildAutomaticTaxTable(rows: {
1976
+ types: readonly AutomaticTaxTypeRow[];
1977
+ rates: readonly AutomaticTaxRateRow[];
1978
+ rules: readonly AutomaticTaxRuleRow[];
1979
+ }): AutomaticTaxTable;
1980
+ declare function registrationPlacesByKind(rates: readonly AutomaticTaxRateRow[]): ReadonlyMap<string, readonly string[]>;
1981
+
1982
+ declare function sha1Hex(text: string): string;
1983
+
1984
+ interface CartAddress {
1985
+ firstName?: string;
1986
+ lastName?: string;
1987
+ address1?: string;
1988
+ address2?: string;
1989
+ city?: string;
1990
+ state?: string;
1991
+ postCode?: string;
1992
+ country?: string;
1993
+ fromCustomer?: boolean;
1994
+ }
1995
+
1996
+ type ShopperScope = {
1997
+ kind: 'all';
1998
+ } | {
1999
+ kind: 'store';
2000
+ companyId: string;
2001
+ };
2002
+ interface ShopperIdentity {
2003
+ id: string;
2004
+ emails: string[];
2005
+ scope: ShopperScope;
2006
+ }
2007
+ type ShopperOrderStatus = 'paid' | 'partially_refunded' | 'refunded' | 'cancelled';
2008
+ interface ShopperStoreRef {
2009
+ companyId: string;
2010
+ name: string;
2011
+ logo: string | null;
2012
+ }
2013
+ interface ShopperOrderRow {
2014
+ orderId: string;
2015
+ receiptId: string;
2016
+ placedAt: string;
2017
+ store: ShopperStoreRef;
2018
+ status: ShopperOrderStatus;
2019
+ total: number;
2020
+ currency: CurrencyCode | null;
2021
+ itemCount: number;
2022
+ }
2023
+ interface ShopperOrderItem {
2024
+ lineId: string;
2025
+ name: string;
2026
+ variant: string | null;
2027
+ quantity: number;
2028
+ total: number;
2029
+ }
2030
+ interface ShopperOrderTotals {
2031
+ subtotal: number;
2032
+ discount: number;
2033
+ tax: number;
2034
+ shipping: number;
2035
+ refunded: number;
2036
+ }
2037
+ interface ShopperCard {
2038
+ brand: string;
2039
+ lastFour: string;
2040
+ }
2041
+ interface ShopperOrderDetail extends ShopperOrderRow {
2042
+ items: ShopperOrderItem[];
2043
+ totals: ShopperOrderTotals;
2044
+ card: ShopperCard | null;
2045
+ delivery: {
2046
+ type: 'pickup' | 'shipping';
2047
+ place: string | null;
2048
+ } | null;
2049
+ returnRequestedAt: string | null;
2050
+ }
2051
+ interface ShopperPaymentMethod {
2052
+ id: string;
2053
+ brand: string;
2054
+ lastFour: string;
2055
+ expiryMonth: string;
2056
+ expiryYear: string;
2057
+ holderName: string | null;
2058
+ isDefault: boolean;
2059
+ }
2060
+ interface ShopperStore extends ShopperStoreRef {
2061
+ city: string | null;
2062
+ email: string | null;
2063
+ phone: string | null;
2064
+ website: string | null;
2065
+ returnPolicy: string | null;
2066
+ news: boolean;
2067
+ orderCount: number;
2068
+ }
2069
+ declare const SHOPPER_CONSENT_SOURCES: readonly ["checkout", "my-account", "store-account"];
2070
+ type ShopperConsentSource = (typeof SHOPPER_CONSENT_SOURCES)[number];
2071
+ interface ShopperSavedAddress extends Omit<CartAddress, 'fromCustomer'> {
2072
+ id: string;
2073
+ label: string | null;
2074
+ isDefault: boolean;
2075
+ }
2076
+ type ShopperAddressInput = Omit<ShopperSavedAddress, 'id' | 'isDefault'>;
2077
+ interface ShopperNotificationChoices {
2078
+ sms: boolean;
2079
+ push: boolean;
2080
+ }
2081
+ interface ShopperProfile {
2082
+ phone: string | null;
2083
+ addresses: ShopperSavedAddress[];
2084
+ defaultCardId: string | null;
2085
+ notifications: ShopperNotificationChoices;
2086
+ }
2087
+ declare const SHOPPER_RETURN_METHODS: readonly ["mail", "in-store"];
2088
+ type ShopperReturnMethod = (typeof SHOPPER_RETURN_METHODS)[number];
2089
+ interface ShopperReturnRequestInput {
2090
+ items: {
2091
+ lineId: string;
2092
+ quantity: number;
2093
+ }[];
2094
+ method: ShopperReturnMethod;
2095
+ note?: string;
2096
+ }
2097
+ declare const SHOPPER_ERROR_CODES: {
2098
+ readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
2099
+ readonly RETURN_ALREADY_REQUESTED: "RETURN_ALREADY_REQUESTED";
2100
+ readonly RETURN_NOT_ALLOWED: "RETURN_NOT_ALLOWED";
2101
+ readonly STORE_HAS_NO_SUPPORT_EMAIL: "STORE_HAS_NO_SUPPORT_EMAIL";
2102
+ readonly TOO_MANY_ADDRESSES: "TOO_MANY_ADDRESSES";
2103
+ readonly STORE_NOT_LINKED: "STORE_NOT_LINKED";
2104
+ readonly STORED_METHOD_NOT_FOUND: "STORED_METHOD_NOT_FOUND";
2105
+ };
2106
+ type ShopperErrorCode = (typeof SHOPPER_ERROR_CODES)[keyof typeof SHOPPER_ERROR_CODES];
2107
+
2108
+ declare function normalizeShopperEmail(email: unknown): string | null;
2109
+
2110
+ declare function cardFromProcessorData(processorData: unknown): {
2111
+ cardBrand?: string;
2112
+ cardLastFour?: string;
2113
+ };
2114
+
1901
2115
  interface CurrencyRate {
1902
2116
  rate: number;
1903
2117
  country: string;
@@ -1966,4 +2180,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1966
2180
  }];
1967
2181
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1968
2182
 
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 };
2183
+ 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 AutomaticTaxPart, type AutomaticTaxRateRow, type AutomaticTaxRowStatus, type AutomaticTaxRuleRow, type AutomaticTaxTable, type AutomaticTaxTypeRow, 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, OutOfProvinceTaxes, 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, SHOPPER_CONSENT_SOURCES, SHOPPER_ERROR_CODES, SHOPPER_RETURN_METHODS, STANDARD_TAX_TYPE, 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 ShopperAddressInput, type ShopperCard, type ShopperConsentSource, type ShopperErrorCode, type ShopperIdentity, type ShopperNotificationChoices, type ShopperOrderDetail, type ShopperOrderItem, type ShopperOrderRow, type ShopperOrderStatus, type ShopperOrderTotals, type ShopperPaymentMethod, type ShopperProfile, type ShopperReturnMethod, type ShopperReturnRequestInput, type ShopperSavedAddress, type ShopperScope, type ShopperStore, type ShopperStoreRef, 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 TaxRegistration, TaxRegistrationKind, TaxSource, TaxWarningCode, 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, automaticTaxTableVersion, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAutomaticTaxTable, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cardFromProcessorData, 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, normalizeShopperEmail, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, registrationPlacesByKind, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, sha1Hex, shipsToCountry, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };
package/dist/index.d.ts CHANGED
@@ -490,6 +490,25 @@ declare enum ShippingZoneError {
490
490
  MISSING_NAME = "MISSING_NAME"
491
491
  }
492
492
 
493
+ declare enum TaxRegistrationKind {
494
+ GST_HST = "GST_HST",
495
+ PST = "PST",
496
+ QST = "QST"
497
+ }
498
+ declare enum TaxSource {
499
+ MERCHANT = "merchant",
500
+ AUTOMATIC = "automatic"
501
+ }
502
+ declare enum OutOfProvinceTaxes {
503
+ AUTOMATIC = "automatic",
504
+ HOME = "home"
505
+ }
506
+ declare enum TaxWarningCode {
507
+ NOT_REGISTERED = "NOT_REGISTERED",
508
+ NO_RULES_FOR_PLACE = "NO_RULES_FOR_PLACE",
509
+ NO_TABLE = "NO_TABLE"
510
+ }
511
+
493
512
  declare enum SalesLineAction {
494
513
  SALE = "sale",
495
514
  REFUND = "refund"
@@ -1898,6 +1917,201 @@ interface ShippingZoneProblem {
1898
1917
  }
1899
1918
  declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
1900
1919
 
1920
+ interface TaxRegistration {
1921
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
1922
+ place: string;
1923
+ number?: string | null;
1924
+ from?: string | null;
1925
+ }
1926
+
1927
+ declare const STANDARD_TAX_TYPE = "standard";
1928
+ type AutomaticTaxRowStatus = 'confirmed' | 'to_confirm';
1929
+ interface AutomaticTaxTypeRow {
1930
+ key: string;
1931
+ name: string;
1932
+ description?: string | null;
1933
+ sortOrder: number;
1934
+ active: boolean;
1935
+ }
1936
+ interface AutomaticTaxPart {
1937
+ code: string;
1938
+ name: string;
1939
+ rate: string;
1940
+ level: 'federal' | 'provincial';
1941
+ }
1942
+ interface AutomaticTaxRateRow {
1943
+ code: string;
1944
+ name: string;
1945
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
1946
+ places: string[];
1947
+ rate: string;
1948
+ from?: string | null;
1949
+ to?: string | null;
1950
+ order: number;
1951
+ compound: boolean;
1952
+ registrationPlace: string;
1953
+ harmonized: boolean;
1954
+ parts?: AutomaticTaxPart[] | null;
1955
+ sourceUrl?: string | null;
1956
+ status: AutomaticTaxRowStatus;
1957
+ }
1958
+ interface AutomaticTaxRuleRow {
1959
+ taxType: string;
1960
+ codes: string[];
1961
+ rate: string;
1962
+ from?: string | null;
1963
+ to?: string | null;
1964
+ sourceUrl?: string | null;
1965
+ status: AutomaticTaxRowStatus;
1966
+ note?: string | null;
1967
+ }
1968
+ interface AutomaticTaxTable {
1969
+ version: string;
1970
+ types: AutomaticTaxTypeRow[];
1971
+ rates: AutomaticTaxRateRow[];
1972
+ rules: AutomaticTaxRuleRow[];
1973
+ }
1974
+ declare function automaticTaxTableVersion(table: Omit<AutomaticTaxTable, 'version'>): string;
1975
+ declare function buildAutomaticTaxTable(rows: {
1976
+ types: readonly AutomaticTaxTypeRow[];
1977
+ rates: readonly AutomaticTaxRateRow[];
1978
+ rules: readonly AutomaticTaxRuleRow[];
1979
+ }): AutomaticTaxTable;
1980
+ declare function registrationPlacesByKind(rates: readonly AutomaticTaxRateRow[]): ReadonlyMap<string, readonly string[]>;
1981
+
1982
+ declare function sha1Hex(text: string): string;
1983
+
1984
+ interface CartAddress {
1985
+ firstName?: string;
1986
+ lastName?: string;
1987
+ address1?: string;
1988
+ address2?: string;
1989
+ city?: string;
1990
+ state?: string;
1991
+ postCode?: string;
1992
+ country?: string;
1993
+ fromCustomer?: boolean;
1994
+ }
1995
+
1996
+ type ShopperScope = {
1997
+ kind: 'all';
1998
+ } | {
1999
+ kind: 'store';
2000
+ companyId: string;
2001
+ };
2002
+ interface ShopperIdentity {
2003
+ id: string;
2004
+ emails: string[];
2005
+ scope: ShopperScope;
2006
+ }
2007
+ type ShopperOrderStatus = 'paid' | 'partially_refunded' | 'refunded' | 'cancelled';
2008
+ interface ShopperStoreRef {
2009
+ companyId: string;
2010
+ name: string;
2011
+ logo: string | null;
2012
+ }
2013
+ interface ShopperOrderRow {
2014
+ orderId: string;
2015
+ receiptId: string;
2016
+ placedAt: string;
2017
+ store: ShopperStoreRef;
2018
+ status: ShopperOrderStatus;
2019
+ total: number;
2020
+ currency: CurrencyCode | null;
2021
+ itemCount: number;
2022
+ }
2023
+ interface ShopperOrderItem {
2024
+ lineId: string;
2025
+ name: string;
2026
+ variant: string | null;
2027
+ quantity: number;
2028
+ total: number;
2029
+ }
2030
+ interface ShopperOrderTotals {
2031
+ subtotal: number;
2032
+ discount: number;
2033
+ tax: number;
2034
+ shipping: number;
2035
+ refunded: number;
2036
+ }
2037
+ interface ShopperCard {
2038
+ brand: string;
2039
+ lastFour: string;
2040
+ }
2041
+ interface ShopperOrderDetail extends ShopperOrderRow {
2042
+ items: ShopperOrderItem[];
2043
+ totals: ShopperOrderTotals;
2044
+ card: ShopperCard | null;
2045
+ delivery: {
2046
+ type: 'pickup' | 'shipping';
2047
+ place: string | null;
2048
+ } | null;
2049
+ returnRequestedAt: string | null;
2050
+ }
2051
+ interface ShopperPaymentMethod {
2052
+ id: string;
2053
+ brand: string;
2054
+ lastFour: string;
2055
+ expiryMonth: string;
2056
+ expiryYear: string;
2057
+ holderName: string | null;
2058
+ isDefault: boolean;
2059
+ }
2060
+ interface ShopperStore extends ShopperStoreRef {
2061
+ city: string | null;
2062
+ email: string | null;
2063
+ phone: string | null;
2064
+ website: string | null;
2065
+ returnPolicy: string | null;
2066
+ news: boolean;
2067
+ orderCount: number;
2068
+ }
2069
+ declare const SHOPPER_CONSENT_SOURCES: readonly ["checkout", "my-account", "store-account"];
2070
+ type ShopperConsentSource = (typeof SHOPPER_CONSENT_SOURCES)[number];
2071
+ interface ShopperSavedAddress extends Omit<CartAddress, 'fromCustomer'> {
2072
+ id: string;
2073
+ label: string | null;
2074
+ isDefault: boolean;
2075
+ }
2076
+ type ShopperAddressInput = Omit<ShopperSavedAddress, 'id' | 'isDefault'>;
2077
+ interface ShopperNotificationChoices {
2078
+ sms: boolean;
2079
+ push: boolean;
2080
+ }
2081
+ interface ShopperProfile {
2082
+ phone: string | null;
2083
+ addresses: ShopperSavedAddress[];
2084
+ defaultCardId: string | null;
2085
+ notifications: ShopperNotificationChoices;
2086
+ }
2087
+ declare const SHOPPER_RETURN_METHODS: readonly ["mail", "in-store"];
2088
+ type ShopperReturnMethod = (typeof SHOPPER_RETURN_METHODS)[number];
2089
+ interface ShopperReturnRequestInput {
2090
+ items: {
2091
+ lineId: string;
2092
+ quantity: number;
2093
+ }[];
2094
+ method: ShopperReturnMethod;
2095
+ note?: string;
2096
+ }
2097
+ declare const SHOPPER_ERROR_CODES: {
2098
+ readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
2099
+ readonly RETURN_ALREADY_REQUESTED: "RETURN_ALREADY_REQUESTED";
2100
+ readonly RETURN_NOT_ALLOWED: "RETURN_NOT_ALLOWED";
2101
+ readonly STORE_HAS_NO_SUPPORT_EMAIL: "STORE_HAS_NO_SUPPORT_EMAIL";
2102
+ readonly TOO_MANY_ADDRESSES: "TOO_MANY_ADDRESSES";
2103
+ readonly STORE_NOT_LINKED: "STORE_NOT_LINKED";
2104
+ readonly STORED_METHOD_NOT_FOUND: "STORED_METHOD_NOT_FOUND";
2105
+ };
2106
+ type ShopperErrorCode = (typeof SHOPPER_ERROR_CODES)[keyof typeof SHOPPER_ERROR_CODES];
2107
+
2108
+ declare function normalizeShopperEmail(email: unknown): string | null;
2109
+
2110
+ declare function cardFromProcessorData(processorData: unknown): {
2111
+ cardBrand?: string;
2112
+ cardLastFour?: string;
2113
+ };
2114
+
1901
2115
  interface CurrencyRate {
1902
2116
  rate: number;
1903
2117
  country: string;
@@ -1966,4 +2180,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
1966
2180
  }];
1967
2181
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
1968
2182
 
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 };
2183
+ 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 AutomaticTaxPart, type AutomaticTaxRateRow, type AutomaticTaxRowStatus, type AutomaticTaxRuleRow, type AutomaticTaxTable, type AutomaticTaxTypeRow, 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, OutOfProvinceTaxes, 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, SHOPPER_CONSENT_SOURCES, SHOPPER_ERROR_CODES, SHOPPER_RETURN_METHODS, STANDARD_TAX_TYPE, 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 ShopperAddressInput, type ShopperCard, type ShopperConsentSource, type ShopperErrorCode, type ShopperIdentity, type ShopperNotificationChoices, type ShopperOrderDetail, type ShopperOrderItem, type ShopperOrderRow, type ShopperOrderStatus, type ShopperOrderTotals, type ShopperPaymentMethod, type ShopperProfile, type ShopperReturnMethod, type ShopperReturnRequestInput, type ShopperSavedAddress, type ShopperScope, type ShopperStore, type ShopperStoreRef, 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 TaxRegistration, TaxRegistrationKind, TaxSource, TaxWarningCode, 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, automaticTaxTableVersion, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAutomaticTaxTable, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cardFromProcessorData, 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, normalizeShopperEmail, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, registrationPlacesByKind, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, sha1Hex, shipsToCountry, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };