@be-link/ecommerce-promotion-service-node-sdk 0.0.18 → 0.0.20
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/enum.d.ts +15 -0
- package/enum.js +17 -0
- package/modules/award/service.d.ts +0 -2
- package/modules/award/service.js +20 -16
- package/modules/award/types.d.ts +2 -6
- package/modules/coupon/types.d.ts +1 -1
- package/modules/pointsMall/types.d.ts +9 -15
- package/modules/pointsMall/types.js +0 -17
- package/modules/pricingCalculation/types.d.ts +4 -3
- package/package.json +1 -1
package/enum.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export declare namespace ENUM {
|
|
|
2
2
|
namespace AWARD_ENUM {
|
|
3
3
|
/** 发放渠道 */
|
|
4
4
|
enum DISTRIBUTION_CHANNEL {
|
|
5
|
+
/** 黑钻会员 */
|
|
6
|
+
MEMBER_ORDER = "MEMBER_ORDER",
|
|
5
7
|
/** 下单 */
|
|
6
8
|
ORDER = "ORDER",
|
|
7
9
|
/** 任务 */
|
|
@@ -418,4 +420,17 @@ export declare namespace ENUM {
|
|
|
418
420
|
POINTS_AMOUNT_NOT_ENOUGH = "\u79EF\u5206\u6570\u91CF\u4E0D\u8DB3"
|
|
419
421
|
}
|
|
420
422
|
}
|
|
423
|
+
namespace POINT_MALL {
|
|
424
|
+
/** 兑换类型 */
|
|
425
|
+
enum ExchangeType {
|
|
426
|
+
/** 仅积分 */
|
|
427
|
+
POINTS_ONLY = "POINTS_ONLY",
|
|
428
|
+
/** 仅券 */
|
|
429
|
+
COUPON_ONLY = "COUPON_ONLY",
|
|
430
|
+
/** 积分+券 */
|
|
431
|
+
POINTS_AND_COUPON = "POINTS_AND_COUPON",
|
|
432
|
+
/** 其他 */
|
|
433
|
+
OTHER = "OTHER"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
421
436
|
}
|
package/enum.js
CHANGED
|
@@ -8,6 +8,8 @@ var ENUM;
|
|
|
8
8
|
/** 发放渠道 */
|
|
9
9
|
let DISTRIBUTION_CHANNEL;
|
|
10
10
|
(function (DISTRIBUTION_CHANNEL) {
|
|
11
|
+
/** 黑钻会员 */
|
|
12
|
+
DISTRIBUTION_CHANNEL["MEMBER_ORDER"] = "MEMBER_ORDER";
|
|
11
13
|
/** 下单 */
|
|
12
14
|
DISTRIBUTION_CHANNEL["ORDER"] = "ORDER";
|
|
13
15
|
/** 任务 */
|
|
@@ -472,4 +474,19 @@ var ENUM;
|
|
|
472
474
|
INVALID_CODE_CHINESE["POINTS_AMOUNT_NOT_ENOUGH"] = "\u79EF\u5206\u6570\u91CF\u4E0D\u8DB3";
|
|
473
475
|
})(INVALID_CODE_CHINESE = PRICING_CALCULATION_ENUM.INVALID_CODE_CHINESE || (PRICING_CALCULATION_ENUM.INVALID_CODE_CHINESE = {}));
|
|
474
476
|
})(PRICING_CALCULATION_ENUM = ENUM.PRICING_CALCULATION_ENUM || (ENUM.PRICING_CALCULATION_ENUM = {}));
|
|
477
|
+
let POINT_MALL;
|
|
478
|
+
(function (POINT_MALL) {
|
|
479
|
+
/** 兑换类型 */
|
|
480
|
+
let ExchangeType;
|
|
481
|
+
(function (ExchangeType) {
|
|
482
|
+
/** 仅积分 */
|
|
483
|
+
ExchangeType["POINTS_ONLY"] = "POINTS_ONLY";
|
|
484
|
+
/** 仅券 */
|
|
485
|
+
ExchangeType["COUPON_ONLY"] = "COUPON_ONLY";
|
|
486
|
+
/** 积分+券 */
|
|
487
|
+
ExchangeType["POINTS_AND_COUPON"] = "POINTS_AND_COUPON";
|
|
488
|
+
/** 其他 */
|
|
489
|
+
ExchangeType["OTHER"] = "OTHER";
|
|
490
|
+
})(ExchangeType = POINT_MALL.ExchangeType || (POINT_MALL.ExchangeType = {}));
|
|
491
|
+
})(POINT_MALL = ENUM.POINT_MALL || (ENUM.POINT_MALL = {}));
|
|
475
492
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
|
@@ -5,8 +5,6 @@ declare class AwardService extends BaseService implements Service.PrizeDistribut
|
|
|
5
5
|
distributePrize(request: Service.Request.distributePrize): Promise<Service.Response.distributePrize>;
|
|
6
6
|
reversePrize(request: Service.Request.reversePrize): Promise<Service.Response.distributePrize>;
|
|
7
7
|
liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon): Promise<Service.Response.distributePrize>;
|
|
8
|
-
issueMemberPoints(request: Service.Request.issueMemberPoints): Promise<Service.Response.distributePrize>;
|
|
9
|
-
getLiveRoomDistributionStats(request: Service.Request.getLiveRoomDistributionStats): Promise<Service.Response.getLiveRoomDistributionStats>;
|
|
10
8
|
}
|
|
11
9
|
export declare const awardService: AwardService;
|
|
12
10
|
export default awardService;
|
package/modules/award/service.js
CHANGED
|
@@ -20,6 +20,26 @@ let AwardService = class AwardService extends BaseService_1.default {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.prefixUrl = '/award';
|
|
23
|
+
// @OperationId('会员等级积分发放')
|
|
24
|
+
// @Post('issue-member-points')
|
|
25
|
+
// public issueMemberPoints(
|
|
26
|
+
// @Body() request: Service.Request.issueMemberPoints,
|
|
27
|
+
// ): Promise<Service.Response.distributePrize> {
|
|
28
|
+
// return callApi<Service.PrizeDistributionController['issueMemberPoints']>(
|
|
29
|
+
// this.getApiUrl(this.issueMemberPoints),
|
|
30
|
+
// request,
|
|
31
|
+
// )
|
|
32
|
+
// }
|
|
33
|
+
// @OperationId('统计直播间发放数据')
|
|
34
|
+
// @Post('get-live-room-distribution-stats')
|
|
35
|
+
// public getLiveRoomDistributionStats(
|
|
36
|
+
// @Body() request: Service.Request.getLiveRoomDistributionStats,
|
|
37
|
+
// ): Promise<Service.Response.getLiveRoomDistributionStats> {
|
|
38
|
+
// return callApi<Service.PrizeDistributionController['getLiveRoomDistributionStats']>(
|
|
39
|
+
// this.getApiUrl(this.getLiveRoomDistributionStats),
|
|
40
|
+
// request,
|
|
41
|
+
// )
|
|
42
|
+
// }
|
|
23
43
|
}
|
|
24
44
|
distributePrize(request) {
|
|
25
45
|
return (0, http_1.callApi)(this.getApiUrl(this.distributePrize), request);
|
|
@@ -30,12 +50,6 @@ let AwardService = class AwardService extends BaseService_1.default {
|
|
|
30
50
|
liveRoomIssueCoupon(request) {
|
|
31
51
|
return (0, http_1.callApi)(this.getApiUrl(this.liveRoomIssueCoupon), request);
|
|
32
52
|
}
|
|
33
|
-
issueMemberPoints(request) {
|
|
34
|
-
return (0, http_1.callApi)(this.getApiUrl(this.issueMemberPoints), request);
|
|
35
|
-
}
|
|
36
|
-
getLiveRoomDistributionStats(request) {
|
|
37
|
-
return (0, http_1.callApi)(this.getApiUrl(this.getLiveRoomDistributionStats), request);
|
|
38
|
-
}
|
|
39
53
|
};
|
|
40
54
|
__decorate([
|
|
41
55
|
(0, tsoa_1.OperationId)('发放奖励'),
|
|
@@ -52,16 +66,6 @@ __decorate([
|
|
|
52
66
|
(0, tsoa_1.Post)('live-room-issue-coupon'),
|
|
53
67
|
__param(0, (0, tsoa_1.Body)())
|
|
54
68
|
], AwardService.prototype, "liveRoomIssueCoupon", null);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, tsoa_1.OperationId)('会员等级积分发放'),
|
|
57
|
-
(0, tsoa_1.Post)('issue-member-points'),
|
|
58
|
-
__param(0, (0, tsoa_1.Body)())
|
|
59
|
-
], AwardService.prototype, "issueMemberPoints", null);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, tsoa_1.OperationId)('统计直播间发放数据'),
|
|
62
|
-
(0, tsoa_1.Post)('get-live-room-distribution-stats'),
|
|
63
|
-
__param(0, (0, tsoa_1.Body)())
|
|
64
|
-
], AwardService.prototype, "getLiveRoomDistributionStats", null);
|
|
65
69
|
AwardService = __decorate([
|
|
66
70
|
(0, tsoa_1.Route)('award'),
|
|
67
71
|
(0, tsoa_1.Tags)('Award')
|
package/modules/award/types.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export declare namespace Service {
|
|
|
8
8
|
/** 奖品名称 */
|
|
9
9
|
name?: string;
|
|
10
10
|
/** 奖品类型 */
|
|
11
|
-
type
|
|
11
|
+
type: string;
|
|
12
12
|
/** 奖品数量 */
|
|
13
|
-
quantity
|
|
13
|
+
quantity: number;
|
|
14
14
|
/** 其他扩展信息 */
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}
|
|
@@ -125,9 +125,5 @@ export declare namespace Service {
|
|
|
125
125
|
reversePrize(request: Service.Request.reversePrize, req: any): Promise<Service.Response.distributePrize>;
|
|
126
126
|
/** 直播间发券 */
|
|
127
127
|
liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon, req: any): Promise<Service.Response.distributePrize>;
|
|
128
|
-
/** 会员等级积分发放 */
|
|
129
|
-
issueMemberPoints(request: Service.Request.issueMemberPoints, req: any): Promise<Service.Response.distributePrize>;
|
|
130
|
-
/** 统计直播间发放数据 */
|
|
131
|
-
getLiveRoomDistributionStats(request: Service.Request.getLiveRoomDistributionStats, req: any): Promise<Service.Response.getLiveRoomDistributionStats>;
|
|
132
128
|
}
|
|
133
129
|
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
+
import { ENUM } from '../../enum';
|
|
1
2
|
export declare namespace Service {
|
|
2
|
-
/** 兑换类型 */
|
|
3
|
-
enum ExchangeType {
|
|
4
|
-
/** 仅积分 */
|
|
5
|
-
POINTS_ONLY = "POINTS_ONLY",
|
|
6
|
-
/** 仅券 */
|
|
7
|
-
COUPON_ONLY = "COUPON_ONLY",
|
|
8
|
-
/** 积分+券 */
|
|
9
|
-
POINTS_AND_COUPON = "POINTS_AND_COUPON",
|
|
10
|
-
/** 其他 */
|
|
11
|
-
OTHER = "OTHER"
|
|
12
|
-
}
|
|
13
3
|
namespace Entity {
|
|
14
4
|
/** 商品积分兑换配置 */
|
|
15
5
|
interface ProductPointExchange {
|
|
@@ -28,7 +18,7 @@ export declare namespace Service {
|
|
|
28
18
|
/** 所需积分的数量 */
|
|
29
19
|
pointsRequired: number;
|
|
30
20
|
/** 兑换类型 */
|
|
31
|
-
exchangeType: ExchangeType;
|
|
21
|
+
exchangeType: ENUM.POINT_MALL.ExchangeType;
|
|
32
22
|
/** 是否开启 */
|
|
33
23
|
enabled: boolean;
|
|
34
24
|
/** 是否上架 */
|
|
@@ -46,7 +36,7 @@ export declare namespace Service {
|
|
|
46
36
|
salePrice: number;
|
|
47
37
|
online: boolean;
|
|
48
38
|
enabled: boolean;
|
|
49
|
-
exchangeType: ExchangeType;
|
|
39
|
+
exchangeType: ENUM.POINT_MALL.ExchangeType;
|
|
50
40
|
stock: number;
|
|
51
41
|
limitPerUser?: number;
|
|
52
42
|
pointsRequired: number;
|
|
@@ -60,7 +50,7 @@ export declare namespace Service {
|
|
|
60
50
|
productName: string;
|
|
61
51
|
productId: string;
|
|
62
52
|
productImage: string;
|
|
63
|
-
exchangeType: ExchangeType;
|
|
53
|
+
exchangeType: ENUM.POINT_MALL.ExchangeType;
|
|
64
54
|
pointsRequired: number;
|
|
65
55
|
couponRequired: number;
|
|
66
56
|
}
|
|
@@ -70,7 +60,7 @@ export declare namespace Service {
|
|
|
70
60
|
productId: string;
|
|
71
61
|
pointsRequired?: number;
|
|
72
62
|
couponRequired?: number;
|
|
73
|
-
exchangeType: ExchangeType;
|
|
63
|
+
exchangeType: ENUM.POINT_MALL.ExchangeType;
|
|
74
64
|
online?: boolean;
|
|
75
65
|
sortOrder?: number;
|
|
76
66
|
}
|
|
@@ -125,6 +115,10 @@ export declare namespace Service {
|
|
|
125
115
|
export interface getProductDetail {
|
|
126
116
|
/** 商品ID */
|
|
127
117
|
productId: string;
|
|
118
|
+
/** 是否上架 */
|
|
119
|
+
online?: boolean;
|
|
120
|
+
/** 是否开启 */
|
|
121
|
+
enabled?: boolean;
|
|
128
122
|
}
|
|
129
123
|
export {};
|
|
130
124
|
}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Service = void 0;
|
|
4
|
-
var Service;
|
|
5
|
-
(function (Service) {
|
|
6
|
-
// ==================== 枚举类型 ====================
|
|
7
|
-
/** 兑换类型 */
|
|
8
|
-
let ExchangeType;
|
|
9
|
-
(function (ExchangeType) {
|
|
10
|
-
/** 仅积分 */
|
|
11
|
-
ExchangeType["POINTS_ONLY"] = "POINTS_ONLY";
|
|
12
|
-
/** 仅券 */
|
|
13
|
-
ExchangeType["COUPON_ONLY"] = "COUPON_ONLY";
|
|
14
|
-
/** 积分+券 */
|
|
15
|
-
ExchangeType["POINTS_AND_COUPON"] = "POINTS_AND_COUPON";
|
|
16
|
-
/** 其他 */
|
|
17
|
-
ExchangeType["OTHER"] = "OTHER";
|
|
18
|
-
})(ExchangeType = Service.ExchangeType || (Service.ExchangeType = {}));
|
|
19
|
-
})(Service || (exports.Service = Service = {}));
|
|
@@ -136,11 +136,12 @@ export declare namespace Service {
|
|
|
136
136
|
/** 剩余待支付金额(分) */
|
|
137
137
|
remainingAmount: number;
|
|
138
138
|
/** 最优优惠券组合 */
|
|
139
|
-
optimalCoupons?:
|
|
139
|
+
optimalCoupons?: {
|
|
140
|
+
couponCode: string;
|
|
141
|
+
discountAmount: number;
|
|
142
|
+
}[];
|
|
140
143
|
/** 积分抵扣规则 */
|
|
141
144
|
pointsDeductionRule?: Entity.PointsDeductionRule;
|
|
142
|
-
/** 用户所有可用优惠券列表 */
|
|
143
|
-
availableCoupons?: Entity.CouponInfo[];
|
|
144
145
|
}
|
|
145
146
|
/** 优惠明细项 */
|
|
146
147
|
interface DiscountDetailItem {
|