@final-commerce/common 2.10.0 → 2.11.1-online.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/bin/gate-done.mjs +11 -24
- package/dist/index.d.mts +297 -20
- package/dist/index.d.ts +297 -20
- package/dist/index.js +671 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +636 -20
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +440 -337
- package/dist/pos-types/index.d.ts +440 -337
- package/dist/pos-types/index.js +1 -0
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +1 -0
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
package/bin/gate-done.mjs
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* gate-done — pre-push hook.
|
|
4
4
|
*
|
|
5
|
-
* Runs
|
|
5
|
+
* Runs three sweeps inside a 90-second wall-clock budget:
|
|
6
6
|
*
|
|
7
|
-
* 1.
|
|
8
|
-
* 2.
|
|
9
|
-
* 3.
|
|
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
|
|
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.
|
|
76
|
+
// ── 1. gitleaks ───────────────────────────────────────────────────────────────
|
|
78
77
|
|
|
79
|
-
info('Sweep 1/
|
|
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
|
-
// ──
|
|
98
|
+
// ── 2. vitest coverage ────────────────────────────────────────────────────────
|
|
112
99
|
|
|
113
|
-
info('Sweep 3
|
|
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
|
-
// ──
|
|
111
|
+
// ── 3. bundle size ────────────────────────────────────────────────────────────
|
|
125
112
|
|
|
126
|
-
info('Sweep
|
|
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
|
@@ -190,7 +190,8 @@ declare enum Platform {
|
|
|
190
190
|
declare enum OrderPlatform {
|
|
191
191
|
POS = "in-store",
|
|
192
192
|
WOO_COMMERCE = "woo-commerce",
|
|
193
|
-
PUBLIC_API = "public-api"
|
|
193
|
+
PUBLIC_API = "public-api",
|
|
194
|
+
ONLINE_STORE = "online-store"
|
|
194
195
|
}
|
|
195
196
|
declare enum CustomerPlatform {
|
|
196
197
|
POS = "in-store",
|
|
@@ -452,6 +453,62 @@ declare enum ResourceAvailabilityState {
|
|
|
452
453
|
NO_HOURS_IN_RANGE = "noHoursInRange"
|
|
453
454
|
}
|
|
454
455
|
|
|
456
|
+
declare enum ShippingZoneKind {
|
|
457
|
+
COUNTRY = "country",
|
|
458
|
+
PROVINCE = "province",
|
|
459
|
+
CITY = "city",
|
|
460
|
+
EVERYWHERE = "everywhere"
|
|
461
|
+
}
|
|
462
|
+
declare enum ShippingOptionType {
|
|
463
|
+
SHIP = "ship",
|
|
464
|
+
PICKUP = "pickup"
|
|
465
|
+
}
|
|
466
|
+
declare enum ShippingRateType {
|
|
467
|
+
FLAT = "flat"
|
|
468
|
+
}
|
|
469
|
+
declare enum ShippingChannel {
|
|
470
|
+
WEB = "web",
|
|
471
|
+
POS = "pos"
|
|
472
|
+
}
|
|
473
|
+
declare enum ShippingNoOptionReason {
|
|
474
|
+
INCOMPLETE = "INCOMPLETE",
|
|
475
|
+
ADDRESS_MISMATCH = "ADDRESS_MISMATCH",
|
|
476
|
+
NO_COVERAGE = "NO_COVERAGE",
|
|
477
|
+
BLOCKED = "BLOCKED",
|
|
478
|
+
NO_OPTION = "NO_OPTION"
|
|
479
|
+
}
|
|
480
|
+
declare enum ShippingZoneError {
|
|
481
|
+
NO_PLACES = "NO_PLACES",
|
|
482
|
+
INVALID_PLACE = "INVALID_PLACE",
|
|
483
|
+
DUPLICATE_PLACE = "DUPLICATE_PLACE",
|
|
484
|
+
NO_WEBSITE_OPTION = "NO_WEBSITE_OPTION",
|
|
485
|
+
INVALID_PRICE = "INVALID_PRICE",
|
|
486
|
+
INVALID_DAYS = "INVALID_DAYS",
|
|
487
|
+
INVALID_TIERS = "INVALID_TIERS",
|
|
488
|
+
NO_CHANNEL = "NO_CHANNEL",
|
|
489
|
+
PICKUP_WITHOUT_STORE = "PICKUP_WITHOUT_STORE",
|
|
490
|
+
MISSING_NAME = "MISSING_NAME"
|
|
491
|
+
}
|
|
492
|
+
|
|
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
|
+
|
|
455
512
|
declare enum SalesLineAction {
|
|
456
513
|
SALE = "sale",
|
|
457
514
|
REFUND = "refund"
|
|
@@ -534,6 +591,11 @@ interface FeesTuple {
|
|
|
534
591
|
refundedFees: number;
|
|
535
592
|
netFees: number;
|
|
536
593
|
}
|
|
594
|
+
interface ShippingTuple {
|
|
595
|
+
grossShipping: number;
|
|
596
|
+
refundedShipping: number;
|
|
597
|
+
netShipping: number;
|
|
598
|
+
}
|
|
537
599
|
interface ModifiersTuple {
|
|
538
600
|
grossModifiers: number;
|
|
539
601
|
refundedModifiers: number;
|
|
@@ -564,6 +626,7 @@ interface SalesSummary {
|
|
|
564
626
|
discounts: DiscountsTuple;
|
|
565
627
|
refundsItems: number;
|
|
566
628
|
fees: FeesTuple;
|
|
629
|
+
shipping?: ShippingTuple;
|
|
567
630
|
modifiers?: ModifiersTuple;
|
|
568
631
|
taxes?: TaxesTuple;
|
|
569
632
|
totalSales: number;
|
|
@@ -1003,6 +1066,46 @@ declare function compositeModifierMismatches(lineItems: readonly {
|
|
|
1003
1066
|
}[]): string[];
|
|
1004
1067
|
declare function compositeReservationMismatches(order: CompositeReservationOrder): string[];
|
|
1005
1068
|
|
|
1069
|
+
type IdLike = string | {
|
|
1070
|
+
toString(): string;
|
|
1071
|
+
};
|
|
1072
|
+
interface StockLineComponent {
|
|
1073
|
+
productId: IdLike;
|
|
1074
|
+
variantId: IdLike;
|
|
1075
|
+
quantity: number;
|
|
1076
|
+
stockQuantity?: number | null;
|
|
1077
|
+
unitId?: IdLike | null;
|
|
1078
|
+
stockVariantId?: IdLike | null;
|
|
1079
|
+
}
|
|
1080
|
+
interface StockLine {
|
|
1081
|
+
internalId?: string | null;
|
|
1082
|
+
productId?: IdLike | null;
|
|
1083
|
+
variantId?: IdLike | null;
|
|
1084
|
+
name?: string | null;
|
|
1085
|
+
stockQuantity?: number | null;
|
|
1086
|
+
unitId?: IdLike | null;
|
|
1087
|
+
stockVariantId?: IdLike | null;
|
|
1088
|
+
components?: readonly StockLineComponent[] | null;
|
|
1089
|
+
}
|
|
1090
|
+
interface StockReservationLink {
|
|
1091
|
+
lineItemInternalId?: string | null;
|
|
1092
|
+
componentIndex?: number | null;
|
|
1093
|
+
}
|
|
1094
|
+
interface LineStockMove {
|
|
1095
|
+
productId: string;
|
|
1096
|
+
variantId: string;
|
|
1097
|
+
fields: {
|
|
1098
|
+
quantity: number;
|
|
1099
|
+
stockQuantity?: number;
|
|
1100
|
+
unitId?: string;
|
|
1101
|
+
stockVariantId?: string;
|
|
1102
|
+
compositeProductId?: string;
|
|
1103
|
+
compositeName?: string;
|
|
1104
|
+
};
|
|
1105
|
+
componentIndex?: number;
|
|
1106
|
+
}
|
|
1107
|
+
declare function lineStockMoves(item: StockLine, quantity: number, reservations?: readonly StockReservationLink[]): LineStockMove[];
|
|
1108
|
+
|
|
1006
1109
|
declare const SYSTEM_FAMILY_IDS: {
|
|
1007
1110
|
readonly COUNT: "count";
|
|
1008
1111
|
readonly WEIGHT: "weight-metric";
|
|
@@ -1705,6 +1808,179 @@ declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, bus
|
|
|
1705
1808
|
};
|
|
1706
1809
|
declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
|
|
1707
1810
|
|
|
1811
|
+
interface ShippingPlace {
|
|
1812
|
+
country: string;
|
|
1813
|
+
province?: string | null;
|
|
1814
|
+
city?: string | null;
|
|
1815
|
+
}
|
|
1816
|
+
interface ShippingPriceTier {
|
|
1817
|
+
from: number;
|
|
1818
|
+
price: number;
|
|
1819
|
+
}
|
|
1820
|
+
interface ShippingOptionRule {
|
|
1821
|
+
id: string;
|
|
1822
|
+
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1823
|
+
rate?: ShippingRateType | `${ShippingRateType}`;
|
|
1824
|
+
name?: string | null;
|
|
1825
|
+
price: number;
|
|
1826
|
+
priceByTotal?: ShippingPriceTier[] | null;
|
|
1827
|
+
freeOver?: number | null;
|
|
1828
|
+
minDays?: number | null;
|
|
1829
|
+
maxDays?: number | null;
|
|
1830
|
+
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1831
|
+
outletId?: string | null;
|
|
1832
|
+
}
|
|
1833
|
+
interface ShippingZoneRule {
|
|
1834
|
+
id: string;
|
|
1835
|
+
kind: ShippingZoneKind | `${ShippingZoneKind}`;
|
|
1836
|
+
places: ShippingPlace[];
|
|
1837
|
+
ships: boolean;
|
|
1838
|
+
message?: string | null;
|
|
1839
|
+
options: ShippingOptionRule[];
|
|
1840
|
+
}
|
|
1841
|
+
interface AddressLike {
|
|
1842
|
+
country?: string | null;
|
|
1843
|
+
state?: string | null;
|
|
1844
|
+
province?: string | null;
|
|
1845
|
+
city?: string | null;
|
|
1846
|
+
postCode?: string | null;
|
|
1847
|
+
postalCode?: string | null;
|
|
1848
|
+
zip?: string | null;
|
|
1849
|
+
}
|
|
1850
|
+
interface NormalizedAddress {
|
|
1851
|
+
country?: string;
|
|
1852
|
+
province?: string;
|
|
1853
|
+
cityKey?: string;
|
|
1854
|
+
postCode?: string;
|
|
1855
|
+
}
|
|
1856
|
+
interface ShippingQuoteOption {
|
|
1857
|
+
optionId: string;
|
|
1858
|
+
zoneId: string;
|
|
1859
|
+
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1860
|
+
name: string | null;
|
|
1861
|
+
amount: number;
|
|
1862
|
+
amountToFree: number | null;
|
|
1863
|
+
minDays: number | null;
|
|
1864
|
+
maxDays: number | null;
|
|
1865
|
+
outletId: string | null;
|
|
1866
|
+
}
|
|
1867
|
+
interface ShippingResolution {
|
|
1868
|
+
zoneId: string | null;
|
|
1869
|
+
options: ShippingQuoteOption[];
|
|
1870
|
+
reason: ShippingNoOptionReason | null;
|
|
1871
|
+
message: string | null;
|
|
1872
|
+
shipsToCountries: string[];
|
|
1873
|
+
}
|
|
1874
|
+
interface ResolveShippingInput {
|
|
1875
|
+
zones: ShippingZoneRule[];
|
|
1876
|
+
address: AddressLike | null | undefined;
|
|
1877
|
+
itemsTotal: number;
|
|
1878
|
+
channel: ShippingChannel | `${ShippingChannel}`;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
declare function normalizeCountry(value: string | null | undefined): string | undefined;
|
|
1882
|
+
interface CountryOption {
|
|
1883
|
+
code: string;
|
|
1884
|
+
name: string;
|
|
1885
|
+
}
|
|
1886
|
+
declare function listCountries(locale?: string): CountryOption[];
|
|
1887
|
+
declare const SHIPPING_COUNTRIES: readonly string[];
|
|
1888
|
+
declare function shipsToCountry(code: string | null | undefined): boolean;
|
|
1889
|
+
declare function listShippingCountries(locale?: string): CountryOption[];
|
|
1890
|
+
|
|
1891
|
+
interface Province {
|
|
1892
|
+
code: string;
|
|
1893
|
+
name: string;
|
|
1894
|
+
nameFr: string;
|
|
1895
|
+
postalLetters: string[];
|
|
1896
|
+
aliases?: string[];
|
|
1897
|
+
}
|
|
1898
|
+
declare const CANADA_PROVINCES: readonly Province[];
|
|
1899
|
+
declare function normalizeProvince(country: string | undefined, value: string | null | undefined): string | undefined;
|
|
1900
|
+
declare function listProvinces(country: string): readonly Province[];
|
|
1901
|
+
declare function provincesForPostCode(country: string | undefined, postCode: string | undefined): string[];
|
|
1902
|
+
|
|
1903
|
+
declare const EVERYWHERE_KEY = "*";
|
|
1904
|
+
declare function normalizeCityKey(value: string | null | undefined): string | undefined;
|
|
1905
|
+
declare function normalizePostCode(value: string | null | undefined): string | undefined;
|
|
1906
|
+
declare function normalizeAddress(address: AddressLike | null | undefined): NormalizedAddress;
|
|
1907
|
+
declare function postCodeMatchesProvince(address: NormalizedAddress): boolean;
|
|
1908
|
+
declare function placeKey(place: ShippingPlace): string | undefined;
|
|
1909
|
+
declare function addressPlaceKeys(address: NormalizedAddress): string[];
|
|
1910
|
+
|
|
1911
|
+
declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
|
|
1912
|
+
declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
|
|
1913
|
+
|
|
1914
|
+
interface ShippingZoneProblem {
|
|
1915
|
+
code: ShippingZoneError;
|
|
1916
|
+
optionId?: string;
|
|
1917
|
+
}
|
|
1918
|
+
declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
|
|
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
|
+
|
|
1708
1984
|
interface CurrencyRate {
|
|
1709
1985
|
rate: number;
|
|
1710
1986
|
country: string;
|
|
@@ -1716,6 +1992,25 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1716
1992
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1717
1993
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1718
1994
|
|
|
1995
|
+
declare enum ProcessorType {
|
|
1996
|
+
FINAL_PAY = "Terminal",
|
|
1997
|
+
TAP_TO_PAY = "TapToPay",
|
|
1998
|
+
MOTO = "Moto",
|
|
1999
|
+
CLOUD = "Cloud",
|
|
2000
|
+
BLUETOOTH = "Bluetooth",
|
|
2001
|
+
CASH = "Cash",
|
|
2002
|
+
CUSTOM_PAY = "CustomPay",
|
|
2003
|
+
VENDARA = "Vendara",
|
|
2004
|
+
REDEEM = "Redeem",
|
|
2005
|
+
INTEGRATION = "Integration",
|
|
2006
|
+
PAYMENT_LINK = "PaymentLink",
|
|
2007
|
+
ONLINE_PAYMENT = "OnlinePayment",
|
|
2008
|
+
EXTERNAL = "External"
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
|
|
2012
|
+
type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
|
|
2013
|
+
|
|
1719
2014
|
declare const EXPENSE_PAYMENT_METHOD_PRESETS: readonly ["Cash", "Cheque", "Credit card", "Direct debit", "E-Transfer", "Wire transfer"];
|
|
1720
2015
|
declare const EXPENSE_NAME_MAX_LENGTH = 40;
|
|
1721
2016
|
declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
|
|
@@ -1754,22 +2049,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
|
|
|
1754
2049
|
}];
|
|
1755
2050
|
type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
|
|
1756
2051
|
|
|
1757
|
-
|
|
1758
|
-
FINAL_PAY = "Terminal",
|
|
1759
|
-
TAP_TO_PAY = "TapToPay",
|
|
1760
|
-
MOTO = "Moto",
|
|
1761
|
-
CLOUD = "Cloud",
|
|
1762
|
-
BLUETOOTH = "Bluetooth",
|
|
1763
|
-
CASH = "Cash",
|
|
1764
|
-
CUSTOM_PAY = "CustomPay",
|
|
1765
|
-
VENDARA = "Vendara",
|
|
1766
|
-
REDEEM = "Redeem",
|
|
1767
|
-
INTEGRATION = "Integration",
|
|
1768
|
-
PAYMENT_LINK = "PaymentLink",
|
|
1769
|
-
EXTERNAL = "External"
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
declare const PAYMENT_CHANNELS: readonly ["inPerson", "online"];
|
|
1773
|
-
type PaymentChannel = (typeof PAYMENT_CHANNELS)[number];
|
|
1774
|
-
|
|
1775
|
-
export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, type AssignUserChange, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, HttpMethod, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForAssignedUsers, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductSalesChartStep, ProductSalesReportCompare, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, SalesLineAction, SalesLineSourceArray, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, applyAssignment, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, currentAssignees, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeMongoIdString, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, presentAt, removeFragment, resolveFamily, resolveModifiersForProduct, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, violatesFinancialInvariant, windowEndsAt, withinPresence };
|
|
2052
|
+
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, 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 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, 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, 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 };
|