crmbonus-component-wake 2.1.41-ngrok → 2.1.41-shoulder
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/LICENSE +21 -21
- package/dist/cjs/app-modal.cjs.entry.js +2 -2
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/bc-crmbonus.cjs.entry.js +28 -0
- package/dist/cjs/bc-crmbonus.cjs.entry.js.map +1 -0
- package/dist/cjs/bc-phone-form_2.cjs.entry.js +333 -0
- package/dist/cjs/bc-phone-form_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bc-wake-crmbonus.cjs.entry.js +18 -0
- package/dist/cjs/bc-wake-crmbonus.cjs.entry.js.map +1 -0
- package/dist/cjs/cart.helper-d1f02660.js +201 -0
- package/dist/cjs/cart.helper-d1f02660.js.map +1 -0
- package/dist/cjs/container-empty.cjs.entry.js +2 -2
- package/dist/cjs/container-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/countdown-timer-v2.cjs.entry.js +2 -2
- package/dist/cjs/countdown-timer-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/countdown-timer_11.cjs.entry.js +55 -43
- package/dist/cjs/countdown-timer_11.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus-note.cjs.entry.js +14 -12
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/{components/p-0d09c221.js → cjs/crmbonus.service-ef8fe456.js} +30 -117
- package/dist/cjs/crmbonus.service-ef8fe456.js.map +1 -0
- package/dist/{esm/info.config.helper-e4b8c478.js → cjs/i18n-defaa4f8.js} +3 -30
- package/dist/cjs/i18n-defaa4f8.js.map +1 -0
- package/dist/cjs/{index-a7537457.js → index-e45b352e.js} +17 -1
- package/dist/cjs/index-e45b352e.js.map +1 -0
- package/dist/cjs/info.config.helper-52984ab9.js +36 -0
- package/dist/cjs/info.config.helper-52984ab9.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pedido-finalizado.cjs.entry.js +6 -5
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -1
- package/dist/cjs/utils-5d59acb1.js.map +1 -1
- package/dist/collection/assets/svg/money-dollars-svgrepo-com.svg +5 -5
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/button/crm-button.css +21 -21
- package/dist/collection/components/button/index.js +1 -1
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.v2.js +2 -2
- package/dist/collection/components/countdown-timer/countdown-timer.v2.js.map +1 -1
- package/dist/collection/components/crm-bonus/assets/logo.svg +17 -17
- package/dist/collection/components/crm-bonus/assets/svg/logo.svg +17 -17
- package/dist/collection/components/crm-bonus/crm-bonus.css +86 -82
- package/dist/collection/components/crm-bonus/crm-bonus.js +16 -7
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crmbonus/crmbonus.js +26 -0
- package/dist/collection/components/crmbonus/crmbonus.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/index.js +95 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/index.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/styles.scss +5 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/index.js +129 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/index.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/styles.scss +84 -0
- package/dist/collection/components/giftback-form/giftback-form.css +74 -74
- package/dist/collection/components/giftback-form/giftback-form.js +5 -5
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +181 -181
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +6 -6
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +83 -83
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -1
- package/dist/collection/components/loading-container/container-empty.js +1 -1
- package/dist/collection/components/loading-container/container-empty.js.map +1 -1
- package/dist/collection/components/loading-container/loading-container.css +53 -53
- package/dist/collection/components/loading-container/loading-container.js +1 -1
- package/dist/collection/components/loading-container/loading-container.js.map +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.css +16 -16
- package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.js.map +1 -1
- package/dist/collection/components/modal/app-modal.css +44 -44
- package/dist/collection/components/modal/app-modal.js +1 -1
- package/dist/collection/components/modal/app-modal.js.map +1 -1
- package/dist/collection/components/note/crm-bonus-note.css +68 -68
- package/dist/collection/components/note/crm-bonus-note.js +2 -2
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/collection/components/pedido/pedido.js +2 -2
- package/dist/collection/components/pedido/pedido.js.map +1 -1
- package/dist/collection/components/phone/phone-input-mask.css +40 -40
- package/dist/collection/components/phone/phone-input-mask.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
- package/dist/collection/components/tooltip/crm-tooltip.css +48 -48
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/contants/index.js.map +1 -1
- package/dist/collection/contants/mocks.js.map +1 -1
- package/dist/collection/dto/checkout.dto.js +2 -0
- package/dist/collection/dto/checkout.dto.js.map +1 -0
- package/dist/collection/dto/pin.sent.js.map +1 -1
- package/dist/collection/dto/reserved-info.dto.js.map +1 -1
- package/dist/collection/dto/update.order.dto.js.map +1 -1
- package/dist/collection/dto/validate.pin.bonus.js.map +1 -1
- package/dist/collection/helpers/build.payload.helper.js +1 -0
- package/dist/collection/helpers/build.payload.helper.js.map +1 -1
- package/dist/collection/helpers/cart.helper.js +55 -1
- package/dist/collection/helpers/cart.helper.js.map +1 -1
- package/dist/collection/helpers/info.config.helper.js.map +1 -1
- package/dist/collection/helpers/payload.interface.js.map +1 -1
- package/dist/collection/helpers/time.helper.js.map +1 -1
- package/dist/collection/i18n/i18n.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/objectvalues/cart.wake.js +33 -8
- package/dist/collection/objectvalues/cart.wake.js.map +1 -1
- package/dist/collection/platforms/wake/index.js +8 -0
- package/dist/collection/platforms/wake/index.js.map +1 -0
- package/dist/collection/services/crmbonus.service.js +21 -2
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/collection/utils/keys.storage.js.map +1 -1
- package/dist/collection/utils/retry.utils.js.map +1 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/app-modal.js +2 -2
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/bc-crmbonus.d.ts +11 -0
- package/dist/components/bc-crmbonus.js +8 -0
- package/dist/components/bc-crmbonus.js.map +1 -0
- package/dist/components/bc-phone-form.d.ts +11 -0
- package/dist/components/bc-phone-form.js +8 -0
- package/dist/components/bc-phone-form.js.map +1 -0
- package/dist/components/bc-phone-validate-pin-form.d.ts +11 -0
- package/dist/components/bc-phone-validate-pin-form.js +8 -0
- package/dist/components/bc-phone-validate-pin-form.js.map +1 -0
- package/dist/components/bc-wake-crmbonus.d.ts +11 -0
- package/dist/components/bc-wake-crmbonus.js +74 -0
- package/dist/components/bc-wake-crmbonus.js.map +1 -0
- package/dist/components/container-empty.js +2 -2
- package/dist/components/container-empty.js.map +1 -1
- package/dist/components/countdown-timer-v2.js +2 -2
- package/dist/components/countdown-timer-v2.js.map +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/crm-bonus-note.js +8 -7
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +30 -19
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.js +1 -1
- package/dist/components/crm-giftback-form.js +1 -1
- package/dist/components/crm-tooltip.js +1 -1
- package/dist/components/giftback-info.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/loading-container.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/p-06d73541.js +80 -0
- package/dist/components/p-06d73541.js.map +1 -0
- package/dist/components/p-09f86f1d.js +106 -0
- package/dist/components/p-09f86f1d.js.map +1 -0
- package/dist/components/p-1b441909.js.map +1 -1
- package/dist/components/p-2362455d.js +195 -0
- package/dist/components/p-2362455d.js.map +1 -0
- package/dist/components/p-2fac7f5e.js +78 -0
- package/dist/components/p-2fac7f5e.js.map +1 -0
- package/dist/components/{p-786485b2.js → p-39bd2459.js} +3 -3
- package/dist/components/p-39bd2459.js.map +1 -0
- package/dist/components/{p-144c34f6.js → p-496bc4af.js} +17 -16
- package/dist/components/p-496bc4af.js.map +1 -0
- package/dist/{esm/cart.helper-8c8d4a0a.js → components/p-60787be2.js} +25 -117
- package/dist/components/p-60787be2.js.map +1 -0
- package/dist/components/{p-0a7ccd8c.js → p-6aa17c2b.js} +6 -6
- package/dist/components/p-6aa17c2b.js.map +1 -0
- package/dist/components/{p-c250687d.js → p-80a69118.js} +4 -4
- package/dist/components/p-80a69118.js.map +1 -0
- package/dist/components/p-81e4e697.js +1298 -0
- package/dist/components/p-81e4e697.js.map +1 -0
- package/dist/components/{p-2cece106.js → p-8f45d088.js} +3 -3
- package/dist/components/p-8f45d088.js.map +1 -0
- package/dist/components/{p-9b5c07d8.js → p-9231dc5e.js} +4 -4
- package/dist/components/p-9231dc5e.js.map +1 -0
- package/dist/components/{p-3c8ae82e.js → p-ade5e41e.js} +11 -10
- package/dist/components/p-ade5e41e.js.map +1 -0
- package/dist/components/p-af3ba015.js.map +1 -1
- package/dist/components/{p-e6863cf5.js → p-bf1d624e.js} +6 -6
- package/dist/components/p-bf1d624e.js.map +1 -0
- package/dist/components/{p-8274e2c4.js → p-c1522ad8.js} +3 -3
- package/dist/components/p-c1522ad8.js.map +1 -0
- package/dist/components/p-c53241bf.js.map +1 -1
- package/dist/components/{p-11520f0f.js → p-eabf185c.js} +3 -3
- package/dist/components/p-eabf185c.js.map +1 -0
- package/dist/components/p-ecc51430.js.map +1 -1
- package/dist/components/{p-9d950d25.js → p-f58c9cb2.js} +2 -2
- package/dist/components/p-f58c9cb2.js.map +1 -0
- package/dist/components/pedido-finalizado.js +5 -4
- package/dist/components/pedido-finalizado.js.map +1 -1
- package/dist/components/phone-form.js +1 -1
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/pin-form.js +1 -1
- package/dist/crmbonus-component-wake/assets/logo.svg +17 -17
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/{p-ac027576.entry.js → p-06d494c4.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-06d494c4.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-8c362346.js → p-19848de4.js} +2 -2
- package/dist/crmbonus-component-wake/p-19848de4.js.map +1 -0
- package/dist/crmbonus-component-wake/p-20d0467e.js +2 -0
- package/dist/crmbonus-component-wake/p-20d0467e.js.map +1 -0
- package/dist/crmbonus-component-wake/p-2362455d.js +2 -0
- package/dist/crmbonus-component-wake/p-2362455d.js.map +1 -0
- package/dist/crmbonus-component-wake/p-2dd97532.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-2dd97532.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-3e02757c.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-3e02757c.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-4cbebe64.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-4cbebe64.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-0d09c221.js → p-60787be2.js} +2 -2
- package/dist/crmbonus-component-wake/p-60787be2.js.map +1 -0
- package/dist/crmbonus-component-wake/p-6e7c09cd.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-6e7c09cd.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-9b556ee6.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-9b556ee6.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-af3ba015.js.map +1 -1
- package/dist/crmbonus-component-wake/p-b435da9a.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-b435da9a.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c53241bf.js +2 -0
- package/dist/crmbonus-component-wake/p-c53241bf.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c533ea8b.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c533ea8b.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c7d03986.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c7d03986.entry.js.map +1 -0
- package/dist/env.js +2 -2
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +2 -2
- package/dist/esm/app-modal.entry.js.map +1 -1
- package/dist/esm/bc-crmbonus.entry.js +24 -0
- package/dist/esm/bc-crmbonus.entry.js.map +1 -0
- package/dist/esm/bc-phone-form_2.entry.js +328 -0
- package/dist/esm/bc-phone-form_2.entry.js.map +1 -0
- package/dist/esm/bc-wake-crmbonus.entry.js +14 -0
- package/dist/esm/bc-wake-crmbonus.entry.js.map +1 -0
- package/dist/esm/cart.helper-22ecdec9.js +195 -0
- package/dist/esm/cart.helper-22ecdec9.js.map +1 -0
- package/dist/esm/container-empty.entry.js +2 -2
- package/dist/esm/container-empty.entry.js.map +1 -1
- package/dist/esm/countdown-timer-v2.entry.js +2 -2
- package/dist/esm/countdown-timer-v2.entry.js.map +1 -1
- package/dist/esm/countdown-timer_11.entry.js +41 -29
- package/dist/esm/countdown-timer_11.entry.js.map +1 -1
- package/dist/esm/crm-bonus-note.entry.js +9 -7
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/{cjs/cart.helper-31ba8997.js → esm/crmbonus.service-d83e6bb6.js} +25 -125
- package/dist/esm/crmbonus.service-d83e6bb6.js.map +1 -0
- package/dist/{cjs/info.config.helper-d4b1291b.js → esm/i18n-b9d8b0cc.js} +2 -36
- package/dist/esm/i18n-b9d8b0cc.js.map +1 -0
- package/dist/esm/{index-bdb70d5a.js → index-09314622.js} +16 -2
- package/dist/esm/index-09314622.js.map +1 -0
- package/dist/esm/info.config.helper-156cb9b2.js +32 -0
- package/dist/esm/info.config.helper-156cb9b2.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pedido-finalizado.entry.js +5 -4
- package/dist/esm/pedido-finalizado.entry.js.map +1 -1
- package/dist/esm/utils-dec6df66.js.map +1 -1
- package/dist/store.js +25 -0
- package/dist/store.js.map +1 -0
- package/dist/types/components/crmbonus/crmbonus.d.ts +9 -0
- package/dist/types/components/crmbonus/subcomponents/phone-form/index.d.ts +13 -0
- package/dist/types/components/crmbonus/subcomponents/phone-validate/index.d.ts +17 -0
- package/dist/types/components.d.ts +76 -0
- package/dist/types/dto/checkout.dto.d.ts +8 -0
- package/dist/types/dto/pin.sent.d.ts +3 -0
- package/dist/types/dto/validate.pin.bonus.d.ts +9 -0
- package/dist/types/helpers/cart.helper.d.ts +1 -0
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +2 -0
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/store.d.ts +11 -0
- package/dist/types/objectvalues/cart.wake.d.ts +2 -1
- package/dist/types/platforms/wake/index.d.ts +3 -0
- package/dist/types/services/crmbonus.service.d.ts +4 -2
- package/package.json +59 -58
- package/readme.md +114 -114
- package/dist/cjs/cart.helper-31ba8997.js.map +0 -1
- package/dist/cjs/index-a7537457.js.map +0 -1
- package/dist/cjs/info.config.helper-d4b1291b.js.map +0 -1
- package/dist/components/p-0a7ccd8c.js.map +0 -1
- package/dist/components/p-0d09c221.js.map +0 -1
- package/dist/components/p-11520f0f.js.map +0 -1
- package/dist/components/p-144c34f6.js.map +0 -1
- package/dist/components/p-2cece106.js.map +0 -1
- package/dist/components/p-3c8ae82e.js.map +0 -1
- package/dist/components/p-786485b2.js.map +0 -1
- package/dist/components/p-8274e2c4.js.map +0 -1
- package/dist/components/p-9b5c07d8.js.map +0 -1
- package/dist/components/p-9d950d25.js.map +0 -1
- package/dist/components/p-c250687d.js.map +0 -1
- package/dist/components/p-e6863cf5.js.map +0 -1
- package/dist/crmbonus-component-wake/p-0d09c221.js.map +0 -1
- package/dist/crmbonus-component-wake/p-1644deef.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-1644deef.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-60742512.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-60742512.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-8c362346.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ac027576.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ac1e7c32.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ac1e7c32.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b4f52f79.js +0 -2
- package/dist/crmbonus-component-wake/p-b4f52f79.js.map +0 -1
- package/dist/crmbonus-component-wake/p-df80d1b0.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-df80d1b0.entry.js.map +0 -1
- package/dist/esm/cart.helper-8c8d4a0a.js.map +0 -1
- package/dist/esm/index-bdb70d5a.js.map +0 -1
- package/dist/esm/info.config.helper-e4b8c478.js.map +0 -1
- package/dist/types/Users/Darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +0 -2
@@ -3750,8 +3750,8 @@ axios.default = axios;
|
|
3750
3750
|
const axios$1 = axios;
|
3751
3751
|
|
3752
3752
|
// export const CRM_BONUS_API_URL = "https://crmbonus-hub-staging-0ff7e3bf68ac.herokuapp.com/api" //"https://crmbonus-service-staging-d15ba5377115.herokuapp.com"; //"https://typically-workable-perch.ngrok-free.app"; // "http://localhost:3500";
|
3753
|
-
const CRM_BONUS_API_URL = "https://typically-workable-perch.ngrok-free.app/api";
|
3754
|
-
|
3753
|
+
// export const CRM_BONUS_API_URL = "https://typically-workable-perch.ngrok-free.app/api";
|
3754
|
+
const CRM_BONUS_API_URL = "https://wake.crmbonus.com/api"; //"https://crmbonus-hub-staging-0ff7e3bf68ac.herokuapp.com/api"// "https://wake-middleware.crmbonus.com/api"; //"http://localhost:4000/api";// "https://wake-middleware.crmbonus.com/api"; //"https://wake-middleware.crmbonus.com/api";// "https://crmbonus-wake-hub-staging-5daedbc4e22b.herokuapp.com/api" //"https://crmbonus-service-staging-d15ba5377115.herokuapp.com"; //"https://typically-workable-perch.ngrok-free.app"; // "http://localhost:3500";
|
3755
3755
|
const CHECKOUT_CART_WAKE = "http://localhost:3001";
|
3756
3756
|
|
3757
3757
|
const getKeyReserveByCartId = (cartId) => {
|
@@ -3808,13 +3808,13 @@ class CrmBonusService {
|
|
3808
3808
|
localStorage.removeItem(USED_KEY);
|
3809
3809
|
localStorage.removeItem(getKeyReserveByCartId(updateOrderDTO.cartId));
|
3810
3810
|
}
|
3811
|
-
async sendPin(phone, name,
|
3811
|
+
async sendPin(phone, name, storeName) {
|
3812
3812
|
const token = localStorage.getItem(BYCODERS_KEY);
|
3813
3813
|
const headers = {
|
3814
3814
|
'Content-Type': 'application/json',
|
3815
3815
|
'Authorization': `Bearer ${token}`
|
3816
3816
|
};
|
3817
|
-
const response = await this.axiosInstance.post("/crmbonus/send-pin", { cellphone: phone, name
|
3817
|
+
const response = await this.axiosInstance.post("/crmbonus/send-pin", { cellphone: phone, name, storeName }, { headers: headers });
|
3818
3818
|
return {
|
3819
3819
|
storeId: response.data.storeId,
|
3820
3820
|
userId: response.data.userId
|
@@ -3829,6 +3829,15 @@ class CrmBonusService {
|
|
3829
3829
|
const response = await this.axiosInstance.post("/crmbonus/process-pin-bonus", payload, { headers });
|
3830
3830
|
return response.data;
|
3831
3831
|
}
|
3832
|
+
async validatePin(payload) {
|
3833
|
+
const token = localStorage.getItem(BYCODERS_KEY);
|
3834
|
+
const headers = {
|
3835
|
+
'Content-Type': 'application/json',
|
3836
|
+
'Authorization': `Bearer ${token}`
|
3837
|
+
};
|
3838
|
+
const response = await this.axiosInstance.post("/crmbonus/process-pin-bonus", payload, { headers });
|
3839
|
+
return response.data;
|
3840
|
+
}
|
3832
3841
|
async reserve(payload) {
|
3833
3842
|
const headers = {
|
3834
3843
|
'Content-Type': 'application/json',
|
@@ -3848,6 +3857,7 @@ class CrmBonusService {
|
|
3848
3857
|
}, { headers });
|
3849
3858
|
return response.data;
|
3850
3859
|
}
|
3860
|
+
//funcão depreciada
|
3851
3861
|
async getToken(store) {
|
3852
3862
|
var _a, _b;
|
3853
3863
|
const response = await this.axiosInstance.post("/wake/requestToken", { storeName: store });
|
@@ -3855,6 +3865,14 @@ class CrmBonusService {
|
|
3855
3865
|
localStorage.setItem(BYCODERS_KEY, this.token);
|
3856
3866
|
return (_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.token;
|
3857
3867
|
}
|
3868
|
+
async saveTracking(checkoutId, payload) {
|
3869
|
+
try {
|
3870
|
+
await this.axiosInstance.post(`/checkouts/traking/${checkoutId}`, payload);
|
3871
|
+
}
|
3872
|
+
catch (error) {
|
3873
|
+
console.warn('[x] Error saving tracking info:', error);
|
3874
|
+
}
|
3875
|
+
}
|
3858
3876
|
async getCustomization(storeName) {
|
3859
3877
|
const headers = {
|
3860
3878
|
'Content-Type': 'application/json',
|
@@ -3898,6 +3916,7 @@ class CrmBonusService {
|
|
3898
3916
|
metadata: payload.metadata
|
3899
3917
|
}, { headers: headers });
|
3900
3918
|
}
|
3919
|
+
//TODO: passa metodo para logicas especificas para wake
|
3901
3920
|
async getInfoCart(checkoutBase) {
|
3902
3921
|
const response = await fetch(`${checkoutBase}/api/carrinho`, { credentials: "include" }).then(res => res.json());
|
3903
3922
|
return response;
|
@@ -3905,117 +3924,6 @@ class CrmBonusService {
|
|
3905
3924
|
}
|
3906
3925
|
CrmBonusService._instance = null;
|
3907
3926
|
|
3908
|
-
|
3909
|
-
constructor(cart) {
|
3910
|
-
var _a;
|
3911
|
-
this.products = [];
|
3912
|
-
this.id = cart.Metadados.id || cart.Id;
|
3913
|
-
this.middlewareId = (_a = cart.Metadados) === null || _a === void 0 ? void 0 : _a.id;
|
3914
|
-
this.orderId = cart.PedidoId;
|
3915
|
-
this.buildUserInfo(cart);
|
3916
|
-
this.buildStoreInfo(cart);
|
3917
|
-
this.products = cart.Produtos; // this.buildStoreCart( cart.Produtos);
|
3918
|
-
}
|
3919
|
-
// private buildStoreCart(newProducts = []) {
|
3920
|
-
// const cache = localStorage.getItem("bc:cart");
|
3921
|
-
// if(!cache) {
|
3922
|
-
// return this.saveStore(newProducts)
|
3923
|
-
// }
|
3924
|
-
// const cacheProducts:IProductWake[] = newProducts //JSON.parse(cache);
|
3925
|
-
// if(newProducts.length !== cacheProducts.length) {
|
3926
|
-
// return this.saveStore(newProducts);
|
3927
|
-
// }
|
3928
|
-
// for (const p of newProducts) {
|
3929
|
-
// const [cp] = cacheProducts.filter(cpp => cpp.ProdutoVarianteId == p.ProdutoVarianteId);
|
3930
|
-
// if(cp) {
|
3931
|
-
// cp.Quantidade != p.Quantidade;
|
3932
|
-
// return newProducts;
|
3933
|
-
// }
|
3934
|
-
// }
|
3935
|
-
// return cacheProducts;
|
3936
|
-
// }
|
3937
|
-
// private saveStore(newProducts) {
|
3938
|
-
// localStorage.setItem("bc:cart", JSON.stringify(newProducts));
|
3939
|
-
// return newProducts;
|
3940
|
-
// }
|
3941
|
-
buildUserInfo(cart) {
|
3942
|
-
this.user = {
|
3943
|
-
id: cart.Usuario ? cart.Usuario.Id : null
|
3944
|
-
};
|
3945
|
-
}
|
3946
|
-
buildStoreInfo(cart) {
|
3947
|
-
var _a;
|
3948
|
-
this.store = {
|
3949
|
-
name: (_a = cart.Loja) === null || _a === void 0 ? void 0 : _a.Nome
|
3950
|
-
};
|
3951
|
-
}
|
3952
|
-
}
|
3953
|
-
|
3954
|
-
class ReservedInfoDTO {
|
3955
|
-
static of(payload) {
|
3956
|
-
const info = new ReservedInfoDTO();
|
3957
|
-
info.bonusBalance = payload.bonusBalance;
|
3958
|
-
info.bonusIds = payload.bonusIds;
|
3959
|
-
info.calculatedValue = payload.calculatedValue;
|
3960
|
-
info.cartId = payload.cartId;
|
3961
|
-
info.metadata = payload.metadata;
|
3962
|
-
info.orderId = payload.orderId;
|
3963
|
-
info.status = payload.status;
|
3964
|
-
info.totalDiscount = payload.totalDiscount;
|
3965
|
-
info.totalValue = payload.totalValue;
|
3966
|
-
info.isBonusProcessed = payload.isBonusProcessed;
|
3967
|
-
return info;
|
3968
|
-
}
|
3969
|
-
isExpired() {
|
3970
|
-
var _a;
|
3971
|
-
const createdAt = (_a = this === null || this === void 0 ? void 0 : this.metadata) === null || _a === void 0 ? void 0 : _a.createdAt;
|
3972
|
-
if (!createdAt)
|
3973
|
-
return true;
|
3974
|
-
const current = Date.now();
|
3975
|
-
const diffms = current - createdAt;
|
3976
|
-
const diffMinutes = diffms / (1000 * 60);
|
3977
|
-
console.log('diffMinutes', diffMinutes);
|
3978
|
-
return diffMinutes > 6;
|
3979
|
-
}
|
3980
|
-
}
|
3981
|
-
|
3982
|
-
const crmBonusService = CrmBonusService.getInstance();
|
3983
|
-
const getCart = async () => {
|
3984
|
-
const baseUrl = buildUrlBase(); // window.location.origin; //"https://bycoders.fbits.store" //window.location.origin;
|
3985
|
-
console.log('[URL STORE]: ', baseUrl);
|
3986
|
-
const cart = await crmBonusService.getInfoCart(baseUrl);
|
3987
|
-
return new CartWake(cart);
|
3988
|
-
};
|
3989
|
-
const getInfoBonusByCartIdAndStoreName = async (cartId, storeName) => {
|
3990
|
-
const info = await crmBonusService.getInfoBonus(cartId, storeName);
|
3991
|
-
return ReservedInfoDTO.of(info);
|
3992
|
-
};
|
3993
|
-
const persisteMetadata = async (storeName, cartId, metadata = {}) => {
|
3994
|
-
console.log('[bc:salvando metadados]');
|
3995
|
-
await crmBonusService.patchInfoBonus({
|
3996
|
-
storeName,
|
3997
|
-
cartId,
|
3998
|
-
metadata
|
3999
|
-
});
|
4000
|
-
console.log('[bc:salvo metadados]');
|
4001
|
-
};
|
4002
|
-
const buildUrlBase = () => {
|
4003
|
-
const url = window.location.origin; //"https://bycoders.checkout.fbits.store" //
|
4004
|
-
if (url.includes('localhost')) {
|
4005
|
-
return CHECKOUT_CART_WAKE;
|
4006
|
-
}
|
4007
|
-
if (url.includes('checkout')) {
|
4008
|
-
return url;
|
4009
|
-
}
|
4010
|
-
if (url.includes('fbits')) {
|
4011
|
-
return url;
|
4012
|
-
}
|
4013
|
-
if (url.includes("www.")) {
|
4014
|
-
return url.replace("www", "checkout");
|
4015
|
-
}
|
4016
|
-
return `${window.location.protocol}//checkout.${window.location.host}`;
|
4017
|
-
};
|
4018
|
-
|
4019
|
-
export { CrmBonusService as C, USED_KEY as U, getInfoBonusByCartIdAndStoreName as a, CartWake as b, getKeyReserveByCartId as c, getCart as g, persisteMetadata as p };
|
3927
|
+
export { CrmBonusService as C, USED_KEY as U, CHECKOUT_CART_WAKE as a, getKeyReserveByCartId as g };
|
4020
3928
|
|
4021
|
-
//# sourceMappingURL=
|
3929
|
+
//# sourceMappingURL=p-60787be2.js.map
|