@unchainedshop/plugins 2.0.0-rc.2 → 2.0.0-rc.4

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 (184) hide show
  1. package/lib/delivery/pick-mup.js +1 -1
  2. package/lib/delivery/pick-mup.js.map +1 -1
  3. package/lib/files/gridfs/gridfs-adapter.d.ts +1 -1
  4. package/lib/files/gridfs/gridfs-adapter.js +1 -1
  5. package/lib/files/gridfs/gridfs-adapter.js.map +1 -1
  6. package/lib/files/gridfs/gridfs-webhook.js +1 -1
  7. package/lib/files/gridfs/gridfs-webhook.js.map +1 -1
  8. package/lib/files/minio/minio-adapter.d.ts +1 -1
  9. package/lib/files/minio/minio-adapter.js +1 -1
  10. package/lib/files/minio/minio-adapter.js.map +1 -1
  11. package/lib/filters/local-search.d.ts +1 -1
  12. package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +1 -1
  13. package/lib/payment/apple-iap/index.d.ts +2 -2
  14. package/lib/payment/apple-iap/index.js +2 -2
  15. package/lib/payment/apple-iap/index.js.map +1 -1
  16. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts +2 -2
  17. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js +1 -1
  18. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js.map +1 -1
  19. package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -1
  20. package/lib/payment/cryptopay/index.d.ts +3 -3
  21. package/lib/payment/cryptopay/index.js +3 -3
  22. package/lib/payment/cryptopay/index.js.map +1 -1
  23. package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts +2 -2
  24. package/lib/payment/cryptopay/module/configureCryptopayModule.js +1 -1
  25. package/lib/payment/cryptopay/module/configureCryptopayModule.js.map +1 -1
  26. package/lib/payment/cryptopay/plugin.d.ts +1 -1
  27. package/lib/payment/cryptopay/plugin.js +1 -1
  28. package/lib/payment/cryptopay/plugin.js.map +1 -1
  29. package/lib/payment/datatrans-v2/api/authorize.d.ts +1 -1
  30. package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts +1 -1
  31. package/lib/payment/datatrans-v2/api/cancel.d.ts +1 -1
  32. package/lib/payment/datatrans-v2/api/index.d.ts +8 -8
  33. package/lib/payment/datatrans-v2/api/index.js +9 -9
  34. package/lib/payment/datatrans-v2/api/index.js.map +1 -1
  35. package/lib/payment/datatrans-v2/api/init.d.ts +1 -1
  36. package/lib/payment/datatrans-v2/api/init.js +1 -1
  37. package/lib/payment/datatrans-v2/api/init.js.map +1 -1
  38. package/lib/payment/datatrans-v2/api/secureFields.d.ts +1 -1
  39. package/lib/payment/datatrans-v2/api/secureFields.js +1 -1
  40. package/lib/payment/datatrans-v2/api/secureFields.js.map +1 -1
  41. package/lib/payment/datatrans-v2/api/settle.d.ts +1 -1
  42. package/lib/payment/datatrans-v2/api/status.d.ts +1 -1
  43. package/lib/payment/datatrans-v2/api/validate.d.ts +1 -1
  44. package/lib/payment/datatrans-v2/index.d.ts +1 -1
  45. package/lib/payment/datatrans-v2/index.js +4 -4
  46. package/lib/payment/datatrans-v2/index.js.map +1 -1
  47. package/lib/payment/datatrans-v2/middleware.js +1 -1
  48. package/lib/payment/datatrans-v2/middleware.js.map +1 -1
  49. package/lib/payment/datatrans-v2/parseRegistrationData.d.ts +4 -4
  50. package/lib/payment/datatrans-v2/parseRegistrationData.js +1 -1
  51. package/lib/payment/datatrans-v2/parseRegistrationData.js.map +1 -1
  52. package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +2 -2
  53. package/lib/payment/postfinance-checkout/index.d.ts +1 -1
  54. package/lib/payment/postfinance-checkout/index.js +4 -4
  55. package/lib/payment/postfinance-checkout/index.js.map +1 -1
  56. package/lib/payment/postfinance-checkout/middleware.js +1 -1
  57. package/lib/payment/postfinance-checkout/middleware.js.map +1 -1
  58. package/lib/payment/postfinance-checkout/types.js +2 -2
  59. package/lib/payment/postfinance-checkout/types.js.map +1 -1
  60. package/lib/payment/postfinance-checkout/utils.d.ts +1 -1
  61. package/lib/payment/worldline-saferpay/index.js +1 -1
  62. package/lib/payment/worldline-saferpay/index.js.map +1 -1
  63. package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.d.ts +4 -4
  64. package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.js +1 -1
  65. package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.js.map +1 -1
  66. package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.d.ts +4 -4
  67. package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.js +1 -1
  68. package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.js.map +1 -1
  69. package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageAssert.d.ts +4 -4
  70. package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageInitialize.d.ts +4 -4
  71. package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/TransactionCancel.d.ts +2 -2
  72. package/lib/plugins-index.d.ts +42 -42
  73. package/lib/plugins-index.js +50 -50
  74. package/lib/plugins-index.js.map +1 -1
  75. package/lib/pricing/delivery-swiss-tax.d.ts +1 -1
  76. package/lib/pricing/free-delivery.d.ts +1 -1
  77. package/lib/pricing/free-payment.d.ts +1 -1
  78. package/lib/pricing/order-discount.js +1 -1
  79. package/lib/pricing/order-discount.js.map +1 -1
  80. package/lib/pricing/order-items-discount.js +1 -1
  81. package/lib/pricing/order-items-discount.js.map +1 -1
  82. package/lib/pricing/product-discount.js +1 -1
  83. package/lib/pricing/product-discount.js.map +1 -1
  84. package/lib/pricing/product-price-round.d.ts +1 -1
  85. package/lib/pricing/utils/cache.d.ts +3 -2
  86. package/lib/pricing/utils/cache.js +2 -1
  87. package/lib/pricing/utils/cache.js.map +1 -1
  88. package/lib/warehousing/eth-minter.js +1 -1
  89. package/lib/warehousing/eth-minter.js.map +1 -1
  90. package/lib/warehousing/google-sheets.d.ts +1 -1
  91. package/lib/warehousing/google-sheets.js +1 -1
  92. package/lib/warehousing/google-sheets.js.map +1 -1
  93. package/lib/worker/bulk-import.d.ts +1 -1
  94. package/lib/worker/export-token.d.ts +2 -2
  95. package/lib/worker/external.d.ts +1 -1
  96. package/lib/worker/http-request.d.ts +1 -1
  97. package/lib/worker/message.d.ts +1 -1
  98. package/lib/worker/update-token-ownership.d.ts +2 -2
  99. package/lib/worker/zombie-killer.d.ts +1 -1
  100. package/package.json +17 -17
  101. package/src/delivery/pick-mup.ts +1 -1
  102. package/src/delivery/post.ts +1 -1
  103. package/src/delivery/send-message.ts +1 -1
  104. package/src/delivery/stores.ts +1 -1
  105. package/src/enrollments/licensed.ts +1 -1
  106. package/src/events/node-event-emitter.ts +1 -1
  107. package/src/events/redis.ts +1 -1
  108. package/src/files/gridfs/gridfs-adapter.ts +2 -2
  109. package/src/files/gridfs/gridfs-webhook.ts +1 -1
  110. package/src/files/minio/minio-adapter.ts +2 -2
  111. package/src/filters/local-search.ts +2 -2
  112. package/src/filters/strict-equal.ts +1 -1
  113. package/src/payment/apple-iap/adapter.ts +4 -4
  114. package/src/payment/apple-iap/db/AppleTransactionsCollection.ts +1 -1
  115. package/src/payment/apple-iap/index.ts +2 -2
  116. package/src/payment/apple-iap/module/configureAppleTransactionsModule.ts +2 -2
  117. package/src/payment/braintree.ts +1 -1
  118. package/src/payment/cryptopay/db/CryptopayTransactions.ts +1 -1
  119. package/src/payment/cryptopay/index.ts +3 -3
  120. package/src/payment/cryptopay/middleware.ts +4 -4
  121. package/src/payment/cryptopay/module/configureCryptopayModule.ts +2 -2
  122. package/src/payment/cryptopay/plugin.ts +4 -4
  123. package/src/payment/datatrans-v2/api/authorize.ts +1 -1
  124. package/src/payment/datatrans-v2/api/authorizeAuthenticated.ts +1 -1
  125. package/src/payment/datatrans-v2/api/cancel.ts +1 -1
  126. package/src/payment/datatrans-v2/api/index.ts +9 -9
  127. package/src/payment/datatrans-v2/api/init.ts +2 -2
  128. package/src/payment/datatrans-v2/api/secureFields.ts +2 -2
  129. package/src/payment/datatrans-v2/api/settle.ts +1 -1
  130. package/src/payment/datatrans-v2/api/status.ts +1 -1
  131. package/src/payment/datatrans-v2/api/validate.ts +1 -1
  132. package/src/payment/datatrans-v2/index.ts +6 -6
  133. package/src/payment/datatrans-v2/middleware.ts +3 -3
  134. package/src/payment/datatrans-v2/parseRegistrationData.ts +2 -2
  135. package/src/payment/datatrans-v2/roundedAmountFromOrder.ts +2 -2
  136. package/src/payment/invoice-prepaid.ts +1 -1
  137. package/src/payment/invoice.ts +1 -1
  138. package/src/payment/paypal-checkout.ts +1 -1
  139. package/src/payment/postfinance-checkout/index.ts +5 -5
  140. package/src/payment/postfinance-checkout/middleware.ts +3 -3
  141. package/src/payment/postfinance-checkout/utils.ts +1 -1
  142. package/src/payment/stripe.ts +2 -2
  143. package/src/payment/worldline-saferpay/index.ts +2 -2
  144. package/src/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.ts +5 -5
  145. package/src/payment/worldline-saferpay/worldline-saferpay-client/index.ts +4 -4
  146. package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageAssert.ts +4 -4
  147. package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageInitialize.ts +4 -4
  148. package/src/payment/worldline-saferpay/worldline-saferpay-client/models/TransactionCancel.ts +2 -2
  149. package/src/plugins-index.ts +51 -51
  150. package/src/pricing/delivery-swiss-tax.ts +1 -1
  151. package/src/pricing/discount-100-off.ts +1 -1
  152. package/src/pricing/discount-half-price-manual.ts +1 -1
  153. package/src/pricing/discount-half-price.ts +1 -1
  154. package/src/pricing/free-delivery.ts +1 -1
  155. package/src/pricing/free-payment.ts +1 -1
  156. package/src/pricing/order-delivery.ts +1 -1
  157. package/src/pricing/order-discount.ts +1 -1
  158. package/src/pricing/order-items-discount.ts +1 -1
  159. package/src/pricing/order-items.ts +1 -1
  160. package/src/pricing/order-payment.ts +1 -1
  161. package/src/pricing/product-catalog-price.ts +1 -1
  162. package/src/pricing/product-discount.ts +2 -2
  163. package/src/pricing/product-price-rateconversion.ts +1 -1
  164. package/src/pricing/product-price-round.ts +1 -1
  165. package/src/pricing/product-swiss-tax.ts +1 -1
  166. package/src/pricing/utils/{cache.js → cache.ts} +3 -1
  167. package/src/quotations/manual.ts +1 -1
  168. package/src/warehousing/eth-minter.ts +2 -2
  169. package/src/warehousing/google-sheets.ts +2 -2
  170. package/src/warehousing/store.ts +1 -1
  171. package/src/worker/bulk-import.ts +2 -2
  172. package/src/worker/email.ts +1 -1
  173. package/src/worker/enrollment-order-generator.ts +5 -5
  174. package/src/worker/export-token.ts +2 -2
  175. package/src/worker/external.ts +1 -1
  176. package/src/worker/heartbeat.ts +1 -1
  177. package/src/worker/http-request.ts +1 -1
  178. package/src/worker/message.ts +1 -1
  179. package/src/worker/sms.ts +1 -1
  180. package/src/worker/update-coinbase-rates.ts +2 -2
  181. package/src/worker/update-ecb-rates.ts +2 -2
  182. package/src/worker/update-token-ownership.ts +2 -2
  183. package/src/worker/zombie-killer.ts +1 -1
  184. package/tsconfig.json +3 -6
