@be-link/ecommerce-trade-service-node-sdk 0.1.15 → 0.1.16

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/consts.js CHANGED
@@ -6,6 +6,7 @@ exports.OrderSourceMap = {
6
6
  [enums_1.ENUM.OrderSource.LIVE]: '直播订单',
7
7
  [enums_1.ENUM.OrderSource.POINTS]: '积分商城订单',
8
8
  [enums_1.ENUM.OrderSource.DETAIL_SHARE]: '商详分享下单',
9
+ [enums_1.ENUM.OrderSource.COUPON]: '核销券订单',
9
10
  };
10
11
  exports.OrderPlatformMap = {
11
12
  [enums_1.ENUM.OrderPlatform.APP]: 'APP',
@@ -89,7 +90,7 @@ exports.PayPlatformMap = {
89
90
  };
90
91
  exports.PayWayMap = {
91
92
  [enums_1.ENUM.PayWay.CASH]: '现金',
92
- [enums_1.ENUM.PayWay.COUPON]: '兑换券',
93
+ [enums_1.ENUM.PayWay.EXCHANGE_COUPON]: '兑换券',
93
94
  [enums_1.ENUM.PayWay.POINTS]: '积分',
94
95
  [enums_1.ENUM.PayWay.VOUCHER]: '核销券',
95
96
  };
package/enums.d.ts CHANGED
@@ -6,7 +6,9 @@ export declare namespace ENUM {
6
6
  /** 积分商城订单 */
7
7
  POINTS = "POINTS",
8
8
  /** 商详分享下单 */
9
- DETAIL_SHARE = "DETAIL_SHARE"
9
+ DETAIL_SHARE = "DETAIL_SHARE",
10
+ /** 核销券订单 */
11
+ COUPON = "COUPON"
10
12
  }
11
13
  /** 平台 */
12
14
  enum OrderPlatform {
@@ -160,7 +162,7 @@ export declare namespace ENUM {
160
162
  /** 现金 */
161
163
  CASH = "CASH",
162
164
  /** 兑换券 */
163
- COUPON = "COUPON",
165
+ EXCHANGE_COUPON = "EXCHANGE_COUPON",
164
166
  /** 积分 */
165
167
  POINTS = "POINTS",
166
168
  /** 核销券 */
package/enums.js CHANGED
@@ -12,6 +12,8 @@ var ENUM;
12
12
  OrderSource["POINTS"] = "POINTS";
13
13
  /** 商详分享下单 */
14
14
  OrderSource["DETAIL_SHARE"] = "DETAIL_SHARE";
15
+ /** 核销券订单 */
16
+ OrderSource["COUPON"] = "COUPON";
15
17
  })(OrderSource = ENUM.OrderSource || (ENUM.OrderSource = {}));
16
18
  /** 平台 */
17
19
  let OrderPlatform;
@@ -179,7 +181,7 @@ var ENUM;
179
181
  /** 现金 */
180
182
  PayWay["CASH"] = "CASH";
181
183
  /** 兑换券 */
182
- PayWay["COUPON"] = "COUPON";
184
+ PayWay["EXCHANGE_COUPON"] = "EXCHANGE_COUPON";
183
185
  /** 积分 */
184
186
  PayWay["POINTS"] = "POINTS";
185
187
  /** 核销券 */
@@ -0,0 +1,8 @@
1
+ import { PosCoreService } from './types';
2
+ import BaseService from '../../BaseService';
3
+ declare class OrderCoreByInternalService extends BaseService {
4
+ protected prefixUrl: string;
5
+ createOrderByVerifyCoupon(request: PosCoreService.ByInternal.Request.ICreateOrderByVerifyCoupon): Promise<PosCoreService.ByInternal.Response.ICreateOrderByVerifyCoupon>;
6
+ }
7
+ export declare const orderCoreByInternalService: OrderCoreByInternalService;
8
+ export default orderCoreByInternalService;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.orderCoreByInternalService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../../BaseService"));
19
+ let OrderCoreByInternalService = class OrderCoreByInternalService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/pos/core/internal';
23
+ }
24
+ createOrderByVerifyCoupon(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.createOrderByVerifyCoupon), request);
26
+ }
27
+ };
28
+ __decorate([
29
+ (0, tsoa_1.OperationId)('核销券创建订单'),
30
+ (0, tsoa_1.Post)('create-order-by-verify-coupon'),
31
+ __param(0, (0, tsoa_1.Body)())
32
+ ], OrderCoreByInternalService.prototype, "createOrderByVerifyCoupon", null);
33
+ OrderCoreByInternalService = __decorate([
34
+ (0, tsoa_1.Route)('pos/core/internal'),
35
+ (0, tsoa_1.Tags)('PosOrderCore')
36
+ ], OrderCoreByInternalService);
37
+ exports.orderCoreByInternalService = new OrderCoreByInternalService();
38
+ exports.default = exports.orderCoreByInternalService;
@@ -137,6 +137,22 @@ export declare namespace PosCoreService {
137
137
  type IConfirmReceive = void;
138
138
  }
