@be-link/ecommerce-promotion-service-node-sdk 0.1.30 → 0.1.32
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 +5 -2
- package/enum.js +5 -2
- package/modules/award/service.d.ts +1 -0
- package/modules/award/service.js +8 -0
- package/modules/award/types.d.ts +29 -0
- package/modules/coupon/types.d.ts +13 -0
- package/modules/pointsMall/service.d.ts +2 -0
- package/modules/pointsMall/service.js +16 -0
- package/modules/pointsMall/types.d.ts +22 -0
- package/package.json +1 -1
package/enum.d.ts
CHANGED
|
@@ -95,8 +95,10 @@ export declare namespace ENUM {
|
|
|
95
95
|
namespace COUPON_ENUM {
|
|
96
96
|
/** 券类型 */
|
|
97
97
|
enum COUPON_TYPE {
|
|
98
|
-
/**
|
|
98
|
+
/** 单品满减券 */
|
|
99
99
|
DISCOUNT = "DISCOUNT",
|
|
100
|
+
/** 订单满减券 */
|
|
101
|
+
ORDER_DISCOUNT = "ORDER_DISCOUNT",
|
|
100
102
|
/** 兑换券 */
|
|
101
103
|
EXCHANGE = "EXCHANGE",
|
|
102
104
|
/** 核销券 */
|
|
@@ -104,7 +106,8 @@ export declare namespace ENUM {
|
|
|
104
106
|
}
|
|
105
107
|
/** 券类型中文 */
|
|
106
108
|
enum COUPON_TYPE_CHINESE {
|
|
107
|
-
DISCOUNT = "\
|
|
109
|
+
DISCOUNT = "\u5355\u54C1\u6EE1\u51CF\u5238",
|
|
110
|
+
ORDER_DISCOUNT = "\u8BA2\u5355\u6EE1\u51CF\u5238",
|
|
108
111
|
EXCHANGE = "\u5151\u6362\u5238",
|
|
109
112
|
VERIFY = "\u6838\u9500\u5238"
|
|
110
113
|
}
|
package/enum.js
CHANGED
|
@@ -112,8 +112,10 @@ var ENUM;
|
|
|
112
112
|
/** 券类型 */
|
|
113
113
|
let COUPON_TYPE;
|
|
114
114
|
(function (COUPON_TYPE) {
|
|
115
|
-
/**
|
|
115
|
+
/** 单品满减券 */
|
|
116
116
|
COUPON_TYPE["DISCOUNT"] = "DISCOUNT";
|
|
117
|
+
/** 订单满减券 */
|
|
118
|
+
COUPON_TYPE["ORDER_DISCOUNT"] = "ORDER_DISCOUNT";
|
|
117
119
|
/** 兑换券 */
|
|
118
120
|
COUPON_TYPE["EXCHANGE"] = "EXCHANGE";
|
|
119
121
|
/** 核销券 */
|
|
@@ -122,7 +124,8 @@ var ENUM;
|
|
|
122
124
|
/** 券类型中文 */
|
|
123
125
|
let COUPON_TYPE_CHINESE;
|
|
124
126
|
(function (COUPON_TYPE_CHINESE) {
|
|
125
|
-
COUPON_TYPE_CHINESE["DISCOUNT"] = "\
|
|
127
|
+
COUPON_TYPE_CHINESE["DISCOUNT"] = "\u5355\u54C1\u6EE1\u51CF\u5238";
|
|
128
|
+
COUPON_TYPE_CHINESE["ORDER_DISCOUNT"] = "\u8BA2\u5355\u6EE1\u51CF\u5238";
|
|
126
129
|
COUPON_TYPE_CHINESE["EXCHANGE"] = "\u5151\u6362\u5238";
|
|
127
130
|
COUPON_TYPE_CHINESE["VERIFY"] = "\u6838\u9500\u5238";
|
|
128
131
|
})(COUPON_TYPE_CHINESE = COUPON_ENUM.COUPON_TYPE_CHINESE || (COUPON_ENUM.COUPON_TYPE_CHINESE = {}));
|
|
@@ -7,6 +7,7 @@ declare class AwardService extends BaseService implements Service.PrizeDistribut
|
|
|
7
7
|
liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon): Promise<Service.Response.distributePrize>;
|
|
8
8
|
queryLiveRoomDistributionStats(request: Service.Request.queryLiveRoomDistributionStats): Promise<Service.Response.queryLiveRoomDistributionStatsResponse>;
|
|
9
9
|
adminSingleIssueCoupon(request: Service.Request.adminSingleIssueCoupon): Promise<Service.Response.distributePrize>;
|
|
10
|
+
queryUserLiveRoomRewards(request: Service.Request.queryUserLiveRoomRewards): Promise<Service.Response.queryUserLiveRoomRewards>;
|
|
10
11
|
}
|
|
11
12
|
export declare const awardService: AwardService;
|
|
12
13
|
export default awardService;
|
package/modules/award/service.js
CHANGED
|
@@ -36,6 +36,9 @@ let AwardService = class AwardService extends BaseService_1.default {
|
|
|
36
36
|
adminSingleIssueCoupon(request) {
|
|
37
37
|
return (0, http_1.callApi)(this.getApiUrl(this.adminSingleIssueCoupon), request);
|
|
38
38
|
}
|
|
39
|
+
queryUserLiveRoomRewards(request) {
|
|
40
|
+
return (0, http_1.callApi)(this.getApiUrl(this.queryUserLiveRoomRewards), request);
|
|
41
|
+
}
|
|
39
42
|
};
|
|
40
43
|
__decorate([
|
|
41
44
|
(0, tsoa_1.OperationId)('发放奖励'),
|
|
@@ -62,6 +65,11 @@ __decorate([
|
|
|
62
65
|
(0, tsoa_1.Post)('admin-single-issue-coupon'),
|
|
63
66
|
__param(0, (0, tsoa_1.Body)())
|
|
64
67
|
], AwardService.prototype, "adminSingleIssueCoupon", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, tsoa_1.OperationId)('查询用户多场直播获得的券和积分(B端接口)'),
|
|
70
|
+
(0, tsoa_1.Post)('query-user-live-room-rewards'),
|
|
71
|
+
__param(0, (0, tsoa_1.Body)())
|
|
72
|
+
], AwardService.prototype, "queryUserLiveRoomRewards", null);
|
|
65
73
|
AwardService = __decorate([
|
|
66
74
|
(0, tsoa_1.Route)('award'),
|
|
67
75
|
(0, tsoa_1.Tags)('Award')
|
package/modules/award/types.d.ts
CHANGED
|
@@ -128,6 +128,13 @@ export declare namespace Service {
|
|
|
128
128
|
/** 数量 */
|
|
129
129
|
quantity?: number;
|
|
130
130
|
}
|
|
131
|
+
/** 查询用户多场直播获得的券和积分 */
|
|
132
|
+
interface queryUserLiveRoomRewards {
|
|
133
|
+
/** 用户ID */
|
|
134
|
+
userId: string;
|
|
135
|
+
/** 直播间ID列表 */
|
|
136
|
+
liveRoomIds: string[];
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
139
|
namespace Response {
|
|
133
140
|
/** 发放奖励响应 */
|
|
@@ -138,6 +145,10 @@ export declare namespace Service {
|
|
|
138
145
|
message?: string;
|
|
139
146
|
/** 失败详情 */
|
|
140
147
|
failureDetail?: TaskServiceTypes.Response.FailureListItem[];
|
|
148
|
+
/** 成功数量 */
|
|
149
|
+
successCount?: number;
|
|
150
|
+
/** 失败数量 */
|
|
151
|
+
failureCount?: number;
|
|
141
152
|
}
|
|
142
153
|
/** 直播间积分&券发放统计响应 */
|
|
143
154
|
interface queryLiveRoomDistributionStatsResponse {
|
|
@@ -153,6 +164,22 @@ export declare namespace Service {
|
|
|
153
164
|
getChannel: ENUM.AWARD_ENUM.DISTRIBUTION_CHANNEL;
|
|
154
165
|
}[];
|
|
155
166
|
}
|
|
167
|
+
/** 单个直播间的券和积分数据 */
|
|
168
|
+
interface LiveRoomRewardsData {
|
|
169
|
+
/** 直播间ID */
|
|
170
|
+
liveRoomId: string;
|
|
171
|
+
/** 券数量 */
|
|
172
|
+
couponCount: number;
|
|
173
|
+
/** 积分总数 */
|
|
174
|
+
pointsCount: number;
|
|
175
|
+
}
|
|
176
|
+
/** 查询用户多场直播获得的券和积分响应 */
|
|
177
|
+
interface queryUserLiveRoomRewards {
|
|
178
|
+
/** 用户ID */
|
|
179
|
+
userId: string;
|
|
180
|
+
/** 按直播间分组的数据 */
|
|
181
|
+
liveRoomData: LiveRoomRewardsData[];
|
|
182
|
+
}
|
|
156
183
|
}
|
|
157
184
|
interface PrizeDistributionController {
|
|
158
185
|
/** 发放奖励 */
|
|
@@ -165,5 +192,7 @@ export declare namespace Service {
|
|
|
165
192
|
queryLiveRoomDistributionStats(request: Service.Request.queryLiveRoomDistributionStats, req: any): Promise<Service.Response.queryLiveRoomDistributionStatsResponse>;
|
|
166
193
|
/** 后台单个发券 */
|
|
167
194
|
adminSingleIssueCoupon(request: Service.Request.adminSingleIssueCoupon, req: any): Promise<Service.Response.distributePrize>;
|
|
195
|
+
/** 查询用户多场直播获得的券和积分(B端接口) */
|
|
196
|
+
queryUserLiveRoomRewards(request: Service.Request.queryUserLiveRoomRewards, req: any): Promise<Service.Response.queryUserLiveRoomRewards>;
|
|
168
197
|
}
|
|
169
198
|
}
|
|
@@ -42,6 +42,17 @@ export declare namespace Service {
|
|
|
42
42
|
stackable?: boolean;
|
|
43
43
|
/** 最大叠加次数 */
|
|
44
44
|
maxStack?: number;
|
|
45
|
+
/** 允许与其他订单券叠加(仅订单满减券使用) */
|
|
46
|
+
allowStackWithOtherOrderCoupons?: boolean;
|
|
47
|
+
/** 允许与自身叠加(仅订单满减券使用) */
|
|
48
|
+
allowStackWithSelf?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** 叠加使用配置(仅订单满减券使用) */
|
|
51
|
+
interface CouponStackConfig {
|
|
52
|
+
/** 允许与其他可叠加订单券叠加使用 */
|
|
53
|
+
allowStackWithOtherOrderCoupons: boolean;
|
|
54
|
+
/** 允许与自身叠加使用 */
|
|
55
|
+
allowStackWithSelf: boolean;
|
|
45
56
|
}
|
|
46
57
|
/** 券领取限制 */
|
|
47
58
|
interface CouponReceiveLimit {
|
|
@@ -200,6 +211,8 @@ export declare namespace Service {
|
|
|
200
211
|
/** 范围类型 */
|
|
201
212
|
scopeType: ENUM.COUPON_ENUM.SCOPE_TYPE;
|
|
202
213
|
}>;
|
|
214
|
+
/** 叠加使用配置(仅订单满减券需要传递) */
|
|
215
|
+
stackConfig?: Entity.CouponStackConfig;
|
|
203
216
|
}
|
|
204
217
|
/** 作废券模版 */
|
|
205
218
|
interface abandonCouponTemplate {
|
|
@@ -8,8 +8,10 @@ declare class PointsMallService extends BaseService implements Service.PointsMal
|
|
|
8
8
|
queryProducts(request: Service.Request.queryProducts): Promise<Service.Response.queryProducts>;
|
|
9
9
|
getProductDetail(request: Service.Request.getProductDetail): Promise<Service.Response.getProductDetail>;
|
|
10
10
|
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<Service.Response.queryEnabledAndOnlineProducts>;
|
|
11
|
+
queryStoreVisibleProducts(request: Service.Request.queryStoreVisibleProducts): Promise<Service.Response.queryEnabledAndOnlineProducts>;
|
|
11
12
|
getAvailableCouponCountForProduct(request: Service.Request.getAvailableCouponCountForProduct): Promise<Service.Response.getAvailableCouponCountForProduct>;
|
|
12
13
|
getConsumptionThresholdInfo(request: Service.Request.getConsumptionThresholdInfo): Promise<Service.Response.getConsumptionThresholdInfo>;
|
|
14
|
+
productInfoChangeNotify(request: Service.Request.productInfoChangeNotify): Promise<void>;
|
|
13
15
|
}
|
|
14
16
|
export declare const pointsMallService: PointsMallService;
|
|
15
17
|
export default pointsMallService;
|
|
@@ -39,12 +39,18 @@ let PointsMallService = class PointsMallService extends BaseService_1.default {
|
|
|
39
39
|
queryEnabledAndOnlineProducts(request) {
|
|
40
40
|
return (0, http_1.callApi)(this.getApiUrl(this.queryEnabledAndOnlineProducts), request);
|
|
41
41
|
}
|
|
42
|
+
queryStoreVisibleProducts(request) {
|
|
43
|
+
return (0, http_1.callApi)(this.getApiUrl(this.queryStoreVisibleProducts), request);
|
|
44
|
+
}
|
|
42
45
|
getAvailableCouponCountForProduct(request) {
|
|
43
46
|
return (0, http_1.callApi)(this.getApiUrl(this.getAvailableCouponCountForProduct), request);
|
|
44
47
|
}
|
|
45
48
|
getConsumptionThresholdInfo(request) {
|
|
46
49
|
return (0, http_1.callApi)(this.getApiUrl(this.getConsumptionThresholdInfo), request);
|
|
47
50
|
}
|
|
51
|
+
productInfoChangeNotify(request) {
|
|
52
|
+
return (0, http_1.callApi)(this.getApiUrl(this.productInfoChangeNotify), request);
|
|
53
|
+
}
|
|
48
54
|
};
|
|
49
55
|
__decorate([
|
|
50
56
|
(0, tsoa_1.OperationId)('批量创建积分商城商品'),
|
|
@@ -76,6 +82,11 @@ __decorate([
|
|
|
76
82
|
(0, tsoa_1.Post)('query-enabled-and-online-products'),
|
|
77
83
|
__param(0, (0, tsoa_1.Body)())
|
|
78
84
|
], PointsMallService.prototype, "queryEnabledAndOnlineProducts", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, tsoa_1.OperationId)('查询门店可见积分商品'),
|
|
87
|
+
(0, tsoa_1.Post)('query-store-visible-products'),
|
|
88
|
+
__param(0, (0, tsoa_1.Body)())
|
|
89
|
+
], PointsMallService.prototype, "queryStoreVisibleProducts", null);
|
|
79
90
|
__decorate([
|
|
80
91
|
(0, tsoa_1.OperationId)('查询指定商品用户可用优惠券的数量'),
|
|
81
92
|
(0, tsoa_1.Post)('get-available-coupon-count-for-product'),
|
|
@@ -86,6 +97,11 @@ __decorate([
|
|
|
86
97
|
(0, tsoa_1.Post)('get-consumption-threshold-info'),
|
|
87
98
|
__param(0, (0, tsoa_1.Body)())
|
|
88
99
|
], PointsMallService.prototype, "getConsumptionThresholdInfo", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, tsoa_1.OperationId)('商品基础信息变更通知'),
|
|
102
|
+
(0, tsoa_1.Post)('notify-product-info-change'),
|
|
103
|
+
__param(0, (0, tsoa_1.Body)())
|
|
104
|
+
], PointsMallService.prototype, "productInfoChangeNotify", null);
|
|
89
105
|
PointsMallService = __decorate([
|
|
90
106
|
(0, tsoa_1.Route)('points-mall'),
|
|
91
107
|
(0, tsoa_1.Tags)('PointsMall')
|
|
@@ -113,6 +113,15 @@ export declare namespace Service {
|
|
|
113
113
|
/** 每页数量 */
|
|
114
114
|
pageSize?: number;
|
|
115
115
|
}
|
|
116
|
+
/** 查询门店可见积分商品 */
|
|
117
|
+
export interface queryStoreVisibleProducts {
|
|
118
|
+
/** 门店ID */
|
|
119
|
+
storeId: string;
|
|
120
|
+
/** 页码 */
|
|
121
|
+
page?: number;
|
|
122
|
+
/** 每页数量 */
|
|
123
|
+
pageSize?: number;
|
|
124
|
+
}
|
|
116
125
|
/** 查询指定商品用户可用优惠券的数量 */
|
|
117
126
|
export interface getAvailableCouponCountForProduct {
|
|
118
127
|
/** 用户ID */
|
|
@@ -136,6 +145,15 @@ export declare namespace Service {
|
|
|
136
145
|
/** 商品ID */
|
|
137
146
|
productId: string;
|
|
138
147
|
}
|
|
148
|
+
/** 商品信息变化通知 **/
|
|
149
|
+
export interface productInfoChangeNotify {
|
|
150
|
+
/** 商品ID列表 */
|
|
151
|
+
productId: string;
|
|
152
|
+
/** 可见门店ID列表,空数组表示全部门店可见 */
|
|
153
|
+
visibleStores?: string[];
|
|
154
|
+
/** 不可见门店ID列表,空数组表示无不可见门店 */
|
|
155
|
+
invisibleStores?: string[];
|
|
156
|
+
}
|
|
139
157
|
export {};
|
|
140
158
|
}
|
|
141
159
|
namespace Response {
|
|
@@ -208,9 +226,13 @@ export declare namespace Service {
|
|
|
208
226
|
getProductDetail(request: Service.Request.getProductDetail): Promise<Service.Response.getProductDetail>;
|
|
209
227
|
/** 查询开启且上架的积分商城列表 */
|
|
210
228
|
queryEnabledAndOnlineProducts(request: Service.Request.queryEnabledAndOnlineProducts): Promise<Service.Response.queryEnabledAndOnlineProducts>;
|
|
229
|
+
/** 查询门店可见积分商品 */
|
|
230
|
+
queryStoreVisibleProducts(request: Service.Request.queryStoreVisibleProducts): Promise<Service.Response.queryEnabledAndOnlineProducts>;
|
|
211
231
|
/** 查询指定商品用户可用优惠券的数量 */
|
|
212
232
|
getAvailableCouponCountForProduct(request: Service.Request.getAvailableCouponCountForProduct): Promise<Service.Response.getAvailableCouponCountForProduct>;
|
|
213
233
|
/** 查询商品消费门槛校验信息 */
|
|
214
234
|
getConsumptionThresholdInfo(request: Service.Request.getConsumptionThresholdInfo): Promise<Service.Response.getConsumptionThresholdInfo>;
|
|
235
|
+
/** 商品信息变化通知 **/
|
|
236
|
+
productInfoChangeNotify(request: Service.Request.productInfoChangeNotify): Promise<void>;
|
|
215
237
|
}
|
|
216
238
|
}
|