@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.14 → 0.0.16
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.
|
@@ -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')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExpressDeliveryApiResponseEnvelope, RealTimeQueryData } from '@be-link/express-delivery-api-sdk';
|
|
1
2
|
import { FastifyRequest } from 'fastify';
|
|
2
3
|
export declare namespace Service {
|
|
3
4
|
/** 物流信息实体 */
|
|
@@ -196,6 +197,15 @@ export declare namespace Service {
|
|
|
196
197
|
interface SubscribeWayBill {
|
|
197
198
|
num: string;
|
|
198
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
|
+
}
|
|
199
209
|
}
|
|
200
210
|
namespace Response {
|
|
201
211
|
/** 批量导入运货单结果 */
|
|
@@ -253,20 +263,23 @@ export declare namespace Service {
|
|
|
253
263
|
/** 位置信息 */
|
|
254
264
|
location?: string | null;
|
|
255
265
|
}
|
|
256
|
-
/**
|
|
257
|
-
interface LogisticsInfo {
|
|
258
|
-
/**
|
|
266
|
+
/** 物流单号信息(快递100 实时查询返回的完整响应信息,包含 raw 字段,并补充快递公司名称) */
|
|
267
|
+
interface LogisticsInfo extends ExpressDeliveryApiResponseEnvelope<RealTimeQueryData> {
|
|
268
|
+
/** 快递公司名称(根据 com 字段从 CarrierCompany 表查询,如果查询不到则为空字符串) */
|
|
259
269
|
carrierName: string;
|
|
260
|
-
/** 物流单号 */
|
|
261
|
-
trackingNumber: string;
|
|
262
|
-
/** 物流事件列表(按时间倒序,最新的在前) */
|
|
263
|
-
events: LogisticsEvent[];
|
|
264
270
|
}
|
|
265
|
-
/**
|
|
271
|
+
/** 门店入库单运货单物流信息列表(直接返回每个运单实时查询结果的完整响应信息) */
|
|
266
272
|
interface GetStoreStockInOrderLogisticsList {
|
|
267
273
|
/** 物流信息列表 */
|
|
268
274
|
data: LogisticsInfo[];
|
|
269
275
|
}
|
|
276
|
+
/** 物流状态回调响应 */
|
|
277
|
+
interface LogisticsWebhookCallbackResponse {
|
|
278
|
+
/** 响应码,0表示成功 */
|
|
279
|
+
code: number;
|
|
280
|
+
/** 响应消息 */
|
|
281
|
+
message: string;
|
|
282
|
+
}
|
|
270
283
|
}
|
|
271
284
|
interface LogisticsController {
|
|
272
285
|
/** 批量导入运货单 */
|
|
@@ -287,5 +300,7 @@ export declare namespace Service {
|
|
|
287
300
|
getProductList(request: Request.GetProductList, req?: FastifyRequest): Promise<Response.GetProductList>;
|
|
288
301
|
/** 测试订阅运单号 */
|
|
289
302
|
subscribeWayBill(request: Request.SubscribeWayBill, req?: FastifyRequest): Promise<void>;
|
|
303
|
+
/** 物流状态回调(Webhook) */
|
|
304
|
+
logisticsWebhookCallback(request: Request.LogisticsWebhookCallback, req?: FastifyRequest): Promise<Response.LogisticsWebhookCallbackResponse>;
|
|
290
305
|
}
|
|
291
306
|
}
|