@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.
- package/lib/delivery/pick-mup.js +1 -1
- package/lib/delivery/pick-mup.js.map +1 -1
- package/lib/files/gridfs/gridfs-adapter.d.ts +1 -1
- package/lib/files/gridfs/gridfs-adapter.js +1 -1
- package/lib/files/gridfs/gridfs-adapter.js.map +1 -1
- package/lib/files/gridfs/gridfs-webhook.js +1 -1
- package/lib/files/gridfs/gridfs-webhook.js.map +1 -1
- package/lib/files/minio/minio-adapter.d.ts +1 -1
- package/lib/files/minio/minio-adapter.js +1 -1
- package/lib/files/minio/minio-adapter.js.map +1 -1
- package/lib/filters/local-search.d.ts +1 -1
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +1 -1
- package/lib/payment/apple-iap/index.d.ts +2 -2
- package/lib/payment/apple-iap/index.js +2 -2
- package/lib/payment/apple-iap/index.js.map +1 -1
- package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts +2 -2
- package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js +1 -1
- package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js.map +1 -1
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -1
- package/lib/payment/cryptopay/index.d.ts +3 -3
- package/lib/payment/cryptopay/index.js +3 -3
- package/lib/payment/cryptopay/index.js.map +1 -1
- package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts +2 -2
- package/lib/payment/cryptopay/module/configureCryptopayModule.js +1 -1
- package/lib/payment/cryptopay/module/configureCryptopayModule.js.map +1 -1
- package/lib/payment/cryptopay/plugin.d.ts +1 -1
- package/lib/payment/cryptopay/plugin.js +1 -1
- package/lib/payment/cryptopay/plugin.js.map +1 -1
- package/lib/payment/datatrans-v2/api/authorize.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/cancel.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/index.d.ts +8 -8
- package/lib/payment/datatrans-v2/api/index.js +9 -9
- package/lib/payment/datatrans-v2/api/index.js.map +1 -1
- package/lib/payment/datatrans-v2/api/init.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/init.js +1 -1
- package/lib/payment/datatrans-v2/api/init.js.map +1 -1
- package/lib/payment/datatrans-v2/api/secureFields.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/secureFields.js +1 -1
- package/lib/payment/datatrans-v2/api/secureFields.js.map +1 -1
- package/lib/payment/datatrans-v2/api/settle.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/status.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/validate.d.ts +1 -1
- package/lib/payment/datatrans-v2/index.d.ts +1 -1
- package/lib/payment/datatrans-v2/index.js +4 -4
- package/lib/payment/datatrans-v2/index.js.map +1 -1
- package/lib/payment/datatrans-v2/middleware.js +1 -1
- package/lib/payment/datatrans-v2/middleware.js.map +1 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts +4 -4
- package/lib/payment/datatrans-v2/parseRegistrationData.js +1 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.js.map +1 -1
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +2 -2
- package/lib/payment/postfinance-checkout/index.d.ts +1 -1
- package/lib/payment/postfinance-checkout/index.js +4 -4
- package/lib/payment/postfinance-checkout/index.js.map +1 -1
- package/lib/payment/postfinance-checkout/middleware.js +1 -1
- package/lib/payment/postfinance-checkout/middleware.js.map +1 -1
- package/lib/payment/postfinance-checkout/types.js +2 -2
- package/lib/payment/postfinance-checkout/types.js.map +1 -1
- package/lib/payment/postfinance-checkout/utils.d.ts +1 -1
- package/lib/payment/worldline-saferpay/index.js +1 -1
- package/lib/payment/worldline-saferpay/index.js.map +1 -1
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.d.ts +4 -4
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.js +1 -1
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.js.map +1 -1
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.d.ts +4 -4
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.js +1 -1
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/index.js.map +1 -1
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageAssert.d.ts +4 -4
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageInitialize.d.ts +4 -4
- package/lib/payment/worldline-saferpay/worldline-saferpay-client/models/TransactionCancel.d.ts +2 -2
- package/lib/plugins-index.d.ts +42 -42
- package/lib/plugins-index.js +50 -50
- package/lib/plugins-index.js.map +1 -1
- package/lib/pricing/delivery-swiss-tax.d.ts +1 -1
- package/lib/pricing/free-delivery.d.ts +1 -1
- package/lib/pricing/free-payment.d.ts +1 -1
- package/lib/pricing/order-discount.js +1 -1
- package/lib/pricing/order-discount.js.map +1 -1
- package/lib/pricing/order-items-discount.js +1 -1
- package/lib/pricing/order-items-discount.js.map +1 -1
- package/lib/pricing/product-discount.js +1 -1
- package/lib/pricing/product-discount.js.map +1 -1
- package/lib/pricing/product-price-round.d.ts +1 -1
- package/lib/pricing/utils/cache.d.ts +3 -2
- package/lib/pricing/utils/cache.js +2 -1
- package/lib/pricing/utils/cache.js.map +1 -1
- package/lib/warehousing/eth-minter.js +1 -1
- package/lib/warehousing/eth-minter.js.map +1 -1
- package/lib/warehousing/google-sheets.d.ts +1 -1
- package/lib/warehousing/google-sheets.js +1 -1
- package/lib/warehousing/google-sheets.js.map +1 -1
- package/lib/worker/bulk-import.d.ts +1 -1
- package/lib/worker/export-token.d.ts +2 -2
- package/lib/worker/external.d.ts +1 -1
- package/lib/worker/http-request.d.ts +1 -1
- package/lib/worker/message.d.ts +1 -1
- package/lib/worker/update-token-ownership.d.ts +2 -2
- package/lib/worker/zombie-killer.d.ts +1 -1
- package/package.json +17 -17
- package/src/delivery/pick-mup.ts +1 -1
- package/src/delivery/post.ts +1 -1
- package/src/delivery/send-message.ts +1 -1
- package/src/delivery/stores.ts +1 -1
- package/src/enrollments/licensed.ts +1 -1
- package/src/events/node-event-emitter.ts +1 -1
- package/src/events/redis.ts +1 -1
- package/src/files/gridfs/gridfs-adapter.ts +2 -2
- package/src/files/gridfs/gridfs-webhook.ts +1 -1
- package/src/files/minio/minio-adapter.ts +2 -2
- package/src/filters/local-search.ts +2 -2
- package/src/filters/strict-equal.ts +1 -1
- package/src/payment/apple-iap/adapter.ts +4 -4
- package/src/payment/apple-iap/db/AppleTransactionsCollection.ts +1 -1
- package/src/payment/apple-iap/index.ts +2 -2
- package/src/payment/apple-iap/module/configureAppleTransactionsModule.ts +2 -2
- package/src/payment/braintree.ts +1 -1
- package/src/payment/cryptopay/db/CryptopayTransactions.ts +1 -1
- package/src/payment/cryptopay/index.ts +3 -3
- package/src/payment/cryptopay/middleware.ts +4 -4
- package/src/payment/cryptopay/module/configureCryptopayModule.ts +2 -2
- package/src/payment/cryptopay/plugin.ts +4 -4
- package/src/payment/datatrans-v2/api/authorize.ts +1 -1
- package/src/payment/datatrans-v2/api/authorizeAuthenticated.ts +1 -1
- package/src/payment/datatrans-v2/api/cancel.ts +1 -1
- package/src/payment/datatrans-v2/api/index.ts +9 -9
- package/src/payment/datatrans-v2/api/init.ts +2 -2
- package/src/payment/datatrans-v2/api/secureFields.ts +2 -2
- package/src/payment/datatrans-v2/api/settle.ts +1 -1
- package/src/payment/datatrans-v2/api/status.ts +1 -1
- package/src/payment/datatrans-v2/api/validate.ts +1 -1
- package/src/payment/datatrans-v2/index.ts +6 -6
- package/src/payment/datatrans-v2/middleware.ts +3 -3
- package/src/payment/datatrans-v2/parseRegistrationData.ts +2 -2
- package/src/payment/datatrans-v2/roundedAmountFromOrder.ts +2 -2
- package/src/payment/invoice-prepaid.ts +1 -1
- package/src/payment/invoice.ts +1 -1
- package/src/payment/paypal-checkout.ts +1 -1
- package/src/payment/postfinance-checkout/index.ts +5 -5
- package/src/payment/postfinance-checkout/middleware.ts +3 -3
- package/src/payment/postfinance-checkout/utils.ts +1 -1
- package/src/payment/stripe.ts +2 -2
- package/src/payment/worldline-saferpay/index.ts +2 -2
- package/src/payment/worldline-saferpay/worldline-saferpay-client/api/SaferpayClient.ts +5 -5
- package/src/payment/worldline-saferpay/worldline-saferpay-client/index.ts +4 -4
- package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageAssert.ts +4 -4
- package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageInitialize.ts +4 -4
- package/src/payment/worldline-saferpay/worldline-saferpay-client/models/TransactionCancel.ts +2 -2
- package/src/plugins-index.ts +51 -51
- package/src/pricing/delivery-swiss-tax.ts +1 -1
- package/src/pricing/discount-100-off.ts +1 -1
- package/src/pricing/discount-half-price-manual.ts +1 -1
- package/src/pricing/discount-half-price.ts +1 -1
- package/src/pricing/free-delivery.ts +1 -1
- package/src/pricing/free-payment.ts +1 -1
- package/src/pricing/order-delivery.ts +1 -1
- package/src/pricing/order-discount.ts +1 -1
- package/src/pricing/order-items-discount.ts +1 -1
- package/src/pricing/order-items.ts +1 -1
- package/src/pricing/order-payment.ts +1 -1
- package/src/pricing/product-catalog-price.ts +1 -1
- package/src/pricing/product-discount.ts +2 -2
- package/src/pricing/product-price-rateconversion.ts +1 -1
- package/src/pricing/product-price-round.ts +1 -1
- package/src/pricing/product-swiss-tax.ts +1 -1
- package/src/pricing/utils/{cache.js → cache.ts} +3 -1
- package/src/quotations/manual.ts +1 -1
- package/src/warehousing/eth-minter.ts +2 -2
- package/src/warehousing/google-sheets.ts +2 -2
- package/src/warehousing/store.ts +1 -1
- package/src/worker/bulk-import.ts +2 -2
- package/src/worker/email.ts +1 -1
- package/src/worker/enrollment-order-generator.ts +5 -5
- package/src/worker/export-token.ts +2 -2
- package/src/worker/external.ts +1 -1
- package/src/worker/heartbeat.ts +1 -1
- package/src/worker/http-request.ts +1 -1
- package/src/worker/message.ts +1 -1
- package/src/worker/sms.ts +1 -1
- package/src/worker/update-coinbase-rates.ts +2 -2
- package/src/worker/update-ecb-rates.ts +2 -2
- package/src/worker/update-token-ownership.ts +2 -2
- package/src/worker/zombie-killer.ts +1 -1
- 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
|
|
package/src/payment/stripe.ts
CHANGED
|
@@ -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';
|
package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageAssert.ts
CHANGED
|
@@ -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;
|
package/src/payment/worldline-saferpay/worldline-saferpay-client/models/PaymentPageInitialize.ts
CHANGED
|
@@ -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;
|
package/src/plugins-index.ts
CHANGED
|
@@ -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 HalfPriceManual: 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: {
|
package/src/quotations/manual.ts
CHANGED
|
@@ -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
|
|
package/src/warehousing/store.ts
CHANGED
|
@@ -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
|
|
package/src/worker/email.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 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,
|
package/src/worker/external.ts
CHANGED
|
@@ -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> = {
|
package/src/worker/heartbeat.ts
CHANGED
|
@@ -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
|
|
package/src/worker/message.ts
CHANGED
|
@@ -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('* * * * *');
|
package/tsconfig.json
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"lib": [
|
|
11
11
|
"esnext"
|
|
12
12
|
],
|
|
13
|
-
"module": "
|
|
14
|
-
"moduleResolution": "
|
|
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": "
|
|
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
|
]
|