@pisell/pisellos 2.1.170 → 2.1.172

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 (231) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -3
  3. package/dist/model/strategy/adapter/index.d.ts +0 -4
  4. package/dist/model/strategy/adapter/index.js +1 -5
  5. package/dist/model/strategy/adapter/promotion/evaluator.js +99 -26
  6. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  7. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  8. package/dist/model/strategy/adapter/walletPass/evaluator.js +61 -8
  9. package/dist/model/strategy/adapter/walletPass/locales.js +12 -3
  10. package/dist/model/strategy/engine.d.ts +18 -5
  11. package/dist/model/strategy/engine.js +145 -45
  12. package/dist/model/strategy/type.d.ts +17 -0
  13. package/dist/model/strategy/type.js +4 -0
  14. package/dist/modules/Cart/types.d.ts +2 -0
  15. package/dist/modules/Cart/utils/cartProduct.js +56 -25
  16. package/dist/modules/Cart/utils/changePrice.js +9 -16
  17. package/dist/modules/Discount/index.d.ts +4 -13
  18. package/dist/modules/Discount/index.js +12 -124
  19. package/dist/modules/Discount/types.d.ts +18 -13
  20. package/dist/modules/Order/index.d.ts +1 -67
  21. package/dist/modules/Order/index.js +30 -918
  22. package/dist/modules/Order/types.d.ts +12 -176
  23. package/dist/modules/Order/types.js +0 -2
  24. package/dist/modules/Order/utils.d.ts +0 -118
  25. package/dist/modules/Order/utils.js +2 -586
  26. package/dist/modules/Payment/index.d.ts +2 -1
  27. package/dist/modules/Payment/index.js +10 -7
  28. package/dist/modules/Payment/utils.js +3 -0
  29. package/dist/modules/Payment/walletpass.d.ts +23 -0
  30. package/dist/modules/Payment/walletpass.js +191 -95
  31. package/dist/modules/Product/utils.js +2 -2
  32. package/dist/modules/ProductList/index.d.ts +2 -4
  33. package/dist/modules/ProductList/index.js +12 -24
  34. package/dist/modules/Rules/index.d.ts +9 -5
  35. package/dist/modules/Rules/index.js +669 -173
  36. package/dist/modules/Rules/types.d.ts +2 -0
  37. package/dist/modules/Schedule/getDateIsInSchedule.js +18 -16
  38. package/dist/modules/Schedule/utils.d.ts +1 -1
  39. package/dist/modules/Summary/types.d.ts +2 -0
  40. package/dist/modules/Summary/utils.d.ts +9 -3
  41. package/dist/modules/Summary/utils.js +57 -67
  42. package/dist/modules/index.d.ts +0 -4
  43. package/dist/modules/index.js +1 -5
  44. package/dist/plugins/window.d.ts +2 -0
  45. package/dist/solution/BookingByStep/index.d.ts +3 -2
  46. package/dist/solution/BookingByStep/index.js +43 -46
  47. package/dist/solution/BookingByStep/types.d.ts +1 -3
  48. package/dist/solution/BookingByStep/types.js +1 -5
  49. package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  50. package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
  51. package/dist/solution/Checkout/index.js +2 -0
  52. package/dist/solution/ShopDiscount/index.d.ts +2 -3
  53. package/dist/solution/ShopDiscount/index.js +60 -62
  54. package/dist/solution/ShopDiscount/types.d.ts +1 -1
  55. package/dist/solution/ShopDiscount/types.js +2 -1
  56. package/dist/solution/ShopDiscount/utils.js +26 -12
  57. package/dist/solution/index.d.ts +0 -2
  58. package/dist/solution/index.js +1 -3
  59. package/lib/index.d.ts +1 -1
  60. package/lib/index.js +3 -4
  61. package/lib/model/strategy/adapter/index.d.ts +0 -4
  62. package/lib/model/strategy/adapter/index.js +2 -13
  63. package/lib/model/strategy/adapter/promotion/evaluator.js +57 -8
  64. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +2 -0
  65. package/lib/model/strategy/adapter/walletPass/evaluator.js +34 -3
  66. package/lib/model/strategy/adapter/walletPass/locales.js +12 -3
  67. package/lib/model/strategy/engine.d.ts +18 -5
  68. package/lib/model/strategy/engine.js +85 -21
  69. package/lib/model/strategy/type.d.ts +17 -0
  70. package/lib/modules/Cart/types.d.ts +2 -0
  71. package/lib/modules/Cart/utils/cartProduct.js +39 -12
  72. package/lib/modules/Cart/utils/changePrice.js +9 -13
  73. package/lib/modules/Discount/index.d.ts +4 -13
  74. package/lib/modules/Discount/index.js +5 -76
  75. package/lib/modules/Discount/types.d.ts +18 -13
  76. package/lib/modules/Order/index.d.ts +1 -67
  77. package/lib/modules/Order/index.js +1 -525
  78. package/lib/modules/Order/types.d.ts +12 -176
  79. package/lib/modules/Order/utils.d.ts +0 -118
  80. package/lib/modules/Order/utils.js +2 -483
  81. package/lib/modules/Payment/index.d.ts +2 -1
  82. package/lib/modules/Payment/index.js +1 -0
  83. package/lib/modules/Payment/utils.js +3 -0
  84. package/lib/modules/Payment/walletpass.d.ts +23 -0
  85. package/lib/modules/Payment/walletpass.js +94 -17
  86. package/lib/modules/Product/utils.js +2 -2
  87. package/lib/modules/ProductList/index.d.ts +2 -4
  88. package/lib/modules/ProductList/index.js +39 -46
  89. package/lib/modules/Rules/index.d.ts +9 -5
  90. package/lib/modules/Rules/index.js +776 -292
  91. package/lib/modules/Rules/types.d.ts +2 -0
  92. package/lib/modules/Schedule/getDateIsInSchedule.js +11 -13
  93. package/lib/modules/Schedule/utils.d.ts +1 -1
  94. package/lib/modules/Summary/types.d.ts +2 -0
  95. package/lib/modules/Summary/utils.d.ts +9 -3
  96. package/lib/modules/Summary/utils.js +34 -45
  97. package/lib/modules/index.d.ts +0 -4
  98. package/lib/modules/index.js +1 -9
  99. package/lib/plugins/window.d.ts +2 -0
  100. package/lib/solution/BookingByStep/index.d.ts +3 -2
  101. package/lib/solution/BookingByStep/index.js +4 -6
  102. package/lib/solution/BookingByStep/types.d.ts +1 -3
  103. package/lib/solution/BookingByStep/types.js +0 -10
  104. package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  105. package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
  106. package/lib/solution/Checkout/index.js +2 -0
  107. package/lib/solution/ShopDiscount/index.d.ts +2 -3
  108. package/lib/solution/ShopDiscount/index.js +27 -22
  109. package/lib/solution/ShopDiscount/types.d.ts +1 -1
  110. package/lib/solution/ShopDiscount/utils.js +10 -6
  111. package/lib/solution/index.d.ts +0 -2
  112. package/lib/solution/index.js +1 -5
  113. package/package.json +2 -2
  114. package/dist/apis/picoding.d.ts +0 -0
  115. package/dist/apis/picoding.js +0 -1
  116. package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
  117. package/dist/model/strategy/adapter/dataVariant/adapter.js +0 -167
  118. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -89
  119. package/dist/model/strategy/adapter/dataVariant/evaluator.js +0 -867
  120. package/dist/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
  121. package/dist/model/strategy/adapter/dataVariant/examples.js +0 -277
  122. package/dist/model/strategy/adapter/dataVariant/index.d.ts +0 -4
  123. package/dist/model/strategy/adapter/dataVariant/index.js +0 -4
  124. package/dist/model/strategy/adapter/dataVariant/type.d.ts +0 -149
  125. package/dist/model/strategy/adapter/dataVariant/type.js +0 -54
  126. package/dist/modules/OpenData/index.d.ts +0 -24
  127. package/dist/modules/OpenData/index.js +0 -173
  128. package/dist/modules/OpenData/types.d.ts +0 -73
  129. package/dist/modules/OpenData/types.js +0 -1
  130. package/dist/modules/OpenData/utils.d.ts +0 -2
  131. package/dist/modules/OpenData/utils.js +0 -75
  132. package/dist/modules/Quotation/index.d.ts +0 -48
  133. package/dist/modules/Quotation/index.js +0 -248
  134. package/dist/modules/Quotation/types.d.ts +0 -42
  135. package/dist/modules/Quotation/types.js +0 -1
  136. package/dist/modules/SalesSummary/index.d.ts +0 -63
  137. package/dist/modules/SalesSummary/index.js +0 -174
  138. package/dist/modules/SalesSummary/types.d.ts +0 -60
  139. package/dist/modules/SalesSummary/types.js +0 -1
  140. package/dist/modules/SalesSummary/utils.d.ts +0 -30
  141. package/dist/modules/SalesSummary/utils.js +0 -480
  142. package/dist/modules/ScanOrderLogger/index.d.ts +0 -23
  143. package/dist/modules/ScanOrderLogger/index.js +0 -174
  144. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  145. package/dist/modules/ScanOrderLogger/providers/feishu.js +0 -221
  146. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  147. package/dist/modules/ScanOrderLogger/providers/grafana.js +0 -50
  148. package/dist/modules/ScanOrderLogger/types.d.ts +0 -53
  149. package/dist/modules/ScanOrderLogger/types.js +0 -1
  150. package/dist/solution/ScanOrder/index.d.ts +0 -158
  151. package/dist/solution/ScanOrder/index.js +0 -3474
  152. package/dist/solution/ScanOrder/types.d.ts +0 -306
  153. package/dist/solution/ScanOrder/types.js +0 -35
  154. package/dist/solution/ScanOrder/utils.d.ts +0 -172
  155. package/dist/solution/ScanOrder/utils.js +0 -796
  156. package/dist/solution/VenueBooking/index.d.ts +0 -252
  157. package/dist/solution/VenueBooking/index.js +0 -3769
  158. package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -343
  159. package/dist/solution/VenueBooking/types.d.ts +0 -156
  160. package/dist/solution/VenueBooking/types.js +0 -22
  161. package/dist/solution/VenueBooking/utils/dateSummary.d.ts +0 -11
  162. package/dist/solution/VenueBooking/utils/dateSummary.js +0 -91
  163. package/dist/solution/VenueBooking/utils/resource.d.ts +0 -14
  164. package/dist/solution/VenueBooking/utils/resource.js +0 -131
  165. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -32
  166. package/dist/solution/VenueBooking/utils/slotMerge.js +0 -233
  167. package/dist/solution/VenueBooking/utils/smartPricing.d.ts +0 -71
  168. package/dist/solution/VenueBooking/utils/smartPricing.js +0 -302
  169. package/dist/solution/VenueBooking/utils/timeSlot.d.ts +0 -34
  170. package/dist/solution/VenueBooking/utils/timeSlot.js +0 -458
  171. package/dist/solution/VenueBooking/utils.d.ts +0 -1
  172. package/dist/solution/VenueBooking/utils.js +0 -1
  173. package/lib/apis/picoding.d.ts +0 -0
  174. package/lib/apis/picoding.js +0 -0
  175. package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
  176. package/lib/model/strategy/adapter/dataVariant/adapter.js +0 -149
  177. package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -89
  178. package/lib/model/strategy/adapter/dataVariant/evaluator.js +0 -666
  179. package/lib/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
  180. package/lib/model/strategy/adapter/dataVariant/examples.js +0 -293
  181. package/lib/model/strategy/adapter/dataVariant/index.d.ts +0 -4
  182. package/lib/model/strategy/adapter/dataVariant/index.js +0 -38
  183. package/lib/model/strategy/adapter/dataVariant/type.d.ts +0 -149
  184. package/lib/model/strategy/adapter/dataVariant/type.js +0 -31
  185. package/lib/modules/OpenData/index.d.ts +0 -24
  186. package/lib/modules/OpenData/index.js +0 -119
  187. package/lib/modules/OpenData/types.d.ts +0 -73
  188. package/lib/modules/OpenData/types.js +0 -17
  189. package/lib/modules/OpenData/utils.d.ts +0 -2
  190. package/lib/modules/OpenData/utils.js +0 -111
  191. package/lib/modules/Quotation/index.d.ts +0 -48
  192. package/lib/modules/Quotation/index.js +0 -152
  193. package/lib/modules/Quotation/types.d.ts +0 -42
  194. package/lib/modules/Quotation/types.js +0 -17
  195. package/lib/modules/SalesSummary/index.d.ts +0 -63
  196. package/lib/modules/SalesSummary/index.js +0 -105
  197. package/lib/modules/SalesSummary/types.d.ts +0 -60
  198. package/lib/modules/SalesSummary/types.js +0 -17
  199. package/lib/modules/SalesSummary/utils.d.ts +0 -30
  200. package/lib/modules/SalesSummary/utils.js +0 -420
  201. package/lib/modules/ScanOrderLogger/index.d.ts +0 -23
  202. package/lib/modules/ScanOrderLogger/index.js +0 -147
  203. package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  204. package/lib/modules/ScanOrderLogger/providers/feishu.js +0 -157
  205. package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  206. package/lib/modules/ScanOrderLogger/providers/grafana.js +0 -52
  207. package/lib/modules/ScanOrderLogger/types.d.ts +0 -53
  208. package/lib/modules/ScanOrderLogger/types.js +0 -17
  209. package/lib/solution/ScanOrder/index.d.ts +0 -158
  210. package/lib/solution/ScanOrder/index.js +0 -2135
  211. package/lib/solution/ScanOrder/types.d.ts +0 -306
  212. package/lib/solution/ScanOrder/types.js +0 -36
  213. package/lib/solution/ScanOrder/utils.d.ts +0 -172
  214. package/lib/solution/ScanOrder/utils.js +0 -658
  215. package/lib/solution/VenueBooking/index.d.ts +0 -252
  216. package/lib/solution/VenueBooking/index.js +0 -2204
  217. package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -343
  218. package/lib/solution/VenueBooking/types.d.ts +0 -156
  219. package/lib/solution/VenueBooking/types.js +0 -45
  220. package/lib/solution/VenueBooking/utils/dateSummary.d.ts +0 -11
  221. package/lib/solution/VenueBooking/utils/dateSummary.js +0 -105
  222. package/lib/solution/VenueBooking/utils/resource.d.ts +0 -14
  223. package/lib/solution/VenueBooking/utils/resource.js +0 -92
  224. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -32
  225. package/lib/solution/VenueBooking/utils/slotMerge.js +0 -236
  226. package/lib/solution/VenueBooking/utils/smartPricing.d.ts +0 -71
  227. package/lib/solution/VenueBooking/utils/smartPricing.js +0 -225
  228. package/lib/solution/VenueBooking/utils/timeSlot.d.ts +0 -34
  229. package/lib/solution/VenueBooking/utils/timeSlot.js +0 -343
  230. package/lib/solution/VenueBooking/utils.d.ts +0 -1
  231. package/lib/solution/VenueBooking/utils.js +0 -69
