@be-link/ecommerce-trade-service-node-sdk 0.1.86 → 0.1.87

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/enums.d.ts CHANGED
@@ -88,6 +88,15 @@ export declare namespace ENUM {
88
88
  /** 无需核销 */
89
89
  NONE = "NONE"
90
90
  }
91
+ /** 优惠券核销状态 */
92
+ enum CouponVerificationStatus {
93
+ /** 未核销 */
94
+ UNVERIFIED = "UNVERIFIED",
95
+ /** 已核销 */
96
+ VERIFIED = "VERIFIED",
97
+ /** 已过期 */
98
+ EXPIRED = "EXPIRED"
99
+ }
91
100
  /** 逆向资源类型 */
92
101
  enum ReverseResourceType {
93
102
  /** 资金 */
@@ -357,6 +366,8 @@ export declare namespace ENUM_CN {
357
366
  const OrderRefundStatus: Record<ENUM.OrderRefundStatus, string>;
358
367
  /** 核销状态中文映射 */
359
368
  const OrderVerificationStatus: Record<ENUM.OrderVerificationStatus, string>;
369
+ /** 优惠券核销状态中文映射 */
370
+ const CouponVerificationStatus: Record<ENUM.CouponVerificationStatus, string>;
360
371
  /** 支付渠道中文映射 */
361
372
  const PayChannel: Record<ENUM.PayChannel, string>;
362
373
  /** 支付平台中文映射 */
package/enums.js CHANGED
@@ -99,6 +99,16 @@ var ENUM;
99
99
  /** 无需核销 */
100
100
  OrderVerificationStatus["NONE"] = "NONE";
101
101
  })(OrderVerificationStatus = ENUM.OrderVerificationStatus || (ENUM.OrderVerificationStatus = {}));
102
+ /** 优惠券核销状态 */
103
+ let CouponVerificationStatus;
104
+ (function (CouponVerificationStatus) {
105
+ /** 未核销 */
106
+ CouponVerificationStatus["UNVERIFIED"] = "UNVERIFIED";
107
+ /** 已核销 */
108
+ CouponVerificationStatus["VERIFIED"] = "VERIFIED";
109
+ /** 已过期 */
110
+ CouponVerificationStatus["EXPIRED"] = "EXPIRED";
111
+ })(CouponVerificationStatus = ENUM.CouponVerificationStatus || (ENUM.CouponVerificationStatus = {}));
102
112
  /** 逆向资源类型 */
103
113
  let ReverseResourceType;
