@be-link/ecommerce-promotion-service-node-sdk 0.1.29 → 0.1.31
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 +12 -5
- package/enum.js +10 -3
- package/modules/award/types.d.ts +4 -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/modules/task/types.d.ts +1 -1
- package/package.json +1 -1
package/enum.d.ts
CHANGED
|
@@ -95,18 +95,25 @@ export declare namespace ENUM {
|
|
|
95
95
|
namespace COUPON_ENUM {
|
|
96
96
|
/** 券类型 */
|
|
97
97
|
enum COUPON_TYPE {
|
|
98
|
-
/**
|
|
99
|
-
|
|
98
|
+
/** 单品满减券 */
|
|
99
|
+
ITEM_DISCOUNT = "ITEM_DISCOUNT",
|
|
100
|
+
/** 订单满减券 */
|
|
101
|
+
ORDER_DISCOUNT = "ORDER_DISCOUNT",
|
|
100
102
|
/** 兑换券 */
|
|
101
103
|
EXCHANGE = "EXCHANGE",
|
|
102
104
|
/** 核销券 */
|
|
103
|
-
VERIFY = "VERIFY"
|
|
105
|
+
VERIFY = "VERIFY",
|
|
106
|
+
/** @deprecated 优惠券(旧类型,兼容用,新代码请使用 ITEM_DISCOUNT) */
|
|
107
|
+
DISCOUNT = "DISCOUNT"
|
|
104
108
|
}
|
|
105
109
|
/** 券类型中文 */
|
|
106
110
|
enum COUPON_TYPE_CHINESE {
|
|
107
|
-
|
|
111
|
+
ITEM_DISCOUNT = "\u5355\u54C1\u6EE1\u51CF\u5238",
|
|
112
|
+
ORDER_DISCOUNT = "\u8BA2\u5355\u6EE1\u51CF\u5238",
|
|
108
113
|
EXCHANGE = "\u5151\u6362\u5238",
|
|
109
|
-
VERIFY = "\u6838\u9500\u5238"
|
|
114
|
+
VERIFY = "\u6838\u9500\u5238",
|
|
115
|
+
/** @deprecated */
|
|
116
|
+
DISCOUNT = "\u4F18\u60E0\u5238"
|
|
110
117
|
}
|
|
111
118
|
/** 券状态 */
|
|
112
119
|
enum COUPON_STATUS {
|
package/enum.js
CHANGED
|
@@ -112,19 +112,26 @@ var ENUM;
|
|
|
112
112
|
/** 券类型 */
|
|
113
113
|
let COUPON_TYPE;
|
|
114
114
|
(function (COUPON_TYPE) {
|
|
115
|
-
/**
|
|
116
|
-
COUPON_TYPE["
|
|
115
|
+
/** 单品满减券 */
|
|
116
|
+
COUPON_TYPE["ITEM_DISCOUNT"] = "ITEM_DISCOUNT";
|
|
117
|
+
/** 订单满减券 */
|
|
118
|
+
COUPON_TYPE["ORDER_DISCOUNT"] = "ORDER_DISCOUNT";
|
|
117
119
|
/** 兑换券 */
|
|
118
120
|
COUPON_TYPE["EXCHANGE"] = "EXCHANGE";
|
|
119
121
|
/** 核销券 */
|
|
120
122
|
COUPON_TYPE["VERIFY"] = "VERIFY";
|
|
123
|
+
/** @deprecated 优惠券(旧类型,兼容用,新代码请使用 ITEM_DISCOUNT) */
|
|
124
|
+
COUPON_TYPE["DISCOUNT"] = "DISCOUNT";
|
|
121
125
|
})(COUPON_TYPE = COUPON_ENUM.COUPON_TYPE || (COUPON_ENUM.COUPON_TYPE = {}));
|
|
122
126
|
/** 券类型中文 */
|
|
123
127
|
let COUPON_TYPE_CHINESE;
|
|
124
128
|
(function (COUPON_TYPE_CHINESE) {
|
|
125
|
-
COUPON_TYPE_CHINESE["
|
|
129
|
+
COUPON_TYPE_CHINESE["ITEM_DISCOUNT"] = "\u5355\u54C1\u6EE1\u51CF\u5238";
|
|
130
|
+
COUPON_TYPE_CHINESE["ORDER_DISCOUNT"] = "\u8BA2\u5355\u6EE1\u51CF\u5238";
|
|
126
131
|
COUPON_TYPE_CHINESE["EXCHANGE"] = "\u5151\u6362\u5238";
|
|
127
132
|
COUPON_TYPE_CHINESE["VERIFY"] = "\u6838\u9500\u5238";
|
|
133
|
+
/** @deprecated */
|
|
134
|
+
COUPON_TYPE_CHINESE["DISCOUNT"] = "\u4F18\u60E0\u5238";
|
|
128
135
|
})(COUPON_TYPE_CHINESE = COUPON_ENUM.COUPON_TYPE_CHINESE || (COUPON_ENUM.COUPON_TYPE_CHINESE = {}));
|
|
129
136
|
/** 券状态 */
|
|
130
137
|
let COUPON_STATUS;
|
package/modules/award/types.d.ts
CHANGED
|
@@ -138,6 +138,10 @@ export declare namespace Service {
|
|
|
138
138
|
message?: string;
|
|
139
139
|
/** 失败详情 */
|
|
140
140
|
failureDetail?: TaskServiceTypes.Response.FailureListItem[];
|
|
141
|
+
/** 成功数量 */
|
|
142
|
+
successCount?: number;
|
|
143
|
+
/** 失败数量 */
|
|
144
|
+
failureCount?: number;
|
|
141
145
|
}
|
|
142
146
|
/** 直播间积分&券发放统计响应 */
|
|
143
147
|
interface queryLiveRoomDistributionStatsResponse {
|
|
@@ -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
|
}
|
package/modules/task/types.d.ts
CHANGED