@trusted-solutions/sdit.models 0.28.0-alpha.1 → 0.28.0-alpha.11

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.
@@ -108,6 +108,14 @@ export interface SOGetStoreInfoResponse {
108
108
  * @Default false
109
109
  */
110
110
  storeDeliveryEnabled: boolean;
111
+ /**
112
+ * 外送費 @Default 0
113
+ */
114
+ storeDeliveryCharge: number;
115
+ /**
116
+ * 免外送費門檻 @Default 0
117
+ */
118
+ storeDeliveryFreeThresholdAmount: number;
111
119
  /**
112
120
  * 內用桌ID
113
121
  */
@@ -144,6 +152,7 @@ export interface SOGetStoreMenuResponse {
144
152
  export interface SOValidateMutationRequest {
145
153
  storeId: string;
146
154
  traceId: string;
155
+ serveType: ServeType;
147
156
  /**
148
157
  * 預計取餐時間 timestamp ms
149
158
  * 不給值 = 盡快
@@ -169,6 +178,10 @@ export interface SOValidateMutationResponse {
169
178
  * 總折扣金額
170
179
  */
171
180
  totalDiscountAmount: number;
181
+ /**
182
+ * 外送費
183
+ */
184
+ deliveryCharge?: number;
172
185
  /**
173
186
  * 結帳金額
174
187
  */
@@ -1,4 +1,4 @@
1
- import { ProductCategory, Product, ProductAttributeCategory, ProductAttribute, ReorderConfig, ProductProductAttribute } from "./../../models";
1
+ import { ProductCategory, Product, ProductAttributeCategory, ProductAttribute, ReorderConfig, ProductProductAttribute, Table } from "./../../models";
2
2
  import { BlockVersion } from "../../enums/block-storage";
3
3
  import { AttributeIdsInProduct } from "../../models/array-mutations";
4
4
  import { CursorPaginationEnabled, Filterable } from './common';
@@ -85,4 +85,5 @@ export interface OverwriteMenuRequest extends StoreTemplateItemRequest {
85
85
  productCategories: ProductCategory[];
86
86
  productAttributeCategories: ProductAttributeCategory[];
87
87
  productProductAttributeRelations: ProductProductAttribute[];
88
+ tables?: Table[];
88
89
  }
@@ -20,7 +20,13 @@ export declare enum SOOrderErrorType {
20
20
  /** 不開放點餐 */
21
21
  storeNotOpening = "storeNotOpening",
22
22
  /** 未啟用線上點餐功能 */
23
- storeNotEnabled = "storeNotEnabled"
23
+ storeNotEnabled = "storeNotEnabled",
24
+ /** 未啟用外送 */
25
+ deliveryNotEnabled = "deliveryNotEnabled",
26
+ /** 未啟用預訂 */
27
+ reserveNotEnabled = "reserveNotEnabled",
28
+ /** 預訂時間不允許 */
29
+ reserveNotAllowed = "reserveNotAllowed"
24
30
  }
25
31
  export interface SOPaymentMethod {
26
32
  paymentServiceProvider: PaymentServiceProvider;
@@ -76,6 +82,7 @@ export interface SOOrder {
76
82
  id?: string;
77
83
  storeId: string;
78
84
  tableId?: string;
85
+ tableName?: string;
79
86
  displayId: string;
80
87
  state: SOOrderState;
81
88
  serveType: ServeType;
@@ -102,6 +109,7 @@ export interface SOOrder {
102
109
  subtotal: number;
103
110
  discount: OrderDiscount;
104
111
  totalDiscountAmount: number;
112
+ deliveryCharge?: number;
105
113
  taxAmount: number;
106
114
  salesAmountExcludeTax: number;
107
115
  exemptTaxSalesAmount: number;
@@ -134,6 +142,10 @@ export interface SOUnavailableCartItem {
134
142
  * 線上品項或Attr Id
135
143
  */
136
144
  menuItemId: string;
145
+ /**
146
+ * 品項名稱
147
+ */
148
+ menuItemName: string;
137
149
  }
138
150
  export declare enum SOUnavailableCartItemReasonCode {
139
151
  soldOut = "soldOut",
@@ -150,6 +162,8 @@ export interface SOValidateCartItem {
150
162
  menuId: string;
151
163
  productCategoryId: string;
152
164
  productId: string;
165
+ /** 商品名稱 */
166
+ productName: string;
153
167
  /** 原單價 */
154
168
  productAmount: number;
155
169
  /** 數量 */
@@ -15,6 +15,12 @@ var SOOrderErrorType;
15
15
  SOOrderErrorType["storeNotOpening"] = "storeNotOpening";
16
16
  /** 未啟用線上點餐功能 */
17
17
  SOOrderErrorType["storeNotEnabled"] = "storeNotEnabled";
18
+ /** 未啟用外送 */
19
+ SOOrderErrorType["deliveryNotEnabled"] = "deliveryNotEnabled";
20
+ /** 未啟用預訂 */
21
+ SOOrderErrorType["reserveNotEnabled"] = "reserveNotEnabled";
22
+ /** 預訂時間不允許 */
23
+ SOOrderErrorType["reserveNotAllowed"] = "reserveNotAllowed";
18
24
  })(SOOrderErrorType = exports.SOOrderErrorType || (exports.SOOrderErrorType = {}));
19
25
  var SOOperateParty;
20
26
  (function (SOOperateParty) {
@@ -1 +1 @@
1
- {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;AACrC,CAAC,EAbW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAa3B;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAuFD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AA8BD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
1
+ {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAmBX;AAnBD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;IACnC,YAAY;IACZ,6DAAyC,CAAA;IACzC,YAAY;IACZ,2DAAuC,CAAA;IACvC,cAAc;IACd,2DAAuC,CAAA;AACzC,CAAC,EAnBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAmB3B;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AA8FD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AAgCD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
package/models/order.d.ts CHANGED
@@ -58,6 +58,7 @@ export interface BaseOrder {
58
58
  /**
59
59
  * 線上訂單。
60
60
  * 若消費者要打統編,會記錄在這裡
61
+ * @deprecated 一律記在 `onlineBuyer.buyerId`
61
62
  */
62
63
  buyerId?: string;
63
64
  /** 線上訂購人 */
@@ -93,7 +94,9 @@ export interface Order extends BaseOrder {
93
94
  items: OrderItem[];
94
95
  /** sigma(items.amount) */
95
96
  subtotal: number;
96
- /** subtotal - sigma(discount.discountReferences.orderItemId === null) */
97
+ /** 外送費 */
98
+ deliveryCharge?: number;
99
+ /** subtotal - sigma(discount.discountReferences.orderItemId === null) + deliveryCharge */
97
100
  totalAmount: number;
98
101
  salesAmountExcludeTax: number;
99
102
  exemptTaxSalesAmount: number;
@@ -155,17 +158,11 @@ export interface Order extends BaseOrder {
155
158
  message: string;
156
159
  }[];
157
160
  /**
158
- * 線上訂單。若消費者要打統編,會記錄在這裡
161
+ * 線上訂單。
162
+ * 若消費者要打統編,會記錄在這裡
163
+ * @deprecated 一律記在 `onlineBuyer.buyerId`
159
164
  */
160
165
  buyerId?: string;
161
- /**
162
- * 線上訂單。若消費者要載具,會記錄在這裡
163
- */
164
- mobileCarrierId?: string;
165
- /**
166
- * 線上訂單。若消費者要捐贈,會記錄在這裡
167
- */
168
- loveCode?: string;
169
166
  /** 線上訂購人 */
170
167
  onlineBuyer?: SOEater;
171
168
  /** 線上團購所有人 */
package/models/store.d.ts CHANGED
@@ -159,6 +159,16 @@ export interface Store {
159
159
  * 線上點餐預計等待時間(分)
160
160
  */
161
161
  onlineEstimatedReadyForPickupTime?: number;
162
+ /** 線上點餐開放預訂 */
163
+ onlineReserveEnabled?: boolean;
164
+ /** 線上點餐開放預訂天數 */
165
+ onlineAvailableReservedDays?: number;
166
+ /** 線上點餐開放外送 */
167
+ onlineStoreDeliveryEnabled?: boolean;
168
+ /** 線上點餐外送費 */
169
+ onlineStoreDeliveryCharge?: number;
170
+ /** 線上點餐免外送費訂單金額門檻 */
171
+ onlineStoreDeliveryFreeThresholdAmount?: number;
162
172
  }
163
173
  export interface SimpleStore {
164
174
  id: string;
package/models/table.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface MapTable extends BaseTable {
17
17
  x: number;
18
18
  y: number;
19
19
  capacity?: number;
20
+ sort?: number;
20
21
  }
21
22
  export declare enum ServeInputType {
22
23
  AnyString = "AnyString",
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/table.ts"],"names":[],"mappings":";;;AAyBA,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,+BAAa,CAAA;AACjB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB"}
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/table.ts"],"names":[],"mappings":";;;AA0BA,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,+BAAa,CAAA;AACjB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.28.0-alpha.1",
3
+ "version": "0.28.0-alpha.11",
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": {
@@ -15,8 +15,7 @@
15
15
  "license": "ISC",
16
16
  "peerDependencies": {
17
17
  "moment": "^2.29.1",
18
- "tslib": "^2.0.0",
19
- "uuid": "^8.3.1"
18
+ "tslib": "^2.0.0"
20
19
  },
21
20
  "devDependencies": {
22
21
  "@rollup/plugin-node-resolve": "^11.2.1",