@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.15 → 0.0.17
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/modules/allocationOrder/service.d.ts +20 -0
- package/modules/allocationOrder/service.js +50 -0
- package/modules/allocationOrder/types.d.ts +93 -2
- package/modules/logistics/service.d.ts +1 -0
- package/modules/logistics/service.js +8 -0
- package/modules/logistics/types.d.ts +18 -0
- package/modules/preAllocationOrder/types.d.ts +3 -0
- package/modules/storeStockIn/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -42,6 +42,26 @@ declare class AllocationOrderService extends BaseService implements AllocationOr
|
|
|
42
42
|
* 退回预配货单
|
|
43
43
|
*/
|
|
44
44
|
rollbackPre(request: AllocationOrderTypes.Request.RollbackPre): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* 获取配货单统计
|
|
47
|
+
*/
|
|
48
|
+
statistics(request: AllocationOrderTypes.Request.GetStatistics): Promise<AllocationOrderTypes.Response.GetStatistics>;
|
|
49
|
+
/**
|
|
50
|
+
* 查询聚合商品列表
|
|
51
|
+
*/
|
|
52
|
+
queryProductList(request: AllocationOrderTypes.Request.QueryProductList): Promise<AllocationOrderTypes.Response.QueryProductList>;
|
|
53
|
+
/**
|
|
54
|
+
* 批量修改实发数量
|
|
55
|
+
*/
|
|
56
|
+
batchUpdateShippedNum(request: AllocationOrderTypes.Request.BatchUpdateShippedNum): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* 批量发货
|
|
59
|
+
*/
|
|
60
|
+
batchShip(request: AllocationOrderTypes.Request.BatchShip): Promise<AllocationOrderTypes.Response.BatchShip>;
|
|
61
|
+
/**
|
|
62
|
+
* 查询批量发货进度
|
|
63
|
+
*/
|
|
64
|
+
getBatchShipProgress(request: AllocationOrderTypes.Request.GetBatchShipProgress): Promise<AllocationOrderTypes.Response.GetBatchShipProgress>;
|
|
45
65
|
}
|
|
46
66
|
export declare const allocationOrderService: AllocationOrderService;
|
|
47
67
|
export default allocationOrderService;
|
|
@@ -81,6 +81,36 @@ let AllocationOrderService = class AllocationOrderService extends BaseService_1.
|
|
|
81
81
|
rollbackPre(request) {
|
|
82
82
|
return (0, http_1.callApi)(this.getApiUrl(this.rollbackPre), request);
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* 获取配货单统计
|
|
86
|
+
*/
|
|
87
|
+
statistics(request) {
|
|
88
|
+
return (0, http_1.callApi)(this.getApiUrl(this.statistics), request);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 查询聚合商品列表
|
|
92
|
+
*/
|
|
93
|
+
queryProductList(request) {
|
|
94
|
+
return (0, http_1.callApi)(this.getApiUrl(this.queryProductList), request);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 批量修改实发数量
|
|
98
|
+
*/
|
|
99
|
+
batchUpdateShippedNum(request) {
|
|
100
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchUpdateShippedNum), request);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 批量发货
|
|
104
|
+
*/
|
|
105
|
+
batchShip(request) {
|
|
106
|
+
return (0, http_1.callApi)(this.getApiUrl(this.batchShip), request);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* 查询批量发货进度
|
|
110
|
+
*/
|
|
111
|
+
getBatchShipProgress(request) {
|
|
112
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getBatchShipProgress), request);
|
|
113
|
+
}
|
|
84
114
|
};
|
|
85
115
|
__decorate([
|
|
86
116
|
(0, tsoa_1.Post)('list'),
|
|
@@ -122,6 +152,26 @@ __decorate([
|
|
|
122
152
|
(0, tsoa_1.Post)('rollback-pre'),
|
|
123
153
|
__param(0, (0, tsoa_1.Body)())
|
|
124
154
|
], AllocationOrderService.prototype, "rollbackPre", null);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, tsoa_1.Post)('statistics'),
|
|
157
|
+
__param(0, (0, tsoa_1.Body)())
|
|
158
|
+
], AllocationOrderService.prototype, "statistics", null);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, tsoa_1.Post)('query-product-list'),
|
|
161
|
+
__param(0, (0, tsoa_1.Body)())
|
|
162
|
+
], AllocationOrderService.prototype, "queryProductList", null);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, tsoa_1.Post)('batch-update-shipped-num'),
|
|
165
|
+
__param(0, (0, tsoa_1.Body)())
|
|
166
|
+
], AllocationOrderService.prototype, "batchUpdateShippedNum", null);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, tsoa_1.Post)('batch-ship'),
|
|
169
|
+
__param(0, (0, tsoa_1.Body)())
|
|
170
|
+
], AllocationOrderService.prototype, "batchShip", null);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, tsoa_1.Post)('batch-ship-progress'),
|
|
173
|
+
__param(0, (0, tsoa_1.Body)())
|
|
174
|
+
], AllocationOrderService.prototype, "getBatchShipProgress", null);
|
|
125
175
|
AllocationOrderService = __decorate([
|
|
126
176
|
(0, tsoa_1.Route)('AllocationOrder'),
|
|
127
177
|
(0, tsoa_1.Tags)('allocationOrder')
|
|
@@ -129,7 +129,7 @@ export declare namespace AllocationOrderTypes {
|
|
|
129
129
|
*/
|
|
130
130
|
interface Ship {
|
|
131
131
|
allocationId: string;
|
|
132
|
-
items
|
|
132
|
+
items?: Entity.ShipItem[];
|
|
133
133
|
operator: string;
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
@@ -197,6 +197,47 @@ export declare namespace AllocationOrderTypes {
|
|
|
197
197
|
orderIds?: string[];
|
|
198
198
|
operator?: string;
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* 获取配货单统计请求
|
|
202
|
+
*/
|
|
203
|
+
interface GetStatistics {
|
|
204
|
+
orderIds: string[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* 查询聚合商品列表请求
|
|
208
|
+
*/
|
|
209
|
+
interface QueryProductList {
|
|
210
|
+
orderIds: string[];
|
|
211
|
+
productIds?: string[];
|
|
212
|
+
skuCodes?: string[];
|
|
213
|
+
minRemainNum?: number;
|
|
214
|
+
maxRemainNum?: number;
|
|
215
|
+
pageIndex: number;
|
|
216
|
+
pageSize: number;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* 批量修改实发数量请求
|
|
220
|
+
*/
|
|
221
|
+
interface BatchUpdateShippedNum {
|
|
222
|
+
items: {
|
|
223
|
+
detailIds: string[];
|
|
224
|
+
quantity: number;
|
|
225
|
+
}[];
|
|
226
|
+
operator: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 批量发货请求
|
|
230
|
+
*/
|
|
231
|
+
interface BatchShip {
|
|
232
|
+
orderIds: string[];
|
|
233
|
+
operator: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* 查询批量发货进度请求
|
|
237
|
+
*/
|
|
238
|
+
interface GetBatchShipProgress {
|
|
239
|
+
taskId: string;
|
|
240
|
+
}
|
|
200
241
|
}
|
|
201
242
|
namespace Response {
|
|
202
243
|
/**
|
|
@@ -214,7 +255,7 @@ export declare namespace AllocationOrderTypes {
|
|
|
214
255
|
* 获取配货单详情响应
|
|
215
256
|
*/
|
|
216
257
|
interface GetDetail {
|
|
217
|
-
order: Entity.
|
|
258
|
+
order: Entity.AllocationOrderWithExtension;
|
|
218
259
|
details: Entity.AllocationOrderDetailWithProduct[];
|
|
219
260
|
total: number;
|
|
220
261
|
}
|
|
@@ -311,6 +352,51 @@ export declare namespace AllocationOrderTypes {
|
|
|
311
352
|
interface PrintDeliveryReceipt {
|
|
312
353
|
list: DeliveryReceiptData[];
|
|
313
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* 获取配货单统计响应
|
|
357
|
+
*/
|
|
358
|
+
interface GetStatistics {
|
|
359
|
+
storeCount: number;
|
|
360
|
+
productCount: number;
|
|
361
|
+
totalShippedNum: number;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* 查询聚合商品列表项
|
|
365
|
+
*/
|
|
366
|
+
interface QueryProductListItem {
|
|
367
|
+
productId: string;
|
|
368
|
+
skuId: string;
|
|
369
|
+
productName: string;
|
|
370
|
+
specName: string;
|
|
371
|
+
skuCode: string;
|
|
372
|
+
totalShouldPickNum: number;
|
|
373
|
+
totalShippedNum: number;
|
|
374
|
+
detailIds: string[];
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* 查询聚合商品列表响应
|
|
378
|
+
*/
|
|
379
|
+
interface QueryProductList {
|
|
380
|
+
total: number;
|
|
381
|
+
list: QueryProductListItem[];
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* 批量发货响应
|
|
385
|
+
*/
|
|
386
|
+
interface BatchShip {
|
|
387
|
+
taskId: string;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* 查询批量发货进度响应
|
|
391
|
+
*/
|
|
392
|
+
interface GetBatchShipProgress {
|
|
393
|
+
total: number;
|
|
394
|
+
success: number;
|
|
395
|
+
failed: number;
|
|
396
|
+
processed: number;
|
|
397
|
+
isCompleted: boolean;
|
|
398
|
+
errors?: Record<string, string>;
|
|
399
|
+
}
|
|
314
400
|
}
|
|
315
401
|
/**
|
|
316
402
|
* 配货单控制器接口
|
|
@@ -326,5 +412,10 @@ export declare namespace AllocationOrderTypes {
|
|
|
326
412
|
printPickingSheet(request: Request.PrintPickingSheet): Promise<Response.PrintPickingSheet>;
|
|
327
413
|
printDeliveryReceipt(request: Request.PrintDeliveryReceipt): Promise<Response.PrintDeliveryReceipt>;
|
|
328
414
|
rollbackPre(request: Request.RollbackPre): Promise<void>;
|
|
415
|
+
statistics(request: Request.GetStatistics): Promise<Response.GetStatistics>;
|
|
416
|
+
queryProductList(request: Request.QueryProductList): Promise<Response.QueryProductList>;
|
|
417
|
+
batchUpdateShippedNum(request: Request.BatchUpdateShippedNum): Promise<void>;
|
|
418
|
+
batchShip(request: Request.BatchShip): Promise<Response.BatchShip>;
|
|
419
|
+
getBatchShipProgress(request: Request.GetBatchShipProgress): Promise<Response.GetBatchShipProgress>;
|
|
329
420
|
}
|
|
330
421
|
}
|
|
@@ -11,6 +11,7 @@ declare class LogisticsService extends BaseService implements Service.LogisticsC
|
|
|
11
11
|
getStoreStockInOrderLogisticsList(request: Service.Request.GetStoreStockInOrderLogisticsList): Promise<Service.Response.GetStoreStockInOrderLogisticsList>;
|
|
12
12
|
getProductList(request: Service.Request.GetProductList): Promise<Service.Response.GetProductList>;
|
|
13
13
|
subscribeWayBill(request: Service.Request.SubscribeWayBill): Promise<void>;
|
|
14
|
+
logisticsWebhookCallback(request: Service.Request.LogisticsWebhookCallback): Promise<Service.Response.LogisticsWebhookCallbackResponse>;
|
|
14
15
|
}
|
|
15
16
|
export declare const logisticsService: LogisticsService;
|
|
16
17
|
export default logisticsService;
|
|
@@ -48,6 +48,9 @@ let LogisticsService = class LogisticsService extends BaseService_1.default {
|
|
|
48
48
|
subscribeWayBill(request) {
|
|
49
49
|
return (0, http_1.callApi)(this.getApiUrl(this.subscribeWayBill), request);
|
|
50
50
|
}
|
|
51
|
+
logisticsWebhookCallback(request) {
|
|
52
|
+
return (0, http_1.callApi)(this.getApiUrl(this.logisticsWebhookCallback), request);
|
|
53
|
+
}
|
|
51
54
|
};
|
|
52
55
|
__decorate([
|
|
53
56
|
(0, tsoa_1.OperationId)('批量导入运货单'),
|
|
@@ -94,6 +97,11 @@ __decorate([
|
|
|
94
97
|
(0, tsoa_1.Post)('subscribe-way-bill'),
|
|
95
98
|
__param(0, (0, tsoa_1.Body)())
|
|
96
99
|
], LogisticsService.prototype, "subscribeWayBill", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, tsoa_1.OperationId)('物流状态回调'),
|
|
102
|
+
(0, tsoa_1.Post)('webhook-callback'),
|
|
103
|
+
__param(0, (0, tsoa_1.Body)())
|
|
104
|
+
], LogisticsService.prototype, "logisticsWebhookCallback", null);
|
|
97
105
|
LogisticsService = __decorate([
|
|
98
106
|
(0, tsoa_1.Route)('logistics'),
|
|
99
107
|
(0, tsoa_1.Tags)('Logistics')
|
|
@@ -197,6 +197,15 @@ export declare namespace Service {
|
|
|
197
197
|
interface SubscribeWayBill {
|
|
198
198
|
num: string;
|
|
199
199
|
}
|
|
200
|
+
/** 物流状态回调(Webhook)- 快递100推送的原始请求格式 */
|
|
201
|
+
interface LogisticsWebhookCallback {
|
|
202
|
+
/** 业务内容 JSON 字符串(需要解析为 ExpressDeliveryPushBody) */
|
|
203
|
+
param: string;
|
|
204
|
+
/** 签名值(sign),用于验证消息合法性 */
|
|
205
|
+
sign: string;
|
|
206
|
+
/** 其他扩展字段(如 timestamp/salt 等) */
|
|
207
|
+
[extra: string]: unknown;
|
|
208
|
+
}
|
|
200
209
|
}
|
|
201
210
|
namespace Response {
|
|
202
211
|
/** 批量导入运货单结果 */
|
|
@@ -264,6 +273,13 @@ export declare namespace Service {
|
|
|
264
273
|
/** 物流信息列表 */
|
|
265
274
|
data: LogisticsInfo[];
|
|
266
275
|
}
|
|
276
|
+
/** 物流状态回调响应 */
|
|
277
|
+
interface LogisticsWebhookCallbackResponse {
|
|
278
|
+
/** 响应码,0表示成功 */
|
|
279
|
+
code: number;
|
|
280
|
+
/** 响应消息 */
|
|
281
|
+
message: string;
|
|
282
|
+
}
|
|
267
283
|
}
|
|
268
284
|
interface LogisticsController {
|
|
269
285
|
/** 批量导入运货单 */
|
|
@@ -284,5 +300,7 @@ export declare namespace Service {
|
|
|
284
300
|
getProductList(request: Request.GetProductList, req?: FastifyRequest): Promise<Response.GetProductList>;
|
|
285
301
|
/** 测试订阅运单号 */
|
|
286
302
|
subscribeWayBill(request: Request.SubscribeWayBill, req?: FastifyRequest): Promise<void>;
|
|
303
|
+
/** 物流状态回调(Webhook) */
|
|
304
|
+
logisticsWebhookCallback(request: Request.LogisticsWebhookCallback, req?: FastifyRequest): Promise<Response.LogisticsWebhookCallbackResponse>;
|
|
287
305
|
}
|
|
288
306
|
}
|
|
@@ -8,6 +8,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
8
8
|
fileName: string;
|
|
9
9
|
fileUrl: string;
|
|
10
10
|
operator: string;
|
|
11
|
+
batchNo: string;
|
|
11
12
|
status: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS;
|
|
12
13
|
statusName: string;
|
|
13
14
|
errorMsg?: string;
|
|
@@ -23,6 +24,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
23
24
|
excelUrl: string;
|
|
24
25
|
operator: string;
|
|
25
26
|
fileName: string;
|
|
27
|
+
batchNo: string;
|
|
26
28
|
}
|
|
27
29
|
/** 查询上传Excel列表 */
|
|
28
30
|
interface QueryUploadExcelList {
|
|
@@ -30,6 +32,7 @@ export declare namespace PreAllocationOrderTypes {
|
|
|
30
32
|
pageSize: number;
|
|
31
33
|
operator?: string;
|
|
32
34
|
fileName?: string;
|
|
35
|
+
batchNo?: string;
|
|
33
36
|
status?: ENUM.PRE_ALLOCATION_ORDER_UPLOAD_EXCEL_ENUM.STATUS;
|
|
34
37
|
createdTimeStart?: number;
|
|
35
38
|
createdTimeEnd?: number;
|
|
@@ -127,7 +127,7 @@ export declare namespace StoreStockInTypes {
|
|
|
127
127
|
namespace Response {
|
|
128
128
|
/** 查询入库单详情响应 */
|
|
129
129
|
interface GetDetail {
|
|
130
|
-
order: Entity.
|
|
130
|
+
order: Entity.StoreStockInOrderWithExtension;
|
|
131
131
|
details: Entity.StoreStockInOrderDetailWithProduct[];
|
|
132
132
|
total: number;
|
|
133
133
|
}
|