@trusted-solutions/sdit.models 0.28.0-alpha.0 → 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.
- package/lambda/online-ordering.d.ts +14 -5
- package/lambda/request/menu.d.ts +2 -1
- package/models/online-ordering.d.ts +11 -1
- package/models/online-ordering.js.map +1 -1
- package/models/order.d.ts +8 -2
- package/models/store.d.ts +11 -1
- package/models/table.d.ts +1 -0
- package/models/table.js.map +1 -1
- package/package.json +2 -3
|
@@ -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
|
*/
|
|
@@ -196,11 +209,7 @@ export interface SOSendOrderRequest {
|
|
|
196
209
|
*/
|
|
197
210
|
expectedPickupAt?: number;
|
|
198
211
|
/** 外送地址 serveType === deliveryByStore 時有效 */
|
|
199
|
-
deliveryAddress?:
|
|
200
|
-
city: string;
|
|
201
|
-
district: string;
|
|
202
|
-
address: string;
|
|
203
|
-
};
|
|
212
|
+
deliveryAddress?: Address;
|
|
204
213
|
/** 內用桌ID serveType === dineIn 時有效 */
|
|
205
214
|
tableId?: string;
|
|
206
215
|
}
|
package/lambda/request/menu.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaymentServiceProvider, PaymentType, ServeType } from '../enums';
|
|
2
2
|
import { MultiLanguageText, OrderDiscount, Quantity, OOReasonCode } from '../models';
|
|
3
|
-
import { DayOfWeekTimePeriod } from './store';
|
|
3
|
+
import { Address, DayOfWeekTimePeriod } from './store';
|
|
4
4
|
export interface SOOrderError {
|
|
5
5
|
type: SOOrderErrorType;
|
|
6
6
|
/**
|
|
@@ -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;
|
|
@@ -125,6 +127,8 @@ export interface SOOrder {
|
|
|
125
127
|
paidAt?: number;
|
|
126
128
|
/** 訂單被取消或拒絕後,已付款的退款時間 undefined 為未退款 */
|
|
127
129
|
refundedAt?: number;
|
|
130
|
+
/** 外送地址 */
|
|
131
|
+
deliveryAddress?: Address;
|
|
128
132
|
}
|
|
129
133
|
export interface SOUnavailableCartItem {
|
|
130
134
|
menuItemType: 'product' | 'attribute';
|
|
@@ -132,6 +136,10 @@ export interface SOUnavailableCartItem {
|
|
|
132
136
|
* 線上品項或Attr Id
|
|
133
137
|
*/
|
|
134
138
|
menuItemId: string;
|
|
139
|
+
/**
|
|
140
|
+
* 品項名稱
|
|
141
|
+
*/
|
|
142
|
+
menuItemName: string;
|
|
135
143
|
}
|
|
136
144
|
export declare enum SOUnavailableCartItemReasonCode {
|
|
137
145
|
soldOut = "soldOut",
|
|
@@ -148,6 +156,8 @@ export interface SOValidateCartItem {
|
|
|
148
156
|
menuId: string;
|
|
149
157
|
productCategoryId: string;
|
|
150
158
|
productId: string;
|
|
159
|
+
/** 商品名稱 */
|
|
160
|
+
productName: string;
|
|
151
161
|
/** 原單價 */
|
|
152
162
|
productAmount: number;
|
|
153
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;
|
|
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
|
@@ -9,7 +9,7 @@ import { OrderStatus } from '../enums/order-status';
|
|
|
9
9
|
import { DiscountModuleTypeEnum, OrderSourceType, CloseType, OrderItemPaidStatus, OrderItemStatus } from '../enums';
|
|
10
10
|
import { Receipt, Transaction } from './receipt';
|
|
11
11
|
import { Customer } from './customer';
|
|
12
|
-
import { Operator } from './store';
|
|
12
|
+
import { Address, Operator } from './store';
|
|
13
13
|
import { OnlinePlatformType, OOReasonCode, OnlineOrderMappingWarningCode } from './online-integration';
|
|
14
14
|
import { SOEater, SOOperateParty } from './online-ordering';
|
|
15
15
|
import { DiscountMethod } from './discount-module';
|
|
@@ -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
|
-
/**
|
|
97
|
+
/** 外送費 */
|
|
98
|
+
deliveryCharge?: number;
|
|
99
|
+
/** subtotal - sigma(discount.discountReferences.orderItemId === null) + deliveryCharge */
|
|
97
100
|
totalAmount: number;
|
|
98
101
|
salesAmountExcludeTax: number;
|
|
99
102
|
exemptTaxSalesAmount: number;
|
|
@@ -157,6 +160,7 @@ export interface Order extends BaseOrder {
|
|
|
157
160
|
/**
|
|
158
161
|
* 線上訂單。
|
|
159
162
|
* 若消費者要打統編,會記錄在這裡
|
|
163
|
+
* @deprecated 一律記在 `onlineBuyer.buyerId`
|
|
160
164
|
*/
|
|
161
165
|
buyerId?: string;
|
|
162
166
|
/** 線上訂購人 */
|
|
@@ -169,6 +173,8 @@ export interface Order extends BaseOrder {
|
|
|
169
173
|
expectedPickupAt?: number;
|
|
170
174
|
/** 訂單取消方 */
|
|
171
175
|
canceledByParty?: SOOperateParty;
|
|
176
|
+
/** 外送地址 */
|
|
177
|
+
deliveryAddress?: Address;
|
|
172
178
|
/**
|
|
173
179
|
* 線上點餐、UberEats等等外送平台,線上成功收款後的
|
|
174
180
|
* Transaction會暫時存在這個Property,待POS接單後,
|
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;
|
|
@@ -202,7 +212,7 @@ export interface OrderStatusAlert {
|
|
|
202
212
|
export interface Address {
|
|
203
213
|
city: string;
|
|
204
214
|
district: string;
|
|
205
|
-
zipCode
|
|
215
|
+
zipCode?: number;
|
|
206
216
|
address?: string;
|
|
207
217
|
}
|
|
208
218
|
export interface DayOfWeekTimePeriod {
|
package/models/table.d.ts
CHANGED
package/models/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/table.ts"],"names":[],"mappings":";;;
|
|
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.
|
|
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",
|