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

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
  }
@@ -76,6 +76,7 @@ export interface SOOrder {
76
76
  id?: string;
77
77
  storeId: string;
78
78
  tableId?: string;
79
+ tableName?: string;
79
80
  displayId: string;
80
81
  state: SOOrderState;
81
82
  serveType: ServeType;
@@ -102,6 +103,7 @@ export interface SOOrder {
102
103
  subtotal: number;
103
104
  discount: OrderDiscount;
104
105
  totalDiscountAmount: number;
106
+ deliveryCharge?: number;
105
107
  taxAmount: number;
106
108
  salesAmountExcludeTax: number;
107
109
  exemptTaxSalesAmount: number;
@@ -134,6 +136,10 @@ export interface SOUnavailableCartItem {
134
136
  * 線上品項或Attr Id
135
137
  */
136
138
  menuItemId: string;
139
+ /**
140
+ * 品項名稱
141
+ */
142
+ menuItemName: string;
137
143
  }
138
144
  export declare enum SOUnavailableCartItemReasonCode {
139
145
  soldOut = "soldOut",
@@ -150,6 +156,8 @@ export interface SOValidateCartItem {
150
156
  menuId: string;
151
157
  productCategoryId: string;
152
158
  productId: string;
159
+ /** 商品名稱 */
160
+ productName: string;
153
161
  /** 原單價 */
154
162
  productAmount: number;
155
163
  /** 數量 */
@@ -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,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;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.10",
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",