@pisell/pisellos 2.2.301 → 2.2.303

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.
Files changed (152) hide show
  1. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
  2. package/dist/model/strategy/adapter/dataVariant/evaluator.js +287 -101
  3. package/dist/model/strategy/adapter/dataVariant/type.d.ts +25 -0
  4. package/dist/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
  5. package/dist/model/strategy/adapter/itemRule/adapter.js +135 -35
  6. package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
  7. package/dist/model/strategy/adapter/itemRule/evaluator.js +25 -1
  8. package/dist/model/strategy/adapter/itemRule/type.d.ts +44 -0
  9. package/dist/model/strategy/adapter/itemRule/type.js +19 -1
  10. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +10 -7
  11. package/dist/modules/Discount/index.d.ts +2 -0
  12. package/dist/modules/Discount/index.js +41 -5
  13. package/dist/modules/Discount/types.d.ts +21 -0
  14. package/dist/modules/OpenData/index.d.ts +15 -2
  15. package/dist/modules/OpenData/index.js +307 -19
  16. package/dist/modules/OpenData/types.d.ts +55 -0
  17. package/dist/modules/OpenData/types.js +7 -1
  18. package/dist/modules/OpenData/utils.d.ts +21 -1
  19. package/dist/modules/OpenData/utils.js +138 -0
  20. package/dist/modules/Order/index.d.ts +50 -7
  21. package/dist/modules/Order/index.js +1690 -815
  22. package/dist/modules/Order/salesNotes.d.ts +31 -0
  23. package/dist/modules/Order/salesNotes.js +492 -0
  24. package/dist/modules/Order/types.d.ts +117 -10
  25. package/dist/modules/Order/types.js +6 -1
  26. package/dist/modules/Order/utils/virtualSettlement.d.ts +63 -0
  27. package/dist/modules/Order/utils/virtualSettlement.js +284 -0
  28. package/dist/modules/Order/utils.d.ts +5 -1
  29. package/dist/modules/Order/utils.js +138 -33
  30. package/dist/modules/Payment/walletpass.js +20 -21
  31. package/dist/modules/Product/types.d.ts +23 -0
  32. package/dist/modules/ProductList/index.d.ts +2 -1
  33. package/dist/modules/ProductList/index.js +100 -20
  34. package/dist/modules/ProductList/types.d.ts +10 -0
  35. package/dist/modules/Rules/index.d.ts +5 -0
  36. package/dist/modules/Rules/index.js +30 -14
  37. package/dist/modules/SalesSummary/index.d.ts +1 -0
  38. package/dist/modules/SalesSummary/index.js +4 -3
  39. package/dist/modules/SalesSummary/types.d.ts +1 -0
  40. package/dist/modules/SalesSummary/utils.d.ts +1 -0
  41. package/dist/modules/SalesSummary/utils.js +21 -1
  42. package/dist/plugins/request.d.ts +2 -1
  43. package/dist/plugins/request.js +4 -2
  44. package/dist/server/index.d.ts +21 -0
  45. package/dist/server/index.js +1774 -1285
  46. package/dist/server/modules/order/types.d.ts +50 -0
  47. package/dist/server/modules/order/types.js +2 -0
  48. package/dist/server/utils/small-ticket.d.ts +4 -1
  49. package/dist/server/utils/small-ticket.js +461 -96
  50. package/dist/solution/BaseSales/index.d.ts +26 -3
  51. package/dist/solution/BaseSales/index.js +1492 -873
  52. package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
  53. package/dist/solution/BaseSales/utils/parseSalesResponse.js +1 -1
  54. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
  55. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +72 -9
  56. package/dist/solution/BookingByStep/index.d.ts +1 -1
  57. package/dist/solution/BookingTicket/index.d.ts +8 -3
  58. package/dist/solution/BookingTicket/index.js +558 -443
  59. package/dist/solution/BookingTicket/utils/addProductDecision.js +2 -1
  60. package/dist/solution/BookingTicket/utils/orderCustomer.js +3 -2
  61. package/dist/solution/RegisterAndLogin/config.d.ts +9 -3
  62. package/dist/solution/RegisterAndLogin/config.js +95 -40
  63. package/dist/solution/RegisterAndLogin/index.js +4 -1
  64. package/dist/solution/Sales/index.d.ts +16 -1
  65. package/dist/solution/Sales/index.js +338 -63
  66. package/dist/solution/Sales/types.d.ts +10 -0
  67. package/dist/solution/ScanOrder/index.d.ts +1 -0
  68. package/dist/solution/ScanOrder/index.js +31 -27
  69. package/dist/solution/ScanOrder/utils.d.ts +1 -0
  70. package/dist/solution/ScanOrder/utils.js +2 -0
  71. package/dist/solution/UnifiedBookingSales/index.d.ts +20 -6
  72. package/dist/solution/UnifiedBookingSales/index.js +874 -527
  73. package/dist/solution/UnifiedBookingSales/types.d.ts +21 -2
  74. package/dist/solution/VenueBooking/index.d.ts +1 -0
  75. package/dist/solution/VenueBooking/index.js +8 -4
  76. package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
  77. package/lib/model/strategy/adapter/dataVariant/evaluator.js +137 -6
  78. package/lib/model/strategy/adapter/dataVariant/type.d.ts +25 -0
  79. package/lib/model/strategy/adapter/itemRule/adapter.d.ts +4 -1
  80. package/lib/model/strategy/adapter/itemRule/adapter.js +73 -4
  81. package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +8 -1
  82. package/lib/model/strategy/adapter/itemRule/evaluator.js +23 -1
  83. package/lib/model/strategy/adapter/itemRule/type.d.ts +44 -0
  84. package/lib/model/strategy/adapter/itemRule/type.js +19 -1
  85. package/lib/model/strategy/adapter/promotion/index.js +1 -46
  86. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +4 -0
  87. package/lib/modules/Discount/index.d.ts +2 -0
  88. package/lib/modules/Discount/index.js +34 -2
  89. package/lib/modules/Discount/types.d.ts +21 -0
  90. package/lib/modules/OpenData/index.d.ts +15 -2
  91. package/lib/modules/OpenData/index.js +230 -3
  92. package/lib/modules/OpenData/types.d.ts +55 -0
  93. package/lib/modules/OpenData/types.js +9 -1
  94. package/lib/modules/OpenData/utils.d.ts +21 -1
  95. package/lib/modules/OpenData/utils.js +126 -0
  96. package/lib/modules/Order/index.d.ts +50 -7
  97. package/lib/modules/Order/index.js +704 -64
  98. package/lib/modules/Order/salesNotes.d.ts +31 -0
  99. package/lib/modules/Order/salesNotes.js +382 -0
  100. package/lib/modules/Order/types.d.ts +117 -10
  101. package/lib/modules/Order/types.js +5 -1
  102. package/lib/modules/Order/utils/virtualSettlement.d.ts +63 -0
  103. package/lib/modules/Order/utils/virtualSettlement.js +262 -0
  104. package/lib/modules/Order/utils.d.ts +5 -1
  105. package/lib/modules/Order/utils.js +127 -21
  106. package/lib/modules/Payment/walletpass.js +14 -11
  107. package/lib/modules/Product/types.d.ts +23 -0
  108. package/lib/modules/ProductList/index.d.ts +2 -1
  109. package/lib/modules/ProductList/index.js +47 -2
  110. package/lib/modules/ProductList/types.d.ts +10 -0
  111. package/lib/modules/Rules/index.d.ts +5 -0
  112. package/lib/modules/Rules/index.js +22 -12
  113. package/lib/modules/SalesSummary/index.d.ts +1 -0
  114. package/lib/modules/SalesSummary/index.js +4 -2
  115. package/lib/modules/SalesSummary/types.d.ts +1 -0
  116. package/lib/modules/SalesSummary/utils.d.ts +1 -0
  117. package/lib/modules/SalesSummary/utils.js +17 -1
  118. package/lib/plugins/request.d.ts +2 -1
  119. package/lib/plugins/request.js +3 -2
  120. package/lib/server/index.d.ts +21 -0
  121. package/lib/server/index.js +492 -108
  122. package/lib/server/modules/order/types.d.ts +50 -0
  123. package/lib/server/modules/order/types.js +1 -0
  124. package/lib/server/utils/small-ticket.d.ts +4 -1
  125. package/lib/server/utils/small-ticket.js +427 -72
  126. package/lib/solution/BaseSales/index.d.ts +26 -3
  127. package/lib/solution/BaseSales/index.js +439 -30
  128. package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +2 -0
  129. package/lib/solution/BaseSales/utils/parseSalesResponse.js +1 -1
  130. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
  131. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +38 -0
  132. package/lib/solution/BookingByStep/index.d.ts +1 -1
  133. package/lib/solution/BookingTicket/index.d.ts +8 -3
  134. package/lib/solution/BookingTicket/index.js +60 -15
  135. package/lib/solution/BookingTicket/utils/addProductDecision.js +1 -0
  136. package/lib/solution/BookingTicket/utils/orderCustomer.js +2 -1
  137. package/lib/solution/RegisterAndLogin/config.d.ts +9 -3
  138. package/lib/solution/RegisterAndLogin/config.js +49 -8
  139. package/lib/solution/RegisterAndLogin/index.js +4 -1
  140. package/lib/solution/Sales/index.d.ts +16 -1
  141. package/lib/solution/Sales/index.js +168 -1
  142. package/lib/solution/Sales/types.d.ts +10 -0
  143. package/lib/solution/ScanOrder/index.d.ts +1 -0
  144. package/lib/solution/ScanOrder/index.js +5 -1
  145. package/lib/solution/ScanOrder/utils.d.ts +1 -0
  146. package/lib/solution/ScanOrder/utils.js +1 -0
  147. package/lib/solution/UnifiedBookingSales/index.d.ts +20 -6
  148. package/lib/solution/UnifiedBookingSales/index.js +169 -16
  149. package/lib/solution/UnifiedBookingSales/types.d.ts +21 -2
  150. package/lib/solution/VenueBooking/index.d.ts +1 -0
  151. package/lib/solution/VenueBooking/index.js +5 -1
  152. package/package.json +1 -1
