@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.15 → 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')
@@ -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
  }
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.15",
3
+ "version": "0.0.16",
4
4
  "description": "EcommercePlanAllocationService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",