@unchainedshop/plugins 3.1.15 → 4.0.0-rc.10

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 (331) hide show
  1. package/lib/delivery/pick-mup.js +0 -2
  2. package/lib/delivery/pick-mup.js.map +1 -1
  3. package/lib/files/gridfs/adapter.d.ts.map +1 -1
  4. package/lib/files/gridfs/adapter.js +1 -1
  5. package/lib/files/gridfs/adapter.js.map +1 -1
  6. package/lib/files/gridfs/handler-express.d.ts.map +1 -1
  7. package/lib/files/gridfs/handler-express.js +6 -1
  8. package/lib/files/gridfs/handler-express.js.map +1 -1
  9. package/lib/files/gridfs/handler-fastify.d.ts.map +1 -1
  10. package/lib/files/gridfs/handler-fastify.js +5 -1
  11. package/lib/files/gridfs/handler-fastify.js.map +1 -1
  12. package/lib/files/gridfs/module.d.ts +2 -2
  13. package/lib/files/gridfs/module.d.ts.map +1 -1
  14. package/lib/filters/local-search.d.ts.map +1 -1
  15. package/lib/filters/local-search.js +9 -2
  16. package/lib/filters/local-search.js.map +1 -1
  17. package/lib/filters/strict-equal.js +18 -0
  18. package/lib/filters/strict-equal.js.map +1 -1
  19. package/lib/payment/apple-iap/adapter.js +6 -13
  20. package/lib/payment/apple-iap/adapter.js.map +1 -1
  21. package/lib/payment/apple-iap/fix-periods.d.ts.map +1 -1
  22. package/lib/payment/apple-iap/fix-periods.js +3 -5
  23. package/lib/payment/apple-iap/fix-periods.js.map +1 -1
  24. package/lib/payment/apple-iap/handler-express.js +4 -4
  25. package/lib/payment/apple-iap/handler-express.js.map +1 -1
  26. package/lib/payment/apple-iap/handler-fastify.js +4 -4
  27. package/lib/payment/apple-iap/handler-fastify.js.map +1 -1
  28. package/lib/payment/apple-iap/module.d.ts +2 -2
  29. package/lib/payment/apple-iap/module.d.ts.map +1 -1
  30. package/lib/payment/braintree.js +3 -4
  31. package/lib/payment/braintree.js.map +1 -1
  32. package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -2
  33. package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts.map +1 -1
  34. package/lib/payment/cryptopay/db/CryptopayTransactions.js.map +1 -1
  35. package/lib/payment/cryptopay/handle-webhook.js +1 -1
  36. package/lib/payment/cryptopay/handle-webhook.js.map +1 -1
  37. package/lib/payment/cryptopay/handler-express.d.ts.map +1 -1
  38. package/lib/payment/cryptopay/handler-express.js +4 -57
  39. package/lib/payment/cryptopay/handler-express.js.map +1 -1
  40. package/lib/payment/cryptopay/handler-fastify.d.ts.map +1 -1
  41. package/lib/payment/cryptopay/handler-fastify.js +4 -56
  42. package/lib/payment/cryptopay/handler-fastify.js.map +1 -1
  43. package/lib/payment/cryptopay/module.d.ts +26 -26
  44. package/lib/payment/cryptopay/module.d.ts.map +1 -1
  45. package/lib/payment/cryptopay/module.js +26 -24
  46. package/lib/payment/cryptopay/module.js.map +1 -1
  47. package/lib/payment/cryptopay/plugin.d.ts.map +1 -1
  48. package/lib/payment/cryptopay/plugin.js +33 -79
  49. package/lib/payment/cryptopay/plugin.js.map +1 -1
  50. package/lib/payment/datatrans-v2/api/types.d.ts +41 -41
  51. package/lib/payment/datatrans-v2/api/types.d.ts.map +1 -1
  52. package/lib/payment/datatrans-v2/getPaths.d.ts +2 -2
  53. package/lib/payment/datatrans-v2/getPaths.d.ts.map +1 -1
  54. package/lib/payment/datatrans-v2/index.js +16 -14
  55. package/lib/payment/datatrans-v2/index.js.map +1 -1
  56. package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +1 -1
  57. package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts.map +1 -1
  58. package/lib/payment/datatrans-v2/roundedAmountFromOrder.js +3 -3
  59. package/lib/payment/datatrans-v2/roundedAmountFromOrder.js.map +1 -1
  60. package/lib/payment/paypal-checkout.js +6 -8
  61. package/lib/payment/paypal-checkout.js.map +1 -1
  62. package/lib/payment/payrexx/api/index.d.ts +2 -2
  63. package/lib/payment/payrexx/api/index.d.ts.map +1 -1
  64. package/lib/payment/payrexx/api/makeFetcher.d.ts.map +1 -1
  65. package/lib/payment/payrexx/api/makeFetcher.js.map +1 -1
  66. package/lib/payment/payrexx/index.js +4 -4
  67. package/lib/payment/payrexx/index.js.map +1 -1
  68. package/lib/payment/payrexx/payrexx.js +2 -2
  69. package/lib/payment/payrexx/payrexx.js.map +1 -1
  70. package/lib/payment/postfinance-checkout/api-client.d.ts +16 -0
  71. package/lib/payment/postfinance-checkout/api-client.d.ts.map +1 -0
  72. package/lib/payment/postfinance-checkout/api-client.js +75 -0
  73. package/lib/payment/postfinance-checkout/api-client.js.map +1 -0
  74. package/lib/payment/postfinance-checkout/api-types.d.ts +98 -0
  75. package/lib/payment/postfinance-checkout/api-types.d.ts.map +1 -0
  76. package/lib/payment/postfinance-checkout/api-types.js +51 -0
  77. package/lib/payment/postfinance-checkout/api-types.js.map +1 -0
  78. package/lib/payment/postfinance-checkout/api.d.ts +5 -5
  79. package/lib/payment/postfinance-checkout/api.d.ts.map +1 -1
  80. package/lib/payment/postfinance-checkout/api.js +38 -62
  81. package/lib/payment/postfinance-checkout/api.js.map +1 -1
  82. package/lib/payment/postfinance-checkout/handler-express.d.ts.map +1 -1
  83. package/lib/payment/postfinance-checkout/handler-express.js +5 -5
  84. package/lib/payment/postfinance-checkout/handler-express.js.map +1 -1
  85. package/lib/payment/postfinance-checkout/handler-fastify.d.ts.map +1 -1
  86. package/lib/payment/postfinance-checkout/handler-fastify.js +6 -6
  87. package/lib/payment/postfinance-checkout/handler-fastify.js.map +1 -1
  88. package/lib/payment/postfinance-checkout/index.d.ts +2 -1
  89. package/lib/payment/postfinance-checkout/index.d.ts.map +1 -1
  90. package/lib/payment/postfinance-checkout/index.js +27 -30
  91. package/lib/payment/postfinance-checkout/index.js.map +1 -1
  92. package/lib/payment/postfinance-checkout/types.d.ts +4 -4
  93. package/lib/payment/postfinance-checkout/types.d.ts.map +1 -1
  94. package/lib/payment/postfinance-checkout/utils.d.ts +3 -3
  95. package/lib/payment/postfinance-checkout/utils.d.ts.map +1 -1
  96. package/lib/payment/postfinance-checkout/utils.js +5 -6
  97. package/lib/payment/postfinance-checkout/utils.js.map +1 -1
  98. package/lib/payment/saferpay/adapter.d.ts.map +1 -1
  99. package/lib/payment/saferpay/adapter.js +4 -6
  100. package/lib/payment/saferpay/adapter.js.map +1 -1
  101. package/lib/payment/saferpay/api/models/Transaction.d.ts +2 -2
  102. package/lib/payment/saferpay/api/models/Transaction.d.ts.map +1 -1
  103. package/lib/payment/saferpay/module.d.ts +2 -2
  104. package/lib/payment/saferpay/module.d.ts.map +1 -1
  105. package/lib/payment/stripe/index.js +5 -5
  106. package/lib/payment/stripe/index.js.map +1 -1
  107. package/lib/payment/stripe/stripe.js +2 -2
  108. package/lib/payment/stripe/stripe.js.map +1 -1
  109. package/lib/presets/all.d.ts +15 -13
  110. package/lib/presets/all.d.ts.map +1 -1
  111. package/lib/presets/all.js +3 -1
  112. package/lib/presets/all.js.map +1 -1
  113. package/lib/pricing/delivery-swiss-tax.d.ts.map +1 -1
  114. package/lib/pricing/delivery-swiss-tax.js +2 -2
  115. package/lib/pricing/delivery-swiss-tax.js.map +1 -1
  116. package/lib/pricing/order-delivery.js +1 -1
  117. package/lib/pricing/order-delivery.js.map +1 -1
  118. package/lib/pricing/order-discount.js +3 -3
  119. package/lib/pricing/order-discount.js.map +1 -1
  120. package/lib/pricing/order-items-discount.js +1 -1
  121. package/lib/pricing/order-items-discount.js.map +1 -1
  122. package/lib/pricing/order-items.js +1 -1
  123. package/lib/pricing/order-items.js.map +1 -1
  124. package/lib/pricing/order-payment.js +1 -1
  125. package/lib/pricing/order-payment.js.map +1 -1
  126. package/lib/pricing/order-round.d.ts +1 -1
  127. package/lib/pricing/order-round.d.ts.map +1 -1
  128. package/lib/pricing/order-round.js +8 -8
  129. package/lib/pricing/order-round.js.map +1 -1
  130. package/lib/pricing/product-catalog-price.d.ts +0 -1
  131. package/lib/pricing/product-catalog-price.d.ts.map +1 -1
  132. package/lib/pricing/product-catalog-price.js +6 -18
  133. package/lib/pricing/product-catalog-price.js.map +1 -1
  134. package/lib/pricing/product-price-rateconversion.js +2 -2
  135. package/lib/pricing/product-price-rateconversion.js.map +1 -1
  136. package/lib/pricing/product-round.d.ts +1 -1
  137. package/lib/pricing/product-round.d.ts.map +1 -1
  138. package/lib/pricing/product-round.js +2 -2
  139. package/lib/pricing/product-round.js.map +1 -1
  140. package/lib/pricing/product-swiss-tax.d.ts +1 -1
  141. package/lib/pricing/product-swiss-tax.d.ts.map +1 -1
  142. package/lib/pricing/product-swiss-tax.js +2 -2
  143. package/lib/pricing/product-swiss-tax.js.map +1 -1
  144. package/lib/warehousing/eth-minter.js +2 -2
  145. package/lib/warehousing/eth-minter.js.map +1 -1
  146. package/lib/worker/budgetsms.d.ts +10 -0
  147. package/lib/worker/budgetsms.d.ts.map +1 -0
  148. package/lib/worker/budgetsms.js +217 -0
  149. package/lib/worker/budgetsms.js.map +1 -0
  150. package/lib/worker/bulk-import.js +1 -1
  151. package/lib/worker/bulk-import.js.map +1 -1
  152. package/lib/worker/bulkgate.d.ts +2 -0
  153. package/lib/worker/bulkgate.d.ts.map +1 -0
  154. package/lib/worker/bulkgate.js +104 -0
  155. package/lib/worker/bulkgate.js.map +1 -0
  156. package/lib/worker/enrollment-order-generator.js +1 -1
  157. package/lib/worker/enrollment-order-generator.js.map +1 -1
  158. package/lib/worker/error-notifications.d.ts +4 -4
  159. package/lib/worker/error-notifications.d.ts.map +1 -1
  160. package/lib/worker/heartbeat.js +2 -8
  161. package/lib/worker/heartbeat.js.map +1 -1
  162. package/lib/worker/message.d.ts +1 -1
  163. package/lib/worker/message.d.ts.map +1 -1
  164. package/lib/worker/sms.js +16 -16
  165. package/lib/worker/sms.js.map +1 -1
  166. package/lib/worker/twilio.d.ts +2 -0
  167. package/lib/worker/twilio.d.ts.map +1 -0
  168. package/lib/worker/twilio.js +56 -0
  169. package/lib/worker/twilio.js.map +1 -0
  170. package/lib/worker/update-coinbase-rates.js +1 -1
  171. package/lib/worker/update-coinbase-rates.js.map +1 -1
  172. package/lib/worker/update-ecb-rates.js.map +1 -1
  173. package/package.json +32 -53
  174. package/src/delivery/pick-mup.ts +0 -2
  175. package/src/files/gridfs/adapter.ts +5 -1
  176. package/src/files/gridfs/handler-express.ts +9 -1
  177. package/src/files/gridfs/handler-fastify.ts +8 -1
  178. package/src/files/gridfs/module.ts +2 -2
  179. package/src/filters/local-search.ts +11 -2
  180. package/src/filters/strict-equal.ts +21 -0
  181. package/src/payment/apple-iap/adapter.ts +7 -14
  182. package/src/payment/apple-iap/fix-periods.ts +4 -7
  183. package/src/payment/apple-iap/handler-express.ts +4 -4
  184. package/src/payment/apple-iap/handler-fastify.ts +4 -4
  185. package/src/payment/apple-iap/module.ts +2 -2
  186. package/src/payment/braintree.ts +3 -4
  187. package/src/payment/cryptopay/db/CryptopayTransactions.ts +1 -2
  188. package/src/payment/cryptopay/denote-amount.test.ts +28 -0
  189. package/src/payment/cryptopay/denote-amount.ts +29 -0
  190. package/src/payment/cryptopay/derive-btc-address.test.ts +22 -0
  191. package/src/payment/cryptopay/derive-btc-address.ts +48 -0
  192. package/src/payment/cryptopay/derive-eth-address.test.ts +22 -0
  193. package/src/payment/cryptopay/derive-eth-address.ts +38 -0
  194. package/src/payment/cryptopay/handle-webhook.ts +103 -0
  195. package/src/payment/cryptopay/handler-express.ts +4 -70
  196. package/src/payment/cryptopay/handler-fastify.ts +6 -71
  197. package/src/payment/cryptopay/module.ts +44 -40
  198. package/src/payment/cryptopay/plugin.ts +50 -87
  199. package/src/payment/cryptopay/readme.md +23 -1
  200. package/src/payment/datatrans-v2/api/types.ts +41 -41
  201. package/src/payment/datatrans-v2/getPaths.ts +2 -2
  202. package/src/payment/datatrans-v2/index.ts +17 -15
  203. package/src/payment/datatrans-v2/roundedAmountFromOrder.ts +4 -4
  204. package/src/payment/paypal-checkout.ts +6 -11
  205. package/src/payment/payrexx/api/index.ts +2 -2
  206. package/src/payment/payrexx/api/makeFetcher.ts +1 -1
  207. package/src/payment/payrexx/index.ts +4 -4
  208. package/src/payment/payrexx/payrexx.ts +2 -2
  209. package/src/payment/postfinance-checkout/api-client.ts +106 -0
  210. package/src/payment/postfinance-checkout/api-types.ts +111 -0
  211. package/src/payment/postfinance-checkout/api.ts +58 -85
  212. package/src/payment/postfinance-checkout/handler-express.ts +5 -7
  213. package/src/payment/postfinance-checkout/handler-fastify.ts +6 -8
  214. package/src/payment/postfinance-checkout/index.ts +43 -35
  215. package/src/payment/postfinance-checkout/types.ts +6 -6
  216. package/src/payment/postfinance-checkout/utils.ts +7 -12
  217. package/src/payment/saferpay/adapter.ts +4 -6
  218. package/src/payment/saferpay/api/models/Transaction.ts +2 -2
  219. package/src/payment/saferpay/module.ts +2 -2
  220. package/src/payment/stripe/index.ts +5 -5
  221. package/src/payment/stripe/stripe.ts +2 -2
  222. package/src/presets/all.ts +3 -1
  223. package/src/pricing/delivery-swiss-tax.ts +6 -2
  224. package/src/pricing/order-delivery.ts +1 -1
  225. package/src/pricing/order-discount.ts +3 -3
  226. package/src/pricing/order-items-discount.ts +1 -1
  227. package/src/pricing/order-items.ts +1 -1
  228. package/src/pricing/order-payment.ts +1 -1
  229. package/src/pricing/order-round.ts +9 -9
  230. package/src/pricing/product-catalog-price.ts +6 -25
  231. package/src/pricing/product-price-rateconversion.ts +2 -2
  232. package/src/pricing/product-round.ts +3 -3
  233. package/src/pricing/product-swiss-tax.test.ts +6 -6
  234. package/src/pricing/product-swiss-tax.ts +2 -2
  235. package/src/warehousing/eth-minter.ts +2 -2
  236. package/src/worker/budgetsms.ts +268 -0
  237. package/src/worker/bulk-import.ts +1 -1
  238. package/src/worker/bulkgate.ts +138 -0
  239. package/src/worker/enrollment-order-generator.ts +3 -3
  240. package/src/worker/error-notifications.ts +4 -4
  241. package/src/worker/heartbeat.ts +4 -11
  242. package/src/worker/message.ts +1 -1
  243. package/src/worker/push-notification.ts +2 -2
  244. package/src/worker/twilio.ts +71 -0
  245. package/src/worker/update-coinbase-rates.ts +3 -6
  246. package/src/worker/update-ecb-rates.ts +3 -3
  247. package/lib/accounts/google-oauth.d.ts +0 -4
  248. package/lib/accounts/google-oauth.d.ts.map +0 -1
  249. package/lib/accounts/google-oauth.js +0 -145
  250. package/lib/accounts/google-oauth.js.map +0 -1
  251. package/lib/accounts/linkedin-oauth.d.ts +0 -4
  252. package/lib/accounts/linkedin-oauth.d.ts.map +0 -1
  253. package/lib/accounts/linkedin-oauth.js +0 -82
  254. package/lib/accounts/linkedin-oauth.js.map +0 -1
  255. package/lib/files/gridfs/gridfs-adapter.d.ts +0 -3
  256. package/lib/files/gridfs/gridfs-adapter.d.ts.map +0 -1
  257. package/lib/files/gridfs/gridfs-adapter.js +0 -97
  258. package/lib/files/gridfs/gridfs-adapter.js.map +0 -1
  259. package/lib/files/gridfs/gridfs-webhook.d.ts +0 -11
  260. package/lib/files/gridfs/gridfs-webhook.d.ts.map +0 -1
  261. package/lib/files/gridfs/gridfs-webhook.js +0 -84
  262. package/lib/files/gridfs/gridfs-webhook.js.map +0 -1
  263. package/lib/files/minio/minio-adapter.d.ts +0 -6
  264. package/lib/files/minio/minio-adapter.d.ts.map +0 -1
  265. package/lib/files/minio/minio-adapter.js +0 -181
  266. package/lib/files/minio/minio-adapter.js.map +0 -1
  267. package/lib/files/minio/minio-webhook.d.ts +0 -2
  268. package/lib/files/minio/minio-webhook.d.ts.map +0 -1
  269. package/lib/files/minio/minio-webhook.js +0 -33
  270. package/lib/files/minio/minio-webhook.js.map +0 -1
  271. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts +0 -9
  272. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts.map +0 -1
  273. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js +0 -17
  274. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js.map +0 -1
  275. package/lib/payment/cryptopay/middleware.d.ts +0 -2
  276. package/lib/payment/cryptopay/middleware.d.ts.map +0 -1
  277. package/lib/payment/cryptopay/middleware.js +0 -75
  278. package/lib/payment/cryptopay/middleware.js.map +0 -1
  279. package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts +0 -25
  280. package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts.map +0 -1
  281. package/lib/payment/cryptopay/module/configureCryptopayModule.js +0 -75
  282. package/lib/payment/cryptopay/module/configureCryptopayModule.js.map +0 -1
  283. package/lib/payment/datatrans-v2/middleware.d.ts +0 -2
  284. package/lib/payment/datatrans-v2/middleware.d.ts.map +0 -1
  285. package/lib/payment/datatrans-v2/middleware.js +0 -68
  286. package/lib/payment/datatrans-v2/middleware.js.map +0 -1
  287. package/lib/payment/payrexx/middleware.d.ts +0 -2
  288. package/lib/payment/payrexx/middleware.d.ts.map +0 -1
  289. package/lib/payment/payrexx/middleware.js +0 -86
  290. package/lib/payment/payrexx/middleware.js.map +0 -1
  291. package/lib/payment/postfinance-checkout/middleware.d.ts +0 -2
  292. package/lib/payment/postfinance-checkout/middleware.d.ts.map +0 -1
  293. package/lib/payment/postfinance-checkout/middleware.js +0 -38
  294. package/lib/payment/postfinance-checkout/middleware.js.map +0 -1
  295. package/lib/payment/saferpay/middleware.d.ts +0 -2
  296. package/lib/payment/saferpay/middleware.d.ts.map +0 -1
  297. package/lib/payment/saferpay/middleware.js +0 -57
  298. package/lib/payment/saferpay/middleware.js.map +0 -1
  299. package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.d.ts +0 -10
  300. package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.d.ts.map +0 -1
  301. package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.js +0 -24
  302. package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.js.map +0 -1
  303. package/lib/payment/stripe/middleware.d.ts +0 -6
  304. package/lib/payment/stripe/middleware.d.ts.map +0 -1
  305. package/lib/payment/stripe/middleware.js +0 -114
  306. package/lib/payment/stripe/middleware.js.map +0 -1
  307. package/lib/plugins-index.d.ts +0 -48
  308. package/lib/plugins-index.d.ts.map +0 -1
  309. package/lib/plugins-index.js +0 -107
  310. package/lib/plugins-index.js.map +0 -1
  311. package/lib/worker/BaseWorker.d.ts +0 -30
  312. package/lib/worker/BaseWorker.d.ts.map +0 -1
  313. package/lib/worker/BaseWorker.js +0 -79
  314. package/lib/worker/BaseWorker.js.map +0 -1
  315. package/lib/worker/EventListenerWorker.d.ts +0 -6
  316. package/lib/worker/EventListenerWorker.d.ts.map +0 -1
  317. package/lib/worker/EventListenerWorker.js +0 -46
  318. package/lib/worker/EventListenerWorker.js.map +0 -1
  319. package/lib/worker/FailedRescheduler.d.ts +0 -15
  320. package/lib/worker/FailedRescheduler.d.ts.map +0 -1
  321. package/lib/worker/FailedRescheduler.js +0 -45
  322. package/lib/worker/FailedRescheduler.js.map +0 -1
  323. package/lib/worker/IntervalWorker.d.ts +0 -10
  324. package/lib/worker/IntervalWorker.d.ts.map +0 -1
  325. package/lib/worker/IntervalWorker.js +0 -37
  326. package/lib/worker/IntervalWorker.js.map +0 -1
  327. package/src/worker/BaseWorker.ts +0 -116
  328. package/src/worker/EventListenerWorker.ts +0 -61
  329. package/src/worker/FailedRescheduler.ts +0 -80
  330. package/src/worker/IntervalWorker.ts +0 -54
  331. package/src/worker/sms.ts +0 -87
