@final-commerce/common 2.4.1-staging2.1 → 2.5.0-staging.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 +379 -19
- package/dist/index.d.ts +379 -19
- package/dist/index.js +827 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +790 -41
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +315 -95
- package/dist/pos-types/index.d.ts +315 -95
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -389,7 +389,9 @@ declare enum StripeCurrencyCode {
|
|
|
389
389
|
|
|
390
390
|
declare enum ProductType {
|
|
391
391
|
SIMPLE = "simple",
|
|
392
|
-
VARIABLE = "variable"
|
|
392
|
+
VARIABLE = "variable",
|
|
393
|
+
BOOKING = "booking",
|
|
394
|
+
COMPOSITE = "composite"
|
|
393
395
|
}
|
|
394
396
|
declare enum ProductStatus {
|
|
395
397
|
ACTIVE = "active",
|
|
@@ -403,6 +405,43 @@ declare enum PaymentProcessor {
|
|
|
403
405
|
EXTERNAL = "external"
|
|
404
406
|
}
|
|
405
407
|
|
|
408
|
+
declare enum BookingType {
|
|
409
|
+
RENTAL = "rental",
|
|
410
|
+
APPOINTMENT = "appointment",
|
|
411
|
+
OVERNIGHT = "overnight",
|
|
412
|
+
GROUP = "group"
|
|
413
|
+
}
|
|
414
|
+
declare enum BookingRatePeriod {
|
|
415
|
+
SLOT = "slot",
|
|
416
|
+
DAY = "day",
|
|
417
|
+
NIGHT = "night",
|
|
418
|
+
WEEK = "week",
|
|
419
|
+
MONTH = "month"
|
|
420
|
+
}
|
|
421
|
+
declare enum BookingResourceKind {
|
|
422
|
+
ASSET = "asset",
|
|
423
|
+
ROOM = "room",
|
|
424
|
+
PROPERTY = "property",
|
|
425
|
+
SPACE = "space",
|
|
426
|
+
STAFF = "staff",
|
|
427
|
+
TABLE = "table"
|
|
428
|
+
}
|
|
429
|
+
declare enum ReservationStatus {
|
|
430
|
+
HELD = "held",
|
|
431
|
+
CONFIRMED = "confirmed",
|
|
432
|
+
CANCELLED = "cancelled",
|
|
433
|
+
EXPIRED = "expired"
|
|
434
|
+
}
|
|
435
|
+
declare enum BookingResourceStatus {
|
|
436
|
+
ACTIVE = "active",
|
|
437
|
+
INACTIVE = "inactive"
|
|
438
|
+
}
|
|
439
|
+
declare enum ResourceAvailabilityState {
|
|
440
|
+
AVAILABLE = "available",
|
|
441
|
+
FULLY_BOOKED = "fullyBooked",
|
|
442
|
+
NO_HOURS_IN_RANGE = "noHoursInRange"
|
|
443
|
+
}
|
|
444
|
+
|
|
406
445
|
interface CurrencyConfig {
|
|
407
446
|
minorUnits: number;
|
|
408
447
|
symbol: string;
|
|
@@ -674,6 +713,85 @@ declare function generateMongoID(): string;
|
|
|
674
713
|
declare function getCurrentISODate(): string;
|
|
675
714
|
declare function normalizeMongoIdString(value: unknown): string | null;
|
|
676
715
|
|
|
716
|
+
interface CompositePriceItem {
|
|
717
|
+
extraCharge: number;
|
|
718
|
+
quantity: number;
|
|
719
|
+
available: boolean;
|
|
720
|
+
}
|
|
721
|
+
interface CompositePricePart {
|
|
722
|
+
min: number;
|
|
723
|
+
items: CompositePriceItem[];
|
|
724
|
+
}
|
|
725
|
+
declare const compositeItemCost: (item: CompositePriceItem) => number;
|
|
726
|
+
declare function cheapestCompositeItem(items: CompositePriceItem[]): number | undefined;
|
|
727
|
+
declare function cheapestCompositePrice(parts: CompositePricePart[]): number | undefined;
|
|
728
|
+
|
|
729
|
+
type ModifierSelectionType = 'single' | 'multiple' | 'quantity';
|
|
730
|
+
interface ResolvedModifierChoice {
|
|
731
|
+
_id: string;
|
|
732
|
+
name: string;
|
|
733
|
+
price: number;
|
|
734
|
+
isDefault?: boolean;
|
|
735
|
+
defaultQuantity?: number;
|
|
736
|
+
unavailableOutletIds?: string[];
|
|
737
|
+
sortOrder: number;
|
|
738
|
+
}
|
|
739
|
+
interface ResolvedModifier {
|
|
740
|
+
_id: string;
|
|
741
|
+
name: string;
|
|
742
|
+
selectionType: ModifierSelectionType;
|
|
743
|
+
allowQuantity?: boolean;
|
|
744
|
+
required: boolean;
|
|
745
|
+
min?: number | null;
|
|
746
|
+
max?: number | null;
|
|
747
|
+
sortOrder: number;
|
|
748
|
+
choices: ResolvedModifierChoice[];
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
interface ModifierChoiceRow {
|
|
752
|
+
_id: string;
|
|
753
|
+
name: string;
|
|
754
|
+
price?: number;
|
|
755
|
+
sortOrder?: number;
|
|
756
|
+
isDefault?: boolean;
|
|
757
|
+
defaultQuantity?: number;
|
|
758
|
+
unavailableOutletIds?: string[];
|
|
759
|
+
}
|
|
760
|
+
interface ModifierRow {
|
|
761
|
+
_id: string;
|
|
762
|
+
name: string;
|
|
763
|
+
selectionType: ModifierSelectionType;
|
|
764
|
+
allowQuantity?: boolean;
|
|
765
|
+
choices?: ModifierChoiceRow[];
|
|
766
|
+
isDeleted?: boolean;
|
|
767
|
+
}
|
|
768
|
+
interface CategoryModifierRow {
|
|
769
|
+
_id: string;
|
|
770
|
+
modifierId: string;
|
|
771
|
+
categoryId: string;
|
|
772
|
+
required?: boolean;
|
|
773
|
+
min?: number | null;
|
|
774
|
+
max?: number | null;
|
|
775
|
+
sortOrder?: number;
|
|
776
|
+
isDeleted?: boolean;
|
|
777
|
+
}
|
|
778
|
+
interface CategoryRow {
|
|
779
|
+
_id: string;
|
|
780
|
+
parentId?: string | null;
|
|
781
|
+
isDeleted?: boolean;
|
|
782
|
+
}
|
|
783
|
+
declare function ancestorChain(categoryId: string, categoriesById: Map<string, CategoryRow>): string[];
|
|
784
|
+
interface ResolveInputs {
|
|
785
|
+
categoryIds: string[];
|
|
786
|
+
modifiers: ModifierRow[];
|
|
787
|
+
categoryModifiers: CategoryModifierRow[];
|
|
788
|
+
categories: CategoryRow[];
|
|
789
|
+
}
|
|
790
|
+
declare function resolveModifiersForProduct(inputs: ResolveInputs): ResolvedModifier[];
|
|
791
|
+
declare function isChoiceAvailableAtOutlet(choice: ResolvedModifierChoice, outletId: string): boolean;
|
|
792
|
+
declare function hasSellableChoice(modifier: ResolvedModifier, outletId: string): boolean;
|
|
793
|
+
declare const modifiersSellable: (modifiers: ResolvedModifier[], outletId: string) => boolean;
|
|
794
|
+
|
|
677
795
|
interface Measurable {
|
|
678
796
|
name: string;
|
|
679
797
|
abbreviation: string;
|
|
@@ -704,6 +822,104 @@ interface MeasurementUnit {
|
|
|
704
822
|
sellable?: false;
|
|
705
823
|
}
|
|
706
824
|
|
|
825
|
+
type CompositeItemUnavailable = 'deleted' | 'inactive' | 'hidden' | 'empty' | 'out_of_stock' | 'by_date' | 'fully_booked';
|
|
826
|
+
|
|
827
|
+
interface CompositeShelf {
|
|
828
|
+
pool: string;
|
|
829
|
+
unit?: Measurable;
|
|
830
|
+
backorder: boolean;
|
|
831
|
+
unresolved?: boolean;
|
|
832
|
+
}
|
|
833
|
+
interface CompositeAvailabilityRows {
|
|
834
|
+
variantProducts: ReadonlyMap<string, string>;
|
|
835
|
+
productStatuses: ReadonlyMap<string, string | undefined>;
|
|
836
|
+
categoryVariants: ReadonlyMap<string, readonly string[]>;
|
|
837
|
+
bookableProductIds: ReadonlySet<string>;
|
|
838
|
+
outlet?: {
|
|
839
|
+
hiddenProductIds: ReadonlySet<string>;
|
|
840
|
+
unsellableProductIds: ReadonlySet<string>;
|
|
841
|
+
shelves: ReadonlyMap<string, CompositeShelf>;
|
|
842
|
+
poolStock: ReadonlyMap<string, number | null>;
|
|
843
|
+
bookableSeats?: ReadonlyMap<string, number>;
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
declare function poolStockAt(rows: readonly {
|
|
847
|
+
outletId: unknown;
|
|
848
|
+
manageStock?: boolean;
|
|
849
|
+
quantity?: number;
|
|
850
|
+
}[], outletId: string): number | null;
|
|
851
|
+
declare function compositeVariantInStock(variantId: string, quantity: number, outlet: NonNullable<CompositeAvailabilityRows['outlet']>): boolean;
|
|
852
|
+
declare function compositeItemUnavailable(item: {
|
|
853
|
+
variantId?: unknown;
|
|
854
|
+
categoryId?: unknown;
|
|
855
|
+
quantity: number;
|
|
856
|
+
}, rows: CompositeAvailabilityRows): CompositeItemUnavailable | null;
|
|
857
|
+
interface CompositeStockPart {
|
|
858
|
+
min: number;
|
|
859
|
+
items: readonly {
|
|
860
|
+
id: string;
|
|
861
|
+
variantId?: unknown;
|
|
862
|
+
categoryId?: unknown;
|
|
863
|
+
quantity: number;
|
|
864
|
+
}[];
|
|
865
|
+
}
|
|
866
|
+
interface CompositeMakeableRow {
|
|
867
|
+
itemIds: string[];
|
|
868
|
+
partIndex?: number;
|
|
869
|
+
uses: number;
|
|
870
|
+
has: number | null;
|
|
871
|
+
makes: number | null;
|
|
872
|
+
}
|
|
873
|
+
type CompositeMakeable = {
|
|
874
|
+
byDate: true;
|
|
875
|
+
} | {
|
|
876
|
+
count: number | null;
|
|
877
|
+
rows: CompositeMakeableRow[];
|
|
878
|
+
limitedBy?: number;
|
|
879
|
+
};
|
|
880
|
+
declare function compositeMakeable(parts: readonly CompositeStockPart[], rows: CompositeAvailabilityRows): CompositeMakeable;
|
|
881
|
+
interface PoolDrawing {
|
|
882
|
+
variantId: string;
|
|
883
|
+
stockVariantId?: string;
|
|
884
|
+
quantity: number;
|
|
885
|
+
unit?: Measurable;
|
|
886
|
+
}
|
|
887
|
+
declare const poolOf: (line: PoolDrawing) => string;
|
|
888
|
+
declare function poolDemand(lines: readonly (PoolDrawing & {
|
|
889
|
+
components?: readonly PoolDrawing[];
|
|
890
|
+
})[]): Map<string, number>;
|
|
891
|
+
declare function poolShortfall(demand: ReadonlyMap<string, number>, poolStock: ReadonlyMap<string, number | null>, backordered?: ReadonlySet<string>): {
|
|
892
|
+
poolId: string;
|
|
893
|
+
available: number;
|
|
894
|
+
wanted: number;
|
|
895
|
+
} | null;
|
|
896
|
+
|
|
897
|
+
interface CompositeReservationOrder {
|
|
898
|
+
lineItems?: readonly {
|
|
899
|
+
internalId?: string;
|
|
900
|
+
components?: readonly {
|
|
901
|
+
productId: unknown;
|
|
902
|
+
}[];
|
|
903
|
+
}[];
|
|
904
|
+
reservations?: readonly {
|
|
905
|
+
bookingId?: unknown;
|
|
906
|
+
productId: unknown;
|
|
907
|
+
lineItemInternalId?: string;
|
|
908
|
+
componentIndex?: number;
|
|
909
|
+
price?: number;
|
|
910
|
+
total?: number;
|
|
911
|
+
}[];
|
|
912
|
+
}
|
|
913
|
+
declare function compositeModifierMismatches(lineItems: readonly {
|
|
914
|
+
internalId?: string;
|
|
915
|
+
components?: readonly unknown[];
|
|
916
|
+
modifiers?: readonly {
|
|
917
|
+
modifierName?: string;
|
|
918
|
+
componentIndex?: number;
|
|
919
|
+
}[];
|
|
920
|
+
}[]): string[];
|
|
921
|
+
declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
|
|
922
|
+
|
|
707
923
|
declare const SYSTEM_FAMILY_IDS: {
|
|
708
924
|
readonly COUNT: "count";
|
|
709
925
|
readonly WEIGHT: "weight-metric";
|
|
@@ -783,6 +999,13 @@ interface OrderLineItem {
|
|
|
783
999
|
returnedQuantity?: number;
|
|
784
1000
|
[key: string]: unknown;
|
|
785
1001
|
}
|
|
1002
|
+
interface OrderReservationForContext {
|
|
1003
|
+
internalId?: string;
|
|
1004
|
+
quantity?: number;
|
|
1005
|
+
fulfilledQuantity?: number;
|
|
1006
|
+
returnedQuantity?: number;
|
|
1007
|
+
[key: string]: unknown;
|
|
1008
|
+
}
|
|
786
1009
|
interface SplitPaymentPayment {
|
|
787
1010
|
amount?: number;
|
|
788
1011
|
[key: string]: unknown;
|
|
@@ -798,6 +1021,7 @@ interface OrderContext {
|
|
|
798
1021
|
paymentMethods: OrderPaymentMethod[];
|
|
799
1022
|
refunds: OrderRefund[];
|
|
800
1023
|
lineItems: OrderLineItem[];
|
|
1024
|
+
reservations: OrderReservationForContext[];
|
|
801
1025
|
};
|
|
802
1026
|
computed: {
|
|
803
1027
|
balance: number;
|
|
@@ -911,6 +1135,7 @@ interface OrderLikeForContext {
|
|
|
911
1135
|
refunds?: OrderRefund[];
|
|
912
1136
|
refund?: OrderRefund[];
|
|
913
1137
|
lineItems?: OrderLineItem[];
|
|
1138
|
+
reservations?: OrderReservationForContext[];
|
|
914
1139
|
}
|
|
915
1140
|
interface OrderLikeForLegacyInference extends OrderLikeForContext {
|
|
916
1141
|
status?: string;
|
|
@@ -1200,25 +1425,160 @@ interface ConfigUpdatedPayload {
|
|
|
1200
1425
|
}
|
|
1201
1426
|
type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionBlockedPayload | ConfigUpdatedPayload;
|
|
1202
1427
|
|
|
1428
|
+
interface WeeklyHours {
|
|
1429
|
+
weekday: number;
|
|
1430
|
+
openMinute: number;
|
|
1431
|
+
closeMinute: number;
|
|
1432
|
+
}
|
|
1433
|
+
interface BookingRulesInput {
|
|
1434
|
+
ratePeriod: BookingRatePeriod | `${BookingRatePeriod}`;
|
|
1435
|
+
slot: {
|
|
1436
|
+
lengthMinutes: number;
|
|
1437
|
+
bufferMinutes?: number;
|
|
1438
|
+
minimumToRun?: number;
|
|
1439
|
+
minStay?: number;
|
|
1440
|
+
maxStay?: number;
|
|
1441
|
+
sharedAcrossProducts?: boolean;
|
|
1442
|
+
};
|
|
1443
|
+
window: {
|
|
1444
|
+
maxAdvanceDays?: number;
|
|
1445
|
+
minNoticeMinutes?: number;
|
|
1446
|
+
holdMinutes?: number;
|
|
1447
|
+
bookableFrom?: Date | string | null;
|
|
1448
|
+
bookableTo?: Date | string | null;
|
|
1449
|
+
};
|
|
1450
|
+
availability: {
|
|
1451
|
+
weeklyHours?: WeeklyHours[];
|
|
1452
|
+
offMarket?: {
|
|
1453
|
+
from: Date | string;
|
|
1454
|
+
to: Date | string;
|
|
1455
|
+
}[];
|
|
1456
|
+
arrivalDays?: number[];
|
|
1457
|
+
availableFrom?: Date | string | null;
|
|
1458
|
+
};
|
|
1459
|
+
checkInTime?: string | null;
|
|
1460
|
+
checkOutTime?: string | null;
|
|
1461
|
+
}
|
|
1462
|
+
interface BusyWindow {
|
|
1463
|
+
startAt: Date;
|
|
1464
|
+
bufferEndAt: Date;
|
|
1465
|
+
}
|
|
1466
|
+
interface GridSlot {
|
|
1467
|
+
startAt: Date;
|
|
1468
|
+
endAt: Date;
|
|
1469
|
+
bufferEndAt: Date;
|
|
1470
|
+
canStart: boolean;
|
|
1471
|
+
}
|
|
1472
|
+
declare class BookingRulesError extends Error {
|
|
1473
|
+
constructor(message: string);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
declare function windowEndsAt(rule: BookingRulesInput, now: Date): Date | null;
|
|
1477
|
+
declare function buildGrid(rule: BookingRulesInput, timeZone: string, from: Date, to: Date, now: Date, busy?: BusyWindow[]): GridSlot[];
|
|
1478
|
+
declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date): GridSlot[];
|
|
1479
|
+
|
|
1480
|
+
interface BookingOccupancy {
|
|
1481
|
+
resourceId: string;
|
|
1482
|
+
productId: string;
|
|
1483
|
+
qty: number;
|
|
1484
|
+
startAt: Date;
|
|
1485
|
+
bufferEndAt: Date;
|
|
1486
|
+
}
|
|
1487
|
+
interface BookingResourceInput {
|
|
1488
|
+
id: string;
|
|
1489
|
+
name: string;
|
|
1490
|
+
seats?: number | null;
|
|
1491
|
+
timeZone: string;
|
|
1492
|
+
presence?: WeeklyHours[] | null;
|
|
1493
|
+
}
|
|
1494
|
+
interface ResourceAvailability {
|
|
1495
|
+
resourceId: string;
|
|
1496
|
+
name: string;
|
|
1497
|
+
capacity: number;
|
|
1498
|
+
booked: number;
|
|
1499
|
+
free: number;
|
|
1500
|
+
}
|
|
1501
|
+
interface AvailabilitySlot extends GridSlot {
|
|
1502
|
+
capacity: number;
|
|
1503
|
+
booked: number;
|
|
1504
|
+
free: number;
|
|
1505
|
+
resources: ResourceAvailability[];
|
|
1506
|
+
dayKey: string;
|
|
1507
|
+
}
|
|
1508
|
+
interface ResourceInWindow {
|
|
1509
|
+
resourceId: string;
|
|
1510
|
+
name: string;
|
|
1511
|
+
slots: number;
|
|
1512
|
+
free: number;
|
|
1513
|
+
state: ResourceAvailabilityState;
|
|
1514
|
+
}
|
|
1515
|
+
interface AvailabilityInput {
|
|
1516
|
+
productId: string;
|
|
1517
|
+
bookingRulesId?: string;
|
|
1518
|
+
bookingType?: BookingType;
|
|
1519
|
+
rule: BookingRulesInput;
|
|
1520
|
+
resources: BookingResourceInput[];
|
|
1521
|
+
occupied: BookingOccupancy[];
|
|
1522
|
+
from: Date;
|
|
1523
|
+
to: Date;
|
|
1524
|
+
now: Date;
|
|
1525
|
+
}
|
|
1526
|
+
declare const withinPresence: (slot: GridSlot, timeZone: string, presence?: WeeklyHours[] | null) => boolean;
|
|
1527
|
+
declare function occupancyIn(occupied: BookingOccupancy[], productId: string, startAt: Date, bufferEndAt: Date, shared: boolean): {
|
|
1528
|
+
taken: number;
|
|
1529
|
+
foreignProductId?: string;
|
|
1530
|
+
};
|
|
1531
|
+
declare function shopDayKey(instant: Date, timeZone: string): string;
|
|
1532
|
+
declare function shopDayRange(fromDayKey: string, count: number, timeZone: string): {
|
|
1533
|
+
from: Date;
|
|
1534
|
+
to: Date;
|
|
1535
|
+
};
|
|
1536
|
+
declare function buildAvailability({ productId, bookingRulesId, bookingType, rule, resources, occupied, from, to, now, }: AvailabilityInput): {
|
|
1537
|
+
resources: ResourceInWindow[];
|
|
1538
|
+
slots: AvailabilitySlot[];
|
|
1539
|
+
timeZone: string;
|
|
1540
|
+
days: string[];
|
|
1541
|
+
productId: string;
|
|
1542
|
+
bookingRulesId: string | undefined;
|
|
1543
|
+
bookingType: BookingType | undefined;
|
|
1544
|
+
ratePeriod: "slot" | "day" | "night" | "week" | "month" | BookingRatePeriod;
|
|
1545
|
+
minimumToRun: number | undefined;
|
|
1546
|
+
minStay: number | undefined;
|
|
1547
|
+
maxStay: number | undefined;
|
|
1548
|
+
bookableUntil: Date | null;
|
|
1549
|
+
beyondWindow: boolean;
|
|
1550
|
+
};
|
|
1551
|
+
interface ResourcePresenceRow {
|
|
1552
|
+
resourceId: string;
|
|
1553
|
+
outletId: string;
|
|
1554
|
+
weeklyHours?: WeeklyHours[] | null;
|
|
1555
|
+
}
|
|
1556
|
+
declare function presentAt<T extends {
|
|
1557
|
+
id: string;
|
|
1558
|
+
}>(resources: T[], rows: ResourcePresenceRow[], outletId?: string): {
|
|
1559
|
+
resource: T;
|
|
1560
|
+
presence?: WeeklyHours[] | null;
|
|
1561
|
+
}[];
|
|
1562
|
+
|
|
1563
|
+
declare const DEFAULT_HOLD_MINUTES = 10;
|
|
1564
|
+
interface PlanWindowInput {
|
|
1565
|
+
rule: BookingRulesInput;
|
|
1566
|
+
timeZone: string;
|
|
1567
|
+
presence?: WeeklyHours[] | null;
|
|
1568
|
+
startAt: Date;
|
|
1569
|
+
endAt: Date;
|
|
1570
|
+
now: Date;
|
|
1571
|
+
busy?: BusyWindow[];
|
|
1572
|
+
}
|
|
1573
|
+
declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
|
|
1574
|
+
slots: GridSlot[];
|
|
1575
|
+
endAt: Date;
|
|
1576
|
+
bufferEndAt: Date;
|
|
1577
|
+
};
|
|
1578
|
+
declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
|
|
1579
|
+
|
|
1203
1580
|
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1204
1581
|
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1205
|
-
declare const ADYEN_STORE_STATE_PROVINCE_COUNTRIES: Set<string>;
|
|
1206
|
-
declare function adyenStoreRequiresStateOrProvince(alpha2: string | undefined): boolean;
|
|
1207
|
-
declare const ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES: Set<string>;
|
|
1208
|
-
declare function adyenLegalEntityRequiresStateOrProvince(alpha2: string | undefined): boolean;
|
|
1209
|
-
declare const ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES: Set<string>;
|
|
1210
|
-
declare function adyenSupportsTaxNumberAbsent(alpha2: string | undefined): boolean;
|
|
1211
|
-
declare const ADYEN_TAX_NUMBER_FORMATS: Record<string, {
|
|
1212
|
-
pattern: RegExp;
|
|
1213
|
-
length: number;
|
|
1214
|
-
}>;
|
|
1215
|
-
declare function adyenTaxNumberFormat(alpha2: string | undefined): {
|
|
1216
|
-
pattern: RegExp;
|
|
1217
|
-
length: number;
|
|
1218
|
-
} | undefined;
|
|
1219
|
-
declare const ADYEN_TAX_NUMBER_MIN_LENGTH = 5;
|
|
1220
|
-
declare const ADYEN_JOB_TITLE_ASSOCIATION_TYPES: readonly string[];
|
|
1221
|
-
declare function adyenRequiresJobTitle(associationType: string): boolean;
|
|
1222
1582
|
|
|
1223
1583
|
interface CurrencyRate {
|
|
1224
1584
|
rate: number;
|
|
@@ -1231,4 +1591,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1231
1591
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1232
1592
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1233
1593
|
|
|
1234
|
-
export {
|
|
1594
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, amountToString, ancestorChain, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, presentAt, removeFragment, resolveFamily, resolveModifiersForProduct, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant, windowEndsAt, withinPresence };
|