@fire-spark/core 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +508 -47
- package/dist/index.js +1389 -295
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { AndConditions, CheckoutMode, CheckoutResolved, Condition, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderInsertInput, OrderLine, OrderListInput, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentIntentInput, PaymentMethod, PaymentProvider, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput } from "@fire-spark/types";
|
|
1
|
+
import { AndConditions, CheckoutMode, CheckoutResolved, Condition, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderInsertInput, OrderLine, OrderListInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentIntentInput, PaymentMethod, PaymentProvider, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, Variant, VariantGroup } from "@fire-spark/types";
|
|
2
|
+
import { Big } from "big.js";
|
|
2
3
|
//#region src/productCustomization/types.d.ts
|
|
3
4
|
type SelectionStatus = "IDLE" | "INCOMPLETE" | "VALID" | "INVALID";
|
|
5
|
+
type StartingPriceCache = Map<string, Big>;
|
|
4
6
|
type CustomizationPath = string;
|
|
5
7
|
type QuantitiesByPath = Record<CustomizationPath, number>;
|
|
8
|
+
type SelectionsByPath = Record<CustomizationPath, VariantSelection>;
|
|
6
9
|
interface Snapshot {
|
|
7
10
|
productId: string;
|
|
8
11
|
quantities: QuantitiesByPath;
|
|
12
|
+
/** Variant picks of modifiers whose product is a variant base. */
|
|
13
|
+
variants?: SelectionsByPath;
|
|
9
14
|
}
|
|
10
15
|
interface CreateSessionOptions {
|
|
11
16
|
initial?: QuantitiesByPath;
|
|
@@ -50,12 +55,40 @@ interface ModifierCtx {
|
|
|
50
55
|
status: SelectionStatus;
|
|
51
56
|
data: Product;
|
|
52
57
|
type: ModifierControlType;
|
|
58
|
+
/** Nested customization; for a variant base, the resolved variant (or the
|
|
59
|
+
* base while options are pending). */
|
|
53
60
|
product: ProductCtx | null;
|
|
61
|
+
/** Variant questions when `data` is a variant base; empty otherwise. */
|
|
62
|
+
variants: VariantGroupCtx[];
|
|
63
|
+
/** Product that is ordered: `data`, the resolved variant, or null while a
|
|
64
|
+
* variant base still has unanswered options. */
|
|
65
|
+
resolved: Product | null;
|
|
54
66
|
onChange: (quantity: number) => void;
|
|
55
67
|
linePrice: number;
|
|
56
68
|
}
|
|
69
|
+
/** Variant group id → chosen variant (option) id. */
|
|
70
|
+
type VariantSelection = Record<string, string>;
|
|
71
|
+
interface VariantOptionCtx {
|
|
72
|
+
path: CustomizationPath;
|
|
73
|
+
data: Variant;
|
|
74
|
+
selected: boolean;
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
select: () => void;
|
|
77
|
+
}
|
|
78
|
+
interface VariantGroupCtx {
|
|
79
|
+
path: CustomizationPath;
|
|
80
|
+
data: VariantGroup;
|
|
81
|
+
selectedId: string | null;
|
|
82
|
+
status: SelectionStatus;
|
|
83
|
+
options: VariantOptionCtx[];
|
|
84
|
+
}
|
|
57
85
|
interface CustomizationSession {
|
|
86
|
+
/** Resolved product; the base selector until every variant group is chosen. */
|
|
58
87
|
root: ProductCtx;
|
|
88
|
+
/** Product carrying variant_group_ids, or null for plain products. */
|
|
89
|
+
base: Product | null;
|
|
90
|
+
/** Rendered before modifier groups; empty for plain products. */
|
|
91
|
+
variants: VariantGroupCtx[];
|
|
59
92
|
subscribe: (listener: () => void) => () => void;
|
|
60
93
|
snapshot: () => Snapshot;
|
|
61
94
|
totalPrice: () => number;
|
|
@@ -100,10 +133,18 @@ declare const fromOrderLines: (root: OrderLine, lines: OrderLine[], lookup: Menu
|
|
|
100
133
|
//#region src/productCustomization/menu.d.ts
|
|
101
134
|
declare const indexMenu: (menu: Menu$1) => MenuLookup$1;
|
|
102
135
|
//#endregion
|
|
136
|
+
//#region src/productCustomization/startingPrice.d.ts
|
|
137
|
+
/** Lowest unit price reachable while satisfying every required modifier.
|
|
138
|
+
* For a variant base, the cheapest of its variant products. */
|
|
139
|
+
declare const computeStartingPrice: (lookup: MenuLookup$1, product: Product$1, cache?: StartingPriceCache) => number;
|
|
140
|
+
//#endregion
|
|
103
141
|
//#region src/productCustomization/toOrderLines.d.ts
|
|
104
142
|
/** Flatten a customized product tree into priced OrderLine rows. */
|
|
105
143
|
declare const toOrderLines: (root: ProductCtx, locale: string) => OrderLine[];
|
|
106
144
|
//#endregion
|
|
145
|
+
//#region src/productCustomization/variants.d.ts
|
|
146
|
+
declare const isVariantBase: (product: Product$1) => boolean;
|
|
147
|
+
//#endregion
|
|
107
148
|
//#region src/shared/baseUrl.d.ts
|
|
108
149
|
declare const resolveBaseUrl: (baseUrl?: string) => string;
|
|
109
150
|
//#endregion
|
|
@@ -208,9 +249,11 @@ declare const listOrders: (input?: OrderListInput, options?: ServiceHttpOptions)
|
|
|
208
249
|
included_quantity: number;
|
|
209
250
|
}[];
|
|
210
251
|
redeem: {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
252
|
+
reward_id: string;
|
|
253
|
+
quantity: number;
|
|
254
|
+
discount_rate?: number | undefined;
|
|
255
|
+
discount_amount?: number | undefined;
|
|
256
|
+
expires_at?: string | undefined;
|
|
214
257
|
}[];
|
|
215
258
|
quantity: number;
|
|
216
259
|
tax_rate: number | null;
|
|
@@ -233,9 +276,44 @@ declare const listOrders: (input?: OrderListInput, options?: ServiceHttpOptions)
|
|
|
233
276
|
group_total: number;
|
|
234
277
|
}[];
|
|
235
278
|
redeem: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
279
|
+
reward_id: string;
|
|
280
|
+
quantity: number;
|
|
281
|
+
discount_rate?: number | undefined;
|
|
282
|
+
discount_amount?: number | undefined;
|
|
283
|
+
expires_at?: string | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
redemption_steps: {
|
|
286
|
+
reward_id: string;
|
|
287
|
+
reward_quantity: number;
|
|
288
|
+
target: "LINE" | "ORDER";
|
|
289
|
+
target_id?: string | undefined;
|
|
290
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
291
|
+
discount_amount: number;
|
|
292
|
+
before: {
|
|
293
|
+
value: number;
|
|
294
|
+
quantity: number;
|
|
295
|
+
discount_amount: number;
|
|
296
|
+
discount_rate: number;
|
|
297
|
+
};
|
|
298
|
+
after: {
|
|
299
|
+
value: number;
|
|
300
|
+
quantity: number;
|
|
301
|
+
discount_amount: number;
|
|
302
|
+
discount_rate: number;
|
|
303
|
+
};
|
|
304
|
+
target_before?: {
|
|
305
|
+
value: number;
|
|
306
|
+
quantity: number;
|
|
307
|
+
discount_amount: number;
|
|
308
|
+
discount_rate: number;
|
|
309
|
+
} | undefined;
|
|
310
|
+
target_after?: {
|
|
311
|
+
value: number;
|
|
312
|
+
quantity: number;
|
|
313
|
+
discount_amount: number;
|
|
314
|
+
discount_rate: number;
|
|
315
|
+
} | undefined;
|
|
316
|
+
error?: string | undefined;
|
|
239
317
|
}[];
|
|
240
318
|
customer: {
|
|
241
319
|
customer_info: {
|
|
@@ -343,9 +421,11 @@ declare const createOrder: (body: OrderInsertInput, options?: ServiceHttpOptions
|
|
|
343
421
|
included_quantity: number;
|
|
344
422
|
}[];
|
|
345
423
|
redeem: {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
424
|
+
reward_id: string;
|
|
425
|
+
quantity: number;
|
|
426
|
+
discount_rate?: number | undefined;
|
|
427
|
+
discount_amount?: number | undefined;
|
|
428
|
+
expires_at?: string | undefined;
|
|
349
429
|
}[];
|
|
350
430
|
quantity: number;
|
|
351
431
|
tax_rate: number | null;
|
|
@@ -368,9 +448,44 @@ declare const createOrder: (body: OrderInsertInput, options?: ServiceHttpOptions
|
|
|
368
448
|
group_total: number;
|
|
369
449
|
}[];
|
|
370
450
|
redeem: {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
451
|
+
reward_id: string;
|
|
452
|
+
quantity: number;
|
|
453
|
+
discount_rate?: number | undefined;
|
|
454
|
+
discount_amount?: number | undefined;
|
|
455
|
+
expires_at?: string | undefined;
|
|
456
|
+
}[];
|
|
457
|
+
redemption_steps: {
|
|
458
|
+
reward_id: string;
|
|
459
|
+
reward_quantity: number;
|
|
460
|
+
target: "LINE" | "ORDER";
|
|
461
|
+
target_id?: string | undefined;
|
|
462
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
463
|
+
discount_amount: number;
|
|
464
|
+
before: {
|
|
465
|
+
value: number;
|
|
466
|
+
quantity: number;
|
|
467
|
+
discount_amount: number;
|
|
468
|
+
discount_rate: number;
|
|
469
|
+
};
|
|
470
|
+
after: {
|
|
471
|
+
value: number;
|
|
472
|
+
quantity: number;
|
|
473
|
+
discount_amount: number;
|
|
474
|
+
discount_rate: number;
|
|
475
|
+
};
|
|
476
|
+
target_before?: {
|
|
477
|
+
value: number;
|
|
478
|
+
quantity: number;
|
|
479
|
+
discount_amount: number;
|
|
480
|
+
discount_rate: number;
|
|
481
|
+
} | undefined;
|
|
482
|
+
target_after?: {
|
|
483
|
+
value: number;
|
|
484
|
+
quantity: number;
|
|
485
|
+
discount_amount: number;
|
|
486
|
+
discount_rate: number;
|
|
487
|
+
} | undefined;
|
|
488
|
+
error?: string | undefined;
|
|
374
489
|
}[];
|
|
375
490
|
customer: {
|
|
376
491
|
customer_info: {
|
|
@@ -478,9 +593,11 @@ declare const getOrder: (id: string, options?: ServiceHttpOptions) => Promise<{
|
|
|
478
593
|
included_quantity: number;
|
|
479
594
|
}[];
|
|
480
595
|
redeem: {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
596
|
+
reward_id: string;
|
|
597
|
+
quantity: number;
|
|
598
|
+
discount_rate?: number | undefined;
|
|
599
|
+
discount_amount?: number | undefined;
|
|
600
|
+
expires_at?: string | undefined;
|
|
484
601
|
}[];
|
|
485
602
|
quantity: number;
|
|
486
603
|
tax_rate: number | null;
|
|
@@ -503,9 +620,44 @@ declare const getOrder: (id: string, options?: ServiceHttpOptions) => Promise<{
|
|
|
503
620
|
group_total: number;
|
|
504
621
|
}[];
|
|
505
622
|
redeem: {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
623
|
+
reward_id: string;
|
|
624
|
+
quantity: number;
|
|
625
|
+
discount_rate?: number | undefined;
|
|
626
|
+
discount_amount?: number | undefined;
|
|
627
|
+
expires_at?: string | undefined;
|
|
628
|
+
}[];
|
|
629
|
+
redemption_steps: {
|
|
630
|
+
reward_id: string;
|
|
631
|
+
reward_quantity: number;
|
|
632
|
+
target: "LINE" | "ORDER";
|
|
633
|
+
target_id?: string | undefined;
|
|
634
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
635
|
+
discount_amount: number;
|
|
636
|
+
before: {
|
|
637
|
+
value: number;
|
|
638
|
+
quantity: number;
|
|
639
|
+
discount_amount: number;
|
|
640
|
+
discount_rate: number;
|
|
641
|
+
};
|
|
642
|
+
after: {
|
|
643
|
+
value: number;
|
|
644
|
+
quantity: number;
|
|
645
|
+
discount_amount: number;
|
|
646
|
+
discount_rate: number;
|
|
647
|
+
};
|
|
648
|
+
target_before?: {
|
|
649
|
+
value: number;
|
|
650
|
+
quantity: number;
|
|
651
|
+
discount_amount: number;
|
|
652
|
+
discount_rate: number;
|
|
653
|
+
} | undefined;
|
|
654
|
+
target_after?: {
|
|
655
|
+
value: number;
|
|
656
|
+
quantity: number;
|
|
657
|
+
discount_amount: number;
|
|
658
|
+
discount_rate: number;
|
|
659
|
+
} | undefined;
|
|
660
|
+
error?: string | undefined;
|
|
509
661
|
}[];
|
|
510
662
|
customer: {
|
|
511
663
|
customer_info: {
|
|
@@ -1051,9 +1203,11 @@ declare const updateOrder: (id: string, body: OrderUpdateInput, options?: Servic
|
|
|
1051
1203
|
included_quantity: number;
|
|
1052
1204
|
}[];
|
|
1053
1205
|
redeem: {
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1206
|
+
reward_id: string;
|
|
1207
|
+
quantity: number;
|
|
1208
|
+
discount_rate?: number | undefined;
|
|
1209
|
+
discount_amount?: number | undefined;
|
|
1210
|
+
expires_at?: string | undefined;
|
|
1057
1211
|
}[];
|
|
1058
1212
|
quantity: number;
|
|
1059
1213
|
tax_rate: number | null;
|
|
@@ -1076,9 +1230,44 @@ declare const updateOrder: (id: string, body: OrderUpdateInput, options?: Servic
|
|
|
1076
1230
|
group_total: number;
|
|
1077
1231
|
}[];
|
|
1078
1232
|
redeem: {
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1233
|
+
reward_id: string;
|
|
1234
|
+
quantity: number;
|
|
1235
|
+
discount_rate?: number | undefined;
|
|
1236
|
+
discount_amount?: number | undefined;
|
|
1237
|
+
expires_at?: string | undefined;
|
|
1238
|
+
}[];
|
|
1239
|
+
redemption_steps: {
|
|
1240
|
+
reward_id: string;
|
|
1241
|
+
reward_quantity: number;
|
|
1242
|
+
target: "LINE" | "ORDER";
|
|
1243
|
+
target_id?: string | undefined;
|
|
1244
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
1245
|
+
discount_amount: number;
|
|
1246
|
+
before: {
|
|
1247
|
+
value: number;
|
|
1248
|
+
quantity: number;
|
|
1249
|
+
discount_amount: number;
|
|
1250
|
+
discount_rate: number;
|
|
1251
|
+
};
|
|
1252
|
+
after: {
|
|
1253
|
+
value: number;
|
|
1254
|
+
quantity: number;
|
|
1255
|
+
discount_amount: number;
|
|
1256
|
+
discount_rate: number;
|
|
1257
|
+
};
|
|
1258
|
+
target_before?: {
|
|
1259
|
+
value: number;
|
|
1260
|
+
quantity: number;
|
|
1261
|
+
discount_amount: number;
|
|
1262
|
+
discount_rate: number;
|
|
1263
|
+
} | undefined;
|
|
1264
|
+
target_after?: {
|
|
1265
|
+
value: number;
|
|
1266
|
+
quantity: number;
|
|
1267
|
+
discount_amount: number;
|
|
1268
|
+
discount_rate: number;
|
|
1269
|
+
} | undefined;
|
|
1270
|
+
error?: string | undefined;
|
|
1082
1271
|
}[];
|
|
1083
1272
|
customer: {
|
|
1084
1273
|
customer_info: {
|
|
@@ -1186,9 +1375,11 @@ declare const cancelOrder: (id: string, options?: ServiceHttpOptions) => Promise
|
|
|
1186
1375
|
included_quantity: number;
|
|
1187
1376
|
}[];
|
|
1188
1377
|
redeem: {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1378
|
+
reward_id: string;
|
|
1379
|
+
quantity: number;
|
|
1380
|
+
discount_rate?: number | undefined;
|
|
1381
|
+
discount_amount?: number | undefined;
|
|
1382
|
+
expires_at?: string | undefined;
|
|
1192
1383
|
}[];
|
|
1193
1384
|
quantity: number;
|
|
1194
1385
|
tax_rate: number | null;
|
|
@@ -1211,9 +1402,44 @@ declare const cancelOrder: (id: string, options?: ServiceHttpOptions) => Promise
|
|
|
1211
1402
|
group_total: number;
|
|
1212
1403
|
}[];
|
|
1213
1404
|
redeem: {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1405
|
+
reward_id: string;
|
|
1406
|
+
quantity: number;
|
|
1407
|
+
discount_rate?: number | undefined;
|
|
1408
|
+
discount_amount?: number | undefined;
|
|
1409
|
+
expires_at?: string | undefined;
|
|
1410
|
+
}[];
|
|
1411
|
+
redemption_steps: {
|
|
1412
|
+
reward_id: string;
|
|
1413
|
+
reward_quantity: number;
|
|
1414
|
+
target: "LINE" | "ORDER";
|
|
1415
|
+
target_id?: string | undefined;
|
|
1416
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
1417
|
+
discount_amount: number;
|
|
1418
|
+
before: {
|
|
1419
|
+
value: number;
|
|
1420
|
+
quantity: number;
|
|
1421
|
+
discount_amount: number;
|
|
1422
|
+
discount_rate: number;
|
|
1423
|
+
};
|
|
1424
|
+
after: {
|
|
1425
|
+
value: number;
|
|
1426
|
+
quantity: number;
|
|
1427
|
+
discount_amount: number;
|
|
1428
|
+
discount_rate: number;
|
|
1429
|
+
};
|
|
1430
|
+
target_before?: {
|
|
1431
|
+
value: number;
|
|
1432
|
+
quantity: number;
|
|
1433
|
+
discount_amount: number;
|
|
1434
|
+
discount_rate: number;
|
|
1435
|
+
} | undefined;
|
|
1436
|
+
target_after?: {
|
|
1437
|
+
value: number;
|
|
1438
|
+
quantity: number;
|
|
1439
|
+
discount_amount: number;
|
|
1440
|
+
discount_rate: number;
|
|
1441
|
+
} | undefined;
|
|
1442
|
+
error?: string | undefined;
|
|
1217
1443
|
}[];
|
|
1218
1444
|
customer: {
|
|
1219
1445
|
customer_info: {
|
|
@@ -1321,9 +1547,11 @@ declare const refundOrder: (id: string, options?: ServiceHttpOptions) => Promise
|
|
|
1321
1547
|
included_quantity: number;
|
|
1322
1548
|
}[];
|
|
1323
1549
|
redeem: {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1550
|
+
reward_id: string;
|
|
1551
|
+
quantity: number;
|
|
1552
|
+
discount_rate?: number | undefined;
|
|
1553
|
+
discount_amount?: number | undefined;
|
|
1554
|
+
expires_at?: string | undefined;
|
|
1327
1555
|
}[];
|
|
1328
1556
|
quantity: number;
|
|
1329
1557
|
tax_rate: number | null;
|
|
@@ -1346,9 +1574,44 @@ declare const refundOrder: (id: string, options?: ServiceHttpOptions) => Promise
|
|
|
1346
1574
|
group_total: number;
|
|
1347
1575
|
}[];
|
|
1348
1576
|
redeem: {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1577
|
+
reward_id: string;
|
|
1578
|
+
quantity: number;
|
|
1579
|
+
discount_rate?: number | undefined;
|
|
1580
|
+
discount_amount?: number | undefined;
|
|
1581
|
+
expires_at?: string | undefined;
|
|
1582
|
+
}[];
|
|
1583
|
+
redemption_steps: {
|
|
1584
|
+
reward_id: string;
|
|
1585
|
+
reward_quantity: number;
|
|
1586
|
+
target: "LINE" | "ORDER";
|
|
1587
|
+
target_id?: string | undefined;
|
|
1588
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
1589
|
+
discount_amount: number;
|
|
1590
|
+
before: {
|
|
1591
|
+
value: number;
|
|
1592
|
+
quantity: number;
|
|
1593
|
+
discount_amount: number;
|
|
1594
|
+
discount_rate: number;
|
|
1595
|
+
};
|
|
1596
|
+
after: {
|
|
1597
|
+
value: number;
|
|
1598
|
+
quantity: number;
|
|
1599
|
+
discount_amount: number;
|
|
1600
|
+
discount_rate: number;
|
|
1601
|
+
};
|
|
1602
|
+
target_before?: {
|
|
1603
|
+
value: number;
|
|
1604
|
+
quantity: number;
|
|
1605
|
+
discount_amount: number;
|
|
1606
|
+
discount_rate: number;
|
|
1607
|
+
} | undefined;
|
|
1608
|
+
target_after?: {
|
|
1609
|
+
value: number;
|
|
1610
|
+
quantity: number;
|
|
1611
|
+
discount_amount: number;
|
|
1612
|
+
discount_rate: number;
|
|
1613
|
+
} | undefined;
|
|
1614
|
+
error?: string | undefined;
|
|
1352
1615
|
}[];
|
|
1353
1616
|
customer: {
|
|
1354
1617
|
customer_info: {
|
|
@@ -1456,9 +1719,11 @@ declare const reorderOrder: (id: string, body?: OrderReorderInput, options?: Ser
|
|
|
1456
1719
|
included_quantity: number;
|
|
1457
1720
|
}[];
|
|
1458
1721
|
redeem: {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1722
|
+
reward_id: string;
|
|
1723
|
+
quantity: number;
|
|
1724
|
+
discount_rate?: number | undefined;
|
|
1725
|
+
discount_amount?: number | undefined;
|
|
1726
|
+
expires_at?: string | undefined;
|
|
1462
1727
|
}[];
|
|
1463
1728
|
quantity: number;
|
|
1464
1729
|
tax_rate: number | null;
|
|
@@ -1481,9 +1746,44 @@ declare const reorderOrder: (id: string, body?: OrderReorderInput, options?: Ser
|
|
|
1481
1746
|
group_total: number;
|
|
1482
1747
|
}[];
|
|
1483
1748
|
redeem: {
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1749
|
+
reward_id: string;
|
|
1750
|
+
quantity: number;
|
|
1751
|
+
discount_rate?: number | undefined;
|
|
1752
|
+
discount_amount?: number | undefined;
|
|
1753
|
+
expires_at?: string | undefined;
|
|
1754
|
+
}[];
|
|
1755
|
+
redemption_steps: {
|
|
1756
|
+
reward_id: string;
|
|
1757
|
+
reward_quantity: number;
|
|
1758
|
+
target: "LINE" | "ORDER";
|
|
1759
|
+
target_id?: string | undefined;
|
|
1760
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
1761
|
+
discount_amount: number;
|
|
1762
|
+
before: {
|
|
1763
|
+
value: number;
|
|
1764
|
+
quantity: number;
|
|
1765
|
+
discount_amount: number;
|
|
1766
|
+
discount_rate: number;
|
|
1767
|
+
};
|
|
1768
|
+
after: {
|
|
1769
|
+
value: number;
|
|
1770
|
+
quantity: number;
|
|
1771
|
+
discount_amount: number;
|
|
1772
|
+
discount_rate: number;
|
|
1773
|
+
};
|
|
1774
|
+
target_before?: {
|
|
1775
|
+
value: number;
|
|
1776
|
+
quantity: number;
|
|
1777
|
+
discount_amount: number;
|
|
1778
|
+
discount_rate: number;
|
|
1779
|
+
} | undefined;
|
|
1780
|
+
target_after?: {
|
|
1781
|
+
value: number;
|
|
1782
|
+
quantity: number;
|
|
1783
|
+
discount_amount: number;
|
|
1784
|
+
discount_rate: number;
|
|
1785
|
+
} | undefined;
|
|
1786
|
+
error?: string | undefined;
|
|
1487
1787
|
}[];
|
|
1488
1788
|
customer: {
|
|
1489
1789
|
customer_info: {
|
|
@@ -1594,6 +1894,26 @@ type ReorderOrderOptions = CreateOrderOptions & {
|
|
|
1594
1894
|
strategy?: "replace" | "merge";
|
|
1595
1895
|
};
|
|
1596
1896
|
type OrderDraft = Order$2;
|
|
1897
|
+
type ApplyRedeemInput = {
|
|
1898
|
+
reward_id: string;
|
|
1899
|
+
/** Reward units to redeem (integer ≥ 1). */
|
|
1900
|
+
quantity: number;
|
|
1901
|
+
/** 0–1, compounded per unit over the remaining value. */
|
|
1902
|
+
discount_rate?: number;
|
|
1903
|
+
/** > 0, per unit; caps the rate discount when both are set. */
|
|
1904
|
+
discount_amount?: number;
|
|
1905
|
+
/** Root line to discount; omit to discount the whole order. */
|
|
1906
|
+
line_uid?: string;
|
|
1907
|
+
/** ISO datetime with offset; validation fails once it has passed. */
|
|
1908
|
+
expires_at?: string;
|
|
1909
|
+
};
|
|
1910
|
+
type RemoveRedeemInput = {
|
|
1911
|
+
reward_id: string;
|
|
1912
|
+
/** Reward units to remove (integer ≥ 1), latest applied first. */
|
|
1913
|
+
quantity: number;
|
|
1914
|
+
/** Root line holding the redeem; omit for order-level redeems. */
|
|
1915
|
+
line_uid?: string;
|
|
1916
|
+
};
|
|
1597
1917
|
//#endregion
|
|
1598
1918
|
//#region src/order/Order.d.ts
|
|
1599
1919
|
declare class Order {
|
|
@@ -1650,6 +1970,16 @@ declare class Order {
|
|
|
1650
1970
|
removeLine(lineUid: string): void;
|
|
1651
1971
|
replaceLine(lineUid: string, lines: OrderLine | OrderLine[]): void;
|
|
1652
1972
|
emptyOrder(): void;
|
|
1973
|
+
/**
|
|
1974
|
+
* Appends a redeem to `line_uid` (root line) or to the order. Steps keep
|
|
1975
|
+
* the order in which redeems were applied.
|
|
1976
|
+
*/
|
|
1977
|
+
applyRedeem(input: ApplyRedeemInput): void;
|
|
1978
|
+
/**
|
|
1979
|
+
* Removes `quantity` units of `reward_id` from `line_uid` or the order,
|
|
1980
|
+
* latest applied first. Removing more units than applied clears them all.
|
|
1981
|
+
*/
|
|
1982
|
+
removeRedeem(input: RemoveRedeemInput): void;
|
|
1653
1983
|
setScope(scope: Partial<OrderScope>): void;
|
|
1654
1984
|
/** Shallow-merges into order metadata; `null` values are kept as-is. */
|
|
1655
1985
|
setMetadata(patch: Record<string, unknown>): void;
|
|
@@ -1661,6 +1991,8 @@ declare class Order {
|
|
|
1661
1991
|
refundOrder(): Promise<void>;
|
|
1662
1992
|
validateOrder(): Promise<void>;
|
|
1663
1993
|
placeOrder(input?: PlaceOrderInput): Promise<void>;
|
|
1994
|
+
/** Applies lines/redeem, replaying redemption steps and totals. */
|
|
1995
|
+
private commitLines;
|
|
1664
1996
|
private scheduleAfterMutate;
|
|
1665
1997
|
private notify;
|
|
1666
1998
|
}
|
|
@@ -1725,8 +2057,8 @@ declare const milestoneTrack: (workflow: TrackWorkflow) => MilestoneTrackItem[];
|
|
|
1725
2057
|
declare const milestoneSteps: (workflow: TrackWorkflow, currentNodeIds: string[]) => MilestoneSteps | null;
|
|
1726
2058
|
//#endregion
|
|
1727
2059
|
//#region src/order/validate.d.ts
|
|
1728
|
-
type OrderLineIssueCode = "PRODUCT_NOT_FOUND" | "HIDDEN" | "OUT_OF_STOCK" | "OUTSIDE_HOURS" | "MODIFIER_NOT_FOUND" | "MODIFIER_RULES_INVALID" | "PRICE_MISMATCH" | "TAX_MISMATCH" | "DISCOUNT_MISMATCH" | "QUANTITY_MISMATCH" | "QUANTITY_BELOW_MINIMUM" | "QUANTITY_ABOVE_MAXIMUM" | "STRUCTURE_MISMATCH" | "FEE_MISMATCH";
|
|
1729
|
-
type OrderIssueCode = "NO_MENU" | "MENU_CLOSED" | "SCOPE_INACTIVE" | "TOTALS_MISMATCH" | "EMPTY_ORDER" | "ITEMS_BELOW_MINIMUM" | "ITEMS_ABOVE_MAXIMUM" | "TOTAL_BELOW_MINIMUM" | "TOTAL_ABOVE_MAXIMUM" | "REDEEMS_ABOVE_MAXIMUM" | "REDEEMS_TOTAL_ABOVE_MAXIMUM" | "SHIPPING_REQUIRED" | "BILLING_REQUIRED" | "SHIPPING_FIELD_REQUIRED" | "BILLING_FIELD_REQUIRED";
|
|
2060
|
+
type OrderLineIssueCode = "PRODUCT_NOT_FOUND" | "HIDDEN" | "OUT_OF_STOCK" | "OUTSIDE_HOURS" | "MODIFIER_NOT_FOUND" | "MODIFIER_RULES_INVALID" | "VARIANT_BASE_NOT_ORDERABLE" | "VARIANT_NOT_OFFERED" | "PRICE_MISMATCH" | "TAX_MISMATCH" | "DISCOUNT_MISMATCH" | "QUANTITY_MISMATCH" | "QUANTITY_BELOW_MINIMUM" | "QUANTITY_ABOVE_MAXIMUM" | "STRUCTURE_MISMATCH" | "FEE_MISMATCH" | "REDEEM_EXPIRED" | "REDEMPTION_STEPS_MISMATCH";
|
|
2061
|
+
type OrderIssueCode = "NO_MENU" | "MENU_CLOSED" | "SCOPE_INACTIVE" | "TOTALS_MISMATCH" | "REDEEM_EXPIRED" | "REDEMPTION_STEPS_MISMATCH" | "REDEMPTION_MISMATCH" | "EMPTY_ORDER" | "ITEMS_BELOW_MINIMUM" | "ITEMS_ABOVE_MAXIMUM" | "TOTAL_BELOW_MINIMUM" | "TOTAL_ABOVE_MAXIMUM" | "REDEEMS_ABOVE_MAXIMUM" | "REDEEMS_TOTAL_ABOVE_MAXIMUM" | "SHIPPING_REQUIRED" | "BILLING_REQUIRED" | "SHIPPING_FIELD_REQUIRED" | "BILLING_FIELD_REQUIRED";
|
|
1730
2062
|
type OrderLineIssue = {
|
|
1731
2063
|
code: OrderLineIssueCode;
|
|
1732
2064
|
field?: string;
|
|
@@ -1753,6 +2085,10 @@ type ValidateOrderAgainstMenuInput = {
|
|
|
1753
2085
|
menuActive: boolean;
|
|
1754
2086
|
locale?: string;
|
|
1755
2087
|
expectedFeeLines?: OrderLine[];
|
|
2088
|
+
redeem?: OrderRedeem[];
|
|
2089
|
+
redemptionSteps?: OrderRedemptionStep[];
|
|
2090
|
+
/** Epoch ms used for `expires_at` checks. */
|
|
2091
|
+
now?: number;
|
|
1756
2092
|
};
|
|
1757
2093
|
/** Compare cart lines/totals against a fresh menu (exact Big.js equality). */
|
|
1758
2094
|
declare const validateOrderAgainstMenu: (input: ValidateOrderAgainstMenuInput) => OrderValidationResult;
|
|
@@ -1778,6 +2114,58 @@ declare class OrderValidationError extends Error {
|
|
|
1778
2114
|
}
|
|
1779
2115
|
declare const isOrderValidationError: (error: unknown) => error is OrderValidationError;
|
|
1780
2116
|
//#endregion
|
|
2117
|
+
//#region src/order/redemptions.d.ts
|
|
2118
|
+
/** Steps + totals for a set of lines and redeems, keeping step order. */
|
|
2119
|
+
declare const recomputeRedemptions: (input: {
|
|
2120
|
+
lines: OrderLine[];
|
|
2121
|
+
redeem: OrderRedeem[];
|
|
2122
|
+
redemption_steps: OrderRedemptionStep[];
|
|
2123
|
+
currency: string;
|
|
2124
|
+
}) => {
|
|
2125
|
+
redemption_steps: {
|
|
2126
|
+
reward_id: string;
|
|
2127
|
+
reward_quantity: number;
|
|
2128
|
+
target: "LINE" | "ORDER";
|
|
2129
|
+
target_id?: string | undefined;
|
|
2130
|
+
action: "CREATE" | "DELETE" | "READ" | "UPDATE";
|
|
2131
|
+
discount_amount: number;
|
|
2132
|
+
before: {
|
|
2133
|
+
value: number;
|
|
2134
|
+
quantity: number;
|
|
2135
|
+
discount_amount: number;
|
|
2136
|
+
discount_rate: number;
|
|
2137
|
+
};
|
|
2138
|
+
after: {
|
|
2139
|
+
value: number;
|
|
2140
|
+
quantity: number;
|
|
2141
|
+
discount_amount: number;
|
|
2142
|
+
discount_rate: number;
|
|
2143
|
+
};
|
|
2144
|
+
target_before?: {
|
|
2145
|
+
value: number;
|
|
2146
|
+
quantity: number;
|
|
2147
|
+
discount_amount: number;
|
|
2148
|
+
discount_rate: number;
|
|
2149
|
+
} | undefined;
|
|
2150
|
+
target_after?: {
|
|
2151
|
+
value: number;
|
|
2152
|
+
quantity: number;
|
|
2153
|
+
discount_amount: number;
|
|
2154
|
+
discount_rate: number;
|
|
2155
|
+
} | undefined;
|
|
2156
|
+
error?: string | undefined;
|
|
2157
|
+
}[];
|
|
2158
|
+
totals: {
|
|
2159
|
+
currency: string;
|
|
2160
|
+
subtotal: number;
|
|
2161
|
+
discount_rate: number;
|
|
2162
|
+
discount_total: number;
|
|
2163
|
+
tax_rate: number;
|
|
2164
|
+
tax_total: number;
|
|
2165
|
+
total: number;
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
//#endregion
|
|
1781
2169
|
//#region src/order/totals.d.ts
|
|
1782
2170
|
/** Sum root line group totals into order totals (Big.js). */
|
|
1783
2171
|
declare const recomputeTotals: (lines: OrderLine[], currency?: string) => OrderTotals;
|
|
@@ -2387,6 +2775,7 @@ declare const listMenus: (scope?: StorefrontMenuScope, options?: ServiceHttpOpti
|
|
|
2387
2775
|
price: number;
|
|
2388
2776
|
anchor_price?: number | undefined;
|
|
2389
2777
|
anchor_price_percentage?: number | undefined;
|
|
2778
|
+
starting_price?: number | null | undefined;
|
|
2390
2779
|
modifiers: {
|
|
2391
2780
|
modifier_group_id: string;
|
|
2392
2781
|
default_quantity: number;
|
|
@@ -2405,6 +2794,11 @@ declare const listMenus: (scope?: StorefrontMenuScope, options?: ServiceHttpOpti
|
|
|
2405
2794
|
anchor_price_percentage?: number | undefined;
|
|
2406
2795
|
}[];
|
|
2407
2796
|
modifier_group_ids: string[];
|
|
2797
|
+
variants: {
|
|
2798
|
+
product_id: string;
|
|
2799
|
+
variant_group_option_ids: string[];
|
|
2800
|
+
}[];
|
|
2801
|
+
variant_group_ids: string[];
|
|
2408
2802
|
recommendations: {
|
|
2409
2803
|
recommendation_id: string;
|
|
2410
2804
|
default_quantity: number;
|
|
@@ -2492,6 +2886,22 @@ declare const listMenus: (scope?: StorefrontMenuScope, options?: ServiceHttpOpti
|
|
|
2492
2886
|
charge_above_quantity?: number | null | undefined;
|
|
2493
2887
|
metadata: Record<string, unknown>;
|
|
2494
2888
|
}[];
|
|
2889
|
+
variant_groups: {
|
|
2890
|
+
id: string;
|
|
2891
|
+
title: Record<string, string>;
|
|
2892
|
+
description?: Record<string, string> | null | undefined;
|
|
2893
|
+
display_type?: "GRID" | "LIST" | null | undefined;
|
|
2894
|
+
variants: {
|
|
2895
|
+
id: string;
|
|
2896
|
+
name: Record<string, string>;
|
|
2897
|
+
description?: Record<string, string> | null | undefined;
|
|
2898
|
+
image_url?: string | null | undefined;
|
|
2899
|
+
image_origin_url?: string | null | undefined;
|
|
2900
|
+
product_ids: string[];
|
|
2901
|
+
metadata: Record<string, unknown>;
|
|
2902
|
+
}[];
|
|
2903
|
+
metadata: Record<string, unknown>;
|
|
2904
|
+
}[];
|
|
2495
2905
|
recommendations: ({
|
|
2496
2906
|
id: string;
|
|
2497
2907
|
title: Record<string, string>;
|
|
@@ -2582,6 +2992,7 @@ declare const listMenusStream: (scope?: StorefrontMenuScope, options?: ListMenus
|
|
|
2582
2992
|
price: number;
|
|
2583
2993
|
anchor_price?: number | undefined;
|
|
2584
2994
|
anchor_price_percentage?: number | undefined;
|
|
2995
|
+
starting_price?: number | null | undefined;
|
|
2585
2996
|
modifiers: {
|
|
2586
2997
|
modifier_group_id: string;
|
|
2587
2998
|
default_quantity: number;
|
|
@@ -2600,6 +3011,11 @@ declare const listMenusStream: (scope?: StorefrontMenuScope, options?: ListMenus
|
|
|
2600
3011
|
anchor_price_percentage?: number | undefined;
|
|
2601
3012
|
}[];
|
|
2602
3013
|
modifier_group_ids: string[];
|
|
3014
|
+
variants: {
|
|
3015
|
+
product_id: string;
|
|
3016
|
+
variant_group_option_ids: string[];
|
|
3017
|
+
}[];
|
|
3018
|
+
variant_group_ids: string[];
|
|
2603
3019
|
recommendations: {
|
|
2604
3020
|
recommendation_id: string;
|
|
2605
3021
|
default_quantity: number;
|
|
@@ -2687,6 +3103,22 @@ declare const listMenusStream: (scope?: StorefrontMenuScope, options?: ListMenus
|
|
|
2687
3103
|
charge_above_quantity?: number | null | undefined;
|
|
2688
3104
|
metadata: Record<string, unknown>;
|
|
2689
3105
|
}[];
|
|
3106
|
+
variant_groups: {
|
|
3107
|
+
id: string;
|
|
3108
|
+
title: Record<string, string>;
|
|
3109
|
+
description?: Record<string, string> | null | undefined;
|
|
3110
|
+
display_type?: "GRID" | "LIST" | null | undefined;
|
|
3111
|
+
variants: {
|
|
3112
|
+
id: string;
|
|
3113
|
+
name: Record<string, string>;
|
|
3114
|
+
description?: Record<string, string> | null | undefined;
|
|
3115
|
+
image_url?: string | null | undefined;
|
|
3116
|
+
image_origin_url?: string | null | undefined;
|
|
3117
|
+
product_ids: string[];
|
|
3118
|
+
metadata: Record<string, unknown>;
|
|
3119
|
+
}[];
|
|
3120
|
+
metadata: Record<string, unknown>;
|
|
3121
|
+
}[];
|
|
2690
3122
|
recommendations: ({
|
|
2691
3123
|
id: string;
|
|
2692
3124
|
title: Record<string, string>;
|
|
@@ -2958,6 +3390,8 @@ declare const listStores: (input?: StoreListInput, options?: ServiceHttpOptions)
|
|
|
2958
3390
|
temporary_closed_until?: string | null | undefined;
|
|
2959
3391
|
status: "CLOSED" | "OPEN" | "TEMPORARILY_CLOSED";
|
|
2960
3392
|
};
|
|
3393
|
+
channel_ids: string[];
|
|
3394
|
+
fulfillment_ids: string[];
|
|
2961
3395
|
tags: Record<string, string | number | boolean>;
|
|
2962
3396
|
cms_template_id?: string | null | undefined;
|
|
2963
3397
|
status: string;
|
|
@@ -3052,6 +3486,8 @@ declare const listNearbyStores: (input: StoreNearbyInput, options?: ServiceHttpO
|
|
|
3052
3486
|
temporary_closed_until?: string | null | undefined;
|
|
3053
3487
|
status: "CLOSED" | "OPEN" | "TEMPORARILY_CLOSED";
|
|
3054
3488
|
};
|
|
3489
|
+
channel_ids: string[];
|
|
3490
|
+
fulfillment_ids: string[];
|
|
3055
3491
|
tags: Record<string, string | number | boolean>;
|
|
3056
3492
|
cms_template_id?: string | null | undefined;
|
|
3057
3493
|
status: string;
|
|
@@ -3107,7 +3543,7 @@ declare const listNearbyStores: (input: StoreNearbyInput, options?: ServiceHttpO
|
|
|
3107
3543
|
} | null | undefined;
|
|
3108
3544
|
labels: string[];
|
|
3109
3545
|
}[]>;
|
|
3110
|
-
declare const getStore: (id: string, options?: ServiceHttpOptions) => Promise<{
|
|
3546
|
+
declare const getStore: (id: string, input?: StoreGetInput, options?: ServiceHttpOptions) => Promise<{
|
|
3111
3547
|
id: string;
|
|
3112
3548
|
uid: string;
|
|
3113
3549
|
merchant_id: string;
|
|
@@ -3146,6 +3582,8 @@ declare const getStore: (id: string, options?: ServiceHttpOptions) => Promise<{
|
|
|
3146
3582
|
temporary_closed_until?: string | null | undefined;
|
|
3147
3583
|
status: "CLOSED" | "OPEN" | "TEMPORARILY_CLOSED";
|
|
3148
3584
|
};
|
|
3585
|
+
channel_ids: string[];
|
|
3586
|
+
fulfillment_ids: string[];
|
|
3149
3587
|
tags: Record<string, string | number | boolean>;
|
|
3150
3588
|
cms_template_id?: string | null | undefined;
|
|
3151
3589
|
status: string;
|
|
@@ -3276,6 +3714,29 @@ type ScheduleWindow = {
|
|
|
3276
3714
|
declare const getScheduleWindow: (schedule: Schedule | null | undefined, now?: Date) => ScheduleWindow;
|
|
3277
3715
|
declare const isOnSchedule: (schedule: Schedule | null | undefined, now?: Date) => boolean;
|
|
3278
3716
|
//#endregion
|
|
3717
|
+
//#region src/shared/genId.d.ts
|
|
3718
|
+
type IdBuilder = {
|
|
3719
|
+
/**
|
|
3720
|
+
* Keeps only `[A-Za-z0-9]`, cut to 32 characters. `fallback` is used only
|
|
3721
|
+
* when `value` is empty after trim; throws if nothing alphanumeric is left.
|
|
3722
|
+
*/
|
|
3723
|
+
literal: (value: string | null | undefined, fallback?: string) => IdBuilder;
|
|
3724
|
+
/** Appends `-`, the only separator allowed. */
|
|
3725
|
+
separator: () => IdBuilder;
|
|
3726
|
+
/** Cryptographically random `[0-9a-z]`; at least 12 characters. */
|
|
3727
|
+
hash: (length?: number) => IdBuilder;
|
|
3728
|
+
/** New id on every call; throws when the shape is unsafe. */
|
|
3729
|
+
build: () => string;
|
|
3730
|
+
};
|
|
3731
|
+
/**
|
|
3732
|
+
* Safe id builder: `genId().literal("ord").separator().hash(12).build()`.
|
|
3733
|
+
* Literals are cleaned to `[A-Za-z0-9]`; `-` is the only separator and a
|
|
3734
|
+
* random hash of at least 12 characters is required.
|
|
3735
|
+
*/
|
|
3736
|
+
declare const genId: () => IdBuilder;
|
|
3737
|
+
/** `ord-<store>-<hash>`; `nostore` when the store id is blank. */
|
|
3738
|
+
declare const genOrderId: (storeId?: string | null) => string;
|
|
3739
|
+
//#endregion
|
|
3279
3740
|
//#region src/rules/RulesEngine.d.ts
|
|
3280
3741
|
declare class RulesEngine {
|
|
3281
3742
|
order?: RulesEngineParams["order"];
|
|
@@ -3396,4 +3857,4 @@ declare const paymentMatchesClientConditions: (conditions: OrConditions | null |
|
|
|
3396
3857
|
now?: string;
|
|
3397
3858
|
}) => boolean;
|
|
3398
3859
|
//#endregion
|
|
3399
|
-
export { type AuthConfigureOptions, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_RECOMMENDATION_TYPES, type ExchangeOptions, type FlatMenuCategory, type GroupDisplayType, type ListMenusStreamOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, type OrderCustomerSource, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, type OrderScope, OrderSyncPendingError, OrderValidationError, type OrderValidationResult, type PricingModifier, type Product, type ProductCtx, type QuantitiesByPath, type RecommendationType, RecurringDateCron, type ReorderOrderOptions, type ResetOptions, RulesEngine, type ScheduleWindow, type SelectionStatus, type ServiceHttpOptions, type Snapshot, type StorefrontAccessToken, StorefrontHttpError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type VisitedState, addLines, auth, buildCustomerSnapshot, collectOrderLineDiffs, countCartProducts, createSession, currentNodes, defaultConditionError, flattenMenuCategories, fromOrderLines, getScheduleWindow, indexMenu, isCheckoutFieldFilled, isDeviceNotLinked, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderValidationError, isStorefrontNotFound, listMenusStream, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, paymentMatchesClientConditions, recomputeTotals, resolveCheckout, services, storefrontJson, toOrderLines, validateOrderAgainstMenu, visitedStates };
|
|
3860
|
+
export { type ApplyRedeemInput, type AuthConfigureOptions, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_RECOMMENDATION_TYPES, type ExchangeOptions, type FlatMenuCategory, type GroupDisplayType, type IdBuilder, type ListMenusStreamOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, type OrderCustomerSource, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, type OrderScope, OrderSyncPendingError, OrderValidationError, type OrderValidationResult, type PricingModifier, type Product, type ProductCtx, type QuantitiesByPath, type RecommendationType, RecurringDateCron, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, RulesEngine, type ScheduleWindow, type SelectionStatus, type SelectionsByPath, type ServiceHttpOptions, type Snapshot, type StorefrontAccessToken, StorefrontHttpError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VisitedState, addLines, auth, buildCustomerSnapshot, collectOrderLineDiffs, computeStartingPrice, countCartProducts, createSession, currentNodes, defaultConditionError, flattenMenuCategories, fromOrderLines, genId, genOrderId, getScheduleWindow, indexMenu, isCheckoutFieldFilled, isDeviceNotLinked, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderValidationError, isStorefrontNotFound, isVariantBase, listMenusStream, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, paymentMatchesClientConditions, recomputeRedemptions, recomputeTotals, resolveCheckout, services, storefrontJson, toOrderLines, validateOrderAgainstMenu, visitedStates };
|