@@ -1,7 +1,7 @@
1
- import { Context } from '@unchainedshop/types/api';
1
+ import { Context } from '@unchainedshop/types/api.js';
2
2
  import { createLogger } from '@unchainedshop/logger';
3
- import { WebhookData } from './types';
4
- import { getTransaction, getTransactionCompletion } from './api';
3
+ import { WebhookData } from './types.js';
4
+ import { getTransaction, getTransactionCompletion } from './api.js';
5
5
 
6
6
  const logger = createLogger('unchained:core-payment:postfinance-checkout');
7
7
 
@@ -1,4 +1,4 @@
1
- import { Order, OrdersModule } from '@unchainedshop/types/orders';
1
+ import { Order, OrdersModule } from '@unchainedshop/types/orders.js';
2
2
  import * as pf from 'postfinancecheckout';
3
3
 
4
4
  const { PostFinanceCheckout } = pf;
@@ -1,5 +1,5 @@
1
- import { Context } from '@unchainedshop/types/api';
2
- import { IPaymentAdapter } from '@unchainedshop/types/payments';
1
+ import { Context } from '@unchainedshop/types/api.js';
2
+ import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
3
3
  import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core-payment';
4
4
  import { createLogger } from '@unchainedshop/logger';
5
5
 
@@ -1,6 +1,6 @@
1
- import { IPaymentAdapter, PaymentChargeActionResult } from '@unchainedshop/types/payments';
1
+ import { IPaymentAdapter, PaymentChargeActionResult } from '@unchainedshop/types/payments.js';
2
2
  import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core-payment';
