@orderingstack/ordering-types 1.8.8 → 1.9.0
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 +27 -3
- package/dist/cjs/index.js +20 -1
- package/dist/esm/index.d.ts +27 -3
- package/dist/esm/index.js +19 -0
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -144,12 +144,23 @@ export interface IProductFilter {
|
|
|
144
144
|
}
|
|
145
145
|
export interface IUser {
|
|
146
146
|
userId: string;
|
|
147
|
-
roles:
|
|
147
|
+
roles: Array<EOrderUserRole>;
|
|
148
148
|
name?: string;
|
|
149
149
|
phone?: string;
|
|
150
150
|
email?: string;
|
|
151
151
|
extra?: IStringKeyRecord<string>;
|
|
152
152
|
}
|
|
153
|
+
export declare enum EOrderUserRole {
|
|
154
|
+
CREATOR = "CREATOR",
|
|
155
|
+
CUSTOMER = "CUSTOMER",
|
|
156
|
+
COUPON = "COUPON",
|
|
157
|
+
KIOSK = "KIOSK",
|
|
158
|
+
WAITER = "WAITER",
|
|
159
|
+
MANAGER = "MANAGER",
|
|
160
|
+
VIEWER = "VIEWER",
|
|
161
|
+
DRIVER = "DRIVER",
|
|
162
|
+
STAFF = "STAFF"
|
|
163
|
+
}
|
|
153
164
|
export declare enum EOrderType {
|
|
154
165
|
TAKE_AWAY = "TAKE_AWAY",
|
|
155
166
|
DELIVERY = "DELIVERY",
|
|
@@ -312,7 +323,7 @@ export interface ITaxSummary {
|
|
|
312
323
|
brutto: number;
|
|
313
324
|
}
|
|
314
325
|
/**
|
|
315
|
-
* OrderExtra
|
|
326
|
+
* OrderExtra type
|
|
316
327
|
*
|
|
317
328
|
* @interface IOrderExtra
|
|
318
329
|
* @manual-verify {string} order needs manual verification
|
|
@@ -325,8 +336,15 @@ export interface ITaxSummary {
|
|
|
325
336
|
* @allergies {string} customer allergies from aggregator
|
|
326
337
|
* @x-agg-id {string} order ID from aggregator
|
|
327
338
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
339
|
+
* @x-rbi-loyalty-points {string} current user RBI loyalty points
|
|
340
|
+
* @x-rbi-points-earned {string} RBI loyalty points to be earned for a current order basket
|
|
341
|
+
* @x-rbi-rewards {string} comma separated product IDs of preselected RBI REWARDS
|
|
342
|
+
* @x-rbi-offers {string} comma separated product IDs of preselected RBI OFFERS
|
|
328
343
|
*/
|
|
329
|
-
export
|
|
344
|
+
export type IOrderExtra = {
|
|
345
|
+
[key in ERbiOrderExtra]?: string | undefined;
|
|
346
|
+
} & IStringKeyRecord<string | undefined> & IOrderExtraSubInterface;
|
|
347
|
+
interface IOrderExtraSubInterface {
|
|
330
348
|
"x-source"?: EOrderSource;
|
|
331
349
|
"x-source-type"?: "INTEGRATOR";
|
|
332
350
|
"manual-verify"?: string;
|
|
@@ -346,6 +364,12 @@ export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
|
346
364
|
interface IStringKeyRecord<T> {
|
|
347
365
|
[key: string]: T;
|
|
348
366
|
}
|
|
367
|
+
export declare enum ERbiOrderExtra {
|
|
368
|
+
POINTS_TOTAL = "x-rbi-loyalty-points",
|
|
369
|
+
POINTS_EARNED = "x-rbi-points-earned",
|
|
370
|
+
REWARDS = "x-rbi-rewards",
|
|
371
|
+
OFFERS = "x-rbi-offers"
|
|
372
|
+
}
|
|
349
373
|
export interface IOrderLog {
|
|
350
374
|
timestamp?: string;
|
|
351
375
|
user?: string;
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ENotificationType = exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
17
|
+
exports.ENotificationType = exports.EChannelName = exports.EOrderProductKind = exports.EOrderLineStatus = exports.EOrderSource = exports.ERbiOrderExtra = exports.EOrderPaymentType = exports.EOrderStatus = exports.EOrderType = exports.EOrderUserRole = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
|
|
18
18
|
__exportStar(require("./kiosk"), exports);
|
|
19
19
|
__exportStar(require("./kioskErrors"), exports);
|
|
20
20
|
var ECouponViewType;
|
|
@@ -39,6 +39,18 @@ var EProductKindBucket;
|
|
|
39
39
|
EProductKindBucket["GROUP"] = "group";
|
|
40
40
|
EProductKindBucket["PRODUCT"] = "product";
|
|
41
41
|
})(EProductKindBucket = exports.EProductKindBucket || (exports.EProductKindBucket = {}));
|
|
42
|
+
var EOrderUserRole;
|
|
43
|
+
(function (EOrderUserRole) {
|
|
44
|
+
EOrderUserRole["CREATOR"] = "CREATOR";
|
|
45
|
+
EOrderUserRole["CUSTOMER"] = "CUSTOMER";
|
|
46
|
+
EOrderUserRole["COUPON"] = "COUPON";
|
|
47
|
+
EOrderUserRole["KIOSK"] = "KIOSK";
|
|
48
|
+
EOrderUserRole["WAITER"] = "WAITER";
|
|
49
|
+
EOrderUserRole["MANAGER"] = "MANAGER";
|
|
50
|
+
EOrderUserRole["VIEWER"] = "VIEWER";
|
|
51
|
+
EOrderUserRole["DRIVER"] = "DRIVER";
|
|
52
|
+
EOrderUserRole["STAFF"] = "STAFF";
|
|
53
|
+
})(EOrderUserRole = exports.EOrderUserRole || (exports.EOrderUserRole = {}));
|
|
42
54
|
// Update EOrderSource & EChannelName upon adding EOrderType
|
|
43
55
|
var EOrderType;
|
|
44
56
|
(function (EOrderType) {
|
|
@@ -86,6 +98,13 @@ var EOrderPaymentType;
|
|
|
86
98
|
EOrderPaymentType["RETURN"] = "RETURN";
|
|
87
99
|
EOrderPaymentType["EXTERNAL"] = "EXTERNAL";
|
|
88
100
|
})(EOrderPaymentType = exports.EOrderPaymentType || (exports.EOrderPaymentType = {}));
|
|
101
|
+
var ERbiOrderExtra;
|
|
102
|
+
(function (ERbiOrderExtra) {
|
|
103
|
+
ERbiOrderExtra["POINTS_TOTAL"] = "x-rbi-loyalty-points";
|
|
104
|
+
ERbiOrderExtra["POINTS_EARNED"] = "x-rbi-points-earned";
|
|
105
|
+
ERbiOrderExtra["REWARDS"] = "x-rbi-rewards";
|
|
106
|
+
ERbiOrderExtra["OFFERS"] = "x-rbi-offers";
|
|
107
|
+
})(ERbiOrderExtra = exports.ERbiOrderExtra || (exports.ERbiOrderExtra = {}));
|
|
89
108
|
var EOrderSource;
|
|
90
109
|
(function (EOrderSource) {
|
|
91
110
|
EOrderSource["KIOSK"] = "KIOSK";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -144,12 +144,23 @@ export interface IProductFilter {
|
|
|
144
144
|
}
|
|
145
145
|
export interface IUser {
|
|
146
146
|
userId: string;
|
|
147
|
-
roles:
|
|
147
|
+
roles: Array<EOrderUserRole>;
|
|
148
148
|
name?: string;
|
|
149
149
|
phone?: string;
|
|
150
150
|
email?: string;
|
|
151
151
|
extra?: IStringKeyRecord<string>;
|
|
152
152
|
}
|
|
153
|
+
export declare enum EOrderUserRole {
|
|
154
|
+
CREATOR = "CREATOR",
|
|
155
|
+
CUSTOMER = "CUSTOMER",
|
|
156
|
+
COUPON = "COUPON",
|
|
157
|
+
KIOSK = "KIOSK",
|
|
158
|
+
WAITER = "WAITER",
|
|
159
|
+
MANAGER = "MANAGER",
|
|
160
|
+
VIEWER = "VIEWER",
|
|
161
|
+
DRIVER = "DRIVER",
|
|
162
|
+
STAFF = "STAFF"
|
|
163
|
+
}
|
|
153
164
|
export declare enum EOrderType {
|
|
154
165
|
TAKE_AWAY = "TAKE_AWAY",
|
|
155
166
|
DELIVERY = "DELIVERY",
|
|
@@ -312,7 +323,7 @@ export interface ITaxSummary {
|
|
|
312
323
|
brutto: number;
|
|
313
324
|
}
|
|
314
325
|
/**
|
|
315
|
-
* OrderExtra
|
|
326
|
+
* OrderExtra type
|
|
316
327
|
*
|
|
317
328
|
* @interface IOrderExtra
|
|
318
329
|
* @manual-verify {string} order needs manual verification
|
|
@@ -325,8 +336,15 @@ export interface ITaxSummary {
|
|
|
325
336
|
* @allergies {string} customer allergies from aggregator
|
|
326
337
|
* @x-agg-id {string} order ID from aggregator
|
|
327
338
|
* @support-order-id {string} order code from aggregator to be used with support and same as seen by customer,
|
|
339
|
+
* @x-rbi-loyalty-points {string} current user RBI loyalty points
|
|
340
|
+
* @x-rbi-points-earned {string} RBI loyalty points to be earned for a current order basket
|
|
341
|
+
* @x-rbi-rewards {string} comma separated product IDs of preselected RBI REWARDS
|
|
342
|
+
* @x-rbi-offers {string} comma separated product IDs of preselected RBI OFFERS
|
|
328
343
|
*/
|
|
329
|
-
export
|
|
344
|
+
export type IOrderExtra = {
|
|
345
|
+
[key in ERbiOrderExtra]?: string | undefined;
|
|
346
|
+
} & IStringKeyRecord<string | undefined> & IOrderExtraSubInterface;
|
|
347
|
+
interface IOrderExtraSubInterface {
|
|
330
348
|
"x-source"?: EOrderSource;
|
|
331
349
|
"x-source-type"?: "INTEGRATOR";
|
|
332
350
|
"manual-verify"?: string;
|
|
@@ -346,6 +364,12 @@ export interface IOrderExtra extends IStringKeyRecord<string | undefined> {
|
|
|
346
364
|
interface IStringKeyRecord<T> {
|
|
347
365
|
[key: string]: T;
|
|
348
366
|
}
|
|
367
|
+
export declare enum ERbiOrderExtra {
|
|
368
|
+
POINTS_TOTAL = "x-rbi-loyalty-points",
|
|
369
|
+
POINTS_EARNED = "x-rbi-points-earned",
|
|
370
|
+
REWARDS = "x-rbi-rewards",
|
|
371
|
+
OFFERS = "x-rbi-offers"
|
|
372
|
+
}
|
|
349
373
|
export interface IOrderLog {
|
|
350
374
|
timestamp?: string;
|
|
351
375
|
user?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -22,6 +22,18 @@ export var EProductKindBucket;
|
|
|
22
22
|
EProductKindBucket["GROUP"] = "group";
|
|
23
23
|
EProductKindBucket["PRODUCT"] = "product";
|
|
24
24
|
})(EProductKindBucket || (EProductKindBucket = {}));
|
|
25
|
+
export var EOrderUserRole;
|
|
26
|
+
(function (EOrderUserRole) {
|
|
27
|
+
EOrderUserRole["CREATOR"] = "CREATOR";
|
|
28
|
+
EOrderUserRole["CUSTOMER"] = "CUSTOMER";
|
|
29
|
+
EOrderUserRole["COUPON"] = "COUPON";
|
|
30
|
+
EOrderUserRole["KIOSK"] = "KIOSK";
|
|
31
|
+
EOrderUserRole["WAITER"] = "WAITER";
|
|
32
|
+
EOrderUserRole["MANAGER"] = "MANAGER";
|
|
33
|
+
EOrderUserRole["VIEWER"] = "VIEWER";
|
|
34
|
+
EOrderUserRole["DRIVER"] = "DRIVER";
|
|
35
|
+
EOrderUserRole["STAFF"] = "STAFF";
|
|
36
|
+
})(EOrderUserRole || (EOrderUserRole = {}));
|
|
25
37
|
// Update EOrderSource & EChannelName upon adding EOrderType
|
|
26
38
|
export var EOrderType;
|
|
27
39
|
(function (EOrderType) {
|
|
@@ -69,6 +81,13 @@ export var EOrderPaymentType;
|
|
|
69
81
|
EOrderPaymentType["RETURN"] = "RETURN";
|
|
70
82
|
EOrderPaymentType["EXTERNAL"] = "EXTERNAL";
|
|
71
83
|
})(EOrderPaymentType || (EOrderPaymentType = {}));
|
|
84
|
+
export var ERbiOrderExtra;
|
|
85
|
+
(function (ERbiOrderExtra) {
|
|
86
|
+
ERbiOrderExtra["POINTS_TOTAL"] = "x-rbi-loyalty-points";
|
|
87
|
+
ERbiOrderExtra["POINTS_EARNED"] = "x-rbi-points-earned";
|
|
88
|
+
ERbiOrderExtra["REWARDS"] = "x-rbi-rewards";
|
|
89
|
+
ERbiOrderExtra["OFFERS"] = "x-rbi-offers";
|
|
90
|
+
})(ERbiOrderExtra || (ERbiOrderExtra = {}));
|
|
72
91
|
export var EOrderSource;
|
|
73
92
|
(function (EOrderSource) {
|
|
74
93
|
EOrderSource["KIOSK"] = "KIOSK";
|