@pisell/pisellos 2.1.173 → 2.1.174

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 (93) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  2. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  3. package/dist/model/strategy/adapter/walletPass/evaluator.js +4 -2
  4. package/dist/modules/Discount/availability.d.ts +7 -0
  5. package/dist/modules/Discount/availability.js +52 -0
  6. package/dist/modules/Discount/entitlementPass.d.ts +34 -0
  7. package/dist/modules/Discount/entitlementPass.js +147 -0
  8. package/dist/modules/Discount/entitlementState.d.ts +8 -0
  9. package/dist/modules/Discount/entitlementState.js +205 -0
  10. package/dist/modules/Discount/index.d.ts +6 -3
  11. package/dist/modules/Discount/index.js +125 -23
  12. package/dist/modules/Discount/types.d.ts +34 -5
  13. package/dist/modules/Holder/index.d.ts +48 -0
  14. package/dist/modules/Holder/index.js +640 -0
  15. package/dist/modules/Holder/types.d.ts +123 -0
  16. package/dist/modules/Holder/types.js +1 -0
  17. package/dist/modules/Holder/utils.d.ts +13 -0
  18. package/dist/modules/Holder/utils.js +34 -0
  19. package/dist/modules/Order/index.d.ts +1 -0
  20. package/dist/modules/Order/index.js +18 -1
  21. package/dist/modules/Order/types.d.ts +2 -0
  22. package/dist/modules/Order/utils.d.ts +10 -0
  23. package/dist/modules/Order/utils.js +35 -3
  24. package/dist/modules/Product/types.d.ts +7 -0
  25. package/dist/modules/Rules/entitlementLines.d.ts +8 -0
  26. package/dist/modules/Rules/entitlementLines.js +157 -0
  27. package/dist/modules/Rules/index.d.ts +12 -2
  28. package/dist/modules/Rules/index.js +377 -112
  29. package/dist/modules/Rules/types.d.ts +2 -2
  30. package/dist/modules/index.d.ts +1 -0
  31. package/dist/modules/index.js +2 -1
  32. package/dist/plugins/window.d.ts +3 -0
  33. package/dist/solution/BookingByStep/index.d.ts +17 -2
  34. package/dist/solution/BookingByStep/index.js +276 -204
  35. package/dist/solution/BookingByStep/types.d.ts +2 -1
  36. package/dist/solution/BookingByStep/types.js +3 -1
  37. package/dist/solution/ScanOrder/index.js +1 -1
  38. package/dist/solution/ScanOrder/types.d.ts +1 -0
  39. package/dist/solution/ShopDiscount/index.d.ts +3 -0
  40. package/dist/solution/ShopDiscount/index.js +161 -78
  41. package/dist/solution/ShopDiscount/utils.d.ts +1 -0
  42. package/dist/solution/ShopDiscount/utils.js +40 -1
  43. package/dist/solution/VenueBooking/index.d.ts +19 -0
  44. package/dist/solution/VenueBooking/index.js +978 -748
  45. package/dist/solution/VenueBooking/types.d.ts +2 -0
  46. package/dist/types/index.d.ts +1 -0
  47. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  48. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  49. package/lib/model/strategy/adapter/walletPass/evaluator.js +4 -2
  50. package/lib/modules/Discount/availability.d.ts +7 -0
  51. package/lib/modules/Discount/availability.js +91 -0
  52. package/lib/modules/Discount/entitlementPass.d.ts +34 -0
  53. package/lib/modules/Discount/entitlementPass.js +184 -0
  54. package/lib/modules/Discount/entitlementState.d.ts +8 -0
  55. package/lib/modules/Discount/entitlementState.js +206 -0
  56. package/lib/modules/Discount/index.d.ts +6 -3
  57. package/lib/modules/Discount/index.js +66 -16
  58. package/lib/modules/Discount/types.d.ts +34 -5
  59. package/lib/modules/Holder/index.d.ts +48 -0
  60. package/lib/modules/Holder/index.js +402 -0
  61. package/lib/modules/Holder/types.d.ts +123 -0
  62. package/lib/modules/Holder/types.js +17 -0
  63. package/lib/modules/Holder/utils.d.ts +13 -0
  64. package/lib/modules/Holder/utils.js +71 -0
  65. package/lib/modules/Order/index.d.ts +1 -0
  66. package/lib/modules/Order/index.js +14 -0
  67. package/lib/modules/Order/types.d.ts +2 -0
  68. package/lib/modules/Order/utils.d.ts +10 -0
  69. package/lib/modules/Order/utils.js +36 -5
  70. package/lib/modules/Product/types.d.ts +7 -0
  71. package/lib/modules/Rules/entitlementLines.d.ts +8 -0
  72. package/lib/modules/Rules/entitlementLines.js +158 -0
  73. package/lib/modules/Rules/index.d.ts +12 -2
  74. package/lib/modules/Rules/index.js +304 -70
  75. package/lib/modules/Rules/types.d.ts +2 -2
  76. package/lib/modules/index.d.ts +1 -0
  77. package/lib/modules/index.js +3 -1
  78. package/lib/plugins/window.d.ts +3 -0
  79. package/lib/solution/BookingByStep/index.d.ts +17 -2
  80. package/lib/solution/BookingByStep/index.js +39 -0
  81. package/lib/solution/BookingByStep/types.d.ts +2 -1
  82. package/lib/solution/BookingByStep/types.js +5 -0
  83. package/lib/solution/ScanOrder/index.js +1 -1
  84. package/lib/solution/ScanOrder/types.d.ts +1 -0
  85. package/lib/solution/ShopDiscount/index.d.ts +3 -0
  86. package/lib/solution/ShopDiscount/index.js +78 -28
  87. package/lib/solution/ShopDiscount/utils.d.ts +1 -0
  88. package/lib/solution/ShopDiscount/utils.js +42 -1
  89. package/lib/solution/VenueBooking/index.d.ts +19 -0
  90. package/lib/solution/VenueBooking/index.js +134 -16
  91. package/lib/solution/VenueBooking/types.d.ts +2 -0
  92. package/lib/types/index.d.ts +1 -0
  93. package/package.json +1 -1
