@trusted-solutions/sdit.models 0.57.4-alpha.1 → 0.58.0-alpha.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.
package/models/menu.d.ts CHANGED
@@ -39,6 +39,10 @@ export interface ProductCategory {
39
39
  disabled?: boolean;
40
40
  description?: Language[];
41
41
  }
42
+ export declare enum ProductType {
43
+ combo = "combo",
44
+ single = "single"
45
+ }
42
46
  export interface Product {
43
47
  id?: string;
44
48
  name: string;
@@ -61,6 +65,14 @@ export interface Product {
61
65
  storeTemplateId?: string;
62
66
  description?: Language[];
63
67
  mainStoreProductId?: string;
68
+ /** default: single */
69
+ type?: ProductType;
70
+ /** default: false */
71
+ isComboOnly?: boolean;
72
+ }
73
+ export declare enum AttributeType {
74
+ combo = "combo",
75
+ single = "single"
64
76
  }
65
77
  export interface ProductAttribute {
66
78
  id?: string;
@@ -78,6 +90,14 @@ export interface ProductAttribute {
78
90
  soldOut?: boolean | number | null;
79
91
  disableOnline?: boolean;
80
92
  disableKiosk?: boolean;
93
+ /** default: single */
94
+ type?: AttributeType;
95
+ /** type為combo時,必填 */
96
+ productId?: string;
97
+ }
98
+ export interface ProductProductAttribute {
99
+ productId: string;
100
+ productAttributeId: string;
81
101
  }
82
102
  export interface ProductProductAttribute {
83
103
  productId: string;
@@ -94,6 +114,8 @@ export interface ProductAttributeCategory {
94
114
  multiSelect?: boolean;
95
115
  quantity?: Quantity;
96
116
  storeTemplateId?: string;
117
+ /** default: single */
118
+ type?: AttributeType;
97
119
  }
98
120
  export interface Quantity {
99
121
  maxPermitted?: number;
package/models/menu.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MenuPath = void 0;
3
+ exports.AttributeType = exports.ProductType = exports.MenuPath = void 0;
4
4
  var MenuPath;
5
5
  (function (MenuPath) {
6
6
  MenuPath["kiosk"] = "kiosk";
@@ -9,4 +9,14 @@ var MenuPath;
9
9
  MenuPath["quickClick"] = "quickClick";
10
10
  MenuPath["nidin"] = "nidin";
11
11
  })(MenuPath = exports.MenuPath || (exports.MenuPath = {}));
12
+ var ProductType;
13
+ (function (ProductType) {
14
+ ProductType["combo"] = "combo";
15
+ ProductType["single"] = "single";
16
+ })(ProductType = exports.ProductType || (exports.ProductType = {}));
17
+ var AttributeType;
18
+ (function (AttributeType) {
19
+ AttributeType["combo"] = "combo";
20
+ AttributeType["single"] = "single";
21
+ })(AttributeType = exports.AttributeType || (exports.AttributeType = {}));
12
22
  //# sourceMappingURL=menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/menu.ts"],"names":[],"mappings":";;;AAMA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,6CAAiC,CAAA;IACjC,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/menu.ts"],"names":[],"mappings":";;;AAMA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,6CAAiC,CAAA;IACjC,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAkCD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAgCD,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
package/models/order.d.ts CHANGED
@@ -202,6 +202,11 @@ export interface OrderItem {
202
202
  id?: string;
203
203
  productCategoryId?: string;
204
204
  productId?: string;
205
+ /**
206
+ * 附餐時:自我關聯 id
207
+ * 單品/套餐時:undefined
208
+ */
209
+ parentId?: string;
205
210
  name: string;
206
211
  /** amount of single product */
207
212
  productAmount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.57.4-alpha.1",
3
+ "version": "0.58.0-alpha.1",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "index.js",
6
6
  "scripts": {