@be-link/ecommerce-trade-service-node-sdk 0.0.50 → 0.0.52

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/enums.d.ts CHANGED
@@ -192,4 +192,11 @@ export declare namespace ENUM {
192
192
  /** 积分抵扣 */
193
193
  POINT_REDUCE = "POINT_REDUCE"
194
194
  }
195
+ /** 活动类型 */
196
+ enum ActivityType {
197
+ /** 支付有礼 */
198
+ FREE_GIFT = "FREE_GIFT",
199
+ /** 满赠 */
200
+ FULL_GIFT = "FULL_GIFT"
201
+ }
195
202
  }
package/enums.js CHANGED
@@ -214,4 +214,12 @@ var ENUM;
214
214
  /** 积分抵扣 */
215
215
  OrderPromotionType["POINT_REDUCE"] = "POINT_REDUCE";
216
216
  })(OrderPromotionType = ENUM.OrderPromotionType || (ENUM.OrderPromotionType = {}));
217
+ /** 活动类型 */
218
+ let ActivityType;
219
+ (function (ActivityType) {
220
+ /** 支付有礼 */
221
+ ActivityType["FREE_GIFT"] = "FREE_GIFT";
222
+ /** 满赠 */
223
+ ActivityType["FULL_GIFT"] = "FULL_GIFT";
224
+ })(ActivityType = ENUM.ActivityType || (ENUM.ActivityType = {}));
217
225
  })(ENUM || (exports.ENUM = ENUM = {}));
@@ -0,0 +1,7 @@
1
+ import BaseService from '../../BaseService';
2
+ declare class OrderCoreByJobService extends BaseService {
3
+ protected prefixUrl: string;
4
+ autoConfirmReceive(): Promise<void>;
5
+ }
6
+ export declare const orderCoreByJobService: OrderCoreByJobService;
7
+ export default orderCoreByJobService;
@@ -0,0 +1,34 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.orderCoreByJobService = void 0;
13
+ const tsoa_1 = require("tsoa");
14
+ const http_1 = require("../../../utils/http");
15
+ const BaseService_1 = __importDefault(require("../../BaseService"));
16
+ let OrderCoreByJobService = class OrderCoreByJobService extends BaseService_1.default {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.prefixUrl = '/pos/core/job';
20
+ }
21
+ autoConfirmReceive() {
22
+ return (0, http_1.callApi)(this.getApiUrl(this.autoConfirmReceive), {});
23
+ }
24
+ };
25
+ __decorate([
26
+ (0, tsoa_1.OperationId)('订单自动确认收货'),
27
+ (0, tsoa_1.Post)('auto-confirm-receive')
28
+ ], OrderCoreByJobService.prototype, "autoConfirmReceive", null);
29
+ OrderCoreByJobService = __decorate([
30
+ (0, tsoa_1.Route)('pos/core/job'),
31
+ (0, tsoa_1.Tags)('PosOrderJob')
32
+ ], OrderCoreByJobService);
33
+ exports.orderCoreByJobService = new OrderCoreByJobService();
34
+ exports.default = exports.orderCoreByJobService;
@@ -52,6 +52,12 @@ export declare namespace PosCoreService {
52
52
  /** 详细地址 */
53
53
  detailAddress: string;
54
54
  }
55
+ interface ISetOrderTaskActivity {
56
+ /** 订单ID */
57
+ orderId: string;
58
+ /** 活动类型(支付有礼、满赠) */
59
+ activityType: ENUM.ActivityType;
60
+ }
55
61
  }
56
62
  namespace Response {
57
63
  type IShipOrder = void;
@@ -67,6 +73,7 @@ export declare namespace PosCoreService {
67
73
  }>;
68
74
  }
69
75
  type IUpdateOrderAddress = void;
76
+ type ISetOrderTaskActivity = void;
70
77
  }
71
78
  }