@@ -7,6 +7,7 @@ import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
7
7
  import type { ProductData } from '../../modules/Product/types';
8
8
  import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
9
9
  import type { StrategyConfig } from '../../model/strategy/type';
10
+ import type { IAppendFormRecordParams, IRefreshAllFormRecordsParams } from '../../modules/Holder/types';
10
11
  export * from './types';
11
12
  interface VenueBookingItemRuleRuntimeConfig {
12
13
  strategyConfigs?: StrategyConfig[];
@@ -52,6 +53,12 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
52
53
  constructor(name?: string, version?: string);
53
54
  private normalizeCustomerId;
54
55
  private resolveCustomerIdFromLoginPayload;
56
+ private resolveHolderCustomerId;
57
+ /**
58
+ * 按商品 holder_config 预加载表单数据到 holderMap。
59
+ * appointment_booking 在加购时触发;venueBooking 在商品加载后预加载,避免 getHolderFormMap 为空。
60
+ */
61
+ private preloadHolderForms;
55
62
  private clearLoginEffectListeners;
56
63
  private registerLoginEffect;
57
64
  private registerCustomerLoginListeners;
@@ -199,6 +206,18 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
199
206
  getUIState<T = any>(key: string): T | undefined;
200
207
  deleteUIState(key: string): void;
201
208
  setBookingHolder(bookingUid: string, holder: any): void;
209
+ /**
210
+ * 获取 holder 表单 map
211
+ */
212
+ getHolderFormMap(): import("../../modules/Holder").HolderFormMap;
213
+ /**
214
+ * UI 层触发:按当前 holderMap 批量刷新所有表单的 records
215
+ */
216
+ refreshAllHolderFormRecords(params?: Pick<IRefreshAllFormRecordsParams, 'customer_id' | 'useCache' | 'recordsUrl' | 'num' | 'skip'>): Promise<import("../../modules/Holder").HolderFormMap>;
217
+ /**
218
+ * 添加表单记录
219
+ */
220
+ appendFormRecord(params: IAppendFormRecordParams): import("../../modules/Holder").IFormRecord;
202
221
  checkOpenDataAvailability(): Promise<OpenDataAvailabilityResult>;
203
222
  setOtherParams(params: Record<string, any>, { cover }?: {
204
223
  cover?: boolean;