@unchainedshop/plugins 4.3.5 → 4.5.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/README.md +137 -0
- package/lib/delivery/post.d.ts +0 -1
- package/lib/delivery/post.js +0 -1
- package/lib/delivery/send-message.d.ts +0 -1
- package/lib/delivery/send-message.js +0 -1
- package/lib/delivery/stores.d.ts +0 -1
- package/lib/delivery/stores.js +0 -1
- package/lib/enrollments/licensed.d.ts +0 -1
- package/lib/enrollments/licensed.js +0 -1
- package/lib/events/aws-eventbridge.d.ts +0 -1
- package/lib/events/aws-eventbridge.js +0 -3
- package/lib/events/node-event-emitter.d.ts +0 -1
- package/lib/events/node-event-emitter.js +0 -1
- package/lib/events/redis.d.ts +0 -1
- package/lib/events/redis.js +0 -1
- package/lib/files/gridfs/adapter.d.ts +3 -4
- package/lib/files/gridfs/adapter.js +6 -6
- package/lib/files/gridfs/handler-express.d.ts +2 -3
- package/lib/files/gridfs/handler-express.js +6 -9
- package/lib/files/gridfs/handler-fastify.d.ts +1 -2
- package/lib/files/gridfs/handler-fastify.js +6 -9
- package/lib/files/gridfs/index.d.ts +2 -3
- package/lib/files/gridfs/index.js +2 -3
- package/lib/files/gridfs/module.d.ts +0 -1
- package/lib/files/gridfs/module.js +0 -4
- package/lib/files/gridfs/sign.d.ts +0 -1
- package/lib/files/gridfs/sign.js +0 -1
- package/lib/files/minio/handler-express.d.ts +0 -1
- package/lib/files/minio/handler-express.js +0 -1
- package/lib/files/minio/handler-fastify.d.ts +1 -2
- package/lib/files/minio/handler-fastify.js +2 -1
- package/lib/files/minio/index.d.ts +1 -2
- package/lib/files/minio/index.js +1 -5
- package/lib/filters/local-search.d.ts +1 -2
- package/lib/filters/local-search.js +8 -20
- package/lib/filters/strict-equal.d.ts +0 -1
- package/lib/filters/strict-equal.js +0 -1
- package/lib/payment/apple-iap/adapter.d.ts +0 -1
- package/lib/payment/apple-iap/adapter.js +3 -5
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +1 -2
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.js +2 -1
- package/lib/payment/apple-iap/fix-periods.d.ts +1 -2
- package/lib/payment/apple-iap/fix-periods.js +1 -1
- package/lib/payment/apple-iap/handler-express.d.ts +0 -1
- package/lib/payment/apple-iap/handler-express.js +2 -5
- package/lib/payment/apple-iap/handler-fastify.d.ts +1 -2
- package/lib/payment/apple-iap/handler-fastify.js +4 -5
- package/lib/payment/apple-iap/index.d.ts +2 -3
- package/lib/payment/apple-iap/index.js +2 -3
- package/lib/payment/apple-iap/module.d.ts +1 -2
- package/lib/payment/apple-iap/module.js +1 -2
- package/lib/payment/apple-iap/verify-receipt.d.ts +0 -1
- package/lib/payment/apple-iap/verify-receipt.js +0 -4
- package/lib/payment/braintree.d.ts +0 -1
- package/lib/payment/braintree.js +0 -5
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -2
- package/lib/payment/cryptopay/db/CryptopayTransactions.js +2 -1
- package/lib/payment/cryptopay/denote-amount.d.ts +0 -24
- package/lib/payment/cryptopay/denote-amount.js +2 -26
- package/lib/payment/cryptopay/derive-btc-address.d.ts +0 -1
- package/lib/payment/cryptopay/derive-btc-address.js +4 -14
- package/lib/payment/cryptopay/derive-eth-address.d.ts +0 -1
- package/lib/payment/cryptopay/derive-eth-address.js +1 -3
- package/lib/payment/cryptopay/handle-webhook.d.ts +2 -3
- package/lib/payment/cryptopay/handle-webhook.js +3 -3
- package/lib/payment/cryptopay/handler-express.d.ts +0 -1
- package/lib/payment/cryptopay/handler-express.js +1 -2
- package/lib/payment/cryptopay/handler-fastify.d.ts +1 -2
- package/lib/payment/cryptopay/handler-fastify.js +2 -2
- package/lib/payment/cryptopay/index.d.ts +2 -3
- package/lib/payment/cryptopay/index.js +2 -3
- package/lib/payment/cryptopay/module.d.ts +1 -2
- package/lib/payment/cryptopay/module.js +2 -3
- package/lib/payment/cryptopay/plugin.d.ts +1 -2
- package/lib/payment/cryptopay/plugin.js +8 -37
- package/lib/payment/datatrans-v2/api/authorize.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/authorize.js +0 -2
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.js +0 -1
- package/lib/payment/datatrans-v2/api/cancel.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/cancel.js +0 -1
- package/lib/payment/datatrans-v2/api/index.d.ts +8 -9
- package/lib/payment/datatrans-v2/api/index.js +9 -10
- package/lib/payment/datatrans-v2/api/init.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/init.js +2 -4
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.js +0 -3
- package/lib/payment/datatrans-v2/api/secureFields.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/secureFields.js +1 -3
- package/lib/payment/datatrans-v2/api/settle.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/settle.js +0 -1
- package/lib/payment/datatrans-v2/api/status.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/status.js +0 -1
- package/lib/payment/datatrans-v2/api/types.d.ts +0 -1
- package/lib/payment/datatrans-v2/api/types.js +0 -1
- package/lib/payment/datatrans-v2/api/validate.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/validate.js +0 -1
- package/lib/payment/datatrans-v2/generateSignature.d.ts +0 -1
- package/lib/payment/datatrans-v2/generateSignature.js +0 -2
- package/lib/payment/datatrans-v2/getPaths.d.ts +0 -1
- package/lib/payment/datatrans-v2/getPaths.js +0 -1
- package/lib/payment/datatrans-v2/handler-express.d.ts +0 -1
- package/lib/payment/datatrans-v2/handler-express.js +1 -2
- package/lib/payment/datatrans-v2/handler-fastify.d.ts +1 -2
- package/lib/payment/datatrans-v2/handler-fastify.js +1 -2
- package/lib/payment/datatrans-v2/index.d.ts +0 -1
- package/lib/payment/datatrans-v2/index.js +3 -14
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts +4 -5
- package/lib/payment/datatrans-v2/parseRegistrationData.js +1 -2
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +1 -2
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.js +0 -1
- package/lib/payment/datatrans-v2/splitProperties.d.ts +0 -1
- package/lib/payment/datatrans-v2/splitProperties.js +0 -2
- package/lib/payment/invoice-prepaid.d.ts +0 -1
- package/lib/payment/invoice-prepaid.js +0 -1
- package/lib/payment/invoice.d.ts +0 -1
- package/lib/payment/invoice.js +0 -1
- package/lib/payment/paypal-checkout.d.ts +0 -1
- package/lib/payment/paypal-checkout.js +0 -11
- package/lib/payment/payrexx/api/index.d.ts +15 -15
- package/lib/payment/payrexx/api/index.js +15 -27
- package/lib/payment/payrexx/api/makeFetcher.d.ts +0 -1
- package/lib/payment/payrexx/api/makeFetcher.js +0 -1
- package/lib/payment/payrexx/handler-express.d.ts +0 -1
- package/lib/payment/payrexx/handler-express.js +0 -4
- package/lib/payment/payrexx/handler-fastify.d.ts +1 -2
- package/lib/payment/payrexx/handler-fastify.js +0 -4
- package/lib/payment/payrexx/index.d.ts +0 -1
- package/lib/payment/payrexx/index.js +9 -35
- package/lib/payment/payrexx/payrexx.d.ts +0 -1
- package/lib/payment/payrexx/payrexx.js +0 -1
- package/lib/payment/postfinance-checkout/api-client.d.ts +0 -1
- package/lib/payment/postfinance-checkout/api-client.js +0 -6
- package/lib/payment/postfinance-checkout/api-types.d.ts +49 -44
- package/lib/payment/postfinance-checkout/api-types.js +43 -51
- package/lib/payment/postfinance-checkout/api.d.ts +1 -2
- package/lib/payment/postfinance-checkout/api.js +2 -3
- package/lib/payment/postfinance-checkout/handler-express.d.ts +0 -1
- package/lib/payment/postfinance-checkout/handler-express.js +1 -2
- package/lib/payment/postfinance-checkout/handler-fastify.d.ts +1 -2
- package/lib/payment/postfinance-checkout/handler-fastify.js +1 -2
- package/lib/payment/postfinance-checkout/index.d.ts +2 -3
- package/lib/payment/postfinance-checkout/index.js +7 -10
- package/lib/payment/postfinance-checkout/types.d.ts +11 -10
- package/lib/payment/postfinance-checkout/types.js +9 -12
- package/lib/payment/postfinance-checkout/utils.d.ts +2 -3
- package/lib/payment/postfinance-checkout/utils.js +1 -2
- package/lib/payment/saferpay/adapter.d.ts +1 -2
- package/lib/payment/saferpay/adapter.js +2 -5
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts +6 -7
- package/lib/payment/saferpay/api/api/SaferpayClient.js +2 -2
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.js +0 -1
- package/lib/payment/saferpay/api/index.d.ts +4 -5
- package/lib/payment/saferpay/api/index.js +1 -2
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.js +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts +4 -5
- package/lib/payment/saferpay/api/models/PaymentPageAssert.js +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts +4 -5
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.js +0 -1
- package/lib/payment/saferpay/api/models/Request.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Request.js +0 -1
- package/lib/payment/saferpay/api/models/Response.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Response.js +0 -1
- package/lib/payment/saferpay/api/models/Transaction.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Transaction.js +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts +2 -3
- package/lib/payment/saferpay/api/models/TransactionCancel.js +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts +3 -4
- package/lib/payment/saferpay/api/models/TransactionCapture.js +0 -1
- package/lib/payment/saferpay/buildSignature.d.ts +0 -1
- package/lib/payment/saferpay/buildSignature.js +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts +1 -2
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.js +1 -1
- package/lib/payment/saferpay/getReturnPath.d.ts +0 -1
- package/lib/payment/saferpay/getReturnPath.js +0 -1
- package/lib/payment/saferpay/handler-express.d.ts +0 -1
- package/lib/payment/saferpay/handler-express.js +1 -2
- package/lib/payment/saferpay/handler-fastify.d.ts +1 -2
- package/lib/payment/saferpay/handler-fastify.js +1 -2
- package/lib/payment/saferpay/index.d.ts +2 -3
- package/lib/payment/saferpay/index.js +2 -3
- package/lib/payment/saferpay/module.d.ts +2 -3
- package/lib/payment/saferpay/module.js +2 -2
- package/lib/payment/stripe/handler-express.d.ts +0 -1
- package/lib/payment/stripe/handler-express.js +1 -2
- package/lib/payment/stripe/handler-fastify.d.ts +1 -2
- package/lib/payment/stripe/handler-fastify.js +1 -2
- package/lib/payment/stripe/index.d.ts +0 -1
- package/lib/payment/stripe/index.js +1 -4
- package/lib/payment/stripe/stripe.d.ts +1 -2
- package/lib/payment/stripe/stripe.js +2 -3
- package/lib/presets/all-express.d.ts +1 -2
- package/lib/presets/all-express.js +9 -10
- package/lib/presets/all-fastify.d.ts +2 -3
- package/lib/presets/all-fastify.js +9 -10
- package/lib/presets/all.d.ts +23 -24
- package/lib/presets/all.js +20 -25
- package/lib/presets/base-express.d.ts +0 -1
- package/lib/presets/base-express.js +1 -2
- package/lib/presets/base-fastify.d.ts +1 -2
- package/lib/presets/base-fastify.js +1 -3
- package/lib/presets/base.d.ts +23 -24
- package/lib/presets/base.js +23 -33
- package/lib/presets/countries/ch.d.ts +2 -3
- package/lib/presets/countries/ch.js +2 -3
- package/lib/presets/crypto-express.d.ts +1 -2
- package/lib/presets/crypto-express.js +2 -3
- package/lib/presets/crypto-fastify.d.ts +1 -2
- package/lib/presets/crypto-fastify.js +2 -3
- package/lib/presets/crypto.d.ts +6 -7
- package/lib/presets/crypto.js +6 -8
- package/lib/pricing/delivery-swiss-tax.d.ts +1 -2
- package/lib/pricing/delivery-swiss-tax.js +2 -3
- package/lib/pricing/discount-100-off.d.ts +1 -2
- package/lib/pricing/discount-100-off.js +0 -4
- package/lib/pricing/discount-half-price-manual.d.ts +1 -2
- package/lib/pricing/discount-half-price-manual.js +0 -4
- package/lib/pricing/discount-half-price.d.ts +1 -2
- package/lib/pricing/discount-half-price.js +0 -4
- package/lib/pricing/free-delivery.d.ts +1 -2
- package/lib/pricing/free-delivery.js +0 -1
- package/lib/pricing/free-payment.d.ts +1 -2
- package/lib/pricing/free-payment.js +0 -1
- package/lib/pricing/order-delivery.d.ts +1 -2
- package/lib/pricing/order-delivery.js +0 -2
- package/lib/pricing/order-discount.d.ts +1 -2
- package/lib/pricing/order-discount.js +0 -4
- package/lib/pricing/order-items-discount.d.ts +0 -1
- package/lib/pricing/order-items-discount.js +0 -5
- package/lib/pricing/order-items.d.ts +0 -1
- package/lib/pricing/order-items.js +0 -2
- package/lib/pricing/order-payment.d.ts +0 -1
- package/lib/pricing/order-payment.js +0 -2
- package/lib/pricing/order-round.d.ts +1 -2
- package/lib/pricing/order-round.js +0 -6
- package/lib/pricing/product-catalog-price-options.d.ts +0 -1
- package/lib/pricing/product-catalog-price-options.js +0 -1
- package/lib/pricing/product-catalog-price.d.ts +1 -2
- package/lib/pricing/product-catalog-price.js +2 -3
- package/lib/pricing/product-discount.d.ts +0 -1
- package/lib/pricing/product-discount.js +0 -1
- package/lib/pricing/product-price-rateconversion.d.ts +1 -2
- package/lib/pricing/product-price-rateconversion.js +0 -4
- package/lib/pricing/product-round.d.ts +1 -2
- package/lib/pricing/product-round.js +0 -1
- package/lib/pricing/product-swiss-tax.d.ts +1 -2
- package/lib/pricing/product-swiss-tax.js +2 -5
- package/lib/pricing/tax/ch.d.ts +2 -3
- package/lib/pricing/tax/ch.js +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.d.ts +1 -2
- package/lib/pricing/utils/isDeliveryAddressInCountry.js +0 -1
- package/lib/quotations/manual.d.ts +0 -1
- package/lib/quotations/manual.js +0 -1
- package/lib/warehousing/eth-minter.d.ts +0 -1
- package/lib/warehousing/eth-minter.js +2 -11
- package/lib/warehousing/store.d.ts +0 -1
- package/lib/warehousing/store.js +0 -1
- package/lib/worker/budgetsms.d.ts +0 -1
- package/lib/worker/budgetsms.js +4 -52
- package/lib/worker/bulk-import.d.ts +1 -2
- package/lib/worker/bulk-import.js +1 -3
- package/lib/worker/bulkgate.d.ts +0 -1
- package/lib/worker/bulkgate.js +7 -20
- package/lib/worker/email.d.ts +0 -1
- package/lib/worker/email.js +0 -3
- package/lib/worker/enrollment-order-generator.d.ts +0 -1
- package/lib/worker/enrollment-order-generator.js +1 -2
- package/lib/worker/error-notifications.d.ts +1 -2
- package/lib/worker/error-notifications.js +2 -4
- package/lib/worker/export-token.d.ts +1 -2
- package/lib/worker/export-token.js +1 -2
- package/lib/worker/external.d.ts +1 -2
- package/lib/worker/external.js +0 -1
- package/lib/worker/heartbeat.d.ts +0 -1
- package/lib/worker/heartbeat.js +0 -1
- package/lib/worker/http-request.d.ts +1 -2
- package/lib/worker/http-request.js +0 -3
- package/lib/worker/message.d.ts +2 -3
- package/lib/worker/message.js +2 -3
- package/lib/worker/push-notification.d.ts +0 -1
- package/lib/worker/push-notification.js +0 -1
- package/lib/worker/twilio.d.ts +0 -1
- package/lib/worker/twilio.js +1 -2
- package/lib/worker/update-coinbase-rates.d.ts +0 -1
- package/lib/worker/update-coinbase-rates.js +3 -6
- package/lib/worker/update-ecb-rates.d.ts +0 -1
- package/lib/worker/update-ecb-rates.js +2 -6
- package/lib/worker/update-token-ownership.d.ts +1 -2
- package/lib/worker/update-token-ownership.js +4 -6
- package/lib/worker/zombie-killer.d.ts +1 -2
- package/lib/worker/zombie-killer.js +2 -9
- package/package.json +20 -25
- package/lib/delivery/post.d.ts.map +0 -1
- package/lib/delivery/post.js.map +0 -1
- package/lib/delivery/send-message.d.ts.map +0 -1
- package/lib/delivery/send-message.js.map +0 -1
- package/lib/delivery/stores.d.ts.map +0 -1
- package/lib/delivery/stores.js.map +0 -1
- package/lib/enrollments/licensed.d.ts.map +0 -1
- package/lib/enrollments/licensed.js.map +0 -1
- package/lib/events/aws-eventbridge.d.ts.map +0 -1
- package/lib/events/aws-eventbridge.js.map +0 -1
- package/lib/events/node-event-emitter.d.ts.map +0 -1
- package/lib/events/node-event-emitter.js.map +0 -1
- package/lib/events/redis.d.ts.map +0 -1
- package/lib/events/redis.js.map +0 -1
- package/lib/files/gridfs/adapter.d.ts.map +0 -1
- package/lib/files/gridfs/adapter.js.map +0 -1
- package/lib/files/gridfs/handler-express.d.ts.map +0 -1
- package/lib/files/gridfs/handler-express.js.map +0 -1
- package/lib/files/gridfs/handler-fastify.d.ts.map +0 -1
- package/lib/files/gridfs/handler-fastify.js.map +0 -1
- package/lib/files/gridfs/index.d.ts.map +0 -1
- package/lib/files/gridfs/index.js.map +0 -1
- package/lib/files/gridfs/module.d.ts.map +0 -1
- package/lib/files/gridfs/module.js.map +0 -1
- package/lib/files/gridfs/sign.d.ts.map +0 -1
- package/lib/files/gridfs/sign.js.map +0 -1
- package/lib/files/minio/handler-express.d.ts.map +0 -1
- package/lib/files/minio/handler-express.js.map +0 -1
- package/lib/files/minio/handler-fastify.d.ts.map +0 -1
- package/lib/files/minio/handler-fastify.js.map +0 -1
- package/lib/files/minio/index.d.ts.map +0 -1
- package/lib/files/minio/index.js.map +0 -1
- package/lib/filters/local-search.d.ts.map +0 -1
- package/lib/filters/local-search.js.map +0 -1
- package/lib/filters/strict-equal.d.ts.map +0 -1
- package/lib/filters/strict-equal.js.map +0 -1
- package/lib/payment/apple-iap/adapter.d.ts.map +0 -1
- package/lib/payment/apple-iap/adapter.js.map +0 -1
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts.map +0 -1
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.js.map +0 -1
- package/lib/payment/apple-iap/fix-periods.d.ts.map +0 -1
- package/lib/payment/apple-iap/fix-periods.js.map +0 -1
- package/lib/payment/apple-iap/handler-express.d.ts.map +0 -1
- package/lib/payment/apple-iap/handler-express.js.map +0 -1
- package/lib/payment/apple-iap/handler-fastify.d.ts.map +0 -1
- package/lib/payment/apple-iap/handler-fastify.js.map +0 -1
- package/lib/payment/apple-iap/index.d.ts.map +0 -1
- package/lib/payment/apple-iap/index.js.map +0 -1
- package/lib/payment/apple-iap/module.d.ts.map +0 -1
- package/lib/payment/apple-iap/module.js.map +0 -1
- package/lib/payment/apple-iap/verify-receipt.d.ts.map +0 -1
- package/lib/payment/apple-iap/verify-receipt.js.map +0 -1
- package/lib/payment/braintree.d.ts.map +0 -1
- package/lib/payment/braintree.js.map +0 -1
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts.map +0 -1
- package/lib/payment/cryptopay/db/CryptopayTransactions.js.map +0 -1
- package/lib/payment/cryptopay/denote-amount.d.ts.map +0 -1
- package/lib/payment/cryptopay/denote-amount.js.map +0 -1
- package/lib/payment/cryptopay/derive-btc-address.d.ts.map +0 -1
- package/lib/payment/cryptopay/derive-btc-address.js.map +0 -1
- package/lib/payment/cryptopay/derive-eth-address.d.ts.map +0 -1
- package/lib/payment/cryptopay/derive-eth-address.js.map +0 -1
- package/lib/payment/cryptopay/handle-webhook.d.ts.map +0 -1
- package/lib/payment/cryptopay/handle-webhook.js.map +0 -1
- package/lib/payment/cryptopay/handler-express.d.ts.map +0 -1
- package/lib/payment/cryptopay/handler-express.js.map +0 -1
- package/lib/payment/cryptopay/handler-fastify.d.ts.map +0 -1
- package/lib/payment/cryptopay/handler-fastify.js.map +0 -1
- package/lib/payment/cryptopay/index.d.ts.map +0 -1
- package/lib/payment/cryptopay/index.js.map +0 -1
- package/lib/payment/cryptopay/module.d.ts.map +0 -1
- package/lib/payment/cryptopay/module.js.map +0 -1
- package/lib/payment/cryptopay/plugin.d.ts.map +0 -1
- package/lib/payment/cryptopay/plugin.js.map +0 -1
- package/lib/payment/datatrans-v2/api/authorize.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/authorize.js.map +0 -1
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.js.map +0 -1
- package/lib/payment/datatrans-v2/api/cancel.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/cancel.js.map +0 -1
- package/lib/payment/datatrans-v2/api/index.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/index.js.map +0 -1
- package/lib/payment/datatrans-v2/api/init.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/init.js.map +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.js.map +0 -1
- package/lib/payment/datatrans-v2/api/secureFields.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/secureFields.js.map +0 -1
- package/lib/payment/datatrans-v2/api/settle.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/settle.js.map +0 -1
- package/lib/payment/datatrans-v2/api/status.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/status.js.map +0 -1
- package/lib/payment/datatrans-v2/api/types.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/types.js.map +0 -1
- package/lib/payment/datatrans-v2/api/validate.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/validate.js.map +0 -1
- package/lib/payment/datatrans-v2/generateSignature.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/generateSignature.js.map +0 -1
- package/lib/payment/datatrans-v2/getPaths.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/getPaths.js.map +0 -1
- package/lib/payment/datatrans-v2/handler-express.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/handler-express.js.map +0 -1
- package/lib/payment/datatrans-v2/handler-fastify.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/handler-fastify.js.map +0 -1
- package/lib/payment/datatrans-v2/index.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/index.js.map +0 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.js.map +0 -1
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.js.map +0 -1
- package/lib/payment/datatrans-v2/splitProperties.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/splitProperties.js.map +0 -1
- package/lib/payment/invoice-prepaid.d.ts.map +0 -1
- package/lib/payment/invoice-prepaid.js.map +0 -1
- package/lib/payment/invoice.d.ts.map +0 -1
- package/lib/payment/invoice.js.map +0 -1
- package/lib/payment/paypal-checkout.d.ts.map +0 -1
- package/lib/payment/paypal-checkout.js.map +0 -1
- package/lib/payment/payrexx/api/index.d.ts.map +0 -1
- package/lib/payment/payrexx/api/index.js.map +0 -1
- package/lib/payment/payrexx/api/makeFetcher.d.ts.map +0 -1
- package/lib/payment/payrexx/api/makeFetcher.js.map +0 -1
- package/lib/payment/payrexx/handler-express.d.ts.map +0 -1
- package/lib/payment/payrexx/handler-express.js.map +0 -1
- package/lib/payment/payrexx/handler-fastify.d.ts.map +0 -1
- package/lib/payment/payrexx/handler-fastify.js.map +0 -1
- package/lib/payment/payrexx/index.d.ts.map +0 -1
- package/lib/payment/payrexx/index.js.map +0 -1
- package/lib/payment/payrexx/payrexx.d.ts.map +0 -1
- package/lib/payment/payrexx/payrexx.js.map +0 -1
- package/lib/payment/postfinance-checkout/api-client.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api-client.js.map +0 -1
- package/lib/payment/postfinance-checkout/api-types.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api-types.js.map +0 -1
- package/lib/payment/postfinance-checkout/api.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api.js.map +0 -1
- package/lib/payment/postfinance-checkout/handler-express.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/handler-express.js.map +0 -1
- package/lib/payment/postfinance-checkout/handler-fastify.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/handler-fastify.js.map +0 -1
- package/lib/payment/postfinance-checkout/index.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/index.js.map +0 -1
- package/lib/payment/postfinance-checkout/types.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/types.js.map +0 -1
- package/lib/payment/postfinance-checkout/utils.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/utils.js.map +0 -1
- package/lib/payment/saferpay/adapter.d.ts.map +0 -1
- package/lib/payment/saferpay/adapter.js.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayClient.js.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.js.map +0 -1
- package/lib/payment/saferpay/api/index.d.ts.map +0 -1
- package/lib/payment/saferpay/api/index.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.js.map +0 -1
- package/lib/payment/saferpay/api/models/Request.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Request.js.map +0 -1
- package/lib/payment/saferpay/api/models/Response.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Response.js.map +0 -1
- package/lib/payment/saferpay/api/models/Transaction.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Transaction.js.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.js.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.js.map +0 -1
- package/lib/payment/saferpay/buildSignature.d.ts.map +0 -1
- package/lib/payment/saferpay/buildSignature.js.map +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts.map +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.js.map +0 -1
- package/lib/payment/saferpay/getReturnPath.d.ts.map +0 -1
- package/lib/payment/saferpay/getReturnPath.js.map +0 -1
- package/lib/payment/saferpay/handler-express.d.ts.map +0 -1
- package/lib/payment/saferpay/handler-express.js.map +0 -1
- package/lib/payment/saferpay/handler-fastify.d.ts.map +0 -1
- package/lib/payment/saferpay/handler-fastify.js.map +0 -1
- package/lib/payment/saferpay/index.d.ts.map +0 -1
- package/lib/payment/saferpay/index.js.map +0 -1
- package/lib/payment/saferpay/module.d.ts.map +0 -1
- package/lib/payment/saferpay/module.js.map +0 -1
- package/lib/payment/stripe/handler-express.d.ts.map +0 -1
- package/lib/payment/stripe/handler-express.js.map +0 -1
- package/lib/payment/stripe/handler-fastify.d.ts.map +0 -1
- package/lib/payment/stripe/handler-fastify.js.map +0 -1
- package/lib/payment/stripe/index.d.ts.map +0 -1
- package/lib/payment/stripe/index.js.map +0 -1
- package/lib/payment/stripe/stripe.d.ts.map +0 -1
- package/lib/payment/stripe/stripe.js.map +0 -1
- package/lib/presets/all-express.d.ts.map +0 -1
- package/lib/presets/all-express.js.map +0 -1
- package/lib/presets/all-fastify.d.ts.map +0 -1
- package/lib/presets/all-fastify.js.map +0 -1
- package/lib/presets/all.d.ts.map +0 -1
- package/lib/presets/all.js.map +0 -1
- package/lib/presets/base-express.d.ts.map +0 -1
- package/lib/presets/base-express.js.map +0 -1
- package/lib/presets/base-fastify.d.ts.map +0 -1
- package/lib/presets/base-fastify.js.map +0 -1
- package/lib/presets/base.d.ts.map +0 -1
- package/lib/presets/base.js.map +0 -1
- package/lib/presets/countries/ch.d.ts.map +0 -1
- package/lib/presets/countries/ch.js.map +0 -1
- package/lib/presets/crypto-express.d.ts.map +0 -1
- package/lib/presets/crypto-express.js.map +0 -1
- package/lib/presets/crypto-fastify.d.ts.map +0 -1
- package/lib/presets/crypto-fastify.js.map +0 -1
- package/lib/presets/crypto.d.ts.map +0 -1
- package/lib/presets/crypto.js.map +0 -1
- package/lib/pricing/delivery-swiss-tax.d.ts.map +0 -1
- package/lib/pricing/delivery-swiss-tax.js.map +0 -1
- package/lib/pricing/discount-100-off.d.ts.map +0 -1
- package/lib/pricing/discount-100-off.js.map +0 -1
- package/lib/pricing/discount-half-price-manual.d.ts.map +0 -1
- package/lib/pricing/discount-half-price-manual.js.map +0 -1
- package/lib/pricing/discount-half-price.d.ts.map +0 -1
- package/lib/pricing/discount-half-price.js.map +0 -1
- package/lib/pricing/free-delivery.d.ts.map +0 -1
- package/lib/pricing/free-delivery.js.map +0 -1
- package/lib/pricing/free-payment.d.ts.map +0 -1
- package/lib/pricing/free-payment.js.map +0 -1
- package/lib/pricing/order-delivery.d.ts.map +0 -1
- package/lib/pricing/order-delivery.js.map +0 -1
- package/lib/pricing/order-discount.d.ts.map +0 -1
- package/lib/pricing/order-discount.js.map +0 -1
- package/lib/pricing/order-items-discount.d.ts.map +0 -1
- package/lib/pricing/order-items-discount.js.map +0 -1
- package/lib/pricing/order-items.d.ts.map +0 -1
- package/lib/pricing/order-items.js.map +0 -1
- package/lib/pricing/order-payment.d.ts.map +0 -1
- package/lib/pricing/order-payment.js.map +0 -1
- package/lib/pricing/order-round.d.ts.map +0 -1
- package/lib/pricing/order-round.js.map +0 -1
- package/lib/pricing/product-catalog-price-options.d.ts.map +0 -1
- package/lib/pricing/product-catalog-price-options.js.map +0 -1
- package/lib/pricing/product-catalog-price.d.ts.map +0 -1
- package/lib/pricing/product-catalog-price.js.map +0 -1
- package/lib/pricing/product-discount.d.ts.map +0 -1
- package/lib/pricing/product-discount.js.map +0 -1
- package/lib/pricing/product-price-rateconversion.d.ts.map +0 -1
- package/lib/pricing/product-price-rateconversion.js.map +0 -1
- package/lib/pricing/product-round.d.ts.map +0 -1
- package/lib/pricing/product-round.js.map +0 -1
- package/lib/pricing/product-swiss-tax.d.ts.map +0 -1
- package/lib/pricing/product-swiss-tax.js.map +0 -1
- package/lib/pricing/tax/ch.d.ts.map +0 -1
- package/lib/pricing/tax/ch.js.map +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.d.ts.map +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.js.map +0 -1
- package/lib/quotations/manual.d.ts.map +0 -1
- package/lib/quotations/manual.js.map +0 -1
- package/lib/warehousing/eth-minter.d.ts.map +0 -1
- package/lib/warehousing/eth-minter.js.map +0 -1
- package/lib/warehousing/store.d.ts.map +0 -1
- package/lib/warehousing/store.js.map +0 -1
- package/lib/worker/budgetsms.d.ts.map +0 -1
- package/lib/worker/budgetsms.js.map +0 -1
- package/lib/worker/bulk-import.d.ts.map +0 -1
- package/lib/worker/bulk-import.js.map +0 -1
- package/lib/worker/bulkgate.d.ts.map +0 -1
- package/lib/worker/bulkgate.js.map +0 -1
- package/lib/worker/email.d.ts.map +0 -1
- package/lib/worker/email.js.map +0 -1
- package/lib/worker/enrollment-order-generator.d.ts.map +0 -1
- package/lib/worker/enrollment-order-generator.js.map +0 -1
- package/lib/worker/error-notifications.d.ts.map +0 -1
- package/lib/worker/error-notifications.js.map +0 -1
- package/lib/worker/export-token.d.ts.map +0 -1
- package/lib/worker/export-token.js.map +0 -1
- package/lib/worker/external.d.ts.map +0 -1
- package/lib/worker/external.js.map +0 -1
- package/lib/worker/heartbeat.d.ts.map +0 -1
- package/lib/worker/heartbeat.js.map +0 -1
- package/lib/worker/http-request.d.ts.map +0 -1
- package/lib/worker/http-request.js.map +0 -1
- package/lib/worker/message.d.ts.map +0 -1
- package/lib/worker/message.js.map +0 -1
- package/lib/worker/push-notification.d.ts.map +0 -1
- package/lib/worker/push-notification.js.map +0 -1
- package/lib/worker/twilio.d.ts.map +0 -1
- package/lib/worker/twilio.js.map +0 -1
- package/lib/worker/update-coinbase-rates.d.ts.map +0 -1
- package/lib/worker/update-coinbase-rates.js.map +0 -1
- package/lib/worker/update-ecb-rates.d.ts.map +0 -1
- package/lib/worker/update-ecb-rates.js.map +0 -1
- package/lib/worker/update-token-ownership.d.ts.map +0 -1
- package/lib/worker/update-token-ownership.js.map +0 -1
- package/lib/worker/zombie-killer.d.ts.map +0 -1
- package/lib/worker/zombie-killer.js.map +0 -1
- package/readme.md +0 -5
- package/src/delivery/post.ts +0 -30
- package/src/delivery/send-message.ts +0 -50
- package/src/delivery/stores.ts +0 -53
- package/src/enrollments/licensed.ts +0 -61
- package/src/events/aws-eventbridge.ts +0 -45
- package/src/events/node-event-emitter.ts +0 -18
- package/src/events/redis.ts +0 -34
- package/src/files/gridfs/adapter.ts +0 -176
- package/src/files/gridfs/handler-express.ts +0 -145
- package/src/files/gridfs/handler-fastify.ts +0 -177
- package/src/files/gridfs/index.ts +0 -6
- package/src/files/gridfs/module.ts +0 -54
- package/src/files/gridfs/sign.ts +0 -28
- package/src/files/minio/handler-express.ts +0 -35
- package/src/files/minio/handler-fastify.ts +0 -44
- package/src/files/minio/index.ts +0 -232
- package/src/filters/local-search.ts +0 -101
- package/src/filters/strict-equal.ts +0 -30
- package/src/payment/apple-iap/adapter.ts +0 -153
- package/src/payment/apple-iap/db/AppleTransactionsCollection.ts +0 -14
- package/src/payment/apple-iap/fix-periods.ts +0 -31
- package/src/payment/apple-iap/handler-express.ts +0 -140
- package/src/payment/apple-iap/handler-fastify.ts +0 -147
- package/src/payment/apple-iap/index.ts +0 -6
- package/src/payment/apple-iap/module.ts +0 -34
- package/src/payment/apple-iap/verify-receipt.ts +0 -27
- package/src/payment/braintree.ts +0 -167
- package/src/payment/cryptopay/db/CryptopayTransactions.ts +0 -16
- package/src/payment/cryptopay/denote-amount.test.ts +0 -28
- package/src/payment/cryptopay/denote-amount.ts +0 -29
- package/src/payment/cryptopay/derive-btc-address.test.ts +0 -22
- package/src/payment/cryptopay/derive-btc-address.ts +0 -46
- package/src/payment/cryptopay/derive-eth-address.test.ts +0 -22
- package/src/payment/cryptopay/derive-eth-address.ts +0 -40
- package/src/payment/cryptopay/handle-webhook.ts +0 -103
- package/src/payment/cryptopay/handler-express.ts +0 -21
- package/src/payment/cryptopay/handler-fastify.ts +0 -24
- package/src/payment/cryptopay/index.ts +0 -7
- package/src/payment/cryptopay/module.ts +0 -138
- package/src/payment/cryptopay/plugin.ts +0 -282
- package/src/payment/cryptopay/readme.md +0 -23
- package/src/payment/datatrans-v2/api/authorize.ts +0 -17
- package/src/payment/datatrans-v2/api/authorizeAuthenticated.ts +0 -20
- package/src/payment/datatrans-v2/api/cancel.ts +0 -13
- package/src/payment/datatrans-v2/api/index.ts +0 -24
- package/src/payment/datatrans-v2/api/init.ts +0 -43
- package/src/payment/datatrans-v2/api/makeFetcher.ts +0 -52
- package/src/payment/datatrans-v2/api/secureFields.ts +0 -19
- package/src/payment/datatrans-v2/api/settle.ts +0 -13
- package/src/payment/datatrans-v2/api/status.ts +0 -8
- package/src/payment/datatrans-v2/api/types.ts +0 -378
- package/src/payment/datatrans-v2/api/validate.ts +0 -13
- package/src/payment/datatrans-v2/generateSignature.test.ts +0 -18
- package/src/payment/datatrans-v2/generateSignature.ts +0 -36
- package/src/payment/datatrans-v2/getPaths.ts +0 -25
- package/src/payment/datatrans-v2/handler-express.ts +0 -91
- package/src/payment/datatrans-v2/handler-fastify.ts +0 -97
- package/src/payment/datatrans-v2/index.ts +0 -524
- package/src/payment/datatrans-v2/parseRegistrationData.ts +0 -34
- package/src/payment/datatrans-v2/roundedAmountFromOrder.ts +0 -16
- package/src/payment/datatrans-v2/splitProperties.ts +0 -58
- package/src/payment/invoice-prepaid.ts +0 -40
- package/src/payment/invoice.ts +0 -36
- package/src/payment/paypal-checkout.ts +0 -127
- package/src/payment/payrexx/api/index.ts +0 -84
- package/src/payment/payrexx/api/makeFetcher.ts +0 -83
- package/src/payment/payrexx/handler-express.ts +0 -93
- package/src/payment/payrexx/handler-fastify.ts +0 -105
- package/src/payment/payrexx/index.ts +0 -248
- package/src/payment/payrexx/payrexx.ts +0 -65
- package/src/payment/payrexx/readme.md +0 -4
- package/src/payment/postfinance-checkout/api-client.ts +0 -111
- package/src/payment/postfinance-checkout/api-types.ts +0 -111
- package/src/payment/postfinance-checkout/api.ts +0 -114
- package/src/payment/postfinance-checkout/handler-express.ts +0 -44
- package/src/payment/postfinance-checkout/handler-fastify.ts +0 -53
- package/src/payment/postfinance-checkout/index.ts +0 -271
- package/src/payment/postfinance-checkout/types.ts +0 -27
- package/src/payment/postfinance-checkout/utils.ts +0 -39
- package/src/payment/saferpay/adapter.ts +0 -273
- package/src/payment/saferpay/api/api/SaferpayClient.ts +0 -79
- package/src/payment/saferpay/api/api/SaferpayConnection.ts +0 -36
- package/src/payment/saferpay/api/index.ts +0 -8
- package/src/payment/saferpay/api/models/PaymentMethods.ts +0 -26
- package/src/payment/saferpay/api/models/PaymentPageAssert.ts +0 -75
- package/src/payment/saferpay/api/models/PaymentPageInitialize.ts +0 -58
- package/src/payment/saferpay/api/models/Request.ts +0 -14
- package/src/payment/saferpay/api/models/Response.ts +0 -9
- package/src/payment/saferpay/api/models/Transaction.ts +0 -6
- package/src/payment/saferpay/api/models/TransactionCancel.ts +0 -15
- package/src/payment/saferpay/api/models/TransactionCapture.ts +0 -20
- package/src/payment/saferpay/buildSignature.ts +0 -9
- package/src/payment/saferpay/db/SaferpayTransactionsCollection.ts +0 -13
- package/src/payment/saferpay/getReturnPath.ts +0 -10
- package/src/payment/saferpay/handler-express.ts +0 -71
- package/src/payment/saferpay/handler-fastify.ts +0 -80
- package/src/payment/saferpay/index.ts +0 -6
- package/src/payment/saferpay/module.ts +0 -41
- package/src/payment/stripe/handler-express.ts +0 -135
- package/src/payment/stripe/handler-fastify.ts +0 -151
- package/src/payment/stripe/index.ts +0 -163
- package/src/payment/stripe/readme.md +0 -12
- package/src/payment/stripe/stripe.ts +0 -137
- package/src/presets/all-express.ts +0 -51
- package/src/presets/all-fastify.ts +0 -72
- package/src/presets/all.ts +0 -37
- package/src/presets/base-express.ts +0 -7
- package/src/presets/base-fastify.ts +0 -20
- package/src/presets/base.ts +0 -42
- package/src/presets/countries/ch.ts +0 -2
- package/src/presets/crypto-express.ts +0 -12
- package/src/presets/crypto-fastify.ts +0 -15
- package/src/presets/crypto.ts +0 -11
- package/src/pricing/delivery-swiss-tax.ts +0 -78
- package/src/pricing/discount-100-off.test.ts +0 -41
- package/src/pricing/discount-100-off.ts +0 -48
- package/src/pricing/discount-half-price-manual.test.ts +0 -52
- package/src/pricing/discount-half-price-manual.ts +0 -47
- package/src/pricing/discount-half-price.test.ts +0 -52
- package/src/pricing/discount-half-price.ts +0 -50
- package/src/pricing/free-delivery.test.ts +0 -10
- package/src/pricing/free-delivery.ts +0 -36
- package/src/pricing/free-payment.ts +0 -37
- package/src/pricing/licenced-enrollment.test.ts +0 -38
- package/src/pricing/order-delivery.test.ts +0 -9
- package/src/pricing/order-delivery.ts +0 -47
- package/src/pricing/order-discount.test.ts +0 -10
- package/src/pricing/order-discount.ts +0 -123
- package/src/pricing/order-items-discount.ts +0 -86
- package/src/pricing/order-items.ts +0 -61
- package/src/pricing/order-payment.ts +0 -48
- package/src/pricing/order-round.ts +0 -174
- package/src/pricing/plugins-index.test.ts +0 -5
- package/src/pricing/product-catalog-price-options.ts +0 -67
- package/src/pricing/product-catalog-price.ts +0 -71
- package/src/pricing/product-discount.ts +0 -97
- package/src/pricing/product-price-rateconversion.ts +0 -74
- package/src/pricing/product-round.ts +0 -66
- package/src/pricing/product-swiss-tax.ts +0 -102
- package/src/pricing/tax/ch.test.ts +0 -20
- package/src/pricing/tax/ch.ts +0 -65
- package/src/pricing/utils/isDeliveryAddressInCountry.test.ts +0 -106
- package/src/pricing/utils/isDeliveryAddressInCountry.ts +0 -26
- package/src/quotations/manual.ts +0 -26
- package/src/warehousing/eth-minter.ts +0 -167
- package/src/warehousing/store.ts +0 -45
- package/src/worker/budgetsms.ts +0 -268
- package/src/worker/bulk-import.ts +0 -77
- package/src/worker/bulkgate.ts +0 -138
- package/src/worker/email.ts +0 -165
- package/src/worker/enrollment-order-generator.ts +0 -94
- package/src/worker/error-notifications.ts +0 -83
- package/src/worker/export-token.ts +0 -32
- package/src/worker/external.ts +0 -17
- package/src/worker/heartbeat.ts +0 -37
- package/src/worker/http-request.ts +0 -71
- package/src/worker/message.ts +0 -56
- package/src/worker/push-notification.ts +0 -121
- package/src/worker/twilio.ts +0 -78
- package/src/worker/update-coinbase-rates.ts +0 -76
- package/src/worker/update-ecb-rates.ts +0 -115
- package/src/worker/update-token-ownership.ts +0 -70
- package/src/worker/zombie-killer.ts +0 -139
- package/tests/mock/datatrans/v1/secure-fields.json +0 -4
- package/tests/mock/datatrans/v1/transactions/authorize.json +0 -48
- package/tests/mock/datatrans/v1/transactions/card_check_authorized.json +0 -47
- package/tests/mock/datatrans/v1/transactions/payment_alias_authorized/settle.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_alias_authorized.json +0 -48
- package/tests/mock/datatrans/v1/transactions/payment_authorized/cancel.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized/settle.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized.json +0 -48
- package/tests/mock/datatrans/v1/transactions/payment_authorized_low_amount/cancel.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized_low_amount.json +0 -48
- package/tests/mock/datatrans/v1/transactions/validate.json +0 -1
- package/tests/mock/datatrans/v1/transactions.json +0 -4
- package/tests/mock/payrexx/Gateway/1000001.json +0 -106
- package/tests/mock/payrexx/Gateway.json +0 -24
- package/tests/mock/payrexx/transaction_example1.json +0 -65
- package/tests/mock/payrexx/transaction_example2.json +0 -65
- package/tests/mock/payrexx/transaction_example3.json +0 -94
- package/tsconfig.json +0 -9
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
[](https://npmjs.com/package/@unchainedshop/plugins)
|
|
2
|
+
[](https://opensource.org/licenses/EUPL-1.2)
|
|
3
|
+
|
|
4
|
+
# @unchainedshop/plugins
|
|
5
|
+
|
|
6
|
+
Official plugin collection for the Unchained Engine. Provides ready-to-use adapters for payment, delivery, pricing, file storage, workers, and more.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @unchainedshop/plugins
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Available Plugins
|
|
15
|
+
|
|
16
|
+
### Payment Adapters
|
|
17
|
+
|
|
18
|
+
| Plugin | Import Path | Description |
|
|
19
|
+
|--------|-------------|-------------|
|
|
20
|
+
| Invoice | `payment/invoice` | Simple invoice-based payment |
|
|
21
|
+
| Invoice Prepaid | `payment/invoice-prepaid` | Prepaid invoice payment |
|
|
22
|
+
| Stripe | `payment/stripe` | Stripe payment integration |
|
|
23
|
+
| Datatrans V2 | `payment/datatrans-v2` | Datatrans payment gateway |
|
|
24
|
+
| Saferpay | `payment/saferpay` | Saferpay payment gateway |
|
|
25
|
+
| PayPal Checkout | `payment/paypal-checkout` | PayPal Checkout integration |
|
|
26
|
+
| Braintree | `payment/braintree` | Braintree payments |
|
|
27
|
+
| Payrexx | `payment/payrexx` | Payrexx payment gateway |
|
|
28
|
+
| Apple IAP | `payment/apple-iap` | Apple In-App Purchase |
|
|
29
|
+
| Cryptopay | `payment/cryptopay` | Cryptocurrency payments |
|
|
30
|
+
|
|
31
|
+
### Delivery Adapters
|
|
32
|
+
|
|
33
|
+
| Plugin | Import Path | Description |
|
|
34
|
+
|--------|-------------|-------------|
|
|
35
|
+
| Post | `delivery/post` | Standard postal delivery |
|
|
36
|
+
| Stores | `delivery/stores` | Store pickup delivery |
|
|
37
|
+
| Send Message | `delivery/send-message` | Digital delivery via messaging |
|
|
38
|
+
|
|
39
|
+
### Pricing Adapters
|
|
40
|
+
|
|
41
|
+
| Plugin | Import Path | Description |
|
|
42
|
+
|--------|-------------|-------------|
|
|
43
|
+
| Product Catalog Price | `pricing/product-catalog-price` | Base catalog pricing |
|
|
44
|
+
| Product Price Rate Conversion | `pricing/product-price-rateconversion` | Currency conversion |
|
|
45
|
+
| Product Round | `pricing/product-round` | Price rounding |
|
|
46
|
+
| Product Discount | `pricing/product-discount` | Product-level discounts |
|
|
47
|
+
| Order Items | `pricing/order-items` | Order item pricing |
|
|
48
|
+
| Order Delivery | `pricing/order-delivery` | Delivery pricing |
|
|
49
|
+
| Order Payment | `pricing/order-payment` | Payment fee pricing |
|
|
50
|
+
| Order Discount | `pricing/order-discount` | Order-level discounts |
|
|
51
|
+
| Order Round | `pricing/order-round` | Order total rounding |
|
|
52
|
+
| Free Delivery | `pricing/free-delivery` | Free delivery conditions |
|
|
53
|
+
| Free Payment | `pricing/free-payment` | Free payment processing |
|
|
54
|
+
| Swiss Tax (CH) | `pricing/tax/ch` | Swiss VAT calculation |
|
|
55
|
+
|
|
56
|
+
### Filter Adapters
|
|
57
|
+
|
|
58
|
+
| Plugin | Import Path | Description |
|
|
59
|
+
|--------|-------------|-------------|
|
|
60
|
+
| Strict Equal | `filters/strict-equal` | Exact match filtering |
|
|
61
|
+
| Local Search | `filters/local-search` | Full-text search |
|
|
62
|
+
|
|
63
|
+
### File Storage Adapters
|
|
64
|
+
|
|
65
|
+
| Plugin | Import Path | Description |
|
|
66
|
+
|--------|-------------|-------------|
|
|
67
|
+
| GridFS | `files/gridfs` | MongoDB GridFS storage |
|
|
68
|
+
| MinIO | `files/minio` | MinIO/S3-compatible storage |
|
|
69
|
+
|
|
70
|
+
### Worker Adapters
|
|
71
|
+
|
|
72
|
+
| Plugin | Import Path | Description |
|
|
73
|
+
|--------|-------------|-------------|
|
|
74
|
+
| Email | `worker/email` | Email sending worker |
|
|
75
|
+
| Heartbeat | `worker/heartbeat` | Keep-alive heartbeat |
|
|
76
|
+
| HTTP Request | `worker/http-request` | HTTP request worker |
|
|
77
|
+
| Bulk Import | `worker/bulk-import` | Bulk data import |
|
|
78
|
+
| External | `worker/external` | External service calls |
|
|
79
|
+
| Twilio | `worker/twilio` | Twilio SMS integration |
|
|
80
|
+
| Push Notification | `worker/push-notification` | Push notifications |
|
|
81
|
+
| Update ECB Rates | `worker/update-ecb-rates` | ECB exchange rates |
|
|
82
|
+
| Update Coinbase Rates | `worker/update-coinbase-rates` | Crypto exchange rates |
|
|
83
|
+
| Update Token Ownership | `worker/update-token-ownership` | NFT ownership sync |
|
|
84
|
+
| Zombie Killer | `worker/zombie-killer` | Stale job cleanup |
|
|
85
|
+
| Error Notifications | `worker/error-notifications` | Error alerting |
|
|
86
|
+
|
|
87
|
+
### Event Adapters
|
|
88
|
+
|
|
89
|
+
| Plugin | Import Path | Description |
|
|
90
|
+
|--------|-------------|-------------|
|
|
91
|
+
| Node Event Emitter | `events/node-event-emitter` | Default Node.js emitter |
|
|
92
|
+
| Redis | `events/redis` | Redis pub/sub |
|
|
93
|
+
| AWS EventBridge | `events/aws-eventbridge` | AWS EventBridge |
|
|
94
|
+
|
|
95
|
+
### Warehousing Adapters
|
|
96
|
+
|
|
97
|
+
| Plugin | Import Path | Description |
|
|
98
|
+
|--------|-------------|-------------|
|
|
99
|
+
| Store | `warehousing/store` | Basic inventory |
|
|
100
|
+
| ETH Minter | `warehousing/eth-minter` | Ethereum NFT minting |
|
|
101
|
+
|
|
102
|
+
### Other Adapters
|
|
103
|
+
|
|
104
|
+
| Plugin | Import Path | Description |
|
|
105
|
+
|--------|-------------|-------------|
|
|
106
|
+
| Licensed Enrollment | `enrollments/licensed` | License-based subscriptions |
|
|
107
|
+
| Manual Quotation | `quotations/manual` | Manual quote handling |
|
|
108
|
+
|
|
109
|
+
## Usage
|
|
110
|
+
|
|
111
|
+
Import and register plugins during platform initialization:
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
import { startPlatform } from '@unchainedshop/platform';
|
|
115
|
+
|
|
116
|
+
// Import specific plugins
|
|
117
|
+
import '@unchainedshop/plugins/payment/stripe';
|
|
118
|
+
import '@unchainedshop/plugins/delivery/post';
|
|
119
|
+
import '@unchainedshop/plugins/pricing/product-catalog-price';
|
|
120
|
+
|
|
121
|
+
const platform = await startPlatform({
|
|
122
|
+
// ...
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Notes
|
|
127
|
+
|
|
128
|
+
### Postfinance Checkout Plugin
|
|
129
|
+
|
|
130
|
+
Due to a TypeScript issue with the upstream "postfinancecheckout" package, the Postfinance plugin has been disabled from transpilation. To use it:
|
|
131
|
+
1. Import the source TypeScript files directly from `src`
|
|
132
|
+
2. Enable `node_modules` TypeScript compilation, or
|
|
133
|
+
3. Copy `src/payment/postfinance-checkout` to your project
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
EUPL-1.2
|
package/lib/delivery/post.d.ts
CHANGED
package/lib/delivery/post.js
CHANGED
package/lib/delivery/stores.d.ts
CHANGED
package/lib/delivery/stores.js
CHANGED
|
@@ -2,8 +2,6 @@ import { setEmitAdapter } from '@unchainedshop/events';
|
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
3
|
const logger = createLogger('unchained:eventbridge');
|
|
4
4
|
const EventBridgeEventEmitter = async ({ region, source, busName }) => {
|
|
5
|
-
// eslint-disable-next-line
|
|
6
|
-
// @ts-expect-error
|
|
7
5
|
const { EventBridgeClient, PutEventsCommand } = await import('@aws-sdk/client-eventbridge');
|
|
8
6
|
const ebClient = new EventBridgeClient({ region });
|
|
9
7
|
return {
|
|
@@ -37,4 +35,3 @@ if (EVENT_BRIDGE_REGION && EVENT_BRIDGE_SOURCE && EVENT_BRIDGE_BUS_NAME) {
|
|
|
37
35
|
});
|
|
38
36
|
setEmitAdapter(eventBridgeAdapter);
|
|
39
37
|
}
|
|
40
|
-
//# sourceMappingURL=aws-eventbridge.js.map
|
package/lib/events/redis.d.ts
CHANGED
package/lib/events/redis.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IFileAdapter } from '@unchainedshop/file-upload';
|
|
2
|
-
import { UnchainedCore } from '@unchainedshop/core';
|
|
3
|
-
import { GridFSFileUploadsModule } from './index.
|
|
1
|
+
import { type IFileAdapter } from '@unchainedshop/file-upload';
|
|
2
|
+
import { type UnchainedCore } from '@unchainedshop/core';
|
|
3
|
+
import { type GridFSFileUploadsModule } from './index.ts';
|
|
4
4
|
export declare const GridFSAdapter: IFileAdapter<UnchainedCore & {
|
|
5
5
|
modules: GridFSFileUploadsModule;
|
|
6
6
|
}>;
|
|
7
|
-
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -2,8 +2,11 @@ import { Readable, PassThrough } from 'node:stream';
|
|
|
2
2
|
import { finished, pipeline } from 'node:stream/promises';
|
|
3
3
|
import mime from 'mime/lite';
|
|
4
4
|
import { FileAdapter, FileDirector, buildHashedFilename, resolveExpirationDate, } from '@unchainedshop/file-upload';
|
|
5
|
-
import
|
|
5
|
+
import {} from '@unchainedshop/file-upload';
|
|
6
|
+
import sign from "./sign.js";
|
|
6
7
|
import { filesSettings } from '@unchainedshop/core-files';
|
|
8
|
+
import {} from '@unchainedshop/core';
|
|
9
|
+
import {} from "./index.js";
|
|
7
10
|
const { GRIDFS_PUT_SERVER_PATH = '/gridfs' } = process.env;
|
|
8
11
|
const { ROOT_URL } = process.env;
|
|
9
12
|
const bufferToStream = (buffer) => {
|
|
@@ -18,7 +21,6 @@ export const GridFSAdapter = {
|
|
|
18
21
|
version: '1.0.0',
|
|
19
22
|
...FileAdapter,
|
|
20
23
|
async createDownloadURL(file, expiry) {
|
|
21
|
-
// If public, just return the stored path from the db
|
|
22
24
|
if (!file?.meta?.isPrivate)
|
|
23
25
|
return file?.url || null;
|
|
24
26
|
const expiryTimestamp = expiry ||
|
|
@@ -62,11 +64,10 @@ export const GridFSAdapter = {
|
|
|
62
64
|
const type = mime.getType(fileName) || (await Promise.resolve(rawFile)).mimetype;
|
|
63
65
|
const writeStream = await modules.gridfsFileUploads.createWriteStream(directoryName, fileId || hashedFilename, fileName, {
|
|
64
66
|
metadata: { 'content-type': type },
|
|
65
|
-
chunkSizeBytes: 1024 * 1024,
|
|
67
|
+
chunkSizeBytes: 1024 * 1024,
|
|
66
68
|
...options,
|
|
67
69
|
});
|
|
68
|
-
await pipeline(stream, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }),
|
|
69
|
-
writeStream);
|
|
70
|
+
await pipeline(stream, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }), writeStream);
|
|
70
71
|
await finished(writeStream, { readable: false });
|
|
71
72
|
const { length } = writeStream;
|
|
72
73
|
const url = `${GRIDFS_PUT_SERVER_PATH}/${directoryName}/${encodeURIComponent(hashedFilename)}`;
|
|
@@ -114,4 +115,3 @@ export const GridFSAdapter = {
|
|
|
114
115
|
},
|
|
115
116
|
};
|
|
116
117
|
FileDirector.registerAdapter(GridFSAdapter);
|
|
117
|
-
//# sourceMappingURL=adapter.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
-
import { GridFSFileUploadsModule } from './module.
|
|
3
|
-
import { Context } from '@unchainedshop/api';
|
|
2
|
+
import { type GridFSFileUploadsModule } from './module.ts';
|
|
3
|
+
import { type Context } from '@unchainedshop/api';
|
|
4
4
|
declare const gridfsHandler: (req: express.Request & {
|
|
5
5
|
unchainedContext: Context & {
|
|
6
6
|
modules: GridFSFileUploadsModule;
|
|
7
7
|
};
|
|
8
8
|
}, res: express.Response) => Promise<void>;
|
|
9
9
|
export default gridfsHandler;
|
|
10
|
-
//# sourceMappingURL=handler-express.d.ts.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { pipeline, finished } from 'node:stream/promises';
|
|
2
2
|
import { PassThrough } from 'node:stream';
|
|
3
3
|
import { buildHashedFilename } from '@unchainedshop/file-upload';
|
|
4
|
-
import
|
|
4
|
+
import express from 'express';
|
|
5
|
+
import sign from "./sign.js";
|
|
6
|
+
import {} from "./module.js";
|
|
7
|
+
import {} from '@unchainedshop/api';
|
|
5
8
|
import { createLogger } from '@unchainedshop/logger';
|
|
6
9
|
import { getFileAdapter } from '@unchainedshop/core-files';
|
|
7
10
|
const { ROOT_URL, GRIDFS_PUT_SERVER_PATH = '/gridfs' } = process.env;
|
|
@@ -13,8 +16,6 @@ const gridfsHandler = async (req, res) => {
|
|
|
13
16
|
const [, directoryNameRaw, fileNameRaw] = url.pathname.split('/');
|
|
14
17
|
const directoryName = decodeURIComponent(directoryNameRaw);
|
|
15
18
|
const fileName = decodeURIComponent(fileNameRaw);
|
|
16
|
-
/* This is a file upload endpoint, and thus we need to allow CORS.
|
|
17
|
-
else we'd need proxies for all kinds of things for storefronts */
|
|
18
19
|
res.setHeader('Access-Control-Allow-Methods', 'GET, PUT');
|
|
19
20
|
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
20
21
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
@@ -36,17 +37,14 @@ const gridfsHandler = async (req, res) => {
|
|
|
36
37
|
res.status(400).send('File already linked');
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
// If the type is octet-stream, prefer mimetype lookup from the filename
|
|
40
|
-
// Else prefer the content-type header
|
|
41
40
|
const type = req.header('Content-Type') === 'application/octet-stream'
|
|
42
41
|
? file.type || req.header('Content-Type')
|
|
43
42
|
: req.header('Content-Type') || file.type;
|
|
44
43
|
const writeStream = await modules.gridfsFileUploads.createWriteStream(directoryName, fileId, fileName, {
|
|
45
|
-
chunkSizeBytes: 1024 * 1024,
|
|
44
|
+
chunkSizeBytes: 1024 * 1024,
|
|
46
45
|
metadata: { 'content-type': type },
|
|
47
46
|
});
|
|
48
|
-
await pipeline(req, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }),
|
|
49
|
-
writeStream);
|
|
47
|
+
await pipeline(req, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }), writeStream);
|
|
50
48
|
await finished(writeStream, { readable: false });
|
|
51
49
|
const { length } = writeStream;
|
|
52
50
|
await services.files.linkFile({ fileId, size: length, type });
|
|
@@ -105,4 +103,3 @@ const gridfsHandler = async (req, res) => {
|
|
|
105
103
|
}
|
|
106
104
|
};
|
|
107
105
|
export default gridfsHandler;
|
|
108
|
-
//# sourceMappingURL=handler-express.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { finished, pipeline } from 'node:stream/promises';
|
|
2
2
|
import { PassThrough } from 'node:stream';
|
|
3
|
+
import {} from 'fastify';
|
|
3
4
|
import { buildHashedFilename } from '@unchainedshop/file-upload';
|
|
4
|
-
import sign from
|
|
5
|
+
import sign from "./sign.js";
|
|
6
|
+
import {} from "./module.js";
|
|
7
|
+
import {} from '@unchainedshop/api';
|
|
5
8
|
import { createLogger } from '@unchainedshop/logger';
|
|
6
9
|
import { getFileAdapter } from '@unchainedshop/core-files';
|
|
7
10
|
const logger = createLogger('unchained:gridfs');
|
|
@@ -10,8 +13,6 @@ const gridfsHandler = async (req, reply) => {
|
|
|
10
13
|
try {
|
|
11
14
|
const { services, modules } = req.unchainedContext;
|
|
12
15
|
const { directoryName, fileName } = req.params;
|
|
13
|
-
/* This is a file upload endpoint, and thus we need to allow CORS.
|
|
14
|
-
else we'd need proxies for all kinds of things for storefronts */
|
|
15
16
|
reply.header('Access-Control-Allow-Methods', 'GET, PUT');
|
|
16
17
|
reply.header('Access-Control-Allow-Headers', 'content-type');
|
|
17
18
|
reply.header('Access-Control-Allow-Origin', '*');
|
|
@@ -43,17 +44,14 @@ const gridfsHandler = async (req, reply) => {
|
|
|
43
44
|
name: 'FILE_ALREADY_LINKED',
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
// If the type is octet-stream, prefer mimetype lookup from the filename
|
|
47
|
-
// Else prefer the content-type header
|
|
48
47
|
const type = req.headers['content-type'] === 'application/octet-stream'
|
|
49
48
|
? file.type || req.headers['content-type']
|
|
50
49
|
: req.headers['content-type'] || file.type;
|
|
51
50
|
const writeStream = await modules.gridfsFileUploads.createWriteStream(directoryName, fileId, fileName, {
|
|
52
|
-
chunkSizeBytes: 1024 * 1024,
|
|
51
|
+
chunkSizeBytes: 1024 * 1024,
|
|
53
52
|
metadata: { 'content-type': type },
|
|
54
53
|
});
|
|
55
|
-
await pipeline(req.raw, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }),
|
|
56
|
-
writeStream);
|
|
54
|
+
await pipeline(req.raw, new PassThrough({ highWaterMark: 1024 * 1024 * 4 }), writeStream);
|
|
57
55
|
await finished(writeStream, { readable: false });
|
|
58
56
|
const { length } = writeStream;
|
|
59
57
|
await services.files.linkFile({ fileId, size: length, type });
|
|
@@ -133,4 +131,3 @@ const gridfsHandler = async (req, reply) => {
|
|
|
133
131
|
}
|
|
134
132
|
};
|
|
135
133
|
export default gridfsHandler;
|
|
136
|
-
//# sourceMappingURL=handler-fastify.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import './adapter.
|
|
2
|
-
import gridfsModules, { type GridFSFileUploadsModule } from './module.
|
|
1
|
+
import './adapter.ts';
|
|
2
|
+
import gridfsModules, { type GridFSFileUploadsModule } from './module.ts';
|
|
3
3
|
export type { GridFSFileUploadsModule };
|
|
4
4
|
export default gridfsModules;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { mongodb } from '@unchainedshop/mongodb';
|
|
2
2
|
export const configureGridFSFileUploadModule = ({ db }) => {
|
|
3
|
-
// eslint-disable-next-line
|
|
4
3
|
let { GridFSBucket } = mongodb;
|
|
5
4
|
return {
|
|
6
5
|
createWriteStream: async (directoryName, fileId, fileName, uploadOptions) => {
|
|
@@ -8,11 +7,9 @@ export const configureGridFSFileUploadModule = ({ db }) => {
|
|
|
8
7
|
const bucket = new GridFSBucket(db, options);
|
|
9
8
|
if (fileId) {
|
|
10
9
|
try {
|
|
11
|
-
// Try removing the target if it already exists
|
|
12
10
|
await bucket.delete(fileId);
|
|
13
11
|
}
|
|
14
12
|
catch {
|
|
15
|
-
/* */
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
15
|
return bucket.openUploadStreamWithId(fileId, fileName, uploadOptions);
|
|
@@ -39,4 +36,3 @@ export default {
|
|
|
39
36
|
configure: configureGridFSFileUploadModule,
|
|
40
37
|
},
|
|
41
38
|
};
|
|
42
|
-
//# sourceMappingURL=module.js.map
|
package/lib/files/gridfs/sign.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import {} from '@unchainedshop/api';
|
|
1
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
|
+
import {} from 'fastify';
|
|
2
4
|
const logger = createLogger('unchained:minio');
|
|
3
5
|
const { MINIO_WEBHOOK_AUTH_TOKEN } = process.env;
|
|
4
6
|
const isAuthorized = ({ authorization = '' }) => {
|
|
@@ -31,4 +33,3 @@ const minioHandler = async (req, res) => {
|
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
35
|
export default minioHandler;
|
|
34
|
-
//# sourceMappingURL=handler-fastify.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IFileAdapter } from '@unchainedshop/file-upload';
|
|
1
|
+
import { type IFileAdapter } from '@unchainedshop/file-upload';
|
|
2
2
|
import { Client } from 'minio';
|
|
3
3
|
export declare function connectToMinio(): Promise<Client | null>;
|
|
4
4
|
export declare const MinioAdapter: IFileAdapter;
|
|
5
5
|
export default MinioAdapter;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/files/minio/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
+
import {} from '@unchainedshop/file-upload';
|
|
2
3
|
import { FileAdapter, FileDirector, buildHashedFilename, resolveExpirationDate, } from '@unchainedshop/file-upload';
|
|
3
4
|
import mime from 'mime/lite';
|
|
4
5
|
import { Client } from 'minio';
|
|
@@ -24,8 +25,6 @@ export async function connectToMinio() {
|
|
|
24
25
|
accessKey: MINIO_ACCESS_KEY,
|
|
25
26
|
secretKey: MINIO_SECRET_KEY,
|
|
26
27
|
});
|
|
27
|
-
// eslint-disable-next-line
|
|
28
|
-
// @ts-ignore
|
|
29
28
|
if (NODE_ENV === 'development')
|
|
30
29
|
minioClient?.traceOn(process.stdout);
|
|
31
30
|
if (MINIO_STS_ENDPOINT) {
|
|
@@ -34,8 +33,6 @@ export async function connectToMinio() {
|
|
|
34
33
|
accessKey: MINIO_ACCESS_KEY,
|
|
35
34
|
secretKey: MINIO_SECRET_KEY,
|
|
36
35
|
});
|
|
37
|
-
// eslint-disable-next-line
|
|
38
|
-
// @ts-ignore
|
|
39
36
|
await minioClient.setCredentialsProvider(ap);
|
|
40
37
|
}
|
|
41
38
|
return minioClient;
|
|
@@ -165,4 +162,3 @@ export const MinioAdapter = {
|
|
|
165
162
|
};
|
|
166
163
|
FileDirector.registerAdapter(MinioAdapter);
|
|
167
164
|
export default MinioAdapter;
|
|
168
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -12,17 +12,13 @@ const LocalSearch = {
|
|
|
12
12
|
return {
|
|
13
13
|
...FilterAdapter.actions(params),
|
|
14
14
|
searchProducts: async ({ productIds }) => {
|
|
15
|
-
// Search Products
|
|
16
15
|
const { queryString } = params.searchQuery;
|
|
17
16
|
if (!queryString)
|
|
18
17
|
return productIds;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
selector.productId = { $in: [...new Set(productIds)] };
|
|
24
|
-
}
|
|
25
|
-
const products = await params.modules.products.texts.findTexts(selector, {
|
|
18
|
+
const products = await params.modules.products.texts.findTexts({
|
|
19
|
+
queryString,
|
|
20
|
+
productIds: productIds ? [...new Set(productIds)] : undefined,
|
|
21
|
+
}, {
|
|
26
22
|
projection: {
|
|
27
23
|
productId: 1,
|
|
28
24
|
},
|
|
@@ -34,13 +30,10 @@ const LocalSearch = {
|
|
|
34
30
|
if (!queryString) {
|
|
35
31
|
return assortmentIds;
|
|
36
32
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
selector.assortmentId = { $in: assortmentIds };
|
|
42
|
-
}
|
|
43
|
-
const assortments = await params.modules.assortments.texts.findTexts(selector, {
|
|
33
|
+
const assortments = await params.modules.assortments.texts.findTexts({
|
|
34
|
+
queryString,
|
|
35
|
+
assortmentIds,
|
|
36
|
+
}, {
|
|
44
37
|
projection: {
|
|
45
38
|
assortmentId: 1,
|
|
46
39
|
},
|
|
@@ -50,15 +43,11 @@ const LocalSearch = {
|
|
|
50
43
|
async transformFilterSelector(last) {
|
|
51
44
|
const { queryString, filterIds, includeInactive } = params.searchQuery;
|
|
52
45
|
if (queryString && !filterIds) {
|
|
53
|
-
// Global search without assortment scope:
|
|
54
|
-
// Return all filters
|
|
55
46
|
const selector = { ...last };
|
|
56
47
|
if (selector?.key) {
|
|
57
|
-
// Do not restrict to keys
|
|
58
48
|
delete selector.key;
|
|
59
49
|
}
|
|
60
50
|
if (!includeInactive) {
|
|
61
|
-
// Include only active filters
|
|
62
51
|
selector.isActive = true;
|
|
63
52
|
}
|
|
64
53
|
return selector;
|
|
@@ -75,4 +64,3 @@ if (!isDocumentDBCompatModeEnabled()) {
|
|
|
75
64
|
else {
|
|
76
65
|
logger.warn('Free text search queries have been disabled due to DocumentDB compatibility mode (env UNCHAINED_DOCUMENTDB_COMPAT_MODE is trueish)');
|
|
77
66
|
}
|
|
78
|
-
//# sourceMappingURL=local-search.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PaymentAdapter, PaymentDirector, PaymentError } from '@unchainedshop/core';
|
|
1
|
+
import { PaymentAdapter, PaymentDirector, PaymentError, } from '@unchainedshop/core';
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
|
-
import {
|
|
3
|
+
import {} from "./module.js";
|
|
4
|
+
import { verifyReceipt } from "./verify-receipt.js";
|
|
4
5
|
const logger = createLogger('unchained:apple-iap');
|
|
5
6
|
const { APPLE_IAP_SHARED_SECRET } = process.env;
|
|
6
7
|
const AppleIAP = {
|
|
@@ -34,7 +35,6 @@ const AppleIAP = {
|
|
|
34
35
|
throw new Error('Payment signing not supported');
|
|
35
36
|
},
|
|
36
37
|
async validate() {
|
|
37
|
-
// once registered receipt transactions are valid by default!
|
|
38
38
|
return true;
|
|
39
39
|
},
|
|
40
40
|
async register(transactionContext) {
|
|
@@ -98,7 +98,6 @@ const AppleIAP = {
|
|
|
98
98
|
const alreadyProcessedTransaction = await modules.appleTransactions.findTransactionById(transactionIdentifier);
|
|
99
99
|
if (alreadyProcessedTransaction)
|
|
100
100
|
throw new Error('Transaction already processed');
|
|
101
|
-
// All good
|
|
102
101
|
await modules.appleTransactions.createTransaction({
|
|
103
102
|
_id: transactionIdentifier,
|
|
104
103
|
matchedTransaction,
|
|
@@ -113,4 +112,3 @@ const AppleIAP = {
|
|
|
113
112
|
},
|
|
114
113
|
};
|
|
115
114
|
PaymentDirector.registerAdapter(AppleIAP);
|
|
116
|
-
//# sourceMappingURL=adapter.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { mongodb } from '@unchainedshop/mongodb';
|
|
2
|
-
import { TimestampFields } from '@unchainedshop/mongodb';
|
|
2
|
+
import { type TimestampFields } from '@unchainedshop/mongodb';
|
|
3
3
|
export type AppleTransaction = {
|
|
4
4
|
_id: string;
|
|
5
5
|
matchedTransaction: any;
|
|
6
6
|
orderId: string;
|
|
7
7
|
} & TimestampFields;
|
|
8
8
|
export declare const AppleTransactionsCollection: (db: mongodb.Db) => Promise<mongodb.Collection<AppleTransaction>>;
|
|
9
|
-
//# sourceMappingURL=AppleTransactionsCollection.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { mongodb } from '@unchainedshop/mongodb';
|
|
2
|
+
import {} from '@unchainedshop/mongodb';
|
|
1
3
|
export const AppleTransactionsCollection = async (db) => {
|
|
2
4
|
const AppleTransactions = db.collection('payment_apple_iap_processed_transactions');
|
|
3
5
|
return AppleTransactions;
|
|
4
6
|
};
|
|
5
|
-
//# sourceMappingURL=AppleTransactionsCollection.js.map
|