@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,5 +1,5 @@
|
|
|
1
1
|
import { WarehousingDirector, WarehousingAdapter, WarehousingProviderType, } from '@unchainedshop/core-warehousing';
|
|
2
|
-
import { ProductType, ProductContractStandard } from '@unchainedshop/types/products';
|
|
2
|
+
import { ProductType, ProductContractStandard } from '@unchainedshop/types/products.js';
|
|
3
3
|
import { generateDbObjectId, systemLocale } from '@unchainedshop/utils';
|
|
4
4
|
const { MINTER_TOKEN_OFFSET = '0' } = process.env;
|
|
5
5
|
const ETHMinter = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eth-minter.js","sourceRoot":"","sources":["../../src/warehousing/eth-minter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"eth-minter.js","sourceRoot":"","sources":["../../src/warehousing/eth-minter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,EAAE,mBAAmB,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAElD,MAAM,SAAS,GAAwB;IACrC,GAAG,kBAAkB;IAErB,GAAG,EAAE,4CAA4C;IACjD,OAAO,EAAE,KAAK;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AC,GAAG,CAAC,QAAQ,iBAAiB,OAAO,CAAC,GAAG,aAAa,OAAO,CAAC,YAAY,CAAC,OAAO,OAAO;wBACxG,OAAO,EAAE,YAAY,CAAC,QAAQ;wBAC9B,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;qBAClD;oBACH,CAAC,CAAC,SAAS,CAAC;gBAEd,OAAO;oBACL,IAAI;oBACJ,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,KAAK,EAAE,GAAG;oBACV,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,qBAAqB;oBACtD,YAAY;oBACZ,GAAG,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC;iBACvB,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,mBAAmB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import 'abort-controller/polyfill';
|
|
1
|
+
import 'abort-controller/polyfill.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WarehousingDirector, WarehousingAdapter, WarehousingProviderType, } from '@unchainedshop/core-warehousing';
|
|
2
2
|
import Sheets from 'node-sheets';
|
|
3
3
|
import { log, LogLevel } from '@unchainedshop/logger';
|
|
4
|
-
import 'abort-controller/polyfill';
|
|
4
|
+
import 'abort-controller/polyfill.js';
|
|
5
5
|
import LRU from 'lru-cache';
|
|
6
6
|
const { NODE_ENV, GOOGLE_SHEETS_ID, GOOGLE_SHEETS_PRIVATE_KEY_DATA } = process.env;
|
|
7
7
|
const ttl = NODE_ENV === 'production' ? 1000 * 60 : 0; // 1 minute or 1 second
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-sheets.js","sourceRoot":"","sources":["../../src/warehousing/google-sheets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IWorkerAdapter } from '@unchainedshop/types/worker';
|
|
1
|
+
import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
|
|
2
2
|
export declare const BulkImportWorker: IWorkerAdapter<any, Record<string, unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IWorkerAdapter } from '@unchainedshop/types/worker';
|
|
2
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
1
|
+
import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
|
|
2
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
3
3
|
export declare const ExportTokenWorker: IWorkerAdapter<void, void>;
|
|
4
4
|
export declare const configureExportToken: (unchainedApi: UnchainedCore) => void;
|
|
5
5
|
export default configureExportToken;
|
package/lib/worker/external.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IWorkerAdapter } from '@unchainedshop/types/worker';
|
|
1
|
+
import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
|
|
2
2
|
export declare const ExternalWorkerPlugin: IWorkerAdapter<void, void>;
|
package/lib/worker/message.d.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
|
export declare const messagingLogger: import("winston").Logger;
|
|
3
3
|
export declare const MessageWorker: IWorkerAdapter<{
|
|
4
4
|
template: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IWorkerAdapter } from '@unchainedshop/types/worker';
|
|
2
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
1
|
+
import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
|
|
2
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
3
3
|
export declare const UpdateTokenOwnership: IWorkerAdapter<void, void>;
|
|
4
4
|
export declare const RefreshTokens: IWorkerAdapter<void, any>;
|
|
5
5
|
export declare const configureUpdateTokenOwnership: (unchainedApi: UnchainedCore) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/plugins",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.4",
|
|
4
4
|
"main": "lib/plugins-index.js",
|
|
5
5
|
"types": "lib/plugins-index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -76,23 +76,23 @@
|
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/node": "^18.11.18",
|
|
79
|
-
"@unchainedshop/api": "^2.0.0-rc.
|
|
79
|
+
"@unchainedshop/api": "^2.0.0-rc.4",
|
|
80
80
|
"@unchainedshop/client-oauth2": "^4.3.3",
|
|
81
|
-
"@unchainedshop/core-delivery": "^2.0.0-rc.
|
|
82
|
-
"@unchainedshop/core-enrollments": "^2.0.0-rc.
|
|
83
|
-
"@unchainedshop/core-filters": "^2.0.0-rc.
|
|
84
|
-
"@unchainedshop/core-messaging": "^2.0.0-rc.
|
|
85
|
-
"@unchainedshop/core-orders": "^2.0.0-rc.
|
|
86
|
-
"@unchainedshop/core-payment": "^2.0.0-rc.
|
|
87
|
-
"@unchainedshop/core-products": "^2.0.0-rc.
|
|
88
|
-
"@unchainedshop/core-quotations": "^2.0.0-rc.
|
|
89
|
-
"@unchainedshop/core-warehousing": "^2.0.0-rc.
|
|
90
|
-
"@unchainedshop/core-worker": "^2.0.0-rc.
|
|
91
|
-
"@unchainedshop/events": "^2.0.0-rc.
|
|
92
|
-
"@unchainedshop/file-upload": "^2.0.0-rc.
|
|
93
|
-
"@unchainedshop/logger": "^2.0.0-rc.
|
|
94
|
-
"@unchainedshop/types": "^2.0.0-rc.
|
|
95
|
-
"@unchainedshop/utils": "^2.0.0-rc.
|
|
81
|
+
"@unchainedshop/core-delivery": "^2.0.0-rc.4",
|
|
82
|
+
"@unchainedshop/core-enrollments": "^2.0.0-rc.4",
|
|
83
|
+
"@unchainedshop/core-filters": "^2.0.0-rc.4",
|
|
84
|
+
"@unchainedshop/core-messaging": "^2.0.0-rc.4",
|
|
85
|
+
"@unchainedshop/core-orders": "^2.0.0-rc.4",
|
|
86
|
+
"@unchainedshop/core-payment": "^2.0.0-rc.4",
|
|
87
|
+
"@unchainedshop/core-products": "^2.0.0-rc.4",
|
|
88
|
+
"@unchainedshop/core-quotations": "^2.0.0-rc.4",
|
|
89
|
+
"@unchainedshop/core-warehousing": "^2.0.0-rc.4",
|
|
90
|
+
"@unchainedshop/core-worker": "^2.0.0-rc.4",
|
|
91
|
+
"@unchainedshop/events": "^2.0.0-rc.4",
|
|
92
|
+
"@unchainedshop/file-upload": "^2.0.0-rc.4",
|
|
93
|
+
"@unchainedshop/logger": "^2.0.0-rc.4",
|
|
94
|
+
"@unchainedshop/types": "^2.0.0-rc.4",
|
|
95
|
+
"@unchainedshop/utils": "^2.0.0-rc.4",
|
|
96
96
|
"bluebird": "^3.7.2",
|
|
97
97
|
"event-iterator": "^2.0.0",
|
|
98
98
|
"express": "^4.18.2",
|
package/src/delivery/pick-mup.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
|
-
import { DeliveryProviderType, IDeliveryAdapter } from '@unchainedshop/types/delivery';
|
|
2
|
+
import { DeliveryProviderType, IDeliveryAdapter } from '@unchainedshop/types/delivery.js';
|
|
3
3
|
import { DeliveryAdapter, DeliveryDirector, DeliveryError } from '@unchainedshop/core-delivery';
|
|
4
4
|
|
|
5
5
|
const fetchPickMupLocations = async (key: string, idsFilter?: string) => {
|
package/src/delivery/post.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDeliveryAdapter } from '@unchainedshop/types/delivery';
|
|
1
|
+
import { IDeliveryAdapter } from '@unchainedshop/types/delivery.js';
|
|
2
2
|
import { DeliveryAdapter, DeliveryDirector, DeliveryProviderType } from '@unchainedshop/core-delivery';
|
|
3
3
|
|
|
4
4
|
const Post: IDeliveryAdapter = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDeliveryAdapter } from '@unchainedshop/types/delivery';
|
|
1
|
+
import { IDeliveryAdapter } from '@unchainedshop/types/delivery.js';
|
|
2
2
|
import { DeliveryAdapter, DeliveryDirector, DeliveryProviderType } from '@unchainedshop/core-delivery';
|
|
3
3
|
|
|
4
4
|
const SendMessage: IDeliveryAdapter = {
|
package/src/delivery/stores.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDeliveryAdapter } from '@unchainedshop/types/delivery';
|
|
1
|
+
import { IDeliveryAdapter } from '@unchainedshop/types/delivery.js';
|
|
2
2
|
import { DeliveryAdapter, DeliveryDirector, DeliveryProviderType } from '@unchainedshop/core-delivery';
|
|
3
3
|
|
|
4
4
|
const PickMup: IDeliveryAdapter = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEnrollmentAdapter } from '@unchainedshop/types/enrollments';
|
|
1
|
+
import { IEnrollmentAdapter } from '@unchainedshop/types/enrollments.js';
|
|
2
2
|
import { EnrollmentDirector, EnrollmentAdapter } from '@unchainedshop/core-enrollments';
|
|
3
3
|
|
|
4
4
|
const rangeMatcher = (date = new Date()) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { EmitAdapter } from '@unchainedshop/types/events';
|
|
2
|
+
import { EmitAdapter } from '@unchainedshop/types/events.js';
|
|
3
3
|
import { setEmitAdapter } from '@unchainedshop/events';
|
|
4
4
|
|
|
5
5
|
const NodeEventEmitter = (): EmitAdapter => {
|
package/src/events/redis.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import redis from 'redis';
|
|
2
|
-
import { EmitAdapter } from '@unchainedshop/types/events';
|
|
2
|
+
import { EmitAdapter } from '@unchainedshop/types/events.js';
|
|
3
3
|
import { setEmitAdapter } from '@unchainedshop/events';
|
|
4
4
|
|
|
5
5
|
const { REDIS_PORT = 6379, REDIS_HOST = '127.0.0.1' } = process.env;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
|
-
import { IFileAdapter, UploadFileData } from '@unchainedshop/types/files';
|
|
2
|
+
import { IFileAdapter, UploadFileData } from '@unchainedshop/types/files.js';
|
|
3
3
|
import { FileAdapter, FileDirector, buildHashedFilename } from '@unchainedshop/file-upload';
|
|
4
4
|
import mimeType from 'mime-types';
|
|
5
5
|
import { URL } from 'url';
|
|
6
6
|
import { Readable, pipeline as rawPipeline } from 'stream';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
8
|
import { ReadableStream } from 'node:stream/web';
|
|
9
|
-
import sign from './sign';
|
|
9
|
+
import sign from './sign.js';
|
|
10
10
|
|
|
11
11
|
const pipeline = promisify(rawPipeline);
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import { log, LogLevel } from '@unchainedshop/logger';
|
|
|
2
2
|
import { buildHashedFilename } from '@unchainedshop/file-upload';
|
|
3
3
|
import { pipeline as rawPipeline } from 'stream';
|
|
4
4
|
import { promisify } from 'util';
|
|
5
|
-
import sign from './sign';
|
|
5
|
+
import sign from './sign.js';
|
|
6
6
|
|
|
7
7
|
const pipeline = promisify(rawPipeline);
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFileAdapter, UploadFileData } from '@unchainedshop/types/files';
|
|
1
|
+
import { IFileAdapter, UploadFileData } from '@unchainedshop/types/files.js';
|
|
2
2
|
import { FileAdapter, FileDirector, buildHashedFilename } from '@unchainedshop/file-upload';
|
|
3
3
|
|
|
4
4
|
import https from 'https';
|
|
@@ -6,7 +6,7 @@ import http, { OutgoingHttpHeaders } from 'http';
|
|
|
6
6
|
import { log, LogLevel } from '@unchainedshop/logger';
|
|
7
7
|
import mimeType from 'mime-types';
|
|
8
8
|
import Minio from 'minio';
|
|
9
|
-
import AssumeRoleProvider from 'minio/dist/main/AssumeRoleProvider';
|
|
9
|
+
import AssumeRoleProvider from 'minio/dist/main/AssumeRoleProvider.js';
|
|
10
10
|
import { Readable } from 'stream';
|
|
11
11
|
import { URL } from 'url';
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FilterDirector, FilterAdapter } from '@unchainedshop/core-filters';
|
|
2
|
-
import { IFilterAdapter } from '@unchainedshop/types/filters';
|
|
3
|
-
import { Query } from '@unchainedshop/types/common';
|
|
2
|
+
import { IFilterAdapter } from '@unchainedshop/types/filters.js';
|
|
3
|
+
import { Query } from '@unchainedshop/types/common.js';
|
|
4
4
|
|
|
5
5
|
const { AMAZON_DOCUMENTDB_COMPAT_MODE } = process.env;
|
|
6
6
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
|
-
import { Context } from '@unchainedshop/types/api';
|
|
3
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
2
|
+
import { Context } from '@unchainedshop/types/api.js';
|
|
3
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
4
4
|
import { EnrollmentStatus } from '@unchainedshop/core-enrollments';
|
|
5
5
|
import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core-payment';
|
|
6
6
|
import { createLogger } from '@unchainedshop/logger';
|
|
7
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
8
|
-
import { AppleTransactionsModule } from './module/configureAppleTransactionsModule';
|
|
7
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
8
|
+
import { AppleTransactionsModule } from './module/configureAppleTransactionsModule.js';
|
|
9
9
|
|
|
10
10
|
const logger = createLogger('unchained:core-payment:iap');
|
|
11
11
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './adapter';
|
|
2
|
-
export * from './module/configureAppleTransactionsModule';
|
|
1
|
+
export * from './adapter.js';
|
|
2
|
+
export * from './module/configureAppleTransactionsModule.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Db } from '@unchainedshop/types/common';
|
|
2
|
-
import { AppleTransaction, AppleTransactionsCollection } from '../db/AppleTransactionsCollection';
|
|
1
|
+
import { Db } from '@unchainedshop/types/common.js';
|
|
2
|
+
import { AppleTransaction, AppleTransactionsCollection } from '../db/AppleTransactionsCollection.js';
|
|
3
3
|
|
|
4
4
|
export interface AppleTransactionsModule {
|
|
5
5
|
findTransactionById: (transactionIdentifier: string) => Promise<AppleTransaction>;
|
package/src/payment/braintree.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentDirector, PaymentAdapter, PaymentError } from '@unchainedshop/core-payment';
|
|
3
3
|
import { createLogger } from '@unchainedshop/logger';
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import CryptopayPlugin from './plugin';
|
|
1
|
+
import CryptopayPlugin from './plugin.js';
|
|
2
2
|
|
|
3
|
-
export * from './middleware';
|
|
4
|
-
export * from './module/configureCryptopayModule';
|
|
3
|
+
export * from './middleware.js';
|
|
4
|
+
export * from './module/configureCryptopayModule.js';
|
|
5
5
|
|
|
6
6
|
export default CryptopayPlugin;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
|
-
import { Context } from '@unchainedshop/types/api';
|
|
2
|
+
import { Context } from '@unchainedshop/types/api.js';
|
|
3
3
|
|
|
4
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
4
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
5
5
|
import { OrderStatus } from '@unchainedshop/core-orders';
|
|
6
|
-
import { ProductPriceRate } from '@unchainedshop/types/products.pricing';
|
|
7
|
-
import type { CryptopayModule } from './module/configureCryptopayModule';
|
|
6
|
+
import { ProductPriceRate } from '@unchainedshop/types/products.pricing.js';
|
|
7
|
+
import type { CryptopayModule } from './module/configureCryptopayModule.js';
|
|
8
8
|
|
|
9
9
|
const { CRYPTOPAY_SECRET, CRYPTOPAY_MAX_RATE_AGE } = process.env;
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Db } from '@unchainedshop/types/common';
|
|
1
|
+
import { Db } from '@unchainedshop/types/common.js';
|
|
2
2
|
import { Decimal128 } from 'mongodb';
|
|
3
|
-
import { CryptopayTransaction, CryptopayTransactionsCollection } from '../db/CryptopayTransactions';
|
|
3
|
+
import { CryptopayTransaction, CryptopayTransactionsCollection } from '../db/CryptopayTransactions.js';
|
|
4
4
|
|
|
5
5
|
export interface CryptopayModule {
|
|
6
6
|
getWalletAddress: (addressId: string) => Promise<CryptopayTransaction>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core-payment';
|
|
3
3
|
import { ethers } from 'ethers';
|
|
4
|
-
import BIP32Factory from 'bip32';
|
|
4
|
+
import { BIP32Factory } from 'bip32';
|
|
5
5
|
import * as ecc from 'tiny-secp256k1';
|
|
6
6
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
7
7
|
import { createLogger } from '@unchainedshop/logger';
|
|
8
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
8
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
9
9
|
import { OrderPricingSheet } from '@unchainedshop/core-orders';
|
|
10
|
-
import { CryptopayModule } from './module/configureCryptopayModule';
|
|
10
|
+
import { CryptopayModule } from './module/configureCryptopayModule.js';
|
|
11
11
|
|
|
12
12
|
const logger = createLogger('unchained:core-payment:cryptopay');
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// https://api-reference.datatrans.ch/#operation/Authorize
|
|
2
2
|
|
|
3
|
-
import type { FetchDatatransFn, AuthorizeRequestPayload, AuthorizeResponse } from './types';
|
|
3
|
+
import type { FetchDatatransFn, AuthorizeRequestPayload, AuthorizeResponse } from './types.js';
|
|
4
4
|
|
|
5
5
|
export default async function authorize({
|
|
6
6
|
...payload
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import makeFetcher from './makeFetcher';
|
|
2
|
-
import status from './status';
|
|
3
|
-
import init from './init';
|
|
4
|
-
import secureFields from './secureFields';
|
|
5
|
-
import authorize from './authorize';
|
|
6
|
-
import validate from './validate';
|
|
7
|
-
import settle from './settle';
|
|
8
|
-
import cancel from './cancel';
|
|
9
|
-
import authorizeAuthenticated from './authorizeAuthenticated';
|
|
1
|
+
import makeFetcher from './makeFetcher.js';
|
|
2
|
+
import status from './status.js';
|
|
3
|
+
import init from './init.js';
|
|
4
|
+
import secureFields from './secureFields.js';
|
|
5
|
+
import authorize from './authorize.js';
|
|
6
|
+
import validate from './validate.js';
|
|
7
|
+
import settle from './settle.js';
|
|
8
|
+
import cancel from './cancel.js';
|
|
9
|
+
import authorizeAuthenticated from './authorizeAuthenticated.js';
|
|
10
10
|
|
|
11
11
|
export default function createDatatransAPI(endpoint: string, merchantId: string, secret: string) {
|
|
12
12
|
const fetchDatatrans = makeFetcher(endpoint, merchantId, secret);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// https://api-reference.datatrans.ch/#operation/init
|
|
2
|
-
import getPaths from '../getPaths';
|
|
2
|
+
import getPaths from '../getPaths.js';
|
|
3
3
|
|
|
4
|
-
import type { FetchDatatransFn, InitRequestPayload, InitResponse } from './types';
|
|
4
|
+
import type { FetchDatatransFn, InitRequestPayload, InitResponse } from './types.js';
|
|
5
5
|
|
|
6
6
|
const defaultRedirect = getPaths();
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// https://api-reference.datatrans.ch/#operation/init
|
|
2
|
-
import getPaths from '../getPaths';
|
|
2
|
+
import getPaths from '../getPaths.js';
|
|
3
3
|
|
|
4
|
-
import type { FetchDatatransFn, SecureFieldsRequestPayload, SecureFieldsResponse } from './types';
|
|
4
|
+
import type { FetchDatatransFn, SecureFieldsRequestPayload, SecureFieldsResponse } from './types.js';
|
|
5
5
|
|
|
6
6
|
const defaultRedirect = getPaths();
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FetchDatatransFn, StatusRequestPayload, StatusResponse } from './types';
|
|
1
|
+
import type { FetchDatatransFn, StatusRequestPayload, StatusResponse } from './types.js';
|
|
2
2
|
|
|
3
3
|
export default async function status({ transactionId }: StatusRequestPayload): Promise<StatusResponse> {
|
|
4
4
|
const { fetchDatatrans }: { fetchDatatrans: FetchDatatransFn } = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FetchDatatransFn, ValidateRequestPayload, ValidateResponse } from './types';
|
|
1
|
+
import type { FetchDatatransFn, ValidateRequestPayload, ValidateResponse } from './types.js';
|
|
2
2
|
|
|
3
3
|
export default async function validate(payload: ValidateRequestPayload): Promise<ValidateResponse> {
|
|
4
4
|
const { fetchDatatrans }: { fetchDatatrans: FetchDatatransFn } = this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentAdapter, PaymentError, PaymentDirector } from '@unchainedshop/core-payment';
|
|
3
3
|
import { createLogger } from '@unchainedshop/logger';
|
|
4
|
-
import createDatatransAPI from './api';
|
|
4
|
+
import createDatatransAPI from './api/index.js';
|
|
5
5
|
import type {
|
|
6
6
|
AuthorizeAuthenticatedResponseSuccess,
|
|
7
7
|
AuthorizeResponseSuccess,
|
|
@@ -9,11 +9,11 @@ import type {
|
|
|
9
9
|
ResponseError,
|
|
10
10
|
StatusResponseSuccess,
|
|
11
11
|
ValidateResponseSuccess,
|
|
12
|
-
} from './api/types';
|
|
13
|
-
import parseRegistrationData from './parseRegistrationData';
|
|
14
|
-
import roundedAmountFromOrder from './roundedAmountFromOrder';
|
|
12
|
+
} from './api/types.js';
|
|
13
|
+
import parseRegistrationData from './parseRegistrationData.js';
|
|
14
|
+
import roundedAmountFromOrder from './roundedAmountFromOrder.js';
|
|
15
15
|
|
|
16
|
-
export * from './middleware';
|
|
16
|
+
export * from './middleware.js';
|
|
17
17
|
|
|
18
18
|
const logger = createLogger('unchained:core-payment:datatrans');
|
|
19
19
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
|
-
import { Context } from '@unchainedshop/types/api';
|
|
3
|
-
import generateSignature, { Security } from './generateSignature';
|
|
2
|
+
import { Context } from '@unchainedshop/types/api.js';
|
|
3
|
+
import generateSignature, { Security } from './generateSignature.js';
|
|
4
4
|
|
|
5
|
-
import type { StatusResponseSuccess } from './api/types';
|
|
5
|
+
import type { StatusResponseSuccess } from './api/types.js';
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
DATATRANS_SIGN_KEY,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import splitProperties from './splitProperties';
|
|
2
|
-
import type { StatusResponseSuccess } from './api/types';
|
|
1
|
+
import splitProperties from './splitProperties.js';
|
|
2
|
+
import type { StatusResponseSuccess } from './api/types.js';
|
|
3
3
|
|
|
4
4
|
export default function parseRegistrationData(transaction: StatusResponseSuccess) {
|
|
5
5
|
const parsed = Object.entries(transaction).reduce((acc, [objectKey, payload]) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
2
|
-
import { Order } from '@unchainedshop/types/orders';
|
|
1
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
2
|
+
import { Order } from '@unchainedshop/types/orders.js';
|
|
3
3
|
|
|
4
4
|
const roundedAmountFromOrder = (
|
|
5
5
|
order: Order,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentDirector, PaymentAdapter, PaymentProviderType } from '@unchainedshop/core-payment';
|
|
3
3
|
|
|
4
4
|
const InvoicePrepaid: IPaymentAdapter = {
|
package/src/payment/invoice.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentDirector, PaymentAdapter, PaymentProviderType } from '@unchainedshop/core-payment';
|
|
3
3
|
|
|
4
4
|
const Invoice: IPaymentAdapter = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPaymentAdapter } from '@unchainedshop/types/payments';
|
|
1
|
+
import { IPaymentAdapter } from '@unchainedshop/types/payments.js';
|
|
2
2
|
import { PaymentDirector, PaymentAdapter, PaymentError } from '@unchainedshop/core-payment';
|
|
3
3
|
import { createLogger } from '@unchainedshop/logger';
|
|
4
4
|
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IPaymentActions,
|
|
3
3
|
IPaymentAdapter,
|
|
4
4
|
PaymentChargeActionResult,
|
|
5
|
-
} from '@unchainedshop/types/payments';
|
|
5
|
+
} from '@unchainedshop/types/payments.js';
|
|
6
6
|
import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core-payment';
|
|
7
7
|
import { createLogger } from '@unchainedshop/logger';
|
|
8
8
|
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
getTransaction,
|
|
18
18
|
refundTransaction,
|
|
19
19
|
voidTransaction,
|
|
20
|
-
} from './api';
|
|
21
|
-
import { orderIsPaid } from './utils';
|
|
22
|
-
import { CompletionModes, IntegrationModes, SignResponse } from './types';
|
|
20
|
+
} from './api.js';
|
|
21
|
+
import { orderIsPaid } from './utils.js';
|
|
22
|
+
import { CompletionModes, IntegrationModes, SignResponse } from './types.js';
|
|
23
23
|
|
|
24
|
-
export * from './middleware';
|
|
24
|
+
export * from './middleware.js';
|
|
25
25
|
|
|
26
26
|
const { PostFinanceCheckout } = pf;
|
|
27
27
|
|