@orderingstack/ordering-types 0.0.3 → 0.1.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.
@@ -24,7 +24,7 @@ export interface Coupon {
24
24
  id: string;
25
25
  img: string;
26
26
  viewType?: CouponViewType;
27
- size?: 'md' | 'lg';
27
+ size?: "md" | "lg";
28
28
  price?: number;
29
29
  name?: string;
30
30
  endDate?: string;
@@ -35,7 +35,7 @@ export interface Language {
35
35
  key: string;
36
36
  icon: any;
37
37
  }
38
- export declare type StringBoolean = 'true' | 'false';
38
+ export type StringBoolean = "true" | "false";
39
39
  export declare enum EProductKind {
40
40
  GROUP = "3e/group",
41
41
  PRODUCT = "3e/product",
@@ -50,16 +50,17 @@ export declare enum EProductKindBucket {
50
50
  GROUP = "group",
51
51
  PRODUCT = "product"
52
52
  }
53
- export declare type Literals = {
53
+ export type Literals = {
54
+ description?: string;
54
55
  name: string;
55
56
  fiscal?: string;
56
57
  "target-product-id"?: string;
57
58
  };
58
- export declare type Media = {
59
+ export type Media = {
59
60
  url: string;
60
61
  name: string;
61
62
  };
62
- export declare type Availability = {
63
+ export type Availability = {
63
64
  MON?: [string, string];
64
65
  TUE?: [string, string];
65
66
  WED?: [string, string];
@@ -68,28 +69,27 @@ export declare type Availability = {
68
69
  SAT?: [string, string];
69
70
  SUN?: [string, string];
70
71
  };
71
- export declare type Product = {
72
+ export type Product = {
72
73
  availability?: Availability;
74
+ details?: {
75
+ literals?: Literals;
76
+ media?: Media[];
77
+ };
78
+ filter?: any;
79
+ fltCtx?: any;
73
80
  id: string;
74
81
  img?: string;
75
82
  items?: Product[];
76
83
  kind: EProductKind | EProductKindBucket;
77
84
  literals?: Literals;
78
- details?: {
79
- literals?: Literals;
80
- media?: Media[];
81
- };
82
85
  price: string;
83
86
  minPrice?: string;
84
87
  quantity: string;
85
88
  vat: string;
86
- outsideAvailabilitySlot?: boolean;
87
89
  state?: ProductConfig;
88
90
  selCtx: string;
89
- filter?: any;
90
- fltCtx?: any;
91
91
  };
92
- export declare type ProductConfig = {
92
+ export type ProductConfig = {
93
93
  selected: any;
94
94
  filter: any;
95
95
  };
@@ -97,3 +97,41 @@ export interface Category {
97
97
  id: string;
98
98
  name: string;
99
99
  }
100
+ export interface SaleChannel {
101
+ active?: boolean;
102
+ minDeliveryTime?: string;
103
+ minOrderValue?: string;
104
+ week?: Availability;
105
+ }
106
+ declare enum EChannelName {
107
+ DINE_IN = "DINE_IN",
108
+ TAKE_AWAY = "TAKE_AWAY",
109
+ DELIVERY = "DELIVERY",
110
+ GLOVO_DELIVERY = "GLOVO_DELIVERY",
111
+ JUSTEAT_DELIVERY = "JUSTEAT_DELIVERY",
112
+ UBER_DELIVERY = "UBER_DELIVERY",
113
+ BOLT_DELIVERY = "BOLT_DELIVERY",
114
+ WOLT_DELIVERY = "WOLT_DELIVERY"
115
+ }
116
+ export interface VenueConfig {
117
+ active: boolean;
118
+ address: {
119
+ city: string;
120
+ country: string;
121
+ number: string;
122
+ postal: string;
123
+ street: string;
124
+ };
125
+ channelConstraints: Partial<Record<EChannelName, SaleChannel>>;
126
+ device: Record<string, Record<string, string>>;
127
+ extra: Record<string, string>;
128
+ geoPosition: GeoPosition;
129
+ id: string;
130
+ menu: string;
131
+ name: string;
132
+ sync: boolean;
133
+ tempDisabled: boolean;
134
+ timeZone: string;
135
+ warehouse: string;
136
+ }
137
+ export {};
package/dist/cjs/index.js CHANGED
@@ -23,3 +23,21 @@ var EProductKindBucket;
23
23
  EProductKindBucket["GROUP"] = "group";
24
24
  EProductKindBucket["PRODUCT"] = "product";
25
25
  })(EProductKindBucket = exports.EProductKindBucket || (exports.EProductKindBucket = {}));
26
+ var EChannelName;
27
+ (function (EChannelName) {
28
+ EChannelName["DINE_IN"] = "DINE_IN";
29
+ EChannelName["TAKE_AWAY"] = "TAKE_AWAY";
30
+ EChannelName["DELIVERY"] = "DELIVERY";
31
+ EChannelName["GLOVO_DELIVERY"] = "GLOVO_DELIVERY";
32
+ // GLOVO_TAKE_AWAY = "GLOVO_TAKE_AWAY",
33
+ EChannelName["JUSTEAT_DELIVERY"] = "JUSTEAT_DELIVERY";
34
+ // JUSTEAT_TAKE_AWAY = "JUSTEAT_TAKE_AWAY",
35
+ EChannelName["UBER_DELIVERY"] = "UBER_DELIVERY";
36
+ // UBER_TAKE_AWAY = "UBER_TAKE_AWAY",
37
+ // UBER_DINE_IN = "UBER_DINE_IN",
38
+ EChannelName["BOLT_DELIVERY"] = "BOLT_DELIVERY";
39
+ // BOLT_TAKE_AWAY = "BOLT_TAKE_AWAY",
40
+ EChannelName["WOLT_DELIVERY"] = "WOLT_DELIVERY";
41
+ // WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
42
+ // WOLT_DINE_IN = "WOLT_DINE_IN"
43
+ })(EChannelName || (EChannelName = {}));
@@ -24,7 +24,7 @@ export interface Coupon {
24
24
  id: string;
25
25
  img: string;
26
26
  viewType?: CouponViewType;
27
- size?: 'md' | 'lg';
27
+ size?: "md" | "lg";
28
28
  price?: number;
29
29
  name?: string;
30
30
  endDate?: string;
@@ -35,7 +35,7 @@ export interface Language {
35
35
  key: string;
36
36
  icon: any;
37
37
  }
38
- export declare type StringBoolean = 'true' | 'false';
38
+ export type StringBoolean = "true" | "false";
39
39
  export declare enum EProductKind {
40
40
  GROUP = "3e/group",
41
41
  PRODUCT = "3e/product",
@@ -50,16 +50,17 @@ export declare enum EProductKindBucket {
50
50
  GROUP = "group",
51
51
  PRODUCT = "product"
52
52
  }
53
- export declare type Literals = {
53
+ export type Literals = {
54
+ description?: string;
54
55
  name: string;
55
56
  fiscal?: string;
56
57
  "target-product-id"?: string;
57
58
  };
58
- export declare type Media = {
59
+ export type Media = {
59
60
  url: string;
60
61
  name: string;
61
62
  };
62
- export declare type Availability = {
63
+ export type Availability = {
63
64
  MON?: [string, string];
64
65
  TUE?: [string, string];
65
66
  WED?: [string, string];
@@ -68,28 +69,27 @@ export declare type Availability = {
68
69
  SAT?: [string, string];
69
70
  SUN?: [string, string];
70
71
  };
71
- export declare type Product = {
72
+ export type Product = {
72
73
  availability?: Availability;
74
+ details?: {
75
+ literals?: Literals;
76
+ media?: Media[];
77
+ };
78
+ filter?: any;
79
+ fltCtx?: any;
73
80
  id: string;
74
81
  img?: string;
75
82
  items?: Product[];
76
83
  kind: EProductKind | EProductKindBucket;
77
84
  literals?: Literals;
78
- details?: {
79
- literals?: Literals;
80
- media?: Media[];
81
- };
82
85
  price: string;
83
86
  minPrice?: string;
84
87
  quantity: string;
85
88
  vat: string;
86
- outsideAvailabilitySlot?: boolean;
87
89
  state?: ProductConfig;
88
90
  selCtx: string;
89
- filter?: any;
90
- fltCtx?: any;
91
91
  };
92
- export declare type ProductConfig = {
92
+ export type ProductConfig = {
93
93
  selected: any;
94
94
  filter: any;
95
95
  };
@@ -97,3 +97,41 @@ export interface Category {
97
97
  id: string;
98
98
  name: string;
99
99
  }
100
+ export interface SaleChannel {
101
+ active?: boolean;
102
+ minDeliveryTime?: string;
103
+ minOrderValue?: string;
104
+ week?: Availability;
105
+ }
106
+ declare enum EChannelName {
107
+ DINE_IN = "DINE_IN",
108
+ TAKE_AWAY = "TAKE_AWAY",
109
+ DELIVERY = "DELIVERY",
110
+ GLOVO_DELIVERY = "GLOVO_DELIVERY",
111
+ JUSTEAT_DELIVERY = "JUSTEAT_DELIVERY",
112
+ UBER_DELIVERY = "UBER_DELIVERY",
113
+ BOLT_DELIVERY = "BOLT_DELIVERY",
114
+ WOLT_DELIVERY = "WOLT_DELIVERY"
115
+ }
116
+ export interface VenueConfig {
117
+ active: boolean;
118
+ address: {
119
+ city: string;
120
+ country: string;
121
+ number: string;
122
+ postal: string;
123
+ street: string;
124
+ };
125
+ channelConstraints: Partial<Record<EChannelName, SaleChannel>>;
126
+ device: Record<string, Record<string, string>>;
127
+ extra: Record<string, string>;
128
+ geoPosition: GeoPosition;
129
+ id: string;
130
+ menu: string;
131
+ name: string;
132
+ sync: boolean;
133
+ tempDisabled: boolean;
134
+ timeZone: string;
135
+ warehouse: string;
136
+ }
137
+ export {};
package/dist/esm/index.js CHANGED
@@ -20,3 +20,21 @@ export var EProductKindBucket;
20
20
  EProductKindBucket["GROUP"] = "group";
21
21
  EProductKindBucket["PRODUCT"] = "product";
22
22
  })(EProductKindBucket || (EProductKindBucket = {}));
23
+ var EChannelName;
24
+ (function (EChannelName) {
25
+ EChannelName["DINE_IN"] = "DINE_IN";
26
+ EChannelName["TAKE_AWAY"] = "TAKE_AWAY";
27
+ EChannelName["DELIVERY"] = "DELIVERY";
28
+ EChannelName["GLOVO_DELIVERY"] = "GLOVO_DELIVERY";
29
+ // GLOVO_TAKE_AWAY = "GLOVO_TAKE_AWAY",
30
+ EChannelName["JUSTEAT_DELIVERY"] = "JUSTEAT_DELIVERY";
31
+ // JUSTEAT_TAKE_AWAY = "JUSTEAT_TAKE_AWAY",
32
+ EChannelName["UBER_DELIVERY"] = "UBER_DELIVERY";
33
+ // UBER_TAKE_AWAY = "UBER_TAKE_AWAY",
34
+ // UBER_DINE_IN = "UBER_DINE_IN",
35
+ EChannelName["BOLT_DELIVERY"] = "BOLT_DELIVERY";
36
+ // BOLT_TAKE_AWAY = "BOLT_TAKE_AWAY",
37
+ EChannelName["WOLT_DELIVERY"] = "WOLT_DELIVERY";
38
+ // WOLT_TAKE_AWAY = "WOLT_TAKE_AWAY",
39
+ // WOLT_DINE_IN = "WOLT_DINE_IN"
40
+ })(EChannelName || (EChannelName = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",