3
- import { PaymentPageInitializeInput, SaferpayClient } from './worldline-saferpay-client';
3
+ import { PaymentPageInitializeInput, SaferpayClient } from './worldline-saferpay-client/index.js';
4
4
 
5
5
  const {
6
6
  WORLDLINE_BASE_URL = 'https://test.saferpay.com/api',
@@ -1,11 +1,11 @@
1
- import { TransactionCancelInput, TransactionCancelResponse } from '../models/TransactionCancel';
2
- import { PaymentPageAssertInput, PaymentPageAssertResponse } from '../models/PaymentPageAssert';
1
+ import { TransactionCancelInput, TransactionCancelResponse } from '../models/TransactionCancel.js';
2
+ import { PaymentPageAssertInput, PaymentPageAssertResponse } from '../models/PaymentPageAssert.js';
3
3
  import {
4
4
  PaymentPageInitializeInput,
5
5
  PaymentPageInitializeResponse,
6
- } from '../models/PaymentPageInitialize';
7
- import { RequestHeader } from '../models/Request';
8
- import { SaferpayConnection } from './SaferpayConnection';
6
+ } from '../models/PaymentPageInitialize.js';
7
+ import { RequestHeader } from '../models/Request.js';
8
+ import { SaferpayConnection } from './SaferpayConnection.js';
9
9
 
