@final-commerce/common 2.10.0 → 2.11.1-staging2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +214 -20
- package/dist/index.d.ts +214 -20
- package/dist/index.js +488 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +462 -20
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +309 -230
- package/dist/pos-types/index.d.ts +309 -230
- package/dist/pos-types/index.js +1 -0
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +1 -0
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -50,235 +50,6 @@ interface OrderTax {
|
|
|
50
50
|
priority?: number;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
interface OrderTip {
|
|
54
|
-
percentage?: number;
|
|
55
|
-
amount?: number;
|
|
56
|
-
tipTo?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
interface OrderSummaryPayments {
|
|
60
|
-
cardTotal: number;
|
|
61
|
-
cashTotal: number;
|
|
62
|
-
customTotal: number;
|
|
63
|
-
cardProcessingFeesTotal: number;
|
|
64
|
-
}
|
|
65
|
-
interface OrderSummary {
|
|
66
|
-
discountTotal: number;
|
|
67
|
-
shippingTotal?: number;
|
|
68
|
-
total: number;
|
|
69
|
-
totalTaxes: number;
|
|
70
|
-
isTaxInclusive: boolean;
|
|
71
|
-
subtotalAfterFees: number;
|
|
72
|
-
nonRevenueTotal?: number;
|
|
73
|
-
grossSales?: number;
|
|
74
|
-
lineDiscountTotal?: number;
|
|
75
|
-
cartDiscountTotal?: number;
|
|
76
|
-
feesTotal?: number;
|
|
77
|
-
lineFeesTotal?: number;
|
|
78
|
-
cartFeesTotal?: number;
|
|
79
|
-
taxableFeesTotal?: number;
|
|
80
|
-
nonTaxableFeesTotal?: number;
|
|
81
|
-
modifiersTotal?: number;
|
|
82
|
-
taxableModifiersTotal?: number;
|
|
83
|
-
nonTaxableModifiersTotal?: number;
|
|
84
|
-
totalTaxableSales?: number;
|
|
85
|
-
totalNonTaxableSales?: number;
|
|
86
|
-
tipTotal?: number;
|
|
87
|
-
cashRounding: number;
|
|
88
|
-
payments?: OrderSummaryPayments;
|
|
89
|
-
totalBeforeTip?: number;
|
|
90
|
-
amountPaid?: number;
|
|
91
|
-
taxes: OrderTax[];
|
|
92
|
-
tip?: OrderTip;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface PriceModifierDetail {
|
|
96
|
-
percentage: number;
|
|
97
|
-
amount: number;
|
|
98
|
-
label?: string;
|
|
99
|
-
tax?: number;
|
|
100
|
-
taxTableId?: string;
|
|
101
|
-
taxRateId?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
interface OrderCartDiscount {
|
|
105
|
-
amount: number;
|
|
106
|
-
percentage: number;
|
|
107
|
-
label?: string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
interface OrderCartFee {
|
|
111
|
-
label: string;
|
|
112
|
-
id: string;
|
|
113
|
-
percentage: number;
|
|
114
|
-
amount: number;
|
|
115
|
-
taxName?: string;
|
|
116
|
-
taxTableId?: string;
|
|
117
|
-
tax?: number;
|
|
118
|
-
taxes?: OrderTax[];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface OrderPaymentMethod {
|
|
122
|
-
paymentType: string;
|
|
123
|
-
amount: number;
|
|
124
|
-
transactionId: string;
|
|
125
|
-
timestamp?: string;
|
|
126
|
-
emv?: string | null;
|
|
127
|
-
cashRounding?: number;
|
|
128
|
-
change?: number;
|
|
129
|
-
processor?: string;
|
|
130
|
-
processorFee?: number;
|
|
131
|
-
tendered?: number;
|
|
132
|
-
tip?: OrderTip | null;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
interface OrderPosData {
|
|
136
|
-
outlet?: string;
|
|
137
|
-
station?: string;
|
|
138
|
-
employee?: string;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
interface OrderAssignedUser {
|
|
142
|
-
userId: string;
|
|
143
|
-
assignedAt: string;
|
|
144
|
-
label?: string | null;
|
|
145
|
-
unassignedAt?: string | null;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
interface OrderInCart {
|
|
149
|
-
active: boolean;
|
|
150
|
-
stationId: string | null;
|
|
151
|
-
since: string;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
interface OrderCustomStatus {
|
|
155
|
-
id: string;
|
|
156
|
-
key?: string;
|
|
157
|
-
label: string;
|
|
158
|
-
setAt: string;
|
|
159
|
-
setBy: string | null;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
interface OrderLineItemDiscount {
|
|
163
|
-
itemDiscounts?: PriceModifierDetail[];
|
|
164
|
-
cartDiscount?: PriceModifierDetail;
|
|
165
|
-
}
|
|
166
|
-
interface OrderLineItemFee {
|
|
167
|
-
cartFee?: PriceModifierDetail;
|
|
168
|
-
itemFees?: PriceModifierDetail[];
|
|
169
|
-
}
|
|
170
|
-
interface OrderLineItemModifier {
|
|
171
|
-
modifierId: string;
|
|
172
|
-
modifierName: string;
|
|
173
|
-
choiceId: string;
|
|
174
|
-
choiceName: string;
|
|
175
|
-
unitPrice: number;
|
|
176
|
-
quantity: number;
|
|
177
|
-
total: number;
|
|
178
|
-
totalTax?: number;
|
|
179
|
-
taxes?: OrderTax[];
|
|
180
|
-
componentIndex?: number;
|
|
181
|
-
}
|
|
182
|
-
interface OrderLineItemComponent {
|
|
183
|
-
productId: string;
|
|
184
|
-
variantId: string;
|
|
185
|
-
name: string;
|
|
186
|
-
attributes?: string;
|
|
187
|
-
sku?: string;
|
|
188
|
-
productExternalId?: string;
|
|
189
|
-
variantExternalId?: string;
|
|
190
|
-
partName?: string;
|
|
191
|
-
quantity: number;
|
|
192
|
-
price: number;
|
|
193
|
-
unitId?: string;
|
|
194
|
-
unitAbbreviation?: string;
|
|
195
|
-
unitRatioToBase?: number;
|
|
196
|
-
stockQuantity?: number;
|
|
197
|
-
stockVariantId?: string;
|
|
198
|
-
manageStock?: boolean;
|
|
199
|
-
supplierId?: string | null;
|
|
200
|
-
taxTableId?: string;
|
|
201
|
-
totalTax?: number;
|
|
202
|
-
taxes?: OrderTax[];
|
|
203
|
-
}
|
|
204
|
-
interface OrderLineItem {
|
|
205
|
-
id?: string;
|
|
206
|
-
productId?: string;
|
|
207
|
-
variantId?: string;
|
|
208
|
-
name?: string;
|
|
209
|
-
quantity?: number;
|
|
210
|
-
manageStock?: boolean;
|
|
211
|
-
supplierId?: string | null;
|
|
212
|
-
price?: number;
|
|
213
|
-
description?: string;
|
|
214
|
-
sku?: string;
|
|
215
|
-
totalTax?: number;
|
|
216
|
-
total?: number;
|
|
217
|
-
productExternalId?: string;
|
|
218
|
-
variantExternalId?: string;
|
|
219
|
-
lineItemExternalId?: string;
|
|
220
|
-
internalId?: string;
|
|
221
|
-
note?: string;
|
|
222
|
-
image?: string;
|
|
223
|
-
attributes?: string;
|
|
224
|
-
taxes?: OrderTax[];
|
|
225
|
-
discount?: OrderLineItemDiscount;
|
|
226
|
-
fee?: OrderLineItemFee;
|
|
227
|
-
modifiers?: OrderLineItemModifier[];
|
|
228
|
-
components?: OrderLineItemComponent[];
|
|
229
|
-
lineNetWithFees?: number;
|
|
230
|
-
metadata?: Metadata[];
|
|
231
|
-
stock?: number;
|
|
232
|
-
subTotal?: number;
|
|
233
|
-
unitId?: string;
|
|
234
|
-
unitAbbreviation?: string;
|
|
235
|
-
stockQuantity?: number;
|
|
236
|
-
unitRatioToBase?: number;
|
|
237
|
-
stockVariantId?: string;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
interface OrderCustomSaleDiscount {
|
|
241
|
-
cartDiscount: OrderCartDiscount;
|
|
242
|
-
}
|
|
243
|
-
interface OrderCustomSaleFee {
|
|
244
|
-
cartFee: PriceModifierDetail;
|
|
245
|
-
}
|
|
246
|
-
interface OrderCustomSale {
|
|
247
|
-
customSaleId: string;
|
|
248
|
-
applyTaxes: boolean;
|
|
249
|
-
quantity: number;
|
|
250
|
-
name: string;
|
|
251
|
-
price: number;
|
|
252
|
-
totalTax: number;
|
|
253
|
-
total: number;
|
|
254
|
-
taxes?: OrderTax[];
|
|
255
|
-
discount?: OrderCustomSaleDiscount;
|
|
256
|
-
fee?: OrderCustomSaleFee;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
interface OrderRefundSummary {
|
|
260
|
-
total?: number;
|
|
261
|
-
}
|
|
262
|
-
interface OrderRefund {
|
|
263
|
-
externalId?: string;
|
|
264
|
-
reason?: string;
|
|
265
|
-
summary?: OrderRefundSummary;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
interface RefundCartDiscount {
|
|
269
|
-
amount?: number;
|
|
270
|
-
percentage?: number;
|
|
271
|
-
}
|
|
272
|
-
interface RefundItemDiscount {
|
|
273
|
-
amount?: number;
|
|
274
|
-
percentage?: number;
|
|
275
|
-
label?: string;
|
|
276
|
-
}
|
|
277
|
-
interface RefundDiscount {
|
|
278
|
-
cartDiscount?: RefundCartDiscount;
|
|
279
|
-
itemDiscounts?: RefundItemDiscount[];
|
|
280
|
-
}
|
|
281
|
-
|
|
282
53
|
declare enum CurrencyCode {
|
|
283
54
|
USD = "USD",
|
|
284
55
|
EUR = "EUR",
|
|
@@ -549,6 +320,259 @@ declare enum ReservationStatus {
|
|
|
549
320
|
EXPIRED = "expired"
|
|
550
321
|
}
|
|
551
322
|
|
|
323
|
+
declare enum ShippingOptionType {
|
|
324
|
+
SHIP = "ship",
|
|
325
|
+
PICKUP = "pickup"
|
|
326
|
+
}
|
|
327
|
+
declare enum ShippingRateType {
|
|
328
|
+
FLAT = "flat"
|
|
329
|
+
}
|
|
330
|
+
declare enum ShippingChannel {
|
|
331
|
+
WEB = "web",
|
|
332
|
+
POS = "pos"
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
interface OrderShippingLine {
|
|
336
|
+
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
337
|
+
name?: string;
|
|
338
|
+
amount: number;
|
|
339
|
+
zoneId?: string;
|
|
340
|
+
optionId?: string;
|
|
341
|
+
minDays?: number;
|
|
342
|
+
maxDays?: number;
|
|
343
|
+
pickupOutletId?: string;
|
|
344
|
+
taxes?: OrderTax[];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface OrderTip {
|
|
348
|
+
percentage?: number;
|
|
349
|
+
amount?: number;
|
|
350
|
+
tipTo?: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface OrderSummaryPayments {
|
|
354
|
+
cardTotal: number;
|
|
355
|
+
cashTotal: number;
|
|
356
|
+
customTotal: number;
|
|
357
|
+
cardProcessingFeesTotal: number;
|
|
358
|
+
}
|
|
359
|
+
interface OrderSummary {
|
|
360
|
+
discountTotal: number;
|
|
361
|
+
shippingTotal?: number;
|
|
362
|
+
total: number;
|
|
363
|
+
totalTaxes: number;
|
|
364
|
+
isTaxInclusive: boolean;
|
|
365
|
+
subtotalAfterFees: number;
|
|
366
|
+
nonRevenueTotal?: number;
|
|
367
|
+
grossSales?: number;
|
|
368
|
+
lineDiscountTotal?: number;
|
|
369
|
+
cartDiscountTotal?: number;
|
|
370
|
+
feesTotal?: number;
|
|
371
|
+
lineFeesTotal?: number;
|
|
372
|
+
cartFeesTotal?: number;
|
|
373
|
+
taxableFeesTotal?: number;
|
|
374
|
+
nonTaxableFeesTotal?: number;
|
|
375
|
+
modifiersTotal?: number;
|
|
376
|
+
taxableModifiersTotal?: number;
|
|
377
|
+
nonTaxableModifiersTotal?: number;
|
|
378
|
+
totalTaxableSales?: number;
|
|
379
|
+
totalNonTaxableSales?: number;
|
|
380
|
+
tipTotal?: number;
|
|
381
|
+
cashRounding: number;
|
|
382
|
+
payments?: OrderSummaryPayments;
|
|
383
|
+
totalBeforeTip?: number;
|
|
384
|
+
amountPaid?: number;
|
|
385
|
+
taxes: OrderTax[];
|
|
386
|
+
tip?: OrderTip;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface PriceModifierDetail {
|
|
390
|
+
percentage: number;
|
|
391
|
+
amount: number;
|
|
392
|
+
label?: string;
|
|
393
|
+
tax?: number;
|
|
394
|
+
taxTableId?: string;
|
|
395
|
+
taxRateId?: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
interface OrderCartDiscount {
|
|
399
|
+
amount: number;
|
|
400
|
+
percentage: number;
|
|
401
|
+
label?: string;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
interface OrderCartFee {
|
|
405
|
+
label: string;
|
|
406
|
+
id: string;
|
|
407
|
+
percentage: number;
|
|
408
|
+
amount: number;
|
|
409
|
+
taxName?: string;
|
|
410
|
+
taxTableId?: string;
|
|
411
|
+
tax?: number;
|
|
412
|
+
taxes?: OrderTax[];
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
interface OrderPaymentMethod {
|
|
416
|
+
paymentType: string;
|
|
417
|
+
amount: number;
|
|
418
|
+
transactionId: string;
|
|
419
|
+
timestamp?: string;
|
|
420
|
+
emv?: string | null;
|
|
421
|
+
cashRounding?: number;
|
|
422
|
+
change?: number;
|
|
423
|
+
processor?: string;
|
|
424
|
+
processorFee?: number;
|
|
425
|
+
tendered?: number;
|
|
426
|
+
tip?: OrderTip | null;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
interface OrderPosData {
|
|
430
|
+
outlet?: string;
|
|
431
|
+
station?: string;
|
|
432
|
+
employee?: string;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
interface OrderAssignedUser {
|
|
436
|
+
userId: string;
|
|
437
|
+
assignedAt: string;
|
|
438
|
+
label?: string | null;
|
|
439
|
+
unassignedAt?: string | null;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
interface OrderInCart {
|
|
443
|
+
active: boolean;
|
|
444
|
+
stationId: string | null;
|
|
445
|
+
since: string;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
interface OrderCustomStatus {
|
|
449
|
+
id: string;
|
|
450
|
+
key?: string;
|
|
451
|
+
label: string;
|
|
452
|
+
setAt: string;
|
|
453
|
+
setBy: string | null;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
interface OrderLineItemDiscount {
|
|
457
|
+
itemDiscounts?: PriceModifierDetail[];
|
|
458
|
+
cartDiscount?: PriceModifierDetail;
|
|
459
|
+
}
|
|
460
|
+
interface OrderLineItemFee {
|
|
461
|
+
cartFee?: PriceModifierDetail;
|
|
462
|
+
itemFees?: PriceModifierDetail[];
|
|
463
|
+
}
|
|
464
|
+
interface OrderLineItemModifier {
|
|
465
|
+
modifierId: string;
|
|
466
|
+
modifierName: string;
|
|
467
|
+
choiceId: string;
|
|
468
|
+
choiceName: string;
|
|
469
|
+
unitPrice: number;
|
|
470
|
+
quantity: number;
|
|
471
|
+
total: number;
|
|
472
|
+
totalTax?: number;
|
|
473
|
+
taxes?: OrderTax[];
|
|
474
|
+
componentIndex?: number;
|
|
475
|
+
}
|
|
476
|
+
interface OrderLineItemComponent {
|
|
477
|
+
productId: string;
|
|
478
|
+
variantId: string;
|
|
479
|
+
name: string;
|
|
480
|
+
attributes?: string;
|
|
481
|
+
sku?: string;
|
|
482
|
+
productExternalId?: string;
|
|
483
|
+
variantExternalId?: string;
|
|
484
|
+
partName?: string;
|
|
485
|
+
quantity: number;
|
|
486
|
+
price: number;
|
|
487
|
+
unitId?: string;
|
|
488
|
+
unitAbbreviation?: string;
|
|
489
|
+
unitRatioToBase?: number;
|
|
490
|
+
stockQuantity?: number;
|
|
491
|
+
stockVariantId?: string;
|
|
492
|
+
manageStock?: boolean;
|
|
493
|
+
supplierId?: string | null;
|
|
494
|
+
taxTableId?: string;
|
|
495
|
+
totalTax?: number;
|
|
496
|
+
taxes?: OrderTax[];
|
|
497
|
+
}
|
|
498
|
+
interface OrderLineItem {
|
|
499
|
+
id?: string;
|
|
500
|
+
productId?: string;
|
|
501
|
+
variantId?: string;
|
|
502
|
+
name?: string;
|
|
503
|
+
quantity?: number;
|
|
504
|
+
manageStock?: boolean;
|
|
505
|
+
supplierId?: string | null;
|
|
506
|
+
price?: number;
|
|
507
|
+
description?: string;
|
|
508
|
+
sku?: string;
|
|
509
|
+
totalTax?: number;
|
|
510
|
+
total?: number;
|
|
511
|
+
productExternalId?: string;
|
|
512
|
+
variantExternalId?: string;
|
|
513
|
+
lineItemExternalId?: string;
|
|
514
|
+
internalId?: string;
|
|
515
|
+
note?: string;
|
|
516
|
+
image?: string;
|
|
517
|
+
attributes?: string;
|
|
518
|
+
taxes?: OrderTax[];
|
|
519
|
+
discount?: OrderLineItemDiscount;
|
|
520
|
+
fee?: OrderLineItemFee;
|
|
521
|
+
modifiers?: OrderLineItemModifier[];
|
|
522
|
+
components?: OrderLineItemComponent[];
|
|
523
|
+
lineNetWithFees?: number;
|
|
524
|
+
metadata?: Metadata[];
|
|
525
|
+
stock?: number;
|
|
526
|
+
subTotal?: number;
|
|
527
|
+
unitId?: string;
|
|
528
|
+
unitAbbreviation?: string;
|
|
529
|
+
stockQuantity?: number;
|
|
530
|
+
unitRatioToBase?: number;
|
|
531
|
+
stockVariantId?: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
interface OrderCustomSaleDiscount {
|
|
535
|
+
cartDiscount: OrderCartDiscount;
|
|
536
|
+
}
|
|
537
|
+
interface OrderCustomSaleFee {
|
|
538
|
+
cartFee: PriceModifierDetail;
|
|
539
|
+
}
|
|
540
|
+
interface OrderCustomSale {
|
|
541
|
+
customSaleId: string;
|
|
542
|
+
applyTaxes: boolean;
|
|
543
|
+
quantity: number;
|
|
544
|
+
name: string;
|
|
545
|
+
price: number;
|
|
546
|
+
totalTax: number;
|
|
547
|
+
total: number;
|
|
548
|
+
taxes?: OrderTax[];
|
|
549
|
+
discount?: OrderCustomSaleDiscount;
|
|
550
|
+
fee?: OrderCustomSaleFee;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
interface OrderRefundSummary {
|
|
554
|
+
total?: number;
|
|
555
|
+
}
|
|
556
|
+
interface OrderRefund {
|
|
557
|
+
externalId?: string;
|
|
558
|
+
reason?: string;
|
|
559
|
+
summary?: OrderRefundSummary;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
interface RefundCartDiscount {
|
|
563
|
+
amount?: number;
|
|
564
|
+
percentage?: number;
|
|
565
|
+
}
|
|
566
|
+
interface RefundItemDiscount {
|
|
567
|
+
amount?: number;
|
|
568
|
+
percentage?: number;
|
|
569
|
+
label?: string;
|
|
570
|
+
}
|
|
571
|
+
interface RefundDiscount {
|
|
572
|
+
cartDiscount?: RefundCartDiscount;
|
|
573
|
+
itemDiscounts?: RefundItemDiscount[];
|
|
574
|
+
}
|
|
575
|
+
|
|
552
576
|
interface RefundLineItem {
|
|
553
577
|
taxes?: OrderTax[];
|
|
554
578
|
discount?: RefundDiscount;
|
|
@@ -982,6 +1006,7 @@ interface Order extends BaseEntity {
|
|
|
982
1006
|
notes: OrderNote$1[];
|
|
983
1007
|
billing?: Address$1;
|
|
984
1008
|
shipping?: Address$1;
|
|
1009
|
+
shippingLine?: OrderShippingLine;
|
|
985
1010
|
lineItems: Partial<OrderLineItem>[];
|
|
986
1011
|
customSales?: OrderCustomSale[];
|
|
987
1012
|
nonRevenueItems?: NonRevenueItem$1[];
|
|
@@ -1899,6 +1924,12 @@ interface ActiveProduct {
|
|
|
1899
1924
|
modifierSelections?: ModifierSelection[];
|
|
1900
1925
|
modifiers?: CartLineModifier[];
|
|
1901
1926
|
components?: CartLineComponent[];
|
|
1927
|
+
compositePicks?: (CompositePick & {
|
|
1928
|
+
resourceId?: string;
|
|
1929
|
+
})[];
|
|
1930
|
+
compositeSlot?: {
|
|
1931
|
+
startAt: string;
|
|
1932
|
+
};
|
|
1902
1933
|
currency?: CurrencyCode;
|
|
1903
1934
|
minorUnits?: number;
|
|
1904
1935
|
isUnlimited?: boolean;
|
|
@@ -1918,6 +1949,48 @@ interface CartReservation extends OrderReservation {
|
|
|
1918
1949
|
fees?: CustomFee[];
|
|
1919
1950
|
}
|
|
1920
1951
|
|
|
1952
|
+
interface ShippingPriceTier {
|
|
1953
|
+
from: number;
|
|
1954
|
+
price: number;
|
|
1955
|
+
}
|
|
1956
|
+
interface ShippingOptionRule {
|
|
1957
|
+
id: string;
|
|
1958
|
+
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1959
|
+
rate?: ShippingRateType | `${ShippingRateType}`;
|
|
1960
|
+
name?: string | null;
|
|
1961
|
+
price: number;
|
|
1962
|
+
priceByTotal?: ShippingPriceTier[] | null;
|
|
1963
|
+
freeOver?: number | null;
|
|
1964
|
+
minDays?: number | null;
|
|
1965
|
+
maxDays?: number | null;
|
|
1966
|
+
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1967
|
+
outletId?: string | null;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
interface CartAddress {
|
|
1971
|
+
firstName?: string;
|
|
1972
|
+
lastName?: string;
|
|
1973
|
+
address1?: string;
|
|
1974
|
+
address2?: string;
|
|
1975
|
+
city?: string;
|
|
1976
|
+
state?: string;
|
|
1977
|
+
postCode?: string;
|
|
1978
|
+
country?: string;
|
|
1979
|
+
fromCustomer?: boolean;
|
|
1980
|
+
}
|
|
1981
|
+
interface CartShipping {
|
|
1982
|
+
zoneId: string;
|
|
1983
|
+
optionId: string;
|
|
1984
|
+
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1985
|
+
name: string | null;
|
|
1986
|
+
amount: number;
|
|
1987
|
+
taxes?: Tax[];
|
|
1988
|
+
minDays: number | null;
|
|
1989
|
+
maxDays: number | null;
|
|
1990
|
+
outletId: string | null;
|
|
1991
|
+
rule?: Pick<ShippingOptionRule, 'price' | 'priceByTotal' | 'freeOver'>;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1921
1994
|
interface ActiveCustomSales {
|
|
1922
1995
|
id: string;
|
|
1923
1996
|
name: string;
|
|
@@ -1953,6 +2026,10 @@ interface ActiveCart {
|
|
|
1953
2026
|
amountToBeCharged: number;
|
|
1954
2027
|
customer?: Partial<ActiveCustomer | null> | null;
|
|
1955
2028
|
orderNotes?: string;
|
|
2029
|
+
shippingAddress?: CartAddress | null;
|
|
2030
|
+
billingAddress?: CartAddress | null;
|
|
2031
|
+
shipping?: CartShipping | null;
|
|
2032
|
+
shippingTotal?: number;
|
|
1956
2033
|
cartTotal?: number;
|
|
1957
2034
|
orderTotal?: number;
|
|
1958
2035
|
orderId?: string;
|
|
@@ -2066,6 +2143,7 @@ declare enum ProcessorType {
|
|
|
2066
2143
|
REDEEM = "Redeem",
|
|
2067
2144
|
INTEGRATION = "Integration",
|
|
2068
2145
|
PAYMENT_LINK = "PaymentLink",
|
|
2146
|
+
ONLINE_PAYMENT = "OnlinePayment",
|
|
2069
2147
|
EXTERNAL = "External"
|
|
2070
2148
|
}
|
|
2071
2149
|
|
|
@@ -2276,6 +2354,7 @@ interface CalculatedTaxDetails {
|
|
|
2276
2354
|
};
|
|
2277
2355
|
totalTaxes: TaxesDetails;
|
|
2278
2356
|
cartFees: CartFeesDetails[];
|
|
2357
|
+
shipping?: CartFeesDetails;
|
|
2279
2358
|
}
|
|
2280
2359
|
interface TipData {
|
|
2281
2360
|
value: number;
|
|
@@ -2573,4 +2652,4 @@ interface PubsubEventMessage {
|
|
|
2573
2652
|
}
|
|
2574
2653
|
type ServiceChannelMessage = PosBrainReadyMessage | HostHelloMessage | ServiceInitMessage | BootstrapMessage | TokenRefreshMessage | RequestTokenRefreshMessage | SelectionMessage | HostShutdownMessage | ReaderCapabilitiesMessage | PrinterSettingsMessage | RuntimeReadyMessage | HostNavigateMessage | SyncProgressMessage | DeviceOpRequestMessage | DeviceOpResponseMessage | PubsubTopicsRequestMessage | PubsubTopicsListMessage | PubsubSubscribeMessage | PubsubEventMessage;
|
|
2575
2654
|
|
|
2576
|
-
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type AdyenCardEntryConfig, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|
|
2655
|
+
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type AdyenCardEntryConfig, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartAddress, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CartShipping, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderShippingLine, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|