@be-link/ecommerce-promotion-service-node-sdk 0.0.11 → 0.0.12

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.
@@ -2,10 +2,10 @@ import { Service } from './types';
2
2
  import BaseService from '../BaseService';
3
3
  declare class AwardService extends BaseService implements Service.PrizeDistributionController {
4
4
  protected prefixUrl: string;
5
- distributePrize(request: Service.Request.distributePrize): Promise<void>;
6
- reversePrize(request: Service.Request.reversePrize): Promise<void>;
7
- liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon): Promise<void>;
8
- issueMemberPoints(request: Service.Request.issueMemberPoints): Promise<void>;
5
+ distributePrize(request: Service.Request.distributePrize): Promise<Service.Response.distributePrize>;
6
+ reversePrize(request: Service.Request.reversePrize): Promise<Service.Response.distributePrize>;
7
+ liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon): Promise<Service.Response.distributePrize>;
8
+ issueMemberPoints(request: Service.Request.issueMemberPoints): Promise<Service.Response.distributePrize>;
9
9
  getLiveRoomDistributionStats(request: Service.Request.getLiveRoomDistributionStats): Promise<Service.Response.getLiveRoomDistributionStats>;
10
10
  }
11
11
  export declare const awardService: AwardService;
@@ -92,6 +92,13 @@ export declare namespace Service {
92
92
  }
93
93
  }
94
94
  namespace Response {
95
+ /** 发放奖励响应 */
96
+ interface distributePrize {
97
+ /** 是否成功 */
98
+ success: boolean;
99
+ /** 失败原因 */
100
+ message?: string;
101
+ }
95
102
  /** 分渠道统计数据 */
96
103
  interface ChannelStats {
97
104
  /** 渠道 */
@@ -113,13 +120,13 @@ export declare namespace Service {
113
120
  }
114
121
  interface PrizeDistributionController {
115
122
  /** 发放奖励 */
116
- distributePrize(request: Service.Request.distributePrize, req: any): Promise<void>;
123
+ distributePrize(request: Service.Request.distributePrize, req: any): Promise<Service.Response.distributePrize>;
117
124
  /** 作废奖励 */
118
- reversePrize(request: Service.Request.reversePrize, req: any): Promise<void>;
125
+ reversePrize(request: Service.Request.reversePrize, req: any): Promise<Service.Response.distributePrize>;
119
126
  /** 直播间发券 */
120
- liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon, req: any): Promise<void>;
127
+ liveRoomIssueCoupon(request: Service.Request.liveRoomIssueCoupon, req: any): Promise<Service.Response.distributePrize>;
121
128
  /** 会员等级积分发放 */
122
- issueMemberPoints(request: Service.Request.issueMemberPoints, req: any): Promise<void>;
129
+ issueMemberPoints(request: Service.Request.issueMemberPoints, req: any): Promise<Service.Response.distributePrize>;
123
130
  /** 统计直播间发放数据 */
124
131
  getLiveRoomDistributionStats(request: Service.Request.getLiveRoomDistributionStats, req: any): Promise<Service.Response.getLiveRoomDistributionStats>;
125
132
  }
@@ -62,17 +62,10 @@ export declare namespace Service {
62
62
  couponName: string;
63
63
  /** 券类型 */
64
64
  couponType: ENUM.PRICING_CALCULATION_ENUM.COUPON_TYPE;
65
- /** 优惠券信息 */
66
- couponInfo: {
67
- discountRules?: CouponServiceTypes.Entity.CouponDiscountRule[];
68
- usageLimit: CouponServiceTypes.Entity.CouponUsageLimit;
69
- };
70
- /** 优惠规则描述 */
71
- remark?: string;
72
65
  /** 该类型券可用数量 */
73
66
  count?: number;
74
- /** 最优选中数量 */
75
- selectedCount: number;
67
+ /** 选中数量 */
68
+ selectedCount?: number;
76
69
  }
77
70
  }
78
71
  namespace Request {
@@ -166,19 +159,17 @@ export declare namespace Service {
166
159
  interface ValidateSelectedCouponResult {
167
160
  /** 是否有效 */
168
161
  isValid: boolean;
169
- /** 无效code */
162
+ /** 无效原因枚举值 */
170
163
  invalidCode?: ENUM.PRICING_CALCULATION_ENUM.INVALID_CODE;
171
- /** 无效原因 */
164
+ /** 无效的券码 */
172
165
  invalidCoupons?: string[];
173
166
  }
174
167
  /** 用户手动选择优惠后算价响应 */
175
168
  interface calculateWithSelectedDiscounts {
176
- /** 用户所有可用优惠券列表 */
177
- availableCoupons?: Entity.CouponInfo[];
178
169
  /** 本单最多可用积分 */
179
170
  maxUsablePoints: number;
180
171
  /** 价格计算结果 */
181
- PriceResult?: {
172
+ priceResult?: {
182
173
  /** 订单原价(分) */
183
174
  originalAmount: number;
184
175
  /** 券优惠金额(分) */
@@ -190,7 +181,7 @@ export declare namespace Service {
190
181
  /** 剩余待支付金额(分) */
191
182
  remainingAmount: number;
192
183
  };
193
- Validation: ValidateSelectedCouponResult;
184
+ validation: ValidateSelectedCouponResult;
194
185
  }
195
186
  /** 积分商城提单算价响应 */
196
187
  interface calculatePointsMallOrder {
@@ -225,8 +216,8 @@ export declare namespace Service {
225
216
  usedPoints?: number;
226
217
  /** 用户选择优惠券聚合 */
227
218
  selectedCouponStats?: Entity.CouponGroupStats[];
228
- /** 使用兑换券明细列表 */
229
- usedCoupons?: Entity.CouponInfo[];
219
+ /** 使用兑换券券码列表 */
220
+ usedCoupons?: string[];
230
221
  /** 是否有效 */
231
222
  isValid: boolean;
232
223
  /** 无效code */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-promotion-service-node-sdk",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "EcommercePromotionService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",