@orderingstack/ordering-types 0.1.8 → 1.0.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.
@@ -60,7 +60,7 @@ export type Media = {
60
60
  url: string;
61
61
  name: string;
62
62
  };
63
- export type Availability = {
63
+ export interface IProductAvailability {
64
64
  MON?: [string, string];
65
65
  TUE?: [string, string];
66
66
  WED?: [string, string];
@@ -68,12 +68,12 @@ export type Availability = {
68
68
  FRI?: [string, string];
69
69
  SAT?: [string, string];
70
70
  SUN?: [string, string];
71
- };
72
- export type Product = {
73
- availability?: Availability;
71
+ }
72
+ export interface IProduct {
73
+ availability?: IProductAvailability;
74
74
  id: string;
75
75
  img?: string;
76
- items?: Product[];
76
+ items?: IProduct[];
77
77
  kind: EProductKind | EProductKindBucket;
78
78
  literals?: Literals;
79
79
  details?: {
@@ -85,19 +85,36 @@ export type Product = {
85
85
  quantity: string;
86
86
  vat: string;
87
87
  outsideAvailabilitySlot?: boolean;
88
- state?: ProductConfig;
88
+ state?: IProductState;
89
89
  selCtx: string;
90
- filter?: any;
91
- fltCtx?: any;
92
- };
93
- export type ProductConfig = {
94
- selected: any;
95
- filter: any;
96
- };
97
- export interface Category {
90
+ filter?: IProductFilter;
91
+ fltCtx?: string;
92
+ emit?: IProductEmit;
93
+ }
94
+ export interface IProductState {
95
+ selected: IProductStateFilter;
96
+ filter: IProductStateFilter;
97
+ }
98
+ export interface IProductStateFilter {
99
+ [flxCtx: string]: {
100
+ [id: string]: string;
101
+ };
102
+ }
103
+ export interface IProductStateSelected {
104
+ [selCtx: string]: {
105
+ [id: string]: string;
106
+ };
107
+ }
108
+ export interface IProductEmit {
109
+ [id: string]: string;
110
+ }
111
+ export interface ICategory {
98
112
  id: string;
99
113
  name: string;
100
114
  }
115
+ export interface IProductFilter {
116
+ [fltCtx: string]: string[];
117
+ }
101
118
  export interface Extra {
102
119
  [propName: string]: any;
103
120
  }
@@ -185,6 +202,7 @@ export interface OrderCoupon {
185
202
  data?: {
186
203
  campaign?: string;
187
204
  categoryId?: string;
205
+ productId?: string;
188
206
  enableKey?: string;
189
207
  userId?: string;
190
208
  };
@@ -304,7 +322,7 @@ export interface OrderExtra {
304
322
  allergies?: string;
305
323
  "x-agg-id"?: string;
306
324
  "support-order-id"?: string;
307
- 'x-pos-id'?: string;
325
+ "x-pos-id"?: string;
308
326
  }
309
327
  export interface OrderLog {
310
328
  timestamp?: string;
@@ -324,7 +342,7 @@ export interface OrderLine {
324
342
  id: string;
325
343
  price: string;
326
344
  product: OrderProduct;
327
- productConfig: ProductConfig;
345
+ productConfig: IProductState;
328
346
  productId: string;
329
347
  quantity: number;
330
348
  source: string;
@@ -2,6 +2,7 @@ export declare enum EPaymentStatus {
2
2
  UNINITIALIZED = "UNINITIALIZED",
3
3
  PROCESSING = "PROCESSING",
4
4
  PAID = "PAID",
5
+ FAILED = "FAILED",
5
6
  PRINTING_RECEIPT = "PRINTING_RECEIPT",
6
7
  PRINTING_RECEIPT_SUCCESS = "PRINTING_RECEIPT_SUCCESS",
7
8
  SENDING_RECEIPT = "SENDING_RECEIPT",
package/dist/cjs/kiosk.js CHANGED
@@ -6,6 +6,7 @@ var EPaymentStatus;
6
6
  EPaymentStatus["UNINITIALIZED"] = "UNINITIALIZED";
7
7
  EPaymentStatus["PROCESSING"] = "PROCESSING";
8
8
  EPaymentStatus["PAID"] = "PAID";
9
+ EPaymentStatus["FAILED"] = "FAILED";
9
10
  EPaymentStatus["PRINTING_RECEIPT"] = "PRINTING_RECEIPT";
10
11
  EPaymentStatus["PRINTING_RECEIPT_SUCCESS"] = "PRINTING_RECEIPT_SUCCESS";
11
12
  EPaymentStatus["SENDING_RECEIPT"] = "SENDING_RECEIPT";
@@ -60,7 +60,7 @@ export type Media = {
60
60
  url: string;
61
61
  name: string;
62
62
  };
63
- export type Availability = {
63
+ export interface IProductAvailability {
64
64
  MON?: [string, string];
65
65
  TUE?: [string, string];
66
66
  WED?: [string, string];
@@ -68,12 +68,12 @@ export type Availability = {
68
68
  FRI?: [string, string];
69
69
  SAT?: [string, string];
70
70
  SUN?: [string, string];
71
- };
72
- export type Product = {
73
- availability?: Availability;
71
+ }
72
+ export interface IProduct {
73
+ availability?: IProductAvailability;
74
74
  id: string;
75
75
  img?: string;
76
- items?: Product[];
76
+ items?: IProduct[];
77
77
  kind: EProductKind | EProductKindBucket;
78
78
  literals?: Literals;
79
79
  details?: {
@@ -85,19 +85,36 @@ export type Product = {
85
85
  quantity: string;
86
86
  vat: string;
87
87
  outsideAvailabilitySlot?: boolean;
88
- state?: ProductConfig;
88
+ state?: IProductState;
89
89
  selCtx: string;
90
- filter?: any;
91
- fltCtx?: any;
92
- };
93
- export type ProductConfig = {
94
- selected: any;
95
- filter: any;
96
- };
97
- export interface Category {
90
+ filter?: IProductFilter;
91
+ fltCtx?: string;
92
+ emit?: IProductEmit;
93
+ }
94
+ export interface IProductState {
95
+ selected: IProductStateFilter;
96
+ filter: IProductStateFilter;
97
+ }
98
+ export interface IProductStateFilter {
99
+ [flxCtx: string]: {
100
+ [id: string]: string;
101
+ };
102
+ }
103
+ export interface IProductStateSelected {
104
+ [selCtx: string]: {
105
+ [id: string]: string;
106
+ };
107
+ }
108
+ export interface IProductEmit {
109
+ [id: string]: string;
110
+ }
111
+ export interface ICategory {
98
112
  id: string;
99
113
  name: string;
100
114
  }
115
+ export interface IProductFilter {
116
+ [fltCtx: string]: string[];
117
+ }
101
118
  export interface Extra {
102
119
  [propName: string]: any;
103
120
  }
@@ -185,6 +202,7 @@ export interface OrderCoupon {
185
202
  data?: {
186
203
  campaign?: string;
187
204
  categoryId?: string;
205
+ productId?: string;
188
206
  enableKey?: string;
189
207
  userId?: string;
190
208
  };
@@ -304,7 +322,7 @@ export interface OrderExtra {
304
322
  allergies?: string;
305
323
  "x-agg-id"?: string;
306
324
  "support-order-id"?: string;
307
- 'x-pos-id'?: string;
325
+ "x-pos-id"?: string;
308
326
  }
309
327
  export interface OrderLog {
310
328
  timestamp?: string;
@@ -324,7 +342,7 @@ export interface OrderLine {
324
342
  id: string;
325
343
  price: string;
326
344
  product: OrderProduct;
327
- productConfig: ProductConfig;
345
+ productConfig: IProductState;
328
346
  productId: string;
329
347
  quantity: number;
330
348
  source: string;
@@ -2,6 +2,7 @@ export declare enum EPaymentStatus {
2
2
  UNINITIALIZED = "UNINITIALIZED",
3
3
  PROCESSING = "PROCESSING",
4
4
  PAID = "PAID",
5
+ FAILED = "FAILED",
5
6
  PRINTING_RECEIPT = "PRINTING_RECEIPT",
6
7
  PRINTING_RECEIPT_SUCCESS = "PRINTING_RECEIPT_SUCCESS",
7
8
  SENDING_RECEIPT = "SENDING_RECEIPT",
package/dist/esm/kiosk.js CHANGED
@@ -3,6 +3,7 @@ export var EPaymentStatus;
3
3
  EPaymentStatus["UNINITIALIZED"] = "UNINITIALIZED";
4
4
  EPaymentStatus["PROCESSING"] = "PROCESSING";
5
5
  EPaymentStatus["PAID"] = "PAID";
6
+ EPaymentStatus["FAILED"] = "FAILED";
6
7
  EPaymentStatus["PRINTING_RECEIPT"] = "PRINTING_RECEIPT";
7
8
  EPaymentStatus["PRINTING_RECEIPT_SUCCESS"] = "PRINTING_RECEIPT_SUCCESS";
8
9
  EPaymentStatus["SENDING_RECEIPT"] = "SENDING_RECEIPT";
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
- {
2
- "name": "@orderingstack/ordering-types",
3
- "version": "0.1.8",
4
- "description": "Typescript types for @orderingstack",
5
- "types": "dist/esm/index.d.ts",
6
- "main": "dist/cjs/index.js",
7
- "module": "dist/esm/index.js",
8
- "files": [
9
- "dist/"
10
- ],
11
- "scripts": {
12
- "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
13
- "prepublishOnly": "npm run build"
14
- },
15
- "author": "Tomasz Rojek <tomasz.rojek@e3.pl>",
16
- "devDependencies": {
17
- "typescript": "next"
18
- }
19
- }
1
+ {
2
+ "name": "@orderingstack/ordering-types",
3
+ "version": "1.0.1",
4
+ "description": "Typescript types for @orderingstack",
5
+ "types": "dist/esm/index.d.ts",
6
+ "main": "dist/cjs/index.js",
7
+ "module": "dist/esm/index.js",
8
+ "files": [
9
+ "dist/"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "author": "Tomasz Rojek <tomasz.rojek@e3.pl>",
16
+ "devDependencies": {
17
+ "typescript": "next"
18
+ }
19
+ }