@pisell/pisellos 2.2.272 → 2.2.274

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 (113) hide show
  1. package/dist/core/index.d.ts +0 -2
  2. package/dist/core/index.js +0 -7
  3. package/dist/model/strategy/adapter/promotion/adapter.d.ts +0 -4
  4. package/dist/model/strategy/adapter/promotion/adapter.js +0 -23
  5. package/dist/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
  6. package/dist/model/strategy/adapter/promotion/evaluator.js +6 -279
  7. package/dist/model/strategy/adapter/promotion/examples.d.ts +0 -86
  8. package/dist/model/strategy/adapter/promotion/examples.js +0 -99
  9. package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
  10. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  11. package/dist/model/strategy/adapter/promotion/type.d.ts +2 -90
  12. package/dist/model/strategy/adapter/promotion/type.js +0 -45
  13. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +16 -12
  14. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +6 -3
  15. package/dist/modules/OpenData/index.d.ts +0 -2
  16. package/dist/modules/OpenData/index.js +0 -8
  17. package/dist/modules/Order/index.d.ts +12 -31
  18. package/dist/modules/Order/index.js +562 -778
  19. package/dist/modules/Order/types.d.ts +22 -36
  20. package/dist/modules/Order/types.js +11 -0
  21. package/dist/modules/Order/utils/orderCollectionIdentity.js +2 -7
  22. package/dist/modules/Order/utils.js +6 -10
  23. package/dist/modules/Payment/index.d.ts +0 -2
  24. package/dist/modules/Payment/index.js +50 -79
  25. package/dist/modules/Payment/types.d.ts +27 -29
  26. package/dist/modules/Payment/types.js +3 -5
  27. package/dist/modules/Rules/index.d.ts +0 -1
  28. package/dist/modules/Rules/index.js +39 -55
  29. package/dist/modules/SalesSummary/utils.js +7 -1
  30. package/dist/server/index.d.ts +0 -16
  31. package/dist/server/index.js +1036 -1933
  32. package/dist/server/modules/order/index.d.ts +4 -49
  33. package/dist/server/modules/order/index.js +695 -1574
  34. package/dist/server/modules/order/types.d.ts +3 -11
  35. package/dist/server/modules/order/types.js +1 -1
  36. package/dist/solution/BaseSales/index.d.ts +25 -59
  37. package/dist/solution/BaseSales/index.js +490 -767
  38. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
  39. package/dist/solution/BaseSales/utils/cartPromotion.js +36 -93
  40. package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
  41. package/dist/solution/BookingByStep/index.d.ts +1 -1
  42. package/dist/solution/BookingTicket/index.d.ts +5 -21
  43. package/dist/solution/BookingTicket/index.js +49 -126
  44. package/dist/solution/BookingTicket/types.d.ts +3 -0
  45. package/dist/solution/BookingTicket/utils/addProductDecision.js +6 -0
  46. package/dist/solution/BookingTicket/utils/cartView.js +44 -32
  47. package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts +5 -0
  48. package/dist/solution/BookingTicket/utils/weighingProductSku.js +45 -0
  49. package/dist/solution/Sales/index.d.ts +0 -1
  50. package/dist/solution/Sales/index.js +2 -10
  51. package/dist/solution/ScanOrder/index.js +20 -31
  52. package/dist/solution/VenueBooking/index.js +19 -30
  53. package/dist/types/index.d.ts +0 -1
  54. package/lib/core/index.d.ts +0 -2
  55. package/lib/core/index.js +0 -4
  56. package/lib/model/strategy/adapter/promotion/adapter.d.ts +0 -4
  57. package/lib/model/strategy/adapter/promotion/adapter.js +0 -20
  58. package/lib/model/strategy/adapter/promotion/evaluator.d.ts +0 -17
  59. package/lib/model/strategy/adapter/promotion/evaluator.js +0 -235
  60. package/lib/model/strategy/adapter/promotion/examples.d.ts +0 -86
  61. package/lib/model/strategy/adapter/promotion/examples.js +0 -91
  62. package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
  63. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  64. package/lib/model/strategy/adapter/promotion/type.d.ts +2 -90
  65. package/lib/model/strategy/adapter/promotion/type.js +0 -2
  66. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +5 -2
  67. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +2 -1
  68. package/lib/modules/OpenData/index.d.ts +0 -2
  69. package/lib/modules/OpenData/index.js +0 -5
  70. package/lib/modules/Order/index.d.ts +12 -31
  71. package/lib/modules/Order/index.js +142 -201
  72. package/lib/modules/Order/types.d.ts +22 -36
  73. package/lib/modules/Order/utils/orderCollectionIdentity.js +0 -3
  74. package/lib/modules/Order/utils.js +4 -11
  75. package/lib/modules/Payment/index.d.ts +0 -2
  76. package/lib/modules/Payment/index.js +13 -34
  77. package/lib/modules/Payment/types.d.ts +27 -29
  78. package/lib/modules/Payment/types.js +3 -3
  79. package/lib/modules/Rules/index.d.ts +0 -1
  80. package/lib/modules/Rules/index.js +22 -41
  81. package/lib/modules/SalesSummary/utils.js +5 -1
  82. package/lib/server/index.d.ts +0 -16
  83. package/lib/server/index.js +18 -670
  84. package/lib/server/modules/order/index.d.ts +4 -49
  85. package/lib/server/modules/order/index.js +66 -657
  86. package/lib/server/modules/order/types.d.ts +3 -11
  87. package/lib/solution/BaseSales/index.d.ts +25 -59
  88. package/lib/solution/BaseSales/index.js +79 -246
  89. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +1 -3
  90. package/lib/solution/BaseSales/utils/cartPromotion.js +17 -65
  91. package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +1 -6
  92. package/lib/solution/BookingByStep/index.d.ts +1 -1
  93. package/lib/solution/BookingTicket/index.d.ts +5 -21
  94. package/lib/solution/BookingTicket/index.js +8 -59
  95. package/lib/solution/BookingTicket/types.d.ts +3 -0
  96. package/lib/solution/BookingTicket/utils/addProductDecision.js +4 -0
  97. package/lib/solution/BookingTicket/utils/cartView.js +43 -30
  98. package/lib/solution/BookingTicket/utils/weighingProductSku.d.ts +5 -0
  99. package/lib/solution/BookingTicket/utils/weighingProductSku.js +63 -0
  100. package/lib/solution/Sales/index.d.ts +0 -1
  101. package/lib/solution/Sales/index.js +3 -5
  102. package/lib/solution/ScanOrder/index.js +0 -8
  103. package/lib/solution/VenueBooking/index.js +0 -8
  104. package/lib/types/index.d.ts +0 -1
  105. package/package.json +1 -1
  106. package/dist/modules/Order/payment-utils.d.ts +0 -26
  107. package/dist/modules/Order/payment-utils.js +0 -225
  108. package/dist/utils/payment-number.d.ts +0 -9
  109. package/dist/utils/payment-number.js +0 -69
  110. package/lib/modules/Order/payment-utils.d.ts +0 -26
  111. package/lib/modules/Order/payment-utils.js +0 -224
  112. package/lib/utils/payment-number.d.ts +0 -9
  113. package/lib/utils/payment-number.js +0 -64