104
114
  (function (ReverseResourceType) {
@@ -417,6 +427,12 @@ var ENUM_CN;
417
427
  [ENUM.OrderVerificationStatus.EXPIRED]: '已过期',
418
428
  [ENUM.OrderVerificationStatus.NONE]: '无需核销',
419
429
  };
430
+ /** 优惠券核销状态中文映射 */
431
+ ENUM_CN.CouponVerificationStatus = {
432
+ [ENUM.CouponVerificationStatus.UNVERIFIED]: '未核销',
433
+ [ENUM.CouponVerificationStatus.VERIFIED]: '已核销',
434
+ [ENUM.CouponVerificationStatus.EXPIRED]: '已过期',
435
+ };
420
436
  /** 支付渠道中文映射 */
421
437
  ENUM_CN.PayChannel = {
422
438
  [ENUM.PayChannel.WX_PAY]: '微信支付',
@@ -188,6 +188,72 @@ export declare namespace PosOrderQueryService {
188
188
  /** 分页 */
189
189
  pagination: Dto.IPagination;
190
190
  }
191
+ interface ICountOrderByStoreIdAndStatus {
192
+ /** 门店ID */
193
+ storeId: string;
194
+ /** 订单状态(可选,不传则统计所有状态) */
195
+ status?: ENUM.OrderStatus;
196
+ /** 时间范围开始时间(时间戳,可选) */
197
+ startTime?: number;
198
+ /** 时间范围结束时间(时间戳,可选) */
199
+ endTime?: number;
200
+ }
201
+ interface IGetVerifyCouponOrderStatistics {
202
+ /** 门店ID */
203
+ storeId: string;
204
+ /** 开始时间(时间戳) */
205
+ startTime: number;
206
+ /** 结束时间(时间戳) */
207
+ endTime: number;
208
+ /** 分页参数(必选) */
209
+ pagination: {
210
+ /** 页码(从0开始) */
211
+ pageIndex: number;
212
+ /** 每页数量 */
213
+ pageSize: number;
214
+ };
215
+ /** 搜索条件(可选) */
216
+ search?: {
217
+ /** 券ID */
218
+ couponId?: string;
219
+ /** 券名称(模糊匹配) */
220
+ couponName?: string;
221
+ };
222
+ }
223
+ interface IGetVerifyCouponUserDetails {
224
+ /** 券模板ID */
225
+ couponId: string;
226
+ /** 门店ID */
227
+ storeId: string;
228
+ /** 开始时间(时间戳) */
229
+ startTime: number;
230
+ /** 结束时间(时间戳) */
231
+ endTime: number;
232
+ /** 分页参数(必选) */
233
+ pagination: {
234
+ /** 页码(从0开始) */
235
+ pageIndex: number;
236
+ /** 每页数量 */
237
+ pageSize: number;
238
+ };
239
+ /** 筛选条件(必选) */
240
+ filter: {
241
+ /** 核销状态:UNVERIFIED-未核销,VERIFIED-已核销,EXPIRED-已过期 */
242
+ status: ENUM.CouponVerificationStatus;
243
+ /** 用户ID列表(可选,用于精确查询指定用户) */
244
+ userIds?: string[];
245
+ /** 用户名称(可选,模糊匹配) */
246
+ userName?: string;
247
+ };
248
+ }
249
+ interface IGetUserCouponDetails {
250
+ /** 用户ID */
251
+ userId: string;
252
+ /** 券模板ID */
253
+ couponId: string;
254
+ /** 核销状态:UNVERIFIED-未核销,VERIFIED-已核销,EXPIRED-已过期 */
255
+ status: ENUM.CouponVerificationStatus;
256
+ }
191
257
  }
192
258
  namespace Response {
193
259
  interface IListItem {
@@ -305,6 +371,91 @@ export declare namespace PosOrderQueryService {
305
371
  }
306
372
  interface IExportOrderDataByIds extends IExportOrderData {
307
373
  }
374
+ interface IGetVerifyCouponOrderStatistics {
375
+ /** 券统计列表 */
376
+ statistics: Array<{
377
+ /** 券模板ID */
378
+ couponId: string;
379
+ /** 券名称 */
380
+ couponName: string;
381
+ /** 领取数量(总订单数) */
382
+ totalCount: number;
383
+ /** 已核销数量 */
384
+ verifiedCount: number;
385
+ /** 未核销数量(待使用) */
386
+ unverifiedCount: number;
387
+ /** 已过期数量 */
388
+ expiredCount: number;
389
+ }>;
390
+ /** 分页信息(必选) */
391
+ pagination: {
392
+ /** 当前页码 */
393
+ pageIndex: number;
394
+ /** 每页数量 */
395
+ pageSize: number;
396
+ /** 总记录数 */
397
+ total: number;
398
+ };
399
+ }
400
+ interface IGetVerifyCouponUserDetails {
401
+ /** 用户详情列表 */
402
+ users: Array<{
403
+ /** 用户ID */
404
+ userId: string;
405
+ /** 用户姓名 */
406
+ userName: string;
407
+ /** 用户手机号 */
408
+ userPhone: string;
409
+ /** 核销状态:UNVERIFIED-未核销,VERIFIED-已核销,EXPIRED-已过期 */
410
+ status: ENUM.CouponVerificationStatus;
411
+ }>;
412
+ /** 分页信息(必选) */
413
+ pagination: {
414
+ /** 当前页码 */
415
+ pageIndex: number;
416
+ /** 每页数量 */
417
+ pageSize: number;
418
+ /** 总记录数 */
419
+ total: number;
420
+ };
421
+ }
422
+ interface IGetUserCouponDetails {
423
+ /** 券信息列表 */
424
+ coupons: Array<{
425
+ /** 记录ID */
426
+ id: string;
427
+ /** 订单ID */
428
+ orderId: string;
429
+ /** 用户ID */
430
+ userId: string;
431
+ /** 券模板ID */
432
+ couponId: string;
433
+ /** 券名称 */
434
+ couponName: string;
435
+ /** 券code */
436
+ couponCode: string;
437
+ /** 券有效期开始时间 */
438
+ couponStartTime: number;
439
+ /** 券有效期结束时间 */
440
+ couponEndTime: number;
441
+ /** 创建时间 */
442
+ createdAt: number;
443
+ /** 更新时间 */
444
+ updatedAt: number;
445
+ }>;
446
+ }
447
+ interface ICountOrderByStoreIdAndStatus {
448
+ /** 门店ID */
449
+ storeId: string;
450
+ /** 订单状态 */
451
+ status?: ENUM.OrderStatus;
452
+ /** 订单总数 */
453
+ total: number;
454
+ /** 时间范围开始时间 */
455
+ startTime?: number;
456
+ /** 时间范围结束时间 */
457
+ endTime?: number;
458
+ }
308
459
  interface IOrderDetail {
309
460
  order: {
310
461
  orderId: string;
@@ -562,6 +713,14 @@ export declare namespace PosOrderQueryService {
562
713
  orderExport(request: Request.IExportOrderData, req: any): Promise<Response.IExportOrderData>;
563
714
  /** 按订单IDs导出订单数据 */
564
715
  orderExportByIds(request: Request.IExportOrderDataByIds, req: any): Promise<Response.IExportOrderDataByIds>;
716
+ /** 查询核销券订单统计 */
717
+ getVerifyCouponOrderStatistics(request: Request.IGetVerifyCouponOrderStatistics, req: any): Promise<Response.IGetVerifyCouponOrderStatistics>;
718
+ /** 查询核销券用户详情 */
719
+ getVerifyCouponUserDetails(request: Request.IGetVerifyCouponUserDetails, req: any): Promise<Response.IGetVerifyCouponUserDetails>;
720
+ /** 查询指定用户和优惠券ID的券详情 */
721
+ getUserCouponDetails(request: Request.IGetUserCouponDetails, req: any): Promise<Response.IGetUserCouponDetails>;
722
+ /** 根据门店ID和订单状态统计订单数量 */
723
+ countOrderByStoreIdAndStatus(request: Request.ICountOrderByStoreIdAndStatus, req: any): Promise<Response.ICountOrderByStoreIdAndStatus>;
565
724
  }
566
725
  }
567
726
  namespace ByUser {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-trade-service-node-sdk",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
4
4
  "description": "EcommerceTradeService Node.js SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",