@trusted-solutions/sdit.models 0.15.0-alpha.0 → 0.16.0-alpha.2
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/enums/order-status.d.ts +1 -1
- package/enums/order-status.js +1 -1
- package/enums/payment-service-provider.d.ts +2 -1
- package/enums/payment-service-provider.js +1 -0
- package/enums/payment-service-provider.js.map +1 -1
- package/lambda/online-ordering.d.ts +12 -1
- package/lambda/request/closing.d.ts +5 -4
- package/models/online-ordering.d.ts +2 -2
- package/models/online-ordering.js.map +1 -1
- package/models/order.d.ts +29 -20
- package/models/payment-config.d.ts +1 -0
- package/models/receipt.d.ts +3 -1
- package/models/store.d.ts +1 -1
- package/package.json +1 -1
package/enums/order-status.d.ts
CHANGED
package/enums/order-status.js
CHANGED
|
@@ -28,5 +28,6 @@ var PaymentServiceProvider;
|
|
|
28
28
|
/** MyPay PayPage 線上金流 */
|
|
29
29
|
PaymentServiceProvider["MyPayPayPage"] = "MyPayPayPage";
|
|
30
30
|
PaymentServiceProvider["none"] = "none";
|
|
31
|
+
PaymentServiceProvider["mix"] = "mix";
|
|
31
32
|
})(PaymentServiceProvider = exports.PaymentServiceProvider || (exports.PaymentServiceProvider = {}));
|
|
32
33
|
//# sourceMappingURL=payment-service-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-service-provider.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/payment-service-provider.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"payment-service-provider.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/payment-service-provider.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBA8BX;AA9BD,WAAY,sBAAsB;IAChC,YAAY;IACZ,+CAAqB,CAAA;IACrB,gBAAgB;IAChB,2CAAiB,CAAA;IACjB,eAAe;IACf,2CAAiB,CAAA;IACjB,eAAe;IACf,6CAAmB,CAAA;IACnB,aAAa;IACb,+CAAqB,CAAA;IACrB,WAAW;IACX,6CAAmB,CAAA;IACnB,wBAAwB;IACxB,qEAA2C,CAAA;IAC3C,oBAAoB;IACpB,uEAA6C,CAAA;IAE7C,oBAAoB;IACpB,6CAAmB,CAAA;IACnB,uBAAuB;IACvB,+CAAqB,CAAA;IACrB,kCAAkC;IAClC,iDAAuB,CAAA;IAEvB,yBAAyB;IACzB,uDAA6B,CAAA;IAE7B,uCAAa,CAAA;IACb,qCAAW,CAAA;AACb,CAAC,EA9BW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QA8BjC"}
|
|
@@ -145,7 +145,7 @@ export interface SOSendOrderRequest {
|
|
|
145
145
|
serveType: ServeType;
|
|
146
146
|
eater: SOEater;
|
|
147
147
|
cart: SOValidateCart;
|
|
148
|
-
|
|
148
|
+
isOnSitePayment: boolean;
|
|
149
149
|
/**
|
|
150
150
|
* 包裝、免洗餐具
|
|
151
151
|
*/
|
|
@@ -165,6 +165,17 @@ export interface SOSendOrderResponse {
|
|
|
165
165
|
state: SOOrderState;
|
|
166
166
|
/** 消費者識別用 id的末五碼 == Order.serialNumber */
|
|
167
167
|
displayId: string;
|
|
168
|
+
isOnSitePayment: boolean;
|
|
169
|
+
}
|
|
170
|
+
/*******************************/
|
|
171
|
+
/*******************************/
|
|
172
|
+
export interface SOGetPaymentUrlRequest {
|
|
173
|
+
storeId: string;
|
|
174
|
+
/** online Order Id */
|
|
175
|
+
id: string;
|
|
176
|
+
}
|
|
177
|
+
export interface SOGetPaymentUrlResponse {
|
|
178
|
+
payUrl: string;
|
|
168
179
|
}
|
|
169
180
|
/*******************************/
|
|
170
181
|
/*******************************/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PaymentServiceProvider, PaymentType, ReceiptStatusType, CloseType } from
|
|
2
|
-
import { CursorPaginationEnabled, Filterable, QueryOptions } from
|
|
3
|
-
import { ClosingSalesProductDetail, Expenditure, Operator, Order } from
|
|
4
|
-
import { SummarizeClosingResponse } from
|
|
1
|
+
import { PaymentServiceProvider, PaymentType, ReceiptStatusType, CloseType } from '../../enums';
|
|
2
|
+
import { CursorPaginationEnabled, Filterable, QueryOptions } from './common';
|
|
3
|
+
import { ClosingSalesProductDetail, Expenditure, Operator, Order, Transaction } from '../../models';
|
|
4
|
+
import { SummarizeClosingResponse } from '../response';
|
|
5
5
|
export interface AggregateShiftClosingRequest {
|
|
6
6
|
storeId: string;
|
|
7
7
|
accountId: string;
|
|
@@ -10,6 +10,7 @@ export interface AggregateShiftClosingRequest {
|
|
|
10
10
|
paymentServiceProvider: PaymentServiceProvider;
|
|
11
11
|
paymentType: PaymentType;
|
|
12
12
|
customName?: string;
|
|
13
|
+
mixPayments?: Transaction[];
|
|
13
14
|
amount: number;
|
|
14
15
|
order: Order;
|
|
15
16
|
voidedInvoiceNumber?: string;
|
|
@@ -104,8 +104,8 @@ export interface SOOrder {
|
|
|
104
104
|
canceledReasonCode?: OOReasonCode;
|
|
105
105
|
/** 店家方取消理由 */
|
|
106
106
|
canceledReason?: string;
|
|
107
|
-
/**
|
|
108
|
-
|
|
107
|
+
/** 消費者是否選擇線上付款 */
|
|
108
|
+
isOnSitePayment: boolean;
|
|
109
109
|
/** 消費者實際付款方式 */
|
|
110
110
|
actualPaymentMethod?: SOPaymentMethod;
|
|
111
111
|
/** 消費者付款時間 undefined為未付款 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,mDAA+B,CAAA;IAC/B,uDAAmC,CAAA;IACnC,uDAAmC,CAAA;AACrC,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgDD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;
|
|
1
|
+
{"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,mDAA+B,CAAA;IAC/B,uDAAmC,CAAA;IACnC,uDAAmC,CAAA;AACrC,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgDD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAkFD,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;AA4BD,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
|
@@ -7,11 +7,12 @@ import { InvoiceConfig, Tax } from './invoice-config';
|
|
|
7
7
|
import { InvoiceCarrierType } from './../enums/invoice-carrier-type';
|
|
8
8
|
import { OrderStatus } from '../enums/order-status';
|
|
9
9
|
import { DiscountModuleTypeEnum, OrderSourceType, CloseType, OrderItemPaidStatus, OrderItemStatus } from '../enums';
|
|
10
|
-
import { Receipt
|
|
10
|
+
import { Receipt } from './receipt';
|
|
11
11
|
import { Customer } from './customer';
|
|
12
12
|
import { Operator } from './store';
|
|
13
13
|
import { OnlinePlatformType, OOReasonCode, OnlineOrderMappingWarningCode } from './online-integration';
|
|
14
|
-
import { SOEater, SOOperateParty
|
|
14
|
+
import { SOEater, SOOperateParty } from './online-ordering';
|
|
15
|
+
import { DiscountMethod } from './discount-module';
|
|
15
16
|
export interface Order {
|
|
16
17
|
id?: string;
|
|
17
18
|
source: OrderSourceType;
|
|
@@ -51,13 +52,9 @@ export interface Order {
|
|
|
51
52
|
/** Use attachPayment method to add this info */
|
|
52
53
|
/** @Deprecated */
|
|
53
54
|
payment?: OrderPayment;
|
|
54
|
-
/** 混合支付細項 */
|
|
55
|
-
mixPayments?: Transaction[];
|
|
56
55
|
/** Use issueInvoice method to add this info */
|
|
57
56
|
/** @Deprecated */
|
|
58
57
|
invoice?: OrderInvoice;
|
|
59
|
-
/** 混合支付細項 */
|
|
60
|
-
mixRefunds?: Transaction[];
|
|
61
58
|
/** Created by attachPayment method */
|
|
62
59
|
/** @Deprecated */
|
|
63
60
|
receipt?: OrderReceipt;
|
|
@@ -73,7 +70,7 @@ export interface Order {
|
|
|
73
70
|
preparingAt?: number;
|
|
74
71
|
/** 廚房出餐時間 */
|
|
75
72
|
completedAt?: number;
|
|
76
|
-
/**
|
|
73
|
+
/** 出餐時間 */
|
|
77
74
|
confirmedAt?: number;
|
|
78
75
|
/** POS刪除時間 */
|
|
79
76
|
deletedAt?: number;
|
|
@@ -114,8 +111,8 @@ export interface Order {
|
|
|
114
111
|
expectedPickupAt?: number;
|
|
115
112
|
/** 訂單取消方 */
|
|
116
113
|
canceledByParty?: SOOperateParty;
|
|
117
|
-
/**
|
|
118
|
-
|
|
114
|
+
/** 消費者是否選擇線上付款 */
|
|
115
|
+
isOnSitePayment: boolean;
|
|
119
116
|
}
|
|
120
117
|
export interface OrderItem {
|
|
121
118
|
id?: string;
|
|
@@ -125,14 +122,25 @@ export interface OrderItem {
|
|
|
125
122
|
/** amount of single product */
|
|
126
123
|
productAmount: number;
|
|
127
124
|
productTax: Tax;
|
|
128
|
-
|
|
125
|
+
attributes: OrderItemAttr[];
|
|
126
|
+
/**
|
|
127
|
+
* 經由註記調整價格後的一個品項金額
|
|
128
|
+
* 原價 `productAmount` + 註記總價 `Sum(attribute.additionalAmount)`
|
|
129
|
+
*/
|
|
129
130
|
subtotal?: number;
|
|
130
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* 一個品項的手動折扣方式
|
|
133
|
+
*/
|
|
134
|
+
manualDiscountMethod?: DiscountMethod;
|
|
135
|
+
/**
|
|
136
|
+
* 一個品項的折扣金額,為`subtotal`與`discountMethod`計算後結果
|
|
137
|
+
*/
|
|
131
138
|
discountAmount?: number;
|
|
132
|
-
/** (subtotal - discountAmount) */
|
|
133
|
-
amount: number;
|
|
134
139
|
quantity: number;
|
|
135
|
-
|
|
140
|
+
/**
|
|
141
|
+
* (`subtotal` - `discountAmount`) * `quantity`
|
|
142
|
+
*/
|
|
143
|
+
amount: number;
|
|
136
144
|
status?: OrderItemStatus;
|
|
137
145
|
/** 所屬第x次出單的品項,初始為undefined,第一次出單為0,每出單一次+1 */
|
|
138
146
|
round?: number;
|
|
@@ -144,7 +152,7 @@ export interface OrderItem {
|
|
|
144
152
|
preparingAt?: number;
|
|
145
153
|
/** 廚房出餐時間 */
|
|
146
154
|
completedAt?: number;
|
|
147
|
-
/**
|
|
155
|
+
/** 出餐時間 */
|
|
148
156
|
confirmedAt?: number;
|
|
149
157
|
/** POS刪除時間 */
|
|
150
158
|
deletedAt?: number;
|
|
@@ -161,7 +169,8 @@ export interface OrderItemChangelog {
|
|
|
161
169
|
amount?: number;
|
|
162
170
|
attributes?: OrderItemAttr[];
|
|
163
171
|
note?: string;
|
|
164
|
-
|
|
172
|
+
manualDiscountMethod?: DiscountMethod;
|
|
173
|
+
discountAmount?: number;
|
|
165
174
|
modifiedBy?: Operator;
|
|
166
175
|
}
|
|
167
176
|
export interface OrderItemAttr {
|
|
@@ -247,13 +256,13 @@ export interface ShiftClosingResult {
|
|
|
247
256
|
currentVoidedCount: number;
|
|
248
257
|
/** 本期收據 作廢金額 */
|
|
249
258
|
currentVoidedAmount: number;
|
|
250
|
-
/** 本期收據
|
|
259
|
+
/** 本期收據 作廢收據編號或發票號碼 */
|
|
251
260
|
currentVoidedInvoiceNumbers: string[];
|
|
252
261
|
/** 非本期收據 作廢數 */
|
|
253
262
|
nonCurrentVoidedCount: number;
|
|
254
263
|
/** 非本期收據 作廢金額 */
|
|
255
264
|
nonCurrentVoidedAmount: number;
|
|
256
|
-
/** 非本期收據
|
|
265
|
+
/** 非本期收據 作廢收據編號或發票號碼 */
|
|
257
266
|
nonCurrentVoidedInvoiceNumbers: string[];
|
|
258
267
|
}
|
|
259
268
|
export interface ClosingResult {
|
|
@@ -274,13 +283,13 @@ export interface ClosingResult {
|
|
|
274
283
|
currentVoidedCount: number;
|
|
275
284
|
/** 本期收據 作廢金額 */
|
|
276
285
|
currentVoidedAmount: number;
|
|
277
|
-
/** 本期收據
|
|
286
|
+
/** 本期收據 作廢收據編號或發票號碼 */
|
|
278
287
|
currentVoidedInvoiceNumbers: string[];
|
|
279
288
|
/** 非本期收據 作廢數 */
|
|
280
289
|
nonCurrentVoidedCount: number;
|
|
281
290
|
/** 非本期收據 作廢金額 */
|
|
282
291
|
nonCurrentVoidedAmount: number;
|
|
283
|
-
/** 非本期收據
|
|
292
|
+
/** 非本期收據 作廢收據編號或發票號碼 */
|
|
284
293
|
nonCurrentVoidedInvoiceNumbers: string[];
|
|
285
294
|
/** 註銷品項數量 */
|
|
286
295
|
cancelledSalesCount?: number;
|
package/models/receipt.d.ts
CHANGED
package/models/store.d.ts
CHANGED
|
@@ -164,7 +164,7 @@ export interface FlowConfig {
|
|
|
164
164
|
export interface OrderStatusAlert {
|
|
165
165
|
/** 出單後,狀態設定為confirmed(適合餐點已經事先做好的店) */
|
|
166
166
|
autoConfirm: boolean;
|
|
167
|
-
/**
|
|
167
|
+
/** 結帳後自動完成訂單(單子消失在pos上) */
|
|
168
168
|
autoLeave: boolean;
|
|
169
169
|
/** Kiosk接單後POS自動接受 */
|
|
170
170
|
autoAccept: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusted-solutions/sdit.models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-alpha.2",
|
|
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": {
|