@@ -1,64 +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/utils/payment-number.ts
20
- var payment_number_exports = {};
21
- __export(payment_number_exports, {
22
- resolvePaymentNumberDevicePrefix: () => resolvePaymentNumberDevicePrefix,
23
- resolvePaymentNumberDevicePrefixFromDeviceId: () => resolvePaymentNumberDevicePrefixFromDeviceId
24
- });
25
- module.exports = __toCommonJS(payment_number_exports);
26
- function normalizeNonEmptyString(value) {
27
- if (value === void 0 || value === null)
28
- return null;
29
- if (typeof value !== "string" && typeof value !== "number")
30
- return null;
31
- if (typeof value === "number" && !Number.isFinite(value))
32
- return null;
33
- const normalized = String(value).trim();
34
- return normalized || null;
35
- }
36
- function resolvePaymentNumberDevicePrefixFromDeviceId(getAppData) {
37
- try {
38
- const deviceId = normalizeNonEmptyString(getAppData("device_id"));
39
- if (deviceId && deviceId !== "0")
40
- return deviceId.slice(-2);
41
- } catch {
42
- }
43
- return "LOCAL";
44
- }
45
- async function resolvePaymentNumberDevicePrefix(getAppData) {
46
- try {
47
- const getAsyncIotDeviceInfo = getAppData("async_iot_device_info");
48
- if (typeof getAsyncIotDeviceInfo === "function") {
49
- const info = await getAsyncIotDeviceInfo();
50
- const shortNumber = normalizeNonEmptyString(
51
- info == null ? void 0 : info.short_number
52
- );
53
- if (shortNumber && shortNumber !== "0")
54
- return shortNumber;
55
- }
56
- } catch {
57
- }
58
- return resolvePaymentNumberDevicePrefixFromDeviceId(getAppData);
59
- }
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {
62
- resolvePaymentNumberDevicePrefix,
63
- resolvePaymentNumberDevicePrefixFromDeviceId
64
- });