@unchainedshop/plugins 2.11.5 → 2.12.0
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/accounts/google-oauth.d.ts +1 -0
- package/lib/accounts/google-oauth.d.ts.map +1 -0
- package/lib/accounts/linkedin-oauth.d.ts +1 -0
- package/lib/accounts/linkedin-oauth.d.ts.map +1 -0
- package/lib/delivery/pick-mup.d.ts +1 -1
- package/lib/delivery/pick-mup.d.ts.map +1 -0
- package/lib/delivery/post.d.ts +1 -0
- package/lib/delivery/post.d.ts.map +1 -0
- package/lib/delivery/send-message.d.ts +1 -0
- package/lib/delivery/send-message.d.ts.map +1 -0
- package/lib/delivery/stores.d.ts +1 -0
- package/lib/delivery/stores.d.ts.map +1 -0
- package/lib/enrollments/licensed.d.ts +1 -0
- package/lib/enrollments/licensed.d.ts.map +1 -0
- package/lib/events/node-event-emitter.d.ts +1 -0
- package/lib/events/node-event-emitter.d.ts.map +1 -0
- package/lib/events/redis.d.ts +1 -0
- package/lib/events/redis.d.ts.map +1 -0
- package/lib/files/gridfs/gridfs-adapter.d.ts +1 -1
- package/lib/files/gridfs/gridfs-adapter.d.ts.map +1 -0
- package/lib/files/gridfs/gridfs-webhook.d.ts +1 -0
- package/lib/files/gridfs/gridfs-webhook.d.ts.map +1 -0
- package/lib/files/gridfs/index.d.ts +1 -0
- package/lib/files/gridfs/index.d.ts.map +1 -0
- package/lib/files/gridfs/sign.d.ts +1 -0
- package/lib/files/gridfs/sign.d.ts.map +1 -0
- package/lib/files/minio/minio-adapter.d.ts +1 -0
- package/lib/files/minio/minio-adapter.d.ts.map +1 -0
- package/lib/files/minio/minio-webhook.d.ts +1 -0
- package/lib/files/minio/minio-webhook.d.ts.map +1 -0
- package/lib/filters/local-search.d.ts +1 -0
- package/lib/filters/local-search.d.ts.map +1 -0
- package/lib/filters/strict-equal.d.ts +1 -0
- package/lib/filters/strict-equal.d.ts.map +1 -0
- package/lib/payment/apple-iap/adapter.d.ts +1 -1
- package/lib/payment/apple-iap/adapter.d.ts.map +1 -0
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +1 -0
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts.map +1 -0
- package/lib/payment/apple-iap/index.d.ts +1 -0
- package/lib/payment/apple-iap/index.d.ts.map +1 -0
- package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts +1 -0
- package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts.map +1 -0
- package/lib/payment/braintree.d.ts +1 -0
- package/lib/payment/braintree.d.ts.map +1 -0
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -0
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts.map +1 -0
- package/lib/payment/cryptopay/index.d.ts +1 -0
- package/lib/payment/cryptopay/index.d.ts.map +1 -0
- package/lib/payment/cryptopay/middleware.d.ts +1 -0
- package/lib/payment/cryptopay/middleware.d.ts.map +1 -0
- package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts +1 -0
- package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts.map +1 -0
- package/lib/payment/cryptopay/plugin.d.ts +1 -0
- package/lib/payment/cryptopay/plugin.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/authorize.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/authorize.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/cancel.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/cancel.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/index.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/index.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/init.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/init.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts +1 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/secureFields.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/secureFields.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/settle.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/settle.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/status.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/status.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/api/validate.d.ts +1 -0
- package/lib/payment/datatrans-v2/api/validate.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/generateSignature.d.ts +2 -1
- package/lib/payment/datatrans-v2/generateSignature.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/getPaths.d.ts +1 -0
- package/lib/payment/datatrans-v2/getPaths.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/index.d.ts +1 -0
- package/lib/payment/datatrans-v2/index.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/index.js +1 -1
- package/lib/payment/datatrans-v2/index.js.map +1 -1
- package/lib/payment/datatrans-v2/middleware.d.ts +1 -0
- package/lib/payment/datatrans-v2/middleware.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts +1 -0
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +1 -0
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts.map +1 -0
- package/lib/payment/datatrans-v2/splitProperties.d.ts +1 -0
- package/lib/payment/datatrans-v2/splitProperties.d.ts.map +1 -0
- package/lib/payment/invoice-prepaid.d.ts +1 -0
- package/lib/payment/invoice-prepaid.d.ts.map +1 -0
- package/lib/payment/invoice.d.ts +1 -0
- package/lib/payment/invoice.d.ts.map +1 -0
- package/lib/payment/paypal-checkout.d.ts +1 -0
- package/lib/payment/paypal-checkout.d.ts.map +1 -0
- package/lib/payment/payrexx/api/index.d.ts +1 -0
- package/lib/payment/payrexx/api/index.d.ts.map +1 -0
- package/lib/payment/payrexx/api/makeFetcher.d.ts +2 -2
- package/lib/payment/payrexx/api/makeFetcher.d.ts.map +1 -0
- package/lib/payment/payrexx/index.d.ts +1 -0
- package/lib/payment/payrexx/index.d.ts.map +1 -0
- package/lib/payment/payrexx/middleware.d.ts +1 -0
- package/lib/payment/payrexx/middleware.d.ts.map +1 -0
- package/lib/payment/payrexx/payrexx.d.ts +1 -0
- package/lib/payment/payrexx/payrexx.d.ts.map +1 -0
- package/lib/payment/postfinance-checkout/api.d.ts +1 -0
- package/lib/payment/postfinance-checkout/api.d.ts.map +1 -0
- package/lib/payment/postfinance-checkout/index.d.ts +1 -0
- package/lib/payment/postfinance-checkout/index.d.ts.map +1 -0
- package/lib/payment/postfinance-checkout/middleware.d.ts +1 -0
- package/lib/payment/postfinance-checkout/middleware.d.ts.map +1 -0
- package/lib/payment/postfinance-checkout/types.d.ts +1 -0
- package/lib/payment/postfinance-checkout/types.d.ts.map +1 -0
- package/lib/payment/postfinance-checkout/utils.d.ts +1 -0
- package/lib/payment/postfinance-checkout/utils.d.ts.map +1 -0
- package/lib/payment/saferpay/adapter.d.ts +1 -0
- package/lib/payment/saferpay/adapter.d.ts.map +1 -0
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts +1 -0
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts.map +1 -0
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts +1 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts.map +1 -0
- package/lib/payment/saferpay/api/index.d.ts +1 -0
- package/lib/payment/saferpay/api/index.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts +1 -0
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts +1 -0
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts +1 -0
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/Request.d.ts +1 -0
- package/lib/payment/saferpay/api/models/Request.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/Response.d.ts +1 -0
- package/lib/payment/saferpay/api/models/Response.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/Transaction.d.ts +1 -0
- package/lib/payment/saferpay/api/models/Transaction.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts +1 -0
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts.map +1 -0
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts +1 -0
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts.map +1 -0
- package/lib/payment/saferpay/buildSignature.d.ts +1 -0
- package/lib/payment/saferpay/buildSignature.d.ts.map +1 -0
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts +1 -0
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts.map +1 -0
- package/lib/payment/saferpay/getReturnPath.d.ts +1 -0
- package/lib/payment/saferpay/getReturnPath.d.ts.map +1 -0
- package/lib/payment/saferpay/index.d.ts +1 -0
- package/lib/payment/saferpay/index.d.ts.map +1 -0
- package/lib/payment/saferpay/middleware.d.ts +1 -0
- package/lib/payment/saferpay/middleware.d.ts.map +1 -0
- package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.d.ts +1 -0
- package/lib/payment/saferpay/module/configureSaferpayTransactionsModule.d.ts.map +1 -0
- package/lib/payment/stripe/index.d.ts +1 -0
- package/lib/payment/stripe/index.d.ts.map +1 -0
- package/lib/payment/stripe/index.js +16 -6
- package/lib/payment/stripe/index.js.map +1 -1
- package/lib/payment/stripe/middleware.d.ts +1 -0
- package/lib/payment/stripe/middleware.d.ts.map +1 -0
- package/lib/payment/stripe/stripe.d.ts +5 -1
- package/lib/payment/stripe/stripe.d.ts.map +1 -0
- package/lib/payment/stripe/stripe.js +5 -11
- package/lib/payment/stripe/stripe.js.map +1 -1
- package/lib/plugins-index.d.ts +1 -0
- package/lib/plugins-index.d.ts.map +1 -0
- package/lib/pricing/delivery-swiss-tax.d.ts +1 -0
- package/lib/pricing/delivery-swiss-tax.d.ts.map +1 -0
- package/lib/pricing/discount-100-off.d.ts +1 -0
- package/lib/pricing/discount-100-off.d.ts.map +1 -0
- package/lib/pricing/discount-half-price-manual.d.ts +1 -0
- package/lib/pricing/discount-half-price-manual.d.ts.map +1 -0
- package/lib/pricing/discount-half-price.d.ts +1 -0
- package/lib/pricing/discount-half-price.d.ts.map +1 -0
- package/lib/pricing/free-delivery.d.ts +1 -0
- package/lib/pricing/free-delivery.d.ts.map +1 -0
- package/lib/pricing/free-payment.d.ts +1 -0
- package/lib/pricing/free-payment.d.ts.map +1 -0
- package/lib/pricing/order-delivery.d.ts +1 -0
- package/lib/pricing/order-delivery.d.ts.map +1 -0
- package/lib/pricing/order-discount.d.ts +1 -0
- package/lib/pricing/order-discount.d.ts.map +1 -0
- package/lib/pricing/order-items-discount.d.ts +1 -0
- package/lib/pricing/order-items-discount.d.ts.map +1 -0
- package/lib/pricing/order-items.d.ts +1 -0
- package/lib/pricing/order-items.d.ts.map +1 -0
- package/lib/pricing/order-payment.d.ts +1 -0
- package/lib/pricing/order-payment.d.ts.map +1 -0
- package/lib/pricing/order-round.d.ts +1 -0
- package/lib/pricing/order-round.d.ts.map +1 -0
- package/lib/pricing/product-catalog-price.d.ts +1 -0
- package/lib/pricing/product-catalog-price.d.ts.map +1 -0
- package/lib/pricing/product-discount.d.ts +1 -0
- package/lib/pricing/product-discount.d.ts.map +1 -0
- package/lib/pricing/product-price-rateconversion.d.ts +1 -0
- package/lib/pricing/product-price-rateconversion.d.ts.map +1 -0
- package/lib/pricing/product-round.d.ts +1 -0
- package/lib/pricing/product-round.d.ts.map +1 -0
- package/lib/pricing/product-swiss-tax.d.ts +1 -0
- package/lib/pricing/product-swiss-tax.d.ts.map +1 -0
- package/lib/pricing/tax/ch.d.ts +1 -0
- package/lib/pricing/tax/ch.d.ts.map +1 -0
- package/lib/quotations/manual.d.ts +1 -0
- package/lib/quotations/manual.d.ts.map +1 -0
- package/lib/warehousing/eth-minter.d.ts +1 -0
- package/lib/warehousing/eth-minter.d.ts.map +1 -0
- package/lib/warehousing/google-sheets.d.ts +1 -0
- package/lib/warehousing/google-sheets.d.ts.map +1 -0
- package/lib/warehousing/store.d.ts +1 -0
- package/lib/warehousing/store.d.ts.map +1 -0
- package/lib/worker/bulk-import.d.ts +1 -0
- package/lib/worker/bulk-import.d.ts.map +1 -0
- package/lib/worker/email.d.ts +1 -0
- package/lib/worker/email.d.ts.map +1 -0
- package/lib/worker/enrollment-order-generator.d.ts +1 -0
- package/lib/worker/enrollment-order-generator.d.ts.map +1 -0
- package/lib/worker/error-notifications.d.ts +1 -0
- package/lib/worker/error-notifications.d.ts.map +1 -0
- package/lib/worker/export-token.d.ts +1 -0
- package/lib/worker/export-token.d.ts.map +1 -0
- package/lib/worker/external.d.ts +1 -0
- package/lib/worker/external.d.ts.map +1 -0
- package/lib/worker/heartbeat.d.ts +1 -0
- package/lib/worker/heartbeat.d.ts.map +1 -0
- package/lib/worker/http-request.d.ts +1 -1
- package/lib/worker/http-request.d.ts.map +1 -0
- package/lib/worker/message.d.ts +1 -0
- package/lib/worker/message.d.ts.map +1 -0
- package/lib/worker/push-notification.d.ts +1 -0
- package/lib/worker/push-notification.d.ts.map +1 -0
- package/lib/worker/sms.d.ts +1 -0
- package/lib/worker/sms.d.ts.map +1 -0
- package/lib/worker/update-coinbase-rates.d.ts +1 -1
- package/lib/worker/update-coinbase-rates.d.ts.map +1 -0
- package/lib/worker/update-ecb-rates.d.ts +1 -1
- package/lib/worker/update-ecb-rates.d.ts.map +1 -0
- package/lib/worker/update-token-ownership.d.ts +1 -0
- package/lib/worker/update-token-ownership.d.ts.map +1 -0
- package/lib/worker/zombie-killer.d.ts +1 -0
- package/lib/worker/zombie-killer.d.ts.map +1 -0
- package/package.json +19 -19
- package/src/payment/datatrans-v2/index.ts +1 -1
- package/src/payment/stripe/index.ts +17 -8
- package/src/payment/stripe/readme.md +5 -1
- package/src/payment/stripe/stripe.ts +11 -15
- package/tsconfig.json +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-swiss-tax.d.ts","sourceRoot":"","sources":["../../src/pricing/product-swiss-tax.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EAEvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAGvD,eAAO,MAAM,UAAU,YAAa;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,WAYtE,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;sBAe1C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,sBAuD7B,CAAC"}
|
package/lib/pricing/tax/ch.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ch.d.ts","sourceRoot":"","sources":["../../../src/pricing/tax/ch.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,MAAM,EACN;IACE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,IAAI,KAAK,MAAM,CAAC;CACxC,CA6BF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../src/quotations/manual.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eth-minter.d.ts","sourceRoot":"","sources":["../../src/warehousing/eth-minter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-sheets.d.ts","sourceRoot":"","sources":["../../src/warehousing/google-sheets.ts"],"names":[],"mappings":"AAOA,OAAO,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/warehousing/store.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-import.d.ts","sourceRoot":"","sources":["../../src/worker/bulk-import.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAqDhE,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0DzE,CAAC"}
|
package/lib/worker/email.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/worker/email.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,6BAA6B,eAEzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrollment-order-generator.d.ts","sourceRoot":"","sources":["../../src/worker/enrollment-order-generator.ts"],"names":[],"mappings":"AAsJA,eAAO,MAAM,oCAAoC,YAQhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-notifications.d.ts","sourceRoot":"","sources":["../../src/worker/error-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,gCAAgC,CAAC;AAI5E,KAAK,GAAG,GAAG;IACT,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,GAAG,EAAE,MAAM,CAwD1D,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
|
|
@@ -3,3 +3,4 @@ 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;
|
|
6
|
+
//# sourceMappingURL=export-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-token.d.ts","sourceRoot":"","sources":["../../src/worker/export-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAYxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAkB,aAAa,SAU/D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/lib/worker/external.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/worker/external.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGhE,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAY3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../src/worker/heartbeat.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference lib="dom" />
|
|
2
1
|
import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
|
|
3
2
|
declare const HttpRequestWorkerPlugin: IWorkerAdapter<{
|
|
4
3
|
url?: string;
|
|
@@ -7,3 +6,4 @@ declare const HttpRequestWorkerPlugin: IWorkerAdapter<{
|
|
|
7
6
|
method: 'POST' | 'GET';
|
|
8
7
|
}, any>;
|
|
9
8
|
export default HttpRequestWorkerPlugin;
|
|
9
|
+
//# sourceMappingURL=http-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-request.d.ts","sourceRoot":"","sources":["../../src/worker/http-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAsBhE,QAAA,MAAM,uBAAuB,EAAE,cAAc,CAC3C;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAA;CAAE,EACnE,GAAG,CAgDJ,CAAC;AAIF,eAAe,uBAAuB,CAAC"}
|
package/lib/worker/message.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/worker/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAKtE,eAAO,MAAM,eAAe,0BAA2C,CAAC;AAExE,eAAO,MAAM,aAAa,EAAE,cAAc,CACxC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EACpD;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;CAAE,CA+CxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-notification.d.ts","sourceRoot":"","sources":["../../src/worker/push-notification.ts"],"names":[],"mappings":""}
|
package/lib/worker/sms.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms.d.ts","sourceRoot":"","sources":["../../src/worker/sms.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-coinbase-rates.d.ts","sourceRoot":"","sources":["../../src/worker/update-coinbase-rates.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-ecb-rates.d.ts","sourceRoot":"","sources":["../../src/worker/update-ecb-rates.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-token-ownership.d.ts","sourceRoot":"","sources":["../../src/worker/update-token-ownership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAMhE,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAY3D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,IAAI,EAAE,GAAG,CAyCnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zombie-killer.d.ts","sourceRoot":"","sources":["../../src/worker/zombie-killer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAMhE,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAC7C,KAAK,EACL;IACE,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CA0HF,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/plugins",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"main": "lib/plugins-index.js",
|
|
5
5
|
"types": "lib/plugins-index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -85,24 +85,24 @@
|
|
|
85
85
|
"web-push": "^3.6.3"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@redis/client": "^1.5.
|
|
88
|
+
"@redis/client": "^1.5.17",
|
|
89
89
|
"@types/node": "^20.14.9",
|
|
90
|
-
"@unchainedshop/api": "^2.
|
|
91
|
-
"@unchainedshop/core-delivery": "^2.
|
|
92
|
-
"@unchainedshop/core-enrollments": "^2.
|
|
93
|
-
"@unchainedshop/core-filters": "^2.
|
|
94
|
-
"@unchainedshop/core-messaging": "^2.
|
|
95
|
-
"@unchainedshop/core-orders": "^2.
|
|
96
|
-
"@unchainedshop/core-payment": "^2.
|
|
97
|
-
"@unchainedshop/core-products": "^2.
|
|
98
|
-
"@unchainedshop/core-quotations": "^2.
|
|
99
|
-
"@unchainedshop/core-warehousing": "^2.
|
|
100
|
-
"@unchainedshop/core-worker": "^2.
|
|
101
|
-
"@unchainedshop/events": "^2.
|
|
102
|
-
"@unchainedshop/file-upload": "^2.
|
|
103
|
-
"@unchainedshop/logger": "^2.
|
|
104
|
-
"@unchainedshop/types": "^2.
|
|
105
|
-
"@unchainedshop/utils": "^2.
|
|
90
|
+
"@unchainedshop/api": "^2.12.0",
|
|
91
|
+
"@unchainedshop/core-delivery": "^2.12.0",
|
|
92
|
+
"@unchainedshop/core-enrollments": "^2.12.0",
|
|
93
|
+
"@unchainedshop/core-filters": "^2.12.0",
|
|
94
|
+
"@unchainedshop/core-messaging": "^2.12.0",
|
|
95
|
+
"@unchainedshop/core-orders": "^2.12.0",
|
|
96
|
+
"@unchainedshop/core-payment": "^2.12.0",
|
|
97
|
+
"@unchainedshop/core-products": "^2.12.0",
|
|
98
|
+
"@unchainedshop/core-quotations": "^2.12.0",
|
|
99
|
+
"@unchainedshop/core-warehousing": "^2.12.0",
|
|
100
|
+
"@unchainedshop/core-worker": "^2.12.0",
|
|
101
|
+
"@unchainedshop/events": "^2.12.0",
|
|
102
|
+
"@unchainedshop/file-upload": "^2.12.0",
|
|
103
|
+
"@unchainedshop/logger": "^2.12.0",
|
|
104
|
+
"@unchainedshop/types": "^2.12.0",
|
|
105
|
+
"@unchainedshop/utils": "^2.12.0",
|
|
106
106
|
"bluebird": "^3.7.2",
|
|
107
107
|
"event-iterator": "^2.0.0",
|
|
108
108
|
"express": "^4.19.2",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"postfinancecheckout": "^4.5.0",
|
|
117
117
|
"request": "^2.88.2",
|
|
118
118
|
"ts-jest": "^29.1.5",
|
|
119
|
-
"typescript": "^5.
|
|
119
|
+
"typescript": "^5.5.3",
|
|
120
120
|
"web-push": "^3.6.7",
|
|
121
121
|
"xml-js": "^1.6.11"
|
|
122
122
|
}
|
|
@@ -102,7 +102,7 @@ const Datatrans: IPaymentAdapter = {
|
|
|
102
102
|
.map((f) => f.trim());
|
|
103
103
|
|
|
104
104
|
const { amount: discountSum } = pricingForOrderPayment.total({
|
|
105
|
-
category: PaymentPricingRowCategory.
|
|
105
|
+
category: PaymentPricingRowCategory.Discount,
|
|
106
106
|
discountId: staticDiscountId,
|
|
107
107
|
});
|
|
108
108
|
const shareFactor = sharePercentage ? parseInt(sharePercentage, 10) / 100 : 1;
|
|
@@ -22,6 +22,18 @@ const Stripe: IPaymentAdapter = {
|
|
|
22
22
|
const { modules } = params.context;
|
|
23
23
|
|
|
24
24
|
const descriptorPrefix = params.config.find(({ key }) => key === 'descriptorPrefix')?.value;
|
|
25
|
+
|
|
26
|
+
const getUserData = async (forcedUserId) => {
|
|
27
|
+
const userId = forcedUserId || params.paymentContext?.userId;
|
|
28
|
+
const user = await modules.users.findUserById(userId);
|
|
29
|
+
const email = modules.users.primaryEmail(user)?.address;
|
|
30
|
+
const name = user.profile.displayName || user.username || email;
|
|
31
|
+
return {
|
|
32
|
+
email,
|
|
33
|
+
name,
|
|
34
|
+
userId,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
25
37
|
const adapterActions = {
|
|
26
38
|
...PaymentAdapter.actions(params),
|
|
27
39
|
|
|
@@ -71,18 +83,15 @@ const Stripe: IPaymentAdapter = {
|
|
|
71
83
|
|
|
72
84
|
if (orderPayment) {
|
|
73
85
|
const pricing = await modules.orders.pricingSheet(order);
|
|
86
|
+
const { userId, name, email } = await getUserData(order?.userId);
|
|
74
87
|
const paymentIntent = await createOrderPaymentIntent(
|
|
75
|
-
{ order, orderPayment, pricing, descriptorPrefix },
|
|
88
|
+
{ userId, name, email, order, orderPayment, pricing, descriptorPrefix },
|
|
76
89
|
transactionContext,
|
|
77
90
|
);
|
|
78
91
|
return paymentIntent.client_secret;
|
|
79
92
|
}
|
|
80
93
|
|
|
81
|
-
const userId = order?.userId
|
|
82
|
-
const user = await modules.users.findUserById(userId);
|
|
83
|
-
const email = modules.users.primaryEmail(user)?.address;
|
|
84
|
-
const name = user.profile.displayName || user.username || email;
|
|
85
|
-
|
|
94
|
+
const { userId, name, email } = await getUserData(order?.userId);
|
|
86
95
|
const paymentIntent = await createRegistrationIntent(
|
|
87
96
|
{ userId, name, email, paymentProviderId, descriptorPrefix },
|
|
88
97
|
transactionContext,
|
|
@@ -99,13 +108,13 @@ const Stripe: IPaymentAdapter = {
|
|
|
99
108
|
const orderPayment = await modules.orders.payments.findOrderPayment({
|
|
100
109
|
orderPaymentId: order.paymentId,
|
|
101
110
|
});
|
|
102
|
-
|
|
111
|
+
const { userId, name, email } = await getUserData(order?.userId);
|
|
103
112
|
const pricing = await modules.orders.pricingSheet(order);
|
|
104
113
|
|
|
105
114
|
const paymentIntentObject = paymentIntentId
|
|
106
115
|
? await stripe.paymentIntents.retrieve(paymentIntentId)
|
|
107
116
|
: await createOrderPaymentIntent(
|
|
108
|
-
{ orderPayment, order, pricing, descriptorPrefix },
|
|
117
|
+
{ userId, name, email, orderPayment, order, pricing, descriptorPrefix },
|
|
109
118
|
{
|
|
110
119
|
customer: paymentCredentials.meta?.customer,
|
|
111
120
|
confirm: true,
|
|
@@ -5,4 +5,8 @@ brew install stripe/stripe-cli/stripe
|
|
|
5
5
|
stripe login --api-key sk_....
|
|
6
6
|
stripe listen --forward-to http://localhost:4010/payment/stripe
|
|
7
7
|
stripe trigger payment_intent.succeeded
|
|
8
|
-
```
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Configure the Payment Statements:
|
|
11
|
+
|
|
12
|
+
Payment Provider configuration: `[{ key: "descriptorPrefix", value: "Book Shop" }]`
|
|
@@ -64,8 +64,8 @@ export const createRegistrationIntent = async (
|
|
|
64
64
|
},
|
|
65
65
|
options: Record<string, any> = {},
|
|
66
66
|
) => {
|
|
67
|
-
const description = `${descriptorPrefix || EMAIL_WEBSITE_NAME || 'Unchained'} ${userId}${email ? ` (#${email})` : ''}`;
|
|
68
67
|
const customer = options?.customer || (await upsertCustomer({ userId, name, email }));
|
|
68
|
+
const description = `${descriptorPrefix || EMAIL_WEBSITE_NAME || 'Unchained'} ${userId}${email ? ` (#${email})` : ''}`;
|
|
69
69
|
|
|
70
70
|
const setupIntent = await stripe.setupIntents.create({
|
|
71
71
|
description,
|
|
@@ -83,11 +83,17 @@ export const createRegistrationIntent = async (
|
|
|
83
83
|
|
|
84
84
|
export const createOrderPaymentIntent = async (
|
|
85
85
|
{
|
|
86
|
+
userId,
|
|
87
|
+
name,
|
|
88
|
+
email,
|
|
86
89
|
order,
|
|
87
90
|
orderPayment,
|
|
88
91
|
pricing,
|
|
89
92
|
descriptorPrefix,
|
|
90
93
|
}: {
|
|
94
|
+
userId: string;
|
|
95
|
+
name: string;
|
|
96
|
+
email: string;
|
|
91
97
|
order: Order;
|
|
92
98
|
orderPayment: OrderPayment;
|
|
93
99
|
pricing: IOrderPricingSheet;
|
|
@@ -96,20 +102,9 @@ export const createOrderPaymentIntent = async (
|
|
|
96
102
|
options: Record<string, any> = {},
|
|
97
103
|
) => {
|
|
98
104
|
const description = `${descriptorPrefix || EMAIL_WEBSITE_NAME || 'Unchained'} ${order._id}${order.orderNumber ? ` (#${order.orderNumber})` : ''}`;
|
|
99
|
-
|
|
100
|
-
const name =
|
|
101
|
-
[order.billingAddress?.firstName, order.billingAddress?.lastName].filter(Boolean).join(' ') ||
|
|
102
|
-
order.billingAddress?.company;
|
|
103
|
-
|
|
104
|
-
const customer =
|
|
105
|
-
options?.customer ||
|
|
106
|
-
(await upsertCustomer({
|
|
107
|
-
userId: order.userId,
|
|
108
|
-
name,
|
|
109
|
-
email: order.contact?.emailAddress,
|
|
110
|
-
}));
|
|
111
|
-
|
|
105
|
+
const customer = options?.customer || (await upsertCustomer({ userId, name, email }));
|
|
112
106
|
const { currency, amount } = pricing.total({ useNetPrice: false });
|
|
107
|
+
|
|
113
108
|
const paymentIntent = await stripe.paymentIntents.create({
|
|
114
109
|
amount: Math.round(amount),
|
|
115
110
|
currency: currency.toLowerCase(),
|
|
@@ -117,10 +112,11 @@ export const createOrderPaymentIntent = async (
|
|
|
117
112
|
statement_descriptor_suffix: `${order._id.substring(0, 4)}..${order._id.substring(order._id.length - 4)}`,
|
|
118
113
|
setup_future_usage: 'off_session', // Verify your integration in this guide by including this parameter
|
|
119
114
|
customer,
|
|
115
|
+
receipt_email: order.contact?.emailAddress,
|
|
120
116
|
metadata: {
|
|
121
|
-
userId: order.userId,
|
|
122
117
|
orderPaymentId: orderPayment._id,
|
|
123
118
|
orderId: order._id,
|
|
119
|
+
userId,
|
|
124
120
|
environment,
|
|
125
121
|
},
|
|
126
122
|
...options,
|