72
79
  namespace ByUser {
@@ -149,5 +156,11 @@ export declare namespace PosCoreService {
149
156
  batchShipOrder(request: ByWeb.Request.IBatchShipOrder, req: any): Promise<ByWeb.Response.IBatchShipOrder>;
150
157
  /** 修改收货地址 */
151
158
  updateOrderAddress(request: ByWeb.Request.IUpdateOrderAddress, req: any): Promise<ByWeb.Response.IUpdateOrderAddress>;
159
+ /** 订单任务活动打标 */
160
+ setOrderTaskActivity(request: ByWeb.Request.ISetOrderTaskActivity, req: any): Promise<ByWeb.Response.ISetOrderTaskActivity>;
161
+ }
162
+ interface JobController {
163
+ /** 订单自动确认收货 */
164
+ autoConfirmReceive(request: any, req: any): Promise<void>;
152
165
  }
153
166
  }
@@ -5,6 +5,7 @@ declare class OrderCoreByWebService extends BaseService {
5
5
  shipOrder(request: PosCoreService.ByWeb.Request.IShipOrder): Promise<PosCoreService.ByWeb.Response.IShipOrder>;
6
6
  batchShipOrder(request: PosCoreService.ByWeb.Request.IBatchShipOrder): Promise<PosCoreService.ByWeb.Response.IBatchShipOrder>;
7
7
  updateOrderAddress(request: PosCoreService.ByWeb.Request.IUpdateOrderAddress): Promise<PosCoreService.ByWeb.Response.IUpdateOrderAddress>;
8
+ setOrderTaskActivity(request: PosCoreService.ByWeb.Request.ISetOrderTaskActivity): Promise<PosCoreService.ByWeb.Response.ISetOrderTaskActivity>;
8
9
  }
9
10
  export declare const coreByWebService: OrderCoreByWebService;
10
11
  export default coreByWebService;
@@ -30,6 +30,9 @@ let OrderCoreByWebService = class OrderCoreByWebService extends BaseService_1.de
30
30
  updateOrderAddress(request) {
31
31
  return (0, http_1.callApi)(this.getApiUrl(this.updateOrderAddress), request);
32
32
  }
33
+ setOrderTaskActivity(request) {
34
+ return (0, http_1.callApi)(this.getApiUrl(this.setOrderTaskActivity), request);
35
+ }
33
36
  };