10
10
  export class SaferpayClient {
11
11
  private conn: SaferpayConnection;
@@ -1,8 +1,8 @@
1
- export { SaferpayClient } from './api/SaferpayClient';
1
+ export { SaferpayClient } from './api/SaferpayClient.js';
2
2
 
3
3
  export type {
4
4
  PaymentPageInitializeInput,
5
5
  PaymentPageInitializeResponse,
6
- } from './models/PaymentPageInitialize';
7
- export type { PaymentPageAssertInput, PaymentPageAssertResponse } from './models/PaymentPageAssert';
8
- export type { TransactionCancelInput, TransactionCancelResponse } from './models/TransactionCancel';
6
+ } from './models/PaymentPageInitialize.js';
7
+ export type { PaymentPageAssertInput, PaymentPageAssertResponse } from './models/PaymentPageAssert.js';
8
+ export type { TransactionCancelInput, TransactionCancelResponse } from './models/TransactionCancel.js';
@@ -1,7 +1,7 @@
1
- import { Response } from './Response';
2
- import { Request } from './Request';
3
- import { TransactionAmount, TransactionStatus } from './Transaction';
4
- import { PaymentMethods } from './PaymentMethods';
1
+ import { Response } from './Response.js';
2
+ import { Request } from './Request.js';
3
+ import { TransactionAmount, TransactionStatus } from './Transaction.js';
4
+ import { PaymentMethods } from './PaymentMethods.js';
5
5
 
