@orderingstack/ordering-types 1.26.0 → 1.27.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/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EOrderPaymentType, EOrderStatus, EOrderType, IProductState, IStringKeyRecord } from "./index";
2
2
  export declare const aggregators: readonly ["BOLT", "GLOVO", "JUSTEAT", "TAZZ", "UBER", "UPMENU", "WOLT", "_ANY_"];
3
- export type TAggregator = typeof aggregators[number];
4
- type TOrderDir = "DESC" | "ASC";
3
+ export declare type TAggregator = typeof aggregators[number];
4
+ declare type TOrderDir = "DESC" | "ASC";
5
5
  interface ApiParams {
6
6
  query?: any;
7
7
  headers?: IStringKeyRecord<string>;
@@ -39,7 +39,7 @@ export interface ILanguage {
39
39
  key: string;
40
40
  icon: any;
41
41
  }
42
- export type TStringBoolean = "true" | "false";
42
+ export declare type TStringBoolean = "true" | "false";
43
43
  export declare enum EProductKind {
44
44
  GROUP = "3e/group",
45
45
  PRODUCT = "3e/product",
@@ -55,18 +55,18 @@ export declare enum EProductKindBucket {
55
55
  GROUP = "group",
56
56
  PRODUCT = "product"
57
57
  }
58
- export type TLiterals = {
58
+ export declare type TLiterals = {
59
59
  name: string;
60
60
  upsizeName?: string;
61
61
  fiscal?: string;
62
62
  "target-product-id"?: string;
63
63
  description?: string;
64
64
  } & IStringKeyRecord<string | undefined>;
65
- export type TMedia = {
65
+ export declare type TMedia = {
66
66
  url: string;
67
67
  name: string;
68
68
  };
69
- type TDetails = {
69
+ declare type TDetails = {
70
70
  literals?: TLiterals;
71
71
  media?: TMedia[];
72
72
  };
@@ -173,7 +173,7 @@ export interface IMenuCategory extends Pick<IMenuItem, "id" | "kind" | "_" | "__
173
173
  export interface IMenuProduct extends IMenuItem {
174
174
  kind: EProductKind.PRODUCT;
175
175
  }
176
- export type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
176
+ export declare type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
177
177
  /**
178
178
  * IProductFrontAttributes
179
179
  *
@@ -548,7 +548,7 @@ export interface ISubTotalDiscount {
548
548
  discount: number;
549
549
  vat: string;
550
550
  }
551
- export type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
551
+ export declare type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
552
552
  export interface IOrderProduct {
553
553
  id: string;
554
554
  kind: EOrderProductKind;
@@ -585,8 +585,8 @@ export declare enum EOrderProductKind {
585
585
  export interface IProductLiterals {
586
586
  [propName: string]: any;
587
587
  }
588
- type TWeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
589
- export type TSaleChannelWeek = Partial<Record<TWeekDay, {
588
+ declare type TWeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
589
+ export declare type TSaleChannelWeek = Partial<Record<TWeekDay, {
590
590
  from: string;
591
591
  to: string;
592
592
  }[]>>;
@@ -660,14 +660,14 @@ export interface IFiscalizeData {
660
660
  };
661
661
  }
662
662
  export declare const sizes: readonly [48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900];
663
- export type TMediaSize = (typeof sizes)[number];
663
+ export declare type TMediaSize = (typeof sizes)[number];
664
664
  export declare enum ENotificationType {
665
665
  ORDER_EVENT_ERROR = "OrderEventError",
666
666
  ORDER_APPLIED_EVENTS = "OrderAppliedEvents",
667
667
  ORDER_EVENT_FISCAL = "OrderEventFiscal",
668
668
  ORDER_UPSELL = "OrderUpsell"
669
669
  }
670
- export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
670
+ export declare type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
671
671
  export interface IUpsellNotification {
672
672
  details: {
673
673
  literals?: IStringKeyRecord<string>;
@@ -731,4 +731,7 @@ export interface IModule {
731
731
  updatedBy?: string;
732
732
  user?: string;
733
733
  extra?: IStringKeyRecord<string>;
734
+ config?: {
735
+ [key: string]: any;
736
+ };
734
737
  }
@@ -135,10 +135,12 @@ export declare const KioskErrors: {
135
135
  x5: string;
136
136
  x6: string;
137
137
  x7: string;
138
+ x8: string;
139
+ x9: string;
138
140
  x500: string;
139
141
  x501: string;
140
142
  };
141
- export type TErrorCode = keyof typeof KioskErrors;
143
+ export declare type TErrorCode = keyof typeof KioskErrors;
142
144
  export interface IKioskError {
143
145
  errorType: string;
144
146
  errorCode: TErrorCode;
@@ -139,6 +139,8 @@ exports.KioskErrors = {
139
139
  x5: "Missing transactionId",
140
140
  x6: "OrderEvent timeout",
141
141
  x7: "Received OrderEventError",
142
+ x8: "Kiosk service MALFUNCTION",
143
+ x9: "Venue temp disabled",
142
144
  x500: "Unknown error",
143
145
  x501: "Not implemented",
144
146
  };
package/dist/esm/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EOrderPaymentType, EOrderStatus, EOrderType, IProductState, IStringKeyRecord } from "./index";
2
2
  export declare const aggregators: readonly ["BOLT", "GLOVO", "JUSTEAT", "TAZZ", "UBER", "UPMENU", "WOLT", "_ANY_"];
3
- export type TAggregator = typeof aggregators[number];
4
- type TOrderDir = "DESC" | "ASC";
3
+ export declare type TAggregator = typeof aggregators[number];
4
+ declare type TOrderDir = "DESC" | "ASC";
5
5
  interface ApiParams {
6
6
  query?: any;
7
7
  headers?: IStringKeyRecord<string>;
@@ -39,7 +39,7 @@ export interface ILanguage {
39
39
  key: string;
40
40
  icon: any;
41
41
  }
42
- export type TStringBoolean = "true" | "false";
42
+ export declare type TStringBoolean = "true" | "false";
43
43
  export declare enum EProductKind {
44
44
  GROUP = "3e/group",
45
45
  PRODUCT = "3e/product",
@@ -55,18 +55,18 @@ export declare enum EProductKindBucket {
55
55
  GROUP = "group",
56
56
  PRODUCT = "product"
57
57
  }
58
- export type TLiterals = {
58
+ export declare type TLiterals = {
59
59
  name: string;
60
60
  upsizeName?: string;
61
61
  fiscal?: string;
62
62
  "target-product-id"?: string;
63
63
  description?: string;
64
64
  } & IStringKeyRecord<string | undefined>;
65
- export type TMedia = {
65
+ export declare type TMedia = {
66
66
  url: string;
67
67
  name: string;
68
68
  };
69
- type TDetails = {
69
+ declare type TDetails = {
70
70
  literals?: TLiterals;
71
71
  media?: TMedia[];
72
72
  };
@@ -173,7 +173,7 @@ export interface IMenuCategory extends Pick<IMenuItem, "id" | "kind" | "_" | "__
173
173
  export interface IMenuProduct extends IMenuItem {
174
174
  kind: EProductKind.PRODUCT;
175
175
  }
176
- export type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
176
+ export declare type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
177
177
  /**
178
178
  * IProductFrontAttributes
179
179
  *
@@ -548,7 +548,7 @@ export interface ISubTotalDiscount {
548
548
  discount: number;
549
549
  vat: string;
550
550
  }
551
- export type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
551
+ export declare type IOrderGroupProduct = Pick<IOrderProduct, "kind" | "id" | "literals" | "items" | "extra">;
552
552
  export interface IOrderProduct {
553
553
  id: string;
554
554
  kind: EOrderProductKind;
@@ -585,8 +585,8 @@ export declare enum EOrderProductKind {
585
585
  export interface IProductLiterals {
586
586
  [propName: string]: any;
587
587
  }
588
- type TWeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
589
- export type TSaleChannelWeek = Partial<Record<TWeekDay, {
588
+ declare type TWeekDay = "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN";
589
+ export declare type TSaleChannelWeek = Partial<Record<TWeekDay, {
590
590
  from: string;
591
591
  to: string;
592
592
  }[]>>;
@@ -660,14 +660,14 @@ export interface IFiscalizeData {
660
660
  };
661
661
  }
662
662
  export declare const sizes: readonly [48, 57, 70, 100, 160, 250, 300, 500, 600, 900, 1000, 1920, 1080, 900];
663
- export type TMediaSize = (typeof sizes)[number];
663
+ export declare type TMediaSize = (typeof sizes)[number];
664
664
  export declare enum ENotificationType {
665
665
  ORDER_EVENT_ERROR = "OrderEventError",
666
666
  ORDER_APPLIED_EVENTS = "OrderAppliedEvents",
667
667
  ORDER_EVENT_FISCAL = "OrderEventFiscal",
668
668
  ORDER_UPSELL = "OrderUpsell"
669
669
  }
670
- export type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
670
+ export declare type TUpsellKind = "ANY" | "POPUP" | "SIDE" | "BASKET";
671
671
  export interface IUpsellNotification {
672
672
  details: {
673
673
  literals?: IStringKeyRecord<string>;
@@ -731,4 +731,7 @@ export interface IModule {
731
731
  updatedBy?: string;
732
732
  user?: string;
733
733
  extra?: IStringKeyRecord<string>;
734
+ config?: {
735
+ [key: string]: any;
736
+ };
734
737
  }
@@ -135,10 +135,12 @@ export declare const KioskErrors: {
135
135
  x5: string;
136
136
  x6: string;
137
137
  x7: string;
138
+ x8: string;
139
+ x9: string;
138
140
  x500: string;
139
141
  x501: string;
140
142
  };
141
- export type TErrorCode = keyof typeof KioskErrors;
143
+ export declare type TErrorCode = keyof typeof KioskErrors;
142
144
  export interface IKioskError {
143
145
  errorType: string;
144
146
  errorCode: TErrorCode;
@@ -136,6 +136,8 @@ export const KioskErrors = {
136
136
  x5: "Missing transactionId",
137
137
  x6: "OrderEvent timeout",
138
138
  x7: "Received OrderEventError",
139
+ x8: "Kiosk service MALFUNCTION",
140
+ x9: "Venue temp disabled",
139
141
  x500: "Unknown error",
140
142
  x501: "Not implemented",
141
143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",
@@ -1,97 +0,0 @@
1
- import { EOrderPaymentType, EOrderStatus, EOrderType, IProductState, IStringKeyRecord } from "./index";
2
- export declare const aggregators: readonly ["GLOVO", "JUSTEAT", "UBER", "WOLT", "BOLT", "TAZZ", "_ANY_"];
3
- export type TAggregator = typeof aggregators[number];
4
- type TOrderDir = "DESC" | "ASC";
5
- interface ApiParams {
6
- query?: any;
7
- headers?: IStringKeyRecord<string>;
8
- data?: any;
9
- }
10
- export interface IOrderApiGetListParams extends ApiParams {
11
- query: {
12
- _sort?: string;
13
- _order?: TOrderDir;
14
- _start?: number;
15
- _end?: number;
16
- id?: string;
17
- extId?: string;
18
- status?: EOrderStatus;
19
- type?: EOrderType;
20
- completed?: boolean;
21
- closed?: boolean;
22
- phone?: string;
23
- mail?: string;
24
- createdFrom?: string;
25
- createdTo?: string;
26
- completedFrom?: string;
27
- completedTo?: string;
28
- venue?: string;
29
- aggregator?: TAggregator;
30
- payment?: EOrderPaymentType;
31
- };
32
- headers: {
33
- "x-tenant"?: string;
34
- };
35
- }
36
- interface IDiscount {
37
- /**
38
- * Discount layer. It is used to distinguish discounts from loyalty, manual discounts, etc.
39
- * @pattern [a-zA-Z0-9_.-]+
40
- */
41
- layer: string;
42
- /**
43
- * Name that describes this discount
44
- * @minLength 0
45
- * @maxLength 128
46
- */
47
- name?: string;
48
- /** Discount price (subtracted from line total) */
49
- discountPrice: number;
50
- /** Extra params */
51
- extra?: IStringKeyRecord<string>;
52
- type: string;
53
- }
54
- interface ILineDiscount {
55
- /** Applied discounts */
56
- discount: IDiscount;
57
- /** @format date-time */
58
- expires?: string;
59
- /**
60
- * @minLength 0
61
- * @maxLength 128
62
- * @pattern [a-zA-Z0-9_. -]+
63
- */
64
- sign: string;
65
- }
66
- export interface IAppendedLine {
67
- /**
68
- * @format int32
69
- * @min 1
70
- * @max 100000
71
- */
72
- quantity: number;
73
- /**
74
- * One should not provide price - it will be automatically calculated. If user is privileged (internal system user or has role 'SU' or 'ALTERPRICE') OrderingStack will use provided price and override one from menu. Please be careful when providing value '0' as privileged user here! If you do not want to override price - do not provide 'price' attribute at all (null).
75
- * @min 0
76
- * @exclusiveMin false
77
- */
78
- price?: number;
79
- /** @pattern [a-zA-Z0-9_.-]+ */
80
- productId: string;
81
- /** Configuration of product */
82
- productConfig?: IProductState;
83
- /** @default "NEW" */
84
- status: "NEW" | "CONFIRMED";
85
- /**
86
- * @minLength 0
87
- * @maxLength 255
88
- */
89
- comment?: string;
90
- /**
91
- * @maxItems 10
92
- * @minItems 0
93
- */
94
- discounts?: ILineDiscount[];
95
- extra?: IStringKeyRecord<string>;
96
- }
97
- export {};
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.aggregators = void 0;
4
- exports.aggregators = [
5
- "GLOVO",
6
- "JUSTEAT",
7
- "UBER",
8
- "WOLT",
9
- "BOLT",
10
- "TAZZ",
11
- "_ANY_",
12
- ];