@pisell/pisellos 2.1.150 → 2.1.151

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 (201) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/model/strategy/adapter/promotion/evaluator.js +99 -26
  4. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  5. package/dist/model/strategy/adapter/walletPass/evaluator.js +61 -8
  6. package/dist/model/strategy/adapter/walletPass/locales.js +12 -3
  7. package/dist/model/strategy/engine.d.ts +18 -5
  8. package/dist/model/strategy/engine.js +145 -45
  9. package/dist/model/strategy/type.d.ts +17 -0
  10. package/dist/model/strategy/type.js +4 -0
  11. package/dist/modules/Cart/types.d.ts +2 -0
  12. package/dist/modules/Cart/utils/cartProduct.js +56 -25
  13. package/dist/modules/Discount/index.d.ts +2 -6
  14. package/dist/modules/Discount/index.js +8 -14
  15. package/dist/modules/Discount/types.d.ts +19 -1
  16. package/dist/modules/Order/index.d.ts +1 -65
  17. package/dist/modules/Order/index.js +30 -901
  18. package/dist/modules/Order/types.d.ts +12 -174
  19. package/dist/modules/Order/types.js +0 -2
  20. package/dist/modules/Order/utils.d.ts +0 -118
  21. package/dist/modules/Order/utils.js +2 -586
  22. package/dist/modules/Payment/index.d.ts +2 -1
  23. package/dist/modules/Payment/index.js +10 -7
  24. package/dist/modules/Payment/utils.js +3 -0
  25. package/dist/modules/Payment/walletpass.d.ts +23 -0
  26. package/dist/modules/Payment/walletpass.js +191 -95
  27. package/dist/modules/Product/utils.js +2 -2
  28. package/dist/modules/ProductList/index.d.ts +1 -1
  29. package/dist/modules/ProductList/index.js +3 -4
  30. package/dist/modules/Rules/index.d.ts +9 -5
  31. package/dist/modules/Rules/index.js +677 -168
  32. package/dist/modules/Rules/types.d.ts +2 -0
  33. package/dist/modules/Schedule/getDateIsInSchedule.js +18 -11
  34. package/dist/modules/Schedule/utils.d.ts +1 -1
  35. package/dist/modules/Summary/types.d.ts +2 -0
  36. package/dist/modules/Summary/utils.d.ts +9 -3
  37. package/dist/modules/Summary/utils.js +52 -41
  38. package/dist/modules/index.d.ts +0 -4
  39. package/dist/modules/index.js +1 -5
  40. package/dist/plugins/window.d.ts +2 -0
  41. package/dist/solution/BookingByStep/index.d.ts +3 -2
  42. package/dist/solution/BookingByStep/index.js +43 -46
  43. package/dist/solution/BookingByStep/types.d.ts +1 -3
  44. package/dist/solution/BookingByStep/types.js +1 -5
  45. package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  46. package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
  47. package/dist/solution/Checkout/index.js +2 -0
  48. package/dist/solution/ShopDiscount/index.d.ts +2 -2
  49. package/dist/solution/ShopDiscount/index.js +41 -37
  50. package/dist/solution/ShopDiscount/types.d.ts +1 -1
  51. package/dist/solution/ShopDiscount/types.js +2 -1
  52. package/dist/solution/ShopDiscount/utils.js +26 -12
  53. package/dist/solution/index.d.ts +0 -2
  54. package/dist/solution/index.js +1 -3
  55. package/lib/index.d.ts +1 -0
  56. package/lib/index.js +3 -1
  57. package/lib/model/strategy/adapter/promotion/evaluator.js +57 -8
  58. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  59. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  60. package/lib/model/strategy/adapter/walletPass/evaluator.js +34 -3
  61. package/lib/model/strategy/adapter/walletPass/locales.js +12 -3
  62. package/lib/model/strategy/engine.d.ts +18 -5
  63. package/lib/model/strategy/engine.js +85 -21
  64. package/lib/model/strategy/type.d.ts +17 -0
  65. package/lib/modules/Cart/types.d.ts +2 -0
  66. package/lib/modules/Cart/utils/cartProduct.js +39 -12
  67. package/lib/modules/Discount/index.d.ts +2 -6
  68. package/lib/modules/Discount/index.js +1 -3
  69. package/lib/modules/Discount/types.d.ts +19 -1
  70. package/lib/modules/Order/index.d.ts +1 -65
  71. package/lib/modules/Order/index.js +1 -513
  72. package/lib/modules/Order/types.d.ts +12 -174
  73. package/lib/modules/Order/utils.d.ts +0 -118
  74. package/lib/modules/Order/utils.js +2 -483
  75. package/lib/modules/Payment/index.d.ts +2 -1
  76. package/lib/modules/Payment/index.js +1 -0
  77. package/lib/modules/Payment/utils.js +3 -0
  78. package/lib/modules/Payment/walletpass.d.ts +23 -0
  79. package/lib/modules/Payment/walletpass.js +94 -17
  80. package/lib/modules/Product/utils.js +2 -2
  81. package/lib/modules/ProductList/index.d.ts +1 -1
  82. package/lib/modules/ProductList/index.js +3 -5
  83. package/lib/modules/Rules/index.d.ts +9 -5
  84. package/lib/modules/Rules/index.js +780 -288
  85. package/lib/modules/Rules/types.d.ts +2 -0
  86. package/lib/modules/Schedule/getDateIsInSchedule.js +11 -9
  87. package/lib/modules/Schedule/utils.d.ts +1 -1
  88. package/lib/modules/Summary/types.d.ts +2 -0
  89. package/lib/modules/Summary/utils.d.ts +9 -3
  90. package/lib/modules/Summary/utils.js +31 -22
  91. package/lib/modules/index.d.ts +0 -4
  92. package/lib/modules/index.js +1 -9
  93. package/lib/plugins/window.d.ts +2 -0
  94. package/lib/solution/BookingByStep/index.d.ts +3 -2
  95. package/lib/solution/BookingByStep/index.js +4 -6
  96. package/lib/solution/BookingByStep/types.d.ts +1 -3
  97. package/lib/solution/BookingByStep/types.js +0 -10
  98. package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  99. package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
  100. package/lib/solution/Checkout/index.js +2 -0
  101. package/lib/solution/ShopDiscount/index.d.ts +2 -2
  102. package/lib/solution/ShopDiscount/index.js +24 -16
  103. package/lib/solution/ShopDiscount/types.d.ts +1 -1
  104. package/lib/solution/ShopDiscount/utils.js +10 -6
  105. package/lib/solution/index.d.ts +0 -2
  106. package/lib/solution/index.js +1 -5
  107. package/package.json +1 -1
  108. package/dist/apis/picoding.d.ts +0 -0
  109. package/dist/apis/picoding.js +0 -1
  110. package/dist/modules/OpenData/index.d.ts +0 -24
  111. package/dist/modules/OpenData/index.js +0 -173
  112. package/dist/modules/OpenData/types.d.ts +0 -73
  113. package/dist/modules/OpenData/types.js +0 -1
  114. package/dist/modules/OpenData/utils.d.ts +0 -2
  115. package/dist/modules/OpenData/utils.js +0 -75
  116. package/dist/modules/Quotation/index.d.ts +0 -48
  117. package/dist/modules/Quotation/index.js +0 -248
  118. package/dist/modules/Quotation/types.d.ts +0 -42
  119. package/dist/modules/Quotation/types.js +0 -1
  120. package/dist/modules/SalesSummary/index.d.ts +0 -63
  121. package/dist/modules/SalesSummary/index.js +0 -174
  122. package/dist/modules/SalesSummary/types.d.ts +0 -60
  123. package/dist/modules/SalesSummary/types.js +0 -1
  124. package/dist/modules/SalesSummary/utils.d.ts +0 -30
  125. package/dist/modules/SalesSummary/utils.js +0 -480
  126. package/dist/modules/ScanOrderLogger/index.d.ts +0 -23
  127. package/dist/modules/ScanOrderLogger/index.js +0 -174
  128. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  129. package/dist/modules/ScanOrderLogger/providers/feishu.js +0 -221
  130. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  131. package/dist/modules/ScanOrderLogger/providers/grafana.js +0 -50
  132. package/dist/modules/ScanOrderLogger/types.d.ts +0 -53
  133. package/dist/modules/ScanOrderLogger/types.js +0 -1
  134. package/dist/solution/ScanOrder/index.d.ts +0 -152
  135. package/dist/solution/ScanOrder/index.js +0 -3132
  136. package/dist/solution/ScanOrder/types.d.ts +0 -287
  137. package/dist/solution/ScanOrder/types.js +0 -35
  138. package/dist/solution/ScanOrder/utils.d.ts +0 -167
  139. package/dist/solution/ScanOrder/utils.js +0 -764
  140. package/dist/solution/VenueBooking/index.d.ts +0 -199
  141. package/dist/solution/VenueBooking/index.js +0 -3459
  142. package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -343
  143. package/dist/solution/VenueBooking/types.d.ts +0 -154
  144. package/dist/solution/VenueBooking/types.js +0 -21
  145. package/dist/solution/VenueBooking/utils/dateSummary.d.ts +0 -11
  146. package/dist/solution/VenueBooking/utils/dateSummary.js +0 -104
  147. package/dist/solution/VenueBooking/utils/resource.d.ts +0 -14
  148. package/dist/solution/VenueBooking/utils/resource.js +0 -131
  149. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -38
  150. package/dist/solution/VenueBooking/utils/slotMerge.js +0 -239
  151. package/dist/solution/VenueBooking/utils/timeSlot.d.ts +0 -32
  152. package/dist/solution/VenueBooking/utils/timeSlot.js +0 -453
  153. package/dist/solution/VenueBooking/utils.d.ts +0 -1
  154. package/dist/solution/VenueBooking/utils.js +0 -1
  155. package/lib/apis/picoding.d.ts +0 -0
  156. package/lib/apis/picoding.js +0 -0
  157. package/lib/modules/OpenData/index.d.ts +0 -24
  158. package/lib/modules/OpenData/index.js +0 -119
  159. package/lib/modules/OpenData/types.d.ts +0 -73
  160. package/lib/modules/OpenData/types.js +0 -17
  161. package/lib/modules/OpenData/utils.d.ts +0 -2
  162. package/lib/modules/OpenData/utils.js +0 -111
  163. package/lib/modules/Quotation/index.d.ts +0 -48
  164. package/lib/modules/Quotation/index.js +0 -152
  165. package/lib/modules/Quotation/types.d.ts +0 -42
  166. package/lib/modules/Quotation/types.js +0 -17
  167. package/lib/modules/SalesSummary/index.d.ts +0 -63
  168. package/lib/modules/SalesSummary/index.js +0 -105
  169. package/lib/modules/SalesSummary/types.d.ts +0 -60
  170. package/lib/modules/SalesSummary/types.js +0 -17
  171. package/lib/modules/SalesSummary/utils.d.ts +0 -30
  172. package/lib/modules/SalesSummary/utils.js +0 -420
  173. package/lib/modules/ScanOrderLogger/index.d.ts +0 -23
  174. package/lib/modules/ScanOrderLogger/index.js +0 -147
  175. package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  176. package/lib/modules/ScanOrderLogger/providers/feishu.js +0 -157
  177. package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  178. package/lib/modules/ScanOrderLogger/providers/grafana.js +0 -52
  179. package/lib/modules/ScanOrderLogger/types.d.ts +0 -53
  180. package/lib/modules/ScanOrderLogger/types.js +0 -17
  181. package/lib/solution/ScanOrder/index.d.ts +0 -152
  182. package/lib/solution/ScanOrder/index.js +0 -1901
  183. package/lib/solution/ScanOrder/types.d.ts +0 -287
  184. package/lib/solution/ScanOrder/types.js +0 -36
  185. package/lib/solution/ScanOrder/utils.d.ts +0 -167
  186. package/lib/solution/ScanOrder/utils.js +0 -635
  187. package/lib/solution/VenueBooking/index.d.ts +0 -199
  188. package/lib/solution/VenueBooking/index.js +0 -1926
  189. package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -343
  190. package/lib/solution/VenueBooking/types.d.ts +0 -154
  191. package/lib/solution/VenueBooking/types.js +0 -44
  192. package/lib/solution/VenueBooking/utils/dateSummary.d.ts +0 -11
  193. package/lib/solution/VenueBooking/utils/dateSummary.js +0 -110
  194. package/lib/solution/VenueBooking/utils/resource.d.ts +0 -14
  195. package/lib/solution/VenueBooking/utils/resource.js +0 -92
  196. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -38
  197. package/lib/solution/VenueBooking/utils/slotMerge.js +0 -237
  198. package/lib/solution/VenueBooking/utils/timeSlot.d.ts +0 -32
  199. package/lib/solution/VenueBooking/utils/timeSlot.js +0 -339
  200. package/lib/solution/VenueBooking/utils.d.ts +0 -1
  201. package/lib/solution/VenueBooking/utils.js +0 -69
