@be-link/ecommerce-plan-allocation-service-node-sdk 0.0.17 → 0.0.20

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.
@@ -18,10 +18,10 @@ export declare namespace AllocationOrderTypes {
18
18
  realNum: number;
19
19
  creator: string;
20
20
  updater: string;
21
- shippedAt: number | null;
22
- estimatedArrivalAt: number | null;
21
+ shippedAt: number;
22
+ estimatedArrivalAt: number;
23
23
  needNextHandle: number;
24
- remark: string | null;
24
+ remark: string;
25
25
  }
26
26
  /**
27
27
  * 配货单扩展实体(包含关联数据)
@@ -50,8 +50,8 @@ export declare namespace AllocationOrderTypes {
50
50
  remainNum: number;
51
51
  nextPickingNum: number;
52
52
  shouldPickNum: number;
53
- pickingRemark: string | null;
54
- shippingRemark: string | null;
53
+ pickingRemark: string;
54
+ shippingRemark: string;
55
55
  }
56
56
  /**
57
57
  * 配货单明细扩展实体(包含商品信息)
@@ -11,7 +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
+ webhookCallback(request: Service.Request.LogisticsWebhookCallback): Promise<Service.Response.LogisticsWebhookCallbackResponse>;
15
15
  }
16
16
  export declare const logisticsService: LogisticsService;
17
17
  export default logisticsService;
@@ -48,8 +48,8 @@ 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);
51
+ webhookCallback(request) {
52
+ return (0, http_1.callApi)(this.getApiUrl(this.webhookCallback), request);
53
53
  }
54
54
  };
55
55
  __decorate([
@@ -101,7 +101,7 @@ __decorate([
101
101
  (0, tsoa_1.OperationId)('物流状态回调'),
102
102
  (0, tsoa_1.Post)('webhook-callback'),
103
103
  __param(0, (0, tsoa_1.Body)())
104
- ], LogisticsService.prototype, "logisticsWebhookCallback", null);
104
+ ], LogisticsService.prototype, "webhookCallback", null);
105
105
  LogisticsService = __decorate([
106
106
  (0, tsoa_1.Route)('logistics'),
107
107
  (0, tsoa_1.Tags)('Logistics')
@@ -117,6 +117,8 @@ export declare namespace Service {
117
117
  interface BatchImportWaybill {
118
118
  /** 运货单列表Excel地址(cos地址) */
119
119
  excel: string;
120
+ /** 后台账号username */
121
+ username?: string;
120
122
  }
121
123
  /** 查询运货单列表 */
122
124
  interface GetWaybillList {
@@ -147,13 +149,15 @@ export declare namespace Service {
147
149
  allocationOrderId: string;
148
150
  /** 编辑运单号 */
149
151
  wayBill: WayBill[];
152
+ /** 后台账号username */
153
+ username?: string;
150
154
  }
151
155
  /** 运货单公司编码列表(来自 CarrierCompany 表) */
152
156
  interface GetCarrierList {
153
157
  /** 页码 */
154
158
  pageIndex: number;
155
159
  /** 每页数量 */
156
- pageSize: number;
160
+ pageSize?: number;
157
161
  /** 关键词 */
158
162
  keyword?: string;
159
163
  }
@@ -201,8 +205,8 @@ export declare namespace Service {
201
205
  interface LogisticsWebhookCallback {
202
206
  /** 业务内容 JSON 字符串(需要解析为 ExpressDeliveryPushBody) */
203
207
  param: string;
204
- /** 签名值(sign),用于验证消息合法性 */
205
- sign: string;
208
+ /** 签名值(sign),用于验证消息合法性(可选,未配置 salt 时不会推送) */
209
+ sign?: string;
206
210
  /** 其他扩展字段(如 timestamp/salt 等) */
207
211
  [extra: string]: unknown;
208
212
  }
@@ -263,20 +267,35 @@ export declare namespace Service {
263
267
  /** 位置信息 */
264
268
  location?: string | null;
265
269
  }
266
- /** 物流单号信息(快递100 实时查询返回的完整响应信息,包含 raw 字段,并补充快递公司名称) */
267
- interface LogisticsInfo extends ExpressDeliveryApiResponseEnvelope<RealTimeQueryData> {
270
+ /** 物流单号基础信息(查询失败时也会返回) */
271
+ interface LogisticsInfoBase {
272
+ /** 运单号 */
273
+ nu: string;
274
+ /** 快递公司编码 */
275
+ com: string;
268
276
  /** 快递公司名称(根据 com 字段从 CarrierCompany 表查询,如果查询不到则为空字符串) */
269
277
  carrierName: string;
278
+ /** 运单状态 */
279
+ state?: string;
280
+ /** 信息描述(查询失败时为错误信息) */
281
+ message?: string;
270
282
  }
283
+ /** 物流单号信息(快递100 实时查询返回的完整响应信息,包含 raw 字段,并补充快递公司名称) */
284
+ type LogisticsInfo = (ExpressDeliveryApiResponseEnvelope<RealTimeQueryData> & {
285
+ carrierName: string;
286
+ num?: string;
287
+ }) | LogisticsInfoBase;
271
288
  /** 门店入库单运货单物流信息列表(直接返回每个运单实时查询结果的完整响应信息) */
272
289
  interface GetStoreStockInOrderLogisticsList {
273
290
  /** 物流信息列表 */
274
291
  data: LogisticsInfo[];
275
292
  }
276
- /** 物流状态回调响应 */
293
+ /** 物流状态回调响应(快递100要求的格式) */
277
294
  interface LogisticsWebhookCallbackResponse {
278
- /** 响应码,0表示成功 */
279
- code: number;
295
+ /** 是否成功 */
296
+ result: boolean;
297
+ /** 返回码,"200" 表示成功 */
298
+ returnCode: string;
280
299
  /** 响应消息 */
281
300
  message: string;
282
301
  }
@@ -301,6 +320,6 @@ export declare namespace Service {
301
320
  /** 测试订阅运单号 */
302
321
  subscribeWayBill(request: Request.SubscribeWayBill, req?: FastifyRequest): Promise<void>;
303
322
  /** 物流状态回调(Webhook) */
304
- logisticsWebhookCallback(request: Request.LogisticsWebhookCallback, req?: FastifyRequest): Promise<Response.LogisticsWebhookCallbackResponse>;
323
+ webhookCallback(request: Request.LogisticsWebhookCallback, req?: FastifyRequest): Promise<Response.LogisticsWebhookCallbackResponse>;
305
324
  }
306
325
  }
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.17",
3
+ "version": "0.0.20",
4
4
  "description": "EcommercePlanAllocationService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",