@@ -75,6 +75,10 @@ export interface OrderProductBundleItem {
75
75
  extension_type?: string;
76
76
  /** 选项 */
77
77
  option?: unknown[];
78
+ /** 套餐子商品备注快照 */
79
+ note?: string | Record<string, unknown> | null;
80
+ /** 兼容已经规范化的商品备注字段 */
81
+ product_note?: string | Record<string, unknown> | null;
78
82
  }
79
83
  /** 商品行 metadata,常含 unique_identification_number */
80
84
  export interface OrderProductMetadata {
@@ -108,6 +112,10 @@ export interface OrderProductLineItem {
108
112
  product_title?: OrderProductTitleSnapshot | string | null;
109
113
  /** 商品封面图 */
110
114
  product_cover?: string | null;
115
+ /** 商品备注快照 */
116
+ note?: string | Record<string, unknown> | null;
117
+ /** 兼容已经规范化的商品备注字段 */
118
+ product_note?: string | Record<string, unknown> | null;
111
119
  /** 多规格 ID。来源:Detail.product_variant_id */
112
120
  product_variant_id?: number;
113
121
  /**
@@ -262,6 +270,23 @@ export interface OrderPaymentItem {
262
270
  /** 元数据;三方支付成功后可含 unique_payment_number */
263
271
  metadata?: OrderPaymentMetadata | null;
264
272
  }
273
+ /** 订单退款记录(仅使用真实退款记录构造退款历史) */
274
+ export interface OrderRefundItem {
275
+ order_refund_id?: number | string;
276
+ refund_number?: string;
277
+ order_payment_id?: number | string;
278
+ payment_id?: number | string;
279
+ amount?: OrderMoneyString | number;
280
+ refund_amount?: OrderMoneyString | number;
281
+ total_amount?: OrderMoneyString | number;
282
+ status?: string;
283
+ refund_time?: string | null;
284
+ refunded_at?: string | null;
285
+ created_at?: string | null;
286
+ updated_at?: string | null;
287
+ payment?: Partial<OrderPaymentItem> & Record<string, unknown>;
288
+ [key: string]: unknown;
289
+ }
265
290
  /**
266
291
  * 订单附加费(3.6 surcharges)
267
292
  */
@@ -284,6 +309,8 @@ export interface OrderSurchargeItem {
284
309
  amount: OrderMoneyString;
285
310
  }
286
311
  export interface OrderSummary {
312
+ /** 兼容部分历史详情把支付状态放在 summary 中 */
313
+ payment_status?: OrderPaymentStatus;
287
314
  /** 商品总数量。来源:Order.product_quantity */
288
315
  product_quantity?: number;
289
316
  /** 商品原价总额。来源:Order.product_original_amount */
@@ -316,6 +343,16 @@ export interface OrderSummary {
316
343
  rounding_amount?: OrderMoneyString;
317
344
  /** 支付手续费。来源:Order.pay_service_charge_amount */
318
345
  pay_service_charge_amount?: OrderMoneyString;
346
+ /** 已应用到订单的支付金额。来源:Order.order_paid_amount */
347
+ order_paid_amount?: OrderMoneyString;
348
+ /** 顾客实际支付金额。来源:Order.customer_paid_amount */
349
+ customer_paid_amount?: OrderMoneyString;
350
+ /** 已退款总金额。来源:Order.total_refund_amount */
351
+ total_refund_amount?: OrderMoneyString;
352
+ /** 税种名称。来源:Order.tax_title */
353
+ tax_title?: string;
354
+ /** 是否含税 0/1。来源:Order.is_price_include_tax */
355
+ is_price_include_tax?: 0 | 1;
319
356
  }
320
357
  /**
321
358
  * 订单数据结构(Server 侧对齐《统一 Sales 数据协议》)
@@ -395,6 +432,8 @@ export interface OrderData {
395
432
  bookings?: OrderBookingItem[];
396
433
  /** 支付数组 */
397
434
  payments?: OrderPaymentItem[];
435
+ /** 真实退款记录数组 */
436
+ refunds?: OrderRefundItem[];
398
437
  /** 附加费数组 */
399
438
  surcharges?: OrderSurchargeItem[];
400
439
  /** 整单/订单级折扣列表(结构与 3.3.1 商品折扣项一致时可复用) */
@@ -407,6 +446,17 @@ export interface OrderData {
407
446
  contacts_info?: unknown[];
408
447
  /** 订单级主体参数 */
409
448
  holder?: Record<string, unknown> | null;
449
+ /** 订单前端扩展快照 */
450
+ order_meta_list?: {
451
+ point_cards_snapshot?: Array<{
452
+ id: number | string;
453
+ tag: 'point_card';
454
+ product_id?: number | string;
455
+ product_name: string;
456
+ par_value: string;
457
+ used_par_value: string;
458
+ }>;
459
+ };
410
460
  /**
411
461
  * 金额汇总(仅输出)。
412
462
  * 由服务端 OrderV2Service::computeOrderSummaryData() 生成;离线可按同算法本地计算。
@@ -60,6 +60,7 @@ exports.OrderHooks = void 0;
60
60
  /**
61
61
  * 支付记录(3.5 payments)
62
62
  */
63
+ /** 订单退款记录(仅使用真实退款记录构造退款历史) */
63
64
  // ─────────────────────────────────────────────────────────────────
64
65
  // 3.6 surcharges
65
66
  // ─────────────────────────────────────────────────────────────────
@@ -10,6 +10,7 @@ export interface SmallTicketShopInfo {
10
10
  zip?: string;
11
11
  tax_number?: string;
12
12
  tax_title?: string;
13
+ is_price_include_tax?: 0 | 1 | boolean;
13
14
  currency_symbol?: string;
14
15
  currency_code?: string;
15
16
  primary_locale?: string;
@@ -33,10 +34,12 @@ export interface SmallTicketProduct {
33
34
  product_quantity: number;
34
35
  selling_price: string;
35
36
  original_price: string;
37
+ base_price?: string;
36
38
  total_original_price: string;
37
39
  extension_list: any[];
38
40
  product_uid?: string | number;
39
41
  booking_uid?: string | number;
42
+ product_note?: string;
40
43
  options?: Array<{
41
44
  name: string;
42
45
  num?: number;
@@ -71,7 +74,7 @@ export interface SmallTicketLocaleData {
71
74
  wallets: SmallTicketItem[][];
72
75
  tickets: any[];
73
76
  source_shop: any[];
74
- refund_data: any[];
77
+ refund_data: SmallTicketItem[][];
75
78
  expend_data: any[];
76
79
  }
77
80
  export type SmallTicketData = Record<string, SmallTicketLocaleData>;