@final-commerce/common 2.12.0 → 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/README.md +6 -6
- package/bin/gate-done.mjs +13 -26
- package/bin/lib/budget.mjs +1 -1
- package/dist/index.d.mts +295 -2
- package/dist/index.d.ts +295 -2
- package/dist/index.js +367 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +341 -9
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +72 -13
- package/dist/pos-types/index.d.ts +72 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -223,12 +223,12 @@ node -p "const c = require('@final-commerce/common'); c.formatCurrency(2500, 'EU
|
|
|
223
223
|
|
|
224
224
|
### `gate-done` time budgets
|
|
225
225
|
|
|
226
|
-
`gate-done` (the pre-push hook) runs
|
|
226
|
+
`gate-done` (the pre-push hook) runs three sweeps: gitleaks, Vitest with coverage, and a bundle-size or build check. It gives them two separate time budgets, both set in milliseconds through environment variables:
|
|
227
227
|
|
|
228
|
-
| Variable | Default | Covers
|
|
229
|
-
| -------------------------- | -------- |
|
|
230
|
-
| `GATE_DONE_BUDGET_MS` | `90000` |
|
|
231
|
-
| `GATE_DONE_TEST_BUDGET_MS` | `300000` | the Vitest sweep on its own
|
|
228
|
+
| Variable | Default | Covers |
|
|
229
|
+
| -------------------------- | -------- | ----------------------------- |
|
|
230
|
+
| `GATE_DONE_BUDGET_MS` | `90000` | gitleaks and the bundle sweep |
|
|
231
|
+
| `GATE_DONE_TEST_BUDGET_MS` | `300000` | the Vitest sweep on its own |
|
|
232
232
|
|
|
233
233
|
A budget only counts time spent in its own sweeps, so a slow test suite never takes time from the other sweeps, and the other sweeps never take time from the tests. Husky's pre-push hook inherits your shell environment, so you can raise a budget for one push or for good:
|
|
234
234
|
|
|
@@ -237,7 +237,7 @@ GATE_DONE_TEST_BUDGET_MS=600000 git push # one push
|
|
|
237
237
|
export GATE_DONE_TEST_BUDGET_MS=600000 # in ~/.zshrc, for every push
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
If a sweep runs past its budget, `gate-done` kills it and blocks the push with a timeout message (`Vitest killed after 300.0s by the test budget … not a test failure`), not as a test
|
|
240
|
+
If a sweep runs past its budget, `gate-done` kills it and blocks the push with a timeout message (`Vitest killed after 300.0s by the test budget … not a test failure`), not as a test failure. Values that are not positive integers are ignored with a warning, and the default applies.
|
|
241
241
|
|
|
242
242
|
## License
|
|
243
243
|
|
package/bin/gate-done.mjs
CHANGED
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* gate-done — pre-push hook.
|
|
4
4
|
*
|
|
5
|
-
* Runs
|
|
5
|
+
* Runs three sweeps under two time budgets:
|
|
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
11
|
* Budgets (milliseconds, read from the environment — Husky's pre-push inherits the shell):
|
|
13
12
|
*
|
|
14
|
-
* GATE_DONE_BUDGET_MS default 90000 shared by sweeps 1
|
|
15
|
-
* GATE_DONE_TEST_BUDGET_MS default 300000 sweep
|
|
13
|
+
* GATE_DONE_BUDGET_MS default 90000 shared by sweeps 1 and 3
|
|
14
|
+
* GATE_DONE_TEST_BUDGET_MS default 300000 sweep 2 (Vitest) on its own
|
|
16
15
|
*
|
|
17
16
|
* A budget only drains while its own sweeps run, so a slow test suite cannot
|
|
18
17
|
* starve the bundle sweep and vice versa.
|
|
19
18
|
*
|
|
20
|
-
* Any sweep failure
|
|
19
|
+
* Any sweep failure exits 1, blocking the push.
|
|
21
20
|
* A sweep killed by its budget also exits 1, but is reported as a timeout,
|
|
22
21
|
* not as a failure of the thing it was checking.
|
|
23
22
|
*
|
|
@@ -105,21 +104,9 @@ info(
|
|
|
105
104
|
`tests ${testBudget.ms / 1000}s (GATE_DONE_TEST_BUDGET_MS).`,
|
|
106
105
|
);
|
|
107
106
|
|
|
108
|
-
// ── 1.
|
|
107
|
+
// ── 1. gitleaks ───────────────────────────────────────────────────────────────
|
|
109
108
|
|
|
110
|
-
info('Sweep 1/
|
|
111
|
-
checkBudget(sweepBudget, 'npm audit');
|
|
112
|
-
|
|
113
|
-
const auditResult = run(sweepBudget, 'npm audit', 'npm audit --audit-level=high');
|
|
114
|
-
if (auditResult.status !== 0) {
|
|
115
|
-
warn('npm audit found high or critical vulnerabilities. Run `npm audit` for details.');
|
|
116
|
-
} else {
|
|
117
|
-
ok('npm audit: no high/critical vulnerabilities.');
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// ── 2. gitleaks ───────────────────────────────────────────────────────────────
|
|
121
|
-
|
|
122
|
-
info('Sweep 2/4 — gitleaks secrets scan…');
|
|
109
|
+
info('Sweep 1/3 — gitleaks secrets scan…');
|
|
123
110
|
checkBudget(sweepBudget, 'gitleaks');
|
|
124
111
|
|
|
125
112
|
const hasGitleaks = capture(sweepBudget, 'command -v gitleaks 2>/dev/null').status === 0;
|
|
@@ -139,9 +126,9 @@ if (!hasGitleaks) {
|
|
|
139
126
|
ok('gitleaks: no secrets detected.');
|
|
140
127
|
}
|
|
141
128
|
|
|
142
|
-
// ──
|
|
129
|
+
// ── 2. vitest coverage ────────────────────────────────────────────────────────
|
|
143
130
|
|
|
144
|
-
info('Sweep 3
|
|
131
|
+
info('Sweep 2/3 — Vitest test suite + coverage thresholds…');
|
|
145
132
|
checkBudget(testBudget, 'Vitest');
|
|
146
133
|
|
|
147
134
|
const vitestResult = run(testBudget, 'Vitest', 'npx vitest run --coverage');
|
|
@@ -152,9 +139,9 @@ if (vitestResult.status !== 0) {
|
|
|
152
139
|
|
|
153
140
|
ok('Vitest: all tests passed, coverage thresholds met.');
|
|
154
141
|
|
|
155
|
-
// ──
|
|
142
|
+
// ── 3. bundle size ────────────────────────────────────────────────────────────
|
|
156
143
|
|
|
157
|
-
info('Sweep
|
|
144
|
+
info('Sweep 3/3 — bundle size audit…');
|
|
158
145
|
checkBudget(sweepBudget, 'bundle audit');
|
|
159
146
|
|
|
160
147
|
const pkgPath = resolve(process.cwd(), 'package.json');
|
package/bin/lib/budget.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A budget is a pool of milliseconds that only drains while one of its own
|
|
5
5
|
* sweeps is running, so gate-done can give the Vitest sweep its own allowance
|
|
6
|
-
* without the fast sweeps (
|
|
6
|
+
* without the fast sweeps (gitleaks, bundle) eating into it.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { spawnSync } from 'node:child_process';
|
package/dist/index.d.mts
CHANGED
|
@@ -490,6 +490,25 @@ declare enum ShippingZoneError {
|
|
|
490
490
|
MISSING_NAME = "MISSING_NAME"
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
+
declare enum TaxRegistrationKind {
|
|
494
|
+
GST_HST = "GST_HST",
|
|
495
|
+
PST = "PST",
|
|
496
|
+
QST = "QST"
|
|
497
|
+
}
|
|
498
|
+
declare enum TaxSource {
|
|
499
|
+
MERCHANT = "merchant",
|
|
500
|
+
AUTOMATIC = "automatic"
|
|
501
|
+
}
|
|
502
|
+
declare enum OutOfProvinceTaxes {
|
|
503
|
+
AUTOMATIC = "automatic",
|
|
504
|
+
HOME = "home"
|
|
505
|
+
}
|
|
506
|
+
declare enum TaxWarningCode {
|
|
507
|
+
NOT_REGISTERED = "NOT_REGISTERED",
|
|
508
|
+
NO_RULES_FOR_PLACE = "NO_RULES_FOR_PLACE",
|
|
509
|
+
NO_TABLE = "NO_TABLE"
|
|
510
|
+
}
|
|
511
|
+
|
|
493
512
|
declare enum SalesLineAction {
|
|
494
513
|
SALE = "sale",
|
|
495
514
|
REFUND = "refund"
|
|
@@ -948,6 +967,28 @@ interface MeasurementUnit {
|
|
|
948
967
|
sellable?: false;
|
|
949
968
|
}
|
|
950
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
|
+
|
|
951
992
|
type CompositeItemUnavailable = 'deleted' | 'inactive' | 'hidden' | 'empty' | 'out_of_stock' | 'by_date' | 'fully_booked' | 'marked_sold_out';
|
|
952
993
|
|
|
953
994
|
interface CompositeShelf {
|
|
@@ -1159,6 +1200,18 @@ declare function shellSettingsFromFlowSettings(dict: Record<string, string> | nu
|
|
|
1159
1200
|
declare function flowSettingsFromShellSettings(settings: ShellTipsLevel): Record<string, string>;
|
|
1160
1201
|
declare function shellSettingsFromCompanyTips(enabled: unknown, options: unknown): ShellTipsLevel;
|
|
1161
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
|
+
|
|
1162
1215
|
declare const SYSTEM_FAMILY_IDS: {
|
|
1163
1216
|
readonly COUNT: "count";
|
|
1164
1217
|
readonly WEIGHT: "weight-metric";
|
|
@@ -1206,7 +1259,7 @@ declare function isSystemFamilyCode(code: string): boolean;
|
|
|
1206
1259
|
declare function deriveUnitId(abbreviation: string, documentId: string): string;
|
|
1207
1260
|
|
|
1208
1261
|
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
1209
|
-
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';
|
|
1210
1263
|
declare const PAYMENT_STATES: readonly PaymentState[];
|
|
1211
1264
|
declare const FULFILLMENT_STATES: readonly FulfillmentState[];
|
|
1212
1265
|
declare function isPaymentState(value: string): value is PaymentState;
|
|
@@ -1880,6 +1933,8 @@ interface ShippingOptionRule {
|
|
|
1880
1933
|
freeOver?: number | null;
|
|
1881
1934
|
minDays?: number | null;
|
|
1882
1935
|
maxDays?: number | null;
|
|
1936
|
+
minMinutes?: number | null;
|
|
1937
|
+
maxMinutes?: number | null;
|
|
1883
1938
|
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1884
1939
|
outletId?: string | null;
|
|
1885
1940
|
}
|
|
@@ -1915,6 +1970,8 @@ interface ShippingQuoteOption {
|
|
|
1915
1970
|
amountToFree: number | null;
|
|
1916
1971
|
minDays: number | null;
|
|
1917
1972
|
maxDays: number | null;
|
|
1973
|
+
minMinutes: number | null;
|
|
1974
|
+
maxMinutes: number | null;
|
|
1918
1975
|
outletId: string | null;
|
|
1919
1976
|
}
|
|
1920
1977
|
interface ShippingResolution {
|
|
@@ -1964,12 +2021,248 @@ declare function addressPlaceKeys(address: NormalizedAddress): string[];
|
|
|
1964
2021
|
declare function resolveShipping({ zones, address, itemsTotal, channel }: ResolveShippingInput): ShippingResolution;
|
|
1965
2022
|
declare function priceForTotal(option: ShippingOptionRule, itemsTotal: number): number;
|
|
1966
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
|
+
|
|
1967
2032
|
interface ShippingZoneProblem {
|
|
1968
2033
|
code: ShippingZoneError;
|
|
1969
2034
|
optionId?: string;
|
|
1970
2035
|
}
|
|
1971
2036
|
declare function validateShippingZone(zone: ShippingZoneRule): ShippingZoneProblem[];
|
|
1972
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
|
+
|
|
1973
2266
|
interface CurrencyRate {
|
|
1974
2267
|
rate: number;
|
|
1975
2268
|
country: string;
|
|
@@ -2038,4 +2331,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
|
|
|
2038
2331
|
}];
|
|
2039
2332
|
type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
|
|
2040
2333
|
|
|
2041
|
-
export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AddressLike, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, type AssignUserChange, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CountryOption, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_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 OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductSalesChartStep, ProductSalesReportCompare, ProductStatus, ProductType, type Province, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveShippingInput, type ResolveTemplateResult, type 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, 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, ShippingNoOptionReason, type ShippingOptionRule, ShippingOptionType, type ShippingPlace, type ShippingPriceTier, type ShippingQuoteOption, ShippingRateType, type ShippingResolution, type ShippingTuple, ShippingZoneError, ShippingZoneKind, type ShippingZoneProblem, type ShippingZoneRule, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StockLine, type StockLineComponent, type StockReservationLink, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, applyAssignment, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, currentAssignees, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, flowSettingsFromShellSettings, 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, isShellTipPercent, 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, readShellTipSettings, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShellSettings, resolveShellSettingsWithSources, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shellSettingsFromCompanyTips, shellSettingsFromFlowSettings, shellSettingsProblems, shellTipSettingsProblems, shipsToCountry, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, 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 };
|