@orderingstack/ordering-types 1.24.1 → 1.25.0-beta.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 +61 -3
- package/dist/esm/index.d.ts +61 -3
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -66,6 +66,10 @@ export type TMedia = {
|
|
|
66
66
|
url: string;
|
|
67
67
|
name: string;
|
|
68
68
|
};
|
|
69
|
+
type TDetails = {
|
|
70
|
+
literals?: TLiterals;
|
|
71
|
+
media?: TMedia[];
|
|
72
|
+
};
|
|
69
73
|
export interface IProductAvailability {
|
|
70
74
|
MON?: string[];
|
|
71
75
|
TUE?: string[];
|
|
@@ -115,6 +119,60 @@ export interface IProductExtra extends IStringKeyRecord<string | undefined> {
|
|
|
115
119
|
*/
|
|
116
120
|
"row-start"?: string;
|
|
117
121
|
}
|
|
122
|
+
interface IMenuItem {
|
|
123
|
+
id: string;
|
|
124
|
+
_?: IProductExtra;
|
|
125
|
+
kind: EProductKind | EProductKindBucket;
|
|
126
|
+
details?: TDetails;
|
|
127
|
+
state?: IProductState;
|
|
128
|
+
emit?: IProductEmit;
|
|
129
|
+
items?: IMenuProduct[];
|
|
130
|
+
price?: string;
|
|
131
|
+
vat?: string;
|
|
132
|
+
minPrice?: string;
|
|
133
|
+
selCtx?: string;
|
|
134
|
+
fltCtx?: string;
|
|
135
|
+
weighted?: boolean;
|
|
136
|
+
qtyMin?: string;
|
|
137
|
+
qtyMax?: string;
|
|
138
|
+
availability?: IProductAvailability;
|
|
139
|
+
bom?: IStringKeyRecord<{
|
|
140
|
+
unit: string;
|
|
141
|
+
qty: string;
|
|
142
|
+
}>;
|
|
143
|
+
outsideAvailabilitySlot?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface ICmsReference extends Pick<IMenuItem, "id" | "_"> {
|
|
146
|
+
kind: EProductKind.CMS;
|
|
147
|
+
reference: string;
|
|
148
|
+
}
|
|
149
|
+
export interface IStatic extends Pick<IMenuItem, "id" | "kind" | "_"> {
|
|
150
|
+
kind: EProductKind.STATIC;
|
|
151
|
+
details: TDetails;
|
|
152
|
+
}
|
|
153
|
+
export interface IGroupConfig extends IMenuItem {
|
|
154
|
+
kind: EProductKind.CONFIG;
|
|
155
|
+
details?: TDetails;
|
|
156
|
+
selCtx?: string;
|
|
157
|
+
fltCtx?: string;
|
|
158
|
+
attrs?: IGroupAttributes;
|
|
159
|
+
filter?: IProductFilter;
|
|
160
|
+
}
|
|
161
|
+
export interface IGroupOptions extends IMenuItem {
|
|
162
|
+
kind: EProductKind.OPTIONS;
|
|
163
|
+
details?: TDetails;
|
|
164
|
+
selCtx?: string;
|
|
165
|
+
fltCtx?: string;
|
|
166
|
+
attrs?: IGroupAttributes;
|
|
167
|
+
filter?: IProductFilter;
|
|
168
|
+
}
|
|
169
|
+
export interface IMenuCategory extends Pick<IMenuItem, "id" | "kind" | "_" | "details"> {
|
|
170
|
+
kind: EProductKind.CATEGORY;
|
|
171
|
+
}
|
|
172
|
+
export interface IMenuProduct extends IMenuItem {
|
|
173
|
+
kind: EProductKind.PRODUCT;
|
|
174
|
+
}
|
|
175
|
+
export type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
|
|
118
176
|
/**
|
|
119
177
|
* IProductFrontAttributes
|
|
120
178
|
*
|
|
@@ -130,7 +188,7 @@ export interface IProduct {
|
|
|
130
188
|
availability?: IProductAvailability;
|
|
131
189
|
id: string;
|
|
132
190
|
img?: string;
|
|
133
|
-
|
|
191
|
+
reference?: string;
|
|
134
192
|
items?: IProduct[];
|
|
135
193
|
kind: EProductKind | EProductKindBucket;
|
|
136
194
|
literals?: TLiterals;
|
|
@@ -354,8 +412,8 @@ export interface IOrderPayment {
|
|
|
354
412
|
id: string;
|
|
355
413
|
type: EOrderPaymentType;
|
|
356
414
|
source: string;
|
|
357
|
-
amount: number;
|
|
358
|
-
initialAmount?: number;
|
|
415
|
+
amount: number | string;
|
|
416
|
+
initialAmount?: number | string;
|
|
359
417
|
user: string;
|
|
360
418
|
timestamp?: string;
|
|
361
419
|
extra?: IStringKeyRecord<string>;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -66,6 +66,10 @@ export type TMedia = {
|
|
|
66
66
|
url: string;
|
|
67
67
|
name: string;
|
|
68
68
|
};
|
|
69
|
+
type TDetails = {
|
|
70
|
+
literals?: TLiterals;
|
|
71
|
+
media?: TMedia[];
|
|
72
|
+
};
|
|
69
73
|
export interface IProductAvailability {
|
|
70
74
|
MON?: string[];
|
|
71
75
|
TUE?: string[];
|
|
@@ -115,6 +119,60 @@ export interface IProductExtra extends IStringKeyRecord<string | undefined> {
|
|
|
115
119
|
*/
|
|
116
120
|
"row-start"?: string;
|
|
117
121
|
}
|
|
122
|
+
interface IMenuItem {
|
|
123
|
+
id: string;
|
|
124
|
+
_?: IProductExtra;
|
|
125
|
+
kind: EProductKind | EProductKindBucket;
|
|
126
|
+
details?: TDetails;
|
|
127
|
+
state?: IProductState;
|
|
128
|
+
emit?: IProductEmit;
|
|
129
|
+
items?: IMenuProduct[];
|
|
130
|
+
price?: string;
|
|
131
|
+
vat?: string;
|
|
132
|
+
minPrice?: string;
|
|
133
|
+
selCtx?: string;
|
|
134
|
+
fltCtx?: string;
|
|
135
|
+
weighted?: boolean;
|
|
136
|
+
qtyMin?: string;
|
|
137
|
+
qtyMax?: string;
|
|
138
|
+
availability?: IProductAvailability;
|
|
139
|
+
bom?: IStringKeyRecord<{
|
|
140
|
+
unit: string;
|
|
141
|
+
qty: string;
|
|
142
|
+
}>;
|
|
143
|
+
outsideAvailabilitySlot?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface ICmsReference extends Pick<IMenuItem, "id" | "_"> {
|
|
146
|
+
kind: EProductKind.CMS;
|
|
147
|
+
reference: string;
|
|
148
|
+
}
|
|
149
|
+
export interface IStatic extends Pick<IMenuItem, "id" | "kind" | "_"> {
|
|
150
|
+
kind: EProductKind.STATIC;
|
|
151
|
+
details: TDetails;
|
|
152
|
+
}
|
|
153
|
+
export interface IGroupConfig extends IMenuItem {
|
|
154
|
+
kind: EProductKind.CONFIG;
|
|
155
|
+
details?: TDetails;
|
|
156
|
+
selCtx?: string;
|
|
157
|
+
fltCtx?: string;
|
|
158
|
+
attrs?: IGroupAttributes;
|
|
159
|
+
filter?: IProductFilter;
|
|
160
|
+
}
|
|
161
|
+
export interface IGroupOptions extends IMenuItem {
|
|
162
|
+
kind: EProductKind.OPTIONS;
|
|
163
|
+
details?: TDetails;
|
|
164
|
+
selCtx?: string;
|
|
165
|
+
fltCtx?: string;
|
|
166
|
+
attrs?: IGroupAttributes;
|
|
167
|
+
filter?: IProductFilter;
|
|
168
|
+
}
|
|
169
|
+
export interface IMenuCategory extends Pick<IMenuItem, "id" | "kind" | "_" | "details"> {
|
|
170
|
+
kind: EProductKind.CATEGORY;
|
|
171
|
+
}
|
|
172
|
+
export interface IMenuProduct extends IMenuItem {
|
|
173
|
+
kind: EProductKind.PRODUCT;
|
|
174
|
+
}
|
|
175
|
+
export type MenuProduct = IMenuCategory | ICmsReference | IStatic | IGroupConfig | IGroupOptions | IMenuProduct;
|
|
118
176
|
/**
|
|
119
177
|
* IProductFrontAttributes
|
|
120
178
|
*
|
|
@@ -130,7 +188,7 @@ export interface IProduct {
|
|
|
130
188
|
availability?: IProductAvailability;
|
|
131
189
|
id: string;
|
|
132
190
|
img?: string;
|
|
133
|
-
|
|
191
|
+
reference?: string;
|
|
134
192
|
items?: IProduct[];
|
|
135
193
|
kind: EProductKind | EProductKindBucket;
|
|
136
194
|
literals?: TLiterals;
|
|
@@ -354,8 +412,8 @@ export interface IOrderPayment {
|
|
|
354
412
|
id: string;
|
|
355
413
|
type: EOrderPaymentType;
|
|
356
414
|
source: string;
|
|
357
|
-
amount: number;
|
|
358
|
-
initialAmount?: number;
|
|
415
|
+
amount: number | string;
|
|
416
|
+
initialAmount?: number | string;
|
|
359
417
|
user: string;
|
|
360
418
|
timestamp?: string;
|
|
361
419
|
extra?: IStringKeyRecord<string>;
|