@pisell/pisellos 3.0.76 → 3.0.77

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 (308) hide show
  1. package/dist/core/index.js +1 -2
  2. package/dist/effects/index.d.ts +3 -5
  3. package/dist/effects/index.js +8 -40
  4. package/dist/modules/Account/index.js +3 -2
  5. package/dist/modules/AccountList/index.d.ts +1 -7
  6. package/dist/modules/AccountList/index.js +14 -81
  7. package/dist/modules/AccountList/types.d.ts +0 -28
  8. package/dist/modules/AccountList/types.js +0 -8
  9. package/dist/modules/BaseModule.d.ts +0 -3
  10. package/dist/modules/BaseModule.js +0 -15
  11. package/dist/modules/Cart/index.d.ts +0 -1
  12. package/dist/modules/Cart/index.js +1 -2
  13. package/dist/modules/Discount/index.d.ts +0 -1
  14. package/dist/modules/Discount/index.js +1 -1
  15. package/dist/modules/Guests/index.js +9 -9
  16. package/dist/modules/Order/index.d.ts +1 -25
  17. package/dist/modules/Order/index.js +3 -224
  18. package/dist/modules/Order/types.d.ts +0 -45
  19. package/dist/modules/Order/types.js +0 -8
  20. package/dist/modules/Order/utils.js +1 -1
  21. package/dist/modules/Payment/index.d.ts +9 -184
  22. package/dist/modules/Payment/index.js +109 -2084
  23. package/dist/modules/Payment/types.d.ts +30 -772
  24. package/dist/modules/Payment/types.js +12 -236
  25. package/dist/modules/ProductList/index.d.ts +1 -12
  26. package/dist/modules/ProductList/index.js +15 -37
  27. package/dist/modules/Resource/index.js +1 -1
  28. package/dist/modules/Rules/index.d.ts +1 -2
  29. package/dist/modules/Rules/index.js +26 -66
  30. package/dist/modules/Rules/types.d.ts +0 -1
  31. package/dist/modules/Schedule/index.d.ts +0 -9
  32. package/dist/modules/Schedule/index.js +0 -77
  33. package/dist/modules/index.d.ts +0 -1
  34. package/dist/modules/index.js +0 -1
  35. package/dist/plugins/window.d.ts +0 -1
  36. package/dist/solution/BookingByStep/index.js +13 -43
  37. package/dist/solution/BookingByStep/utils/capacity.js +1 -1
  38. package/dist/solution/BookingByStep/utils/products.d.ts +0 -6
  39. package/dist/solution/BookingByStep/utils/products.js +0 -10
  40. package/dist/solution/BuyTickets/index.js +8 -7
  41. package/dist/solution/ShopDiscount/index.d.ts +10 -10
  42. package/dist/solution/ShopDiscount/index.js +57 -107
  43. package/dist/solution/ShopDiscount/types.d.ts +0 -8
  44. package/dist/solution/ShopDiscount/utils.js +1 -0
  45. package/dist/solution/index.d.ts +0 -2
  46. package/dist/solution/index.js +1 -3
  47. package/dist/types/index.d.ts +1 -4
  48. package/lib/core/index.js +1 -1
  49. package/lib/effects/index.d.ts +3 -5
  50. package/lib/effects/index.js +1 -17
  51. package/lib/modules/Account/index.js +3 -2
  52. package/lib/modules/AccountList/index.d.ts +1 -7
  53. package/lib/modules/AccountList/index.js +0 -27
  54. package/lib/modules/AccountList/types.d.ts +0 -28
  55. package/lib/modules/BaseModule.d.ts +0 -3
  56. package/lib/modules/BaseModule.js +0 -9
  57. package/lib/modules/Cart/index.d.ts +0 -1
  58. package/lib/modules/Cart/index.js +2 -5
  59. package/lib/modules/Discount/index.d.ts +0 -1
  60. package/lib/modules/Discount/index.js +1 -1
  61. package/lib/modules/Guests/index.js +9 -9
  62. package/lib/modules/Order/index.d.ts +1 -25
  63. package/lib/modules/Order/index.js +1 -186
  64. package/lib/modules/Order/types.d.ts +0 -45
  65. package/lib/modules/Order/utils.js +1 -1
  66. package/lib/modules/Payment/index.d.ts +9 -184
  67. package/lib/modules/Payment/index.js +51 -1084
  68. package/lib/modules/Payment/types.d.ts +30 -772
  69. package/lib/modules/Payment/types.js +6 -79
  70. package/lib/modules/ProductList/index.d.ts +1 -12
  71. package/lib/modules/ProductList/index.js +12 -31
  72. package/lib/modules/Resource/index.js +1 -1
  73. package/lib/modules/Rules/index.d.ts +1 -2
  74. package/lib/modules/Rules/index.js +24 -41
  75. package/lib/modules/Rules/types.d.ts +0 -1
  76. package/lib/modules/Schedule/index.d.ts +0 -9
  77. package/lib/modules/Schedule/index.js +0 -60
  78. package/lib/modules/index.d.ts +0 -1
  79. package/lib/modules/index.js +0 -2
  80. package/lib/plugins/window.d.ts +0 -1
  81. package/lib/solution/BookingByStep/index.js +6 -18
  82. package/lib/solution/BookingByStep/utils/capacity.js +1 -1
  83. package/lib/solution/BookingByStep/utils/products.d.ts +0 -6
  84. package/lib/solution/BookingByStep/utils/products.js +2 -8
  85. package/lib/solution/BuyTickets/index.js +8 -7
  86. package/lib/solution/ShopDiscount/index.d.ts +10 -10
  87. package/lib/solution/ShopDiscount/index.js +21 -47
  88. package/lib/solution/ShopDiscount/types.d.ts +0 -8
  89. package/lib/solution/index.d.ts +0 -2
  90. package/lib/solution/index.js +1 -5
  91. package/lib/types/index.d.ts +1 -4
  92. package/package.json +1 -3
  93. package/dist/modules/Customer/constants.d.ts +0 -7
  94. package/dist/modules/Customer/constants.js +0 -12
  95. package/dist/modules/Customer/index.d.ts +0 -122
  96. package/dist/modules/Customer/index.js +0 -696
  97. package/dist/modules/Customer/types.d.ts +0 -146
  98. package/dist/modules/Customer/types.js +0 -41
  99. package/dist/modules/Payment/cash.d.ts +0 -19
  100. package/dist/modules/Payment/cash.js +0 -97
  101. package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
  102. package/dist/modules/Payment/cashRecommendationAlgorithm.js +0 -423
  103. package/dist/modules/Payment/eftpos.d.ts +0 -11
  104. package/dist/modules/Payment/eftpos.js +0 -80
  105. package/dist/modules/Payment/mx51.d.ts +0 -0
  106. package/dist/modules/Payment/mx51.js +0 -0
  107. package/dist/modules/Payment/utils.d.ts +0 -17
  108. package/dist/modules/Payment/utils.js +0 -62
  109. package/dist/modules/Payment/walletpass.d.ts +0 -99
  110. package/dist/modules/Payment/walletpass.js +0 -711
  111. package/dist/plugins/app-types/app/app.d.ts +0 -83
  112. package/dist/plugins/app-types/app/const.d.ts +0 -4
  113. package/dist/plugins/app-types/app/index.d.ts +0 -14
  114. package/dist/plugins/app-types/applicationManager/application.d.ts +0 -50
  115. package/dist/plugins/app-types/applicationManager/index.d.ts +0 -13
  116. package/dist/plugins/app-types/config.d.ts +0 -3
  117. package/dist/plugins/app-types/cookie/index.d.ts +0 -13
  118. package/dist/plugins/app-types/data/index.d.ts +0 -8
  119. package/dist/plugins/app-types/history/config.d.ts +0 -24
  120. package/dist/plugins/app-types/history/index.d.ts +0 -20
  121. package/dist/plugins/app-types/history/type.d.ts +0 -2
  122. package/dist/plugins/app-types/hooks/index.d.ts +0 -12
  123. package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
  124. package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
  125. package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
  126. package/dist/plugins/app-types/hooks/useStore/index.d.ts +0 -6
  127. package/dist/plugins/app-types/index.d.ts +0 -6
  128. package/dist/plugins/app-types/indexDB/index.d.ts +0 -178
  129. package/dist/plugins/app-types/locales/en.d.ts +0 -3
  130. package/dist/plugins/app-types/locales/index.d.ts +0 -37
  131. package/dist/plugins/app-types/locales/original.d.ts +0 -3
  132. package/dist/plugins/app-types/locales/type.d.ts +0 -19
  133. package/dist/plugins/app-types/locales/zh-CN.d.ts +0 -3
  134. package/dist/plugins/app-types/locales/zh-HK.d.ts +0 -3
  135. package/dist/plugins/app-types/logger/feishu.d.ts +0 -11
  136. package/dist/plugins/app-types/logger/index.d.ts +0 -122
  137. package/dist/plugins/app-types/menuManager/hooks.d.ts +0 -17
  138. package/dist/plugins/app-types/menuManager/index.d.ts +0 -28
  139. package/dist/plugins/app-types/models/global.d.ts +0 -32
  140. package/dist/plugins/app-types/models/index.d.ts +0 -45
  141. package/dist/plugins/app-types/models/type.d.ts +0 -2
  142. package/dist/plugins/app-types/package.json +0 -15
  143. package/dist/plugins/app-types/plugin/index.d.ts +0 -0
  144. package/dist/plugins/app-types/pubsub/example.d.ts +0 -5
  145. package/dist/plugins/app-types/pubsub/index.d.ts +0 -63
  146. package/dist/plugins/app-types/request/cache.d.ts +0 -46
  147. package/dist/plugins/app-types/request/cancelToken.d.ts +0 -38
  148. package/dist/plugins/app-types/request/config.d.ts +0 -3
  149. package/dist/plugins/app-types/request/constants.d.ts +0 -2
  150. package/dist/plugins/app-types/request/index.d.ts +0 -24
  151. package/dist/plugins/app-types/request/pisell2Request.d.ts +0 -6
  152. package/dist/plugins/app-types/request/type.d.ts +0 -41
  153. package/dist/plugins/app-types/request/utils.d.ts +0 -46
  154. package/dist/plugins/app-types/routes/config.d.ts +0 -7
  155. package/dist/plugins/app-types/routes/index.d.ts +0 -28
  156. package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
  157. package/dist/plugins/app-types/socket/components/index.d.ts +0 -2
  158. package/dist/plugins/app-types/socket/constants.d.ts +0 -33
  159. package/dist/plugins/app-types/socket/events.d.ts +0 -31
  160. package/dist/plugins/app-types/socket/heartbeat.d.ts +0 -66
  161. package/dist/plugins/app-types/socket/index.d.ts +0 -61
  162. package/dist/plugins/app-types/socket/monitor.d.ts +0 -169
  163. package/dist/plugins/app-types/socket/reconnect.d.ts +0 -61
  164. package/dist/plugins/app-types/socket/socket.d.ts +0 -129
  165. package/dist/plugins/app-types/socket/types.d.ts +0 -85
  166. package/dist/plugins/app-types/storage/index.d.ts +0 -17
  167. package/dist/plugins/app-types/tasks/index.d.ts +0 -77
  168. package/dist/plugins/app-types/tasks/type.d.ts +0 -62
  169. package/dist/plugins/app-types/tasks/useTasks.d.ts +0 -5
  170. package/dist/plugins/app-types/type.d.ts +0 -2
  171. package/dist/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
  172. package/dist/plugins/app-types/variables/config.d.ts +0 -3
  173. package/dist/plugins/app-types/variables/index.d.ts +0 -6
  174. package/dist/plugins/app-types/variables/type.d.ts +0 -2
  175. package/dist/plugins/app-types/website/index.d.ts +0 -6
  176. package/dist/plugins/app.d.ts +0 -8
  177. package/dist/plugins/app.js +0 -1
  178. package/dist/solution/BookingTicket/index.d.ts +0 -184
  179. package/dist/solution/BookingTicket/index.js +0 -698
  180. package/dist/solution/BookingTicket/types.d.ts +0 -68
  181. package/dist/solution/BookingTicket/types.js +0 -43
  182. package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  183. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +0 -159
  184. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
  185. package/dist/solution/BookingTicket/utils/scan/handleScan.js +0 -189
  186. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -85
  187. package/dist/solution/BookingTicket/utils/scan/index.js +0 -294
  188. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  189. package/dist/solution/BookingTicket/utils/scan/scanCache.js +0 -305
  190. package/dist/solution/Checkout/appointmentDemo.json +0 -1
  191. package/dist/solution/Checkout/index.d.ts +0 -432
  192. package/dist/solution/Checkout/index.js +0 -4452
  193. package/dist/solution/Checkout/types.d.ts +0 -727
  194. package/dist/solution/Checkout/types.js +0 -104
  195. package/dist/solution/Checkout/utils/index.d.ts +0 -121
  196. package/dist/solution/Checkout/utils/index.js +0 -511
  197. package/dist/utils/task.d.ts +0 -40
  198. package/dist/utils/task.js +0 -171
  199. package/dist/utils/watch.d.ts +0 -102
  200. package/dist/utils/watch.js +0 -294
  201. package/lib/modules/Customer/constants.d.ts +0 -7
  202. package/lib/modules/Customer/constants.js +0 -39
  203. package/lib/modules/Customer/index.d.ts +0 -122
  204. package/lib/modules/Customer/index.js +0 -439
  205. package/lib/modules/Customer/types.d.ts +0 -146
  206. package/lib/modules/Customer/types.js +0 -37
  207. package/lib/modules/Payment/cash.d.ts +0 -19
  208. package/lib/modules/Payment/cash.js +0 -64
  209. package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -22
  210. package/lib/modules/Payment/cashRecommendationAlgorithm.js +0 -342
  211. package/lib/modules/Payment/eftpos.d.ts +0 -11
  212. package/lib/modules/Payment/eftpos.js +0 -51
  213. package/lib/modules/Payment/mx51.d.ts +0 -0
  214. package/lib/modules/Payment/mx51.js +0 -0
  215. package/lib/modules/Payment/utils.d.ts +0 -17
  216. package/lib/modules/Payment/utils.js +0 -67
  217. package/lib/modules/Payment/walletpass.d.ts +0 -99
  218. package/lib/modules/Payment/walletpass.js +0 -484
  219. package/lib/plugins/app-types/app/app.d.ts +0 -83
  220. package/lib/plugins/app-types/app/const.d.ts +0 -4
  221. package/lib/plugins/app-types/app/index.d.ts +0 -14
  222. package/lib/plugins/app-types/applicationManager/application.d.ts +0 -50
  223. package/lib/plugins/app-types/applicationManager/index.d.ts +0 -13
  224. package/lib/plugins/app-types/config.d.ts +0 -3
  225. package/lib/plugins/app-types/cookie/index.d.ts +0 -13
  226. package/lib/plugins/app-types/data/index.d.ts +0 -8
  227. package/lib/plugins/app-types/history/config.d.ts +0 -24
  228. package/lib/plugins/app-types/history/index.d.ts +0 -20
  229. package/lib/plugins/app-types/history/type.d.ts +0 -2
  230. package/lib/plugins/app-types/hooks/index.d.ts +0 -12
  231. package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +0 -2
  232. package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +0 -2
  233. package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +0 -13
  234. package/lib/plugins/app-types/hooks/useStore/index.d.ts +0 -6
  235. package/lib/plugins/app-types/index.d.ts +0 -6
  236. package/lib/plugins/app-types/indexDB/index.d.ts +0 -178
  237. package/lib/plugins/app-types/locales/en.d.ts +0 -3
  238. package/lib/plugins/app-types/locales/index.d.ts +0 -37
  239. package/lib/plugins/app-types/locales/original.d.ts +0 -3
  240. package/lib/plugins/app-types/locales/type.d.ts +0 -19
  241. package/lib/plugins/app-types/locales/zh-CN.d.ts +0 -3
  242. package/lib/plugins/app-types/locales/zh-HK.d.ts +0 -3
  243. package/lib/plugins/app-types/logger/feishu.d.ts +0 -11
  244. package/lib/plugins/app-types/logger/index.d.ts +0 -122
  245. package/lib/plugins/app-types/menuManager/hooks.d.ts +0 -17
  246. package/lib/plugins/app-types/menuManager/index.d.ts +0 -28
  247. package/lib/plugins/app-types/models/global.d.ts +0 -32
  248. package/lib/plugins/app-types/models/index.d.ts +0 -45
  249. package/lib/plugins/app-types/models/type.d.ts +0 -2
  250. package/lib/plugins/app-types/package.json +0 -15
  251. package/lib/plugins/app-types/plugin/index.d.ts +0 -0
  252. package/lib/plugins/app-types/pubsub/example.d.ts +0 -5
  253. package/lib/plugins/app-types/pubsub/index.d.ts +0 -63
  254. package/lib/plugins/app-types/request/cache.d.ts +0 -46
  255. package/lib/plugins/app-types/request/cancelToken.d.ts +0 -38
  256. package/lib/plugins/app-types/request/config.d.ts +0 -3
  257. package/lib/plugins/app-types/request/constants.d.ts +0 -2
  258. package/lib/plugins/app-types/request/index.d.ts +0 -24
  259. package/lib/plugins/app-types/request/pisell2Request.d.ts +0 -6
  260. package/lib/plugins/app-types/request/type.d.ts +0 -41
  261. package/lib/plugins/app-types/request/utils.d.ts +0 -46
  262. package/lib/plugins/app-types/routes/config.d.ts +0 -7
  263. package/lib/plugins/app-types/routes/index.d.ts +0 -28
  264. package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +0 -6
  265. package/lib/plugins/app-types/socket/components/index.d.ts +0 -2
  266. package/lib/plugins/app-types/socket/constants.d.ts +0 -33
  267. package/lib/plugins/app-types/socket/events.d.ts +0 -31
  268. package/lib/plugins/app-types/socket/heartbeat.d.ts +0 -66
  269. package/lib/plugins/app-types/socket/index.d.ts +0 -61
  270. package/lib/plugins/app-types/socket/monitor.d.ts +0 -169
  271. package/lib/plugins/app-types/socket/reconnect.d.ts +0 -61
  272. package/lib/plugins/app-types/socket/socket.d.ts +0 -129
  273. package/lib/plugins/app-types/socket/types.d.ts +0 -85
  274. package/lib/plugins/app-types/storage/index.d.ts +0 -17
  275. package/lib/plugins/app-types/tasks/index.d.ts +0 -77
  276. package/lib/plugins/app-types/tasks/type.d.ts +0 -62
  277. package/lib/plugins/app-types/tasks/useTasks.d.ts +0 -5
  278. package/lib/plugins/app-types/type.d.ts +0 -2
  279. package/lib/plugins/app-types/variables/VariablesProvider.d.ts +0 -7
  280. package/lib/plugins/app-types/variables/config.d.ts +0 -3
  281. package/lib/plugins/app-types/variables/index.d.ts +0 -6
  282. package/lib/plugins/app-types/variables/type.d.ts +0 -2
  283. package/lib/plugins/app-types/website/index.d.ts +0 -6
  284. package/lib/plugins/app.d.ts +0 -8
  285. package/lib/plugins/app.js +0 -17
  286. package/lib/solution/BookingTicket/index.d.ts +0 -184
  287. package/lib/solution/BookingTicket/index.js +0 -426
  288. package/lib/solution/BookingTicket/types.d.ts +0 -68
  289. package/lib/solution/BookingTicket/types.js +0 -72
  290. package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +0 -22
  291. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +0 -117
  292. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +0 -22
  293. package/lib/solution/BookingTicket/utils/scan/handleScan.js +0 -132
  294. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -85
  295. package/lib/solution/BookingTicket/utils/scan/index.js +0 -216
  296. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  297. package/lib/solution/BookingTicket/utils/scan/scanCache.js +0 -231
  298. package/lib/solution/Checkout/appointmentDemo.json +0 -1
  299. package/lib/solution/Checkout/index.d.ts +0 -432
  300. package/lib/solution/Checkout/index.js +0 -2776
  301. package/lib/solution/Checkout/types.d.ts +0 -727
  302. package/lib/solution/Checkout/types.js +0 -63
  303. package/lib/solution/Checkout/utils/index.d.ts +0 -121
  304. package/lib/solution/Checkout/utils/index.js +0 -362
  305. package/lib/utils/task.d.ts +0 -40
  306. package/lib/utils/task.js +0 -109
  307. package/lib/utils/watch.d.ts +0 -102
  308. package/lib/utils/watch.js +0 -217
