@orderingstack/ordering-types 1.31.1 → 1.32.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.
@@ -327,6 +327,8 @@ export interface IOrderDeliveryAddress {
327
327
  city: string;
328
328
  country: string;
329
329
  }
330
+ export declare const TEST_VARIANTS: readonly ["A", "B"];
331
+ export type TestVariant = typeof TEST_VARIANTS[number];
330
332
  export interface IOrder {
331
333
  tenant: string;
332
334
  id: string;
@@ -368,6 +370,7 @@ export interface IOrder {
368
370
  completed?: boolean;
369
371
  verified?: boolean;
370
372
  closed?: boolean;
373
+ variant?: TestVariant;
371
374
  }
372
375
  export interface IOrderCoupon {
373
376
  coupon: string;
@@ -725,6 +728,13 @@ export interface ISteeringCommand {
725
728
  }
726
729
  export declare const modules: readonly ["POS_INTEGRATOR", "KIOSK", "BI_CONNECTOR", "AGGREGATOR", "KDS", "STATUS_SCREEN", "LOYALTY_INTEGRATOR", "LOYALTY", "MOBILE_APP_LOYALTY", "ORDERING_WEB", "DELIVERY_PANEL"];
727
730
  export type TModuleType = (typeof modules)[number];
731
+ type VariantsConfig = (Partial<Record<`variantRatio_${TestVariant}`, number>> & Partial<Record<`KIOSK_MEDIA_3_cmsId_variant_${TestVariant}`, 'string'>>);
732
+ interface IModuleConfig extends VariantsConfig {
733
+ abTestingEnabled?: boolean;
734
+ KIOSK_MEDIA_2_cmsId?: string;
735
+ KIOSK_MEDIA_3_cmsId?: string;
736
+ [key: string]: any;
737
+ }
728
738
  export interface IModule {
729
739
  id: string;
730
740
  type: TModuleType;
@@ -736,9 +746,7 @@ export interface IModule {
736
746
  updatedBy?: string;
737
747
  user?: string;
738
748
  extra?: IStringKeyRecord<string>;
739
- config?: {
740
- [key: string]: any;
741
- };
749
+ config?: IModuleConfig;
742
750
  }
743
751
  export interface IModuleCommonConfig {
744
752
  type: TModuleType;
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.modules = exports.ENotificationType = exports.sizes = exports.EOrderProductKind = exports.EOrderLineStatus = exports.ERbiOrderExtra = exports.EOrderPaymentType = exports.EOrderStatus = exports.EChannelName = exports.CHANNEL_NAMES = exports.EOrderSource = exports.EOrderType = exports.EOrderUserRole = exports.EProductKindBucket = exports.EProductKind = exports.ECouponViewType = void 0;
17
+ exports.modules = exports.ENotificationType = exports.sizes = exports.EOrderProductKind = exports.EOrderLineStatus = exports.ERbiOrderExtra = exports.EOrderPaymentType = exports.EOrderStatus = exports.TEST_VARIANTS = exports.EChannelName = exports.CHANNEL_NAMES = exports.EOrderSource = 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
  __exportStar(require("./api"), exports);
@@ -120,6 +120,7 @@ var EChannelName;
120
120
  EChannelName["TAZZ"] = "TAZZ";
121
121
  EChannelName["UPMENU"] = "UPMENU";
122
122
  })(EChannelName = exports.EChannelName || (exports.EChannelName = {}));
123
+ exports.TEST_VARIANTS = ['A', 'B'];
123
124
  var EOrderStatus;
124
125
  (function (EOrderStatus) {
125
126
  EOrderStatus["NEW"] = "NEW";
@@ -327,6 +327,8 @@ export interface IOrderDeliveryAddress {
327
327
  city: string;
328
328
  country: string;
329
329
  }
330
+ export declare const TEST_VARIANTS: readonly ["A", "B"];
331
+ export type TestVariant = typeof TEST_VARIANTS[number];
330
332
  export interface IOrder {
331
333
  tenant: string;
332
334
  id: string;
@@ -368,6 +370,7 @@ export interface IOrder {
368
370
  completed?: boolean;
369
371
  verified?: boolean;
370
372
  closed?: boolean;
373
+ variant?: TestVariant;
371
374
  }
372
375
  export interface IOrderCoupon {
373
376
  coupon: string;
@@ -725,6 +728,13 @@ export interface ISteeringCommand {
725
728
  }
726
729
  export declare const modules: readonly ["POS_INTEGRATOR", "KIOSK", "BI_CONNECTOR", "AGGREGATOR", "KDS", "STATUS_SCREEN", "LOYALTY_INTEGRATOR", "LOYALTY", "MOBILE_APP_LOYALTY", "ORDERING_WEB", "DELIVERY_PANEL"];
727
730
  export type TModuleType = (typeof modules)[number];
731
+ type VariantsConfig = (Partial<Record<`variantRatio_${TestVariant}`, number>> & Partial<Record<`KIOSK_MEDIA_3_cmsId_variant_${TestVariant}`, 'string'>>);
732
+ interface IModuleConfig extends VariantsConfig {
733
+ abTestingEnabled?: boolean;
734
+ KIOSK_MEDIA_2_cmsId?: string;
735
+ KIOSK_MEDIA_3_cmsId?: string;
736
+ [key: string]: any;
737
+ }
728
738
  export interface IModule {
729
739
  id: string;
730
740
  type: TModuleType;
@@ -736,9 +746,7 @@ export interface IModule {
736
746
  updatedBy?: string;
737
747
  user?: string;
738
748
  extra?: IStringKeyRecord<string>;
739
- config?: {
740
- [key: string]: any;
741
- };
749
+ config?: IModuleConfig;
742
750
  }
743
751
  export interface IModuleCommonConfig {
744
752
  type: TModuleType;
package/dist/esm/index.js CHANGED
@@ -103,6 +103,7 @@ export var EChannelName;
103
103
  EChannelName["TAZZ"] = "TAZZ";
104
104
  EChannelName["UPMENU"] = "UPMENU";
105
105
  })(EChannelName || (EChannelName = {}));
106
+ export const TEST_VARIANTS = ['A', 'B'];
106
107
  export var EOrderStatus;
107
108
  (function (EOrderStatus) {
108
109
  EOrderStatus["NEW"] = "NEW";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.31.1",
3
+ "version": "1.32.1",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",