@trusted-solutions/sdit.models 0.57.4-alpha.0 → 0.58.0-alpha.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.
@@ -194,14 +194,14 @@ export interface SOGetStoreInfoResponse {
194
194
  brand?: any;
195
195
  /** 加入購物車時,是否與相同品相合併 */
196
196
  mergeSameItem?: boolean;
197
- /** 內用服務費 0~100(%) */
197
+ /** 內用服務費 1~100(%) undefined為關閉 */
198
198
  dineInServiceChargePercent?: number;
199
- /** 外帶服務費 0~100(%) */
199
+ /** 外帶服務費 1~100(%) undefined為關閉 */
200
200
  takeoutServiceChargePercent?: number;
201
201
  /**
202
202
  * 服務費計算基準,無值時預設subtotal
203
- * "subtotal": 先折扣再服務費
204
- * "subtotal+discount": 先服務費再折扣。
203
+ * "subtotal": serviceCharge = (subtotal * servicePercent)
204
+ * "subtotal+discount": serviceCharge = ((subtotal+discount) * servicePercent)
205
205
  */
206
206
  serviceBase?: "subtotal" | "subtotal+discount";
207
207
  }
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/models/store.d.ts CHANGED
@@ -227,14 +227,14 @@ export interface Store {
227
227
  brandNo?: string;
228
228
  /** 加入購物車時,是否與相同品相合併 */
229
229
  onlineMergeSameItem?: boolean;
230
- /** 內用服務費 0~100(%) */
230
+ /** 內用服務費 1~100(%) undefined為關閉 */
231
231
  dineInServiceChargePercent?: number;
232
- /** 外帶服務費 0~100(%) */
232
+ /** 外帶服務費 1~100(%) undefined為關閉 */
233
233
  takeoutServiceChargePercent?: number;
234
234
  /**
235
235
  * 服務費計算基準,無值時預設subtotal
236
- * "subtotal": 先折扣再服務費
237
- * "subtotal+discount": 先服務費再折扣。
236
+ * "subtotal": serviceCharge = (subtotal * servicePercent)
237
+ * "subtotal+discount": serviceCharge = ((subtotal+discount) * servicePercent)
238
238
  */
239
239
  serviceBase?: "subtotal" | "subtotal+discount";
240
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.57.4-alpha.0",
3
+ "version": "0.58.0-alpha.0",
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": {