@final-commerce/common 2.12.0-staging.6 → 2.12.1-preprod.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -424,29 +424,11 @@ declare enum BookingType {
424
424
  }
425
425
  declare enum BookingRatePeriod {
426
426
  SLOT = "slot",
427
- HOUR = "hour",
428
- SESSION = "session",
429
427
  DAY = "day",
430
428
  NIGHT = "night",
431
429
  WEEK = "week",
432
430
  MONTH = "month"
433
431
  }
434
- declare enum BookingDurationUnit {
435
- MINUTE = "minute",
436
- HOUR = "hour",
437
- DAY = "day",
438
- NIGHT = "night",
439
- WEEK = "week",
440
- MONTH = "month"
441
- }
442
- declare enum BookingSessionSale {
443
- SESSION = "session",
444
- COURSE = "course"
445
- }
446
- declare enum BookingArriveLeave {
447
- SET_TIMES = "set-times",
448
- OPENING_HOURS = "opening-hours"
449
- }
450
432
  declare enum BookingResourceKind {
451
433
  ASSET = "asset",
452
434
  ROOM = "room",
@@ -508,6 +490,25 @@ declare enum ShippingZoneError {
508
490
  MISSING_NAME = "MISSING_NAME"
509
491
  }
510
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
+
511
512
  declare enum SalesLineAction {
512
513
  SALE = "sale",
513
514
  REFUND = "refund"
@@ -966,6 +967,28 @@ interface MeasurementUnit {
966
967
  sellable?: false;
967
968
  }
968
969
 
970
+ declare enum TaxExceptionSource {
971
+ PRODUCT = "product",
972
+ CATEGORY = "category"
973
+ }
974
+ interface TaxException {
975
+ place: string;
976
+ skip: string[];
977
+ reason?: string;
978
+ setBy?: string;
979
+ setAt?: string;
980
+ }
981
+ interface OrderTaxSkip {
982
+ code: string;
983
+ name: string;
984
+ place: string;
985
+ source: TaxExceptionSource | `${TaxExceptionSource}`;
986
+ label: string;
987
+ categoryId?: string;
988
+ reason?: string;
989
+ }
990
+ declare const TAX_EXCEPTION_REASON_MAX = 200;
991
+
969
992
  type CompositeItemUnavailable = 'deleted' | 'inactive' | 'hidden' | 'empty' | 'out_of_stock' | 'by_date' | 'fully_booked' | 'marked_sold_out';
970
993
 
971
994
  interface CompositeShelf {
@@ -1105,6 +1128,90 @@ interface LineStockMove {
1105
1128
  }
1106
1129
  declare function lineStockMoves(item: StockLine, quantity: number, reservations?: readonly StockReservationLink[]): LineStockMove[];
1107
1130
 
1131
+ interface ShellTipOption {
1132
+ label: string;
1133
+ value: number;
1134
+ }
1135
+ interface ShellTipSettings {
1136
+ enabled?: boolean;
1137
+ tip1?: ShellTipOption;
1138
+ tip2?: ShellTipOption;
1139
+ tip3?: ShellTipOption;
1140
+ customTipLabel?: string;
1141
+ noTipLabel?: string;
1142
+ }
1143
+ interface ShellSettings {
1144
+ pinSwitchUser?: boolean;
1145
+ pinSession?: boolean;
1146
+ stationLock?: number;
1147
+ buildTimeout?: number;
1148
+ lockedAccess?: boolean;
1149
+ cashManagement?: boolean;
1150
+ tips?: ShellTipSettings;
1151
+ }
1152
+ type ShellTipsLevel = Pick<ShellSettings, 'tips'>;
1153
+
1154
+ type ShellSettingsSource = 'station' | 'outlet' | 'flow' | 'company' | 'default';
1155
+ interface ShellSettingsLevels {
1156
+ station?: ShellSettings | null;
1157
+ outlet?: ShellTipsLevel | null;
1158
+ flow?: ShellTipsLevel | null;
1159
+ company?: ShellTipsLevel | null;
1160
+ }
1161
+ type ResolvedShellTipSettings = Required<ShellTipSettings>;
1162
+ interface ResolvedShellSettings {
1163
+ pinSwitchUser: boolean;
1164
+ pinSession: boolean;
1165
+ stationLock: number;
1166
+ buildTimeout: number;
1167
+ lockedAccess: boolean;
1168
+ cashManagement: boolean;
1169
+ tips: ResolvedShellTipSettings;
1170
+ }
1171
+ type TopField = Exclude<keyof ShellSettings, 'tips'>;
1172
+ type TipField = keyof ShellTipSettings;
1173
+ type ShellStationField = TopField;
1174
+ type ShellTipField = TipField;
1175
+ interface ShellSettingsSources {
1176
+ fields: Record<TopField, ShellSettingsSource>;
1177
+ tips: Record<TipField, ShellSettingsSource>;
1178
+ }
1179
+ declare const DEFAULT_SHELL_SETTINGS: ResolvedShellSettings;
1180
+ declare function resolveShellSettingsWithSources(levels: ShellSettingsLevels): {
1181
+ settings: ResolvedShellSettings;
1182
+ sources: ShellSettingsSources;
1183
+ };
1184
+ declare function resolveShellSettings(levels: ShellSettingsLevels): ResolvedShellSettings;
1185
+ declare const SHELL_TIP_PERCENT_MIN = 1;
1186
+ declare const SHELL_TIP_PERCENT_MAX = 100;
1187
+ declare const SHELL_TIP_LABEL_MAX_LENGTH = 20;
1188
+ type ShellSettingsProblemCode = 'boolean' | 'timeout' | 'percent' | 'label' | 'preset';
1189
+ interface ShellSettingsProblem {
1190
+ field: string;
1191
+ code: ShellSettingsProblemCode;
1192
+ }
1193
+ declare const isShellTipPercent: (raw: unknown) => boolean;
1194
+ declare function shellTipSettingsProblems(tips: ShellTipSettings | null | undefined): ShellSettingsProblem[];
1195
+ declare function shellSettingsProblems(settings: ShellSettings | null | undefined): ShellSettingsProblem[];
1196
+ declare const SHELL_FLOW_SETTINGS_PREFIX = "flowSettingsKey";
1197
+ declare const SHELL_FLOW_TIPS_KEY = "flowSettingsKey.tips";
1198
+ declare function readShellTipSettings(raw: unknown): ShellTipSettings | undefined;
1199
+ declare function shellSettingsFromFlowSettings(dict: Record<string, string> | null | undefined): ShellTipsLevel;
1200
+ declare function flowSettingsFromShellSettings(settings: ShellTipsLevel): Record<string, string>;
1201
+ declare function shellSettingsFromCompanyTips(enabled: unknown, options: unknown): ShellTipsLevel;
1202
+
1203
+ declare function emailKey(email: string | null | undefined): string | null;
1204
+ declare function phoneKey(phone: string | null | undefined): string | null;
1205
+ declare const CUSTOMER_CONTACT_VERIFIED = "CUSTOMER_CONTACT_VERIFIED";
1206
+ declare const CUSTOMER_EMAIL_TAKEN = "CUSTOMER_EMAIL_TAKEN";
1207
+ type ContactSide = {
1208
+ email?: string | null;
1209
+ phone?: string | null;
1210
+ };
1211
+ declare function verifiedContactChange(existing: ContactSide & {
1212
+ verifiedShopperAt?: Date | string | null;
1213
+ }, change: ContactSide): 'email' | 'phone' | null;
1214
+
1108
1215
  declare const SYSTEM_FAMILY_IDS: {
1109
1216
  readonly COUNT: "count";
1110
1217
  readonly WEIGHT: "weight-metric";
@@ -1152,7 +1259,7 @@ declare function isSystemFamilyCode(code: string): boolean;
1152
1259
  declare function deriveUnitId(abbreviation: string, documentId: string): string;
1153
1260
 
1154
1261
  type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
1155
- type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
1262
+ type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'return_pending' | 'returned' | 'partially_returned' | 'cancelled';
1156
1263
  declare const PAYMENT_STATES: readonly PaymentState[];
1157
1264
  declare const FULFILLMENT_STATES: readonly FulfillmentState[];
1158
1265
  declare function isPaymentState(value: string): value is PaymentState;
@@ -1660,52 +1767,22 @@ interface WeeklyHours {
1660
1767
  openMinute: number;
1661
1768
  closeMinute: number;
1662
1769
  }
1663
- interface BookingDuration {
1664
- count: number;
1665
- unit: BookingDurationUnit | `${BookingDurationUnit}`;
1666
- }
1667
- interface BookingTimeSlots {
1668
- length: BookingDuration;
1669
- weeklyHours?: WeeklyHours[];
1670
- }
1671
- interface BookingDateRanges {
1672
- weeklyHours?: WeeklyHours[];
1673
- arrivalDays?: number[];
1674
- arriveLeave?: BookingArriveLeave | `${BookingArriveLeave}`;
1675
- checkInTime?: string | null;
1676
- checkOutTime?: string | null;
1677
- checkTimesByWeekday?: {
1678
- weekday: number;
1679
- checkInTime: string;
1680
- checkOutTime: string;
1681
- }[] | null;
1682
- minStay?: BookingDuration;
1683
- maxStay?: BookingDuration;
1684
- }
1685
1770
  interface BookingRulesInput {
1686
1771
  ratePeriod: BookingRatePeriod | `${BookingRatePeriod}`;
1687
1772
  slot: {
1688
- lengthMinutes?: number;
1773
+ lengthMinutes: number;
1689
1774
  bufferMinutes?: number;
1690
1775
  minimumToRun?: number;
1691
1776
  minStay?: number;
1692
1777
  maxStay?: number;
1693
1778
  sharedAcrossProducts?: boolean;
1694
- maxQtyPerBooking?: number;
1695
- maxPartySize?: number;
1696
- wholePeriods?: boolean;
1697
- buffer?: BookingDuration;
1698
1779
  };
1699
1780
  window: {
1700
1781
  maxAdvanceDays?: number;
1701
- maxAdvanceMinutes?: number;
1702
1782
  minNoticeMinutes?: number;
1703
1783
  holdMinutes?: number;
1704
1784
  bookableFrom?: Date | string | null;
1705
1785
  bookableTo?: Date | string | null;
1706
- hold?: BookingDuration;
1707
- minNotice?: BookingDuration;
1708
- maxAdvance?: BookingDuration;
1709
1786
  };
1710
1787
  availability: {
1711
1788
  weeklyHours?: WeeklyHours[];
@@ -1716,29 +1793,8 @@ interface BookingRulesInput {
1716
1793
  arrivalDays?: number[];
1717
1794
  availableFrom?: Date | string | null;
1718
1795
  };
1719
- sessions?: {
1720
- sold: BookingSessionSale | `${BookingSessionSale}`;
1721
- spots?: number;
1722
- weekly?: {
1723
- weekday: number;
1724
- startMinute: number;
1725
- endMinute: number;
1726
- }[];
1727
- dates?: {
1728
- date: string;
1729
- startMinute: number;
1730
- endMinute: number;
1731
- }[];
1732
- } | null;
1733
- checkTimesByWeekday?: {
1734
- weekday: number;
1735
- checkInTime: string;
1736
- checkOutTime: string;
1737
- }[] | null;
1738
1796
  checkInTime?: string | null;
1739
1797
  checkOutTime?: string | null;
1740
- timeSlots?: BookingTimeSlots | null;
1741
- dateRanges?: BookingDateRanges | null;
1742
1798
  }
1743
1799
  interface BusyWindow {
1744
1800
  startAt: Date;
@@ -1750,142 +1806,13 @@ interface GridSlot {
1750
1806
  bufferEndAt: Date;
1751
1807
  canStart: boolean;
1752
1808
  }
1753
- declare const UNLIMITED_PLACES: number;
1754
1809
  declare class BookingRulesError extends Error {
1755
1810
  constructor(message: string);
1756
1811
  }
1757
1812
 
1758
1813
  declare function windowEndsAt(rule: BookingRulesInput, now: Date): Date | null;
1759
- declare function windowEndsAtInZone(rule: BookingRulesInput, now: Date, timeZone: string | null): Date | null;
1760
- declare const startsPastMaxAdvance: (rule: BookingRulesInput, startAt: Date, now: Date, timeZone: string) => boolean;
1761
- declare function maxAdvanceMinutesOf(rule: Pick<BookingRulesInput, 'window'>): number;
1762
- interface BookingRuleDurations {
1763
- buffer?: BookingDuration;
1764
- hold?: BookingDuration;
1765
- minNotice?: BookingDuration;
1766
- maxAdvance?: BookingDuration;
1767
- }
1768
- declare function ruleDurationsOf(rule: Pick<BookingRulesInput, 'slot' | 'window'>): BookingRuleDurations;
1769
- declare function oldMaxAdvanceOf({ maxAdvanceMinutes, maxAdvanceDays, }: BookingRulesInput['window']): BookingDuration | undefined;
1770
- declare function sessionCells(rule: BookingRulesInput, timeZone: string, from: Date, to: Date): GridSlot[];
1771
- declare function calendarDate(value: string): [number, number, number];
1772
1814
  declare function buildGrid(rule: BookingRulesInput, timeZone: string, from: Date, to: Date, now: Date, busy?: BusyWindow[]): GridSlot[];
1773
- type CellChain = (previous: GridSlot, next: GridSlot) => boolean;
1774
- declare function cellChainOf(rule: Pick<BookingRulesInput, 'ratePeriod'>, timeZone: string): CellChain;
1775
- declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date, chain?: CellChain): GridSlot[];
1776
-
1777
- type BookingDurationField = 'timeSlots.length' | 'slot.buffer' | 'window.hold' | 'window.minNotice' | 'window.maxAdvance' | 'dateRanges.minStay' | 'dateRanges.maxStay';
1778
- type Units = readonly BookingDurationUnit[];
1779
- declare function allowedDurationUnits(rule: Pick<BookingRulesInput, 'ratePeriod'>, field: BookingDurationField): Units;
1780
- type BookingDurationProblemKind = 'count' | 'unit' | 'not-for-type' | 'min-above-max';
1781
- interface BookingDurationProblem {
1782
- field: BookingDurationField;
1783
- kind: BookingDurationProblemKind;
1784
- message: string;
1785
- allowed?: readonly BookingDurationUnit[];
1786
- min?: BookingDuration;
1787
- max?: BookingDuration;
1788
- }
1789
- declare function durationProblems(rule: BookingRulesInput): BookingDurationProblem[];
1790
- declare const shortestMinutesOf: ({ count, unit }: BookingDuration) => number;
1791
- declare const longestMinutesOf: ({ count, unit }: BookingDuration) => number;
1792
- declare const durationText: ({ count, unit }: BookingDuration) => string;
1793
-
1794
- interface BookingRentalEnd {
1795
- periods: number;
1796
- endAt: string;
1797
- lastDayKey: string;
1798
- coveredSlots: {
1799
- startAt: string;
1800
- dayKey: string;
1801
- }[];
1802
- }
1803
-
1804
- declare const DEFAULT_HOLD_MINUTES = 10;
1805
- interface PlanWindowInput {
1806
- rule: BookingRulesInput;
1807
- timeZone: string;
1808
- presence?: WeeklyHours[] | null;
1809
- startAt: Date;
1810
- endAt: Date;
1811
- now: Date;
1812
- busy?: BusyWindow[];
1813
- }
1814
- declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
1815
- slots: GridSlot[];
1816
- periods: number;
1817
- endAt: Date;
1818
- bufferEndAt: Date;
1819
- };
1820
- interface WindowForPeriodsInput {
1821
- rule: BookingRulesInput;
1822
- timeZone: string;
1823
- startAt: Date;
1824
- periods: number;
1825
- now: Date;
1826
- }
1827
- declare function windowForPeriods({ rule, timeZone, startAt, periods, now }: WindowForPeriodsInput): {
1828
- startAt: Date;
1829
- endAt: Date;
1830
- };
1831
- interface RentalEndsInput {
1832
- rule: BookingRulesInput;
1833
- timeZone: string;
1834
- startAt: Date;
1835
- now: Date;
1836
- untilDay: string;
1837
- }
1838
- declare function rentalEnds(input: RentalEndsInput): BookingRentalEnd[];
1839
- interface PlanCourseInput {
1840
- rule: BookingRulesInput;
1841
- timeZone: string;
1842
- presence?: WeeklyHours[] | null;
1843
- now: Date;
1844
- }
1845
- declare function courseSessions(rule: BookingRulesInput, timeZone: string): GridSlot[];
1846
- declare function courseSpan(rule: BookingRulesInput, timeZone: string): {
1847
- from: Date;
1848
- to: Date;
1849
- };
1850
- declare const courseStarted: (rule: BookingRulesInput, sessions: GridSlot[], now: Date) => boolean;
1851
- declare function courseStartedInZone(rule: BookingRulesInput, sessions: GridSlot[], now: Date, timeZone: string): boolean;
1852
- declare function planCourse({ rule, timeZone, presence, now }: PlanCourseInput): GridSlot[];
1853
- declare function holdExpiresAt(rule: BookingRulesInput, now: Date): Date;
1854
- declare function checkQtyPerBooking(rule: BookingRulesInput, qty: number): void;
1855
- declare function checkPartySize(rule: BookingRulesInput, partySize: number): void;
1856
- type BookingMethod = 'time-slots' | 'sessions' | 'date-ranges';
1857
- declare function bookingMethodOf(rule: Pick<BookingRulesInput, 'ratePeriod'>): BookingMethod;
1858
- declare const soldAsCourse: (rule: Pick<BookingRulesInput, "ratePeriod" | "sessions">) => boolean;
1859
- declare function capacityOf(rule: Pick<BookingRulesInput, 'ratePeriod' | 'sessions'>, resource: {
1860
- seats?: number | null;
1861
- }): number;
1862
- type BookingRuleParts = ({
1863
- method: 'time-slots';
1864
- } & Required<BookingTimeSlots>) | {
1865
- method: 'sessions';
1866
- sessions: NonNullable<BookingRulesInput['sessions']>;
1867
- } | ({
1868
- method: 'date-ranges';
1869
- ratePeriod: BookingRulesInput['ratePeriod'];
1870
- wholePeriods: boolean;
1871
- } & BookingDateRanges);
1872
- declare function bookingRuleParts(rule: BookingRulesInput): BookingRuleParts;
1873
- interface BookingRuleNewFields {
1874
- timeSlots?: Required<BookingTimeSlots>;
1875
- dateRanges?: BookingDateRanges;
1876
- 'slot.buffer'?: BookingDuration;
1877
- 'window.hold': BookingDuration;
1878
- 'window.minNotice'?: BookingDuration;
1879
- 'window.maxAdvance'?: BookingDuration;
1880
- }
1881
- interface BookingRuleInNewShape {
1882
- set: BookingRuleNewFields;
1883
- unset: string[];
1884
- problems: BookingDurationProblem[];
1885
- notes: string[];
1886
- changesBehaviour?: 'whole-periods';
1887
- }
1888
- declare function ruleInNewShape(rule: BookingRulesInput): BookingRuleInNewShape;
1815
+ declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date): GridSlot[];
1889
1816
 
1890
1817
  interface BookingOccupancy {
1891
1818
  resourceId: string;
@@ -1893,7 +1820,6 @@ interface BookingOccupancy {
1893
1820
  qty: number;
1894
1821
  startAt: Date;
1895
1822
  bufferEndAt: Date;
1896
- outletId?: string;
1897
1823
  }
1898
1824
  interface BookingResourceInput {
1899
1825
  id: string;
@@ -1908,13 +1834,11 @@ interface ResourceAvailability {
1908
1834
  capacity: number;
1909
1835
  booked: number;
1910
1836
  free: number;
1911
- unlimited?: true;
1912
1837
  }
1913
1838
  interface AvailabilitySlot extends GridSlot {
1914
1839
  capacity: number;
1915
1840
  booked: number;
1916
1841
  free: number;
1917
- unlimited?: true;
1918
1842
  resources: ResourceAvailability[];
1919
1843
  dayKey: string;
1920
1844
  }
@@ -1928,81 +1852,39 @@ interface ResourceInWindow {
1928
1852
  interface AvailabilityInput {
1929
1853
  productId: string;
1930
1854
  bookingRulesId?: string;
1855
+ bookingType?: BookingType;
1931
1856
  rule: BookingRulesInput;
1932
1857
  resources: BookingResourceInput[];
1933
1858
  occupied: BookingOccupancy[];
1934
- outletId?: string;
1935
1859
  from: Date;
1936
1860
  to: Date;
1937
1861
  now: Date;
1938
- timeZone?: string;
1939
1862
  }
1940
1863
  declare const withinPresence: (slot: GridSlot, timeZone: string, presence?: WeeklyHours[] | null) => boolean;
1941
1864
  declare function occupancyIn(occupied: BookingOccupancy[], productId: string, startAt: Date, bufferEndAt: Date, shared: boolean): {
1942
1865
  taken: number;
1943
1866
  foreignProductId?: string;
1944
1867
  };
1945
- declare function occupiedAtOutlet<T extends BookingOccupancy>(occupied: T[], rule: Pick<BookingRulesInput, 'ratePeriod'>, outletId?: string): T[];
1946
1868
  declare function shopDayKey(instant: Date, timeZone: string): string;
1947
1869
  declare function shopDayRange(fromDayKey: string, count: number, timeZone: string): {
1948
1870
  from: Date;
1949
1871
  to: Date;
1950
1872
  };
1951
- declare function buildAvailability({ productId, bookingRulesId, rule, resources, occupied: everyOutlet, outletId, from, to, now, timeZone, }: AvailabilityInput): {
1952
- course: ({
1953
- sessions: number;
1954
- alreadyStarted: boolean;
1955
- beyondWindow: boolean;
1956
- sessionTimes: {
1957
- startAt: Date;
1958
- endAt: Date;
1959
- }[];
1960
- startAt: Date;
1961
- endAt: Date;
1962
- resources: ({
1963
- resourceId: string;
1964
- free: number;
1965
- unlimited?: undefined;
1966
- } | {
1967
- resourceId: string;
1968
- free: number;
1969
- unlimited: true;
1970
- })[];
1971
- } & {
1972
- maxQtyNow?: number;
1973
- }) | undefined;
1873
+ declare function buildAvailability({ productId, bookingRulesId, bookingType, rule, resources, occupied, from, to, now, }: AvailabilityInput): {
1974
1874
  resources: ResourceInWindow[];
1975
- slots: (AvailabilitySlot & {
1976
- unlimited?: true;
1977
- } & {
1978
- maxQtyNow?: number;
1979
- })[];
1875
+ slots: AvailabilitySlot[];
1980
1876
  timeZone: string;
1981
1877
  days: string[];
1982
1878
  productId: string;
1983
1879
  bookingRulesId: string | undefined;
1984
- ratePeriod: "slot" | "hour" | "session" | "day" | "night" | "week" | "month" | BookingRatePeriod;
1985
- bookingMethod: BookingMethod;
1880
+ bookingType: BookingType | undefined;
1881
+ ratePeriod: "slot" | "day" | "night" | "week" | "month" | BookingRatePeriod;
1986
1882
  minimumToRun: number | undefined;
1987
1883
  minStay: number | undefined;
1988
1884
  maxStay: number | undefined;
1989
- minStayLength: BookingDuration | undefined;
1990
- maxStayLength: BookingDuration | undefined;
1991
- maxQtyPerBooking: number | undefined;
1992
- maxPartySize: number | undefined;
1993
1885
  bookableUntil: Date | null;
1994
1886
  beyondWindow: boolean;
1995
1887
  };
1996
- declare function pickFreeResource<T extends {
1997
- free: number;
1998
- }>(slot: {
1999
- resources: T[];
2000
- }, qty?: number): T | undefined;
2001
- declare function fewestFreeOver(slots: {
2002
- startAt: Date;
2003
- endAt: Date;
2004
- resources: ResourceAvailability[];
2005
- }[], from: Date, to: Date): ResourceAvailability[];
2006
1888
  interface ResourcePresenceRow {
2007
1889
  resourceId: string;
2008
1890
  outletId: string;
@@ -2015,6 +1897,23 @@ declare function presentAt<T extends {
2015
1897
  presence?: WeeklyHours[] | null;
2016
1898
  }[];
2017
1899
 
1900
+ declare const DEFAULT_HOLD_MINUTES = 10;
1901
+ interface PlanWindowInput {
1902
+ rule: BookingRulesInput;
1903
+ timeZone: string;
1904
+ presence?: WeeklyHours[] | null;
1905
+ startAt: Date;
1906
+ endAt: Date;
1907
+ now: Date;
1908
+ busy?: BusyWindow[];
1909
+ }
1910
+ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
1911
+ slots: GridSlot[];
1912
+ endAt: Date;
1913
+ bufferEndAt: Date;
1914
+ };
1915
+ declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
1916
+
2018
1917
  interface ShippingPlace {
2019
1918
  country: string;
2020
1919
  province?: string | null;
@@ -2034,6 +1933,8 @@ interface ShippingOptionRule {
2034
1933
  freeOver?: number | null;
2035
1934
  minDays?: number | null;
2036
1935
  maxDays?: number | null;
1936
+ minMinutes?: number | null;
1937
+ maxMinutes?: number | null;
2037
1938
  channels: (ShippingChannel | `${ShippingChannel}`)[];
2038
1939
  outletId?: string | null;
2039
1940
  }
@@ -2069,6 +1970,8 @@ interface ShippingQuoteOption {
2069
1970
  amountToFree: number | null;
2070
1971
  minDays: number | null;
2071
1972
  maxDays: number | null;
1973
+ minMinutes: number | null;
1974
+ maxMinutes: number | null;
2072
1975
  outletId: string | null;
2073
1976
  }
2074
1977
  interface ShippingResolution {
@@ -2118,12 +2021,248 @@ declare function addressPlaceKeys(address: NormalizedAddress): string[];
2118
2021
  declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
2119
2022
  declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
2120
2023
 
2024
+ interface ShippingDuration {
2025
+ unit: 'minute' | 'hour';
2026
+ min: number;
2027
+ max: number;
2028
+ }
2029
+ declare function shippingDuration(minMinutes: number | null | undefined, maxMinutes: number | null | undefined): ShippingDuration | null;
2030
+ declare function formatShippingDuration(minMinutes: number | null | undefined, maxMinutes: number | null | undefined, locale?: string, display?: 'long' | 'short'): string | null;
2031
+
2121
2032
  interface ShippingZoneProblem {
2122
2033
  code: ShippingZoneError;
2123
2034
  optionId?: string;
2124
2035
  }
2125
2036
  declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
2126
2037
 
2038
+ interface TaxRegistration {
2039
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
2040
+ place: string;
2041
+ number?: string | null;
2042
+ from?: string | null;
2043
+ }
2044
+
2045
+ declare const STANDARD_TAX_TYPE = "standard";
2046
+ type AutomaticTaxRowStatus = 'confirmed' | 'to_confirm';
2047
+ interface AutomaticTaxTypeRow {
2048
+ key: string;
2049
+ name: string;
2050
+ description?: string | null;
2051
+ sortOrder: number;
2052
+ active: boolean;
2053
+ }
2054
+ interface AutomaticTaxPart {
2055
+ code: string;
2056
+ name: string;
2057
+ rate: string;
2058
+ level: 'federal' | 'provincial';
2059
+ }
2060
+ interface AutomaticTaxRateRow {
2061
+ code: string;
2062
+ name: string;
2063
+ kind: TaxRegistrationKind | `${TaxRegistrationKind}`;
2064
+ places: string[];
2065
+ rate: string;
2066
+ from?: string | null;
2067
+ to?: string | null;
2068
+ order: number;
2069
+ compound: boolean;
2070
+ registrationPlace: string;
2071
+ harmonized: boolean;
2072
+ parts?: AutomaticTaxPart[] | null;
2073
+ sourceUrl?: string | null;
2074
+ status: AutomaticTaxRowStatus;
2075
+ }
2076
+ interface AutomaticTaxRuleRow {
2077
+ taxType: string;
2078
+ codes: string[];
2079
+ rate: string;
2080
+ from?: string | null;
2081
+ to?: string | null;
2082
+ sourceUrl?: string | null;
2083
+ status: AutomaticTaxRowStatus;
2084
+ note?: string | null;
2085
+ }
2086
+ interface AutomaticTaxTable {
2087
+ version: string;
2088
+ types: AutomaticTaxTypeRow[];
2089
+ rates: AutomaticTaxRateRow[];
2090
+ rules: AutomaticTaxRuleRow[];
2091
+ }
2092
+ declare function automaticTaxTableVersion(table: Omit<AutomaticTaxTable, 'version'>): string;
2093
+ declare function buildAutomaticTaxTable(rows: {
2094
+ types: readonly AutomaticTaxTypeRow[];
2095
+ rates: readonly AutomaticTaxRateRow[];
2096
+ rules: readonly AutomaticTaxRuleRow[];
2097
+ }): AutomaticTaxTable;
2098
+ declare function registrationPlacesByKind(rates: readonly AutomaticTaxRateRow[]): ReadonlyMap<string, readonly string[]>;
2099
+
2100
+ declare function sha1Hex(text: string): string;
2101
+
2102
+ interface CartAddress {
2103
+ firstName?: string;
2104
+ lastName?: string;
2105
+ address1?: string;
2106
+ address2?: string;
2107
+ city?: string;
2108
+ state?: string;
2109
+ postCode?: string;
2110
+ country?: string;
2111
+ fromCustomer?: boolean;
2112
+ }
2113
+
2114
+ type ShopperScope = {
2115
+ kind: 'all';
2116
+ } | {
2117
+ kind: 'store';
2118
+ companyId: string;
2119
+ };
2120
+ interface ShopperIdentity {
2121
+ id: string;
2122
+ emails: string[];
2123
+ scope: ShopperScope;
2124
+ }
2125
+ type ShopperOrderStatus = 'paid' | 'partially_refunded' | 'refunded' | 'cancelled';
2126
+ interface ShopperStoreRef {
2127
+ companyId: string;
2128
+ name: string;
2129
+ logo: string | null;
2130
+ }
2131
+ interface ShopperOrderRow {
2132
+ orderId: string;
2133
+ receiptId: string;
2134
+ placedAt: string;
2135
+ store: ShopperStoreRef;
2136
+ paymentState: PaymentState;
2137
+ fulfillmentState: FulfillmentState;
2138
+ displayState: string;
2139
+ status?: ShopperOrderStatus;
2140
+ total: number;
2141
+ currency: CurrencyCode | null;
2142
+ itemCount: number;
2143
+ }
2144
+ interface ShopperOrderItem {
2145
+ lineId: string;
2146
+ name: string;
2147
+ variant: string | null;
2148
+ quantity: number;
2149
+ total: number;
2150
+ }
2151
+ interface ShopperOrderTotals {
2152
+ subtotal: number;
2153
+ discount: number;
2154
+ tax: number;
2155
+ shipping: number;
2156
+ refunded: number;
2157
+ }
2158
+ interface ShopperCard {
2159
+ brand: string;
2160
+ lastFour: string;
2161
+ }
2162
+ type ShopperPaymentKind = 'card' | 'cash' | 'gift_card' | 'pay_later' | 'other';
2163
+ interface ShopperPayment {
2164
+ kind: ShopperPaymentKind;
2165
+ name: string | null;
2166
+ lastFour: string | null;
2167
+ amount: number;
2168
+ }
2169
+ interface ShopperOrderDetail extends ShopperOrderRow {
2170
+ items: ShopperOrderItem[];
2171
+ totals: ShopperOrderTotals;
2172
+ card: ShopperCard | null;
2173
+ payments?: ShopperPayment[];
2174
+ delivery: {
2175
+ type: 'pickup' | 'shipping';
2176
+ place: string | null;
2177
+ } | null;
2178
+ returnRequestedAt: string | null;
2179
+ returnRequest: ShopperReturnRequestState | null;
2180
+ }
2181
+ interface ShopperPaymentMethod {
2182
+ id: string;
2183
+ brand: string;
2184
+ lastFour: string;
2185
+ expiryMonth: string;
2186
+ expiryYear: string;
2187
+ holderName: string | null;
2188
+ isDefault: boolean;
2189
+ }
2190
+ interface ShopperStore extends ShopperStoreRef {
2191
+ city: string | null;
2192
+ email: string | null;
2193
+ phone: string | null;
2194
+ website: string | null;
2195
+ returnPolicy: string | null;
2196
+ news: boolean;
2197
+ orderCount: number;
2198
+ }
2199
+ declare const SHOPPER_CONSENT_SOURCES: readonly ["checkout", "my-account", "store-account"];
2200
+ type ShopperConsentSource = (typeof SHOPPER_CONSENT_SOURCES)[number];
2201
+ interface ShopperSavedAddress extends Omit<CartAddress, 'fromCustomer'> {
2202
+ id: string;
2203
+ label: string | null;
2204
+ isDefault: boolean;
2205
+ }
2206
+ type ShopperAddressInput = Omit<ShopperSavedAddress, 'id' | 'isDefault'>;
2207
+ interface ShopperNotificationChoices {
2208
+ sms: boolean;
2209
+ push: boolean;
2210
+ }
2211
+ interface ShopperProfile {
2212
+ phone: string | null;
2213
+ addresses: ShopperSavedAddress[];
2214
+ defaultCardId: string | null;
2215
+ notifications: ShopperNotificationChoices;
2216
+ }
2217
+ declare const SHOPPER_RETURN_METHODS: readonly ["mail", "in-store"];
2218
+ type ShopperReturnMethod = (typeof SHOPPER_RETURN_METHODS)[number];
2219
+ declare const SHOPPER_RETURN_STATUSES: readonly ["requested", "accepted", "declined"];
2220
+ type ShopperReturnStatus = (typeof SHOPPER_RETURN_STATUSES)[number];
2221
+ declare const SHOPPER_RETURN_DECLINE_REASON_MAX = 500;
2222
+ interface ShopperReturnRequestState {
2223
+ status: ShopperReturnStatus;
2224
+ requestedAt: string;
2225
+ decidedAt: string | null;
2226
+ declineReason: string | null;
2227
+ }
2228
+ interface ShopperReturnRequestInput {
2229
+ items: {
2230
+ lineId: string;
2231
+ quantity: number;
2232
+ }[];
2233
+ method: ShopperReturnMethod;
2234
+ note?: string;
2235
+ }
2236
+ declare const SHOPPER_ERROR_CODES: {
2237
+ readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
2238
+ readonly RETURN_ALREADY_REQUESTED: "RETURN_ALREADY_REQUESTED";
2239
+ readonly RETURN_NOT_ALLOWED: "RETURN_NOT_ALLOWED";
2240
+ readonly RETURN_ALREADY_DECIDED: "RETURN_ALREADY_DECIDED";
2241
+ readonly STORE_HAS_NO_SUPPORT_EMAIL: "STORE_HAS_NO_SUPPORT_EMAIL";
2242
+ readonly TOO_MANY_ADDRESSES: "TOO_MANY_ADDRESSES";
2243
+ readonly STORE_NOT_LINKED: "STORE_NOT_LINKED";
2244
+ readonly STORED_METHOD_NOT_FOUND: "STORED_METHOD_NOT_FOUND";
2245
+ };
2246
+ type ShopperErrorCode = (typeof SHOPPER_ERROR_CODES)[keyof typeof SHOPPER_ERROR_CODES];
2247
+
2248
+ declare function normalizeShopperEmail(email: unknown): string | null;
2249
+
2250
+ declare function cardFromProcessorData(processorData: unknown): {
2251
+ cardBrand?: string;
2252
+ cardLastFour?: string;
2253
+ cardIssuer?: string;
2254
+ };
2255
+
2256
+ type PaymentLegLike = {
2257
+ paymentType?: string;
2258
+ amount?: number;
2259
+ tip?: {
2260
+ amount?: number;
2261
+ } | null;
2262
+ emv?: string | null;
2263
+ };
2264
+ declare function shopperPaymentsOf(legs: readonly PaymentLegLike[] | null | undefined): ShopperPayment[];
2265
+
2127
2266
  interface CurrencyRate {
2128
2267
  rate: number;
2129
2268
  country: string;
@@ -2192,4 +2331,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
2192
2331
  }];
2193
2332
  type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
2194
2333
 
2195
- 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, BookingArriveLeave, type BookingDateRanges, type BookingDuration, type BookingDurationField, type BookingDurationProblem, type BookingDurationProblemKind, BookingDurationUnit, type BookingMethod, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, type BookingRuleDurations, type BookingRuleInNewShape, type BookingRuleNewFields, type BookingRuleParts, BookingRulesError, type BookingRulesInput, BookingSessionSale, type BookingTimeSlots, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, type CellChain, 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 PlanCourseInput, 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, type RentalEndsInput, 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, UNLIMITED_PLACES, UserTypes, type WeeklyHours, type WindowForPeriodsInput, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, allowedDurationUnits, amountToString, ancestorChain, applyAssignment, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, bookingMethodOf, bookingRuleParts, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, calendarDate, canTransition, capacityOf, cellChainOf, cheapestCompositeItem, cheapestCompositePrice, checkPartySize, checkQtyPerBooking, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, courseSessions, courseSpan, courseStarted, courseStartedInZone, createAmount, crossAxisRuleApplies, currentAssignees, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, durationProblems, durationText, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, fewestFreeOver, 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, longestMinutesOf, mapToLegacyStatus, maxAdvanceMinutesOf, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, occupiedAtOutlet, oldMaxAdvanceOf, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, pickFreeResource, placeKey, planCourse, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, rentalEnds, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, ruleDurationsOf, ruleInNewShape, sameFamily, sessionCells, setOrderState, shipsToCountry, shopDayKey, shopDayRange, shortestMinutesOf, signReportForDisplay, slotsForWindow, soldAsCourse, startsPastMaxAdvance, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, windowEndsAtInZone, windowForPeriods, withinPresence };
2334
+ 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, CUSTOMER_CONTACT_VERIFIED, CUSTOMER_EMAIL_TAKEN, 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_SHELL_SETTINGS, 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 OrderTaxSkip, type OrderWriteStrategy, OtherFixedRates, OutOfProvinceTaxes, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, type PaymentLegLike, 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 ResolvedShellSettings, type ResolvedShellTipSettings, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, SHELL_FLOW_SETTINGS_PREFIX, SHELL_FLOW_TIPS_KEY, SHELL_TIP_LABEL_MAX_LENGTH, SHELL_TIP_PERCENT_MAX, SHELL_TIP_PERCENT_MIN, SHIPPING_COUNTRIES, SHOPPER_CONSENT_SOURCES, SHOPPER_ERROR_CODES, SHOPPER_RETURN_DECLINE_REASON_MAX, SHOPPER_RETURN_METHODS, SHOPPER_RETURN_STATUSES, 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, type ShellSettings, type ShellSettingsLevels, type ShellSettingsProblem, type ShellSettingsProblemCode, type ShellSettingsSource, type ShellSettingsSources, type ShellStationField, type ShellTipField, type ShellTipOption, type ShellTipSettings, type ShellTipsLevel, ShippingChannel, type ShippingDuration, 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 ShopperPayment, type ShopperPaymentKind, type ShopperPaymentMethod, type ShopperProfile, type ShopperReturnMethod, type ShopperReturnRequestInput, type ShopperReturnRequestState, type ShopperReturnStatus, 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, TAX_EXCEPTION_REASON_MAX, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxException, TaxExceptionSource, 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, emailKey, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, flowSettingsFromShellSettings, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, formatShippingDuration, 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, isShellTipPercent, 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, phoneKey, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, readShellTipSettings, registrationPlacesByKind, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShellSettings, resolveShellSettingsWithSources, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, sha1Hex, shellSettingsFromCompanyTips, shellSettingsFromFlowSettings, shellSettingsProblems, shellTipSettingsProblems, shippingDuration, shipsToCountry, shopDayKey, shopDayRange, shopperPaymentsOf, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, verifiedContactChange, violatesFinancialInvariant, windowEndsAt, withinPresence };