@be-link/ecommerce-trade-service-node-sdk 0.1.40 → 0.1.42
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.d.ts +1 -0
- package/consts.js +4 -1
- package/enums.d.ts +37 -0
- package/enums.js +130 -1
- package/index.d.ts +1 -1
- package/index.js +2 -1
- package/modules/pos/orderQuery/types.d.ts +11 -0
- package/package.json +1 -1
package/consts.d.ts
CHANGED
|
@@ -18,3 +18,4 @@ export declare const PayWayMap: Record<ENUM.PayWay, string>;
|
|
|
18
18
|
export declare const TradeVHOST = "ecommerce";
|
|
19
19
|
export declare const POSTopicName = "trade-positive-topic";
|
|
20
20
|
export declare const ROSTopicName = "trade-reverse-topic";
|
|
21
|
+
export declare const ForeverEnd = 253402271999999;
|
package/consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROSTopicName = exports.POSTopicName = exports.TradeVHOST = exports.PayWayMap = exports.PayPlatformMap = exports.PayChannelMap = exports.ReverseRefundWayMap = exports.ReverseRefundTypeMap = exports.ReverseArrivalStatusMap = exports.ReverseOrderStatusMap = exports.ReverseResourceTypeMap = exports.OrderVerificationStatusMap = exports.OrderRefundStatusMap = exports.OrderPayStatusMap = exports.OrderStatusMap = exports.OrderOsTypeMap = exports.OrderPlatformMap = exports.OrderSourceMap = void 0;
|
|
3
|
+
exports.ForeverEnd = exports.ROSTopicName = exports.POSTopicName = exports.TradeVHOST = exports.PayWayMap = exports.PayPlatformMap = exports.PayChannelMap = exports.ReverseRefundWayMap = exports.ReverseRefundTypeMap = exports.ReverseArrivalStatusMap = exports.ReverseOrderStatusMap = exports.ReverseResourceTypeMap = exports.OrderVerificationStatusMap = exports.OrderRefundStatusMap = exports.OrderPayStatusMap = exports.OrderStatusMap = exports.OrderOsTypeMap = exports.OrderPlatformMap = exports.OrderSourceMap = void 0;
|
|
4
4
|
const enums_1 = require("./enums");
|
|
5
5
|
exports.OrderSourceMap = {
|
|
6
6
|
[enums_1.ENUM.OrderSource.LIVE]: '直播订单',
|
|
@@ -103,3 +103,6 @@ exports.TradeVHOST = 'ecommerce';
|
|
|
103
103
|
exports.POSTopicName = 'trade-positive-topic';
|
|
104
104
|
// 逆向订单 TOPIC
|
|
105
105
|
exports.ROSTopicName = 'trade-reverse-topic';
|
|
106
|
+
// 长期有效
|
|
107
|
+
// const foreverEnd = endOfDay(new Date(9999, 11, 31)).getTime()
|
|
108
|
+
exports.ForeverEnd = 253402271999999;
|
package/enums.d.ts
CHANGED
|
@@ -196,6 +196,8 @@ export declare namespace ENUM {
|
|
|
196
196
|
/** 黑钻会员订单 */
|
|
197
197
|
BLACK_DIAMOND_MEMBER = "BLACK_DIAMOND_MEMBER"
|
|
198
198
|
}
|
|
199
|
+
/** 订单类型中文映射 */
|
|
200
|
+
const OrderType_CN: Record<ENUM.OrderType, string>;
|
|
199
201
|
enum OrderPromotionType {
|
|
200
202
|
/** 满减优惠券 */
|
|
201
203
|
FULL_REDUCE = "FULL_REDUCE",
|
|
@@ -265,3 +267,38 @@ export declare namespace EXCHANGE_ENUM {
|
|
|
265
267
|
CLOSED = "trade.order.reverse.closed"
|
|
266
268
|
}
|
|
267
269
|
}
|
|
270
|
+
/** 中文枚举映射 */
|
|
271
|
+
export declare namespace ENUM_CN {
|
|
272
|
+
/** 订单状态中文映射 */
|
|
273
|
+
const OrderStatus: Record<ENUM.OrderStatus, string>;
|
|
274
|
+
/** 退款状态中文映射 */
|
|
275
|
+
const OrderRefundStatus: Record<ENUM.OrderRefundStatus, string>;
|
|
276
|
+
/** 核销状态中文映射 */
|
|
277
|
+
const OrderVerificationStatus: Record<ENUM.OrderVerificationStatus, string>;
|
|
278
|
+
/** 支付渠道中文映射 */
|
|
279
|
+
const PayChannel: Record<ENUM.PayChannel, string>;
|
|
280
|
+
/** 支付平台中文映射 */
|
|
281
|
+
const PayPlatform: Record<ENUM.PayPlatform, string>;
|
|
282
|
+
/** 支付方式中文映射 */
|
|
283
|
+
const PayWay: Record<ENUM.PayWay, string>;
|
|
284
|
+
/** 订单来源中文映射 */
|
|
285
|
+
const OrderSource: Record<ENUM.OrderSource, string>;
|
|
286
|
+
/** 平台中文映射 */
|
|
287
|
+
const OrderPlatform: Record<ENUM.OrderPlatform, string>;
|
|
288
|
+
/** 取货方式中文映射 */
|
|
289
|
+
const ProductPick: Record<string, string>;
|
|
290
|
+
/** 配送方式中文映射 */
|
|
291
|
+
const ProductDispatch: Record<string, string>;
|
|
292
|
+
/** 商品分类中文映射 */
|
|
293
|
+
const ProductCategory: Record<string, string>;
|
|
294
|
+
/** 逆向资源类型中文映射 */
|
|
295
|
+
const ReverseResourceType: Record<ENUM.ReverseResourceType, string>;
|
|
296
|
+
/** 逆向订单状态中文映射 */
|
|
297
|
+
const ReverseOrderStatus: Record<ENUM.ReverseOrderStatus, string>;
|
|
298
|
+
/** 退款到账状态中文映射 */
|
|
299
|
+
const ReverseArrivalStatus: Record<ENUM.ReverseArrivalStatus, string>;
|
|
300
|
+
/** 逆向订单类型中文映射 */
|
|
301
|
+
const ReverseRefundType: Record<ENUM.ReverseRefundType, string>;
|
|
302
|
+
/** 退款方式中文映射 */
|
|
303
|
+
const ReverseRefundWay: Record<ENUM.ReverseRefundWay, string>;
|
|
304
|
+
}
|
package/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EXCHANGE_ENUM = exports.ENUM = void 0;
|
|
3
|
+
exports.ENUM_CN = exports.EXCHANGE_ENUM = exports.ENUM = void 0;
|
|
4
4
|
var ENUM;
|
|
5
5
|
(function (ENUM) {
|
|
6
6
|
/** 订单来源 */
|
|
@@ -217,6 +217,14 @@ var ENUM;
|
|
|
217
217
|
/** 黑钻会员订单 */
|
|
218
218
|
OrderType["BLACK_DIAMOND_MEMBER"] = "BLACK_DIAMOND_MEMBER";
|
|
219
219
|
})(OrderType = ENUM.OrderType || (ENUM.OrderType = {}));
|
|
220
|
+
/** 订单类型中文映射 */
|
|
221
|
+
ENUM.OrderType_CN = {
|
|
222
|
+
[ENUM.OrderType.NORMAL]: '普通订单',
|
|
223
|
+
[ENUM.OrderType.PAY_GIFT]: '支付有礼订单',
|
|
224
|
+
[ENUM.OrderType.FULL_GIFT]: '满赠订单',
|
|
225
|
+
[ENUM.OrderType.ONE_RMB_MEMBER]: '一元入会订单',
|
|
226
|
+
[ENUM.OrderType.BLACK_DIAMOND_MEMBER]: '黑钻会员订单',
|
|
227
|
+
};
|
|
220
228
|
let OrderPromotionType;
|
|
221
229
|
(function (OrderPromotionType) {
|
|
222
230
|
/** 满减优惠券 */
|
|
@@ -293,3 +301,124 @@ var EXCHANGE_ENUM;
|
|
|
293
301
|
RosRoutingKeyEnum["CLOSED"] = "trade.order.reverse.closed";
|
|
294
302
|
})(RosRoutingKeyEnum = EXCHANGE_ENUM.RosRoutingKeyEnum || (EXCHANGE_ENUM.RosRoutingKeyEnum = {}));
|
|
295
303
|
})(EXCHANGE_ENUM || (exports.EXCHANGE_ENUM = EXCHANGE_ENUM = {}));
|
|
304
|
+
/** 中文枚举映射 */
|
|
305
|
+
var ENUM_CN;
|
|
306
|
+
(function (ENUM_CN) {
|
|
307
|
+
/** 订单状态中文映射 */
|
|
308
|
+
ENUM_CN.OrderStatus = {
|
|
309
|
+
[ENUM.OrderStatus.WAIT_PAY]: '待付款',
|
|
310
|
+
[ENUM.OrderStatus.PAY_SUCCESS]: '支付成功',
|
|
311
|
+
[ENUM.OrderStatus.WAIT_SHIP]: '待发货',
|
|
312
|
+
[ENUM.OrderStatus.WAIT_RECEIVE]: '待收货',
|
|
313
|
+
[ENUM.OrderStatus.COMPLETED]: '已完成',
|
|
314
|
+
[ENUM.OrderStatus.CANCELED]: '取消交易',
|
|
315
|
+
[ENUM.OrderStatus.CLOSED]: '已关闭',
|
|
316
|
+
};
|
|
317
|
+
/** 退款状态中文映射 */
|
|
318
|
+
ENUM_CN.OrderRefundStatus = {
|
|
319
|
+
[ENUM.OrderRefundStatus.NONE]: '无售后',
|
|
320
|
+
[ENUM.OrderRefundStatus.PENDING]: '待商家审核',
|
|
321
|
+
[ENUM.OrderRefundStatus.REFUNDED]: '已退款',
|
|
322
|
+
[ENUM.OrderRefundStatus.CLOSED]: '退款关闭',
|
|
323
|
+
[ENUM.OrderRefundStatus.PARTIAL]: '部分退款',
|
|
324
|
+
};
|
|
325
|
+
/** 核销状态中文映射 */
|
|
326
|
+
ENUM_CN.OrderVerificationStatus = {
|
|
327
|
+
[ENUM.OrderVerificationStatus.WAITING]: '待核销',
|
|
328
|
+
[ENUM.OrderVerificationStatus.VERIFIED]: '已核销',
|
|
329
|
+
[ENUM.OrderVerificationStatus.PARTIAL]: '部分核销',
|
|
330
|
+
[ENUM.OrderVerificationStatus.EXPIRED]: '已过期',
|
|
331
|
+
[ENUM.OrderVerificationStatus.NONE]: '无需核销',
|
|
332
|
+
};
|
|
333
|
+
/** 支付渠道中文映射 */
|
|
334
|
+
ENUM_CN.PayChannel = {
|
|
335
|
+
[ENUM.PayChannel.WX_PAY]: '微信支付',
|
|
336
|
+
[ENUM.PayChannel.YEE_PAY]: '易宝支付',
|
|
337
|
+
[ENUM.PayChannel.BAO_PAY]: '宝付支付',
|
|
338
|
+
};
|
|
339
|
+
/** 支付平台中文映射 */
|
|
340
|
+
ENUM_CN.PayPlatform = {
|
|
341
|
+
[ENUM.PayPlatform.WECHAT]: '微信',
|
|
342
|
+
[ENUM.PayPlatform.ALI_PAY]: '支付宝',
|
|
343
|
+
[ENUM.PayPlatform.UNION_PAY]: '云闪付',
|
|
344
|
+
};
|
|
345
|
+
/** 支付方式中文映射 */
|
|
346
|
+
ENUM_CN.PayWay = {
|
|
347
|
+
[ENUM.PayWay.CASH]: '现金',
|
|
348
|
+
[ENUM.PayWay.EXCHANGE_COUPON]: '兑换券',
|
|
349
|
+
[ENUM.PayWay.POINTS]: '积分',
|
|
350
|
+
[ENUM.PayWay.VOUCHER]: '核销券',
|
|
351
|
+
};
|
|
352
|
+
/** 订单来源中文映射 */
|
|
353
|
+
ENUM_CN.OrderSource = {
|
|
354
|
+
[ENUM.OrderSource.LIVE]: '直播订单',
|
|
355
|
+
[ENUM.OrderSource.POINTS]: '积分商城订单',
|
|
356
|
+
[ENUM.OrderSource.DETAIL_SHARE]: '商详分享下单',
|
|
357
|
+
[ENUM.OrderSource.COUPON]: '核销券订单',
|
|
358
|
+
};
|
|
359
|
+
/** 平台中文映射 */
|
|
360
|
+
ENUM_CN.OrderPlatform = {
|
|
361
|
+
[ENUM.OrderPlatform.APP]: 'APP',
|
|
362
|
+
[ENUM.OrderPlatform.H5]: '网页版',
|
|
363
|
+
[ENUM.OrderPlatform.MINI]: '小程序',
|
|
364
|
+
[ENUM.OrderPlatform.UNKNOWN]: '未知',
|
|
365
|
+
};
|
|
366
|
+
/** 取货方式中文映射 */
|
|
367
|
+
ENUM_CN.ProductPick = {
|
|
368
|
+
STORE_PICKUP: '门店自提',
|
|
369
|
+
EXPRESS_DELIVERY: '快递配送',
|
|
370
|
+
DEPARTMENT_STORE: '百货门店',
|
|
371
|
+
DELIVERY: '快递配送',
|
|
372
|
+
};
|
|
373
|
+
/** 配送方式中文映射 */
|
|
374
|
+
ENUM_CN.ProductDispatch = {
|
|
375
|
+
EXPRESS: '快递',
|
|
376
|
+
SELF_PICKUP: '自提',
|
|
377
|
+
SUPPLIER_DISPATCH: '供自发',
|
|
378
|
+
WAREHOSE_DISPATCH: '仓发',
|
|
379
|
+
};
|
|
380
|
+
/** 商品分类中文映射 */
|
|
381
|
+
ENUM_CN.ProductCategory = {
|
|
382
|
+
HEALTH: '滋补健康',
|
|
383
|
+
DEPARTMENT_STORE: '日用百货',
|
|
384
|
+
STORE_RETAIL: '门店零售',
|
|
385
|
+
OTHER_FRESH: '其他生鲜',
|
|
386
|
+
EARLY_FRESH: '早八生鲜',
|
|
387
|
+
};
|
|
388
|
+
/** 逆向资源类型中文映射 */
|
|
389
|
+
ENUM_CN.ReverseResourceType = {
|
|
390
|
+
[ENUM.ReverseResourceType.FUNDS]: '资金',
|
|
391
|
+
[ENUM.ReverseResourceType.STOCK]: '商品库存',
|
|
392
|
+
[ENUM.ReverseResourceType.POINTS]: '积分',
|
|
393
|
+
[ENUM.ReverseResourceType.COUPON]: '兑换券',
|
|
394
|
+
[ENUM.ReverseResourceType.FULL_REDUCTION]: '满减券',
|
|
395
|
+
[ENUM.ReverseResourceType.VOUCHER]: '核销券',
|
|
396
|
+
};
|
|
397
|
+
/** 逆向订单状态中文映射 */
|
|
398
|
+
ENUM_CN.ReverseOrderStatus = {
|
|
399
|
+
[ENUM.ReverseOrderStatus.PENDING]: '待审核',
|
|
400
|
+
[ENUM.ReverseOrderStatus.APPROVED]: '审核通过',
|
|
401
|
+
[ENUM.ReverseOrderStatus.REJECTED]: '审核拒绝',
|
|
402
|
+
[ENUM.ReverseOrderStatus.CANCELED]: '用户主动取消',
|
|
403
|
+
[ENUM.ReverseOrderStatus.REFUNDED]: '已退款',
|
|
404
|
+
[ENUM.ReverseOrderStatus.CLOSED]: '退款关闭',
|
|
405
|
+
};
|
|
406
|
+
/** 退款到账状态中文映射 */
|
|
407
|
+
ENUM_CN.ReverseArrivalStatus = {
|
|
408
|
+
[ENUM.ReverseArrivalStatus.RETURNING]: '款项退回中',
|
|
409
|
+
[ENUM.ReverseArrivalStatus.ARRIVED]: '已到账',
|
|
410
|
+
[ENUM.ReverseArrivalStatus.FAILED]: '到账失败',
|
|
411
|
+
};
|
|
412
|
+
/** 逆向订单类型中文映射 */
|
|
413
|
+
ENUM_CN.ReverseRefundType = {
|
|
414
|
+
[ENUM.ReverseRefundType.REFUND_ONLY]: '仅退款',
|
|
415
|
+
[ENUM.ReverseRefundType.RETURN_AND_REFUND]: '退货退款',
|
|
416
|
+
};
|
|
417
|
+
/** 退款方式中文映射 */
|
|
418
|
+
ENUM_CN.ReverseRefundWay = {
|
|
419
|
+
[ENUM.ReverseRefundWay.USER_MANUAL]: '主动退款',
|
|
420
|
+
[ENUM.ReverseRefundWay.REVIEW]: '审核退款',
|
|
421
|
+
[ENUM.ReverseRefundWay.FAST]: '极速退款',
|
|
422
|
+
[ENUM.ReverseRefundWay.MERCHANT_MANUAL]: '商家主动退款',
|
|
423
|
+
};
|
|
424
|
+
})(ENUM_CN || (exports.ENUM_CN = ENUM_CN = {}));
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as POS from './modules/pos';
|
|
2
2
|
export * as ROS from './modules/ros';
|
|
3
|
-
export { ENUM, EXCHANGE_ENUM } from './enums';
|
|
3
|
+
export { ENUM, ENUM_CN, EXCHANGE_ENUM } from './enums';
|
|
4
4
|
export * as CONSTS from './consts';
|
|
5
5
|
export * as DTO from './types';
|
|
6
6
|
export { verificationService } from './modules/verification/service';
|
package/index.js
CHANGED
|
@@ -33,11 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.verificationService = exports.DTO = exports.CONSTS = exports.EXCHANGE_ENUM = exports.ENUM = exports.ROS = exports.POS = void 0;
|
|
36
|
+
exports.verificationService = exports.DTO = exports.CONSTS = exports.EXCHANGE_ENUM = exports.ENUM_CN = exports.ENUM = exports.ROS = exports.POS = void 0;
|
|
37
37
|
exports.POS = __importStar(require("./modules/pos"));
|
|
38
38
|
exports.ROS = __importStar(require("./modules/ros"));
|
|
39
39
|
var enums_1 = require("./enums");
|
|
40
40
|
Object.defineProperty(exports, "ENUM", { enumerable: true, get: function () { return enums_1.ENUM; } });
|
|
41
|
+
Object.defineProperty(exports, "ENUM_CN", { enumerable: true, get: function () { return enums_1.ENUM_CN; } });
|
|
41
42
|
Object.defineProperty(exports, "EXCHANGE_ENUM", { enumerable: true, get: function () { return enums_1.EXCHANGE_ENUM; } });
|
|
42
43
|
exports.CONSTS = __importStar(require("./consts"));
|
|
43
44
|
exports.DTO = __importStar(require("./types"));
|
|
@@ -750,6 +750,17 @@ export declare namespace PosOrderQueryService {
|
|
|
750
750
|
/** 积分数 */
|
|
751
751
|
pointNum: number;
|
|
752
752
|
};
|
|
753
|
+
/** 物流信息 */
|
|
754
|
+
logisticsInfo?: {
|
|
755
|
+
/** 物流公司 */
|
|
756
|
+
company: string;
|
|
757
|
+
/** 物流单号 */
|
|
758
|
+
logisticsNo: string;
|
|
759
|
+
/** 发货时间 */
|
|
760
|
+
deliveryTime: number;
|
|
761
|
+
/** 收货时间 */
|
|
762
|
+
receiveTime: number;
|
|
763
|
+
};
|
|
753
764
|
}
|
|
754
765
|
interface IGetLastOrderAddrByProductPick {
|
|
755
766
|
/** 收货人 */
|