@final-commerce/common 2.11.1 → 2.12.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/README.md +0 -20
- package/bin/gate-done.mjs +36 -71
- package/dist/index.d.mts +216 -24
- package/dist/index.d.ts +216 -24
- package/dist/index.js +884 -162
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +856 -162
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +49 -8
- package/dist/pos-types/index.d.ts +49 -8
- package/dist/pos-types/index.js +7 -2
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +5 -1
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
- package/bin/lib/budget.mjs +0 -71
package/README.md
CHANGED
|
@@ -219,26 +219,6 @@ node -p "const c = require('@final-commerce/common'); c.formatCurrency(2500, 'EU
|
|
|
219
219
|
# → €25.00
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
## Quality gates
|
|
223
|
-
|
|
224
|
-
### `gate-done` time budgets
|
|
225
|
-
|
|
226
|
-
`gate-done` (the pre-push hook) runs four sweeps: npm audit, 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
|
-
|
|
228
|
-
| Variable | Default | Covers |
|
|
229
|
-
| -------------------------- | -------- | ---------------------------------------- |
|
|
230
|
-
| `GATE_DONE_BUDGET_MS` | `90000` | npm audit, gitleaks and the bundle sweep |
|
|
231
|
-
| `GATE_DONE_TEST_BUDGET_MS` | `300000` | the Vitest sweep on its own |
|
|
232
|
-
|
|
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
|
-
|
|
235
|
-
```bash
|
|
236
|
-
GATE_DONE_TEST_BUDGET_MS=600000 git push # one push
|
|
237
|
-
export GATE_DONE_TEST_BUDGET_MS=600000 # in ~/.zshrc, for every push
|
|
238
|
-
```
|
|
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 or audit failure. Values that are not positive integers are ignored with a warning, and the default applies.
|
|
241
|
-
|
|
242
222
|
## License
|
|
243
223
|
|
|
244
224
|
Private — Final Commerce internal use only.
|
package/bin/gate-done.mjs
CHANGED
|
@@ -2,80 +2,59 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* gate-done — pre-push hook.
|
|
4
4
|
*
|
|
5
|
-
* Runs four sweeps
|
|
5
|
+
* Runs four sweeps inside a 90-second wall-clock budget:
|
|
6
6
|
*
|
|
7
7
|
* 1. npm audit — known CVE check against the installed dependency tree (warn only)
|
|
8
8
|
* 2. gitleaks — credential / secret scanning (git log + staged)
|
|
9
9
|
* 3. vitest — full test suite with coverage threshold enforcement
|
|
10
10
|
* 4. bundle — size-limit or custom bundle-size script (if configured)
|
|
11
11
|
*
|
|
12
|
-
* Budgets (milliseconds, read from the environment — Husky's pre-push inherits the shell):
|
|
13
|
-
*
|
|
14
|
-
* GATE_DONE_BUDGET_MS default 90000 shared by sweeps 1, 2 and 4
|
|
15
|
-
* GATE_DONE_TEST_BUDGET_MS default 300000 sweep 3 (Vitest) on its own
|
|
16
|
-
*
|
|
17
|
-
* A budget only drains while its own sweeps run, so a slow test suite cannot
|
|
18
|
-
* starve the bundle sweep and vice versa.
|
|
19
|
-
*
|
|
20
12
|
* Any sweep failure except npm audit exits 1, blocking the push.
|
|
21
|
-
*
|
|
22
|
-
* not as a failure of the thing it was checking.
|
|
13
|
+
* Budget overrun also exits 1.
|
|
23
14
|
*
|
|
24
15
|
* Install as Husky pre-push hook:
|
|
25
16
|
* echo "npx gate-done" > .husky/pre-push
|
|
26
17
|
*/
|
|
27
18
|
|
|
19
|
+
import { spawnSync } from 'node:child_process';
|
|
28
20
|
import { readFileSync } from 'node:fs';
|
|
29
21
|
import { resolve } from 'node:path';
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
DEFAULT_BUDGET_MS,
|
|
33
|
-
DEFAULT_TEST_BUDGET_MS,
|
|
34
|
-
budgetKillMessage,
|
|
35
|
-
createBudget,
|
|
36
|
-
readBudgetMs,
|
|
37
|
-
runInBudget,
|
|
38
|
-
} from './lib/budget.mjs';
|
|
39
|
-
|
|
23
|
+
const BUDGET_MS = 90_000;
|
|
40
24
|
const t0 = Date.now();
|
|
41
25
|
|
|
42
26
|
// ── helpers ──────────────────────────────────────────────────────────────────
|
|
43
27
|
|
|
44
|
-
function
|
|
45
|
-
return ((Date.now() - t0)
|
|
28
|
+
function remaining() {
|
|
29
|
+
return Math.max(0, BUDGET_MS - (Date.now() - t0));
|
|
46
30
|
}
|
|
47
31
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
if (invalid !== undefined) {
|
|
51
|
-
warn(`${envVar}="${invalid}" is not a positive integer of milliseconds — using ${fallback}.`);
|
|
52
|
-
}
|
|
53
|
-
return createBudget(name, envVar, ms);
|
|
32
|
+
function elapsed() {
|
|
33
|
+
return ((Date.now() - t0) / 1000).toFixed(1);
|
|
54
34
|
}
|
|
55
35
|
|
|
56
|
-
function checkBudget(
|
|
57
|
-
if (
|
|
58
|
-
fail(
|
|
59
|
-
`${budget.name} budget (${budget.envVar}=${budget.ms}) exhausted before "${label}" could start. ` +
|
|
60
|
-
`Push blocked — not a ${label} failure.`,
|
|
61
|
-
);
|
|
36
|
+
function checkBudget(label) {
|
|
37
|
+
if (remaining() <= 0) {
|
|
38
|
+
fail(`90s budget exhausted before "${label}" could complete. Push blocked.`);
|
|
62
39
|
}
|
|
63
40
|
}
|
|
64
41
|
|
|
65
42
|
/**
|
|
66
|
-
* Run a command, streaming output
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* being reported as a failure of the sweep.
|
|
43
|
+
* Run a command, streaming output. Returns the spawnSync result.
|
|
44
|
+
* Passes remaining budget as the process timeout so a runaway child
|
|
45
|
+
* cannot exceed the wall-clock limit on its own.
|
|
70
46
|
*/
|
|
71
|
-
function run(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
47
|
+
function run(cmd) {
|
|
48
|
+
return spawnSync(cmd, {
|
|
49
|
+
shell: true,
|
|
50
|
+
encoding: 'utf8',
|
|
51
|
+
stdio: 'inherit',
|
|
52
|
+
timeout: remaining(),
|
|
53
|
+
});
|
|
75
54
|
}
|
|
76
55
|
|
|
77
|
-
function capture(
|
|
78
|
-
return
|
|
56
|
+
function capture(cmd) {
|
|
57
|
+
return spawnSync(cmd, { shell: true, encoding: 'utf8', timeout: remaining() });
|
|
79
58
|
}
|
|
80
59
|
|
|
81
60
|
function fail(msg) {
|
|
@@ -95,22 +74,12 @@ function ok(msg) {
|
|
|
95
74
|
process.stdout.write(`\x1b[32m✔ [${elapsed()}s] ${msg}\x1b[0m\n`);
|
|
96
75
|
}
|
|
97
76
|
|
|
98
|
-
// ── budgets ──────────────────────────────────────────────────────────────────
|
|
99
|
-
|
|
100
|
-
const sweepBudget = makeBudget('sweep', 'GATE_DONE_BUDGET_MS', DEFAULT_BUDGET_MS);
|
|
101
|
-
const testBudget = makeBudget('test', 'GATE_DONE_TEST_BUDGET_MS', DEFAULT_TEST_BUDGET_MS);
|
|
102
|
-
|
|
103
|
-
info(
|
|
104
|
-
`Budgets: sweeps ${sweepBudget.ms / 1000}s (GATE_DONE_BUDGET_MS), ` +
|
|
105
|
-
`tests ${testBudget.ms / 1000}s (GATE_DONE_TEST_BUDGET_MS).`,
|
|
106
|
-
);
|
|
107
|
-
|
|
108
77
|
// ── 1. npm audit ─────────────────────────────────────────────────────────────
|
|
109
78
|
|
|
110
79
|
info('Sweep 1/4 — npm audit (known CVEs)…');
|
|
111
|
-
checkBudget(
|
|
80
|
+
checkBudget('npm audit');
|
|
112
81
|
|
|
113
|
-
const auditResult = run(
|
|
82
|
+
const auditResult = run('npm audit --audit-level=high');
|
|
114
83
|
if (auditResult.status !== 0) {
|
|
115
84
|
warn('npm audit found high or critical vulnerabilities. Run `npm audit` for details.');
|
|
116
85
|
} else {
|
|
@@ -120,9 +89,9 @@ if (auditResult.status !== 0) {
|
|
|
120
89
|
// ── 2. gitleaks ───────────────────────────────────────────────────────────────
|
|
121
90
|
|
|
122
91
|
info('Sweep 2/4 — gitleaks secrets scan…');
|
|
123
|
-
checkBudget(
|
|
92
|
+
checkBudget('gitleaks');
|
|
124
93
|
|
|
125
|
-
const hasGitleaks = capture(
|
|
94
|
+
const hasGitleaks = capture('command -v gitleaks 2>/dev/null').status === 0;
|
|
126
95
|
|
|
127
96
|
if (!hasGitleaks) {
|
|
128
97
|
warn(
|
|
@@ -132,7 +101,7 @@ if (!hasGitleaks) {
|
|
|
132
101
|
} else {
|
|
133
102
|
// Scan the full git history visible from HEAD — correct mode for a pre-push hook.
|
|
134
103
|
// --no-git-serial scans refs in parallel for speed within the budget.
|
|
135
|
-
const glResult = run(
|
|
104
|
+
const glResult = run('gitleaks git --exit-code 1 .');
|
|
136
105
|
if (glResult.status !== 0) {
|
|
137
106
|
fail('gitleaks detected a potential secret. Remove it and retry the push.');
|
|
138
107
|
}
|
|
@@ -142,9 +111,9 @@ if (!hasGitleaks) {
|
|
|
142
111
|
// ── 3. vitest coverage ────────────────────────────────────────────────────────
|
|
143
112
|
|
|
144
113
|
info('Sweep 3/4 — Vitest test suite + coverage thresholds…');
|
|
145
|
-
checkBudget(
|
|
114
|
+
checkBudget('vitest');
|
|
146
115
|
|
|
147
|
-
const vitestResult = run(
|
|
116
|
+
const vitestResult = run('npx vitest run --coverage');
|
|
148
117
|
|
|
149
118
|
if (vitestResult.status !== 0) {
|
|
150
119
|
fail('Vitest coverage gate failed — fix failing tests or low-coverage areas before pushing.');
|
|
@@ -155,7 +124,7 @@ ok('Vitest: all tests passed, coverage thresholds met.');
|
|
|
155
124
|
// ── 4. bundle size ────────────────────────────────────────────────────────────
|
|
156
125
|
|
|
157
126
|
info('Sweep 4/4 — bundle size audit…');
|
|
158
|
-
checkBudget(
|
|
127
|
+
checkBudget('bundle audit');
|
|
159
128
|
|
|
160
129
|
const pkgPath = resolve(process.cwd(), 'package.json');
|
|
161
130
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
@@ -166,21 +135,21 @@ const hasBundlesize = Boolean(pkg.devDependencies?.['bundlesize']) || Boolean(pk
|
|
|
166
135
|
const hasBuildScript = Boolean(pkg.scripts?.build);
|
|
167
136
|
|
|
168
137
|
if (hasBundleSizeScript) {
|
|
169
|
-
const result = run(
|
|
138
|
+
const result = run('npm run bundle-size');
|
|
170
139
|
if (result.status !== 0) fail('bundle-size script reported a violation. Push blocked.');
|
|
171
140
|
ok('Bundle size: within limits.');
|
|
172
141
|
} else if (hasSizeLimit) {
|
|
173
|
-
const result = run(
|
|
142
|
+
const result = run('npx size-limit');
|
|
174
143
|
if (result.status !== 0) fail('size-limit reported a violation. Push blocked.');
|
|
175
144
|
ok('Bundle size: size-limit passed.');
|
|
176
145
|
} else if (hasBundlesize) {
|
|
177
|
-
const result = run(
|
|
146
|
+
const result = run('npx bundlesize');
|
|
178
147
|
if (result.status !== 0) fail('bundlesize reported a violation. Push blocked.');
|
|
179
148
|
ok('Bundle size: bundlesize passed.');
|
|
180
149
|
} else if (hasBuildScript) {
|
|
181
150
|
// No size tool configured — at minimum verify the build succeeds cleanly.
|
|
182
151
|
info('No size-limit/bundlesize configured — running build as a smoke-check.');
|
|
183
|
-
const result = run(
|
|
152
|
+
const result = run('npm run build');
|
|
184
153
|
if (result.status !== 0) fail('Build failed during gate-done. Push blocked.');
|
|
185
154
|
ok('Build: succeeded (no size budget configured).');
|
|
186
155
|
} else {
|
|
@@ -189,9 +158,5 @@ if (hasBundleSizeScript) {
|
|
|
189
158
|
|
|
190
159
|
// ── done ─────────────────────────────────────────────────────────────────────
|
|
191
160
|
|
|
192
|
-
ok(
|
|
193
|
-
`gate-done completed in ${elapsed()}s ` +
|
|
194
|
-
`(sweeps ${(sweepBudget.spent() / 1000).toFixed(1)}/${sweepBudget.ms / 1000}s, ` +
|
|
195
|
-
`tests ${(testBudget.spent() / 1000).toFixed(1)}/${testBudget.ms / 1000}s). Push proceeding.`,
|
|
196
|
-
);
|
|
161
|
+
ok(`gate-done completed in ${elapsed()}s (budget: 90s). Push proceeding.`);
|
|
197
162
|
process.exit(0);
|
package/dist/index.d.mts
CHANGED
|
@@ -424,11 +424,25 @@ declare enum BookingType {
|
|
|
424
424
|
}
|
|
425
425
|
declare enum BookingRatePeriod {
|
|
426
426
|
SLOT = "slot",
|
|
427
|
+
HOUR = "hour",
|
|
428
|
+
SESSION = "session",
|
|
427
429
|
DAY = "day",
|
|
428
430
|
NIGHT = "night",
|
|
429
431
|
WEEK = "week",
|
|
430
432
|
MONTH = "month"
|
|
431
433
|
}
|
|
434
|
+
declare enum BookingDurationUnit {
|
|
435
|
+
MINUTE = "minute",
|
|
436
|
+
HOUR = "hour",
|
|
437
|
+
DAY = "day",
|
|
438
|
+
NIGHT = "night",
|
|
439
|
+
WEEK = "week",
|
|
440
|
+
MONTH = "month"
|
|
441
|
+
}
|
|
442
|
+
declare enum BookingSessionSale {
|
|
443
|
+
SESSION = "session",
|
|
444
|
+
COURSE = "course"
|
|
445
|
+
}
|
|
432
446
|
declare enum BookingResourceKind {
|
|
433
447
|
ASSET = "asset",
|
|
434
448
|
ROOM = "room",
|
|
@@ -1642,22 +1656,51 @@ interface WeeklyHours {
|
|
|
1642
1656
|
openMinute: number;
|
|
1643
1657
|
closeMinute: number;
|
|
1644
1658
|
}
|
|
1659
|
+
interface BookingDuration {
|
|
1660
|
+
count: number;
|
|
1661
|
+
unit: BookingDurationUnit | `${BookingDurationUnit}`;
|
|
1662
|
+
}
|
|
1663
|
+
interface BookingTimeSlots {
|
|
1664
|
+
length: BookingDuration;
|
|
1665
|
+
weeklyHours?: WeeklyHours[];
|
|
1666
|
+
}
|
|
1667
|
+
interface BookingDateRanges {
|
|
1668
|
+
weeklyHours?: WeeklyHours[];
|
|
1669
|
+
arrivalDays?: number[];
|
|
1670
|
+
checkInTime?: string | null;
|
|
1671
|
+
checkOutTime?: string | null;
|
|
1672
|
+
checkTimesByWeekday?: {
|
|
1673
|
+
weekday: number;
|
|
1674
|
+
checkInTime: string;
|
|
1675
|
+
checkOutTime: string;
|
|
1676
|
+
}[] | null;
|
|
1677
|
+
minStay?: BookingDuration;
|
|
1678
|
+
maxStay?: BookingDuration;
|
|
1679
|
+
}
|
|
1645
1680
|
interface BookingRulesInput {
|
|
1646
1681
|
ratePeriod: BookingRatePeriod | `${BookingRatePeriod}`;
|
|
1647
1682
|
slot: {
|
|
1648
|
-
lengthMinutes
|
|
1683
|
+
lengthMinutes?: number;
|
|
1649
1684
|
bufferMinutes?: number;
|
|
1650
1685
|
minimumToRun?: number;
|
|
1651
1686
|
minStay?: number;
|
|
1652
1687
|
maxStay?: number;
|
|
1653
1688
|
sharedAcrossProducts?: boolean;
|
|
1689
|
+
maxQtyPerBooking?: number;
|
|
1690
|
+
maxPartySize?: number;
|
|
1691
|
+
wholePeriods?: boolean;
|
|
1692
|
+
buffer?: BookingDuration;
|
|
1654
1693
|
};
|
|
1655
1694
|
window: {
|
|
1656
1695
|
maxAdvanceDays?: number;
|
|
1696
|
+
maxAdvanceMinutes?: number;
|
|
1657
1697
|
minNoticeMinutes?: number;
|
|
1658
1698
|
holdMinutes?: number;
|
|
1659
1699
|
bookableFrom?: Date | string | null;
|
|
1660
1700
|
bookableTo?: Date | string | null;
|
|
1701
|
+
hold?: BookingDuration;
|
|
1702
|
+
minNotice?: BookingDuration;
|
|
1703
|
+
maxAdvance?: BookingDuration;
|
|
1661
1704
|
};
|
|
1662
1705
|
availability: {
|
|
1663
1706
|
weeklyHours?: WeeklyHours[];
|
|
@@ -1668,8 +1711,29 @@ interface BookingRulesInput {
|
|
|
1668
1711
|
arrivalDays?: number[];
|
|
1669
1712
|
availableFrom?: Date | string | null;
|
|
1670
1713
|
};
|
|
1714
|
+
sessions?: {
|
|
1715
|
+
sold: BookingSessionSale | `${BookingSessionSale}`;
|
|
1716
|
+
spots?: number;
|
|
1717
|
+
weekly?: {
|
|
1718
|
+
weekday: number;
|
|
1719
|
+
startMinute: number;
|
|
1720
|
+
endMinute: number;
|
|
1721
|
+
}[];
|
|
1722
|
+
dates?: {
|
|
1723
|
+
date: string;
|
|
1724
|
+
startMinute: number;
|
|
1725
|
+
endMinute: number;
|
|
1726
|
+
}[];
|
|
1727
|
+
} | null;
|
|
1728
|
+
checkTimesByWeekday?: {
|
|
1729
|
+
weekday: number;
|
|
1730
|
+
checkInTime: string;
|
|
1731
|
+
checkOutTime: string;
|
|
1732
|
+
}[] | null;
|
|
1671
1733
|
checkInTime?: string | null;
|
|
1672
1734
|
checkOutTime?: string | null;
|
|
1735
|
+
timeSlots?: BookingTimeSlots | null;
|
|
1736
|
+
dateRanges?: BookingDateRanges | null;
|
|
1673
1737
|
}
|
|
1674
1738
|
interface BusyWindow {
|
|
1675
1739
|
startAt: Date;
|
|
@@ -1681,14 +1745,118 @@ interface GridSlot {
|
|
|
1681
1745
|
bufferEndAt: Date;
|
|
1682
1746
|
canStart: boolean;
|
|
1683
1747
|
}
|
|
1748
|
+
declare const UNLIMITED_PLACES: number;
|
|
1684
1749
|
declare class BookingRulesError extends Error {
|
|
1685
1750
|
constructor(message: string);
|
|
1686
1751
|
}
|
|
1687
1752
|
|
|
1688
1753
|
declare function windowEndsAt(rule: BookingRulesInput, now: Date): Date | null;
|
|
1754
|
+
declare function windowEndsAtInZone(rule: BookingRulesInput, now: Date, timeZone: string | null): Date | null;
|
|
1755
|
+
declare function maxAdvanceMinutesOf(rule: Pick<BookingRulesInput, 'window'>): number;
|
|
1756
|
+
interface BookingRuleDurations {
|
|
1757
|
+
buffer?: BookingDuration;
|
|
1758
|
+
hold?: BookingDuration;
|
|
1759
|
+
minNotice?: BookingDuration;
|
|
1760
|
+
maxAdvance?: BookingDuration;
|
|
1761
|
+
}
|
|
1762
|
+
declare function ruleDurationsOf(rule: Pick<BookingRulesInput, 'slot' | 'window'>): BookingRuleDurations;
|
|
1763
|
+
declare function oldMaxAdvanceOf({ maxAdvanceMinutes, maxAdvanceDays, }: BookingRulesInput['window']): BookingDuration | undefined;
|
|
1764
|
+
declare function sessionCells(rule: BookingRulesInput, timeZone: string, from: Date, to: Date): GridSlot[];
|
|
1765
|
+
declare function calendarDate(value: string): [number, number, number];
|
|
1689
1766
|
declare function buildGrid(rule: BookingRulesInput, timeZone: string, from: Date, to: Date, now: Date, busy?: BusyWindow[]): GridSlot[];
|
|
1690
1767
|
declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date): GridSlot[];
|
|
1691
1768
|
|
|
1769
|
+
type BookingDurationField = 'timeSlots.length' | 'slot.buffer' | 'window.hold' | 'window.minNotice' | 'window.maxAdvance' | 'dateRanges.minStay' | 'dateRanges.maxStay';
|
|
1770
|
+
type Units = readonly BookingDurationUnit[];
|
|
1771
|
+
declare function allowedDurationUnits(rule: Pick<BookingRulesInput, 'ratePeriod'>, field: BookingDurationField): Units;
|
|
1772
|
+
type BookingDurationProblemKind = 'count' | 'unit' | 'not-for-type' | 'min-above-max';
|
|
1773
|
+
interface BookingDurationProblem {
|
|
1774
|
+
field: BookingDurationField;
|
|
1775
|
+
kind: BookingDurationProblemKind;
|
|
1776
|
+
message: string;
|
|
1777
|
+
allowed?: readonly BookingDurationUnit[];
|
|
1778
|
+
min?: BookingDuration;
|
|
1779
|
+
max?: BookingDuration;
|
|
1780
|
+
}
|
|
1781
|
+
declare function durationProblems(rule: BookingRulesInput): BookingDurationProblem[];
|
|
1782
|
+
declare const shortestMinutesOf: ({ count, unit }: BookingDuration) => number;
|
|
1783
|
+
declare const longestMinutesOf: ({ count, unit }: BookingDuration) => number;
|
|
1784
|
+
declare const durationText: ({ count, unit }: BookingDuration) => string;
|
|
1785
|
+
|
|
1786
|
+
declare const DEFAULT_HOLD_MINUTES = 10;
|
|
1787
|
+
interface PlanWindowInput {
|
|
1788
|
+
rule: BookingRulesInput;
|
|
1789
|
+
timeZone: string;
|
|
1790
|
+
presence?: WeeklyHours[] | null;
|
|
1791
|
+
startAt: Date;
|
|
1792
|
+
endAt: Date;
|
|
1793
|
+
now: Date;
|
|
1794
|
+
busy?: BusyWindow[];
|
|
1795
|
+
}
|
|
1796
|
+
declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
|
|
1797
|
+
slots: GridSlot[];
|
|
1798
|
+
periods: number;
|
|
1799
|
+
endAt: Date;
|
|
1800
|
+
bufferEndAt: Date;
|
|
1801
|
+
};
|
|
1802
|
+
interface WindowForPeriodsInput {
|
|
1803
|
+
rule: BookingRulesInput;
|
|
1804
|
+
timeZone: string;
|
|
1805
|
+
startAt: Date;
|
|
1806
|
+
periods: number;
|
|
1807
|
+
now: Date;
|
|
1808
|
+
}
|
|
1809
|
+
declare function windowForPeriods({ rule, timeZone, startAt, periods, now }: WindowForPeriodsInput): {
|
|
1810
|
+
startAt: Date;
|
|
1811
|
+
endAt: Date;
|
|
1812
|
+
};
|
|
1813
|
+
interface PlanCourseInput {
|
|
1814
|
+
rule: BookingRulesInput;
|
|
1815
|
+
timeZone: string;
|
|
1816
|
+
presence?: WeeklyHours[] | null;
|
|
1817
|
+
now: Date;
|
|
1818
|
+
}
|
|
1819
|
+
declare function courseSessions(rule: BookingRulesInput, timeZone: string): GridSlot[];
|
|
1820
|
+
declare const courseStarted: (rule: BookingRulesInput, sessions: GridSlot[], now: Date) => boolean;
|
|
1821
|
+
declare function courseStartedInZone(rule: BookingRulesInput, sessions: GridSlot[], now: Date, timeZone: string): boolean;
|
|
1822
|
+
declare function planCourse({ rule, timeZone, presence, now }: PlanCourseInput): GridSlot[];
|
|
1823
|
+
declare function holdExpiresAt(rule: BookingRulesInput, now: Date): Date;
|
|
1824
|
+
declare function checkQtyPerBooking(rule: BookingRulesInput, qty: number): void;
|
|
1825
|
+
declare function checkPartySize(rule: BookingRulesInput, partySize: number): void;
|
|
1826
|
+
type BookingMethod = 'time-slots' | 'sessions' | 'date-ranges';
|
|
1827
|
+
declare function bookingMethodOf(rule: Pick<BookingRulesInput, 'ratePeriod'>): BookingMethod;
|
|
1828
|
+
declare const soldAsCourse: (rule: Pick<BookingRulesInput, "ratePeriod" | "sessions">) => boolean;
|
|
1829
|
+
declare function capacityOf(rule: Pick<BookingRulesInput, 'ratePeriod' | 'sessions'>, resource: {
|
|
1830
|
+
seats?: number | null;
|
|
1831
|
+
}): number;
|
|
1832
|
+
type BookingRuleParts = ({
|
|
1833
|
+
method: 'time-slots';
|
|
1834
|
+
} & Required<BookingTimeSlots>) | {
|
|
1835
|
+
method: 'sessions';
|
|
1836
|
+
sessions: NonNullable<BookingRulesInput['sessions']>;
|
|
1837
|
+
} | ({
|
|
1838
|
+
method: 'date-ranges';
|
|
1839
|
+
ratePeriod: BookingRulesInput['ratePeriod'];
|
|
1840
|
+
wholePeriods: boolean;
|
|
1841
|
+
} & BookingDateRanges);
|
|
1842
|
+
declare function bookingRuleParts(rule: BookingRulesInput): BookingRuleParts;
|
|
1843
|
+
interface BookingRuleNewFields {
|
|
1844
|
+
timeSlots?: Required<BookingTimeSlots>;
|
|
1845
|
+
dateRanges?: BookingDateRanges;
|
|
1846
|
+
'slot.buffer'?: BookingDuration;
|
|
1847
|
+
'window.hold': BookingDuration;
|
|
1848
|
+
'window.minNotice'?: BookingDuration;
|
|
1849
|
+
'window.maxAdvance'?: BookingDuration;
|
|
1850
|
+
}
|
|
1851
|
+
interface BookingRuleInNewShape {
|
|
1852
|
+
set: BookingRuleNewFields;
|
|
1853
|
+
unset: string[];
|
|
1854
|
+
problems: BookingDurationProblem[];
|
|
1855
|
+
notes: string[];
|
|
1856
|
+
changesBehaviour?: 'whole-periods';
|
|
1857
|
+
}
|
|
1858
|
+
declare function ruleInNewShape(rule: BookingRulesInput): BookingRuleInNewShape;
|
|
1859
|
+
|
|
1692
1860
|
interface BookingOccupancy {
|
|
1693
1861
|
resourceId: string;
|
|
1694
1862
|
productId: string;
|
|
@@ -1709,11 +1877,13 @@ interface ResourceAvailability {
|
|
|
1709
1877
|
capacity: number;
|
|
1710
1878
|
booked: number;
|
|
1711
1879
|
free: number;
|
|
1880
|
+
unlimited?: true;
|
|
1712
1881
|
}
|
|
1713
1882
|
interface AvailabilitySlot extends GridSlot {
|
|
1714
1883
|
capacity: number;
|
|
1715
1884
|
booked: number;
|
|
1716
1885
|
free: number;
|
|
1886
|
+
unlimited?: true;
|
|
1717
1887
|
resources: ResourceAvailability[];
|
|
1718
1888
|
dayKey: string;
|
|
1719
1889
|
}
|
|
@@ -1727,13 +1897,13 @@ interface ResourceInWindow {
|
|
|
1727
1897
|
interface AvailabilityInput {
|
|
1728
1898
|
productId: string;
|
|
1729
1899
|
bookingRulesId?: string;
|
|
1730
|
-
bookingType?: BookingType;
|
|
1731
1900
|
rule: BookingRulesInput;
|
|
1732
1901
|
resources: BookingResourceInput[];
|
|
1733
1902
|
occupied: BookingOccupancy[];
|
|
1734
1903
|
from: Date;
|
|
1735
1904
|
to: Date;
|
|
1736
1905
|
now: Date;
|
|
1906
|
+
timeZone?: string;
|
|
1737
1907
|
}
|
|
1738
1908
|
declare const withinPresence: (slot: GridSlot, timeZone: string, presence?: WeeklyHours[] | null) => boolean;
|
|
1739
1909
|
declare function occupancyIn(occupied: BookingOccupancy[], productId: string, startAt: Date, bufferEndAt: Date, shared: boolean): {
|
|
@@ -1745,21 +1915,60 @@ declare function shopDayRange(fromDayKey: string, count: number, timeZone: strin
|
|
|
1745
1915
|
from: Date;
|
|
1746
1916
|
to: Date;
|
|
1747
1917
|
};
|
|
1748
|
-
declare function buildAvailability({ productId, bookingRulesId,
|
|
1918
|
+
declare function buildAvailability({ productId, bookingRulesId, rule, resources, occupied, from, to, now, timeZone, }: AvailabilityInput): {
|
|
1919
|
+
course: ({
|
|
1920
|
+
sessions: number;
|
|
1921
|
+
alreadyStarted: boolean;
|
|
1922
|
+
sessionTimes: {
|
|
1923
|
+
startAt: Date;
|
|
1924
|
+
endAt: Date;
|
|
1925
|
+
}[];
|
|
1926
|
+
startAt: Date;
|
|
1927
|
+
endAt: Date;
|
|
1928
|
+
resources: ({
|
|
1929
|
+
resourceId: string;
|
|
1930
|
+
free: number;
|
|
1931
|
+
unlimited?: undefined;
|
|
1932
|
+
} | {
|
|
1933
|
+
resourceId: string;
|
|
1934
|
+
free: number;
|
|
1935
|
+
unlimited: true;
|
|
1936
|
+
})[];
|
|
1937
|
+
} & {
|
|
1938
|
+
maxQtyNow?: number;
|
|
1939
|
+
}) | undefined;
|
|
1749
1940
|
resources: ResourceInWindow[];
|
|
1750
|
-
slots: AvailabilitySlot
|
|
1941
|
+
slots: (AvailabilitySlot & {
|
|
1942
|
+
unlimited?: true;
|
|
1943
|
+
} & {
|
|
1944
|
+
maxQtyNow?: number;
|
|
1945
|
+
})[];
|
|
1751
1946
|
timeZone: string;
|
|
1752
1947
|
days: string[];
|
|
1753
1948
|
productId: string;
|
|
1754
1949
|
bookingRulesId: string | undefined;
|
|
1755
|
-
|
|
1756
|
-
|
|
1950
|
+
ratePeriod: "slot" | "hour" | "session" | "day" | "night" | "week" | "month" | BookingRatePeriod;
|
|
1951
|
+
bookingMethod: BookingMethod;
|
|
1757
1952
|
minimumToRun: number | undefined;
|
|
1758
1953
|
minStay: number | undefined;
|
|
1759
1954
|
maxStay: number | undefined;
|
|
1955
|
+
minStayLength: BookingDuration | undefined;
|
|
1956
|
+
maxStayLength: BookingDuration | undefined;
|
|
1957
|
+
maxQtyPerBooking: number | undefined;
|
|
1958
|
+
maxPartySize: number | undefined;
|
|
1760
1959
|
bookableUntil: Date | null;
|
|
1761
1960
|
beyondWindow: boolean;
|
|
1762
1961
|
};
|
|
1962
|
+
declare function pickFreeResource<T extends {
|
|
1963
|
+
free: number;
|
|
1964
|
+
}>(slot: {
|
|
1965
|
+
resources: T[];
|
|
1966
|
+
}, qty?: number): T | undefined;
|
|
1967
|
+
declare function fewestFreeOver(slots: {
|
|
1968
|
+
startAt: Date;
|
|
1969
|
+
endAt: Date;
|
|
1970
|
+
resources: ResourceAvailability[];
|
|
1971
|
+
}[], from: Date, to: Date): ResourceAvailability[];
|
|
1763
1972
|
interface ResourcePresenceRow {
|
|
1764
1973
|
resourceId: string;
|
|
1765
1974
|
outletId: string;
|
|
@@ -1772,23 +1981,6 @@ declare function presentAt<T extends {
|
|
|
1772
1981
|
presence?: WeeklyHours[] | null;
|
|
1773
1982
|
}[];
|
|
1774
1983
|
|
|
1775
|
-
declare const DEFAULT_HOLD_MINUTES = 10;
|
|
1776
|
-
interface PlanWindowInput {
|
|
1777
|
-
rule: BookingRulesInput;
|
|
1778
|
-
timeZone: string;
|
|
1779
|
-
presence?: WeeklyHours[] | null;
|
|
1780
|
-
startAt: Date;
|
|
1781
|
-
endAt: Date;
|
|
1782
|
-
now: Date;
|
|
1783
|
-
busy?: BusyWindow[];
|
|
1784
|
-
}
|
|
1785
|
-
declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
|
|
1786
|
-
slots: GridSlot[];
|
|
1787
|
-
endAt: Date;
|
|
1788
|
-
bufferEndAt: Date;
|
|
1789
|
-
};
|
|
1790
|
-
declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
|
|
1791
|
-
|
|
1792
1984
|
interface ShippingPlace {
|
|
1793
1985
|
country: string;
|
|
1794
1986
|
province?: string | null;
|
|
@@ -1966,4 +2158,4 @@ declare const EXPENSE_DEFAULT_CATEGORIES: readonly [{
|
|
|
1966
2158
|
}];
|
|
1967
2159
|
type ExpenseDefaultCategoryKey = (typeof EXPENSE_DEFAULT_CATEGORIES)[number]['key'];
|
|
1968
2160
|
|
|
1969
|
-
export { ADYEN_JOB_TITLE_ASSOCIATION_TYPES, ADYEN_LEGAL_ENTITY_STATE_PROVINCE_COUNTRIES, ADYEN_NO_TAX_NUMBER_ABSENT_COUNTRIES, ADYEN_ROLLOUT_COUNTRY_CODES, ADYEN_STORE_STATE_PROVINCE_COUNTRIES, ADYEN_TAX_NUMBER_FORMATS, ADYEN_TAX_NUMBER_MIN_LENGTH, AFFIRM_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AddressLike, type AdyenBnplSettings, type AdyenBnplSkippedStore, type AdyenBnplUpdateResult, type AffirmPricePlan, type Amount, type AssignUserChange, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, BNPL_METHOD_STATUS, BNPL_SKIP_REASON, type BnplMethodStatus, type BnplSkipReason, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CountryOption, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EVERYWHERE_KEY, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, HttpMethod, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, type LineStockMove, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, type NormalizedAddress, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForAssignedUsers, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductSalesChartStep, ProductSalesReportCompare, ProductStatus, ProductType, type Province, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveShippingInput, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, SHIPPING_COUNTRIES, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, SalesLineAction, SalesLineSourceArray, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, ShippingChannel, ShippingNoOptionReason, type ShippingOptionRule, ShippingOptionType, type ShippingPlace, type ShippingPriceTier, type ShippingQuoteOption, ShippingRateType, type ShippingResolution, type ShippingTuple, ShippingZoneError, ShippingZoneKind, type ShippingZoneProblem, type ShippingZoneRule, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StockLine, type StockLineComponent, type StockReservationLink, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, amountToString, ancestorChain, applyAssignment, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, cheapestCompositeItem, cheapestCompositePrice, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, currentAssignees, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, lineStockMoves, listCountries, listProvinces, listShippingCountries, mapToLegacyStatus, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, placeKey, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shipsToCountry, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, withinPresence };
|
|
2161
|
+
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 BookingDateRanges, type BookingDuration, type BookingDurationField, type BookingDurationProblem, type BookingDurationProblemKind, BookingDurationUnit, type BookingMethod, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, type BookingRuleDurations, type BookingRuleInNewShape, type BookingRuleNewFields, type BookingRuleParts, BookingRulesError, type BookingRulesInput, BookingSessionSale, type BookingTimeSlots, BookingType, type BusyWindow, CANADA_PROVINCES, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, type CategoryModifierRow, type CategoryRow, CompanyType, type CompositeAvailabilityRows, type CompositeMakeable, type CompositeMakeableRow, type CompositePriceItem, type CompositePricePart, type CompositeReservationOrder, type CompositeShelf, type CompositeStockPart, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CountryOption, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, EVERYWHERE_KEY, EXPENSE_DEFAULT_CATEGORIES, EXPENSE_NAME_MAX_LENGTH, EXPENSE_PAYMENT_METHOD_PRESETS, type EndOfSessionReport, type ExpenseDefaultCategoryKey, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, HttpMethod, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, type LineStockMove, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifierChoiceRow, type ModifierRow, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, type NormalizedAddress, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForAssignedUsers, type OrderLikeForContext, type OrderLikeForInCart, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderStatusDefinition, type OrderStatusValidationError, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_CHANNELS, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, type PaymentChannel, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanCourseInput, type PlanWindowInput, Platform, type PoolDrawing, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, ProcessorType, type ProductDiscountBucket, type ProductFeeBucket, ProductSalesChartStep, ProductSalesReportCompare, ProductStatus, ProductType, type Province, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveInputs, type ResolveShippingInput, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, SHIPPING_COUNTRIES, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, SalesLineAction, SalesLineSourceArray, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, ShippingChannel, ShippingNoOptionReason, type ShippingOptionRule, ShippingOptionType, type ShippingPlace, type ShippingPriceTier, type ShippingQuoteOption, ShippingRateType, type ShippingResolution, type ShippingTuple, ShippingZoneError, ShippingZoneKind, type ShippingZoneProblem, type ShippingZoneRule, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StockLine, type StockLineComponent, type StockReservationLink, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UNLIMITED_PLACES, UserTypes, type WeeklyHours, type WindowForPeriodsInput, addAmounts, addressPlaceKeys, adyenLegalEntityRequiresStateOrProvince, adyenRequiresJobTitle, adyenStoreRequiresStateOrProvince, adyenSupportsTaxNumberAbsent, adyenTaxNumberFormat, allowedDurationUnits, amountToString, ancestorChain, applyAssignment, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, bookingMethodOf, bookingRuleParts, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, calendarDate, canTransition, capacityOf, cheapestCompositeItem, cheapestCompositePrice, checkPartySize, checkQtyPerBooking, compositeItemCost, compositeItemUnavailable, compositeMakeable, compositeModifierMismatches, compositeReservationMismatches, compositeVariantInStock, conditionSummary, convertFixedFeeToLocalCurrency, courseSessions, courseStarted, courseStartedInZone, createAmount, crossAxisRuleApplies, currentAssignees, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, durationProblems, durationText, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, fewestFreeOver, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, hasInCartFlag, hasSellableChoice, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isAffirmCountry, isAffirmPricePlan, isChoiceAvailableAtOutlet, isConditionOperator, isFulfillmentState, isInCart, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, lineStockMoves, listCountries, listProvinces, listShippingCountries, longestMinutesOf, mapToLegacyStatus, maxAdvanceMinutesOf, maxPrecisionFor, mergeFragment, modifiersSellable, multiplyAmount, normalizeAddress, normalizeCityKey, normalizeCountry, normalizeMongoIdString, normalizePostCode, normalizeProvince, occupancyIn, oldMaxAdvanceOf, orderAssignments, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, pickFreeResource, placeKey, planCourse, planWindow, poolDemand, poolOf, poolShortfall, poolStockAt, postCodeMatchesProvince, presentAt, priceForTotal, provincesForPostCode, removeFragment, resolveFamily, resolveModifiersForProduct, resolveShipping, resolveTemplate, resolveUnit, roundToPrecision, ruleDurationsOf, ruleInNewShape, sameFamily, sessionCells, setOrderState, shipsToCountry, shopDayKey, shopDayRange, shortestMinutesOf, signReportForDisplay, slotsForWindow, soldAsCourse, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, validateOrderStatuses, validateShippingZone, violatesFinancialInvariant, windowEndsAt, windowEndsAtInZone, windowForPeriods, withinPresence };
|