34
37
  __decorate([
35
38
  (0, tsoa_1.OperationId)('单个订单发货, 提供给B端'),
@@ -46,6 +49,11 @@ __decorate([
46
49
  (0, tsoa_1.Post)('update-order-address'),
47
50
  __param(0, (0, tsoa_1.Body)())
48
51
  ], OrderCoreByWebService.prototype, "updateOrderAddress", null);
52
+ __decorate([
53
+ (0, tsoa_1.OperationId)('订单任务活动打标'),
54
+ (0, tsoa_1.Post)('set-order-task-activity'),
55
+ __param(0, (0, tsoa_1.Body)())
56
+ ], OrderCoreByWebService.prototype, "setOrderTaskActivity", null);
49
57
  OrderCoreByWebService = __decorate([
50
58
  (0, tsoa_1.Route)('pos/core/web'),
51
59
  (0, tsoa_1.Tags)('PosOrderCore')
@@ -49,7 +49,6 @@ export declare namespace PosOrderQueryService {
49
49
  }
50
50
  interface ILiveRoom {
51
51
  liveRoomIds?: string[];
52
- liveRoomGroupIds?: string[];
53
52
  }
54
53
  interface IOrderList {
55
54
  /** 查询条件 */
@@ -93,6 +92,14 @@ export declare namespace PosOrderQueryService {
93
92
  /** 商品ID */
94
93
  productId: string;
95
94
  }
95
+ interface IExportOrderData {
96
+ /** 订单ID列表(可选) */
97
+ orderIds?: string[];
98
+ /** 页码 */
99
+ pageIndex: number;
100
+ /** 每页数量 */
101
+ pageSize: number;
102
+ }
96
103
  }
97
104
  namespace Response {
98
105
  interface IListItem {
@@ -152,6 +159,12 @@ export declare namespace PosOrderQueryService {
152
159
  /** 运费模板(省级ID列表) */
153
160
  freightTemplate: string[] | null;
154
161
  }
162
+ interface IExportOrderData {
163
+ /** 表头 */
164
+ headers: string[];
165
+ /** 数据 */
166
+ data: string[][];
167
+ }
155
168
  interface IOrderDetail {
156
169
  order: {
157
170
  orderId: string;
@@ -204,6 +217,7 @@ export declare namespace PosOrderQueryService {
204
217
  specName: string;
205
218
  specCode: string;
206
219
  unitPrice: number;
220
+ productPick: string;
207
221
  }[];
208
222
  orderTotals: {
209
223
  totalAmount: number;
@@ -264,6 +278,8 @@ export declare namespace PosOrderQueryService {
264
278
  orderDetail(request: Request.IOrderDetail, req: any): Promise<Response.IOrderDetail>;
265
279
  /** 查询订单收货地址 */
266
280
  getOrderAddress(request: Request.IGetOrderAddress, req: any): Promise<Response.IGetOrderAddress>;
281
+ /** 导出订单数据 */
282
+ orderExport(request: Request.IExportOrderData, req: any): Promise<Response.IExportOrderData>;
267
283
  }
268
284
  }
269
285
  namespace ByUser {
@@ -8,6 +8,7 @@ declare class OrderQueryByWebService extends BaseService {
8
8
  orderById(request: PosOrderQueryService.ByWeb.Request.IOrderById): Promise<DTO.PosQueryResult>;
9
9
  orderDetail(request: PosOrderQueryService.ByWeb.Request.IOrderDetail): Promise<PosOrderQueryService.ByWeb.Response.IOrderDetail>;
10
10
  getOrderAddress(request: PosOrderQueryService.ByWeb.Request.IGetOrderAddress): Promise<PosOrderQueryService.ByWeb.Response.IGetOrderAddress>;
11
+ orderExport(request: PosOrderQueryService.ByWeb.Request.IExportOrderData): Promise<PosOrderQueryService.ByWeb.Response.IExportOrderData>;
11
12
  }
12
13
  export declare const queryByWebService: OrderQueryByWebService;
13
14
  export default queryByWebService;
@@ -36,6 +36,9 @@ let OrderQueryByWebService = class OrderQueryByWebService extends BaseService_1.
36
36
  getOrderAddress(request) {
37
37
  return (0, http_1.callApi)(this.getApiUrl(this.getOrderAddress), request);
38
38
  }
39
+ orderExport(request) {
40
+ return (0, http_1.callApi)(this.getApiUrl(this.orderExport), request);
41
+ }
39
42
  };
40
43
  __decorate([
41
44
  (0, tsoa_1.OperationId)('订单列表查询,提供给外部服务'),
@@ -62,6 +65,11 @@ __decorate([
62
65
  (0, tsoa_1.Post)('get-order-address'),
63
66
  __param(0, (0, tsoa_1.Body)())
64
67
  ], OrderQueryByWebService.prototype, "getOrderAddress", null);
68
+ __decorate([
69
+ (0, tsoa_1.OperationId)('导出订单数据'),
70
+ (0, tsoa_1.Post)('export'),
71
+ __param(0, (0, tsoa_1.Body)())
72
+ ], OrderQueryByWebService.prototype, "orderExport", null);
65
73
  OrderQueryByWebService = __decorate([
66
74
  (0, tsoa_1.Route)('pos/query/web'),
67
75
  (0, tsoa_1.Tags)('PosOrderQuery')
@@ -1,4 +1,5 @@
1
1
  import * as DTO from '../../../types';
2
+ import { ENUM } from '../../..';
2
3
  export declare namespace RosOrderQueryService {
3
4
  namespace Entity { }
4
5
  namespace Request {
@@ -42,4 +43,59 @@ export declare namespace RosOrderQueryService {
42
43
  interface QueryByWebController {
43
44
  orderList(request: RosOrderQueryService.Request.IOrderList): Promise<DTO.ReverseQueryResult[]>;
44
45
  }
46
+ namespace ByUser {
47
+ namespace Request {
48
+ interface IRefundOrderList {
49
+ userId: string;
50
+ status?: ENUM.ReverseOrderStatus;
51
+ pageIndex: number;
52
+ pageSize: number;
53
+ }
54
+ interface IRefundOrderDetail {
55
+ reverseOrderId: string;
56
+ }
57
+ }
58
+ namespace Response {
59
+ interface IRefundOrderListItem {
60
+ orderId: string;
61
+ productName: string;
62
+ productSpec: string;
63
+ quantity: number;
64
+ unitPrice: number;
65
+ productImage: string;
66
+ totalAmount: number;
67
+ actualAmount: number;
68
+ orderStatus: ENUM.OrderStatus;
69
+ reverseOrderStatus: ENUM.ReverseOrderStatus;
70
+ createdAt: number;
71
+ productPick: string;
72
+ source: ENUM.OrderSource;
73
+ orderType: ENUM.OrderType;
74
+ }
75
+ interface IRefundOrderList {
76
+ list: IRefundOrderListItem[];
77
+ total: number;
78
+ }
79
+ interface IRefundOrderDetail {
80
+ basic: {
81
+ reverseOrderId: string;
82
+ status: ENUM.ReverseOrderStatus;
83
+ arrivalStatus: ENUM.ReverseArrivalStatus;
84
+ amount: number;
85
+ reason: string;
86
+ applyReason: string;
87
+ };
88
+ product: {
89
+ productImage: string;
90
+ productName: string;
91
+ productSpec: string;
92
+ unitPrice: number;
93
+ };
94
+ }
95
+ }
96
+ }
97
+ interface QueryByUserController {
98
+ orderList(request: RosOrderQueryService.ByUser.Request.IRefundOrderList): Promise<RosOrderQueryService.ByUser.Response.IRefundOrderList>;
99
+ orderDetail(request: RosOrderQueryService.ByUser.Request.IRefundOrderDetail): Promise<RosOrderQueryService.ByUser.Response.IRefundOrderDetail>;
100
+ }
45
101
  }
@@ -0,0 +1,9 @@
1
+ import { RosOrderQueryService } from './types';
2
+ import BaseService from '../../BaseService';
3
+ declare class RosOrderQueryByUserService extends BaseService implements RosOrderQueryService.QueryByUserController {
4
+ protected prefixUrl: string;
5
+ orderList(request: RosOrderQueryService.ByUser.Request.IRefundOrderList): Promise<RosOrderQueryService.ByUser.Response.IRefundOrderList>;
6
+ orderDetail(request: RosOrderQueryService.ByUser.Request.IRefundOrderDetail): Promise<RosOrderQueryService.ByUser.Response.IRefundOrderDetail>;
7
+ }
8
+ export declare const orderQueryByUserService: RosOrderQueryByUserService;
9
+ export default orderQueryByUserService;
@@ -0,0 +1,46 @@
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.orderQueryByUserService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../../BaseService"));
19
+ let RosOrderQueryByUserService = class RosOrderQueryByUserService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/ros/query/user';
23
+ }
24
+ orderList(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.orderList), request);
26
+ }
27
+ orderDetail(request) {
28
+ return (0, http_1.callApi)(this.getApiUrl(this.orderDetail), request);
29
+ }
30
+ };
31
+ __decorate([
32
+ (0, tsoa_1.OperationId)('查询用户退款订单列表'),
33
+ (0, tsoa_1.Post)('order-list'),
34
+ __param(0, (0, tsoa_1.Body)())
35
+ ], RosOrderQueryByUserService.prototype, "orderList", null);
36
+ __decorate([
37
+ (0, tsoa_1.OperationId)('查询退款订单详情'),
38
+ (0, tsoa_1.Post)('order-detail'),
39
+ __param(0, (0, tsoa_1.Body)())
40
+ ], RosOrderQueryByUserService.prototype, "orderDetail", null);
41
+ RosOrderQueryByUserService = __decorate([
42
+ (0, tsoa_1.Route)('ros/query/user'),
43
+ (0, tsoa_1.Tags)('RosOrderQuery')
44
+ ], RosOrderQueryByUserService);
45
+ exports.orderQueryByUserService = new RosOrderQueryByUserService();
46
+ exports.default = exports.orderQueryByUserService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-trade-service-node-sdk",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "description": "EcommerceTradeService Node.js SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",