@orderingstack/ordering-types 1.8.5 → 1.8.7
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/cjs/index.d.ts +24 -18
- package/dist/esm/index.d.ts +24 -18
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type TLiterals = {
|
|
|
58
58
|
fiscal?: string;
|
|
59
59
|
"target-product-id"?: string;
|
|
60
60
|
description?: string;
|
|
61
|
-
} &
|
|
61
|
+
} & IStringKeyRecord<string | undefined>;
|
|
62
62
|
export type TMedia = {
|
|
63
63
|
url: string;
|
|
64
64
|
name: string;
|
|
@@ -78,7 +78,7 @@ export interface IProductAvailability {
|
|
|
78
78
|
* @interface IProductExtra
|
|
79
79
|
* @related {string} comma separated related products IDs
|
|
80
80
|
*/
|
|
81
|
-
export interface IProductExtra extends
|
|
81
|
+
export interface IProductExtra extends IStringKeyRecord<string | undefined> {
|
|
82
82
|
related?: string;
|
|
83
83
|
category?: string;
|
|
84
84
|
}
|
|
@@ -115,11 +115,11 @@ export interface IProduct {
|
|
|
115
115
|
qtyMin?: string;
|
|
116
116
|
qtyMax?: string;
|
|
117
117
|
_?: IProductExtra;
|
|
118
|
-
bom?:
|
|
118
|
+
bom?: IStringKeyRecord<{
|
|
119
119
|
unit: string;
|
|
120
120
|
qty: string;
|
|
121
121
|
}>;
|
|
122
|
-
attrs?:
|
|
122
|
+
attrs?: IStringKeyRecord<string | boolean>;
|
|
123
123
|
__?: IProductFrontAttributes;
|
|
124
124
|
}
|
|
125
125
|
export interface IProductState {
|
|
@@ -148,7 +148,7 @@ export interface IUser {
|
|
|
148
148
|
name?: string;
|
|
149
149
|
phone?: string;
|
|
150
150
|
email?: string;
|
|
151
|
-
extra?:
|
|
151
|
+
extra?: IStringKeyRecord<string>;
|
|
152
152
|
}
|
|
153
153
|
export declare enum EOrderType {
|
|
154
154
|
TAKE_AWAY = "TAKE_AWAY",
|
|
@@ -231,6 +231,7 @@ export interface IOrderCoupon {
|
|
|
231
231
|
productId?: string;
|
|
232
232
|
enableKey?: string;
|
|
233
233
|
userId?: string;
|
|
234
|
+
extra?: IStringKeyRecord<string>;
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
237
|
export declare enum EOrderStatus {
|
|
@@ -249,19 +250,19 @@ export interface IOrderComment {
|
|
|
249
250
|
creator: string;
|
|
250
251
|
timestamp?: string;
|
|
251
252
|
comment: string;
|
|
252
|
-
extra?:
|
|
253
|
+
extra?: IStringKeyRecord<string>;
|
|
253
254
|
}
|
|
254
255
|
export interface IOrderInBucket {
|
|
255
256
|
venue: string;
|
|
256
|
-
sync
|
|
257
|
-
syncId
|
|
257
|
+
sync?: boolean;
|
|
258
|
+
syncId?: string;
|
|
258
259
|
name: string;
|
|
259
260
|
menu: string;
|
|
260
261
|
lines: IOrderLine[];
|
|
261
262
|
priceList?: string;
|
|
262
263
|
warehouse?: string;
|
|
263
264
|
queuePos?: string;
|
|
264
|
-
extra?:
|
|
265
|
+
extra?: IStringKeyRecord<string>;
|
|
265
266
|
}
|
|
266
267
|
export interface IOrderPayment {
|
|
267
268
|
id: string;
|
|
@@ -271,7 +272,7 @@ export interface IOrderPayment {
|
|
|
271
272
|
initialAmount?: number;
|
|
272
273
|
user: string;
|
|
273
274
|
timestamp?: string;
|
|
274
|
-
extra?:
|
|
275
|
+
extra?: IStringKeyRecord<string>;
|
|
275
276
|
}
|
|
276
277
|
export declare enum EOrderPaymentType {
|
|
277
278
|
CASH = "CASH",
|
|
@@ -325,7 +326,7 @@ export interface ITaxSummary {
|
|
|
325
326
|
* @x-agg-id {string} order ID from aggregator
|
|
326
327
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
327
328
|
*/
|
|
328
|
-
export interface IOrderExtra extends
|
|
329
|
+
export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
329
330
|
"x-source"?: EOrderSource;
|
|
330
331
|
"x-source-type"?: "INTEGRATOR";
|
|
331
332
|
"manual-verify"?: string;
|
|
@@ -340,6 +341,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
|
340
341
|
"support-order-id"?: string;
|
|
341
342
|
"x-pos-id"?: string;
|
|
342
343
|
"company-tax-id"?: string;
|
|
344
|
+
"x-kiosk-id"?: string;
|
|
345
|
+
}
|
|
346
|
+
interface IStringKeyRecord<T> {
|
|
347
|
+
[key: string]: T;
|
|
343
348
|
}
|
|
344
349
|
export interface IOrderLog {
|
|
345
350
|
timestamp?: string;
|
|
@@ -349,12 +354,12 @@ export interface IOrderLog {
|
|
|
349
354
|
lines?: string[];
|
|
350
355
|
}
|
|
351
356
|
export interface IOrderLine {
|
|
352
|
-
bom?:
|
|
357
|
+
bom?: IStringKeyRecord<unknown | undefined>;
|
|
353
358
|
comments?: IOrderComment[];
|
|
354
359
|
created: string;
|
|
355
360
|
creator?: string;
|
|
356
361
|
discounts?: IDiscount[];
|
|
357
|
-
extra:
|
|
362
|
+
extra: IStringKeyRecord<string>;
|
|
358
363
|
hash: string;
|
|
359
364
|
id: string;
|
|
360
365
|
price: string;
|
|
@@ -391,16 +396,17 @@ export declare enum EOrderSource {
|
|
|
391
396
|
BOLT = "BOLT",
|
|
392
397
|
TAZZ = "TAZZ"
|
|
393
398
|
}
|
|
399
|
+
export type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
|
|
394
400
|
export interface IOrderProduct {
|
|
395
401
|
id: string;
|
|
396
402
|
kind: EOrderProductKind;
|
|
397
403
|
literals: IProductLiterals;
|
|
398
|
-
items?: IOrderProduct
|
|
404
|
+
items?: Array<IOrderProduct | IOrderGroupProduct>;
|
|
399
405
|
img: string;
|
|
400
406
|
quantity: string;
|
|
401
407
|
price: string;
|
|
402
408
|
vat: string;
|
|
403
|
-
extra:
|
|
409
|
+
extra: IStringKeyRecord<string>;
|
|
404
410
|
}
|
|
405
411
|
export declare enum EOrderLineStatus {
|
|
406
412
|
NEW = "NEW",
|
|
@@ -459,8 +465,8 @@ export interface IVenueConfig {
|
|
|
459
465
|
street: string;
|
|
460
466
|
};
|
|
461
467
|
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
462
|
-
device:
|
|
463
|
-
extra:
|
|
468
|
+
device: IStringKeyRecord<IStringKeyRecord<string>>;
|
|
469
|
+
extra: IStringKeyRecord<string>;
|
|
464
470
|
geoPosition: IGeoPosition;
|
|
465
471
|
id: string;
|
|
466
472
|
menu: string;
|
|
@@ -513,7 +519,7 @@ export declare enum ENotificationType {
|
|
|
513
519
|
export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
514
520
|
export interface IUpsellNotification {
|
|
515
521
|
details: {
|
|
516
|
-
literals?:
|
|
522
|
+
literals?: IStringKeyRecord<string>;
|
|
517
523
|
media?: {
|
|
518
524
|
url?: string;
|
|
519
525
|
name: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type TLiterals = {
|
|
|
58
58
|
fiscal?: string;
|
|
59
59
|
"target-product-id"?: string;
|
|
60
60
|
description?: string;
|
|
61
|
-
} &
|
|
61
|
+
} & IStringKeyRecord<string | undefined>;
|
|
62
62
|
export type TMedia = {
|
|
63
63
|
url: string;
|
|
64
64
|
name: string;
|
|
@@ -78,7 +78,7 @@ export interface IProductAvailability {
|
|
|
78
78
|
* @interface IProductExtra
|
|
79
79
|
* @related {string} comma separated related products IDs
|
|
80
80
|
*/
|
|
81
|
-
export interface IProductExtra extends
|
|
81
|
+
export interface IProductExtra extends IStringKeyRecord<string | undefined> {
|
|
82
82
|
related?: string;
|
|
83
83
|
category?: string;
|
|
84
84
|
}
|
|
@@ -115,11 +115,11 @@ export interface IProduct {
|
|
|
115
115
|
qtyMin?: string;
|
|
116
116
|
qtyMax?: string;
|
|
117
117
|
_?: IProductExtra;
|
|
118
|
-
bom?:
|
|
118
|
+
bom?: IStringKeyRecord<{
|
|
119
119
|
unit: string;
|
|
120
120
|
qty: string;
|
|
121
121
|
}>;
|
|
122
|
-
attrs?:
|
|
122
|
+
attrs?: IStringKeyRecord<string | boolean>;
|
|
123
123
|
__?: IProductFrontAttributes;
|
|
124
124
|
}
|
|
125
125
|
export interface IProductState {
|
|
@@ -148,7 +148,7 @@ export interface IUser {
|
|
|
148
148
|
name?: string;
|
|
149
149
|
phone?: string;
|
|
150
150
|
email?: string;
|
|
151
|
-
extra?:
|
|
151
|
+
extra?: IStringKeyRecord<string>;
|
|
152
152
|
}
|
|
153
153
|
export declare enum EOrderType {
|
|
154
154
|
TAKE_AWAY = "TAKE_AWAY",
|
|
@@ -231,6 +231,7 @@ export interface IOrderCoupon {
|
|
|
231
231
|
productId?: string;
|
|
232
232
|
enableKey?: string;
|
|
233
233
|
userId?: string;
|
|
234
|
+
extra?: IStringKeyRecord<string>;
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
237
|
export declare enum EOrderStatus {
|
|
@@ -249,19 +250,19 @@ export interface IOrderComment {
|
|
|
249
250
|
creator: string;
|
|
250
251
|
timestamp?: string;
|
|
251
252
|
comment: string;
|
|
252
|
-
extra?:
|
|
253
|
+
extra?: IStringKeyRecord<string>;
|
|
253
254
|
}
|
|
254
255
|
export interface IOrderInBucket {
|
|
255
256
|
venue: string;
|
|
256
|
-
sync
|
|
257
|
-
syncId
|
|
257
|
+
sync?: boolean;
|
|
258
|
+
syncId?: string;
|
|
258
259
|
name: string;
|
|
259
260
|
menu: string;
|
|
260
261
|
lines: IOrderLine[];
|
|
261
262
|
priceList?: string;
|
|
262
263
|
warehouse?: string;
|
|
263
264
|
queuePos?: string;
|
|
264
|
-
extra?:
|
|
265
|
+
extra?: IStringKeyRecord<string>;
|
|
265
266
|
}
|
|
266
267
|
export interface IOrderPayment {
|
|
267
268
|
id: string;
|
|
@@ -271,7 +272,7 @@ export interface IOrderPayment {
|
|
|
271
272
|
initialAmount?: number;
|
|
272
273
|
user: string;
|
|
273
274
|
timestamp?: string;
|
|
274
|
-
extra?:
|
|
275
|
+
extra?: IStringKeyRecord<string>;
|
|
275
276
|
}
|
|
276
277
|
export declare enum EOrderPaymentType {
|
|
277
278
|
CASH = "CASH",
|
|
@@ -325,7 +326,7 @@ export interface ITaxSummary {
|
|
|
325
326
|
* @x-agg-id {string} order ID from aggregator
|
|
326
327
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
327
328
|
*/
|
|
328
|
-
export interface IOrderExtra extends
|
|
329
|
+
export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
329
330
|
"x-source"?: EOrderSource;
|
|
330
331
|
"x-source-type"?: "INTEGRATOR";
|
|
331
332
|
"manual-verify"?: string;
|
|
@@ -340,6 +341,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
|
340
341
|
"support-order-id"?: string;
|
|
341
342
|
"x-pos-id"?: string;
|
|
342
343
|
"company-tax-id"?: string;
|
|
344
|
+
"x-kiosk-id"?: string;
|
|
345
|
+
}
|
|
346
|
+
interface IStringKeyRecord<T> {
|
|
347
|
+
[key: string]: T;
|
|
343
348
|
}
|
|
344
349
|
export interface IOrderLog {
|
|
345
350
|
timestamp?: string;
|
|
@@ -349,12 +354,12 @@ export interface IOrderLog {
|
|
|
349
354
|
lines?: string[];
|
|
350
355
|
}
|
|
351
356
|
export interface IOrderLine {
|
|
352
|
-
bom?:
|
|
357
|
+
bom?: IStringKeyRecord<unknown | undefined>;
|
|
353
358
|
comments?: IOrderComment[];
|
|
354
359
|
created: string;
|
|
355
360
|
creator?: string;
|
|
356
361
|
discounts?: IDiscount[];
|
|
357
|
-
extra:
|
|
362
|
+
extra: IStringKeyRecord<string>;
|
|
358
363
|
hash: string;
|
|
359
364
|
id: string;
|
|
360
365
|
price: string;
|
|
@@ -391,16 +396,17 @@ export declare enum EOrderSource {
|
|
|
391
396
|
BOLT = "BOLT",
|
|
392
397
|
TAZZ = "TAZZ"
|
|
393
398
|
}
|
|
399
|
+
export type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
|
|
394
400
|
export interface IOrderProduct {
|
|
395
401
|
id: string;
|
|
396
402
|
kind: EOrderProductKind;
|
|
397
403
|
literals: IProductLiterals;
|
|
398
|
-
items?: IOrderProduct
|
|
404
|
+
items?: Array<IOrderProduct | IOrderGroupProduct>;
|
|
399
405
|
img: string;
|
|
400
406
|
quantity: string;
|
|
401
407
|
price: string;
|
|
402
408
|
vat: string;
|
|
403
|
-
extra:
|
|
409
|
+
extra: IStringKeyRecord<string>;
|
|
404
410
|
}
|
|
405
411
|
export declare enum EOrderLineStatus {
|
|
406
412
|
NEW = "NEW",
|
|
@@ -459,8 +465,8 @@ export interface IVenueConfig {
|
|
|
459
465
|
street: string;
|
|
460
466
|
};
|
|
461
467
|
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
462
|
-
device:
|
|
463
|
-
extra:
|
|
468
|
+
device: IStringKeyRecord<IStringKeyRecord<string>>;
|
|
469
|
+
extra: IStringKeyRecord<string>;
|
|
464
470
|
geoPosition: IGeoPosition;
|
|
465
471
|
id: string;
|
|
466
472
|
menu: string;
|
|
@@ -513,7 +519,7 @@ export declare enum ENotificationType {
|
|
|
513
519
|
export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
514
520
|
export interface IUpsellNotification {
|
|
515
521
|
details: {
|
|
516
|
-
literals?:
|
|
522
|
+
literals?: IStringKeyRecord<string>;
|
|
517
523
|
media?: {
|
|
518
524
|
url?: string;
|
|
519
525
|
name: string;
|