@be-link/ecommerce-trade-service-node-sdk 0.0.16 → 0.0.18
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,19 +2,25 @@ import { ENUMS } from '../../..';
|
|
|
2
2
|
export declare namespace PosCoreService {
|
|
3
3
|
namespace ByWeb {
|
|
4
4
|
namespace Request {
|
|
5
|
-
interface
|
|
5
|
+
interface IShipOrder {
|
|
6
|
+
/** 操作人 */
|
|
7
|
+
operator: string;
|
|
6
8
|
/** 订单ID */
|
|
7
9
|
orderId: string;
|
|
8
|
-
/**
|
|
10
|
+
/** 发货方式:WITH_LOGISTICS-需物流发货,WITHOUT_LOGISTICS-无物流发货 */
|
|
11
|
+
shipType: 'WITH_LOGISTICS' | 'WITHOUT_LOGISTICS';
|
|
12
|
+
/** 物流公司(需物流发货时必填) */
|
|
9
13
|
logisticsCompany?: string;
|
|
10
|
-
/**
|
|
14
|
+
/** 物流单号(需物流发货时必填) */
|
|
11
15
|
logisticsNo?: string;
|
|
12
16
|
}
|
|
13
|
-
interface
|
|
17
|
+
interface IBatchShipOrder {
|
|
14
18
|
/** 操作人 */
|
|
15
19
|
operator: string;
|
|
16
|
-
/**
|
|
17
|
-
|
|
20
|
+
/** 发货方式:WITH_LOGISTICS-需物流发货,WITHOUT_LOGISTICS-无物流发货 */
|
|
21
|
+
shipType: 'WITH_LOGISTICS' | 'WITHOUT_LOGISTICS';
|
|
22
|
+
/** Excel文件URL */
|
|
23
|
+
fileUrl: string;
|
|
18
24
|
}
|
|
19
25
|
interface IUpdateOrderAddress {
|
|
20
26
|
/** 用户ID */
|
|
@@ -37,6 +43,17 @@ export declare namespace PosCoreService {
|
|
|
37
43
|
}
|
|
38
44
|
namespace Response {
|
|
39
45
|
type IShipOrder = void;
|
|
46
|
+
interface IBatchShipOrder {
|
|
47
|
+
/** 成功发货的订单数量 */
|
|
48
|
+
successCount: number;
|
|
49
|
+
/** 失败的订单列表 */
|
|
50
|
+
failedOrders: Array<{
|
|
51
|
+
/** 订单号 */
|
|
52
|
+
orderId: string;
|
|
53
|
+
/** 失败原因 */
|
|
54
|
+
reason: string;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
40
57
|
type IUpdateOrderAddress = void;
|
|
41
58
|
}
|
|
42
59
|
}
|
|
@@ -115,8 +132,10 @@ export declare namespace PosCoreService {
|
|
|
115
132
|
confirmReceive(request: ByUser.Request.IConfirmReceive, req: any): Promise<ByUser.Response.IConfirmReceive>;
|
|
116
133
|
}
|
|
117
134
|
interface CoreByWebController {
|
|
118
|
-
/**
|
|
135
|
+
/** 单个订单发货 */
|
|
119
136
|
shipOrder(request: ByWeb.Request.IShipOrder, req: any): Promise<ByWeb.Response.IShipOrder>;
|
|
137
|
+
/** 批量订单发货 */
|
|
138
|
+
batchShipOrder(request: ByWeb.Request.IBatchShipOrder, req: any): Promise<ByWeb.Response.IBatchShipOrder>;
|
|
120
139
|
/** 修改收货地址 */
|
|
121
140
|
updateOrderAddress(request: ByWeb.Request.IUpdateOrderAddress, req: any): Promise<ByWeb.Response.IUpdateOrderAddress>;
|
|
122
141
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PosCoreService } from './types';
|
|
2
2
|
import BaseService from '../../BaseService';
|
|
3
|
-
declare class OrderCoreByUserService extends BaseService
|
|
3
|
+
declare class OrderCoreByUserService extends BaseService {
|
|
4
4
|
protected prefixUrl: string;
|
|
5
5
|
orderCreate(request: PosCoreService.ByUser.Request.IOrderCreate): Promise<PosCoreService.ByUser.Response.IOrderCreate>;
|
|
6
6
|
updateAddress(request: PosCoreService.ByUser.Request.IUpdateAddress): Promise<void>;
|
|
@@ -3,6 +3,7 @@ import BaseService from '../../BaseService';
|
|
|
3
3
|
declare class OrderCoreByWebService extends BaseService {
|
|
4
4
|
protected prefixUrl: string;
|
|
5
5
|
shipOrder(request: PosCoreService.ByWeb.Request.IShipOrder): Promise<PosCoreService.ByWeb.Response.IShipOrder>;
|
|
6
|
+
batchShipOrder(request: PosCoreService.ByWeb.Request.IBatchShipOrder): Promise<PosCoreService.ByWeb.Response.IBatchShipOrder>;
|
|
6
7
|
updateOrderAddress(request: PosCoreService.ByWeb.Request.IUpdateOrderAddress): Promise<PosCoreService.ByWeb.Response.IUpdateOrderAddress>;
|
|
7
8
|
}
|
|
8
9
|
export declare const coreByWebService: OrderCoreByWebService;
|
|
@@ -24,15 +24,23 @@ let OrderCoreByWebService = class OrderCoreByWebService extends BaseService_1.de
|
|
|
24
24
|
shipOrder(request) {
|
|
25
25
|
return (0, http_1.callApi)(this.getApiUrl(this.shipOrder), request);
|
|
26
26
|
}
|
|
27
|
+
batchShipOrder(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchShipOrder), request);
|
|
29
|
+
}
|
|
27
30
|
updateOrderAddress(request) {
|
|
28
31
|
return (0, http_1.callApi)(this.getApiUrl(this.updateOrderAddress), request);
|
|
29
32
|
}
|
|
30
33
|
};
|
|
31
34
|
__decorate([
|
|
32
|
-
(0, tsoa_1.OperationId)('
|
|
35
|
+
(0, tsoa_1.OperationId)('单个订单发货, 提供给B端'),
|
|
33
36
|
(0, tsoa_1.Post)('ship-order'),
|
|
34
37
|
__param(0, (0, tsoa_1.Body)())
|
|
35
38
|
], OrderCoreByWebService.prototype, "shipOrder", null);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, tsoa_1.OperationId)('批量订单发货, 提供给B端'),
|
|
41
|
+
(0, tsoa_1.Post)('batch-ship-order'),
|
|
42
|
+
__param(0, (0, tsoa_1.Body)())
|
|
43
|
+
], OrderCoreByWebService.prototype, "batchShipOrder", null);
|
|
36
44
|
__decorate([
|
|
37
45
|
(0, tsoa_1.OperationId)('修改收货地址, 提供给B端'),
|
|
38
46
|
(0, tsoa_1.Post)('update-order-address'),
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/ecommerce-trade-service-node-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "EcommerceTradeService Node.js SDK",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"author": "",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"publishConfig": {
|