cloudcommerce 0.0.133 → 0.1.1
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/.vscode/settings.json +2 -1
- package/CHANGELOG.md +37 -0
- package/action.yml +13 -5
- package/ecomplus-stores/monocard/.vscode/settings.json +5 -1
- package/ecomplus-stores/monocard/functions/core/package.json +2 -2
- package/ecomplus-stores/monocard/functions/events/package.json +3 -3
- package/ecomplus-stores/monocard/functions/modules/package.json +3 -3
- package/ecomplus-stores/monocard/functions/passport/package.json +3 -3
- package/ecomplus-stores/monocard/functions/ssr/package.json +15 -11
- package/ecomplus-stores/monocard/functions/ssr/src/pages/_vue.ts +3 -0
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.firebaserc +5 -0
- package/ecomplus-stores/tia-sonia/.vscode/settings.json +5 -1
- package/ecomplus-stores/tia-sonia/functions/config.json +2 -2
- package/ecomplus-stores/tia-sonia/functions/core/package.json +2 -2
- package/ecomplus-stores/tia-sonia/functions/events/package.json +3 -3
- package/ecomplus-stores/tia-sonia/functions/modules/package.json +3 -3
- package/ecomplus-stores/tia-sonia/functions/passport/package.json +3 -3
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +15 -7
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/_vue.ts +3 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/scripts/InlineScripts.astro +6 -7
- package/ecomplus-stores/tia-sonia/package.json +1 -1
- package/package.json +8 -9
- package/packages/api/fetch-polyfill.js +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/tests/index.test.ts +0 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/CHANGELOG.md +1 -0
- package/packages/apps/custom-payment/README.md +1 -0
- package/packages/apps/custom-payment/lib/custom-payment-create-transaction.d.ts +68 -0
- package/packages/apps/custom-payment/lib/custom-payment-create-transaction.js +55 -0
- package/packages/apps/custom-payment/lib/custom-payment-create-transaction.js.map +1 -0
- package/packages/apps/custom-payment/lib/custom-payment-list-payments.d.ts +3 -0
- package/packages/apps/custom-payment/lib/custom-payment-list-payments.js +79 -0
- package/packages/apps/custom-payment/lib/custom-payment-list-payments.js.map +1 -0
- package/packages/apps/custom-payment/lib/custom-payment.d.ts +68 -0
- package/packages/apps/custom-payment/lib/custom-payment.js +11 -0
- package/packages/apps/custom-payment/lib/custom-payment.js.map +1 -0
- package/packages/apps/custom-payment/lib/index.d.ts +1 -0
- package/packages/apps/custom-payment/lib/index.js +2 -0
- package/packages/apps/custom-payment/lib/index.js.map +1 -0
- package/packages/apps/custom-payment/package.json +27 -0
- package/packages/apps/custom-payment/src/custom-payment-create-transaction.ts +67 -0
- package/packages/apps/custom-payment/src/custom-payment-list-payments.ts +96 -0
- package/packages/apps/custom-payment/src/custom-payment.ts +11 -0
- package/packages/apps/custom-payment/src/index.ts +1 -0
- package/packages/apps/custom-payment/tsconfig.json +6 -0
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +2 -2
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/CHANGELOG.md +1 -0
- package/packages/apps/galaxpay/README.md +1 -0
- package/packages/apps/galaxpay/assets/onload-expression.js +23 -0
- package/packages/apps/galaxpay/events.js +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/all-parses.d.ts +5 -0
- package/packages/apps/galaxpay/lib/functions-lib/all-parses.js +79 -0
- package/packages/apps/galaxpay/lib/functions-lib/all-parses.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.d.ts +3 -0
- package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js +75 -0
- package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.d.ts +11 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.js +60 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-axios.d.ts +2 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-axios.js +20 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-axios.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/gerate-token.d.ts +2 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/gerate-token.js +32 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/gerate-token.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.d.ts +30 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.js +73 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.d.ts +8 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js +56 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.d.ts +3 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js +291 -0
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js.map +1 -0
- package/packages/apps/galaxpay/lib/functions-lib/utils.d.ts +8 -0
- package/packages/apps/galaxpay/lib/functions-lib/utils.js +17 -0
- package/packages/apps/galaxpay/lib/functions-lib/utils.js.map +1 -0
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.d.ts +71 -0
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js +199 -0
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js.map +1 -0
- package/packages/apps/galaxpay/lib/galaxpay-events.d.ts +6 -0
- package/packages/apps/galaxpay/lib/galaxpay-events.js +21 -0
- package/packages/apps/galaxpay/lib/galaxpay-events.js.map +1 -0
- package/packages/apps/galaxpay/lib/galaxpay-list-payments.d.ts +7 -0
- package/packages/apps/galaxpay/lib/galaxpay-list-payments.js +105 -0
- package/packages/apps/galaxpay/lib/galaxpay-list-payments.js.map +1 -0
- package/packages/apps/galaxpay/lib/galaxpay.d.ts +76 -0
- package/packages/apps/galaxpay/lib/galaxpay.js +12 -0
- package/packages/apps/galaxpay/lib/galaxpay.js.map +1 -0
- package/packages/apps/galaxpay/lib/index.d.ts +1 -0
- package/packages/apps/galaxpay/lib/index.js +3 -0
- package/packages/apps/galaxpay/lib/index.js.map +1 -0
- package/packages/apps/galaxpay/package.json +36 -0
- package/packages/apps/galaxpay/scripts/build.sh +5 -0
- package/packages/apps/galaxpay/src/functions-lib/all-parses.ts +91 -0
- package/packages/apps/galaxpay/src/functions-lib/ecom/events-to-galaxpay.ts +85 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/auth/create-access.ts +80 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/auth/create-axios.ts +21 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/auth/gerate-token.ts +36 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/handle-plans.ts +92 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/update-subscription.ts +73 -0
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/webhook.ts +381 -0
- package/packages/apps/galaxpay/src/functions-lib/utils.ts +23 -0
- package/packages/apps/galaxpay/src/galaxpay-create-transaction.ts +240 -0
- package/packages/apps/galaxpay/src/galaxpay-events.ts +28 -0
- package/packages/apps/galaxpay/src/galaxpay-list-payments.ts +130 -0
- package/packages/apps/galaxpay/src/galaxpay.ts +12 -0
- package/packages/apps/galaxpay/src/index.ts +2 -0
- package/packages/apps/galaxpay/tsconfig.json +6 -0
- package/packages/apps/galaxpay/types/config-app.d.ts +99 -0
- package/packages/apps/infinitepay/lib/infinitepay.js +1 -2
- package/packages/apps/infinitepay/lib/infinitepay.js.map +1 -1
- package/packages/apps/infinitepay/lib/ip-create-transaction.d.ts +1 -2
- package/packages/apps/infinitepay/lib/ip-create-transaction.js +3 -2
- package/packages/apps/infinitepay/lib/ip-create-transaction.js.map +1 -1
- package/packages/apps/infinitepay/lib/ip-list-payments.d.ts +1 -2
- package/packages/apps/infinitepay/lib/ip-list-payments.js.map +1 -1
- package/packages/apps/infinitepay/package.json +3 -3
- package/packages/apps/infinitepay/src/infinitepay.ts +1 -2
- package/packages/apps/infinitepay/src/ip-create-transaction.ts +8 -6
- package/packages/apps/infinitepay/src/ip-list-payments.ts +5 -3
- package/packages/apps/jadlog/CHANGELOG.md +1 -0
- package/packages/apps/jadlog/README.md +1 -0
- package/packages/apps/jadlog/lib/index.d.ts +1 -0
- package/packages/apps/jadlog/lib/index.js +2 -0
- package/packages/apps/jadlog/lib/index.js.map +1 -0
- package/packages/apps/jadlog/lib/jadlog.d.ts +2 -0
- package/packages/apps/jadlog/lib/jadlog.js +6 -0
- package/packages/apps/jadlog/lib/jadlog.js.map +1 -0
- package/packages/apps/jadlog/lib-mjs/calculate-jadlog.mjs +408 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-0.mjs +147 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-1.mjs +1149 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-2.mjs +1137 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-3.mjs +1638 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-4.mjs +1089 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-5.mjs +1101 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-6.mjs +1893 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-7.mjs +1371 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-8.mjs +1401 -0
- package/packages/apps/jadlog/lib-mjs/deadlines/range-9.mjs +963 -0
- package/packages/apps/jadlog/lib-mjs/jadlog-get-deadlines.mjs +32 -0
- package/packages/apps/jadlog/package.json +28 -0
- package/packages/apps/jadlog/src/index.ts +1 -0
- package/packages/apps/jadlog/src/jadlog.ts +7 -0
- package/packages/apps/jadlog/tsconfig.json +6 -0
- package/packages/apps/loyalty-points/CHANGELOG.md +1 -0
- package/packages/apps/loyalty-points/README.md +1 -0
- package/packages/apps/loyalty-points/events.js +1 -0
- package/packages/apps/loyalty-points/lib/functions-lib/get-program-id.d.ts +5 -0
- package/packages/apps/loyalty-points/lib/functions-lib/get-program-id.js +20 -0
- package/packages/apps/loyalty-points/lib/functions-lib/get-program-id.js.map +1 -0
- package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.d.ts +3 -0
- package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js +172 -0
- package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js.map +1 -0
- package/packages/apps/loyalty-points/lib/index.d.ts +1 -0
- package/packages/apps/loyalty-points/lib/index.js +2 -0
- package/packages/apps/loyalty-points/lib/index.js.map +1 -0
- package/packages/apps/loyalty-points/lib/loyalty-create-transaction.d.ts +76 -0
- package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js +210 -0
- package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js.map +1 -0
- package/packages/apps/loyalty-points/lib/loyalty-list-payments.d.ts +3 -0
- package/packages/apps/loyalty-points/lib/loyalty-list-payments.js +44 -0
- package/packages/apps/loyalty-points/lib/loyalty-list-payments.js.map +1 -0
- package/packages/apps/loyalty-points/lib/loyalty-points-events.d.ts +4 -0
- package/packages/apps/loyalty-points/lib/loyalty-points-events.js +28 -0
- package/packages/apps/loyalty-points/lib/loyalty-points-events.js.map +1 -0
- package/packages/apps/loyalty-points/lib/loyalty-points.d.ts +77 -0
- package/packages/apps/loyalty-points/lib/loyalty-points.js +12 -0
- package/packages/apps/loyalty-points/lib/loyalty-points.js.map +1 -0
- package/packages/apps/loyalty-points/package.json +32 -0
- package/packages/apps/loyalty-points/src/functions-lib/get-program-id.ts +23 -0
- package/packages/apps/loyalty-points/src/functions-lib/handle-loyalty-points-event.ts +207 -0
- package/packages/apps/loyalty-points/src/index.ts +1 -0
- package/packages/apps/loyalty-points/src/loyalty-create-transaction.ts +241 -0
- package/packages/apps/loyalty-points/src/loyalty-list-payments.ts +55 -0
- package/packages/apps/loyalty-points/src/loyalty-points-events.ts +41 -0
- package/packages/apps/loyalty-points/src/loyalty-points.ts +12 -0
- package/packages/apps/loyalty-points/tsconfig.json +6 -0
- package/packages/apps/mercadopago/lib/mercadopago.js +1 -2
- package/packages/apps/mercadopago/lib/mercadopago.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-create-transaction.d.ts +1 -2
- package/packages/apps/mercadopago/lib/mp-create-transaction.js +3 -2
- package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-list-payments.d.ts +1 -2
- package/packages/apps/mercadopago/lib/mp-list-payments.js +2 -1
- package/packages/apps/mercadopago/lib/mp-list-payments.js.map +1 -1
- package/packages/apps/mercadopago/package.json +3 -3
- package/packages/apps/mercadopago/src/mercadopago.ts +1 -2
- package/packages/apps/mercadopago/src/mp-create-transaction.ts +12 -10
- package/packages/apps/mercadopago/src/mp-list-payments.ts +9 -7
- package/packages/apps/pagarme/lib/pagarme-create-transaction.js.map +1 -1
- package/packages/apps/pagarme/lib/pagarme-list-payments.d.ts +1 -2
- package/packages/apps/pagarme/lib/pagarme-list-payments.js.map +1 -1
- package/packages/apps/pagarme/package.json +3 -3
- package/packages/apps/pagarme/src/pagarme-create-transaction.ts +5 -3
- package/packages/apps/pagarme/src/pagarme-list-payments.ts +5 -3
- package/packages/apps/pix/lib/functions-lib/pix-auth/construtor.js +1 -1
- package/packages/apps/pix/lib/functions-lib/pix-auth/construtor.js.map +1 -1
- package/packages/apps/pix/lib/pix-create-transaction.d.ts +1 -2
- package/packages/apps/pix/lib/pix-create-transaction.js +6 -5
- package/packages/apps/pix/lib/pix-create-transaction.js.map +1 -1
- package/packages/apps/pix/lib/pix-list-payments.d.ts +1 -2
- package/packages/apps/pix/lib/pix-list-payments.js.map +1 -1
- package/packages/apps/pix/lib/pix-webhook.js +1 -1
- package/packages/apps/pix/lib/pix-webhook.js.map +1 -1
- package/packages/apps/pix/lib/pix.js +1 -2
- package/packages/apps/pix/lib/pix.js.map +1 -1
- package/packages/apps/pix/package.json +3 -3
- package/packages/apps/pix/src/functions-lib/pix-auth/construtor.ts +1 -1
- package/packages/apps/pix/src/pix-create-transaction.ts +10 -9
- package/packages/apps/pix/src/pix-list-payments.ts +5 -3
- package/packages/apps/pix/src/pix-webhook.ts +1 -1
- package/packages/apps/pix/src/pix.ts +1 -2
- package/packages/apps/tiny-erp/package.json +3 -3
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/events/lib/firebase.js +4 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +5 -3
- package/packages/events/src/firebase.ts +4 -0
- package/packages/firebase/lib/config.d.ts +14 -0
- package/packages/firebase/lib/config.js +21 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/init.d.ts +0 -1
- package/packages/firebase/lib/init.js +0 -1
- package/packages/firebase/lib/init.js.map +1 -1
- package/packages/firebase/package.json +3 -4
- package/packages/firebase/src/config.ts +23 -0
- package/packages/firebase/src/init.ts +0 -1
- package/packages/i18n/lib/en_us/i19get$1back.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +1 -0
- package/packages/i18n/lib/en_us.js +1 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19get$1back.txt +1 -0
- package/packages/i18n/lib/pt_br/i19get.txt +1 -1
- package/packages/i18n/lib/pt_br.d.ts +2 -1
- package/packages/i18n/lib/pt_br.js +2 -1
- package/packages/i18n/lib/pt_br.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/src/en_us.ts +1 -0
- package/packages/i18n/src/pt_br.ts +2 -1
- package/packages/modules/lib/firebase/call-app-module.js +83 -51
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/package.json +7 -3
- package/packages/modules/src/firebase/call-app-module.ts +49 -24
- package/packages/passport/package.json +3 -3
- package/packages/ssr/lib/firebase.js +1 -2
- package/packages/ssr/lib/firebase.js.map +1 -1
- package/packages/ssr/package.json +5 -5
- package/packages/ssr/src/firebase.ts +1 -2
- package/packages/storefront/.eslintrc.cjs +1 -1
- package/packages/storefront/.nvmrc +1 -0
- package/packages/storefront/dist/client/HeaderButtons.8acf8a3b.js +1 -0
- package/packages/storefront/dist/client/Prices.9099fe99.js +1 -0
- package/packages/storefront/dist/client/ProductCard.7b68cc35.js +1 -0
- package/packages/storefront/dist/client/assets/_...slug_.f19a16ca.css +1 -0
- package/packages/storefront/dist/client/assets/index.e6a09532.css +1 -0
- package/packages/storefront/dist/client/assets/server.55b8d73d.css +1 -0
- package/packages/storefront/dist/client/chunks/HeaderButtons.cbbb059d.js +1 -0
- package/packages/storefront/dist/client/chunks/{LoginForm.83fec3a1.js → LoginForm.ac2f1b1f.js} +1 -1
- package/packages/storefront/dist/client/chunks/Prices.vue_vue_type_script_setup_true_lang.c37148c1.js +1 -0
- package/packages/storefront/dist/client/chunks/_plugin-vue_export-helper.5ccc5d75.js +1 -0
- package/packages/storefront/dist/client/chunks/{price.130e6005.js → price.ecf7fed4.js} +1 -1
- package/packages/storefront/dist/client/chunks/runtime-core.esm-bundler.d5646b29.js +1 -0
- package/packages/storefront/dist/client/client.9783ef49.js +1 -0
- package/packages/storefront/dist/client/hoisted.f6ee2883.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/entry.mjs +2400 -250
- package/packages/storefront/package.json +12 -9
- package/packages/storefront/src/lib/assets/base.css +4 -0
- package/packages/storefront/src/lib/components/Prices.vue +165 -0
- package/packages/storefront/src/lib/components/ProductCard.vue +36 -0
- package/packages/storefront/src/lib/components/globals/Fade.vue +171 -0
- package/packages/storefront/src/lib/composables/use-component-variant.ts +13 -0
- package/packages/storefront/src/lib/composables/use-prices.ts +172 -0
- package/packages/storefront/src/lib/layouts/BaseBody.astro +1 -0
- package/packages/storefront/src/lib/pages/_vue.ts +13 -1
- package/packages/storefront/src/lib/state/modules-info.ts +1 -1
- package/packages/storefront/src/vue-globals.d.ts +9 -2
- package/packages/storefront/tailwind.config.cjs +1 -0
- package/packages/storefront/uno.config.cjs +1 -0
- package/packages/types/package.json +1 -1
- package/store.renovate.json +2 -1
- package/packages/storefront/dist/client/HeaderButtons.1968a9ac.js +0 -1
- package/packages/storefront/dist/client/Price.c4aab3ea.js +0 -1
- package/packages/storefront/dist/client/assets/_...slug_.580c5aa4.css +0 -1
- package/packages/storefront/dist/client/chunks/HeaderButtons.5a0e371e.js +0 -1
- package/packages/storefront/dist/client/chunks/runtime-core.esm-bundler.4dae6bc1.js +0 -1
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.7a999c6c.js +0 -1
- package/packages/storefront/dist/client/client.79a40b9d.js +0 -1
- package/packages/storefront/dist/client/hoisted.cce93d56.js +0 -1
- package/packages/storefront/src/lib/components/Price/PriceCashback.vue +0 -13
- package/packages/storefront/src/lib/components/Price/PriceCompare.vue +0 -13
- package/packages/storefront/src/lib/components/Price/PriceDiscountLabel.vue +0 -13
- package/packages/storefront/src/lib/components/Price/PriceInstallments.vue +0 -13
- package/packages/storefront/src/lib/components/Price/PriceSale.vue +0 -13
- package/packages/storefront/src/lib/components/Price/PriceWithDiscount.vue +0 -13
- package/packages/storefront/src/lib/components/Price.vue +0 -57
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.1](https://github.com/ecomplus/cloud-commerce/compare/v0.1.0...v0.1.1) (2022-12-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **loyalty-points:** Setup loyalty points payment app from https://github.com/ecomplus/app-loyalty-points ([#92](https://github.com/ecomplus/cloud-commerce/issues/92)) ([f796092](https://github.com/ecomplus/cloud-commerce/commit/f796092efb52a22a10fb1f30e579fbc8b667097b))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **storefront:** Import `VTooltip` TS src (to be compiled) to prevent ESM error ([22a84f5](https://github.com/ecomplus/cloud-commerce/commit/22a84f5bbd8d548e505dfe52a7d2d9d0207fa9ba))
|
|
16
|
+
|
|
17
|
+
## [0.1.0](https://github.com/ecomplus/cloud-commerce/compare/v0.0.133...v0.1.0) (2022-12-21)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **custom-payment:** Setup custom payments app from https://github.com/ecomplus/app-custom-payment ([#93](https://github.com/ecomplus/cloud-commerce/issues/93)) ([402ea85](https://github.com/ecomplus/cloud-commerce/commit/402ea85aa8046365e4a4c033ad2ec2b2d8ed0fe3))
|
|
23
|
+
* **galaxpay:** Setup Galax Pay app from https://github.com/ecomplus/app-galaxpay ([#89](https://github.com/ecomplus/cloud-commerce/issues/89)) ([4ac160a](https://github.com/ecomplus/cloud-commerce/commit/4ac160afd9e4f71bbcf8c5c59b550cdcc6a866bf))
|
|
24
|
+
* **i18n:** Add `i19get$1back`, fix `i19get` pt ([d212189](https://github.com/ecomplus/cloud-commerce/commit/d212189d3debb139e522e3bb9f77a0625886a269))
|
|
25
|
+
* **jadlog:** Setup Jadlog app from https://github.com/ecomplus/app-jadlog ([c3f82e2](https://github.com/ecomplus/cloud-commerce/commit/c3f82e2771dbb24509d9c4a476b6fb69182d055f))
|
|
26
|
+
* **storefront:** Add global directive `v-tooltip` to default Vue instance ([3b41702](https://github.com/ecomplus/cloud-commerce/commit/3b41702503c87bcd17cc1d4e8266a168193e3184))
|
|
27
|
+
* **storefront:** Add new global `Fade` component to default Vue instance ([2124406](https://github.com/ecomplus/cloud-commerce/commit/2124406d61ca4109ebb096980827717b3c025ba4))
|
|
28
|
+
* **storefront:** Handle loyalty points on `usePrices` composable ([dd20816](https://github.com/ecomplus/cloud-commerce/commit/dd20816d57439b84672fc295ca03fbfb351003f6))
|
|
29
|
+
* **storefront:** New `speed` prop with slow and slower options for global Fade component ([5945059](https://github.com/ecomplus/cloud-commerce/commit/5945059cc4563d667e5e878c0c3a981735d4b5b7))
|
|
30
|
+
* **storefront:** Setup (almost) renderless `Prices` components, defining components API ([924dda0](https://github.com/ecomplus/cloud-commerce/commit/924dda02ab26582dac34af0ce7c239c30d4e9c56))
|
|
31
|
+
* **storefront:** Setup `usePrices` composable ([f03cca4](https://github.com/ecomplus/cloud-commerce/commit/f03cca4d9af32cde56078ae4410434df5d22e272))
|
|
32
|
+
* **storefront:** Update `Fade` component to change el height/width on tarnsition with slide ([9ff310e](https://github.com/ecomplus/cloud-commerce/commit/9ff310e3c70cbd09bbe074bf0acb5cb05c73429a))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **deps:** Update all non-major dependencies ([#94](https://github.com/ecomplus/cloud-commerce/issues/94)) ([f5abf55](https://github.com/ecomplus/cloud-commerce/commit/f5abf55dde1e216a4c22c2a96d0bf00146eafabd))
|
|
38
|
+
* **deps:** Update dependency @astrojs/node to v4 ([#95](https://github.com/ecomplus/cloud-commerce/issues/95)) ([7d69a3e](https://github.com/ecomplus/cloud-commerce/commit/7d69a3eed09230e5310b67aab1c1f5e512d5408d))
|
|
39
|
+
* **modules:** Skipping not implemented (external) apps por now ([2f139b6](https://github.com/ecomplus/cloud-commerce/commit/2f139b6c15e3c9131842d89a4cfedb4a36bdfb9c))
|
|
40
|
+
* **storefront:** Edit `usePrices` composable to peorperly handle optional product prop ([d528de2](https://github.com/ecomplus/cloud-commerce/commit/d528de2be354515680afa5540392539c0caf6e48))
|
|
41
|
+
|
|
5
42
|
### [0.0.133](https://github.com/ecomplus/cloud-commerce/compare/v0.0.132...v0.0.133) (2022-12-12)
|
|
6
43
|
|
|
7
44
|
|
package/action.yml
CHANGED
|
@@ -16,8 +16,6 @@ inputs:
|
|
|
16
16
|
required: true
|
|
17
17
|
ecom-store-id:
|
|
18
18
|
description: 'Store ID if not defined in config.json'
|
|
19
|
-
tiny-erp-token:
|
|
20
|
-
description: 'App: Tiny ERP API token'
|
|
21
19
|
mail-sender:
|
|
22
20
|
description: 'Emails: sender email'
|
|
23
21
|
mail-sender-name:
|
|
@@ -33,7 +31,13 @@ inputs:
|
|
|
33
31
|
smpt-pass:
|
|
34
32
|
description: 'Emails: SMTP password'
|
|
35
33
|
sendgrid-api-key:
|
|
36
|
-
description: '
|
|
34
|
+
description: 'App: SendGrid API key'
|
|
35
|
+
tiny-erp-token:
|
|
36
|
+
description: 'App: Tiny ERP API token'
|
|
37
|
+
galaxpay-partner-id:
|
|
38
|
+
description: 'App: Optional Galax Pay partner ID'
|
|
39
|
+
galaxpay-partner-hash:
|
|
40
|
+
description: 'App: Optional Galax Pay partner hash'
|
|
37
41
|
|
|
38
42
|
outputs: {}
|
|
39
43
|
|
|
@@ -74,7 +78,6 @@ runs:
|
|
|
74
78
|
FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
|
|
75
79
|
ECOM_AUTHENTICATION_ID: ${{ inputs.ecom-authentication-id }}
|
|
76
80
|
ECOM_API_KEY: ${{ inputs.ecom-api-key }}
|
|
77
|
-
TINY_ERP_TOKEN: ${{ inputs.tiny-erp-token }}
|
|
78
81
|
MAIL_SENDER: ${{ inputs.mail-sender }}
|
|
79
82
|
MAIL_SENDER_NAME: ${{ inputs.mail-sender-name }}
|
|
80
83
|
MAIL_REPLY_TO: ${{ inputs.mail-reply-to }}
|
|
@@ -83,6 +86,9 @@ runs:
|
|
|
83
86
|
SMTP_USER: ${{ inputs.smpt-user }}
|
|
84
87
|
SMTP_PASS: ${{ inputs.smpt-pass }}
|
|
85
88
|
SENDGRID_API_KEY: ${{ inputs.sendgrid-api-key }}
|
|
89
|
+
TINY_ERP_TOKEN: ${{ inputs.tiny-erp-token }}
|
|
90
|
+
GALAXPAY_PARTNER_ID: ${{ inputs.galaxpay-partner-id }}
|
|
91
|
+
GALAXPAY_PARTNER_HASH: ${{ inputs.galaxpay-partner-hash }}
|
|
86
92
|
|
|
87
93
|
run: |
|
|
88
94
|
export GAC_FILENAME=".gac-$RANDOM.json"
|
|
@@ -92,7 +98,6 @@ runs:
|
|
|
92
98
|
ECOM_API_KEY=$ECOM_API_KEY
|
|
93
99
|
ECOM_STORE_ID=$ECOM_STORE_ID
|
|
94
100
|
GITHUB_TOKEN=$GITHUB_TOKEN
|
|
95
|
-
TINY_ERP_TOKEN=$TINY_ERP_TOKEN
|
|
96
101
|
MAIL_SENDER=$MAIL_SENDER
|
|
97
102
|
MAIL_SENDER_NAME=$MAIL_SENDER_NAME
|
|
98
103
|
MAIL_REPLY_TO=$MAIL_REPLY_TO
|
|
@@ -101,6 +106,9 @@ runs:
|
|
|
101
106
|
SMTP_USER=$SMTP_USER
|
|
102
107
|
SMTP_PASS=$SMTP_PASS
|
|
103
108
|
SENDGRID_API_KEY=$SENDGRID_API_KEY
|
|
109
|
+
TINY_ERP_TOKEN=$TINY_ERP_TOKEN
|
|
110
|
+
GALAXPAY_PARTNER_ID=$GALAXPAY_PARTNER_ID
|
|
111
|
+
GALAXPAY_PARTNER_HASH=$GALAXPAY_PARTNER_HASH
|
|
104
112
|
" > functions/.env
|
|
105
113
|
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy
|
|
106
114
|
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.0
|
|
19
|
-
"@cloudcommerce/firebase": "^0.0
|
|
18
|
+
"@cloudcommerce/events": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/firebase": "^0.0
|
|
19
|
-
"@cloudcommerce/modules": "^0.0
|
|
18
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/modules": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/firebase": "^0.0
|
|
19
|
-
"@cloudcommerce/passport": "^0.0
|
|
18
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/passport": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -17,18 +17,22 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@astrojs/image": "^0.
|
|
21
|
-
"@astrojs/node": "^
|
|
22
|
-
"@cloudcommerce/api": "^0.0
|
|
23
|
-
"@cloudcommerce/firebase": "^0.0
|
|
24
|
-
"@cloudcommerce/ssr": "^0.0
|
|
20
|
+
"@astrojs/image": "^0.12.1",
|
|
21
|
+
"@astrojs/node": "^4.0.0",
|
|
22
|
+
"@cloudcommerce/api": "^0.1.0",
|
|
23
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
24
|
+
"@cloudcommerce/ssr": "^0.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@cloudcommerce/i18n": "^0.0
|
|
28
|
-
"@cloudcommerce/storefront": "^0.0
|
|
29
|
-
"@
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
27
|
+
"@cloudcommerce/i18n": "^0.1.0",
|
|
28
|
+
"@cloudcommerce/storefront": "^0.1.0",
|
|
29
|
+
"@cloudcommerce/types": "^0.1.0"
|
|
30
|
+
},
|
|
31
|
+
"pnpm": {
|
|
32
|
+
"peerDependencyRules": {
|
|
33
|
+
"ignoreMissing": [
|
|
34
|
+
"astro"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
}
|
|
2
|
+
"storeId": 1024
|
|
3
|
+
}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.0
|
|
19
|
-
"@cloudcommerce/firebase": "^0.0
|
|
18
|
+
"@cloudcommerce/events": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/firebase": "^0.0
|
|
19
|
-
"@cloudcommerce/modules": "^0.0
|
|
18
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/modules": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"logs": "firebase functions:log"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
14
|
+
"node": "18"
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/firebase": "^0.0
|
|
19
|
-
"@cloudcommerce/passport": "^0.0
|
|
18
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
19
|
+
"@cloudcommerce/passport": "^0.1.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -17,14 +17,22 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@astrojs/image": "^0.
|
|
21
|
-
"@astrojs/node": "^
|
|
22
|
-
"@cloudcommerce/api": "^0.0
|
|
23
|
-
"@cloudcommerce/firebase": "^0.0
|
|
24
|
-
"@cloudcommerce/ssr": "^0.0
|
|
20
|
+
"@astrojs/image": "^0.12.1",
|
|
21
|
+
"@astrojs/node": "^4.0.0",
|
|
22
|
+
"@cloudcommerce/api": "^0.1.0",
|
|
23
|
+
"@cloudcommerce/firebase": "^0.1.0",
|
|
24
|
+
"@cloudcommerce/ssr": "^0.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@cloudcommerce/i18n": "^0.0
|
|
28
|
-
"@cloudcommerce/storefront": "^0.0
|
|
27
|
+
"@cloudcommerce/i18n": "^0.1.0",
|
|
28
|
+
"@cloudcommerce/storefront": "^0.1.0",
|
|
29
|
+
"@cloudcommerce/types": "^0.1.0"
|
|
30
|
+
},
|
|
31
|
+
"pnpm": {
|
|
32
|
+
"peerDependencyRules": {
|
|
33
|
+
"ignoreMissing": [
|
|
34
|
+
"astro"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script is:inline>
|
|
2
2
|
window.firebaseConfig = {
|
|
3
|
-
apiKey:
|
|
4
|
-
authDomain:
|
|
5
|
-
projectId:
|
|
6
|
-
storageBucket:
|
|
7
|
-
messagingSenderId:
|
|
8
|
-
appId:
|
|
9
|
-
measurementId: 'G-SC592CE0GB',
|
|
3
|
+
apiKey: "AIzaSyDZ5QPJaLZM1bxEJyGbyK1weoBZ1TiLgFc",
|
|
4
|
+
authDomain: "ecom2-tiasonia.firebaseapp.com",
|
|
5
|
+
projectId: "ecom2-tiasonia",
|
|
6
|
+
storageBucket: "ecom2-tiasonia.appspot.com",
|
|
7
|
+
messagingSenderId: "895718193792",
|
|
8
|
+
appId: "1:895718193792:web:1d4fd74466248202994465"
|
|
10
9
|
};
|
|
11
10
|
</script>
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
|
|
6
6
|
"main": "packages/api/lib/index.js",
|
|
7
7
|
"author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
|
|
8
8
|
"license": "Apache 2.0 with Commons Clause",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
10
|
+
"node": ">=18",
|
|
11
11
|
"pnpm": ">=7"
|
|
12
12
|
},
|
|
13
13
|
"standard-version": {
|
|
@@ -19,23 +19,22 @@
|
|
|
19
19
|
"@commitlint/cli": "^17.3.0",
|
|
20
20
|
"@commitlint/config-conventional": "^17.3.0",
|
|
21
21
|
"@commitlint/rules": "^17.3.0",
|
|
22
|
-
"@types/node": "^18.11.
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^5.46.
|
|
24
|
-
"@typescript-eslint/parser": "^5.46.
|
|
25
|
-
"esbuild": "^0.16.
|
|
26
|
-
"eslint": "^8.
|
|
22
|
+
"@types/node": "^18.11.17",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
24
|
+
"@typescript-eslint/parser": "^5.46.1",
|
|
25
|
+
"esbuild": "^0.16.9",
|
|
26
|
+
"eslint": "^8.30.0",
|
|
27
27
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
28
28
|
"eslint-plugin-import": "^2.26.0",
|
|
29
29
|
"eslint-plugin-vue": "^9.8.0",
|
|
30
30
|
"husky": "^8.0.2",
|
|
31
|
-
"node-fetch": "^3.3.0",
|
|
32
31
|
"standard-version": "^9.5.0",
|
|
33
32
|
"ts-node": "^10.9.1",
|
|
34
33
|
"turbo": "^1.6.3",
|
|
35
34
|
"typescript": "^4.9.4",
|
|
36
35
|
"uglify-js": "^3.17.4",
|
|
37
36
|
"vite": "^3.2.5",
|
|
38
|
-
"vitest": "^0.
|
|
37
|
+
"vitest": "^0.26.0",
|
|
39
38
|
"zx": "^7.1.1"
|
|
40
39
|
},
|
|
41
40
|
"scripts": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Please refer to GitHub [repository releases](https://github.com/ecomplus/cloud-commerce/releases) or monorepo unified [CHANGELOG.md](https://github.com/ecomplus/cloud-commerce/blob/main/CHANGELOG.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# `@cloudcommerce/app-custom-payment`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AppModuleBody } from '@cloudcommerce/types';
|
|
2
|
+
declare const _default: (appData: AppModuleBody) => Promise<{
|
|
3
|
+
status: number;
|
|
4
|
+
redirect_to_payment: boolean;
|
|
5
|
+
transaction: {
|
|
6
|
+
payment_link?: string | undefined;
|
|
7
|
+
payment_instructions?: string | undefined;
|
|
8
|
+
intermediator?: {
|
|
9
|
+
transaction_id?: string | undefined;
|
|
10
|
+
transaction_code?: string | undefined;
|
|
11
|
+
transaction_reference?: string | undefined;
|
|
12
|
+
payment_method?: {
|
|
13
|
+
code: string;
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
buyer_id?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
credit_card?: {
|
|
19
|
+
holder_name?: string | undefined;
|
|
20
|
+
avs_result_code?: string | null | undefined;
|
|
21
|
+
cvv_result_code?: string | null | undefined;
|
|
22
|
+
bin?: number | undefined;
|
|
23
|
+
company?: string | undefined;
|
|
24
|
+
last_digits?: string | undefined;
|
|
25
|
+
token?: string | undefined;
|
|
26
|
+
error_code?: "incorrect_number" | "invalid_number" | "invalid_expiry_date" | "invalid_cvc" | "expired_card" | "incorrect_cvc" | "incorrect_zip" | "incorrect_address" | "card_declined" | "processing_error" | "call_issuer" | "pick_up_card" | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
banking_billet?: {
|
|
29
|
+
code?: string | undefined;
|
|
30
|
+
valid_thru?: string | undefined;
|
|
31
|
+
text_lines?: string[] | undefined;
|
|
32
|
+
link?: string | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
loyalty_points?: {
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
program_id: string;
|
|
37
|
+
points_value: number;
|
|
38
|
+
ratio?: number | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
currency_id?: string | undefined;
|
|
41
|
+
currency_symbol?: string | undefined;
|
|
42
|
+
discount?: number | undefined;
|
|
43
|
+
amount: number;
|
|
44
|
+
installments?: {
|
|
45
|
+
number: number;
|
|
46
|
+
value?: number | undefined;
|
|
47
|
+
tax?: boolean | undefined;
|
|
48
|
+
total?: number | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
creditor_fees?: {
|
|
51
|
+
installment?: number | undefined;
|
|
52
|
+
operational?: number | undefined;
|
|
53
|
+
intermediation?: number | undefined;
|
|
54
|
+
other?: number | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
status?: {
|
|
57
|
+
updated_at?: string | undefined;
|
|
58
|
+
current: "pending" | "under_analysis" | "authorized" | "unauthorized" | "paid" | "in_dispute" | "refunded" | "voided" | "unknown";
|
|
59
|
+
} | undefined;
|
|
60
|
+
flags?: string[] | undefined;
|
|
61
|
+
custom_fields?: {
|
|
62
|
+
field: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}[] | undefined;
|
|
65
|
+
notes?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
}>;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default async (appData) => {
|
|
2
|
+
// treat module request body
|
|
3
|
+
const { application } = appData;
|
|
4
|
+
const { params } = appData;
|
|
5
|
+
// app configured options
|
|
6
|
+
const configApp = { ...application.data, ...application.hidden_data };
|
|
7
|
+
const { amount, buyer } = params;
|
|
8
|
+
let paymentMethodName = params.payment_method.name;
|
|
9
|
+
if (paymentMethodName) {
|
|
10
|
+
[paymentMethodName] = paymentMethodName.split(' ::');
|
|
11
|
+
}
|
|
12
|
+
let notes;
|
|
13
|
+
let paymentLink;
|
|
14
|
+
if (Array.isArray(configApp.payment_options) && configApp.payment_options.length) {
|
|
15
|
+
let paymentOption = configApp.payment_options.find((paymentOptionFound) => {
|
|
16
|
+
const paymentMethod = paymentOptionFound.payment_method;
|
|
17
|
+
return paymentMethod
|
|
18
|
+
&& paymentMethod.code === params.payment_method.code
|
|
19
|
+
&& (!paymentMethod.name || paymentMethod.name === paymentMethodName);
|
|
20
|
+
});
|
|
21
|
+
if (!paymentOption) {
|
|
22
|
+
[paymentOption] = configApp.payment_options;
|
|
23
|
+
}
|
|
24
|
+
if (typeof paymentOption.text === 'string') {
|
|
25
|
+
notes = paymentOption.text.substring(0, 255);
|
|
26
|
+
}
|
|
27
|
+
if (typeof paymentOption.payment_link === 'string' && paymentOption.payment_link) {
|
|
28
|
+
paymentLink = paymentOption.payment_link
|
|
29
|
+
.replace(/{amount}/g, amount.total.toFixed(2).replace('.', ','))
|
|
30
|
+
.replace(/{email}/g, buyer.email);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const transaction = {
|
|
34
|
+
payment_link: paymentLink,
|
|
35
|
+
intermediator: {
|
|
36
|
+
payment_method: params.payment_method,
|
|
37
|
+
},
|
|
38
|
+
currency_id: params.currency_id,
|
|
39
|
+
currency_symbol: params.currency_symbol,
|
|
40
|
+
amount: amount.total,
|
|
41
|
+
status: {
|
|
42
|
+
current: 'pending',
|
|
43
|
+
},
|
|
44
|
+
flags: [
|
|
45
|
+
'app-custom-payments',
|
|
46
|
+
],
|
|
47
|
+
notes,
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
status: 200,
|
|
51
|
+
redirect_to_payment: Boolean(paymentLink),
|
|
52
|
+
transaction,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
// # sourceMappingURL=custom-payment-create-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-payment-create-transaction.js","sourceRoot":"","sources":["../src/custom-payment-create-transaction.ts"],"names":[],"mappings":"AAMA,eAAe,KAAK,EAAE,OAAsB,EAAE,EAAE;IAC9C,4BAA4B;IAC5B,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAChC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAiC,CAAC;IACzD,yBAAyB;IACzB,MAAM,SAAS,GAAG,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAEtE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEjC,IAAI,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC;IACnD,IAAI,iBAAiB,EAAE;QACrB,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACtD;IAED,IAAI,KAAyB,CAAC;IAC9B,IAAI,WAA+B,CAAC;IAEpC,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE;QAChF,IAAI,aAAa,GAAG,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,EAAE;YACxE,MAAM,aAAa,GAAG,kBAAkB,CAAC,cAAc,CAAC;YACxD,OAAO,aAAa;mBACf,aAAa,CAAC,IAAI,KAAK,MAAM,CAAC,cAAc,CAAC,IAAI;mBACjD,CAAC,CAAC,aAAa,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,EAAE;YAClB,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,eAAe,CAAC;SAC7C;QACD,IAAI,OAAO,aAAa,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1C,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAC9C;QACD,IAAI,OAAO,aAAa,CAAC,YAAY,KAAK,QAAQ,IAAI,aAAa,CAAC,YAAY,EAAE;YAChF,WAAW,GAAG,aAAa,CAAC,YAAY;iBACrC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;iBAC/D,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;SACrC;KACF;IAED,MAAM,WAAW,GAA6C;QAC5D,YAAY,EAAE,WAAW;QACzB,aAAa,EAAE;YACb,cAAc,EAAE,MAAM,CAAC,cAAc;SACtC;QACD,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,MAAM,EAAE,MAAM,CAAC,KAAK;QACpB,MAAM,EAAE;YACN,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,qBAAqB;SACtB;QACD,KAAK;KACN,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,GAAG;QACX,mBAAmB,EAAE,OAAO,CAAC,WAAW,CAAC;QACzC,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC"}
|