@@ -1,14 +0,0 @@
1
- import type { ProductData } from '../../../modules/Product/types';
2
- import type { ResourceProductMapping } from '../types';
3
- /**
4
- * 从商品列表里抽取所有 resource_id:
5
- * - 商品绑定的 default_resource / optional_resource
6
- * - 以及这些资源上声明的 combined_resource.resource_ids(若可从 product_resource 读取)
7
- * 用于一次性拉到子资源数据,判定组合资源的可用性。
8
- */
9
- export declare function extractResourceIds(products: ProductData[]): number[];
10
- /**
11
- * 每个 resourceId 可以被多个商品共享(同一场地关联多种运动商品)。
12
- * Map 的 value 改为 ResourceProductMapping[],按商品出现顺序保留。
13
- */
14
- export declare function buildResourceProductMap(products: ProductData[]): Map<number | string, ResourceProductMapping[]>;
@@ -1,92 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/solution/VenueBooking/utils/resource.ts
20
- var resource_exports = {};
21
- __export(resource_exports, {
22
- buildResourceProductMap: () => buildResourceProductMap,
23
- extractResourceIds: () => extractResourceIds
24
- });
25
- module.exports = __toCommonJS(resource_exports);
26
- function extractResourceIds(products) {
27
- var _a;
28
- const ids = /* @__PURE__ */ new Set();
29
- for (const product of products) {
30
- const resources = (_a = product.product_resource) == null ? void 0 : _a.resources;
31
- if (!Array.isArray(resources))
32
- continue;
33
- for (const resource of resources) {
34
- if (resource.status !== 1)
35
- continue;
36
- const defaultRes = resource.default_resource || [];
37
- const optionalRes = resource.optional_resource || [];
38
- for (const id of [...defaultRes, ...optionalRes]) {
39
- if (typeof id === "number" && id > 0)
40
- ids.add(id);
41
- }
42
- const combined = resource.combined_resource;
43
- if (combined && combined.status === 1 && Array.isArray(combined.resource_ids)) {
44
- for (const id of combined.resource_ids) {
45
- if (typeof id === "number" && id > 0)
46
- ids.add(id);
47
- }
48
- }
49
- }
50
- }
51
- return Array.from(ids);
52
- }
53
- function buildResourceProductMap(products) {
54
- var _a;
55
- const map = /* @__PURE__ */ new Map();
56
- for (const product of products) {
57
- const resources = (_a = product.product_resource) == null ? void 0 : _a.resources;
58
- if (!Array.isArray(resources))
59
- continue;
60
- for (const resource of resources) {
61
- if (resource.status !== 1)
62
- continue;
63
- const allResourceIds = [
64
- ...resource.default_resource || [],
65
- ...resource.optional_resource || []
66
- ];
67
- for (const resId of allResourceIds) {
68
- const existing = map.get(resId);
69
- const mapping = {
70
- productId: product.id,
71
- productTitle: product.title,
72
- formName: resource.title,
73
- resourceName: resource.title,
74
- formId: resource.id,
75
- price: product.price || "0.00",
76
- resourceType: resource.type || "single"
77
- };
78
- if (!existing) {
79
- map.set(resId, [mapping]);
80
- } else if (!existing.some((m) => m.productId === mapping.productId)) {
81
- existing.push(mapping);
82
- }
83
- }
84
- }
85
- }
86
- return map;
87
- }
88
- // Annotate the CommonJS export names for ESM import in node:
89
- 0 && (module.exports = {
90
- buildResourceProductMap,
91
- extractResourceIds
92
- });
@@ -1,32 +0,0 @@
1
- import type { VenueSlotSelection, MergedSlotGroup, PriceBreakdownEntry, ResourceProductMapping, VenueResourceRawData } from '../types';
2
- import type { ScanOrderOrderProduct } from '../../ScanOrder/types';
3
- export declare function buildVenueIdentityKey(resourceId: number | string, groupIndex: number): string;
4
- export declare function mergeConsecutiveSlots(slots: VenueSlotSelection[]): MergedSlotGroup[];
5
- export declare function buildPriceBreakdown(params: {
6
- group: MergedSlotGroup;
7
- productId: number;
8
- }): PriceBreakdownEntry[];
9
- export interface BuildVenueBookingParams {
10
- group: MergedSlotGroup;
11
- resourceId: number | string;
12
- mapping: ResourceProductMapping;
13
- rawResource: VenueResourceRawData | undefined;
14
- bookingUuid: string;
15
- productUid: string;
16
- /**
17
- * 若当前 resource 是组合资源(combined_resource.status === 1),传入其子资源的原始数据,
18
- * 将作为 resources[0].children 写入 booking,结构与父 resource 保持一致。
19
- */
20
- childResources?: VenueResourceRawData[];
21
- }
22
- export declare function buildVenueResourceMetadata(params: {
23
- mapping: ResourceProductMapping;
24
- rawResource: VenueResourceRawData | undefined;
25
- }): Record<string, any>;
26
- export declare function buildVenueBookingEntry(params: BuildVenueBookingParams): Record<string, any>;
27
- /**
28
- * 从一条已合并的订单商品还原出独立的时段列表。
29
- * 优先使用 metadata.price_breakdown 还原每个时段的精确价格,
30
- * 回退到按 selling_price / slot_count 均分。
31
- */
32
- export declare function expandMergedSlotToIndividual(product: ScanOrderOrderProduct, slotDurationMinutes: number): VenueSlotSelection[];
@@ -1,236 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/solution/VenueBooking/utils/slotMerge.ts
30
- var slotMerge_exports = {};
31
- __export(slotMerge_exports, {
32
- buildPriceBreakdown: () => buildPriceBreakdown,
33
- buildVenueBookingEntry: () => buildVenueBookingEntry,
34
- buildVenueIdentityKey: () => buildVenueIdentityKey,
35
- buildVenueResourceMetadata: () => buildVenueResourceMetadata,
36
- expandMergedSlotToIndividual: () => expandMergedSlotToIndividual,
37
- mergeConsecutiveSlots: () => mergeConsecutiveSlots
38
- });
39
- module.exports = __toCommonJS(slotMerge_exports);
40
- var import_decimal = __toESM(require("decimal.js"));
41
- var import_dayjs = __toESM(require("dayjs"));
42
- var import_utils = require("../../../modules/Order/utils");
43
- function buildVenueIdentityKey(resourceId, groupIndex) {
44
- return `venue:${resourceId}:${groupIndex}:${(0, import_utils.createUuidV4)()}`;
45
- }
46
- function mergeConsecutiveSlots(slots) {
47
- if (!slots.length)
48
- return [];
49
- const sorted = [...slots].sort((a, b) => a.startTime.localeCompare(b.startTime));
50
- const groups = [];
51
- let currentSlots = [sorted[0]];
52
- let currentStart = sorted[0].startTime;
53
- let currentEnd = sorted[0].endTime;
54
- let totalPrice = new import_decimal.default(sorted[0].price || "0");
55
- for (let i = 1; i < sorted.length; i++) {
56
- const slot = sorted[i];
57
- if (slot.startTime === currentEnd) {
58
- currentEnd = slot.endTime;
59
- totalPrice = totalPrice.add(new import_decimal.default(slot.price || "0"));
60
- currentSlots.push(slot);
61
- } else {
62
- groups.push({
63
- startTime: currentStart,
64
- endTime: currentEnd,
65
- totalPrice: totalPrice.toFixed(2),
66
- slotCount: currentSlots.length,
67
- slots: currentSlots
68
- });
69
- currentSlots = [slot];
70
- currentStart = slot.startTime;
71
- currentEnd = slot.endTime;
72
- totalPrice = new import_decimal.default(slot.price || "0");
73
- }
74
- }
75
- groups.push({
76
- startTime: currentStart,
77
- endTime: currentEnd,
78
- totalPrice: totalPrice.toFixed(2),
79
- slotCount: currentSlots.length,
80
- slots: currentSlots
81
- });
82
- return groups;
83
- }
84
- function buildPriceBreakdown(params) {
85
- const { group } = params;
86
- if (!group.slots.length)
87
- return [];
88
- const entries = [];
89
- for (const slot of group.slots) {
90
- const unitPrice = Number(slot.price || "0");
91
- const startHm = (0, import_dayjs.default)(slot.startTime, "YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm");
92
- const endHm = (0, import_dayjs.default)(slot.endTime, "YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm");
93
- const last = entries[entries.length - 1];
94
- if (last && last.unit_price === unitPrice && last.quotation_shelf_id === 0 && last.end_time === startHm) {
95
- last.end_time = endHm;
96
- last.quantity += 1;
97
- } else {
98
- entries.push({
99
- start_time: startHm,
100
- end_time: endHm,
101
- unit_price: unitPrice,
102
- quotation_shelf_id: 0,
103
- quantity: 1
104
- });
105
- }
106
- }
107
- return entries;
108
- }
109
- function buildVenueResourceMetadata(params) {
110
- const { mapping, rawResource } = params;
111
- const combined = rawResource == null ? void 0 : rawResource.combined_resource;
112
- const isCombined = !!(combined && combined.status === 1 && Array.isArray(combined.resource_ids));
113
- return {
114
- form_name: mapping.formName ?? mapping.resourceName,
115
- resource_name: (rawResource == null ? void 0 : rawResource.main_field) ?? mapping.resourceName,
116
- combined_resource: isCombined ? combined : null
117
- };
118
- }
119
- function buildVenueBookingEntry(params) {
120
- const { group, resourceId, mapping, rawResource, bookingUuid, productUid, childResources } = params;
121
- const startMoment = (0, import_dayjs.default)(group.startTime, "YYYY-MM-DD HH:mm");
122
- const endMoment = (0, import_dayjs.default)(group.endTime, "YYYY-MM-DD HH:mm");
123
- const duration = endMoment.diff(startMoment, "minute");
124
- const resourceEntry = {
125
- relation_type: "form",
126
- like_status: "common",
127
- id: resourceId,
128
- main_field: mapping.resourceName,
129
- form_id: (rawResource == null ? void 0 : rawResource.form_id) ?? mapping.formId,
130
- relation_id: resourceId,
131
- capacity: 1,
132
- metadata: buildVenueResourceMetadata({ mapping, rawResource })
133
- };
134
- if (childResources && childResources.length) {
135
- resourceEntry.children = childResources.map((child) => ({
136
- relation_type: "form",
137
- like_status: "common",
138
- id: child.resourceId,
139
- main_field: child.main_field || "",
140
- form_id: child.form_id ?? child.formId,
141
- relation_id: child.resourceId,
142
- capacity: child.capacity ?? 1,
143
- metadata: {}
144
- }));
145
- }
146
- return {
147
- schedule_event_id: null,
148
- appointment_status: "new",
149
- start_date: startMoment.format("YYYY-MM-DD"),
150
- start_time: startMoment.format("HH:mm"),
151
- end_date: endMoment.format("YYYY-MM-DD"),
152
- end_time: endMoment.format("HH:mm"),
153
- select_date: startMoment.format("YYYY-MM-DD"),
154
- duration,
155
- sub_type: "minutes",
156
- like_status: "common",
157
- number: 1,
158
- is_all: false,
159
- schedule_id: 0,
160
- product_uid: productUid,
161
- resources: [resourceEntry],
162
- relation_products: [],
163
- relation_forms: [],
164
- holder: null,
165
- metadata: {
166
- unique_identification_number: bookingUuid,
167
- venue_booking: true,
168
- resource_id: resourceId,
169
- product_id: mapping.productId
170
- }
171
- };
172
- }
173
- function expandMergedSlotToIndividual(product, slotDurationMinutes) {
174
- const meta = product.metadata || {};
175
- const resourceId = meta.resource_id;
176
- if (resourceId == null)
177
- return [];
178
- const startTime = meta.start_time;
179
- const endTime = meta.end_time;
180
- if (!startTime || !endTime)
181
- return [];
182
- const productId = Number(product.product_id);
183
- const breakdown = meta.price_breakdown;
184
- const result = [];
185
- let cursor = (0, import_dayjs.default)(startTime, "YYYY-MM-DD HH:mm");
186
- const end = (0, import_dayjs.default)(endTime, "YYYY-MM-DD HH:mm");
187
- if (breakdown == null ? void 0 : breakdown.length) {
188
- const priceMap = /* @__PURE__ */ new Map();
189
- for (const entry of breakdown) {
190
- let entryCursor = (0, import_dayjs.default)(entry.start_time, "YYYY-MM-DD HH:mm");
191
- const entryEnd = (0, import_dayjs.default)(entry.end_time, "YYYY-MM-DD HH:mm");
192
- while (entryCursor.isBefore(entryEnd)) {
193
- priceMap.set(entryCursor.format("HH:mm"), entry.unit_price);
194
- entryCursor = entryCursor.add(slotDurationMinutes, "minute");
195
- }
196
- }
197
- while (cursor.isBefore(end)) {
198
- const slotEnd = cursor.add(slotDurationMinutes, "minute");
199
- const hm = cursor.format("HH:mm");
200
- const price = priceMap.get(hm) ?? 0;
201
- result.push({
202
- resourceId,
203
- productId,
204
- startTime: cursor.format("YYYY-MM-DD HH:mm"),
205
- endTime: slotEnd.format("YYYY-MM-DD HH:mm"),
206
- price: new import_decimal.default(price).toFixed(2)
207
- });
208
- cursor = slotEnd;
209
- }
210
- } else {
211
- const slotCount = meta.slot_count || 1;
212
- const totalPrice = new import_decimal.default(product.selling_price || "0");
213
- const perSlotPrice = slotCount > 0 ? totalPrice.div(slotCount).toFixed(2) : totalPrice.toFixed(2);
214
- while (cursor.isBefore(end)) {
215
- const slotEnd = cursor.add(slotDurationMinutes, "minute");
216
- result.push({
217
- resourceId,
218
- productId,
219
- startTime: cursor.format("YYYY-MM-DD HH:mm"),
220
- endTime: slotEnd.format("YYYY-MM-DD HH:mm"),
221
- price: perSlotPrice
222
- });
223
- cursor = slotEnd;
224
- }
225
- }
226
- return result;
227
- }
228
- // Annotate the CommonJS export names for ESM import in node:
229
- 0 && (module.exports = {
230
- buildPriceBreakdown,
231
- buildVenueBookingEntry,
232
- buildVenueIdentityKey,
233
- buildVenueResourceMetadata,
234
- expandMergedSlotToIndividual,
235
- mergeConsecutiveSlots
236
- });
@@ -1,71 +0,0 @@
1
- import type { ProductData } from '../../../modules/Product/types';
2
- import type { ScheduleItem } from '../../../modules/Schedule/types';
3
- import type { DataVariantBusinessData, DataVariantMenu, DataVariantProduct } from '../../../model/strategy/adapter/dataVariant/type';
4
- import type { DataVariantEvaluator } from '../../../model/strategy/adapter/dataVariant/evaluator';
5
- import type { StrategyConfig } from '../../../model/strategy/type';
6
- import type { VenueBookingSlotConfig } from '../types';
7
- /** VenueBooking 智能定价运行时上下文 */
8
- export interface VenueBookingSmartPricingContext {
9
- evaluator?: DataVariantEvaluator | null;
10
- scheduleList?: ScheduleItem[];
11
- menuList?: DataVariantMenu[];
12
- customerId?: number | string;
13
- availableWalletIds?: Array<number | string>;
14
- channel?: string;
15
- businessCode?: string;
16
- orderType?: string;
17
- strategy_context?: Record<string, any>;
18
- strategyConfigs?: StrategyConfig[];
19
- debugLog?: (title: string, payload?: Record<string, any>) => void;
20
- }
21
- /** 从商品上读取展示/算价用的 price 字段 */
22
- export declare function extractProductPrice(product: DataVariantProduct): string | null;
23
- /** 组装 DataVariant 评估入参,对齐 OS Server buildProductFormatterContext 语义 */
24
- export declare function buildDataVariantBusinessData(products: ProductData[], context: VenueBookingSmartPricingContext, scheduleDateTime: string): DataVariantBusinessData;
25
- /**
26
- * 对商品列表执行一次智能定价格式化(loadProducts 后使用)。
27
- * evaluator 未注入时原样返回并打 warning。
28
- */
29
- export declare function formatProductsWithDataVariant(products: ProductData[], context: VenueBookingSmartPricingContext, scheduleDateTime?: string): ProductData[];
30
- /**
31
- * 根据 schedule_time_points 与营业开始时间,构造当天需要评估的 datetime 列表(升序)。
32
- * 跨日营业时,早于营业开始小时的时间点归到次日。
33
- */
34
- export declare function buildEvaluationDatetimes(params: {
35
- date: string;
36
- config: VenueBookingSlotConfig;
37
- scheduleTimePoints: string[];
38
- }): string[];
39
- /** 找到 slot 时间所属分段的评估 datetime(max(evalDt <= slotDt)) */
40
- export declare function findSegmentEvalDatetime(slotDatetime: string, evalDatetimes: string[]): string;
41
- /** 将 slot 标签转为与 timeSlot 网格一致的 slotStart 字符串 */
42
- export declare function buildSlotStartDatetime(date: string, label: string, config: VenueBookingSlotConfig): string;
43
- /**
44
- * 按 schedule 分段批量 resolveProducts,输出与 quotation 相同 key 格式的 slot 价格 Map。
45
- * key: `${productId}:${slotStart}`,value: price | null
46
- */
47
- export declare function buildSlotPriceMapByScheduleSegments(params: {
48
- products: ProductData[];
49
- productIds: number[];
50
- date: string;
51
- timeLabels: string[];
52
- config: VenueBookingSlotConfig;
53
- context: VenueBookingSmartPricingContext;
54
- }): Map<string, string | null>;
55
- /**
56
- * 指定商品在某一 datetime 的智能定价(addon / 单点重算用)。
57
- */
58
- export declare function getPriceForProductAtDatetime(params: {
59
- products: ProductData[];
60
- context: VenueBookingSmartPricingContext;
61
- productId: number;
62
- datetime: string;
63
- fallbackPrice?: string;
64
- }): string;
65
- /** 从 slot 价格 Map 读取单价,找不到则回退 fallback */
66
- export declare function getSlotPriceFromMap(params: {
67
- slotPriceMap: Map<string, string | null>;
68
- productId: number;
69
- slotStartTime: string;
70
- fallbackPrice?: string;
71
- }): string;
@@ -1,225 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/solution/VenueBooking/utils/smartPricing.ts
30
- var smartPricing_exports = {};
31
- __export(smartPricing_exports, {
32
- buildDataVariantBusinessData: () => buildDataVariantBusinessData,
33
- buildEvaluationDatetimes: () => buildEvaluationDatetimes,
34
- buildSlotPriceMapByScheduleSegments: () => buildSlotPriceMapByScheduleSegments,
35
- buildSlotStartDatetime: () => buildSlotStartDatetime,
36
- extractProductPrice: () => extractProductPrice,
37
- findSegmentEvalDatetime: () => findSegmentEvalDatetime,
38
- formatProductsWithDataVariant: () => formatProductsWithDataVariant,
39
- getPriceForProductAtDatetime: () => getPriceForProductAtDatetime,
40
- getSlotPriceFromMap: () => getSlotPriceFromMap
41
- });
42
- module.exports = __toCommonJS(smartPricing_exports);
43
- var import_dayjs = __toESM(require("dayjs"));
44
- var import_timeSlot = require("./timeSlot");
45
- function extractProductPrice(product) {
46
- const price = (product == null ? void 0 : product.price) ?? (product == null ? void 0 : product.selling_price);
47
- if (price == null || price === "")
48
- return null;
49
- return String(price);
50
- }
51
- function buildDataVariantBusinessData(products, context, scheduleDateTime) {
52
- const strategyContext = context.strategy_context || {};
53
- return {
54
- products,
55
- strategyConfigs: context.strategyConfigs,
56
- scheduleDateTime,
57
- scheduleList: context.scheduleList || [],
58
- menuList: context.menuList || [],
59
- customerId: context.customerId,
60
- availableWalletIds: context.availableWalletIds ?? strategyContext.available_wallet_ids ?? strategyContext.availableWalletIds,
61
- channel: context.channel ?? strategyContext.channel,
62
- orderType: context.orderType ?? strategyContext.orderType ?? strategyContext.order_type,
63
- businessCode: context.businessCode ?? strategyContext.business_code ?? strategyContext.businessCode,
64
- custom: strategyContext,
65
- debugLog: context == null ? void 0 : context.debugLog
66
- };
67
- }
68
- function formatProductsWithDataVariant(products, context, scheduleDateTime) {
69
- var _a, _b, _c, _d;
70
- const evaluator = context.evaluator;
71
- if (!evaluator || typeof evaluator.resolveProducts !== "function") {
72
- console.warn("[VenueBooking][smartPricing] dataVariantEvaluator 未注入,跳过智能定价格式化");
73
- return products;
74
- }
75
- const resolvedAt = scheduleDateTime || (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
76
- const businessData = buildDataVariantBusinessData(products, context, resolvedAt);
77
- (_a = context.debugLog) == null ? void 0 : _a.call(context, "[VenueBooking][smartPricing] formatProducts input", {
78
- scheduleDateTime: resolvedAt,
79
- customerId: businessData.customerId,
80
- availableWalletIds: businessData.availableWalletIds,
81
- channel: businessData.channel,
82
- businessCode: businessData.businessCode,
83
- orderType: businessData.orderType,
84
- productCount: products.length,
85
- products: products.map((product) => ({
86
- productId: (product == null ? void 0 : product.id) ?? (product == null ? void 0 : product.product_id),
87
- price: product == null ? void 0 : product.price,
88
- sellingPrice: product == null ? void 0 : product.selling_price,
89
- dataVariants: Array.isArray(product == null ? void 0 : product.data_variants) ? product.data_variants.map((variant) => ({
90
- dataVariantRuleId: variant == null ? void 0 : variant.data_variant_rule_id,
91
- data: variant == null ? void 0 : variant.data
92
- })) : []
93
- }))
94
- });
95
- const result = evaluator.resolveProducts(businessData);
96
- (_d = context.debugLog) == null ? void 0 : _d.call(context, "[VenueBooking][smartPricing] formatProducts output", {
97
- scheduleDateTime: resolvedAt,
98
- effectiveRuleIds: Array.from(((_c = (_b = result == null ? void 0 : result.globalEffectiveRuleMap) == null ? void 0 : _b.keys) == null ? void 0 : _c.call(_b)) || []),
99
- resultProducts: (result == null ? void 0 : result.products) || []
100
- });
101
- return Array.isArray(result == null ? void 0 : result.products) ? result.products : products;
102
- }
103
- function buildEvaluationDatetimes(params) {
104
- const { date, config, scheduleTimePoints } = params;
105
- const crossDay = (0, import_timeSlot.isBusinessHoursCrossDay)(config);
106
- const businessStartHour = Number(config.businessStartTime.split(":")[0]);
107
- const evalSet = /* @__PURE__ */ new Set();
108
- evalSet.add(`${date} ${config.businessStartTime}`);
109
- for (const timePoint of scheduleTimePoints) {
110
- const hour = Number(timePoint.split(":")[0]);
111
- const pointDate = crossDay && hour < businessStartHour ? (0, import_dayjs.default)(date).add(1, "day").format("YYYY-MM-DD") : date;
112
- evalSet.add(`${pointDate} ${timePoint}`);
113
- }
114
- return Array.from(evalSet).sort((a, b) => {
115
- const aMs = (0, import_dayjs.default)(a, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD HH:mm"]).valueOf();
116
- const bMs = (0, import_dayjs.default)(b, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD HH:mm"]).valueOf();
117
- return aMs - bMs;
118
- });
119
- }
120
- function findSegmentEvalDatetime(slotDatetime, evalDatetimes) {
121
- if (!evalDatetimes.length)
122
- return slotDatetime;
123
- const slotMs = (0, import_dayjs.default)(slotDatetime, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD HH:mm"]).valueOf();
124
- let chosen = evalDatetimes[0];
125
- for (const evalDt of evalDatetimes) {
126
- const evalMs = (0, import_dayjs.default)(evalDt, ["YYYY-MM-DD HH:mm:ss", "YYYY-MM-DD HH:mm"]).valueOf();
127
- if (evalMs <= slotMs) {
128
- chosen = evalDt;
129
- } else {
130
- break;
131
- }
132
- }
133
- return chosen;
134
- }
135
- function buildSlotStartDatetime(date, label, config) {
136
- const crossDay = (0, import_timeSlot.isBusinessHoursCrossDay)(config);
137
- const businessStartHour = Number(config.businessStartTime.split(":")[0]);
138
- const hour = Number(label.split(":")[0]);
139
- const slotDate = crossDay && hour < businessStartHour ? (0, import_dayjs.default)(date).add(1, "day").format("YYYY-MM-DD") : date;
140
- return (0, import_dayjs.default)(`${slotDate} ${label}`).format("YYYY-MM-DD HH:mm");
141
- }
142
- function buildSlotPriceMapByScheduleSegments(params) {
143
- var _a, _b, _c;
144
- const { products, productIds, date, timeLabels, config, context } = params;
145
- const map = /* @__PURE__ */ new Map();
146
- if (!productIds.length || !timeLabels.length)
147
- return map;
148
- const evaluator = context.evaluator;
149
- if (!evaluator || typeof evaluator.resolveProducts !== "function") {
150
- return map;
151
- }
152
- const strategyConfigs = context.strategyConfigs || (typeof evaluator.getStrategyConfigs === "function" ? evaluator.getStrategyConfigs() : []);
153
- const scheduleTimePoints = typeof evaluator.buildScheduleTimePoints === "function" ? evaluator.buildScheduleTimePoints(strategyConfigs, context.scheduleList || []) : [];
154
- const evalDatetimes = buildEvaluationDatetimes({ date, config, scheduleTimePoints });
155
- const priceCache = /* @__PURE__ */ new Map();
156
- (_a = context.debugLog) == null ? void 0 : _a.call(context, "[VenueBooking][smartPricing] slot price evaluation started", {
157
- date,
158
- productIds,
159
- scheduleTimePoints,
160
- evalDatetimes,
161
- timeLabels
162
- });
163
- for (const evalDt of evalDatetimes) {
164
- const resolved = formatProductsWithDataVariant(products, context, evalDt);
165
- const priceByProductId = /* @__PURE__ */ new Map();
166
- for (const product of resolved) {
167
- const productId = Number(product.id);
168
- if (!Number.isFinite(productId))
169
- continue;
170
- priceByProductId.set(productId, extractProductPrice(product));
171
- }
172
- priceCache.set(evalDt, priceByProductId);
173
- (_b = context.debugLog) == null ? void 0 : _b.call(context, "[VenueBooking][smartPricing] slot segment prices resolved", {
174
- date,
175
- evalDatetime: evalDt,
176
- prices: productIds.map((productId) => ({
177
- productId,
178
- price: priceByProductId.get(productId) ?? null
179
- }))
180
- });
181
- }
182
- for (const label of timeLabels) {
183
- const slotStart = buildSlotStartDatetime(date, label, config);
184
- const segmentEvalDt = findSegmentEvalDatetime(slotStart, evalDatetimes);
185
- const priceByProductId = priceCache.get(segmentEvalDt);
186
- for (const productId of productIds) {
187
- const key = `${productId}:${slotStart}`;
188
- const price = (priceByProductId == null ? void 0 : priceByProductId.get(productId)) ?? null;
189
- if (price !== null) {
190
- map.set(key, price);
191
- }
192
- }
193
- }
194
- (_c = context.debugLog) == null ? void 0 : _c.call(context, "[VenueBooking][smartPricing] slot price map completed", {
195
- date,
196
- entries: Array.from(map.entries()).map(([key, price]) => ({ key, price }))
197
- });
198
- return map;
199
- }
200
- function getPriceForProductAtDatetime(params) {
201
- const { products, context, productId, datetime, fallbackPrice } = params;
202
- const resolved = formatProductsWithDataVariant(products, context, datetime);
203
- const product = resolved.find((item) => Number(item.id) === Number(productId));
204
- return extractProductPrice(product || {}) ?? fallbackPrice ?? "0.00";
205
- }
206
- function getSlotPriceFromMap(params) {
207
- const { slotPriceMap, productId, slotStartTime, fallbackPrice } = params;
208
- const key = `${productId}:${slotStartTime}`;
209
- const mapped = slotPriceMap.get(key);
210
- if (mapped != null)
211
- return mapped;
212
- return fallbackPrice ?? "0.00";
213
- }
214
- // Annotate the CommonJS export names for ESM import in node:
215
- 0 && (module.exports = {
216
- buildDataVariantBusinessData,
217
- buildEvaluationDatetimes,
218
- buildSlotPriceMapByScheduleSegments,
219
- buildSlotStartDatetime,
220
- extractProductPrice,
221
- findSegmentEvalDatetime,
222
- formatProductsWithDataVariant,
223
- getPriceForProductAtDatetime,
224
- getSlotPriceFromMap
225
- });