139
139
  }
140
+ namespace ByInternal {
141
+ namespace Request {
142
+ interface ICreateOrderByVerifyCoupon {
143
+ coupon: {
144
+ id: string;
145
+ name: string;
146
+ code: string;
147
+ };
148
+ userId: string;
149
+ skuId: string;
150
+ }
151
+ }
152
+ namespace Response {
153
+ type ICreateOrderByVerifyCoupon = void;
154
+ }
155
+ }
140
156
  interface CoreByUserController {
141
157
  orderCreate(request: ByUser.Request.IOrderCreate, req: any): Promise<ByUser.Response.IOrderCreate>;
142
158
  cancelOrder(request: ByUser.Request.ICancelOrder, req: any): Promise<void>;
@@ -159,4 +175,8 @@ export declare namespace PosCoreService {
159
175
  /** 订单自动确认收货 */
160
176
  autoConfirmReceive(request: any, req: any): Promise<void>;
161
177
  }
178
+ interface CoreByInternalController {
179
+ /** 核销券创建订单 */
180
+ createOrderByVerifyCoupon(request: ByInternal.Request.ICreateOrderByVerifyCoupon, req: any): Promise<ByInternal.Response.ICreateOrderByVerifyCoupon>;
181
+ }
162
182
  }
@@ -86,6 +86,12 @@ export declare namespace RosOrderQueryService {
86
86
  interface IGetApplyRefundInfo {
87
87
  /** 正向订单ID */
88
88
  orderId: string;
89
+ /** 退款类型 */
90
+ refundType: ENUM.ReverseRefundType;
91
+ /** 已核销退款份数(可选) */
92
+ verifiedNum?: number;
93
+ /** 未核销退款份数(可选) */
94
+ unVerifiedNum?: number;
89
95
  }
90
96
  interface IGetRefundCouponInfo {
91
97
  /** 正向订单ID */
@@ -99,6 +105,17 @@ export declare namespace RosOrderQueryService {
99
105
  namespace Response {
100
106
  interface IOrderList {
101
107
  }
108
+ /** 退还优惠券信息 */
109
+ interface IRefundCouponItem {
110
+ /** 券模板ID */
111
+ id: string;
112
+ /** 券名称 */
113
+ name: string;
114
+ /** 券码 */
115
+ code: string;
116
+ /** 有效期(时间戳) */
117
+ expireTime: number;
118
+ }
102
119
  interface IGetApplyRefundInfo {
103
120
  /** 总共可退商品份数 */
104
121
  totalRefundableNum: number;
@@ -106,6 +123,12 @@ export declare namespace RosOrderQueryService {
106
123
  verifiedRefundableNum: number;
107
124
  /** 未核销可退数 */
108
125
  unverifiedRefundableNum: number;
126
+ /** 退款金额(分) */
127
+ refundAmount: number;
128
+ /** 退还优惠券信息(可选) */
129
+ refundCoupons?: IRefundCouponItem[];
130
+ /** 退还积分数(可选) */
131
+ refundPoints?: number;
109
132
  }
110
133
  interface ICouponInfoItem {
111
134
  /** 券模板ID */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-trade-service-node-sdk",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "EcommerceTradeService Node.js SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types.d.ts CHANGED
@@ -245,9 +245,11 @@ export interface RosOrderHeaders {
245
245
  /** 微信支付参数 */
246
246
  export interface IWePayParam {
247
247
  appId: string;
248
- timeStamp: string;
249
- nonceStr: string;
248
+ partnerId: string;
249
+ prepayId: string;
250
250
  package: string;
251
- signType: string;
251
+ nonceStr: string;
252
+ timeStamp: string;
252
253
  paySign: string;
254
+ signType: string;
253
255
  }