6
6
  export interface PaymentPageAssertInput extends Request {
7
7
  Token: string;
@@ -1,7 +1,7 @@
1
- import { PaymentMethods } from './PaymentMethods';
2
- import { Request } from './Request';
3
- import { Response } from './Response';
4
- import { TransactionAmount } from './Transaction';
1
+ import { PaymentMethods } from './PaymentMethods.js';
2
+ import { Request } from './Request.js';
3
+ import { Response } from './Response.js';
4
+ import { TransactionAmount } from './Transaction.js';
5
5
 
6
6
  export interface PaymentPageInitializeInput extends Request {
7
7
  ConfigSet?: string;
@@ -1,5 +1,5 @@
1
- import { Response } from './Response';
2
- import { Request } from './Request';
1
+ import { Response } from './Response.js';
2
+ import { Request } from './Request.js';
3
3
 
4
4
  export interface TransactionCancelInput extends Request {
5
5
  TransactionReference: {
@@ -1,75 +1,75 @@
1
- import { useMiddlewareWithCurrentContext } from '@unchainedshop/api/express';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { useMiddlewareWithCurrentContext } from '@unchainedshop/api/express/index.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
3
  import express from 'express';
4
4
 
5
5
  // Delivery
6
- import './delivery/post';
7
- import './delivery/pick-mup';
8
- import './delivery/send-message';
9
- import './delivery/stores';
6
+ import './delivery/post.js';
7
+ import './delivery/pick-mup.js';
8
+ import './delivery/send-message.js';
9
+ import './delivery/stores.js';
10
10
 
11
11
  // Payment
12
- import './payment/invoice';
13
- import './payment/invoice-prepaid';
14
- import './payment/paypal-checkout';
15
- import './payment/worldline-saferpay';
16
- import { datatransHandler } from './payment/datatrans-v2';
17
- import { configureCryptopayModule, cryptopayHandler } from './payment/cryptopay';
18
- import { appleIAPHandler, configureAppleTransactionsModule } from './payment/apple-iap';
19
- import { stripeHandler } from './payment/stripe';
20
- import { postfinanceCheckoutHandler } from './payment/postfinance-checkout';
12
+ import './payment/invoice.js';
13
+ import './payment/invoice-prepaid.js';
14
+ import './payment/paypal-checkout.js';
15
+ import './payment/worldline-saferpay/index.js';
16
+ import { datatransHandler } from './payment/datatrans-v2/index.js';
17
+ import { configureCryptopayModule, cryptopayHandler } from './payment/cryptopay/index.js';
18
+ import { appleIAPHandler, configureAppleTransactionsModule } from './payment/apple-iap/index.js';
19
+ import { stripeHandler } from './payment/stripe.js';
20
+ import { postfinanceCheckoutHandler } from './payment/postfinance-checkout/index.js';
21
21
 
22
22
  // Warehousing
23
- import './warehousing/store';
24
- import './warehousing/eth-minter';
23
+ import './warehousing/store.js';
24
+ import './warehousing/eth-minter.js';
25
25
 
26
26
  // Pricing
27
- import './pricing/discount-half-price-manual';
28
- import './pricing/discount-100-off';
29
- import './pricing/free-payment';
30
- import './pricing/free-delivery';
31
- import './pricing/order-items';
32
- import './pricing/order-discount';
33
- import './pricing/order-delivery';
34
- import './pricing/order-payment';
35
- import './pricing/product-catalog-price';
36
- import './pricing/product-price-rateconversion';
37
- import './pricing/product-discount';
38
- import './pricing/product-swiss-tax';
39
- import './pricing/delivery-swiss-tax';
27
+ import './pricing/discount-half-price-manual.js';
28
+ import './pricing/discount-100-off.js';
29
+ import './pricing/free-payment.js';
30
+ import './pricing/free-delivery.js';
31
+ import './pricing/order-items.js';
32
+ import './pricing/order-discount.js';
33
+ import './pricing/order-delivery.js';
34
+ import './pricing/order-payment.js';
35
+ import './pricing/product-catalog-price.js';
36
+ import './pricing/product-price-rateconversion.js';
37
+ import './pricing/product-discount.js';
38
+ import './pricing/product-swiss-tax.js';
39
+ import './pricing/delivery-swiss-tax.js';
40
40
 
41
41
  // Filter & Search
42
- import './filters/strict-equal';
43
- import './filters/local-search';
42
+ import './filters/strict-equal.js';
43
+ import './filters/local-search.js';
44
44
 
45
45
  // Quotations
46
- import './quotations/manual';
46
+ import './quotations/manual.js';
47
47
 
48
48
  // Enrollments
49
- import './enrollments/licensed';
49
+ import './enrollments/licensed.js';
50
50
 
51
51
  // Event Queue
52
- import './events/node-event-emitter';
52
+ import './events/node-event-emitter.js';
53
53
 
54
54
  // Workers
55
- import './worker/bulk-import';
56
- import './worker/zombie-killer';
57
- import './worker/message';
58
- import './worker/external';
59
- import './worker/http-request';
60
- import './worker/heartbeat';
61
- import './worker/email';
62
- import './worker/sms';
63
- import './worker/update-ecb-rates';
64
- import './worker/update-coinbase-rates';
65
- import { configureExportToken } from './worker/export-token';
66
- import { configureGenerateOrderAutoscheduling } from './worker/enrollment-order-generator';
67
- import { configureUpdateTokenOwnership } from './worker/update-token-ownership';
55
+ import './worker/bulk-import.js';
56
+ import './worker/zombie-killer.js';
57
+ import './worker/message.js';
58
+ import './worker/external.js';
59
+ import './worker/http-request.js';
60
+ import './worker/heartbeat.js';
61
+ import './worker/email.js';
62
+ import './worker/sms.js';
63
+ import './worker/update-ecb-rates.js';
64
+ import './worker/update-coinbase-rates.js';
65
+ import { configureExportToken } from './worker/export-token.js';
66
+ import { configureGenerateOrderAutoscheduling } from './worker/enrollment-order-generator.js';
67
+ import { configureUpdateTokenOwnership } from './worker/update-token-ownership.js';
68
68
 
69
69
  // Asset Management
70
- import './files/gridfs/gridfs-adapter';
71
- import { gridfsHandler } from './files/gridfs/gridfs-webhook';
72
- import { configureGridFSFileUploadModule } from './files/gridfs';
70
+ import './files/gridfs/gridfs-adapter.js';
71
+ import { gridfsHandler } from './files/gridfs/gridfs-webhook.js';
72
+ import { configureGridFSFileUploadModule } from './files/gridfs/index.js';
73
73
 
74
74
  const {
75
75
  CRYPTOPAY_WEBHOOK_PATH = '/payment/cryptopay',
@@ -2,7 +2,7 @@ import { DeliveryPricingAdapter, DeliveryPricingDirector } from '@unchainedshop/
2
2
  import {
3
3
  DeliveryPricingAdapterContext,
4
4
  IDeliveryPricingAdapter,
5
- } from '@unchainedshop/types/delivery.pricing';
5
+ } from '@unchainedshop/types/delivery.pricing.js';
6
6
 
7
7
  // https://www.ch.ch/de/mehrwertsteuersatz-schweiz/
8
8
  export const SwissTaxCategories = {
@@ -1,4 +1,4 @@
1
- import { IDiscountAdapter } from '@unchainedshop/types/discount';
1
+ import { IDiscountAdapter } from '@unchainedshop/types/discount.js';
2
2
  import { OrderDiscountDirector, OrderDiscountAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const HundredOff: IDiscountAdapter = {
@@ -1,4 +1,4 @@
1
- import { IDiscountAdapter } from '@unchainedshop/types/discount';
1
+ import { IDiscountAdapter } from '@unchainedshop/types/discount.js';
2
2
  import { OrderDiscountDirector, OrderDiscountAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const HalfPriceManual: IDiscountAdapter = {
@@ -1,4 +1,4 @@
1
- import { IDiscountAdapter } from '@unchainedshop/types/discount';
1
+ import { IDiscountAdapter } from '@unchainedshop/types/discount.js';
2
2
  import { OrderDiscountDirector, OrderDiscountAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const HalfPrice: IDiscountAdapter = {
@@ -1,5 +1,5 @@
1
1
  import { DeliveryPricingAdapter, DeliveryPricingDirector } from '@unchainedshop/core-delivery';
2
- import { IDeliveryPricingAdapter } from '@unchainedshop/types/delivery.pricing';
2
+ import { IDeliveryPricingAdapter } from '@unchainedshop/types/delivery.pricing.js';
3
3
 
4
4
  export const DeliveryFreePrice: IDeliveryPricingAdapter = {
5
5
  ...DeliveryPricingAdapter,
@@ -1,5 +1,5 @@
1
1
  import { PaymentPricingAdapter, PaymentPricingDirector } from '@unchainedshop/core-payment';
2
- import { IPaymentPricingAdapter } from '@unchainedshop/types/payments.pricing';
2
+ import { IPaymentPricingAdapter } from '@unchainedshop/types/payments.pricing.js';
3
3
 
4
4
  export const PaymentFreePrice: IPaymentPricingAdapter = {
5
5
  ...PaymentPricingAdapter,
@@ -1,4 +1,4 @@
1
- import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing';
1
+ import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing.js';
2
2
  import { OrderPricingDirector, OrderPricingAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const OrderDelivery: IOrderPricingAdapter = {
@@ -1,4 +1,4 @@
1
- import { IOrderPricingAdapter, OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing';
1
+ import { IOrderPricingAdapter, OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing.js';
2
2
  import { OrderPricingDirector, OrderPricingAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const resolveRatioAndTaxDivisorForPricingSheet = (pricing, total) => {
@@ -1,4 +1,4 @@
1
- import { IOrderPricingAdapter, OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing';
1
+ import { IOrderPricingAdapter, OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing.js';
2
2
  import { OrderPricingDirector, OrderPricingAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const resolveRatioAndTaxDivisorForPricingSheet = (pricing, total) => {
@@ -1,4 +1,4 @@
1
- import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing';
1
+ import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing.js';
2
2
  import { OrderPricingDirector, OrderPricingAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const OrderItems: IOrderPricingAdapter = {
@@ -1,4 +1,4 @@
1
- import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing';
1
+ import { IOrderPricingAdapter } from '@unchainedshop/types/orders.pricing.js';
2
2
  import { OrderPricingDirector, OrderPricingAdapter } from '@unchainedshop/core-orders';
3
3
 
4
4
  const OrderPayment: IOrderPricingAdapter = {
@@ -1,4 +1,4 @@
1
- import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing';
1
+ import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing.js';
2
2
  import { ProductPricingDirector, ProductPricingAdapter } from '@unchainedshop/core-products';
3
3
 
4
4
  const ProductPrice: IProductPricingAdapter = {
@@ -1,8 +1,8 @@
1
- import type { Discount, DiscountConfiguration } from '@unchainedshop/types/discount';
1
+ import type { Discount, DiscountConfiguration } from '@unchainedshop/types/discount.js';
2
2
  import {
3
3
  IProductPricingAdapter,
4
4
  ProductPricingRowCategory,
5
- } from '@unchainedshop/types/products.pricing';
5
+ } from '@unchainedshop/types/products.pricing.js';
6
6
  import { ProductPricingDirector, ProductPricingAdapter } from '@unchainedshop/core-products';
7
7
 
8
8
  const applyRate = (configuration: DiscountConfiguration, amount) => {
@@ -1,4 +1,4 @@
1
- import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing';
1
+ import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing.js';
2
2
  import { ProductPricingDirector, ProductPricingAdapter } from '@unchainedshop/core-products';
3
3
 
4
4
  const ProductPriceRateConversion: IProductPricingAdapter = {
@@ -1,4 +1,4 @@
1
- import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing';
1
+ import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing.js';
2
2
  import { ProductPricingDirector, ProductPricingAdapter } from '@unchainedshop/core-products';
3
3
 
4
4
  const roundToNext = (value, precision) => Math.ceil(value / precision) * precision;
@@ -2,7 +2,7 @@ import { ProductPricingDirector, ProductPricingAdapter } from '@unchainedshop/co
2
2
  import {
3
3
  IProductPricingAdapter,
4
4
  ProductPricingAdapterContext,
5
- } from '@unchainedshop/types/products.pricing';
5
+ } from '@unchainedshop/types/products.pricing.js';
6
6
 
7
7
  export const SwissTaxCategories = {
8
8
  DEFAULT: {
@@ -1,7 +1,9 @@
1
- import 'abort-controller/polyfill';
1
+ import 'abort-controller/polyfill.js';
2
2
  import LRUCache from 'lru-cache';
3
3
 
4
4
  class Cache {
5
+ cache;
6
+
5
7
  constructor(ttlSeconds = 60) {
6
8
  this.cache = new LRUCache({
7
9
  max: 500,
@@ -1,4 +1,4 @@
1
- import { IQuotationAdapter } from '@unchainedshop/types/quotations';
1
+ import { IQuotationAdapter } from '@unchainedshop/types/quotations.js';
2
2
  import { QuotationDirector, QuotationAdapter } from '@unchainedshop/core-quotations';
3
3
 
4
4
  const ManualOffering: IQuotationAdapter = {
@@ -3,8 +3,8 @@ import {
3
3
  WarehousingAdapter,
4
4
  WarehousingProviderType,
5
5
  } from '@unchainedshop/core-warehousing';
6
- import { ProductType, ProductContractStandard } from '@unchainedshop/types/products';
7
- import { IWarehousingAdapter, WarehousingError } from '@unchainedshop/types/warehousing';
6
+ import { ProductType, ProductContractStandard } from '@unchainedshop/types/products.js';
7
+ import { IWarehousingAdapter, WarehousingError } from '@unchainedshop/types/warehousing.js';
8
8
  import { generateDbObjectId, systemLocale } from '@unchainedshop/utils';
9
9
 
10
10
  const { MINTER_TOKEN_OFFSET = '0' } = process.env;
@@ -5,9 +5,9 @@ import {
5
5
  } from '@unchainedshop/core-warehousing';
6
6
  import Sheets from 'node-sheets';
7
7
  import { log, LogLevel } from '@unchainedshop/logger';
8
- import 'abort-controller/polyfill';
8
+ import 'abort-controller/polyfill.js';
9
9
  import LRU from 'lru-cache';
10
- import { IWarehousingAdapter } from '@unchainedshop/types/warehousing';
10
+ import { IWarehousingAdapter } from '@unchainedshop/types/warehousing.js';
11
11
 
12
12
  const { NODE_ENV, GOOGLE_SHEETS_ID, GOOGLE_SHEETS_PRIVATE_KEY_DATA } = process.env;
13
13
 
@@ -3,7 +3,7 @@ import {
3
3
  WarehousingAdapter,
4
4
  WarehousingProviderType,
5
5
  } from '@unchainedshop/core-warehousing';
6
- import { IWarehousingAdapter } from '@unchainedshop/types/warehousing';
6
+ import { IWarehousingAdapter } from '@unchainedshop/types/warehousing.js';
7
7
 
8
8
  const Store: IWarehousingAdapter = {
9
9
  ...WarehousingAdapter,
@@ -1,10 +1,10 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
3
3
  import { createLogger, LogLevel } from '@unchainedshop/logger';
4
4
  import fs from 'fs';
5
5
  import JSONStream from 'JSONStream';
6
6
  import { EventIterator } from 'event-iterator';
7
- import { UnchainedCore } from '@unchainedshop/types/core';
7
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
8
8
 
9
9
  const logger = createLogger('unchained:platform:bulk-import');
10
10
 
@@ -1,6 +1,6 @@
1
1
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
2
2
  import { createLogger } from '@unchainedshop/logger';
3
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
3
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
4
4
  import fs from 'fs';
5
5
  import path from 'path';
6
6
  import os from 'os';
@@ -1,14 +1,14 @@
1
- import { Enrollment } from '@unchainedshop/types/enrollments';
2
- import { OrderPosition } from '@unchainedshop/types/orders.positions';
3
- import { Product } from '@unchainedshop/types/products';
4
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { Enrollment } from '@unchainedshop/types/enrollments.js';
2
+ import { OrderPosition } from '@unchainedshop/types/orders.positions.js';
3
+ import { Product } from '@unchainedshop/types/products.js';
4
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
5
5
  import {
6
6
  EnrollmentDirector,
7
7
  enrollmentsSettings,
8
8
  EnrollmentStatus,
9
9
  } from '@unchainedshop/core-enrollments';
10
10
  import { WorkerAdapter, WorkerDirector } from '@unchainedshop/core-worker';
11
- import { UnchainedCore } from '@unchainedshop/types/core';
11
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
12
12
 
13
13
  const generateOrder = async (
14
14
  enrollment: Enrollment,
@@ -1,6 +1,6 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter, WorkerEventTypes } from '@unchainedshop/core-worker';
3
- import { UnchainedCore } from '@unchainedshop/types/core';
3
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
4
4
 
5
5
  export const ExportTokenWorker: IWorkerAdapter<void, void> = {
6
6
  ...WorkerAdapter,
@@ -1,4 +1,4 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
3
3
 
4
4
  export const ExternalWorkerPlugin: IWorkerAdapter<void, void> = {
@@ -1,4 +1,4 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
3
3
 
4
4
  const wait = async (time: number) => {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="dom" />
2
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
2
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
3
3
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
4
4
  import { log, LogLevel } from '@unchainedshop/logger';
5
5
 
@@ -1,4 +1,4 @@
1
- import { IWorkerAdapter, Work } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter, Work } from '@unchainedshop/types/worker.js';
2
2
  import { MessagingDirector } from '@unchainedshop/core-messaging';
3
3
  import { WorkerAdapter, WorkerDirector } from '@unchainedshop/core-worker';
4
4
  import { createLogger } from '@unchainedshop/logger';
package/src/worker/sms.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
2
2
  import { createLogger } from '@unchainedshop/logger';
3
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
3
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
4
4
  import Twilio from 'twilio';
5
5
 
6
6
  const { TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_SMS_FROM } = process.env;
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="dom" />
2
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
2
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
3
3
  import { WorkerAdapter, WorkerDirector } from '@unchainedshop/core-worker';
4
4
  import later from '@breejs/later';
5
- import { ProductPriceRate } from '@unchainedshop/types/products.pricing';
5
+ import { ProductPriceRate } from '@unchainedshop/types/products.pricing.js';
6
6
  import { systemLocale } from '@unchainedshop/utils';
7
7
 
8
8
  const getExchangeRates = async (base) => {
@@ -1,9 +1,9 @@
1
1
  /// <reference lib="dom" />
2
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
2
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
3
3
  import { WorkerAdapter, WorkerDirector } from '@unchainedshop/core-worker';
4
4
  import later from '@breejs/later';
5
5
  import xmlJs from 'xml-js';
6
- import { ProductPriceRate } from '@unchainedshop/types/products.pricing';
6
+ import { ProductPriceRate } from '@unchainedshop/types/products.pricing.js';
7
7
 
8
8
  const getExchangeRates = async () => {
9
9
  return fetch(`https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml`, {
@@ -1,6 +1,6 @@
1
- import { IWorkerAdapter, Work } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter, Work } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter, WorkerEventTypes } from '@unchainedshop/core-worker';
3
- import { UnchainedCore } from '@unchainedshop/types/core';
3
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
4
4
  import later from '@breejs/later';
5
5
 
6
6
  const everyMinute = later.parse.cron('* * * * *');
@@ -1,4 +1,4 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker';
1
+ import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
3
3
  import { createLogger } from '@unchainedshop/logger';
4
4
 
package/tsconfig.json CHANGED
@@ -10,15 +10,15 @@
10
10
  "lib": [
11
11
  "esnext"
12
12
  ],
13
- "module": "esnext",
14
- "moduleResolution": "node",
13
+ "module": "Node16",
14
+ "moduleResolution": "Node16",
15
15
  "noImplicitReturns": true,
16
16
  "noUnusedLocals": false,
17
17
  "outDir": "lib",
18
18
  "preserveWatchOutput": true,
19
19
  "skipLibCheck": true,
20
20
  "sourceMap": true,
21
- "target": "esnext",
21
+ "target": "ES2022",
22
22
  "types": [
23
23
  "node",
24
24
  "jest"
@@ -29,9 +29,6 @@
29
29
  ],
30
30
  }
31
31
  },
32
- // "exclude": [
33
- // "./src/payment/postfinance-checkout/*"
34
- // ],
35
32
  "include": [
36
33
  "src"
37
34
  ]