@@ -31,6 +31,7 @@ var WalletPassPaymentImpl = class {
31
31
  this.userIdentificationCodes = [];
32
32
  this.searchResults = [];
33
33
  this.walletParams = null;
34
+ this.walletInitData = null;
34
35
  }
35
36
  /**
36
37
  * 发送事件的辅助方法
@@ -42,7 +43,9 @@ var WalletPassPaymentImpl = class {
42
43
  const fullEventName = `${this.paymentModule.name}:${eventName}`;
43
44
  this.paymentModule.core.effects.emit(fullEventName, data);
44
45
  } catch (error) {
45
- this.paymentModule.logError("[WalletPass] 发送事件失败", error, { hook });
46
+ this.paymentModule.logError("[WalletPass] 发送事件失败", error, {
47
+ hook
48
+ });
46
49
  }
47
50
  }
48
51
  /**
@@ -112,7 +115,10 @@ var WalletPassPaymentImpl = class {
112
115
  if (Number(((_a = businessData == null ? void 0 : businessData.amountInfo) == null ? void 0 : _a.totalAmount) || 0) < 0 || Number(((_b = businessData == null ? void 0 : businessData.amountInfo) == null ? void 0 : _b.subTotal) || 0) < 0) {
113
116
  return {
114
117
  walletRecommendList: [],
115
- userIdentificationCodes: []
118
+ userIdentificationCodes: [],
119
+ transformList: [],
120
+ noApplicableVoucher: [],
121
+ products: []
116
122
  };
117
123
  }
118
124
  this.emitEvent(import_types.WalletPassHooks.OnWalletInitializationStarted, {
@@ -153,11 +159,28 @@ var WalletPassPaymentImpl = class {
153
159
  endTime,
154
160
  duration
155
161
  });
156
- this.paymentModule.logError(`[WalletPass] 从业务数据初始化钱包数据失败`, error, {
157
- duration: `${duration}ms`,
158
- customer_id: businessData.customer_id,
159
- totalAmount: (_h = businessData.amountInfo) == null ? void 0 : _h.totalAmount
160
- });
162
+ this.paymentModule.logError(
163
+ `[WalletPass] 从业务数据初始化钱包数据失败`,
164
+ error,
165
+ {
166
+ duration: `${duration}ms`,
167
+ customer_id: businessData.customer_id,
168
+ totalAmount: (_h = businessData.amountInfo) == null ? void 0 : _h.totalAmount
169
+ }
170
+ );
171
+ throw error;
172
+ }
173
+ }
174
+ /**
175
+ * 获取订单基础详情
176
+ */
177
+ async getOrderBasicDetailAsync(orderId) {
178
+ try {
179
+ const response = await this.paymentModule.request.get(
180
+ `/order/order/${orderId}/basic-detail`
181
+ );
182
+ return (response == null ? void 0 : response.data) || {};
183
+ } catch (error) {
161
184
  throw error;
162
185
  }
163
186
  }