@@ -1,37 +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/modules/Customer/types.ts
20
- var types_exports = {};
21
- __export(types_exports, {
22
- CustomerHooks: () => CustomerHooks
23
- });
24
- module.exports = __toCommonJS(types_exports);
25
- var CustomerHooks = /* @__PURE__ */ ((CustomerHooks2) => {
26
- CustomerHooks2["OnCustomerListUpdate"] = "customer:onCustomerListUpdate";
27
- CustomerHooks2["OnCustomerListError"] = "customer:onError";
28
- CustomerHooks2["OnCustomerSelected"] = "customer:onCustomerSelected";
29
- CustomerHooks2["OnPaginationChange"] = "customer:onPaginationChange";
30
- CustomerHooks2["OnScrollLoadMore"] = "customer:onScrollLoadMore";
31
- CustomerHooks2["OnScrollLoadComplete"] = "customer:onScrollLoadComplete";
32
- return CustomerHooks2;
33
- })(CustomerHooks || {});
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- CustomerHooks
37
- });
@@ -1,19 +0,0 @@
1
- import { CashPayment } from './types';
2
- import type { PaymentModule } from './index';
3
- /**
4
- * 现金支付实现
5
- */
6
- export declare class CashPaymentImpl implements CashPayment {
7
- private paymentModule;
8
- constructor(paymentModule: PaymentModule);
9
- processCashPayment(amount: number, orderUuid: string): Promise<void>;
10
- getCashBalance(): Promise<number>;
11
- /**
12
- * 获取推荐支付金额
13
- * 基于目标金额和货币类型,返回最优支付金额建议
14
- * @param money 目标支付金额
15
- * @param currency 货币代码 (如: 'CNY', 'USD', 'EUR' 等)
16
- * @returns 推荐支付金额数组
17
- */
18
- getRecommendedAmount(money: number, currency: string): number[];
19
- }
@@ -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/modules/Payment/cash.ts
20
- var cash_exports = {};
21
- __export(cash_exports, {
22
- CashPaymentImpl: () => CashPaymentImpl
23
- });
24
- module.exports = __toCommonJS(cash_exports);
25
- var import_cashRecommendationAlgorithm = require("./cashRecommendationAlgorithm");
26
- var CashPaymentImpl = class {
27
- constructor(paymentModule) {
28
- this.paymentModule = paymentModule;
29
- }
30
- async processCashPayment(amount, orderUuid) {
31
- const cashMethod = await this.paymentModule.getCashPaymentMethod();
32
- if (!cashMethod) {
33
- throw new Error("现金支付方式未找到");
34
- }
35
- const paymentItem = {
36
- amount: amount.toString(),
37
- code: cashMethod.code,
38
- id: cashMethod.id,
39
- name: cashMethod.name,
40
- type: cashMethod.type,
41
- voucher_id: ""
42
- };
43
- await this.paymentModule.addPaymentItemAsync(orderUuid, paymentItem);
44
- }
45
- async getCashBalance() {
46
- return 0;
47
- }
48
- /**
49
- * 获取推荐支付金额
50
- * 基于目标金额和货币类型,返回最优支付金额建议
51
- * @param money 目标支付金额
52
- * @param currency 货币代码 (如: 'CNY', 'USD', 'EUR' 等)
53
- * @returns 推荐支付金额数组
54
- */
55
- getRecommendedAmount(money, currency) {
56
- const upperCurrency = currency.toUpperCase();
57
- const denominations = import_cashRecommendationAlgorithm.CURRENCY_DENOMINATIONS[upperCurrency] || import_cashRecommendationAlgorithm.CURRENCY_DENOMINATIONS["DEFAULT"];
58
- return (0, import_cashRecommendationAlgorithm.recommendOptimalPayments)(money, denominations);
59
- }
60
- };
61
- // Annotate the CommonJS export names for ESM import in node:
62
- 0 && (module.exports = {
63
- CashPaymentImpl
64
- });
@@ -1,22 +0,0 @@
1
- /**
2
- * 现金支付推荐算法
3
- *
4
- * 核心原理:
5
- * 1. 每个推荐金额都应该是独立的最优组合
6
- * 2. 不推荐在已有最优解基础上添加额外面额的组合
7
- * 3. 优先推荐使用不同数量币种的组合
8
- * 4. 根据组合判断去重,避免扩展组合
9
- */
10
- /**
11
- * 常见国家货币面额配置
12
- */
13
- export declare const CURRENCY_DENOMINATIONS: Record<string, number[]>;
14
- /**
15
- * 最优支付金额推荐算法
16
- * 推荐通过不同数量面额组合刚好足够支付的最小金额
17
- *
18
- * @param targetAmount 目标金额
19
- * @param denominations 币种面值数组
20
- * @returns 推荐支付金额数组
21
- */
22
- export declare function recommendOptimalPayments(targetAmount: number, denominations: number[]): number[];
@@ -1,342 +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/modules/Payment/cashRecommendationAlgorithm.ts
20
- var cashRecommendationAlgorithm_exports = {};
21
- __export(cashRecommendationAlgorithm_exports, {
22
- CURRENCY_DENOMINATIONS: () => CURRENCY_DENOMINATIONS,
23
- recommendOptimalPayments: () => recommendOptimalPayments
24
- });
25
- module.exports = __toCommonJS(cashRecommendationAlgorithm_exports);
26
- var CURRENCY_DENOMINATIONS = {
27
- // 美元
28
- "USD": [100, 50, 20, 10, 5, 1, 0.5, 0.25, 0.1, 0.05, 0.01],
29
- // 人民币
30
- "CNY": [100, 50, 20, 10, 5, 1, 0.5, 0.1, 0.05, 0.01],
31
- "RMB": [100, 50, 20, 10, 5, 1, 0.5, 0.1, 0.05, 0.01],
32
- // 欧元
33
- "EUR": [500, 200, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01],
34
- // 日元
35
- "JPY": [1e4, 5e3, 2e3, 1e3, 500, 100, 50, 10, 5, 1],
36
- // 英镑
37
- "GBP": [50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01],
38
- // 澳元
39
- "AUD": [100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1],
40
- // 加元
41
- "CAD": [100, 50, 20, 10, 5, 2, 1, 0.25, 0.1, 0.05],
42
- // 港元
43
- "HKD": [1e3, 500, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1],
44
- // 新台币
45
- "TWD": [2e3, 1e3, 500, 200, 100, 50, 10, 5, 1],
46
- // 韩元
47
- "KRW": [5e4, 1e4, 5e3, 1e3, 500, 100, 50, 10, 5, 1],
48
- // 新加坡元
49
- "SGD": [1e4, 1e3, 100, 50, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01],
50
- // 瑞士法郎
51
- "CHF": [1e3, 200, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05],
52
- // 默认通用面额(如果币种不在列表中)
53
- "DEFAULT": [100, 50, 20, 10, 5, 1, 0.5, 0.25, 0.1, 0.05, 0.01]
54
- };
55
- function recommendOptimalPayments(targetAmount, denominations) {
56
- if (targetAmount <= 0 || !isFinite(targetAmount) || isNaN(targetAmount)) {
57
- return [];
58
- }
59
- if (!denominations || !Array.isArray(denominations) || denominations.length === 0) {
60
- return [Math.ceil(targetAmount)];
61
- }
62
- const maxReasonableDenom = targetAmount * 5;
63
- const validDenoms = denominations.filter((denom) => denom > 0 && isFinite(denom) && !isNaN(denom) && denom <= maxReasonableDenom).slice(0, 8);
64
- if (validDenoms.length === 0) {
65
- return [Math.ceil(targetAmount)];
66
- }
67
- try {
68
- const precision = 100;
69
- const target = Math.round(targetAmount * precision);
70
- const denoms = validDenoms.map((d) => Math.round(d * precision)).sort((a, b) => b - a);
71
- const paymentOptions = [];
72
- const exactCombination = findExactCombination(target, denoms, precision);
73
- if (exactCombination) {
74
- paymentOptions.push(exactCombination);
75
- }
76
- for (let i = 0; i < Math.min(denoms.length, 6); i++) {
77
- const denom = denoms[i];
78
- const count = Math.ceil(target / denom);
79
- const sum = count * denom;
80
- if (sum >= target && count <= 12) {
81
- paymentOptions.push({
82
- combination: Array(count).fill(denom / precision),
83
- sum: sum / precision,
84
- coinCount: count,
85
- denomTypes: 1
86
- });
87
- }
88
- }
89
- for (let i = 0; i < Math.min(denoms.length - 1, 5); i++) {
90
- for (let j = i + 1; j < Math.min(denoms.length, 6); j++) {
91
- const denom1 = denoms[i];
92
- const denom2 = denoms[j];
93
- const maxCount1 = Math.min(Math.ceil(target / denom1) + 1, 8);
94
- const maxCount2 = Math.min(Math.ceil(target / denom2) + 1, 10);
95
- for (let count1 = 1; count1 <= maxCount1; count1++) {
96
- for (let count2 = 1; count2 <= maxCount2; count2++) {
97
- const sum = count1 * denom1 + count2 * denom2;
98
- if (sum >= target) {
99
- const combination = [
100
- ...Array(count1).fill(denom1 / precision),
101
- ...Array(count2).fill(denom2 / precision)
102
- ];
103
- paymentOptions.push({
104
- combination,
105
- sum: sum / precision,
106
- coinCount: count1 + count2,
107
- denomTypes: 2
108
- });
109
- }
110
- }
111
- }
112
- }
113
- }
114
- for (let i = 0; i < Math.min(denoms.length - 2, 3); i++) {
115
- for (let j = i + 1; j < Math.min(denoms.length - 1, 4); j++) {
116
- for (let k = j + 1; k < Math.min(denoms.length, 5); k++) {
117
- const denom1 = denoms[i];
118
- const denom2 = denoms[j];
119
- const denom3 = denoms[k];
120
- const maxCount1 = Math.min(Math.ceil(target / denom1) + 1, 5);
121
- const maxCount2 = Math.min(Math.ceil(target / denom2) + 1, 6);
122
- const maxCount3 = Math.min(Math.ceil(target / denom3) + 1, 8);
123
- for (let count1 = 1; count1 <= maxCount1; count1++) {
124
- for (let count2 = 1; count2 <= maxCount2; count2++) {
125
- for (let count3 = 1; count3 <= maxCount3; count3++) {
126
- const sum = count1 * denom1 + count2 * denom2 + count3 * denom3;
127
- if (sum >= target) {
128
- const combination = [
129
- ...Array(count1).fill(denom1 / precision),
130
- ...Array(count2).fill(denom2 / precision),
131
- ...Array(count3).fill(denom3 / precision)
132
- ];
133
- paymentOptions.push({
134
- combination,
135
- sum: sum / precision,
136
- coinCount: count1 + count2 + count3,
137
- denomTypes: 3
138
- });
139
- }
140
- }
141
- }
142
- }
143
- }
144
- }
145
- }
146
- for (let i = 0; i < Math.min(denoms.length - 3, 2); i++) {
147
- for (let j = i + 1; j < Math.min(denoms.length - 2, 3); j++) {
148
- for (let k = j + 1; k < Math.min(denoms.length - 1, 4); k++) {
149
- for (let l = k + 1; l < Math.min(denoms.length, 5); l++) {
150
- const denom1 = denoms[i];
151
- const denom2 = denoms[j];
152
- const denom3 = denoms[k];
153
- const denom4 = denoms[l];
154
- const maxCount1 = Math.min(Math.ceil(target / denom1) + 1, 3);
155
- const maxCount2 = Math.min(Math.ceil(target / denom2) + 1, 4);
156
- const maxCount3 = Math.min(Math.ceil(target / denom3) + 1, 5);
157
- const maxCount4 = Math.min(Math.ceil(target / denom4) + 1, 6);
158
- for (let count1 = 1; count1 <= maxCount1; count1++) {
159
- for (let count2 = 1; count2 <= maxCount2; count2++) {
160
- for (let count3 = 1; count3 <= maxCount3; count3++) {
161
- for (let count4 = 1; count4 <= maxCount4; count4++) {
162
- const sum = count1 * denom1 + count2 * denom2 + count3 * denom3 + count4 * denom4;
163
- if (sum >= target) {
164
- const combination = [
165
- ...Array(count1).fill(denom1 / precision),
166
- ...Array(count2).fill(denom2 / precision),
167
- ...Array(count3).fill(denom3 / precision),
168
- ...Array(count4).fill(denom4 / precision)
169
- ];
170
- paymentOptions.push({
171
- combination,
172
- sum: sum / precision,
173
- coinCount: count1 + count2 + count3 + count4,
174
- denomTypes: 4
175
- });
176
- }
177
- }
178
- }
179
- }
180
- }
181
- }
182
- }
183
- }
184
- }
185
- if (paymentOptions.length === 0) {
186
- const minValidDenom = validDenoms.find((denom) => denom >= targetAmount);
187
- if (minValidDenom) {
188
- return [minValidDenom];
189
- } else {
190
- const maxDenom = Math.max(...validDenoms);
191
- const count = Math.ceil(targetAmount / maxDenom);
192
- return [count * maxDenom];
193
- }
194
- }
195
- const uniqueCombinations = removeDuplicateAndExtendedCombinations(paymentOptions, targetAmount);
196
- uniqueCombinations.sort((a, b) => {
197
- if (a.denomTypes !== b.denomTypes) {
198
- return a.denomTypes - b.denomTypes;
199
- }
200
- if (a.coinCount !== b.coinCount) {
201
- return a.coinCount - b.coinCount;
202
- }
203
- return a.sum - b.sum;
204
- });
205
- const uniqueAmounts = /* @__PURE__ */ new Set();
206
- const finalResults = [];
207
- for (const item of uniqueCombinations) {
208
- const roundedAmount = Math.round(item.sum * 100) / 100;
209
- if (!uniqueAmounts.has(roundedAmount) && finalResults.length < 10) {
210
- uniqueAmounts.add(roundedAmount);
211
- finalResults.push(roundedAmount);
212
- }
213
- }
214
- return finalResults.sort((a, b) => a - b);
215
- } catch (error) {
216
- console.warn("推荐支付金额计算出错:", error);
217
- const safeAmount = Math.ceil(targetAmount);
218
- return [targetAmount, safeAmount];
219
- }
220
- }
221
- function findExactCombination(target, denoms, precision) {
222
- function dfs(remaining, denomIndex, currentCombination) {
223
- if (remaining === 0) {
224
- return currentCombination;
225
- }
226
- if (remaining < 0 || denomIndex >= denoms.length || currentCombination.length > 10) {
227
- return null;
228
- }
229
- const denom = denoms[denomIndex];
230
- const maxCount = Math.min(Math.floor(remaining / denom), 8);
231
- for (let count = maxCount; count >= 0; count--) {
232
- const newCombination = [...currentCombination, ...Array(count).fill(denom)];
233
- const result = dfs(remaining - count * denom, denomIndex + 1, newCombination);
234
- if (result) {
235
- return result;
236
- }
237
- }
238
- return null;
239
- }
240
- const exactMatch = dfs(target, 0, []);
241
- if (exactMatch && exactMatch.length > 0) {
242
- const denomTypes = new Set(exactMatch).size;
243
- return {
244
- combination: exactMatch.map((d) => d / precision),
245
- sum: target / precision,
246
- coinCount: exactMatch.length,
247
- denomTypes
248
- };
249
- }
250
- return null;
251
- }
252
- function removeDuplicateAndExtendedCombinations(combinations, targetAmount) {
253
- const result = [];
254
- combinations.sort((a, b) => {
255
- if (a.denomTypes !== b.denomTypes) {
256
- return a.denomTypes - b.denomTypes;
257
- }
258
- if (a.coinCount !== b.coinCount) {
259
- return a.coinCount - b.coinCount;
260
- }
261
- return a.sum - b.sum;
262
- });
263
- for (let i = 0; i < combinations.length; i++) {
264
- const current = combinations[i];
265
- let shouldSkip = false;
266
- for (let j = 0; j < result.length; j++) {
267
- const existing = result[j];
268
- if (isSameCombination(current.combination, existing.combination)) {
269
- shouldSkip = true;
270
- break;
271
- }
272
- if (isExtensionOf(current.combination, existing.combination)) {
273
- shouldSkip = true;
274
- break;
275
- }
276
- }
277
- if (!shouldSkip) {
278
- for (let j = result.length - 1; j >= 0; j--) {
279
- if (isExtensionOf(result[j].combination, current.combination)) {
280
- result.splice(j, 1);
281
- }
282
- }
283
- result.push(current);
284
- }
285
- }
286
- return result;
287
- }
288
- function isExtensionOf(combinationA, combinationB) {
289
- if (combinationA.length <= combinationB.length) {
290
- return false;
291
- }
292
- const countA = {};
293
- const countB = {};
294
- combinationA.forEach((coin) => {
295
- countA[coin] = (countA[coin] || 0) + 1;
296
- });
297
- combinationB.forEach((coin) => {
298
- countB[coin] = (countB[coin] || 0) + 1;
299
- });
300
- for (const coin in countB) {
301
- if (!countA[coin] || countA[coin] < countB[coin]) {
302
- return false;
303
- }
304
- }
305
- let hasExtra = false;
306
- for (const coin in countA) {
307
- if (countA[coin] > (countB[coin] || 0)) {
308
- hasExtra = true;
309
- break;
310
- }
311
- }
312
- return hasExtra;
313
- }
314
- function isSameCombination(combinationA, combinationB) {
315
- if (combinationA.length !== combinationB.length) {
316
- return false;
317
- }
318
- const countA = {};
319
- const countB = {};
320
- combinationA.forEach((coin) => {
321
- countA[coin] = (countA[coin] || 0) + 1;
322
- });
323
- combinationB.forEach((coin) => {
324
- countB[coin] = (countB[coin] || 0) + 1;
325
- });
326
- for (const coin in countA) {
327
- if (countA[coin] !== (countB[coin] || 0)) {
328
- return false;
329
- }
330
- }
331
- for (const coin in countB) {
332
- if (countB[coin] !== (countA[coin] || 0)) {
333
- return false;
334
- }
335
- }
336
- return true;
337
- }
338
- // Annotate the CommonJS export names for ESM import in node:
339
- 0 && (module.exports = {
340
- CURRENCY_DENOMINATIONS,
341
- recommendOptimalPayments
342
- });
@@ -1,11 +0,0 @@
1
- import { EftposPayment } from './types';
2
- import type { PaymentModule } from './index';
3
- /**
4
- * Eftpos支付实现
5
- */
6
- export declare class EftposPaymentImpl implements EftposPayment {
7
- private paymentModule;
8
- constructor(paymentModule: PaymentModule);
9
- processEftposPayment(amount: number, orderUuid: string): Promise<void>;
10
- checkDeviceStatus(): Promise<boolean>;
11
- }
@@ -1,51 +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/modules/Payment/eftpos.ts
20
- var eftpos_exports = {};
21
- __export(eftpos_exports, {
22
- EftposPaymentImpl: () => EftposPaymentImpl
23
- });
24
- module.exports = __toCommonJS(eftpos_exports);
25
- var EftposPaymentImpl = class {
26
- constructor(paymentModule) {
27
- this.paymentModule = paymentModule;
28
- }
29
- async processEftposPayment(amount, orderUuid) {
30
- const eftposMethod = await this.paymentModule.getEftposPaymentMethod();
31
- if (!eftposMethod) {
32
- throw new Error("Eftpos支付方式未找到");
33
- }
34
- const paymentItem = {
35
- amount: amount.toString(),
36
- code: eftposMethod.code,
37
- id: eftposMethod.id,
38
- name: eftposMethod.name,
39
- type: eftposMethod.type,
40
- voucher_id: ""
41
- };
42
- await this.paymentModule.addPaymentItemAsync(orderUuid, paymentItem);
43
- }
44
- async checkDeviceStatus() {
45
- return true;
46
- }
47
- };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- EftposPaymentImpl
51
- });
File without changes
File without changes
@@ -1,17 +0,0 @@
1
- export declare const getAvailableMaxAmount: (data: Record<string, any>) => any;
2
- /**
3
- * 将walletPass列表数据转换为prepare_payments需要的数据格式
4
- * @param list
5
- */
6
- export declare const formatWalletPassList2PreparePayments: (list?: any[]) => {
7
- voucher_id: any;
8
- amount: number;
9
- tag: any;
10
- }[];
11
- /**
12
- * 对用户识别码列表进行排序
13
- * 排序规则:正常数据 -> unified_available_status===1 -> 500601/500602 -> unified_available_status===0
14
- * @param list 用户识别码列表
15
- * @returns 排序后的列表
16
- */
17
- export declare const sortUserIdentificationCodeList: (list: any[]) => any[];
@@ -1,67 +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/modules/Payment/utils.ts
20
- var utils_exports = {};
21
- __export(utils_exports, {
22
- formatWalletPassList2PreparePayments: () => formatWalletPassList2PreparePayments,
23
- getAvailableMaxAmount: () => getAvailableMaxAmount,
24
- sortUserIdentificationCodeList: () => sortUserIdentificationCodeList
25
- });
26
- module.exports = __toCommonJS(utils_exports);
27
- var getAvailableMaxAmount = (data) => {
28
- return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
29
- };
30
- var formatWalletPassList2PreparePayments = (list) => {
31
- return (list || []).map((item) => {
32
- return {
33
- voucher_id: item.id || 0,
34
- amount: Number(item.edit_current_amount || getAvailableMaxAmount(item)) || 0,
35
- tag: item.tag || ""
36
- };
37
- });
38
- };
39
- var sortUserIdentificationCodeList = (list) => {
40
- if (!Array.isArray(list) || list.length === 0) {
41
- return list;
42
- }
43
- const middlePriorityErrorCodes = ["500601", "500602"];
44
- return list.sort((a, b) => {
45
- const getPriority = (item) => {
46
- var _a;
47
- const errorCode = (_a = item.unified_error_code) == null ? void 0 : _a.toString();
48
- const availableStatus = item.unified_available_status;
49
- if (errorCode && middlePriorityErrorCodes.includes(errorCode))
50
- return 2;
51
- if (availableStatus === 0)
52
- return 3;
53
- if (availableStatus === 1)
54
- return 1;
55
- return 0;
56
- };
57
- const aPriority = getPriority(a);
58
- const bPriority = getPriority(b);
59
- return aPriority - bPriority;
60
- });
61
- };
62
- // Annotate the CommonJS export names for ESM import in node:
63
- 0 && (module.exports = {
64
- formatWalletPassList2PreparePayments,
65
- getAvailableMaxAmount,
66
- sortUserIdentificationCodeList
67
- });