@final-commerce/common 2.8.1-preprod.2 → 2.9.0-staging.2
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 +27 -203
- package/dist/index.d.ts +27 -203
- package/dist/index.js +42 -472
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -447
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +234 -305
- package/dist/pos-types/index.d.ts +234 -305
- package/dist/pos-types/index.js +0 -1
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +0 -1
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -50,6 +50,233 @@ 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
|
+
}
|
|
145
|
+
|
|
146
|
+
interface OrderInCart {
|
|
147
|
+
active: boolean;
|
|
148
|
+
stationId: string | null;
|
|
149
|
+
since: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface OrderCustomStatus {
|
|
153
|
+
id: string;
|
|
154
|
+
key?: string;
|
|
155
|
+
label: string;
|
|
156
|
+
setAt: string;
|
|
157
|
+
setBy: string | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface OrderLineItemDiscount {
|
|
161
|
+
itemDiscounts?: PriceModifierDetail[];
|
|
162
|
+
cartDiscount?: PriceModifierDetail;
|
|
163
|
+
}
|
|
164
|
+
interface OrderLineItemFee {
|
|
165
|
+
cartFee?: PriceModifierDetail;
|
|
166
|
+
itemFees?: PriceModifierDetail[];
|
|
167
|
+
}
|
|
168
|
+
interface OrderLineItemModifier {
|
|
169
|
+
modifierId: string;
|
|
170
|
+
modifierName: string;
|
|
171
|
+
choiceId: string;
|
|
172
|
+
choiceName: string;
|
|
173
|
+
unitPrice: number;
|
|
174
|
+
quantity: number;
|
|
175
|
+
total: number;
|
|
176
|
+
totalTax?: number;
|
|
177
|
+
taxes?: OrderTax[];
|
|
178
|
+
componentIndex?: number;
|
|
179
|
+
}
|
|
180
|
+
interface OrderLineItemComponent {
|
|
181
|
+
productId: string;
|
|
182
|
+
variantId: string;
|
|
183
|
+
name: string;
|
|
184
|
+
attributes?: string;
|
|
185
|
+
sku?: string;
|
|
186
|
+
productExternalId?: string;
|
|
187
|
+
variantExternalId?: string;
|
|
188
|
+
partName?: string;
|
|
189
|
+
quantity: number;
|
|
190
|
+
price: number;
|
|
191
|
+
unitId?: string;
|
|
192
|
+
unitAbbreviation?: string;
|
|
193
|
+
unitRatioToBase?: number;
|
|
194
|
+
stockQuantity?: number;
|
|
195
|
+
stockVariantId?: string;
|
|
196
|
+
manageStock?: boolean;
|
|
197
|
+
supplierId?: string;
|
|
198
|
+
taxTableId?: string;
|
|
199
|
+
totalTax?: number;
|
|
200
|
+
taxes?: OrderTax[];
|
|
201
|
+
}
|
|
202
|
+
interface OrderLineItem {
|
|
203
|
+
id?: string;
|
|
204
|
+
productId?: string;
|
|
205
|
+
variantId?: string;
|
|
206
|
+
name?: string;
|
|
207
|
+
quantity?: number;
|
|
208
|
+
manageStock?: boolean;
|
|
209
|
+
supplierId?: string;
|
|
210
|
+
price?: number;
|
|
211
|
+
description?: string;
|
|
212
|
+
sku?: string;
|
|
213
|
+
totalTax?: number;
|
|
214
|
+
total?: number;
|
|
215
|
+
productExternalId?: string;
|
|
216
|
+
variantExternalId?: string;
|
|
217
|
+
lineItemExternalId?: string;
|
|
218
|
+
internalId?: string;
|
|
219
|
+
note?: string;
|
|
220
|
+
image?: string;
|
|
221
|
+
attributes?: string;
|
|
222
|
+
taxes?: OrderTax[];
|
|
223
|
+
discount?: OrderLineItemDiscount;
|
|
224
|
+
fee?: OrderLineItemFee;
|
|
225
|
+
modifiers?: OrderLineItemModifier[];
|
|
226
|
+
components?: OrderLineItemComponent[];
|
|
227
|
+
lineNetWithFees?: number;
|
|
228
|
+
metadata?: Metadata[];
|
|
229
|
+
stock?: number;
|
|
230
|
+
subTotal?: number;
|
|
231
|
+
unitId?: string;
|
|
232
|
+
unitAbbreviation?: string;
|
|
233
|
+
stockQuantity?: number;
|
|
234
|
+
unitRatioToBase?: number;
|
|
235
|
+
stockVariantId?: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface OrderCustomSaleDiscount {
|
|
239
|
+
cartDiscount: OrderCartDiscount;
|
|
240
|
+
}
|
|
241
|
+
interface OrderCustomSaleFee {
|
|
242
|
+
cartFee: PriceModifierDetail;
|
|
243
|
+
}
|
|
244
|
+
interface OrderCustomSale {
|
|
245
|
+
customSaleId: string;
|
|
246
|
+
applyTaxes: boolean;
|
|
247
|
+
quantity: number;
|
|
248
|
+
name: string;
|
|
249
|
+
price: number;
|
|
250
|
+
totalTax: number;
|
|
251
|
+
total: number;
|
|
252
|
+
taxes?: OrderTax[];
|
|
253
|
+
discount?: OrderCustomSaleDiscount;
|
|
254
|
+
fee?: OrderCustomSaleFee;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
interface OrderRefundSummary {
|
|
258
|
+
total?: number;
|
|
259
|
+
}
|
|
260
|
+
interface OrderRefund {
|
|
261
|
+
externalId?: string;
|
|
262
|
+
reason?: string;
|
|
263
|
+
summary?: OrderRefundSummary;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
interface RefundCartDiscount {
|
|
267
|
+
amount?: number;
|
|
268
|
+
percentage?: number;
|
|
269
|
+
}
|
|
270
|
+
interface RefundItemDiscount {
|
|
271
|
+
amount?: number;
|
|
272
|
+
percentage?: number;
|
|
273
|
+
label?: string;
|
|
274
|
+
}
|
|
275
|
+
interface RefundDiscount {
|
|
276
|
+
cartDiscount?: RefundCartDiscount;
|
|
277
|
+
itemDiscounts?: RefundItemDiscount[];
|
|
278
|
+
}
|
|
279
|
+
|
|
53
280
|
declare enum CurrencyCode {
|
|
54
281
|
USD = "USD",
|
|
55
282
|
EUR = "EUR",
|
|
@@ -320,255 +547,6 @@ declare enum ReservationStatus {
|
|
|
320
547
|
EXPIRED = "expired"
|
|
321
548
|
}
|
|
322
549
|
|
|
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
|
-
}
|
|
439
|
-
|
|
440
|
-
interface OrderInCart {
|
|
441
|
-
active: boolean;
|
|
442
|
-
stationId: string | null;
|
|
443
|
-
since: string;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
interface OrderCustomStatus {
|
|
447
|
-
id: string;
|
|
448
|
-
key?: string;
|
|
449
|
-
label: string;
|
|
450
|
-
setAt: string;
|
|
451
|
-
setBy: string | null;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
interface OrderLineItemDiscount {
|
|
455
|
-
itemDiscounts?: PriceModifierDetail[];
|
|
456
|
-
cartDiscount?: PriceModifierDetail;
|
|
457
|
-
}
|
|
458
|
-
interface OrderLineItemFee {
|
|
459
|
-
cartFee?: PriceModifierDetail;
|
|
460
|
-
itemFees?: PriceModifierDetail[];
|
|
461
|
-
}
|
|
462
|
-
interface OrderLineItemModifier {
|
|
463
|
-
modifierId: string;
|
|
464
|
-
modifierName: string;
|
|
465
|
-
choiceId: string;
|
|
466
|
-
choiceName: string;
|
|
467
|
-
unitPrice: number;
|
|
468
|
-
quantity: number;
|
|
469
|
-
total: number;
|
|
470
|
-
totalTax?: number;
|
|
471
|
-
taxes?: OrderTax[];
|
|
472
|
-
componentIndex?: number;
|
|
473
|
-
}
|
|
474
|
-
interface OrderLineItemComponent {
|
|
475
|
-
productId: string;
|
|
476
|
-
variantId: string;
|
|
477
|
-
name: string;
|
|
478
|
-
attributes?: string;
|
|
479
|
-
sku?: string;
|
|
480
|
-
productExternalId?: string;
|
|
481
|
-
variantExternalId?: string;
|
|
482
|
-
partName?: string;
|
|
483
|
-
quantity: number;
|
|
484
|
-
price: number;
|
|
485
|
-
unitId?: string;
|
|
486
|
-
unitAbbreviation?: string;
|
|
487
|
-
unitRatioToBase?: number;
|
|
488
|
-
stockQuantity?: number;
|
|
489
|
-
stockVariantId?: string;
|
|
490
|
-
manageStock?: boolean;
|
|
491
|
-
taxTableId?: string;
|
|
492
|
-
totalTax?: number;
|
|
493
|
-
taxes?: OrderTax[];
|
|
494
|
-
}
|
|
495
|
-
interface OrderLineItem {
|
|
496
|
-
id?: string;
|
|
497
|
-
productId?: string;
|
|
498
|
-
variantId?: string;
|
|
499
|
-
name?: string;
|
|
500
|
-
quantity?: number;
|
|
501
|
-
manageStock?: boolean;
|
|
502
|
-
price?: number;
|
|
503
|
-
description?: string;
|
|
504
|
-
sku?: string;
|
|
505
|
-
totalTax?: number;
|
|
506
|
-
total?: number;
|
|
507
|
-
productExternalId?: string;
|
|
508
|
-
variantExternalId?: string;
|
|
509
|
-
lineItemExternalId?: string;
|
|
510
|
-
internalId?: string;
|
|
511
|
-
note?: string;
|
|
512
|
-
image?: string;
|
|
513
|
-
attributes?: string;
|
|
514
|
-
taxes?: OrderTax[];
|
|
515
|
-
discount?: OrderLineItemDiscount;
|
|
516
|
-
fee?: OrderLineItemFee;
|
|
517
|
-
modifiers?: OrderLineItemModifier[];
|
|
518
|
-
components?: OrderLineItemComponent[];
|
|
519
|
-
lineNetWithFees?: number;
|
|
520
|
-
metadata?: Metadata[];
|
|
521
|
-
stock?: number;
|
|
522
|
-
subTotal?: number;
|
|
523
|
-
unitId?: string;
|
|
524
|
-
unitAbbreviation?: string;
|
|
525
|
-
stockQuantity?: number;
|
|
526
|
-
unitRatioToBase?: number;
|
|
527
|
-
stockVariantId?: string;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
interface OrderCustomSaleDiscount {
|
|
531
|
-
cartDiscount: OrderCartDiscount;
|
|
532
|
-
}
|
|
533
|
-
interface OrderCustomSaleFee {
|
|
534
|
-
cartFee: PriceModifierDetail;
|
|
535
|
-
}
|
|
536
|
-
interface OrderCustomSale {
|
|
537
|
-
customSaleId: string;
|
|
538
|
-
applyTaxes: boolean;
|
|
539
|
-
quantity: number;
|
|
540
|
-
name: string;
|
|
541
|
-
price: number;
|
|
542
|
-
totalTax: number;
|
|
543
|
-
total: number;
|
|
544
|
-
taxes?: OrderTax[];
|
|
545
|
-
discount?: OrderCustomSaleDiscount;
|
|
546
|
-
fee?: OrderCustomSaleFee;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
interface OrderRefundSummary {
|
|
550
|
-
total?: number;
|
|
551
|
-
}
|
|
552
|
-
interface OrderRefund {
|
|
553
|
-
externalId?: string;
|
|
554
|
-
reason?: string;
|
|
555
|
-
summary?: OrderRefundSummary;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
interface RefundCartDiscount {
|
|
559
|
-
amount?: number;
|
|
560
|
-
percentage?: number;
|
|
561
|
-
}
|
|
562
|
-
interface RefundItemDiscount {
|
|
563
|
-
amount?: number;
|
|
564
|
-
percentage?: number;
|
|
565
|
-
label?: string;
|
|
566
|
-
}
|
|
567
|
-
interface RefundDiscount {
|
|
568
|
-
cartDiscount?: RefundCartDiscount;
|
|
569
|
-
itemDiscounts?: RefundItemDiscount[];
|
|
570
|
-
}
|
|
571
|
-
|
|
572
550
|
interface RefundLineItem {
|
|
573
551
|
taxes?: OrderTax[];
|
|
574
552
|
discount?: RefundDiscount;
|
|
@@ -595,6 +573,7 @@ interface RefundLineItem {
|
|
|
595
573
|
internalId?: string;
|
|
596
574
|
action?: InventorySpecificActionType;
|
|
597
575
|
variantId: string;
|
|
576
|
+
supplierId?: string;
|
|
598
577
|
totalTax?: number;
|
|
599
578
|
note?: string;
|
|
600
579
|
description?: string;
|
|
@@ -682,6 +661,7 @@ interface OrderReservation {
|
|
|
682
661
|
bookingId?: string;
|
|
683
662
|
productId: string;
|
|
684
663
|
variantId?: string | null;
|
|
664
|
+
supplierId?: string;
|
|
685
665
|
resourceId: string;
|
|
686
666
|
name: string;
|
|
687
667
|
resourceName?: string;
|
|
@@ -1000,7 +980,6 @@ interface Order extends BaseEntity {
|
|
|
1000
980
|
notes: OrderNote$1[];
|
|
1001
981
|
billing?: Address$1;
|
|
1002
982
|
shipping?: Address$1;
|
|
1003
|
-
shippingLine?: OrderShippingLine;
|
|
1004
983
|
lineItems: Partial<OrderLineItem>[];
|
|
1005
984
|
customSales?: OrderCustomSale[];
|
|
1006
985
|
nonRevenueItems?: NonRevenueItem$1[];
|
|
@@ -1621,6 +1600,8 @@ interface RefundedLineItem {
|
|
|
1621
1600
|
unitAbbreviation?: string;
|
|
1622
1601
|
unitRatioToBase?: number;
|
|
1623
1602
|
stockVariantId?: string;
|
|
1603
|
+
manageStock?: boolean;
|
|
1604
|
+
supplierId?: string;
|
|
1624
1605
|
price: number;
|
|
1625
1606
|
taxes: Tax[];
|
|
1626
1607
|
discount: DiscountLineItem;
|
|
@@ -1779,6 +1760,7 @@ interface ProductVariant {
|
|
|
1779
1760
|
unitId?: string;
|
|
1780
1761
|
unit?: MeasurementUnit;
|
|
1781
1762
|
stockVariantId?: string;
|
|
1763
|
+
defaultSupplierId?: string;
|
|
1782
1764
|
}
|
|
1783
1765
|
interface FullProduct {
|
|
1784
1766
|
_id: string;
|
|
@@ -1914,12 +1896,6 @@ interface ActiveProduct {
|
|
|
1914
1896
|
modifierSelections?: ModifierSelection[];
|
|
1915
1897
|
modifiers?: CartLineModifier[];
|
|
1916
1898
|
components?: CartLineComponent[];
|
|
1917
|
-
compositePicks?: (CompositePick & {
|
|
1918
|
-
resourceId?: string;
|
|
1919
|
-
})[];
|
|
1920
|
-
compositeSlot?: {
|
|
1921
|
-
startAt: string;
|
|
1922
|
-
};
|
|
1923
1899
|
currency?: CurrencyCode;
|
|
1924
1900
|
minorUnits?: number;
|
|
1925
1901
|
isUnlimited?: boolean;
|
|
@@ -1927,6 +1903,7 @@ interface ActiveProduct {
|
|
|
1927
1903
|
localQuantity?: number;
|
|
1928
1904
|
unit?: MeasurementUnit;
|
|
1929
1905
|
stockVariantId?: string;
|
|
1906
|
+
supplierId?: string;
|
|
1930
1907
|
_id?: string;
|
|
1931
1908
|
productType?: ProductType;
|
|
1932
1909
|
}
|
|
@@ -1938,48 +1915,6 @@ interface CartReservation extends OrderReservation {
|
|
|
1938
1915
|
fees?: CustomFee[];
|
|
1939
1916
|
}
|
|
1940
1917
|
|
|
1941
|
-
interface ShippingPriceTier {
|
|
1942
|
-
from: number;
|
|
1943
|
-
price: number;
|
|
1944
|
-
}
|
|
1945
|
-
interface ShippingOptionRule {
|
|
1946
|
-
id: string;
|
|
1947
|
-
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1948
|
-
rate?: ShippingRateType | `${ShippingRateType}`;
|
|
1949
|
-
name?: string | null;
|
|
1950
|
-
price: number;
|
|
1951
|
-
priceByTotal?: ShippingPriceTier[] | null;
|
|
1952
|
-
freeOver?: number | null;
|
|
1953
|
-
minDays?: number | null;
|
|
1954
|
-
maxDays?: number | null;
|
|
1955
|
-
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1956
|
-
outletId?: string | null;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
interface CartAddress {
|
|
1960
|
-
firstName?: string;
|
|
1961
|
-
lastName?: string;
|
|
1962
|
-
address1?: string;
|
|
1963
|
-
address2?: string;
|
|
1964
|
-
city?: string;
|
|
1965
|
-
state?: string;
|
|
1966
|
-
postCode?: string;
|
|
1967
|
-
country?: string;
|
|
1968
|
-
fromCustomer?: boolean;
|
|
1969
|
-
}
|
|
1970
|
-
interface CartShipping {
|
|
1971
|
-
zoneId: string;
|
|
1972
|
-
optionId: string;
|
|
1973
|
-
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
1974
|
-
name: string | null;
|
|
1975
|
-
amount: number;
|
|
1976
|
-
taxes?: Tax[];
|
|
1977
|
-
minDays: number | null;
|
|
1978
|
-
maxDays: number | null;
|
|
1979
|
-
outletId: string | null;
|
|
1980
|
-
rule?: Pick<ShippingOptionRule, 'price' | 'priceByTotal' | 'freeOver'>;
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
1918
|
interface ActiveCustomSales {
|
|
1984
1919
|
id: string;
|
|
1985
1920
|
name: string;
|
|
@@ -2015,10 +1950,6 @@ interface ActiveCart {
|
|
|
2015
1950
|
amountToBeCharged: number;
|
|
2016
1951
|
customer?: Partial<ActiveCustomer | null> | null;
|
|
2017
1952
|
orderNotes?: string;
|
|
2018
|
-
shippingAddress?: CartAddress | null;
|
|
2019
|
-
billingAddress?: CartAddress | null;
|
|
2020
|
-
shipping?: CartShipping | null;
|
|
2021
|
-
shippingTotal?: number;
|
|
2022
1953
|
cartTotal?: number;
|
|
2023
1954
|
orderTotal?: number;
|
|
2024
1955
|
orderId?: string;
|
|
@@ -2132,7 +2063,6 @@ declare enum ProcessorType {
|
|
|
2132
2063
|
REDEEM = "Redeem",
|
|
2133
2064
|
INTEGRATION = "Integration",
|
|
2134
2065
|
PAYMENT_LINK = "PaymentLink",
|
|
2135
|
-
ONLINE_PAYMENT = "OnlinePayment",
|
|
2136
2066
|
EXTERNAL = "External"
|
|
2137
2067
|
}
|
|
2138
2068
|
|
|
@@ -2343,7 +2273,6 @@ interface CalculatedTaxDetails {
|
|
|
2343
2273
|
};
|
|
2344
2274
|
totalTaxes: TaxesDetails;
|
|
2345
2275
|
cartFees: CartFeesDetails[];
|
|
2346
|
-
shipping?: CartFeesDetails;
|
|
2347
2276
|
}
|
|
2348
2277
|
interface TipData {
|
|
2349
2278
|
value: number;
|
|
@@ -2641,4 +2570,4 @@ interface PubsubEventMessage {
|
|
|
2641
2570
|
}
|
|
2642
2571
|
type ServiceChannelMessage = PosBrainReadyMessage | HostHelloMessage | ServiceInitMessage | BootstrapMessage | TokenRefreshMessage | RequestTokenRefreshMessage | SelectionMessage | HostShutdownMessage | ReaderCapabilitiesMessage | PrinterSettingsMessage | RuntimeReadyMessage | HostNavigateMessage | SyncProgressMessage | DeviceOpRequestMessage | DeviceOpResponseMessage | PubsubTopicsRequestMessage | PubsubTopicsListMessage | PubsubSubscribeMessage | PubsubEventMessage;
|
|
2643
2572
|
|
|
2644
|
-
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
|
|
2573
|
+
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 };
|
package/dist/pos-types/index.js
CHANGED
|
@@ -49,7 +49,6 @@ var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
|
49
49
|
ProcessorType2["REDEEM"] = "Redeem";
|
|
50
50
|
ProcessorType2["INTEGRATION"] = "Integration";
|
|
51
51
|
ProcessorType2["PAYMENT_LINK"] = "PaymentLink";
|
|
52
|
-
ProcessorType2["ONLINE_PAYMENT"] = "OnlinePayment";
|
|
53
52
|
ProcessorType2["EXTERNAL"] = "External";
|
|
54
53
|
return ProcessorType2;
|
|
55
54
|
})(ProcessorType || {});
|