@be-link/ecommerce-promotion-service-node-sdk 0.0.31 → 0.0.33

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.
@@ -4,7 +4,8 @@ declare class AwardService extends BaseService implements Service.PrizeDistribut
4
4
  protected prefixUrl: string;
5
5
  distributePrize(request: Service.Request.distributePrize): Promise<Service.Response.distributePrize>;
6
6
  reversePrize(request: Service.Request.reversePrize): Promise<Service.Response.distributePrize>;
7
- liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon): Promise<Service.Response.distributePrize>;
7
+ liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCouponEncrypt): Promise<Service.Response.distributePrize>;
8
+ queryLiveRoomDistributionStats(request: Service.Request.queryLiveRoomDistributionStats): Promise<Service.Response.queryLiveRoomDistributionStatsResponse>;
8
9
  }
9
10
  export declare const awardService: AwardService;
10
11
  export default awardService;
@@ -20,26 +20,6 @@ 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
- // }
43
23
  }
44
24
  distributePrize(request) {
45
25
  return (0, http_1.callApi)(this.getApiUrl(this.distributePrize), request);
@@ -50,6 +30,9 @@ let AwardService = class AwardService extends BaseService_1.default {
50
30
  liveRoomIssueCoupon(request) {
51
31
  return (0, http_1.callApi)(this.getApiUrl(this.liveRoomIssueCoupon), request);
52
32
  }
33
+ queryLiveRoomDistributionStats(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.queryLiveRoomDistributionStats), request);
35
+ }
53
36
  };
54
37
  __decorate([
55
38
  (0, tsoa_1.OperationId)('发放奖励'),
@@ -66,6 +49,11 @@ __decorate([
66
49
  (0, tsoa_1.Post)('live-room-issue-coupon'),
67
50
  __param(0, (0, tsoa_1.Body)())
68
51
  ], AwardService.prototype, "liveRoomIssueCoupon", null);
52
+ __decorate([
53
+ (0, tsoa_1.OperationId)('直播间积分&券发放统计'),
54
+ (0, tsoa_1.Post)('query-live-room-distribution-stats'),
55
+ __param(0, (0, tsoa_1.Body)())
56
+ ], AwardService.prototype, "queryLiveRoomDistributionStats", null);
69
57
  AwardService = __decorate([
70
58
  (0, tsoa_1.Route)('award'),
71
59
  (0, tsoa_1.Tags)('Award')
@@ -65,8 +65,18 @@ export declare namespace Service {
65
65
  couponId: string;
66
66
  /** 活动ID(业务ID) */
67
67
  activityId: string;
68
- /** 业务编号:唯一标识 */
69
- bizNo: string;
68
+ /** 时间戳 */
69
+ timestamp: number;
70
+ }
71
+ interface liveRoomIssueCouponEncrypt {
72
+ /** 加密后的数据 */
73
+ encryptData: string;
74
+ /** 加密密钥 */
75
+ encryptKey: string;
76
+ /** 初始化向量 */
77
+ iv: string;
78
+ /** 认证标签 */
79
+ authTag: string;
70
80
  }
71
81
  /** 会员等级积分发放 */
72
82
  interface issueMemberPoints {
@@ -79,14 +89,16 @@ export declare namespace Service {
79
89
  /** 业务编号 */
80
90
  bizNo: string;
81
91
  }
82
- /** 统计直播间发放数据 */
83
- interface getLiveRoomDistributionStats {
92
+ /** 直播间积分&券发放统计 */
93
+ interface queryLiveRoomDistributionStats {
84
94
  /** 直播间ID */
85
95
  liveRoomId: string;
86
- /** 开始时间(时间戳) */
87
- startTime: number;
88
- /** 结束时间(时间戳) */
89
- endTime: number;
96
+ /** 用户列表 */
97
+ userIds?: string[];
98
+ /** 页码 */
99
+ pageIndex?: number;
100
+ /** 每页数量 */
101
+ pageSize?: number;
90
102
  }
91
103
  }
92
104
  namespace Response {
@@ -97,23 +109,21 @@ export declare namespace Service {
97
109
  /** 失败原因 */
98
110
  message?: string;
99
111
  }
100
- /** 分渠道统计数据 */
101
- interface ChannelStats {
102
- /** 渠道 */
103
- channel: ENUM.AWARD_ENUM.DISTRIBUTION_CHANNEL;
104
- /** 数量 */
105
- count: number;
106
- }
107
- /** 统计直播间发放数据响应 */
108
- interface getLiveRoomDistributionStats {
109
- /** 券发放总数量 */
110
- totalCouponCount: number;
111
- /** 积分发放总数量 */
112
- totalPointsCount: number;
113
- /** 券按渠道统计 */
114
- couponByChannel: ChannelStats[];
115
- /** 积分按渠道统计 */
116
- pointsByChannel: ChannelStats[];
112
+ /** 直播间积分&券发放统计响应 */
113
+ interface queryLiveRoomDistributionStatsResponse {
114
+ /** 总数 */
115
+ total: number;
116
+ /** 数据列表 */
117
+ list: {
118
+ /** 用户ID */
119
+ userId: string;
120
+ /** 积分发放数量 */
121
+ points: number;
122
+ /** 券发放数量 */
123
+ coupons: number;
124
+ /** 发放渠道 */
125
+ getChannel: ENUM.AWARD_ENUM.DISTRIBUTION_CHANNEL;
126
+ }[];
117
127
  }
118
128
  }
119
129
  interface PrizeDistributionController {
@@ -122,6 +132,8 @@ export declare namespace Service {
122
132
  /** 作废奖励 */
123
133
  reversePrize(request: Service.Request.reversePrize, req: any): Promise<Service.Response.distributePrize>;
124
134
  /** 直播间发券 */
125
- liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon, req: any): Promise<Service.Response.distributePrize>;
135
+ liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCouponEncrypt, req: any): Promise<Service.Response.distributePrize>;
136
+ /** 直播间积分&券发放统计 */
137
+ queryLiveRoomDistributionStats(request: Service.Request.queryLiveRoomDistributionStats, req: any): Promise<Service.Response.queryLiveRoomDistributionStatsResponse>;
126
138
  }
127
139
  }
@@ -145,6 +145,8 @@ export declare namespace Service {
145
145
  interface calculateOrderPrice {
146
146
  /** 本单最多可用积分 */
147
147
  maxUsablePoints: number;
148
+ /** 用户可用积分数量 */
149
+ userAvailablePoints: number;
148
150
  /** 价格计算结果 */
149
151
  priceResult?: {
150
152
  /** 订单原价(分) */
@@ -184,6 +186,8 @@ export declare namespace Service {
184
186
  availableCouponStats?: Entity.CouponGroupStats[];
185
187
  /** 用户可用积分数量 */
186
188
  userAvailablePoints?: number;
189
+ /** 使用兑换券券码列表 */
190
+ usedCoupons?: string[];
187
191
  }
188
192
  /** 积分商城用户选择后再次算价响应 */
189
193
  interface recalculatePointsMallOrder {
@@ -199,6 +203,8 @@ export declare namespace Service {
199
203
  requiredCoupons?: number;
200
204
  /** 使用积分数量 */
201
205
  usedPoints?: number;
206
+ /** 用户可用积分数量 */
207
+ userAvailablePoints?: number;
202
208
  /** 用户选择优惠券聚合 */
203
209
  selectedCouponStats?: Entity.CouponGroupStats[];
204
210
  /** 使用兑换券券码列表 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-promotion-service-node-sdk",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "EcommercePromotionService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",