@trusted-solutions/sdit.models 0.61.0-alpha.6 → 0.62.0-alpha.1
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Address, DayOfWeekTimePeriod, GalleryConfig, Operator, PointProvider } from '../models/store';
|
|
2
2
|
import { CustomerPointDetail, MultiLanguageText, OrderDiscount } from '../models';
|
|
3
3
|
import { PaymentServiceProvider, ServeType } from '../enums';
|
|
4
|
-
import { SOPublicMenu, SOPublicCategory, SOPublicProduct, SOPublicProductAttribute, SOPublicProductAttributeCategory, SOPaymentMethod, SOValidateCart, SOOrderState, SOOrder, SOEater, SOPublicDiscountRule } from '../models/online-ordering';
|
|
4
|
+
import { SOPublicMenu, SOPublicCategory, SOPublicProduct, SOPublicProductAttribute, SOPublicProductAttributeCategory, SOPaymentMethod, SOValidateCart, SOOrderState, SOOrder, SOEater, SOPublicDiscountRule, SOMemberCoupon } from '../models/online-ordering';
|
|
5
5
|
import { RoundingMode } from '../enums/rounding-mode.enum';
|
|
6
|
+
import { MultipleItems } from './response';
|
|
6
7
|
/**
|
|
7
8
|
* SO = SDIT Online
|
|
8
9
|
*/
|
|
@@ -229,6 +230,12 @@ export interface SOGetStoreMenuResponse {
|
|
|
229
230
|
*/
|
|
230
231
|
attributeCategories: SOPublicProductAttributeCategory[];
|
|
231
232
|
}
|
|
233
|
+
export interface SOGetMyMemberCouponsRequest {
|
|
234
|
+
limit?: number;
|
|
235
|
+
paginationToken?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface SOGetMyMemberCouponsResponse extends MultipleItems<SOMemberCoupon> {
|
|
238
|
+
}
|
|
232
239
|
/*******************************/
|
|
233
240
|
/*******************************/
|
|
234
241
|
export interface SOValidateMutationRequest {
|
|
@@ -242,6 +249,8 @@ export interface SOValidateMutationRequest {
|
|
|
242
249
|
expectedPickupAt?: number;
|
|
243
250
|
cart: SOValidateCart;
|
|
244
251
|
isUsePoints?: boolean;
|
|
252
|
+
/** 要套用的會員優惠券 ID */
|
|
253
|
+
memberCouponId?: string;
|
|
245
254
|
}
|
|
246
255
|
/**
|
|
247
256
|
* @throw `SOOrderError`
|
|
@@ -249,6 +258,8 @@ export interface SOValidateMutationRequest {
|
|
|
249
258
|
export interface SOValidateMutationResponse {
|
|
250
259
|
storeId: string;
|
|
251
260
|
traceId: string;
|
|
261
|
+
/** 目前套用的會員優惠券 ID */
|
|
262
|
+
memberCouponId?: string;
|
|
252
263
|
/**
|
|
253
264
|
* 小計
|
|
254
265
|
*/
|
|
@@ -302,6 +313,8 @@ export interface SOValidateMutationResponse {
|
|
|
302
313
|
* 是否有折扣錯誤
|
|
303
314
|
*/
|
|
304
315
|
discountErrorMsg?: string;
|
|
316
|
+
/** 目前套用的會員優惠券套用失敗原因 */
|
|
317
|
+
memberCouponErrorMsg?: string;
|
|
305
318
|
}
|
|
306
319
|
/*******************************/
|
|
307
320
|
/*******************************/
|
|
@@ -310,6 +323,8 @@ export interface SOSendOrderRequest {
|
|
|
310
323
|
serveType: ServeType;
|
|
311
324
|
eater: SOEater;
|
|
312
325
|
cart: SOValidateCart;
|
|
326
|
+
/** 要套用的會員優惠券 ID */
|
|
327
|
+
memberCouponId?: string;
|
|
313
328
|
/**
|
|
314
329
|
* 是否為現場付款
|
|
315
330
|
* 選擇現場付款的訂單,會馬上成立無法再改付款方式。
|
|
@@ -34,6 +34,14 @@ export interface SOPaymentMethod {
|
|
|
34
34
|
name?: string;
|
|
35
35
|
logo?: string[];
|
|
36
36
|
}
|
|
37
|
+
export interface SOMemberCoupon {
|
|
38
|
+
memberCouponNo: string;
|
|
39
|
+
name: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
notice?: string;
|
|
42
|
+
startDatetime: string;
|
|
43
|
+
endDatetime: string;
|
|
44
|
+
}
|
|
37
45
|
export interface SOCartItem {
|
|
38
46
|
/** cart item Id (timestamp ms) */
|
|
39
47
|
id: string;
|
|
@@ -98,6 +106,11 @@ export interface SOOrder {
|
|
|
98
106
|
customerCognitoId?: string;
|
|
99
107
|
/** 訂購人在店家的顧客Id */
|
|
100
108
|
customerId?: string;
|
|
109
|
+
/**
|
|
110
|
+
* 顧客想套用、但本單未必已實際套用在 discount.discountReferences 的會員優惠券 ID
|
|
111
|
+
* 例如櫃檯付款時,可交由 POS 重新驗證並套用
|
|
112
|
+
*/
|
|
113
|
+
requestedMemberCouponId?: string;
|
|
101
114
|
/** 訂購人 */
|
|
102
115
|
eater: SOEater;
|
|
103
116
|
/** 品項們 */
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAoED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAuHD,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;AAuCD,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
|
@@ -80,6 +80,11 @@ export interface Order extends BaseOrder {
|
|
|
80
80
|
customerCognitoId?: string;
|
|
81
81
|
customerId?: string;
|
|
82
82
|
customer?: Customer;
|
|
83
|
+
/**
|
|
84
|
+
* 顧客想套用、但本單未必已實際套用在 discount.discountReferences 的會員優惠券 ID
|
|
85
|
+
* 例如櫃檯付款時,可交由 POS 重新驗證並套用
|
|
86
|
+
*/
|
|
87
|
+
requestedMemberCouponId?: string;
|
|
83
88
|
serveType: ServeType;
|
|
84
89
|
tableName: string;
|
|
85
90
|
/** If `serveConfig.hasTableEntity === true`, tableId should not be undefined */
|
|
@@ -471,7 +476,10 @@ export interface DiscountReference {
|
|
|
471
476
|
quantity: number;
|
|
472
477
|
discountStartedAt: number;
|
|
473
478
|
discountEndedAt: number;
|
|
479
|
+
/** 兌換的memberCouponId */
|
|
474
480
|
code?: string;
|
|
481
|
+
/** 當兌換失敗時,此時間會是undefined */
|
|
482
|
+
redeemedAt?: number;
|
|
475
483
|
orderItemId?: string;
|
|
476
484
|
discountDetails?: DiscountDetails[];
|
|
477
485
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusted-solutions/sdit.models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0-alpha.1",
|
|
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": {
|