@@ -166,19 +189,49 @@ var WalletPassPaymentImpl = class {
166
189
  * 先获取推荐列表,再获取用户识别码列表(顺序执行)
167
190
  */
168
191
  async initializeWalletDataAsync(baseParams) {
192
+ var _a, _b;
169
193
  try {
170
- const walletRecommendList = await this.getWalletPassRecommendListAsync(baseParams);
171
194
  const identificationParams = {
172
195
  ...baseParams,
173
196
  available: 2,
174
- prepare_payments: this.formatWalletPassList2PreparePayments(walletRecommendList),
197
+ prepare_payments: [],
175
198
  other_exact_codes: [],
176
199
  filter_prepare_wallet_pass: 1
177
200
  };
178
- const userIdentificationCodes = await this.getUserIdentificationCodeListAsync(identificationParams);
201
+ const [allList, orderBasicDetail] = await Promise.all([
202
+ this.getUserIdentificationCodeListAsync(identificationParams),
203
+ baseParams.payment_order_id ? this.getOrderBasicDetailAsync(baseParams.payment_order_id) : Promise.resolve(null)
204
+ ]);
205
+ const walletPassEvaluator = (_b = (_a = this.paymentModule.window) == null ? void 0 : _a.getWalletPassEvaluator) == null ? void 0 : _b.call(_a);
206
+ if (!walletPassEvaluator) {
207
+ return {
208
+ walletRecommendList: [],
209
+ userIdentificationCodes: [],
210
+ transformList: [],
211
+ noApplicableVoucher: [],
212
+ products: []
213
+ };
214
+ }
215
+ const products = (orderBasicDetail == null ? void 0 : orderBasicDetail.detail) || baseParams.products;
216
+ const res = walletPassEvaluator == null ? void 0 : walletPassEvaluator.getRecommendedVouchers({
217
+ orderTotalAmount: baseParams.order_wait_pay_amount,
218
+ products,
219
+ vouchers: allList
220
+ });
221
+ const { recommended, transformList, noApplicableVoucher, recommendedAmount } = res;
222
+ console.log(res, "resres12");
223
+ this.walletRecommendList = recommended;
224
+ this.walletInitData = {
225
+ transformList,
226
+ noApplicableVoucher,
227
+ products: products || []
228
+ };
179
229
  return {
180
- walletRecommendList,
181
- userIdentificationCodes
230
+ walletRecommendList: recommended,
231
+ userIdentificationCodes: allList,
232
+ transformList,
233
+ noApplicableVoucher,
234
+ products: products || []
182
235
  };
183
236
  } catch (error) {
184
237
  this.paymentModule.logError("[WalletPass] 初始化钱包数据失败", error, {
@@ -261,10 +314,14 @@ var WalletPassPaymentImpl = class {
261
314
  });
262
315
  return this.userIdentificationCodes;
263
316
  } catch (error) {
264
- this.paymentModule.logError("[WalletPass] 获取用户识别码列表失败", error, {
265
- customer_id: params.customer_id,
266
- available: params.available
267
- });
317
+ this.paymentModule.logError(
318
+ "[WalletPass] 获取用户识别码列表失败",
319
+ error,
320
+ {
321
+ customer_id: params.customer_id,
322
+ available: params.available
323
+ }
324
+ );
268
325
  return [];
269
326
  }
270
327
  }
@@ -462,6 +519,19 @@ var WalletPassPaymentImpl = class {
462
519
  this.searchResults = [];
463
520
  this.paymentModule.logInfo("[WalletPass] 搜索结果缓存已清除");
464
521
  }
522
+ /**
523
+ * 获取存储的钱包初始化数据
524
+ */
525
+ getStoredWalletInitData() {
526
+ return this.walletInitData;
527
+ }
528
+ /**
529
+ * 清除存储的钱包初始化数据
530
+ */
531
+ clearStoredWalletInitData() {
532
+ this.walletInitData = null;
533
+ this.paymentModule.logInfo("[WalletPass] 钱包初始化数据已清除");
534
+ }
465
535
  /**
466
536
  * 清除所有缓存数据
467
537
  */
@@ -470,11 +540,18 @@ var WalletPassPaymentImpl = class {
470
540
  this.userIdentificationCodes = [];
471
541
  this.searchResults = [];
472
542
  this.walletParams = null;
543
+ this.walletInitData = null;
473
544
  this.emitEvent(import_types.WalletPassHooks.OnWalletCacheCleared, {
474
545
  clearedTypes: ["all"]
475
546
  });
476
547
  this.paymentModule.logInfo("[WalletPass] 所有缓存数据已清除", {
477
- cleared_types: ["walletRecommendList", "userIdentificationCodes", "searchResults", "walletParams"]
548
+ cleared_types: [
549
+ "walletRecommendList",
550
+ "userIdentificationCodes",
551
+ "searchResults",
552
+ "walletParams",
553
+ "walletInitData"
554
+ ]
478
555
  });
479
556
  }
480
557
  };
@@ -25,10 +25,10 @@ __export(utils_exports, {
25
25
  module.exports = __toCommonJS(utils_exports);
26
26
  function isNormalProduct(product) {
27
27
  var _a;
28
- if (product == null ? void 0 : product.duration) {
28
+ if (product.duration) {
29
29
  return false;
30
30
  }
31
- if ((_a = product == null ? void 0 : product["schedule.ids"]) == null ? void 0 : _a.length) {
31
+ if ((_a = product["schedule.ids"]) == null ? void 0 : _a.length) {
32
32
  return false;
33
33
  }
34
34
  return true;
@@ -16,10 +16,10 @@ export declare class ProductList extends BaseModule implements Module {
16
16
  product_ids?: number[];
17
17
  collection?: number | string[];
18
18
  schedule_date?: string;
19
- schedule_datetime?: string;
20
19
  cacheId?: string;
21
20
  customer_id?: number;
22
21
  menu_list_ids?: number[];
22
+ schedule_datetime?: string;
23
23
  with_count?: string[];
24
24
  with_schedule?: number;
25
25
  }): Promise<any>;
@@ -61,7 +61,7 @@ var ProductList = class extends import_BaseModule.BaseModule {
61
61
  cacheId,
62
62
  with_schedule
63
63
  }) {
64
- var _a;
64
+ var _a, _b;
65
65
  let userPlugin = this.core.getPlugin("user");
66
66
  let customer_id = void 0;
67
67
  try {
@@ -95,14 +95,12 @@ var ProductList = class extends import_BaseModule.BaseModule {
95
95
  with_count,
96
96
  // client_schedule_ids: schedule_ids,
97
97
  schedule_date,
98
- // application_code: this.otherParams?.channel === 'online_store' ? 'online-store' : this.otherParams?.channel,
99
- application_code: "online-store",
98
+ application_code: (_b = this.otherParams) == null ? void 0 : _b.channel,
100
99
  with_schedule,
101
100
  schedule_datetime,
102
101
  is_eject: 1
103
102
  },
104
- { useCache: true, customToast: () => {
105
- } }
103
+ { useCache: true }
106
104
  );
107
105
  const sortedList = (productsData.data.list || []).slice().sort((a, b) => Number(b.sort) - Number(a.sort));
108
106
  this.addProduct(sortedList);
@@ -1,25 +1,28 @@
1
1
  import { Module, PisellCore, ModuleOptions } from '../../types';
2
2
  import { BaseModule } from '../BaseModule';
3
3
  import { Rules, RulesModuleAPI, DiscountResult, UnavailableReason } from './types';
4
- import { Discount } from "../Discount/types";
5
- import { SetDiscountSelectedParams } from '../../solution/ShopDiscount/types';
4
+ import { Discount } from '../Discount/types';
5
+ import { WindowPlugin } from '../../plugins';
6
6
  export declare class RulesModule extends BaseModule implements Module, RulesModuleAPI {
7
7
  protected defaultName: string;
8
8
  protected defaultVersion: string;
9
9
  private store;
10
+ window: WindowPlugin;
10
11
  private hooks;
11
12
  constructor(name?: string, version?: string);
12
13
  initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
13
14
  setRulesList(rulesList: Rules[]): Promise<void>;
14
15
  getRulesList(): Rules[];
15
16
  private checkHolderMatch;
16
- isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, holders, isFormSubject, }: {
17
+ getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
18
+ isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {
17
19
  oldDiscountList: Discount[];
18
20
  newDiscountList: Discount[];
19
21
  productList: any[];
20
22
  holders: {
21
23
  form_record_id: number;
22
24
  }[];
25
+ orderTotalAmount: number;
23
26
  isFormSubject: boolean;
24
27
  }): {
25
28
  isAvailable: boolean;
@@ -29,17 +32,18 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
29
32
  };
30
33
  filterDiscountListByType(discountList: Discount[], type: string): Discount[];
31
34
  private getUnavailableReason;
32
- calcDiscount({ discountList, productList, holders, isFormSubject, }: {
35
+ calcDiscount({ discountList, productList, holders, isFormSubject, orderTotalAmount }: {
33
36
  discountList: Discount[];
34
37
  productList: any[];
35
38
  holders: {
36
39
  form_record_id: number;
37
40
  }[];
38
41
  isFormSubject: boolean;
42
+ orderTotalAmount: number;
39
43
  }, options?: {
40
44
  isSelected?: boolean;
41
45
  discountId?: number;
42
- selectedList?: SetDiscountSelectedParams[];
46
+ selectedList?: any[];
43
47
  scan?: boolean;
44
48
  }): DiscountResult;
45
49
  /**