@trusted-solutions/sdit.models 0.62.0-alpha.1 → 0.62.0-alpha.6
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 +17 -1
- package/lambda/request/kiosk.d.ts +69 -0
- package/lambda/request/user.d.ts +1 -0
- package/lambda/response/kiosk.d.ts +77 -1
- package/models/customer.d.ts +5 -0
- package/models/discount-module/discount-module.d.ts +14 -0
- package/models/online-ordering.d.ts +5 -0
- package/models/order.d.ts +4 -0
- package/models/payment-config.d.ts +6 -1
- package/models/receipt.d.ts +4 -0
- package/models/store.d.ts +27 -0
- package/models/store.js.map +1 -1
- package/models/table.d.ts +1 -0
- package/models/table.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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, SOMemberCoupon } from '../models/online-ordering';
|
|
4
|
+
import { SOPublicMenu, SOPublicCategory, SOPublicProduct, SOPublicProductWithContext, SOPublicProductAttribute, SOPublicProductAttributeCategory, SOPaymentMethod, SOValidateCart, SOOrderState, SOOrder, SOEater, SOPublicDiscountRule, SOMemberCoupon } from '../models/online-ordering';
|
|
5
5
|
import { RoundingMode } from '../enums/rounding-mode.enum';
|
|
6
6
|
import { MultipleItems } from './response';
|
|
7
7
|
/**
|
|
@@ -230,7 +230,23 @@ export interface SOGetStoreMenuResponse {
|
|
|
230
230
|
*/
|
|
231
231
|
attributeCategories: SOPublicProductAttributeCategory[];
|
|
232
232
|
}
|
|
233
|
+
export interface SOGetPopularProductsRequest {
|
|
234
|
+
storeId: string;
|
|
235
|
+
when?: number;
|
|
236
|
+
serveType?: ServeType;
|
|
237
|
+
}
|
|
238
|
+
export interface SOGetPopularProductsResponse extends MultipleItems<SOPublicProductWithContext> {
|
|
239
|
+
}
|
|
240
|
+
export interface SOGetBestPairingsRequest {
|
|
241
|
+
storeId: string;
|
|
242
|
+
productId: string;
|
|
243
|
+
when?: number;
|
|
244
|
+
serveType?: ServeType;
|
|
245
|
+
}
|
|
246
|
+
export interface SOGetBestPairingsResponse extends MultipleItems<SOPublicProductWithContext> {
|
|
247
|
+
}
|
|
233
248
|
export interface SOGetMyMemberCouponsRequest {
|
|
249
|
+
storeId: string;
|
|
234
250
|
limit?: number;
|
|
235
251
|
paginationToken?: string;
|
|
236
252
|
}
|
|
@@ -13,3 +13,72 @@ export interface GetKiosksRequest {
|
|
|
13
13
|
userId: string;
|
|
14
14
|
storeId: string;
|
|
15
15
|
}
|
|
16
|
+
export interface GetKioskConfigRequest {
|
|
17
|
+
storeId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GetKioskMenuRequest {
|
|
20
|
+
storeId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetKioskCouponByQrRequest {
|
|
23
|
+
qr: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GetMemberRequest {
|
|
26
|
+
memberPoolNo: string;
|
|
27
|
+
memberNo?: string;
|
|
28
|
+
phone?: string;
|
|
29
|
+
qrcode?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RedeemPointDryRunOrderItem {
|
|
32
|
+
name: string;
|
|
33
|
+
quantity: number;
|
|
34
|
+
}
|
|
35
|
+
export interface RedeemPointDryRunRequest {
|
|
36
|
+
storeId: string;
|
|
37
|
+
customer: {
|
|
38
|
+
cognitoUserId: string;
|
|
39
|
+
memberPoolNo: string;
|
|
40
|
+
email?: string;
|
|
41
|
+
phone?: string;
|
|
42
|
+
};
|
|
43
|
+
orderContext: {
|
|
44
|
+
id: string;
|
|
45
|
+
storeId: string;
|
|
46
|
+
createdAt: number;
|
|
47
|
+
expectedPickupAt?: number | null;
|
|
48
|
+
items: RedeemPointDryRunOrderItem[];
|
|
49
|
+
totalAmount: number;
|
|
50
|
+
totalBeforePoints?: number;
|
|
51
|
+
totalDiscountAmount?: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface RedeemPointRequest {
|
|
55
|
+
storeId: string;
|
|
56
|
+
customer: {
|
|
57
|
+
cognitoUserId: string;
|
|
58
|
+
memberPoolNo: string;
|
|
59
|
+
email?: string;
|
|
60
|
+
phone?: string;
|
|
61
|
+
};
|
|
62
|
+
points: {
|
|
63
|
+
redeemPoints: number;
|
|
64
|
+
redeemAmount?: number;
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
};
|
|
67
|
+
orderContext: {
|
|
68
|
+
id: string;
|
|
69
|
+
storeId: string;
|
|
70
|
+
createdAt: number;
|
|
71
|
+
expectedPickupAt?: number | null;
|
|
72
|
+
items: RedeemPointDryRunOrderItem[];
|
|
73
|
+
totalAmount: number;
|
|
74
|
+
totalBeforePoints?: number;
|
|
75
|
+
totalDiscountAmount?: number;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface RedeemCouponRequest {
|
|
79
|
+
memberCouponNo: string;
|
|
80
|
+
orderNo: string;
|
|
81
|
+
storeNo: number;
|
|
82
|
+
brandNo?: string;
|
|
83
|
+
brandExternalId?: number;
|
|
84
|
+
}
|
package/lambda/request/user.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Kiosk } from "../../models";
|
|
1
|
+
import { Kiosk, Store } from "../../models";
|
|
2
|
+
import { BaseRuleModel } from "../../models";
|
|
2
3
|
import { SingleItem, MultipleItems } from "./common";
|
|
4
|
+
import { SOGetStoreMenuResponse } from "../online-ordering";
|
|
3
5
|
/**
|
|
4
6
|
* Lambda result to kiosk-admin
|
|
5
7
|
*/
|
|
@@ -10,3 +12,77 @@ export interface CreateKioskResponse extends SingleItem<Kiosk> {
|
|
|
10
12
|
*/
|
|
11
13
|
export interface GetKiosksResponse extends MultipleItems<Kiosk> {
|
|
12
14
|
}
|
|
15
|
+
export interface GetKioskConfigResponse extends SingleItem<Store> {
|
|
16
|
+
}
|
|
17
|
+
export interface GetKioskMenuResponse extends Omit<SOGetStoreMenuResponse, 'discountRules'> {
|
|
18
|
+
discountRules: BaseRuleModel[];
|
|
19
|
+
}
|
|
20
|
+
export declare type PoskyCrmMemberCouponStatus = string;
|
|
21
|
+
export declare type PoskyCrmMemberCouponListItem = {
|
|
22
|
+
memberCouponNo: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
notice?: string | null;
|
|
26
|
+
status: PoskyCrmMemberCouponStatus;
|
|
27
|
+
startDatetime: string;
|
|
28
|
+
endDatetime: string;
|
|
29
|
+
};
|
|
30
|
+
export declare type PoskyCrmCouponDiscountRuleDetail = Omit<BaseRuleModel, 'discountRuleNo' | 'applyMethod' | 'note'> & {
|
|
31
|
+
discountRuleNo: string | number;
|
|
32
|
+
applyMethod: 'AutoApply' | 'Coupon';
|
|
33
|
+
note?: string | null;
|
|
34
|
+
};
|
|
35
|
+
export declare type PoskyCrmMemberCouponDetail = PoskyCrmMemberCouponListItem & {
|
|
36
|
+
brandNo: string;
|
|
37
|
+
memberNo: string;
|
|
38
|
+
state: PoskyCrmMemberCouponStatus;
|
|
39
|
+
redeemedDatetime?: string | null;
|
|
40
|
+
redeemedOrderNo?: string | null;
|
|
41
|
+
redeemedStoreNo?: number | null;
|
|
42
|
+
voidReason?: string | null;
|
|
43
|
+
createDatetime: string;
|
|
44
|
+
discountRuleDetail: PoskyCrmCouponDiscountRuleDetail;
|
|
45
|
+
redeemEligibility: {
|
|
46
|
+
canRedeem: boolean;
|
|
47
|
+
reason?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export declare type PoskyCrmMemberCouponDetailByQr = Omit<PoskyCrmMemberCouponDetail, 'memberNo'> & {
|
|
51
|
+
notice?: string | null;
|
|
52
|
+
member: {
|
|
53
|
+
memberNo: string;
|
|
54
|
+
memberPoolNo: string;
|
|
55
|
+
name: string;
|
|
56
|
+
carrier?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export interface GetMemberResponse {
|
|
60
|
+
memberNo: string;
|
|
61
|
+
memberPoolNo: string;
|
|
62
|
+
idpSub: string | null;
|
|
63
|
+
name: string;
|
|
64
|
+
birthday: string | null;
|
|
65
|
+
gender: number | null;
|
|
66
|
+
email: string | null;
|
|
67
|
+
phoneNumber: string | null;
|
|
68
|
+
address: string | null;
|
|
69
|
+
carrier: string | null;
|
|
70
|
+
totalPoints: number;
|
|
71
|
+
expiringPoints: number;
|
|
72
|
+
expirationDatetime: string | null;
|
|
73
|
+
}
|
|
74
|
+
export declare type GetKioskCouponByQrResponse = PoskyCrmMemberCouponDetailByQr;
|
|
75
|
+
export interface RedeemPointDryRunResponse {
|
|
76
|
+
usedPoints: number;
|
|
77
|
+
discountAmount: number;
|
|
78
|
+
errorMessage?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare type RedeemPointResponse = {
|
|
81
|
+
usePoints: number;
|
|
82
|
+
discountAmount: number;
|
|
83
|
+
tradeDatetime: string;
|
|
84
|
+
errorMessage?: string;
|
|
85
|
+
} | null;
|
|
86
|
+
export interface RedeemCouponResponse {
|
|
87
|
+
redeemedDatetime: string;
|
|
88
|
+
}
|
package/models/customer.d.ts
CHANGED
|
@@ -8,14 +8,19 @@ export interface Customer {
|
|
|
8
8
|
id?: string;
|
|
9
9
|
name: string;
|
|
10
10
|
phone: string;
|
|
11
|
+
address?: string;
|
|
11
12
|
/** Pool ID 不填,為早期cognito User Pool */
|
|
12
13
|
memberPoolNo?: string;
|
|
13
14
|
/** 同一個Pool下的唯一user ID */
|
|
14
15
|
cognitoUserId?: string;
|
|
15
16
|
cardNo?: string;
|
|
17
|
+
carrier?: string;
|
|
16
18
|
gender?: CustomerGenderEnum;
|
|
17
19
|
email?: string;
|
|
18
20
|
birthday?: CustomerBirthday;
|
|
21
|
+
totalPoints?: number;
|
|
22
|
+
expiringPoints?: number;
|
|
23
|
+
expirationDatetime?: string;
|
|
19
24
|
totalVisits?: number;
|
|
20
25
|
totalSpending?: number;
|
|
21
26
|
firstVisitTime?: number;
|
|
@@ -43,6 +43,20 @@ export interface DiscountMethod {
|
|
|
43
43
|
type: DiscountMethodTypeEnum;
|
|
44
44
|
value: number;
|
|
45
45
|
}
|
|
46
|
+
export interface BaseRuleModel {
|
|
47
|
+
discountRuleNo: string | number;
|
|
48
|
+
applyMethod: "AutoApply" | "Coupon";
|
|
49
|
+
name: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
note?: string | null;
|
|
52
|
+
beginDatetime: string;
|
|
53
|
+
endDatetime: string;
|
|
54
|
+
isActive: number;
|
|
55
|
+
targetCustomers: any;
|
|
56
|
+
useCondition: any;
|
|
57
|
+
moduleType: string;
|
|
58
|
+
modulePayload: any;
|
|
59
|
+
}
|
|
46
60
|
export declare type UnionOfDiscountModule = EntireOrderDiscountModule | SelectedItemDiscountModule;
|
|
47
61
|
export declare type UnionOfDiscountItem = SelectedItemDiscountItem;
|
|
48
62
|
export interface EntireOrderDiscountModuleChoices {
|
|
@@ -271,6 +271,11 @@ export interface SOPublicProduct {
|
|
|
271
271
|
type?: ProductType;
|
|
272
272
|
isComboOnly?: boolean;
|
|
273
273
|
}
|
|
274
|
+
export interface SOPublicProductWithContext {
|
|
275
|
+
menuId: string;
|
|
276
|
+
categoryId: string;
|
|
277
|
+
product: SOPublicProduct;
|
|
278
|
+
}
|
|
274
279
|
export interface DiscountLabel {
|
|
275
280
|
i18nKey: string;
|
|
276
281
|
i18nParams: Record<string, any>;
|
package/models/order.d.ts
CHANGED
|
@@ -293,6 +293,10 @@ export interface OrderPayment {
|
|
|
293
293
|
transactionId: string;
|
|
294
294
|
/** PaidAt provided by third party payment vendor after payment. */
|
|
295
295
|
paidAt: number;
|
|
296
|
+
cardBrand?: string;
|
|
297
|
+
maskedCardNo?: string;
|
|
298
|
+
terminalId?: string;
|
|
299
|
+
merchantId?: string;
|
|
296
300
|
/** Used to record the payment results provided by third-party payment vendor */
|
|
297
301
|
detail: any;
|
|
298
302
|
/** Used to record info of refund. */
|
|
@@ -83,7 +83,7 @@ export interface DdpayOnlineConfig extends BasePaymentConfig {
|
|
|
83
83
|
}
|
|
84
84
|
export interface DdpayConfig extends BasePaymentConfig {
|
|
85
85
|
provider: PaymentServiceProvider.ddpay;
|
|
86
|
-
type: PaymentType.unknown;
|
|
86
|
+
type: PaymentType.unknown | PaymentType.kioskSelfCheckout;
|
|
87
87
|
clientId: string;
|
|
88
88
|
clientSecret: string;
|
|
89
89
|
shopId: string;
|
|
@@ -102,3 +102,8 @@ export interface NewebpayOnlineConfig extends BasePaymentConfig {
|
|
|
102
102
|
hashKey: string;
|
|
103
103
|
hashIV: string;
|
|
104
104
|
}
|
|
105
|
+
export interface NewebpayConfig extends BasePaymentConfig {
|
|
106
|
+
provider: PaymentServiceProvider.newebpay;
|
|
107
|
+
type: PaymentType.creditCard;
|
|
108
|
+
adminPassword: string;
|
|
109
|
+
}
|
package/models/receipt.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export interface Transaction {
|
|
|
54
54
|
transactionId: string;
|
|
55
55
|
/** PaidAt provided by third party payment vendor after payment. */
|
|
56
56
|
timestamp: number;
|
|
57
|
+
cardBrand?: string;
|
|
58
|
+
maskedCardNo?: string;
|
|
59
|
+
terminalId?: string;
|
|
60
|
+
merchantId?: string;
|
|
57
61
|
/** Used to record the payment results provided by third-party payment vendor */
|
|
58
62
|
detail: any;
|
|
59
63
|
operator?: Operator;
|
package/models/store.d.ts
CHANGED
|
@@ -21,6 +21,29 @@ export interface Operator {
|
|
|
21
21
|
storeUserId: string;
|
|
22
22
|
name: string;
|
|
23
23
|
}
|
|
24
|
+
export declare type Brand = {
|
|
25
|
+
brandNo: string;
|
|
26
|
+
memberPoolNo: string;
|
|
27
|
+
clientId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
introduction: string;
|
|
30
|
+
logoUrl: string;
|
|
31
|
+
themeColor: {
|
|
32
|
+
primary: string;
|
|
33
|
+
primaryRgb: string;
|
|
34
|
+
primaryTint: string;
|
|
35
|
+
primaryShade: string;
|
|
36
|
+
primaryContrast: string;
|
|
37
|
+
primaryContrastRgb: string;
|
|
38
|
+
};
|
|
39
|
+
mainStoreNo: number;
|
|
40
|
+
createEmployeeNo: number;
|
|
41
|
+
createDatetime: string;
|
|
42
|
+
lastEditEmployeeNo: number;
|
|
43
|
+
lastEditDatetime: string;
|
|
44
|
+
isActive: number;
|
|
45
|
+
isDel: number;
|
|
46
|
+
};
|
|
24
47
|
export interface Store {
|
|
25
48
|
id?: string;
|
|
26
49
|
/** 讓店家自行定義的店號,會印在發票及收據上 */
|
|
@@ -225,6 +248,10 @@ export interface Store {
|
|
|
225
248
|
onlineStorePointsName?: string;
|
|
226
249
|
/** 品牌 */
|
|
227
250
|
brandNo?: string;
|
|
251
|
+
brand?: Brand;
|
|
252
|
+
storePointsEnabled?: boolean;
|
|
253
|
+
storePointsProvider?: PointProvider;
|
|
254
|
+
storePointsName?: string;
|
|
228
255
|
/** 加入購物車時,是否與相同品相合併 */
|
|
229
256
|
onlineMergeSameItem?: boolean;
|
|
230
257
|
/** 內用服務費 1~100(%) undefined為關閉 */
|
package/models/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/store.ts"],"names":[],"mappings":";;;AAEA,oCAAmH;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/store.ts"],"names":[],"mappings":";;;AAEA,oCAAmH;AAkSnH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,kDAAiC,CAAA;AACnC,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|
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":";;;AA2BA,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.62.0-alpha.
|
|
3
|
+
"version": "0.62.0-alpha.6",
|
|
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": {
|