@orderingstack/ordering-types 1.33.0 → 1.34.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.
@@ -187,8 +187,16 @@ export interface IProductFrontAttributes extends IStringKeyRecord<any> {
187
187
  lineExtra?: IStringKeyRecord<string>;
188
188
  cmsData?: any;
189
189
  }
190
+ export declare const ALLERGENS: readonly ["GLU", "CRU", "EGG", "FSH", "PEA", "SOY", "LAC", "NUT", "CEL", "MUS", "SES", "SO2", "LUP", "MOL"];
191
+ export type AllergenKey = typeof ALLERGENS[number];
192
+ export declare const NUTRIENTS: readonly ["kcal", "fat", "fatSat", "fatTrans", "carbo", "carboSug", "protein", "fiber", "salt"];
193
+ export type NutrientKey = typeof NUTRIENTS[number];
190
194
  export interface IProduct {
191
195
  availability?: IProductAvailability;
196
+ allergensInfo?: {
197
+ contain?: AllergenKey[];
198
+ mayContain?: AllergenKey[];
199
+ };
192
200
  id: string;
193
201
  img?: string;
194
202
  reference?: string;
@@ -204,7 +212,14 @@ export interface IProduct {
204
212
  minPrice?: string;
205
213
  quantity?: string;
206
214
  vat?: string;
215
+ nutritional?: {
216
+ [key in NutrientKey]?: number;
217
+ };
207
218
  outsideAvailabilitySlot?: boolean;
219
+ physicalInfo?: {
220
+ weight?: number;
221
+ volume?: number;
222
+ };
208
223
  state?: IProductState;
209
224
  selCtx: string;
210
225
  filter?: IProductFilter;
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.TEST_VARIANTS = 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.NUTRIENTS = exports.ALLERGENS = 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);
@@ -42,6 +42,20 @@ var EProductKindBucket;
42
42
  EProductKindBucket["GROUP"] = "group";
43
43
  EProductKindBucket["PRODUCT"] = "product";
44
44
  })(EProductKindBucket = exports.EProductKindBucket || (exports.EProductKindBucket = {}));
45
+ exports.ALLERGENS = [
46
+ "GLU", "CRU", "EGG", "FSH", "PEA", "SOY", "LAC", "NUT", "CEL", "MUS", "SES", "SO2", "LUP", "MOL"
47
+ ];
48
+ exports.NUTRIENTS = [
49
+ "kcal",
50
+ "fat",
51
+ "fatSat",
52
+ "fatTrans",
53
+ "carbo",
54
+ "carboSug",
55
+ "protein",
56
+ "fiber",
57
+ "salt"
58
+ ];
45
59
  var EOrderUserRole;
46
60
  (function (EOrderUserRole) {
47
61
  EOrderUserRole["CREATOR"] = "CREATOR";
@@ -187,8 +187,16 @@ export interface IProductFrontAttributes extends IStringKeyRecord<any> {
187
187
  lineExtra?: IStringKeyRecord<string>;
188
188
  cmsData?: any;
189
189
  }
190
+ export declare const ALLERGENS: readonly ["GLU", "CRU", "EGG", "FSH", "PEA", "SOY", "LAC", "NUT", "CEL", "MUS", "SES", "SO2", "LUP", "MOL"];
191
+ export type AllergenKey = typeof ALLERGENS[number];
192
+ export declare const NUTRIENTS: readonly ["kcal", "fat", "fatSat", "fatTrans", "carbo", "carboSug", "protein", "fiber", "salt"];
193
+ export type NutrientKey = typeof NUTRIENTS[number];
190
194
  export interface IProduct {
191
195
  availability?: IProductAvailability;
196
+ allergensInfo?: {
197
+ contain?: AllergenKey[];
198
+ mayContain?: AllergenKey[];
199
+ };
192
200
  id: string;
193
201
  img?: string;
194
202
  reference?: string;
@@ -204,7 +212,14 @@ export interface IProduct {
204
212
  minPrice?: string;
205
213
  quantity?: string;
206
214
  vat?: string;
215
+ nutritional?: {
216
+ [key in NutrientKey]?: number;
217
+ };
207
218
  outsideAvailabilitySlot?: boolean;
219
+ physicalInfo?: {
220
+ weight?: number;
221
+ volume?: number;
222
+ };
208
223
  state?: IProductState;
209
224
  selCtx: string;
210
225
  filter?: IProductFilter;
package/dist/esm/index.js CHANGED
@@ -25,6 +25,20 @@ export var EProductKindBucket;
25
25
  EProductKindBucket["GROUP"] = "group";
26
26
  EProductKindBucket["PRODUCT"] = "product";
27
27
  })(EProductKindBucket || (EProductKindBucket = {}));
28
+ export const ALLERGENS = [
29
+ "GLU", "CRU", "EGG", "FSH", "PEA", "SOY", "LAC", "NUT", "CEL", "MUS", "SES", "SO2", "LUP", "MOL"
30
+ ];
31
+ export const NUTRIENTS = [
32
+ "kcal",
33
+ "fat",
34
+ "fatSat",
35
+ "fatTrans",
36
+ "carbo",
37
+ "carboSug",
38
+ "protein",
39
+ "fiber",
40
+ "salt"
41
+ ];
28
42
  export var EOrderUserRole;
29
43
  (function (EOrderUserRole) {
30
44
  EOrderUserRole["CREATOR"] = "CREATOR";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",