@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.5 → 0.0.6
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../BaseService';
|
|
3
|
+
declare class LogisticsService extends BaseService implements Service.LogisticsController {
|
|
4
|
+
protected prefixUrl: string;
|
|
5
|
+
batchImportWaybill(request: Service.Request.BatchImportWaybill): Promise<void>;
|
|
6
|
+
getWaybillList(request: Service.Request.GetWaybillList): Promise<Service.Response.GetWaybillList>;
|
|
7
|
+
writeWaybill(request: Service.Request.WriteWaybill): Promise<void>;
|
|
8
|
+
getCarrierList(request: Service.Request.GetCarrierList): Promise<Service.Response.GetCarrierList>;
|
|
9
|
+
getStoreStockInOrderList(request: Service.Request.GetStoreStockInOrderList): Promise<Service.Response.GetStoreStockInOrderList>;
|
|
10
|
+
getStoreStockInOrderDetailList(request: Service.Request.GetStoreStockInOrderDetailList): Promise<Service.Response.GetStoreStockInOrderDetailList>;
|
|
11
|
+
getStoreStockInOrderLogisticsList(request: Service.Request.GetStoreStockInOrderLogisticsList): Promise<Service.Response.GetStoreStockInOrderLogisticsList>;
|
|
12
|
+
getProductList(request: Service.Request.GetProductList): Promise<Service.Response.GetProductList>;
|
|
13
|
+
}
|
|
14
|
+
export declare const logisticsService: LogisticsService;
|
|
15
|
+
export default logisticsService;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.logisticsService = void 0;
|
|
16
|
+
const tsoa_1 = require("tsoa");
|
|
17
|
+
const http_1 = require("../../utils/http");
|
|
18
|
+
const BaseService_1 = __importDefault(require("../BaseService"));
|
|
19
|
+
let LogisticsService = class LogisticsService extends BaseService_1.default {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.prefixUrl = '/logistics';
|
|
23
|
+
}
|
|
24
|
+
batchImportWaybill(request) {
|
|
25
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchImportWaybill), request);
|
|
26
|
+
}
|
|
27
|
+
getWaybillList(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getWaybillList), request);
|
|
29
|
+
}
|
|
30
|
+
writeWaybill(request) {
|
|
31
|
+
return (0, http_1.callApi)(this.getApiUrl(this.writeWaybill), request);
|
|
32
|
+
}
|
|
33
|
+
getCarrierList(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getCarrierList), request);
|
|
35
|
+
}
|
|
36
|
+
getStoreStockInOrderList(request) {
|
|
37
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderList), request);
|
|
38
|
+
}
|
|
39
|
+
getStoreStockInOrderDetailList(request) {
|
|
40
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderDetailList), request);
|
|
41
|
+
}
|
|
42
|
+
getStoreStockInOrderLogisticsList(request) {
|
|
43
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getStoreStockInOrderLogisticsList), request);
|
|
44
|
+
}
|
|
45
|
+
getProductList(request) {
|
|
46
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getProductList), request);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, tsoa_1.OperationId)('批量导入运货单'),
|
|
51
|
+
(0, tsoa_1.Post)('batch-import-waybill'),
|
|
52
|
+
__param(0, (0, tsoa_1.Body)())
|
|
53
|
+
], LogisticsService.prototype, "batchImportWaybill", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, tsoa_1.OperationId)('查询运货单列表'),
|
|
56
|
+
(0, tsoa_1.Post)('get-waybill-list'),
|
|
57
|
+
__param(0, (0, tsoa_1.Body)())
|
|
58
|
+
], LogisticsService.prototype, "getWaybillList", null);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, tsoa_1.OperationId)('配货单单独写入运货单'),
|
|
61
|
+
(0, tsoa_1.Post)('write-waybill'),
|
|
62
|
+
__param(0, (0, tsoa_1.Body)())
|
|
63
|
+
], LogisticsService.prototype, "writeWaybill", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, tsoa_1.OperationId)('运货单公司编码列表'),
|
|
66
|
+
(0, tsoa_1.Post)('get-carrier-list'),
|
|
67
|
+
__param(0, (0, tsoa_1.Body)())
|
|
68
|
+
], LogisticsService.prototype, "getCarrierList", null);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, tsoa_1.OperationId)('门店入库单列表'),
|
|
71
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-list'),
|
|
72
|
+
__param(0, (0, tsoa_1.Body)())
|
|
73
|
+
], LogisticsService.prototype, "getStoreStockInOrderList", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, tsoa_1.OperationId)('门店入库单详情商品列表'),
|
|
76
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-detail-list'),
|
|
77
|
+
__param(0, (0, tsoa_1.Body)())
|
|
78
|
+
], LogisticsService.prototype, "getStoreStockInOrderDetailList", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, tsoa_1.OperationId)('门店入库单运货单物流信息列表'),
|
|
81
|
+
(0, tsoa_1.Post)('get-store-stock-in-order-logistics-list'),
|
|
82
|
+
__param(0, (0, tsoa_1.Body)())
|
|
83
|
+
], LogisticsService.prototype, "getStoreStockInOrderLogisticsList", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, tsoa_1.OperationId)('门店入库单商品列表'),
|
|
86
|
+
(0, tsoa_1.Post)('get-product-list'),
|
|
87
|
+
__param(0, (0, tsoa_1.Body)())
|
|
88
|
+
], LogisticsService.prototype, "getProductList", null);
|
|
89
|
+
LogisticsService = __decorate([
|
|
90
|
+
(0, tsoa_1.Route)('logistics'),
|
|
91
|
+
(0, tsoa_1.Tags)('Logistics')
|
|
92
|
+
], LogisticsService);
|
|
93
|
+
exports.logisticsService = new LogisticsService();
|
|
94
|
+
exports.default = exports.logisticsService;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { GetTrackingInfoAccepted } from '@be-link/17trak-api-sdk';
|
|
2
|
+
import { FastifyRequest } from 'fastify';
|
|
3
|
+
export declare namespace Service {
|
|
4
|
+
/** 物流信息实体 */
|
|
5
|
+
interface Logistics {
|
|
6
|
+
/** 运货单ID */
|
|
7
|
+
id: string;
|
|
8
|
+
/** 配货单ID */
|
|
9
|
+
allocationOrderId: string;
|
|
10
|
+
/** 门店入库单ID */
|
|
11
|
+
storeStockInOrderId: string;
|
|
12
|
+
/** 分组id-适用于Excel导入时 */
|
|
13
|
+
groupId: string;
|
|
14
|
+
/** 运单号 */
|
|
15
|
+
num: string;
|
|
16
|
+
/** 公司编码 */
|
|
17
|
+
carrier: number;
|
|
18
|
+
/** 运单状态 */
|
|
19
|
+
status: number;
|
|
20
|
+
/** 第三方运单状态 */
|
|
21
|
+
statusText: string;
|
|
22
|
+
/** 收货手机号码 */
|
|
23
|
+
phone: string;
|
|
24
|
+
/** 订阅状态 */
|
|
25
|
+
subscribeStatus: number;
|
|
26
|
+
/** 订阅失败信息 */
|
|
27
|
+
subscribeMessage: string;
|
|
28
|
+
/** 订阅时间 */
|
|
29
|
+
subscribeTime: number;
|
|
30
|
+
}
|
|
31
|
+
/** 入库单详情 */
|
|
32
|
+
interface StockInOrder {
|
|
33
|
+
logistics: string;
|
|
34
|
+
supplyName: string;
|
|
35
|
+
warehouseId: string;
|
|
36
|
+
storeId: string;
|
|
37
|
+
creator: string;
|
|
38
|
+
updater: string;
|
|
39
|
+
type: string;
|
|
40
|
+
status: string;
|
|
41
|
+
logisticStatus: number;
|
|
42
|
+
receivedAt: number;
|
|
43
|
+
receivableQuantity: number;
|
|
44
|
+
receivedQuantity: number;
|
|
45
|
+
remark: string;
|
|
46
|
+
extra: any;
|
|
47
|
+
deletedAt: number;
|
|
48
|
+
}
|
|
49
|
+
interface Product {
|
|
50
|
+
}
|
|
51
|
+
namespace Request {
|
|
52
|
+
/** 批量导入运货单 */
|
|
53
|
+
interface BatchImportWaybill {
|
|
54
|
+
/** 运货单列表Excel地址(cos地址) */
|
|
55
|
+
excel: string;
|
|
56
|
+
}
|
|
57
|
+
/** 查询运货单列表 */
|
|
58
|
+
interface GetWaybillList {
|
|
59
|
+
/** 页码 */
|
|
60
|
+
pageIndex: number;
|
|
61
|
+
/** 每页数量 */
|
|
62
|
+
pageSize?: number;
|
|
63
|
+
/** 运货单号 */
|
|
64
|
+
num?: string;
|
|
65
|
+
/** 配货单号 */
|
|
66
|
+
allocationOrderId?: string;
|
|
67
|
+
/** 门店入库单号 */
|
|
68
|
+
storeStockInOrderId?: string;
|
|
69
|
+
/** 快递公司编码 */
|
|
70
|
+
carrier?: number;
|
|
71
|
+
}
|
|
72
|
+
/** 配货单单独写入运货单 */
|
|
73
|
+
interface WriteWaybill {
|
|
74
|
+
/** 配货单ID */
|
|
75
|
+
allocationOrderId: string;
|
|
76
|
+
/** 快递单号 */
|
|
77
|
+
num: string;
|
|
78
|
+
/** 快递公司编码 */
|
|
79
|
+
carrier: number;
|
|
80
|
+
}
|
|
81
|
+
/** 运货单公司编码列表 */
|
|
82
|
+
interface GetCarrierList {
|
|
83
|
+
/** 页码 */
|
|
84
|
+
pageIndex: number;
|
|
85
|
+
/** 每页数量 */
|
|
86
|
+
pageSize: number;
|
|
87
|
+
/** 关键词 */
|
|
88
|
+
keyword?: string;
|
|
89
|
+
}
|
|
90
|
+
/** 门店入库单列表 */
|
|
91
|
+
interface GetStoreStockInOrderList {
|
|
92
|
+
/** 页码 */
|
|
93
|
+
pageIndex: number;
|
|
94
|
+
/** 每页数量 */
|
|
95
|
+
pageSize?: number;
|
|
96
|
+
/** 门店id */
|
|
97
|
+
storeId: string;
|
|
98
|
+
/** 入库单状态 */
|
|
99
|
+
logisticStatus: number;
|
|
100
|
+
/** 入库单生成日期-介于开始时间 */
|
|
101
|
+
start?: number;
|
|
102
|
+
/** 入库单生成日期-介于结束时间 */
|
|
103
|
+
end?: string;
|
|
104
|
+
}
|
|
105
|
+
/** 门店入库单详情商品列表 */
|
|
106
|
+
interface GetStoreStockInOrderDetailList {
|
|
107
|
+
/** 门店入库单ID */
|
|
108
|
+
storeStockInOrderId: string;
|
|
109
|
+
/** 页码 */
|
|
110
|
+
pageIndex: number;
|
|
111
|
+
/** 每页数量 */
|
|
112
|
+
pageSize?: number;
|
|
113
|
+
}
|
|
114
|
+
/** 门店入库单运货单物流信息列表 */
|
|
115
|
+
interface GetStoreStockInOrderLogisticsList {
|
|
116
|
+
/** 门店入库单ID */
|
|
117
|
+
storeStockInOrderId: string;
|
|
118
|
+
}
|
|
119
|
+
/** 门店入库单商品列表 */
|
|
120
|
+
interface GetProductList {
|
|
121
|
+
/** 页码 */
|
|
122
|
+
pageIndex: number;
|
|
123
|
+
/** 每页数量 */
|
|
124
|
+
pageSize?: number;
|
|
125
|
+
/** 门店入库单ID */
|
|
126
|
+
storeStockInOrderId: string;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
namespace Response {
|
|
130
|
+
/** 运货单列表 */
|
|
131
|
+
interface GetWaybillList {
|
|
132
|
+
/** 运货单总数 */
|
|
133
|
+
total: number;
|
|
134
|
+
/** 运货单列表 */
|
|
135
|
+
data: Logistics[];
|
|
136
|
+
}
|
|
137
|
+
/** 运货单公司编码列表 */
|
|
138
|
+
interface GetCarrierList {
|
|
139
|
+
/** 公司编码总数 */
|
|
140
|
+
total: number;
|
|
141
|
+
/** 公司编码列表 公司名称->公司代码 */
|
|
142
|
+
data: Record<string, number>;
|
|
143
|
+
}
|
|
144
|
+
/** 门店入库单列表 */
|
|
145
|
+
interface GetStoreStockInOrderList {
|
|
146
|
+
/** 门店入库单总数 */
|
|
147
|
+
total: number;
|
|
148
|
+
/** 入库单列表 */
|
|
149
|
+
data: StockInOrder[];
|
|
150
|
+
}
|
|
151
|
+
/** 门店入库单详情 */
|
|
152
|
+
interface GetStoreStockInOrderDetailList {
|
|
153
|
+
/** 入库单详情 */
|
|
154
|
+
stockInOrder: StockInOrder;
|
|
155
|
+
}
|
|
156
|
+
/** 门店入库单商品列表 */
|
|
157
|
+
interface GetProductList {
|
|
158
|
+
/** 总数 */
|
|
159
|
+
total: number;
|
|
160
|
+
/** 商品列表 */
|
|
161
|
+
data: Product[];
|
|
162
|
+
}
|
|
163
|
+
/** 门店入库单运货单物流信息列表 */
|
|
164
|
+
interface GetStoreStockInOrderLogisticsList {
|
|
165
|
+
/** 入库单运单信息列表 */
|
|
166
|
+
data: GetTrackingInfoAccepted;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
interface LogisticsController {
|
|
170
|
+
/** 批量导入运货单 */
|
|
171
|
+
batchImportWaybill(request: Request.BatchImportWaybill, req?: FastifyRequest): Promise<void>;
|
|
172
|
+
/** 查询运货单列表 */
|
|
173
|
+
getWaybillList(request: Request.GetWaybillList, req?: FastifyRequest): Promise<Response.GetWaybillList>;
|
|
174
|
+
/** 配货单单独写入运货单 */
|
|
175
|
+
writeWaybill(request: Request.WriteWaybill, req?: FastifyRequest): Promise<void>;
|
|
176
|
+
/** 运货单公司编码列表 */
|
|
177
|
+
getCarrierList(request: Request.GetCarrierList, req?: FastifyRequest): Promise<Response.GetCarrierList>;
|
|
178
|
+
/** 门店入库单列表 */
|
|
179
|
+
getStoreStockInOrderList(request: Request.GetStoreStockInOrderList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderList>;
|
|
180
|
+
/** 门店入库单详情商品列表 */
|
|
181
|
+
getStoreStockInOrderDetailList(request: Request.GetStoreStockInOrderDetailList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderDetailList>;
|
|
182
|
+
/** 门店入库单运货单物流信息列表 */
|
|
183
|
+
getStoreStockInOrderLogisticsList(request: Request.GetStoreStockInOrderLogisticsList, req?: FastifyRequest): Promise<Response.GetStoreStockInOrderLogisticsList>;
|
|
184
|
+
/** 门店入库单商品列表 */
|
|
185
|
+
getProductList(request: Request.GetProductList, req?: FastifyRequest): Promise<Response.GetProductList>;
|
|
186
|
+
}
|
|
187
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/ecommerce-plan-allocation-service-node-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "EcommercePlanAllocationService Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@fastify/request-context": "6.2.1",
|
|
14
14
|
"axios": "1.13.2",
|
|
15
15
|
"axios-retry": "4.0.0",
|
|
16
|
+
"fastify": "5.6.2",
|
|
16
17
|
"uuid": "9.0.1",
|
|
17
18
|
"tsoa": "^6.6.0"
|
|
18
19
|
},
|