@@ -24,10 +24,10 @@ export const getTaxRate = (context: ProductPricingAdapterContext) => {
24
24
 
25
25
  export const isDeliveryAddressInSwitzerland = async ({
26
26
  order,
27
- country,
27
+ countryCode: forceCountryCode,
28
28
  modules,
29
29
  }: ProductPricingAdapterContext & { modules: UnchainedCore['modules'] }) => {
30
- let countryCode = country?.toUpperCase().trim();
30
+ let countryCode = forceCountryCode?.toUpperCase().trim() || order.countryCode;
31
31
 
32
32
  if (order) {
33
33
  const orderDelivery = await modules.orders.deliveries.findDelivery({
@@ -119,12 +119,12 @@ const ETHMinter: IWarehousingAdapter = {
119
119
  const url = signedUrl && (await modules.files.normalizeUrl(signedUrl, {}));
120
120
  const text = await modules.products.texts.findLocalizedText({
121
121
  productId: product._id,
122
- locale: locale?.baseName || systemLocale.baseName,
122
+ locale: locale || systemLocale,
123
123
  });
124
124
 
125
125
  const name = `${text.title} #${chainTokenId}`;
126
126
 
127
- const isDefaultLanguageActive = locale ? locale?.language === systemLocale.language : true;
127
+ const isDefaultLanguageActive = locale ? locale.language === systemLocale.language : true;
128
128
  const localization = isDefaultLanguageActive
129
129
  ? {
130
130
  uri: `${ROOT_URL}/erc-metadata/${product._id}/{locale}/${tokenId}.json`,
@@ -0,0 +1,268 @@
1
+ import { IWorkerAdapter, WorkerAdapter, WorkerDirector } from '@unchainedshop/core';
2
+
3
+ const { BUDGETSMS_USERNAME, BUDGETSMS_USERID, BUDGETSMS_HANDLE } = process.env;
4
+
5
+ // BudgetSMS Plugin - Verified against official API documentation
6
+ // Note: BudgetSMS API has a quirk where it returns error 1001 (authentication failed)
7
+ // when you have insufficient credit, instead of the correct error 1003.
8
+ const BudgetSMSWorker: IWorkerAdapter<
9
+ {
10
+ from?: string;
11
+ to?: string;
12
+ text?: string;
13
+ test?: boolean; // If true, uses test endpoint (no credit deducted)
14
+ customid?: string;
15
+ price?: boolean; // Include price info in response
16
+ mccmnc?: boolean; // Include carrier info in response
17
+ credit?: boolean; // Include remaining credit in response
18
+ [key: string]: any;
19
+ },
20
+ any
21
+ > = {
22
+ ...WorkerAdapter,
23
+
24
+ key: 'shop.unchained.worker-plugin.budgetsms',
25
+ label: 'Send Messages through BudgetSMS',
26
+ version: '1.0.0',
27
+
28
+ type: 'BUDGETSMS',
29
+
30
+ doWork: async ({
31
+ from,
32
+ to,
33
+ text,
34
+ test = false,
35
+ customid,
36
+ price = false,
37
+ mccmnc = false,
38
+ credit = false,
39
+ ...params
40
+ }) => {
41
+ try {
42
+ // Validate credentials
43
+ if (!BUDGETSMS_USERNAME || !BUDGETSMS_USERID || !BUDGETSMS_HANDLE) {
44
+ throw new Error(
45
+ 'Missing BudgetSMS credentials. Please set BUDGETSMS_USERNAME, BUDGETSMS_USERID, and BUDGETSMS_HANDLE',
46
+ );
47
+ }
48
+
49
+ // Trim credentials to remove any whitespace
50
+ const username = BUDGETSMS_USERNAME.trim();
51
+ const userid = BUDGETSMS_USERID.trim();
52
+ const handle = BUDGETSMS_HANDLE.trim();
53
+
54
+ // Validate userid is numeric only
55
+ if (!/^\d+$/.test(userid)) {
56
+ throw new Error('BUDGETSMS_USERID must be numeric only. Found: ' + userid);
57
+ }
58
+
59
+ // Choose endpoint based on test mode
60
+ const url = test ? 'https://api.budgetsms.net/testsms/' : 'https://api.budgetsms.net/sendsms/';
61
+
62
+ // Format phone number according to E.164 (no + or 00, no spaces/dashes)
63
+ const formattedTo = to.replace(/^\+|^00/, '').replace(/[\s-]/g, '');
64
+
65
+ // Build query parameters
66
+ const queryParams = new URLSearchParams({
67
+ username: username,
68
+ userid: userid,
69
+ handle: handle,
70
+ msg: text || '', // Note: parameter is 'msg' not 'text'
71
+ from: from || '',
72
+ to: formattedTo,
73
+ ...(customid && { customid }),
74
+ ...(!test && price && { price: '1' }), // Price info only for real sends
75
+ ...(!test && mccmnc && { mccmnc: '1' }), // Carrier info only for real sends
76
+ ...(!test && credit && { credit: '1' }), // Credit info only for real sends
77
+ ...params,
78
+ });
79
+
80
+ // Make GET request
81
+ const fullUrl = `${url}?${queryParams.toString()}`;
82
+
83
+ const response = await fetch(fullUrl, {
84
+ method: 'GET',
85
+ headers: {
86
+ Accept: 'text/plain',
87
+ 'User-Agent': 'Unchained/BudgetSMS-Plugin',
88
+ },
89
+ });
90
+
91
+ const responseText = await response.text().then((text) => text.trim());
92
+
93
+ // Parse response: "OK <smsid> [price] [parts] [mccmnc] [credit]" or "ERR <errorcode>"
94
+ if (responseText.startsWith('OK')) {
95
+ const parts = responseText.split(' ');
96
+ const result: any = {
97
+ sms_id: parts[1] || null,
98
+ status: test ? 'test_successful' : 'sent',
99
+ test_mode: test,
100
+ };
101
+
102
+ if (test) {
103
+ result.message = 'Test SMS validated successfully (no credit deducted)';
104
+ } else {
105
+ // Parse additional info based on parameters used
106
+ let index = 2;
107
+ if (price && parts[index] && parts[index + 1]) {
108
+ result.price = parseFloat(parts[index]);
109
+ result.parts = parseInt(parts[index + 1]);
110
+ index += 2;
111
+ }
112
+ if (mccmnc && parts[index]) {
113
+ result.mccmnc = parts[index];
114
+ index += 1;
115
+ }
116
+ if (credit && parts[index]) {
117
+ result.remaining_credit = parseFloat(parts[index]);
118
+ }
119
+ }
120
+
121
+ return {
122
+ success: true,
123
+ result,
124
+ error: null,
125
+ };
126
+ }
127
+
128
+ if (responseText.startsWith('ERR')) {
129
+ const parts = responseText.split(' ');
130
+ const errorCode = parts[1] || 'UNKNOWN';
131
+
132
+ // Error code mappings from documentation
133
+ const errorMessages: Record<string, string> = {
134
+ '1001': 'Authentication failed OR insufficient credit (BudgetSMS returns 1001 for both)',
135
+ '1002': 'Account not active',
136
+ '1003': 'Insufficient credit',
137
+ '1004': 'No access to this API',
138
+ '1005': 'No handle provided',
139
+ '1006': 'No UserID provided',
140
+ '1007': 'No Username provided',
141
+ '2001': 'SMS message text is empty',
142
+ '2002': 'SMS numeric senderid can be max. 16 numbers',
143
+ '2003': 'SMS alphanumeric sender can be max. 11 characters',
144
+ '2004': 'SMS senderid is empty or invalid',
145
+ '2005': 'Destination number is too short',
146
+ '2006': 'Destination is not numeric',
147
+ '2007': 'Destination is empty',
148
+ '2008': 'SMS text is not OK (check encoding?)',
149
+ '2009': 'Parameter issue',
150
+ '2010': 'Destination number is invalidly formatted',
151
+ '2011': 'Destination is invalid',
152
+ '2012': 'SMS message text is too long',
153
+ '2013': 'SMS message is invalid',
154
+ '2014': 'SMS CustomID is used before',
155
+ '2015': 'Charset problem',
156
+ '2016': 'Invalid UTF-8 encoding',
157
+ '3001': 'No route to destination',
158
+ '3002': 'No routes are setup',
159
+ '3003': 'Invalid destination',
160
+ '4001': 'System error, related to customid',
161
+ '4002': 'System error, temporary issue',
162
+ };
163
+
164
+ // Special handling for 1001 error
165
+ let message = errorMessages[errorCode] || `Unknown error code: ${errorCode}`;
166
+ if (errorCode === '1001') {
167
+ message += '. Note: Check your account balance - BudgetSMS may return 1001 when credit is 0.';
168
+ }
169
+
170
+ return {
171
+ success: false,
172
+ error: {
173
+ name: 'BUDGETSMS_ERROR',
174
+ code: errorCode,
175
+ message,
176
+ },
177
+ };
178
+ }
179
+
180
+ // Unexpected response
181
+ return {
182
+ success: false,
183
+ error: {
184
+ name: 'BUDGETSMS_ERROR',
185
+ message: 'Unexpected response format from BudgetSMS API',
186
+ response: responseText,
187
+ },
188
+ };
189
+ } catch (err) {
190
+ return {
191
+ success: false,
192
+ error: {
193
+ name: err.name,
194
+ message: err.message,
195
+ stack: err.stack,
196
+ },
197
+ };
198
+ }
199
+ },
200
+ };
201
+
202
+ WorkerDirector.registerAdapter(BudgetSMSWorker);
203
+
204
+ // Environment variables needed:
205
+ // BUDGETSMS_USERNAME=your_username (alphanumeric)
206
+ // BUDGETSMS_USERID=your_userid (NUMERIC ONLY - found in BudgetSMS control panel)
207
+ // BUDGETSMS_HANDLE=your_api_handle (alphanumeric - found in BudgetSMS control panel)
208
+
209
+ // IMPORTANT: The userid MUST be numeric only. You can find it in the BudgetSMS control panel after login.
210
+ // Example: BUDGETSMS_USERID=12345 (NOT "user12345" or any non-numeric value)
211
+
212
+ // Usage examples:
213
+ //
214
+ // Send real SMS (requires credits):
215
+ // await WorkerDirector.doWork({
216
+ // type: 'BUDGETSMS',
217
+ // from: 'YourCompany',
218
+ // to: '+41791234567',
219
+ // text: 'Your message here',
220
+ // price: true, // Get price info
221
+ // credit: true, // Get remaining credit
222
+ // });
223
+ //
224
+ // Test SMS (no credit deducted):
225
+ // await WorkerDirector.doWork({
226
+ // type: 'BUDGETSMS',
227
+ // test: true,
228
+ // from: 'YourCompany',
229
+ // to: '+41791234567',
230
+ // text: 'Test message',
231
+ // });
232
+ //
233
+ // IMPORTANT: If you get error 1001, it could mean either:
234
+ // 1. Authentication failed (wrong credentials)
235
+ // 2. Insufficient credit (0 balance)
236
+ // Use the checkBudgetSmsCredentials() helper to verify which one it is.
237
+
238
+ // Helper function to check credentials and balance
239
+ export async function checkBudgetSmsCredentials() {
240
+ const url = 'https://api.budgetsms.net/checkcredit/';
241
+ const username = process.env.BUDGETSMS_USERNAME?.trim();
242
+ const userid = process.env.BUDGETSMS_USERID?.trim();
243
+ const handle = process.env.BUDGETSMS_HANDLE?.trim();
244
+
245
+ if (!username || !userid || !handle) {
246
+ return { error: 'Missing credentials' };
247
+ }
248
+
249
+ if (!/^\d+$/.test(userid)) {
250
+ return { error: 'UserID must be numeric only' };
251
+ }
252
+
253
+ const queryParams = new URLSearchParams({ username, userid, handle });
254
+
255
+ try {
256
+ const response = await fetch(`${url}?${queryParams.toString()}`, { method: 'GET' });
257
+ const text = await response.text();
258
+
259
+ if (text.startsWith('OK')) {
260
+ const credit = parseFloat(text.split(' ')[1]) || 0;
261
+ return { success: true, credit };
262
+ } else {
263
+ return { error: text };
264
+ }
265
+ } catch (err) {
266
+ return { error: err.message };
267
+ }
268
+ }
@@ -44,7 +44,7 @@ const streamPayloadToBulkImporter = async (
44
44
  { highWaterMark: 100, lowWaterMark: 5 },
45
45
  );
46
46
 
47
- for await (const event of eventIterator) { // eslint-disable-line
47
+ for await (const event of eventIterator) {
48
48
  await bulkImporter.prepare(event, unchainedAPI);
49
49
  }
50
50
 
@@ -0,0 +1,138 @@
1
+ import { IWorkerAdapter, WorkerAdapter, WorkerDirector } from '@unchainedshop/core';
2
+
3
+ const { BULKGATE_APPLICATION_ID, BULKGATE_APPLICATION_TOKEN } = process.env;
4
+
5
+ // BulkGate Simple API for SMS (transactional by default, promotional via boolean)
6
+ const BulkGateWorker: IWorkerAdapter<
7
+ {
8
+ from?: string;
9
+ to?: string;
10
+ text?: string;
11
+ unicode?: boolean;
12
+ country?: string;
13
+ schedule?: string | number; // ISO 8601 format or Unix timestamp
14
+ promotional?: boolean; // Set to true for promotional SMS, defaults to transactional
15
+ [key: string]: any;
16
+ },
17
+ any
18
+ > = {
19
+ ...WorkerAdapter,
20
+
21
+ key: 'shop.unchained.worker-plugin.bulkgate',
22
+ label: 'Send SMS through BulkGate',
23
+ version: '1.0.0',
24
+
25
+ type: 'BULKGATE',
26
+
27
+ doWork: async ({
28
+ from,
29
+ to,
30
+ text,
31
+ unicode = false,
32
+ country,
33
+ schedule,
34
+ promotional = false,
35
+ ...params
36
+ }) => {
37
+ try {
38
+ // Choose API endpoint based on promotional flag
39
+ const url = promotional
40
+ ? 'https://portal.bulkgate.com/api/1.0/simple/promotional'
41
+ : 'https://portal.bulkgate.com/api/1.0/simple/transactional';
42
+
43
+ // Prepare the request body
44
+ const requestBody = {
45
+ application_id: BULKGATE_APPLICATION_ID,
46
+ application_token: BULKGATE_APPLICATION_TOKEN,
47
+ number: to, // Phone number in international format (or semicolon-separated for promotional)
48
+ text: text || '',
49
+ unicode: unicode, // Boolean value for unicode support
50
+ sender_id: from ? 'gText' : 'gSystem', // Use text sender if 'from' is provided
51
+ sender_id_value: from || '', // Custom sender name if using gText
52
+ ...(country && { country }), // Optional country code
53
+ ...(schedule && { schedule }), // Optional scheduled time
54
+ ...params, // Any additional parameters
55
+ };
56
+
57
+ const response = await fetch(url, {
58
+ method: 'POST',
59
+ headers: {
60
+ 'Content-Type': 'application/json',
61
+ 'Cache-Control': 'no-cache',
62
+ },
63
+ body: JSON.stringify(requestBody),
64
+ });
65
+
66
+ const responseData = await response.json();
67
+
68
+ // Check if we have an error response
69
+ if (responseData.error || responseData.type) {
70
+ return {
71
+ success: false,
72
+ error: {
73
+ name: 'BULKGATE_ERROR',
74
+ message:
75
+ responseData.error ||
76
+ `Failed to send ${promotional ? 'promotional' : 'transactional'} SMS`,
77
+ type: responseData.type || null,
78
+ code: responseData.code || response.status,
79
+ detail: responseData.detail || null,
80
+ },
81
+ };
82
+ }
83
+
84
+ // Success response (transactional has specific structure, promotional might vary)
85
+ if (responseData.data) {
86
+ // For transactional SMS, check for specific accepted status
87
+ if (!promotional && responseData.data.status === 'accepted') {
88
+ return {
89
+ success: true,
90
+ result: {
91
+ sms_id: responseData.data.sms_id,
92
+ price: responseData.data.price,
93
+ credit: responseData.data.credit,
94
+ number: responseData.data.number,
95
+ status: responseData.data.status,
96
+ },
97
+ error: null,
98
+ };
99
+ }
100
+
101
+ // For promotional SMS or other successful responses
102
+ if (promotional || responseData.data.status) {
103
+ return {
104
+ success: true,
105
+ result: responseData.data,
106
+ error: null,
107
+ };
108
+ }
109
+ }
110
+
111
+ // Unexpected response format
112
+ return {
113
+ success: false,
114
+ error: {
115
+ name: 'BULKGATE_ERROR',
116
+ message: 'Unexpected response format from BulkGate API',
117
+ response: responseData,
118
+ },
119
+ };
120
+ } catch (err) {
121
+ return {
122
+ success: false,
123
+ error: {
124
+ name: err.name,
125
+ message: err.message,
126
+ stack: err.stack,
127
+ },
128
+ };
129
+ }
130
+ },
131
+ };
132
+
133
+ // Register the plugin
134
+ WorkerDirector.registerAdapter(BulkGateWorker);
135
+
136
+ // Environment variables needed:
137
+ // BULKGATE_APPLICATION_ID=your_application_id
138
+ // BULKGATE_APPLICATION_TOKEN=your_application_token
@@ -12,8 +12,8 @@ import {
12
12
  const generateOrder = async (
13
13
  enrollment: Enrollment,
14
14
  params: {
15
- orderPositions: Array<OrderPosition>;
16
- } & { [x: string]: any },
15
+ orderPositions: OrderPosition[];
16
+ } & Record<string, any>,
17
17
  unchainedAPI: Pick<UnchainedCore, 'modules' | 'services'>,
18
18
  ) => {
19
19
  if (!enrollment.payment || !enrollment.delivery) return null;
@@ -22,7 +22,7 @@ const generateOrder = async (
22
22
  const { orderPositions, ...configuration } = params;
23
23
  let order = await modules.orders.create({
24
24
  userId: enrollment.userId,
25
- currency: enrollment.currencyCode,
25
+ currencyCode: enrollment.currencyCode,
26
26
  countryCode: enrollment.countryCode,
27
27
  contact: enrollment.contact,
28
28
  billingAddress: enrollment.billingAddress,
@@ -2,13 +2,13 @@ import { WorkStatus } from '@unchainedshop/core-worker';
2
2
  import { IWorkerAdapter, WorkerDirector, WorkerAdapter } from '@unchainedshop/core';
3
3
  import later from '@breejs/later';
4
4
 
5
- type Arg = {
5
+ interface Arg {
6
6
  secondsPassed?: number;
7
- };
7
+ }
8
8
 
9
- type Result = {
9
+ interface Result {
10
10
  forked?: string;
11
- };
11
+ }
12
12
 
13
13
  const everyDayAtFourInTheNight = later.parse.cron('0 3 * * *');
14
14
 
@@ -1,17 +1,10 @@
1
1
  import { IWorkerAdapter, WorkerAdapter, WorkerDirector } from '@unchainedshop/core';
2
+ import { setTimeout } from 'node:timers/promises';
2
3
 
3
- const wait = async (time: number) => {
4
- return new Promise((resolve) => {
5
- setTimeout(() => {
6
- resolve(true);
7
- }, time);
8
- });
9
- };
10
-
11
- type Arg = {
4
+ interface Arg {
12
5
  wait?: number;
13
6
  fails?: boolean;
14
- };
7
+ }
15
8
 
16
9
  type Result = Arg;
17
10
 
@@ -26,7 +19,7 @@ const Heartbeat: IWorkerAdapter<Arg, Result> = {
26
19
 
27
20
  doWork: async (input: Arg): Promise<{ success: boolean; result: Result }> => {
28
21
  if (input?.wait) {
29
- await wait(input.wait);
22
+ await setTimeout(input.wait);
30
23
  }
31
24
  if (input?.fails) {
32
25
  return {
@@ -3,7 +3,7 @@ import { Work } from '@unchainedshop/core-worker';
3
3
 
4
4
  export const MessageWorker: IWorkerAdapter<
5
5
  { template: string; _id?: string; [x: string]: any },
6
- { info?: string; forked?: Array<Work> }
6
+ { info?: string; forked?: Work[] }
7
7
  > = {
8
8
  ...WorkerAdapter,
9
9
 
@@ -3,7 +3,7 @@ import webPush from 'web-push';
3
3
 
4
4
  const { PUSH_NOTIFICATION_PUBLIC_KEY, PUSH_NOTIFICATION_PRIVATE_KEY } = process.env;
5
5
 
6
- type NotificationOptions = {
6
+ interface NotificationOptions {
7
7
  vapidDetails: {
8
8
  subject: string;
9
9
  publicKey: string;
@@ -12,7 +12,7 @@ type NotificationOptions = {
12
12
  TTL: number;
13
13
  urgency?: 'very-low' | 'low' | 'normal' | 'high';
14
14
  topic?: string;
15
- };
15
+ }
16
16
 
17
17
  const PushNotificationWorkerPlugin: IWorkerAdapter<
18
18
  {
@@ -0,0 +1,71 @@
1
+ import { IWorkerAdapter, WorkerAdapter, WorkerDirector } from '@unchainedshop/core';
2
+
3
+ const { TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_SMS_FROM } = process.env;
4
+
5
+ const SmsWorkerPlugin: IWorkerAdapter<
6
+ {
7
+ from?: string;
8
+ to?: string;
9
+ text?: string;
10
+ [key: string]: any; // Allow additional parameters
11
+ },
12
+ any
13
+ > = {
14
+ ...WorkerAdapter,
15
+
16
+ key: 'shop.unchained.worker-plugin.twilio',
17
+ label: 'Send Messages through Twilio',
18
+ version: '1.0.0',
19
+
20
+ type: 'TWILIO',
21
+
22
+ doWork: async ({ from, to, text, ...params }) => {
23
+ try {
24
+ const url = `https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json`;
25
+ const response = await fetch(url, {
26
+ method: 'POST',
27
+ headers: {
28
+ Authorization: `Basic ${Buffer.from(`${TWILIO_ACCOUNT_SID}:${TWILIO_AUTH_TOKEN}`).toString('base64')}`,
29
+ 'Content-Type': 'application/x-www-form-urlencoded',
30
+ },
31
+ body: new URLSearchParams({
32
+ Body: text || '',
33
+ From: from || TWILIO_SMS_FROM,
34
+ To: to,
35
+ ...params, // Include any additional parameters passed
36
+ }),
37
+ });
38
+
39
+ const data = await response.json();
40
+
41
+ if (!response.ok) {
42
+ return {
43
+ success: false,
44
+ error: {
45
+ name: 'TWILIO_ERROR',
46
+ message: data.message || 'Failed to send SMS',
47
+ },
48
+ };
49
+ }
50
+
51
+ return {
52
+ success: true,
53
+ result: {
54
+ sid: data.sid,
55
+ },
56
+ error: null,
57
+ };
58
+ } catch (err) {
59
+ return {
60
+ success: false,
61
+ error: {
62
+ name: err.name,
63
+ message: err.message,
64
+ stack: err.stack,
65
+ },
66
+ };
67
+ }
68
+ },
69
+ };
70
+
71
+ WorkerDirector.registerAdapter(SmsWorkerPlugin);
@@ -3,7 +3,7 @@ import later from '@breejs/later';
3
3
  import { ProductPriceRate } from '@unchainedshop/core-products';
4
4
  import { resolveBestCurrency } from '@unchainedshop/utils';
5
5
 
6
- const getExchangeRates = async (base) => {
6
+ const getExchangeRates = async (base): Promise<{ currency: string; rates: Record<string, string> }> => {
7
7
  return fetch(`https://api.coinbase.com/v2/exchange-rates?currency=${base}`, {
8
8
  method: 'GET',
9
9
  })
@@ -28,16 +28,13 @@ const UpdateCoinbaseRates: IWorkerAdapter<any, any> = {
28
28
 
29
29
  const currencyCodes = currencies.map((currency) => currency.isoCode);
30
30
 
31
- const {
32
- currency: baseCurrency,
33
- rates: pairs,
34
- }: { currency: string; rates: Record<string, string> } = await getExchangeRates(currencyCode);
31
+ const { currency: baseCurrency, rates: pairs } = await getExchangeRates(currencyCode);
35
32
  const timestamp = new Date();
36
33
 
37
34
  // five minutes
38
35
  const expiresAt = new Date(new Date().getTime() + 5 * 60 * 1000);
39
36
 
40
- const rates: Array<ProductPriceRate> = Object.entries(pairs)
37
+ const rates: ProductPriceRate[] = Object.entries(pairs)
41
38
  .map(([quoteCurrency, rate]) => {
42
39
  return {
43
40
  baseCurrency,
@@ -3,7 +3,7 @@ import later from '@breejs/later';
3
3
  import { xml2json } from 'xml-js';
4
4
  import { ProductPriceRate } from '@unchainedshop/core-products';
5
5
 
6
- const getExchangeRates = async () => {
6
+ const getExchangeRates = async (): Promise<{ currency: string; rate: string }[]> => {
7
7
  return fetch(`https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml`, {
8
8
  method: 'GET',
9
9
  })
@@ -34,7 +34,7 @@ const UpdateECBRates: IWorkerAdapter<any, any> = {
34
34
  const { modules } = unchainedAPI;
35
35
 
36
36
  try {
37
- const data: Array<{ currency: string; rate: string }> = await getExchangeRates();
37
+ const data = await getExchangeRates();
38
38
  const timestamp = new Date();
39
39
  const expiresAt = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
40
40
 
@@ -50,7 +50,7 @@ const UpdateECBRates: IWorkerAdapter<any, any> = {
50
50
  },
51
51
  };
52
52
 
53
- const rates: Array<ProductPriceRate> = data
53
+ const rates: ProductPriceRate[] = data
54
54
  .map((d) => {
55
55
  return {
56
56
  baseCurrency,
@@ -1,4 +0,0 @@
1
- import { IOAuth2Adapter } from '@unchainedshop/types/accounts.js';
2
- declare const GoogleOAuth2Adapter: IOAuth2Adapter;
3
- export default GoogleOAuth2Adapter;
4
- //# sourceMappingURL=google-oauth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"google-oauth.d.ts","sourceRoot":"","sources":["../../src/accounts/google-oauth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAmFlE,QAAA,MAAM,mBAAmB,EAAE,cA4F1B,CAAC;AAIF,eAAe,mBAAmB,CAAC"}