@orderingstack/ordering-types 1.8.4 → 1.8.6
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 +26 -22
- package/dist/esm/index.d.ts +26 -22
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -58,19 +58,19 @@ 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;
|
|
65
65
|
};
|
|
66
66
|
export interface IProductAvailability {
|
|
67
|
-
MON?: [
|
|
68
|
-
TUE?: [
|
|
69
|
-
WED?: [
|
|
70
|
-
THU?: [
|
|
71
|
-
FRI?: [
|
|
72
|
-
SAT?: [
|
|
73
|
-
SUN?: [
|
|
67
|
+
MON?: string[];
|
|
68
|
+
TUE?: string[];
|
|
69
|
+
WED?: string[];
|
|
70
|
+
THU?: string[];
|
|
71
|
+
FRI?: string[];
|
|
72
|
+
SAT?: string[];
|
|
73
|
+
SUN?: string[];
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* IProductExtra interface
|
|
@@ -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",
|
|
@@ -249,7 +249,7 @@ export interface IOrderComment {
|
|
|
249
249
|
creator: string;
|
|
250
250
|
timestamp?: string;
|
|
251
251
|
comment: string;
|
|
252
|
-
extra?:
|
|
252
|
+
extra?: IStringKeyRecord<string>;
|
|
253
253
|
}
|
|
254
254
|
export interface IOrderInBucket {
|
|
255
255
|
venue: string;
|
|
@@ -261,7 +261,7 @@ export interface IOrderInBucket {
|
|
|
261
261
|
priceList?: string;
|
|
262
262
|
warehouse?: string;
|
|
263
263
|
queuePos?: string;
|
|
264
|
-
extra?:
|
|
264
|
+
extra?: IStringKeyRecord<string>;
|
|
265
265
|
}
|
|
266
266
|
export interface IOrderPayment {
|
|
267
267
|
id: string;
|
|
@@ -271,7 +271,7 @@ export interface IOrderPayment {
|
|
|
271
271
|
initialAmount?: number;
|
|
272
272
|
user: string;
|
|
273
273
|
timestamp?: string;
|
|
274
|
-
extra?:
|
|
274
|
+
extra?: IStringKeyRecord<string>;
|
|
275
275
|
}
|
|
276
276
|
export declare enum EOrderPaymentType {
|
|
277
277
|
CASH = "CASH",
|
|
@@ -325,7 +325,7 @@ export interface ITaxSummary {
|
|
|
325
325
|
* @x-agg-id {string} order ID from aggregator
|
|
326
326
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
327
327
|
*/
|
|
328
|
-
export interface IOrderExtra extends
|
|
328
|
+
export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
329
329
|
"x-source"?: EOrderSource;
|
|
330
330
|
"x-source-type"?: "INTEGRATOR";
|
|
331
331
|
"manual-verify"?: string;
|
|
@@ -340,6 +340,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
|
340
340
|
"support-order-id"?: string;
|
|
341
341
|
"x-pos-id"?: string;
|
|
342
342
|
"company-tax-id"?: string;
|
|
343
|
+
"x-kiosk-id"?: string;
|
|
344
|
+
}
|
|
345
|
+
interface IStringKeyRecord<T> {
|
|
346
|
+
[key: string]: T;
|
|
343
347
|
}
|
|
344
348
|
export interface IOrderLog {
|
|
345
349
|
timestamp?: string;
|
|
@@ -349,12 +353,12 @@ export interface IOrderLog {
|
|
|
349
353
|
lines?: string[];
|
|
350
354
|
}
|
|
351
355
|
export interface IOrderLine {
|
|
352
|
-
bom?:
|
|
356
|
+
bom?: IStringKeyRecord<unknown | undefined>;
|
|
353
357
|
comments?: IOrderComment[];
|
|
354
358
|
created: string;
|
|
355
359
|
creator?: string;
|
|
356
360
|
discounts?: IDiscount[];
|
|
357
|
-
extra:
|
|
361
|
+
extra: IStringKeyRecord<string>;
|
|
358
362
|
hash: string;
|
|
359
363
|
id: string;
|
|
360
364
|
price: string;
|
|
@@ -400,7 +404,7 @@ export interface IOrderProduct {
|
|
|
400
404
|
quantity: string;
|
|
401
405
|
price: string;
|
|
402
406
|
vat: string;
|
|
403
|
-
extra:
|
|
407
|
+
extra: IStringKeyRecord<string>;
|
|
404
408
|
}
|
|
405
409
|
export declare enum EOrderLineStatus {
|
|
406
410
|
NEW = "NEW",
|
|
@@ -459,8 +463,8 @@ export interface IVenueConfig {
|
|
|
459
463
|
street: string;
|
|
460
464
|
};
|
|
461
465
|
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
462
|
-
device:
|
|
463
|
-
extra:
|
|
466
|
+
device: IStringKeyRecord<IStringKeyRecord<string>>;
|
|
467
|
+
extra: IStringKeyRecord<string>;
|
|
464
468
|
geoPosition: IGeoPosition;
|
|
465
469
|
id: string;
|
|
466
470
|
menu: string;
|
|
@@ -513,7 +517,7 @@ export declare enum ENotificationType {
|
|
|
513
517
|
export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
514
518
|
export interface IUpsellNotification {
|
|
515
519
|
details: {
|
|
516
|
-
literals?:
|
|
520
|
+
literals?: IStringKeyRecord<string>;
|
|
517
521
|
media?: {
|
|
518
522
|
url?: string;
|
|
519
523
|
name: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -58,19 +58,19 @@ 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;
|
|
65
65
|
};
|
|
66
66
|
export interface IProductAvailability {
|
|
67
|
-
MON?: [
|
|
68
|
-
TUE?: [
|
|
69
|
-
WED?: [
|
|
70
|
-
THU?: [
|
|
71
|
-
FRI?: [
|
|
72
|
-
SAT?: [
|
|
73
|
-
SUN?: [
|
|
67
|
+
MON?: string[];
|
|
68
|
+
TUE?: string[];
|
|
69
|
+
WED?: string[];
|
|
70
|
+
THU?: string[];
|
|
71
|
+
FRI?: string[];
|
|
72
|
+
SAT?: string[];
|
|
73
|
+
SUN?: string[];
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* IProductExtra interface
|
|
@@ -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",
|
|
@@ -249,7 +249,7 @@ export interface IOrderComment {
|
|
|
249
249
|
creator: string;
|
|
250
250
|
timestamp?: string;
|
|
251
251
|
comment: string;
|
|
252
|
-
extra?:
|
|
252
|
+
extra?: IStringKeyRecord<string>;
|
|
253
253
|
}
|
|
254
254
|
export interface IOrderInBucket {
|
|
255
255
|
venue: string;
|
|
@@ -261,7 +261,7 @@ export interface IOrderInBucket {
|
|
|
261
261
|
priceList?: string;
|
|
262
262
|
warehouse?: string;
|
|
263
263
|
queuePos?: string;
|
|
264
|
-
extra?:
|
|
264
|
+
extra?: IStringKeyRecord<string>;
|
|
265
265
|
}
|
|
266
266
|
export interface IOrderPayment {
|
|
267
267
|
id: string;
|
|
@@ -271,7 +271,7 @@ export interface IOrderPayment {
|
|
|
271
271
|
initialAmount?: number;
|
|
272
272
|
user: string;
|
|
273
273
|
timestamp?: string;
|
|
274
|
-
extra?:
|
|
274
|
+
extra?: IStringKeyRecord<string>;
|
|
275
275
|
}
|
|
276
276
|
export declare enum EOrderPaymentType {
|
|
277
277
|
CASH = "CASH",
|
|
@@ -325,7 +325,7 @@ export interface ITaxSummary {
|
|
|
325
325
|
* @x-agg-id {string} order ID from aggregator
|
|
326
326
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
327
327
|
*/
|
|
328
|
-
export interface IOrderExtra extends
|
|
328
|
+
export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
329
329
|
"x-source"?: EOrderSource;
|
|
330
330
|
"x-source-type"?: "INTEGRATOR";
|
|
331
331
|
"manual-verify"?: string;
|
|
@@ -340,6 +340,10 @@ export interface IOrderExtra extends Partial<Record<string, string>> {
|
|
|
340
340
|
"support-order-id"?: string;
|
|
341
341
|
"x-pos-id"?: string;
|
|
342
342
|
"company-tax-id"?: string;
|
|
343
|
+
"x-kiosk-id"?: string;
|
|
344
|
+
}
|
|
345
|
+
interface IStringKeyRecord<T> {
|
|
346
|
+
[key: string]: T;
|
|
343
347
|
}
|
|
344
348
|
export interface IOrderLog {
|
|
345
349
|
timestamp?: string;
|
|
@@ -349,12 +353,12 @@ export interface IOrderLog {
|
|
|
349
353
|
lines?: string[];
|
|
350
354
|
}
|
|
351
355
|
export interface IOrderLine {
|
|
352
|
-
bom?:
|
|
356
|
+
bom?: IStringKeyRecord<unknown | undefined>;
|
|
353
357
|
comments?: IOrderComment[];
|
|
354
358
|
created: string;
|
|
355
359
|
creator?: string;
|
|
356
360
|
discounts?: IDiscount[];
|
|
357
|
-
extra:
|
|
361
|
+
extra: IStringKeyRecord<string>;
|
|
358
362
|
hash: string;
|
|
359
363
|
id: string;
|
|
360
364
|
price: string;
|
|
@@ -400,7 +404,7 @@ export interface IOrderProduct {
|
|
|
400
404
|
quantity: string;
|
|
401
405
|
price: string;
|
|
402
406
|
vat: string;
|
|
403
|
-
extra:
|
|
407
|
+
extra: IStringKeyRecord<string>;
|
|
404
408
|
}
|
|
405
409
|
export declare enum EOrderLineStatus {
|
|
406
410
|
NEW = "NEW",
|
|
@@ -459,8 +463,8 @@ export interface IVenueConfig {
|
|
|
459
463
|
street: string;
|
|
460
464
|
};
|
|
461
465
|
channelConstraints: Partial<Record<EChannelName, ISaleChannel>>;
|
|
462
|
-
device:
|
|
463
|
-
extra:
|
|
466
|
+
device: IStringKeyRecord<IStringKeyRecord<string>>;
|
|
467
|
+
extra: IStringKeyRecord<string>;
|
|
464
468
|
geoPosition: IGeoPosition;
|
|
465
469
|
id: string;
|
|
466
470
|
menu: string;
|
|
@@ -513,7 +517,7 @@ export declare enum ENotificationType {
|
|
|
513
517
|
export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
|
|
514
518
|
export interface IUpsellNotification {
|
|
515
519
|
details: {
|
|
516
|
-
literals?:
|
|
520
|
+
literals?: IStringKeyRecord<string>;
|
|
517
521
|
media?: {
|
|
518
522
|
url?: string;
|
|
519
523
|
name: string;
|