@beamimpact/web-sdk 1.56.3 → 1.57.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/dist/chunks/_share-dialog-dependencies-BEUnzuWq.esm.js +2 -0
- package/dist/chunks/{_share-dialog-dependencies-Bk60ibnw.esm.js.map → _share-dialog-dependencies-BEUnzuWq.esm.js.map} +1 -1
- package/dist/chunks/{order-page-CSEjG6ma.esm.d.ts → cart-CKltrzQt.esm.d.ts} +22 -34
- package/dist/chunks/css-card-grid-CiqEjkwR.esm.js +21 -0
- package/dist/chunks/css-card-grid-CiqEjkwR.esm.js.map +1 -0
- package/dist/chunks/handlebars-B_i-to-h.esm.js +23 -0
- package/dist/chunks/handlebars-B_i-to-h.esm.js.map +1 -0
- package/dist/chunks/index-B4xKTDaF.esm.js +2 -0
- package/dist/chunks/index-B4xKTDaF.esm.js.map +1 -0
- package/dist/chunks/{index-C_u1FXtO.esm.d.ts → index-BAROgNYE.esm.d.ts} +7 -10
- package/dist/chunks/{index-BLlSL37B.esm.d.ts → index-BH3YaPLG.esm.d.ts} +1 -1
- package/dist/chunks/index-BHglsF5j.esm.js +2 -0
- package/dist/chunks/index-BHglsF5j.esm.js.map +1 -0
- package/dist/chunks/index-BgalrCS_.esm.js +32 -0
- package/dist/chunks/index-BgalrCS_.esm.js.map +1 -0
- package/dist/chunks/{index-hghrT7Z_.esm.d.ts → index-BoIHE1tC.esm.d.ts} +3 -0
- package/dist/chunks/index-C60Vejym.esm.js +32 -0
- package/dist/chunks/index-C60Vejym.esm.js.map +1 -0
- package/dist/chunks/{index-DDCtGN21.esm.d.ts → index-C6a13iqC.esm.d.ts} +3 -5
- package/dist/chunks/index-D6aFJ4cU.esm.js +2 -0
- package/dist/chunks/index-D6aFJ4cU.esm.js.map +1 -0
- package/dist/chunks/index-Dm-K2MLY.esm.js +31 -0
- package/dist/chunks/index-Dm-K2MLY.esm.js.map +1 -0
- package/dist/chunks/{index-BEEmYYxP.esm.js → index-DqhM4Yoj.esm.js} +11 -11
- package/dist/chunks/index-DqhM4Yoj.esm.js.map +1 -0
- package/dist/chunks/{index-UMeAzKTG.esm.js → index-HqfLVFOU.esm.js} +11 -11
- package/dist/chunks/index-HqfLVFOU.esm.js.map +1 -0
- package/dist/chunks/index-MAMeVd6l.esm.js +2 -0
- package/dist/chunks/index-MAMeVd6l.esm.js.map +1 -0
- package/dist/chunks/{index-DyUuvdr3.esm.d.ts → index-OYSJ-2mk.esm.d.ts} +1 -1
- package/dist/chunks/{index-BY5lSRmw.esm.d.ts → index-mBTWm4YP.esm.d.ts} +2 -2
- package/dist/chunks/{lit-JRlupCB5.esm.js → lit-BEag9MFp.esm.js} +2 -2
- package/dist/chunks/{lit-JRlupCB5.esm.js.map → lit-BEag9MFp.esm.js.map} +1 -1
- package/dist/chunks/{lodash-BSs6Il-c.esm.js → lodash-CrMU6wKg.esm.js} +2 -2
- package/dist/chunks/{lodash-BSs6Il-c.esm.js.map → lodash-CrMU6wKg.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-D_4zJ7uy.esm.js → promo-pill-label-5HmbDVmU.esm.js} +2 -2
- package/dist/chunks/{promo-pill-label-D_4zJ7uy.esm.js.map → promo-pill-label-5HmbDVmU.esm.js.map} +1 -1
- package/dist/chunks/{responsive-CIV4sFdH.esm.js → responsive-aN8P5PqD.esm.js} +2 -2
- package/dist/chunks/{responsive-CIV4sFdH.esm.js.map → responsive-aN8P5PqD.esm.js.map} +1 -1
- package/dist/chunks/{routes-OxC3Ah30.esm.d.ts → routes-D6Gtw6kZ.esm.d.ts} +1 -1
- package/dist/chunks/share-button-5gfPmeEh.esm.js +54 -0
- package/dist/chunks/share-button-5gfPmeEh.esm.js.map +1 -0
- package/dist/chunks/{share-button-Dzc7loia.esm.js → share-button-C4yPLL_t.esm.js} +2 -2
- package/dist/chunks/{share-button-DkTpGZk1.esm.js.map → share-button-C4yPLL_t.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-DWgFuC7U.esm.d.ts → update-cart-DoJGAdoU.esm.d.ts} +2 -3
- package/dist/chunks/utils-C5hmbxa4.esm.js +2 -0
- package/dist/chunks/utils-C5hmbxa4.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-B4z4_CMq.esm.d.ts → utils-COGFpDER.esm.d.ts} +597 -11
- package/dist/chunks/{vendor-ckSdd6aH.esm.js → vendor-DUOg5fL-.esm.js} +2 -2
- package/dist/chunks/{vendor-ckSdd6aH.esm.js.map → vendor-DUOg5fL-.esm.js.map} +1 -1
- package/dist/components/beam-partner-logos.d.ts +3 -1
- package/dist/components/beam-partner-logos.esm.js +1 -1
- package/dist/components/beam-partner-logos.js +1 -1
- package/dist/components/community-impact.d.ts +3 -2
- package/dist/components/community-impact.esm.js +6 -6
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +6 -6
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.d.ts +3 -2
- package/dist/components/cumulative-impact.esm.js +11 -11
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +11 -11
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.d.ts +3 -2
- package/dist/components/impact-overview.esm.js +5 -5
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +5 -5
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +3 -4
- package/dist/components/post-purchase.esm.js +1 -31
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +1 -31
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +4 -2
- package/dist/components/product-details-page.esm.js +4 -4
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +4 -4
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +3 -4
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.d.ts +3 -4
- package/dist/components/select-nonprofit.esm.js +12 -12
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +12 -12
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.d.ts +3 -2
- package/dist/components/select-subscription-nonprofit.esm.js +11 -11
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +11 -11
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +9 -12
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/social-share.d.ts +3 -2
- package/dist/components/social-share.esm.js +2 -2
- package/dist/components/social-share.esm.js.map +1 -1
- package/dist/components/social-share.js +2 -2
- package/dist/components/social-share.js.map +1 -1
- package/dist/components/subscriber-select-nonprofit.d.ts +59 -0
- package/dist/components/subscriber-select-nonprofit.esm.js +137 -0
- package/dist/components/subscriber-select-nonprofit.esm.js.map +1 -0
- package/dist/components/subscriber-select-nonprofit.js +137 -0
- package/dist/components/subscriber-select-nonprofit.js.map +1 -0
- package/dist/components/subscription-impact.d.ts +3 -2
- package/dist/components/subscription-impact.esm.js +6 -6
- package/dist/components/subscription-impact.esm.js.map +1 -1
- package/dist/components/subscription-impact.js +6 -6
- package/dist/components/subscription-impact.js.map +1 -1
- package/dist/components/subscription-management.d.ts +4 -5
- package/dist/components/subscription-management.esm.js +3 -3
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +3 -3
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +39 -38
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.d.ts +3 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.esm.js.map +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/beam.js.map +1 -1
- package/dist/integrations/cart.d.ts +4 -4
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/logs.d.ts +4 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/promoManager.d.ts +3 -1
- package/dist/integrations/promoManager.esm.js +1 -1
- package/dist/integrations/promoManager.esm.js.map +1 -1
- package/dist/integrations/promoManager.js +1 -1
- package/dist/integrations/promoManager.js.map +1 -1
- package/dist/integrations/session.d.ts +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify-order.d.ts +38 -0
- package/dist/integrations/shopify-order.esm.js +2 -0
- package/dist/integrations/shopify-order.esm.js.map +1 -0
- package/dist/integrations/shopify-order.js +2 -0
- package/dist/integrations/shopify-order.js.map +1 -0
- package/dist/integrations/shopify.d.ts +5 -12
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.d.ts +3 -1
- package/dist/integrations/statsig.esm.js +3 -3
- package/dist/integrations/statsig.esm.js.map +1 -1
- package/dist/integrations/statsig.js +3 -3
- package/dist/integrations/statsig.js.map +1 -1
- package/dist/integrations/utils.d.ts +1 -14
- package/dist/integrations/utils.esm.js +1 -1
- package/dist/integrations/utils.js +1 -1
- package/dist/react/beam-partner-logos.d.ts +3 -1
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.d.ts +3 -2
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.esm.js.map +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/community-impact.js.map +1 -1
- package/dist/react/cumulative-impact.d.ts +3 -2
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.esm.js.map +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/cumulative-impact.js.map +1 -1
- package/dist/react/impact-overview.d.ts +3 -2
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.esm.js.map +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/impact-overview.js.map +1 -1
- package/dist/react/index.d.ts +6 -7
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +3 -4
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.esm.js.map +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/post-purchase.js.map +1 -1
- package/dist/react/product-details-page.d.ts +4 -2
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.esm.js.map +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/product-details-page.js.map +1 -1
- package/dist/react/redeem-transaction.d.ts +3 -6
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.d.ts +3 -6
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.esm.js.map +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-nonprofit.js.map +1 -1
- package/dist/react/select-subscription-nonprofit.d.ts +3 -6
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.js.map +1 -1
- package/dist/react/shopify.d.ts +2 -2
- package/dist/react/shopify.esm.js +1 -1
- package/dist/react/shopify.esm.js.map +1 -1
- package/dist/react/shopify.js +1 -1
- package/dist/react/shopify.js.map +1 -1
- package/dist/react/social-share.d.ts +3 -2
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.esm.js.map +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/social-share.js.map +1 -1
- package/dist/react/subscriber-select-nonprofit.d.ts +14 -0
- package/dist/react/subscriber-select-nonprofit.esm.js +2 -0
- package/dist/react/subscriber-select-nonprofit.esm.js.map +1 -0
- package/dist/react/subscriber-select-nonprofit.js +2 -0
- package/dist/react/subscriber-select-nonprofit.js.map +1 -0
- package/dist/react/subscription-impact.d.ts +3 -2
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.esm.js.map +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-impact.js.map +1 -1
- package/dist/react/subscription-management.d.ts +4 -5
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/dist/utils/beam-errors.d.ts +3 -1
- package/dist/utils/beam-errors.esm.js +1 -1
- package/dist/utils/beam-errors.js +1 -1
- package/dist/utils/cart.d.ts +3 -18
- package/dist/utils/cart.esm.js +1 -1
- package/dist/utils/cart.esm.js.map +1 -1
- package/dist/utils/cart.js +1 -1
- package/dist/utils/cart.js.map +1 -1
- package/dist/utils/clear-beam-storage.d.ts +3 -0
- package/dist/utils/clear-beam-storage.esm.js +2 -0
- package/dist/utils/clear-beam-storage.esm.js.map +1 -0
- package/dist/utils/clear-beam-storage.js +2 -0
- package/dist/utils/clear-beam-storage.js.map +1 -0
- package/dist/utils/cookies.d.ts +3 -18
- package/dist/utils/cookies.esm.js +1 -1
- package/dist/utils/cookies.esm.js.map +1 -1
- package/dist/utils/cookies.js +1 -1
- package/dist/utils/cookies.js.map +1 -1
- package/dist/utils/debounce.esm.js +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/events.d.ts +3 -5
- package/dist/utils/events.esm.js +1 -1
- package/dist/utils/events.js +1 -1
- package/dist/utils/is-equal.esm.js +1 -1
- package/dist/utils/is-equal.js +1 -1
- package/dist/utils/local-storage.d.ts +3 -19
- package/dist/utils/local-storage.esm.js +1 -1
- package/dist/utils/local-storage.esm.js.map +1 -1
- package/dist/utils/local-storage.js +1 -1
- package/dist/utils/local-storage.js.map +1 -1
- package/dist/utils/logger.d.ts +3 -8
- package/dist/utils/logger.esm.js +1 -1
- package/dist/utils/logger.esm.js.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/makeApiKeyHeader.d.ts +3 -5
- package/dist/utils/makeApiKeyHeader.esm.js +1 -1
- package/dist/utils/makeApiKeyHeader.esm.js.map +1 -1
- package/dist/utils/makeApiKeyHeader.js +1 -1
- package/dist/utils/makeApiKeyHeader.js.map +1 -1
- package/dist/utils/memoize-last.d.ts +3 -17
- package/dist/utils/memoize-last.esm.js +1 -1
- package/dist/utils/memoize-last.esm.js.map +1 -1
- package/dist/utils/memoize-last.js +1 -1
- package/dist/utils/memoize-last.js.map +1 -1
- package/dist/utils/network-listeners.d.ts +3 -3
- package/dist/utils/network-listeners.esm.js +1 -1
- package/dist/utils/network-listeners.esm.js.map +1 -1
- package/dist/utils/network-listeners.js +1 -1
- package/dist/utils/network-listeners.js.map +1 -1
- package/dist/utils/promoManager.d.ts +3 -111
- package/dist/utils/promoManager.esm.js +1 -1
- package/dist/utils/promoManager.esm.js.map +1 -1
- package/dist/utils/promoManager.js +1 -1
- package/dist/utils/promoManager.js.map +1 -1
- package/dist/utils/remote-session.d.ts +3 -9
- package/dist/utils/remote-session.esm.js +1 -1
- package/dist/utils/remote-session.esm.js.map +1 -1
- package/dist/utils/remote-session.js +1 -1
- package/dist/utils/remote-session.js.map +1 -1
- package/dist/utils/wait-for-element.d.ts +3 -5
- package/dist/utils/wait-for-element.esm.js +1 -1
- package/dist/utils/wait-for-element.esm.js.map +1 -1
- package/dist/utils/wait-for-element.js +1 -1
- package/dist/utils/wait-for-element.js.map +1 -1
- package/package.json +9 -6
- package/dist/chunks/_share-dialog-dependencies-Bk60ibnw.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-D6vA_2f6.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-D6vA_2f6.esm.js.map +0 -1
- package/dist/chunks/beam-errors-Ci0d3926.esm.js +0 -2
- package/dist/chunks/beam-errors-Ci0d3926.esm.js.map +0 -1
- package/dist/chunks/beam-errors-DUQ9pK2V.esm.d.ts +0 -46
- package/dist/chunks/cart-contents-CEoSx3y4.esm.d.ts +0 -18
- package/dist/chunks/cart-contents-DkoytiZh.esm.js +0 -2
- package/dist/chunks/cart-contents-DkoytiZh.esm.js.map +0 -1
- package/dist/chunks/css-card-grid-DixMt6ek.esm.js +0 -20
- package/dist/chunks/css-card-grid-DixMt6ek.esm.js.map +0 -1
- package/dist/chunks/enforce-config-DHnpgqSK.esm.js +0 -3
- package/dist/chunks/enforce-config-DHnpgqSK.esm.js.map +0 -1
- package/dist/chunks/enforce-config-DUbQnaLO.esm.js +0 -3
- package/dist/chunks/enforce-config-DUbQnaLO.esm.js.map +0 -1
- package/dist/chunks/events-COWOQoLW.esm.js +0 -2
- package/dist/chunks/events-COWOQoLW.esm.js.map +0 -1
- package/dist/chunks/events-Dwqfqbij.esm.d.ts +0 -214
- package/dist/chunks/index-8rOpG9kf.esm.js +0 -2
- package/dist/chunks/index-8rOpG9kf.esm.js.map +0 -1
- package/dist/chunks/index-B1GmdVT3.esm.js +0 -2
- package/dist/chunks/index-B1GmdVT3.esm.js.map +0 -1
- package/dist/chunks/index-B2dxbh1d.esm.js +0 -2
- package/dist/chunks/index-B2dxbh1d.esm.js.map +0 -1
- package/dist/chunks/index-BEEmYYxP.esm.js.map +0 -1
- package/dist/chunks/index-BIEV1MH0.esm.js +0 -2
- package/dist/chunks/index-BIEV1MH0.esm.js.map +0 -1
- package/dist/chunks/index-BaWMWAyt.esm.js +0 -2
- package/dist/chunks/index-BaWMWAyt.esm.js.map +0 -1
- package/dist/chunks/index-BeX4QeUu.esm.js +0 -2
- package/dist/chunks/index-BeX4QeUu.esm.js.map +0 -1
- package/dist/chunks/index-C3hpHWh1.esm.js +0 -2
- package/dist/chunks/index-C3hpHWh1.esm.js.map +0 -1
- package/dist/chunks/index-C3v-y56g.esm.js +0 -2
- package/dist/chunks/index-C3v-y56g.esm.js.map +0 -1
- package/dist/chunks/index-CqqF1sQo.esm.js +0 -2
- package/dist/chunks/index-CqqF1sQo.esm.js.map +0 -1
- package/dist/chunks/index-Cs4Kp9X4.esm.js +0 -2
- package/dist/chunks/index-Cs4Kp9X4.esm.js.map +0 -1
- package/dist/chunks/index-D20ifskY.esm.d.ts +0 -21
- package/dist/chunks/index-D3hxLDQF.esm.js +0 -2
- package/dist/chunks/index-D3hxLDQF.esm.js.map +0 -1
- package/dist/chunks/index-D5TZB-zM.esm.js +0 -2
- package/dist/chunks/index-D5TZB-zM.esm.js.map +0 -1
- package/dist/chunks/index-D6qJfs7_.esm.js +0 -2
- package/dist/chunks/index-D6qJfs7_.esm.js.map +0 -1
- package/dist/chunks/index-DSJACB_p.esm.js +0 -2
- package/dist/chunks/index-DSJACB_p.esm.js.map +0 -1
- package/dist/chunks/index-DmjZnpod.esm.js +0 -2
- package/dist/chunks/index-DmjZnpod.esm.js.map +0 -1
- package/dist/chunks/index-EJRmgmQu.esm.d.ts +0 -74
- package/dist/chunks/index-UMeAzKTG.esm.js.map +0 -1
- package/dist/chunks/index-mppXVWCH.esm.js +0 -2
- package/dist/chunks/index-mppXVWCH.esm.js.map +0 -1
- package/dist/chunks/index-n62IxH5D.esm.js +0 -2
- package/dist/chunks/index-n62IxH5D.esm.js.map +0 -1
- package/dist/chunks/index-nAPzvUWE.esm.js +0 -2
- package/dist/chunks/index-nAPzvUWE.esm.js.map +0 -1
- package/dist/chunks/index-xcGPhpiO.esm.d.ts +0 -44
- package/dist/chunks/is-all-html-elements-fcB7UUA1.esm.js +0 -2
- package/dist/chunks/is-all-html-elements-fcB7UUA1.esm.js.map +0 -1
- package/dist/chunks/loading-template-BFvXaTlD.esm.js +0 -2
- package/dist/chunks/loading-template-BFvXaTlD.esm.js.map +0 -1
- package/dist/chunks/localize-Dg7NgKIP.esm.js +0 -31
- package/dist/chunks/localize-Dg7NgKIP.esm.js.map +0 -1
- package/dist/chunks/localize-DkAbsh05.esm.js +0 -31
- package/dist/chunks/localize-DkAbsh05.esm.js.map +0 -1
- package/dist/chunks/order-page-B0WbVrvh.esm.js +0 -2
- package/dist/chunks/order-page-B0WbVrvh.esm.js.map +0 -1
- package/dist/chunks/order-page-CT3hnhzf.esm.js +0 -2
- package/dist/chunks/order-page-CT3hnhzf.esm.js.map +0 -1
- package/dist/chunks/progress-bar-B82FOT8n.esm.js +0 -54
- package/dist/chunks/progress-bar-B82FOT8n.esm.js.map +0 -1
- package/dist/chunks/promo-pill-label-DcsiJS_N.esm.js +0 -16
- package/dist/chunks/promo-pill-label-DcsiJS_N.esm.js.map +0 -1
- package/dist/chunks/promo-types-CmZzhkpN.esm.d.ts +0 -15
- package/dist/chunks/promo-types-DKAOFHJr.esm.js +0 -2
- package/dist/chunks/promo-types-DKAOFHJr.esm.js.map +0 -1
- package/dist/chunks/routes-BIMwJ8u9.esm.js +0 -2
- package/dist/chunks/routes-BIMwJ8u9.esm.js.map +0 -1
- package/dist/chunks/routes-DSu5s3K7.esm.js +0 -2
- package/dist/chunks/routes-DSu5s3K7.esm.js.map +0 -1
- package/dist/chunks/share-button-CLMw49f5.esm.js +0 -2
- package/dist/chunks/share-button-CLMw49f5.esm.js.map +0 -1
- package/dist/chunks/share-button-DXS3zbJz.esm.js +0 -2
- package/dist/chunks/share-button-DXS3zbJz.esm.js.map +0 -1
- package/dist/chunks/share-button-DkTpGZk1.esm.js +0 -172
- package/dist/chunks/share-button-Dzc7loia.esm.js.map +0 -1
- package/dist/chunks/types-D_PLq1pj.esm.d.ts +0 -28
- package/dist/chunks/types-DfRc36jU.esm.d.ts +0 -15
- package/dist/chunks/update-cart-ByUvNLyZ.esm.js +0 -2
- package/dist/chunks/update-cart-ByUvNLyZ.esm.js.map +0 -1
- package/dist/chunks/update-cart-yj_9VGHp.esm.js +0 -2
- package/dist/chunks/update-cart-yj_9VGHp.esm.js.map +0 -1
- package/dist/integrations/index.d.ts +0 -31
- package/dist/integrations/index.esm.js +0 -2
- package/dist/integrations/index.esm.js.map +0 -1
- package/dist/integrations/index.js +0 -2
- package/dist/integrations/index.js.map +0 -1
- package/dist/utils/index.d.ts +0 -16
- package/dist/utils/index.esm.js +0 -2
- package/dist/utils/index.esm.js.map +0 -1
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
import debounce from 'lodash-es/debounce';
|
|
2
|
+
import isEqual from 'lodash-es/isEqual';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Full URL string (https://abc.com/path), without trailing slash
|
|
6
|
+
*/
|
|
7
|
+
type TUrl$1 = string;
|
|
8
|
+
type LANGUAGES = "en" | "fr" | "de" | "es" | "it" | "pl" | "ja";
|
|
9
|
+
/**
|
|
10
|
+
* Basic info needed to call the Beam API.
|
|
11
|
+
* Endpoints may also require parameters such as chainId, storeId, and order/cart details.
|
|
12
|
+
*/
|
|
13
|
+
type BeamBaseAPIConfig = {
|
|
14
|
+
apiKey: string;
|
|
15
|
+
baseUrl?: TUrl$1;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare const WIDGET_NAMES: {
|
|
19
|
+
readonly select_nonprofit: "select-nonprofit";
|
|
20
|
+
readonly redeem_transaction: "redeem-transaction";
|
|
21
|
+
readonly impact_overview: "impact-overview";
|
|
22
|
+
readonly community_impact: "community-impact";
|
|
23
|
+
readonly cumulative_impact: "cumulative-impact";
|
|
24
|
+
readonly product_details_page: "product-details-page";
|
|
25
|
+
readonly subscription_management: "subscription-management";
|
|
26
|
+
readonly subscription_impact: "subscription-impact";
|
|
27
|
+
readonly select_subscription_nonprofit: "select-subscription-nonprofit";
|
|
28
|
+
readonly social_share: "social-share";
|
|
29
|
+
readonly subscriber_select_nonprofit: "subscriber-select-nonprofit";
|
|
30
|
+
};
|
|
31
|
+
declare const HELPER_NAMES: {
|
|
32
|
+
cart_update: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Number ID */
|
|
36
|
+
type TNumericId = number;
|
|
37
|
+
/** String ID */
|
|
38
|
+
type TId = string;
|
|
39
|
+
/** Beam API key format (prefix.uuid) */
|
|
40
|
+
type TApiKey = string;
|
|
41
|
+
/** Full URL without trailing slash */
|
|
42
|
+
type TUrl = string;
|
|
43
|
+
type WidgetName = (typeof WIDGET_NAMES)[keyof typeof WIDGET_NAMES];
|
|
44
|
+
type HelperName = (typeof HELPER_NAMES)[keyof typeof HELPER_NAMES];
|
|
45
|
+
|
|
1
46
|
/**
|
|
2
47
|
* This file was auto-generated by openapi-typescript.
|
|
3
48
|
* Do not make direct changes to the file.
|
|
@@ -889,7 +934,7 @@ interface paths {
|
|
|
889
934
|
*/
|
|
890
935
|
lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | "ja";
|
|
891
936
|
/** @enum {string} */
|
|
892
|
-
widgetName: "select-nonprofit" | "redeem-transaction" | "post-purchase" | "subscription-management" | "select-subscription-nonprofit";
|
|
937
|
+
widgetName: "select-nonprofit" | "redeem-transaction" | "post-purchase" | "subscription-management" | "select-subscription-nonprofit" | "subscriber-select-nonprofit";
|
|
893
938
|
/** @example 1.0 */
|
|
894
939
|
version: string;
|
|
895
940
|
cart?: {
|
|
@@ -2987,7 +3032,7 @@ interface paths {
|
|
|
2987
3032
|
put: {
|
|
2988
3033
|
parameters: {
|
|
2989
3034
|
query: {
|
|
2990
|
-
orderId: string
|
|
3035
|
+
orderId: Partial<string> & Partial<number>;
|
|
2991
3036
|
};
|
|
2992
3037
|
};
|
|
2993
3038
|
responses: {
|
|
@@ -3556,7 +3601,7 @@ interface paths {
|
|
|
3556
3601
|
nonprofitId?: number;
|
|
3557
3602
|
isCanceled?: boolean;
|
|
3558
3603
|
/** @enum {string} */
|
|
3559
|
-
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact";
|
|
3604
|
+
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit";
|
|
3560
3605
|
version?: string;
|
|
3561
3606
|
options?: {
|
|
3562
3607
|
response?: {
|
|
@@ -4118,7 +4163,7 @@ interface paths {
|
|
|
4118
4163
|
remoteSubscriptionId: string;
|
|
4119
4164
|
nonprofitId: number | null;
|
|
4120
4165
|
/** @enum {string|null} */
|
|
4121
|
-
selectionMethod?: ("dashboard" | "remote_order" | "checkout" | "subscription_management_widget") | null;
|
|
4166
|
+
selectionMethod?: ("dashboard" | "remote_order" | "checkout" | "subscription_management_widget" | "subscriber_select_nonprofit_widget") | null;
|
|
4122
4167
|
};
|
|
4123
4168
|
};
|
|
4124
4169
|
};
|
|
@@ -4321,8 +4366,8 @@ interface paths {
|
|
|
4321
4366
|
"application/json": {
|
|
4322
4367
|
nonprofitId: number | null;
|
|
4323
4368
|
/**
|
|
4324
|
-
*
|
|
4325
|
-
* @
|
|
4369
|
+
* @description UUID
|
|
4370
|
+
* @example bqkdk-0393b-jbkdd-02difj
|
|
4326
4371
|
*/
|
|
4327
4372
|
selectionId?: string | null;
|
|
4328
4373
|
/** @description Cart ID from partner site */
|
|
@@ -4401,7 +4446,7 @@ interface paths {
|
|
|
4401
4446
|
parameters: {
|
|
4402
4447
|
query: {
|
|
4403
4448
|
chainId: number;
|
|
4404
|
-
widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact";
|
|
4449
|
+
widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit";
|
|
4405
4450
|
version: string;
|
|
4406
4451
|
};
|
|
4407
4452
|
};
|
|
@@ -4453,7 +4498,7 @@ interface paths {
|
|
|
4453
4498
|
/** @example 4058 */
|
|
4454
4499
|
chainId: number;
|
|
4455
4500
|
/** @enum {string} */
|
|
4456
|
-
widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact";
|
|
4501
|
+
widgetName: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit";
|
|
4457
4502
|
/** @example 1.0 */
|
|
4458
4503
|
version: string;
|
|
4459
4504
|
config: {
|
|
@@ -7524,7 +7569,7 @@ interface paths {
|
|
|
7524
7569
|
storeId: number;
|
|
7525
7570
|
/** When set to true, draft themes are returned */
|
|
7526
7571
|
draftConfig?: boolean;
|
|
7527
|
-
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact";
|
|
7572
|
+
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit";
|
|
7528
7573
|
/** The identifier for the product */
|
|
7529
7574
|
remoteProductIdentifier?: string;
|
|
7530
7575
|
};
|
|
@@ -7678,7 +7723,7 @@ interface paths {
|
|
|
7678
7723
|
storeId: number;
|
|
7679
7724
|
/** When set to true, draft themes are returned */
|
|
7680
7725
|
draftConfig?: boolean;
|
|
7681
|
-
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact";
|
|
7726
|
+
widgetName?: "community-impact" | "impact-overview" | "select-nonprofit" | "redeem-transaction" | "cumulative-impact" | "mobile-full-screen-nonprofit-selection" | "mobile-impact-list" | "mobile-minimal-nonprofit-selection" | "mobile-personal-impact" | "mobile-selected-nonprofit" | "mobile-progress-bar" | "select-nonprofit-cta" | "mobile-share-button" | "subscription-management" | "product-details-page" | "select-subscription-nonprofit" | "subscription-impact" | "subscriber-select-nonprofit";
|
|
7682
7727
|
/** The identifier for the product */
|
|
7683
7728
|
remoteProductIdentifier?: string;
|
|
7684
7729
|
};
|
|
@@ -8089,4 +8134,545 @@ interface paths {
|
|
|
8089
8134
|
};
|
|
8090
8135
|
}
|
|
8091
8136
|
|
|
8092
|
-
|
|
8137
|
+
type TCartApi = paths["/chain/findEligibleNonprofitsForCart"]["post"]["requestBody"]["content"]["application/json"]["cart"];
|
|
8138
|
+
type TCart = TCartApi & {
|
|
8139
|
+
content: {
|
|
8140
|
+
items: Record<string, any>[];
|
|
8141
|
+
discounts?: Record<string, any>[] | undefined | null;
|
|
8142
|
+
};
|
|
8143
|
+
};
|
|
8144
|
+
type TBeamCartLocalStorage = {
|
|
8145
|
+
cartId: string;
|
|
8146
|
+
beamCartId?: string;
|
|
8147
|
+
subtotal: number;
|
|
8148
|
+
itemCount: number;
|
|
8149
|
+
currencyCode: string;
|
|
8150
|
+
} & TCart;
|
|
8151
|
+
|
|
8152
|
+
declare class BeamError extends Error {
|
|
8153
|
+
supportUrl: string;
|
|
8154
|
+
constructor(msg?: string, { cause, name }?: {
|
|
8155
|
+
cause?: any;
|
|
8156
|
+
name?: string;
|
|
8157
|
+
});
|
|
8158
|
+
}
|
|
8159
|
+
declare class NetworkError extends BeamError {
|
|
8160
|
+
/** Fetch Response object with .ok, .status, etc.*/
|
|
8161
|
+
response: Response;
|
|
8162
|
+
/** If network response included JSON payload, it is parsed and available here */
|
|
8163
|
+
body?: Record<string, string>;
|
|
8164
|
+
constructor(response: Response, body?: Record<string, string>, msg?: string);
|
|
8165
|
+
}
|
|
8166
|
+
declare class MissingConfig extends BeamError {
|
|
8167
|
+
missingConfigKeyNames: string[];
|
|
8168
|
+
constructor(missingConfigKeyNames?: string[], msg?: string);
|
|
8169
|
+
}
|
|
8170
|
+
declare class LocalStorageError extends BeamError {
|
|
8171
|
+
constructor(msg?: string);
|
|
8172
|
+
}
|
|
8173
|
+
declare class SetupError extends BeamError {
|
|
8174
|
+
constructor(msg?: string);
|
|
8175
|
+
}
|
|
8176
|
+
|
|
8177
|
+
type beamErrors_BeamError = BeamError;
|
|
8178
|
+
declare const beamErrors_BeamError: typeof BeamError;
|
|
8179
|
+
type beamErrors_LocalStorageError = LocalStorageError;
|
|
8180
|
+
declare const beamErrors_LocalStorageError: typeof LocalStorageError;
|
|
8181
|
+
type beamErrors_MissingConfig = MissingConfig;
|
|
8182
|
+
declare const beamErrors_MissingConfig: typeof MissingConfig;
|
|
8183
|
+
type beamErrors_NetworkError = NetworkError;
|
|
8184
|
+
declare const beamErrors_NetworkError: typeof NetworkError;
|
|
8185
|
+
type beamErrors_SetupError = SetupError;
|
|
8186
|
+
declare const beamErrors_SetupError: typeof SetupError;
|
|
8187
|
+
declare namespace beamErrors {
|
|
8188
|
+
export {
|
|
8189
|
+
beamErrors_BeamError as BeamError,
|
|
8190
|
+
beamErrors_LocalStorageError as LocalStorageError,
|
|
8191
|
+
beamErrors_MissingConfig as MissingConfig,
|
|
8192
|
+
beamErrors_NetworkError as NetworkError,
|
|
8193
|
+
beamErrors_SetupError as SetupError,
|
|
8194
|
+
};
|
|
8195
|
+
}
|
|
8196
|
+
|
|
8197
|
+
type TPromoCodeRequest = paths["/productDetailsPage"]["post"]["requestBody"]["content"]["application/json"]["promos"];
|
|
8198
|
+
type TUnvalidatedPromoRequest = NonNullable<TPromoCodeRequest>["unvalidatedPromoCodes"];
|
|
8199
|
+
type TPromoCodeAttribute = {
|
|
8200
|
+
value: string;
|
|
8201
|
+
url?: never;
|
|
8202
|
+
} | {
|
|
8203
|
+
url: string;
|
|
8204
|
+
value?: never;
|
|
8205
|
+
};
|
|
8206
|
+
type TPromoCodeResponse = paths["/productDetailsPage"]["post"]["responses"]["200"]["content"]["application/json"]["promos"];
|
|
8207
|
+
type TValidatedPromoResponse = NonNullable<TPromoCodeResponse>["validatedPromoCodes"];
|
|
8208
|
+
|
|
8209
|
+
type NetworkEventDetail = {
|
|
8210
|
+
url: string;
|
|
8211
|
+
method: string;
|
|
8212
|
+
type: "fetch";
|
|
8213
|
+
response: Response;
|
|
8214
|
+
} | {
|
|
8215
|
+
url: string;
|
|
8216
|
+
method: string;
|
|
8217
|
+
type: "xhr";
|
|
8218
|
+
xhr: XMLHttpRequest;
|
|
8219
|
+
};
|
|
8220
|
+
/**
|
|
8221
|
+
* beamnetworkcall
|
|
8222
|
+
* Emitted by the Beam network listener whenever any API calls are made on the page
|
|
8223
|
+
*/
|
|
8224
|
+
declare class BeamNetworkCallEvent extends CustomEvent<NetworkEventDetail> {
|
|
8225
|
+
static eventName: "beamnetworkcall";
|
|
8226
|
+
constructor(detail: NetworkEventDetail);
|
|
8227
|
+
}
|
|
8228
|
+
type NonprofitSelectDetail = {
|
|
8229
|
+
selectionId?: string;
|
|
8230
|
+
selectedNonprofitId?: number | null;
|
|
8231
|
+
nonprofitName?: string | null;
|
|
8232
|
+
source?: WidgetName | null;
|
|
8233
|
+
timestamp?: Date;
|
|
8234
|
+
};
|
|
8235
|
+
/**
|
|
8236
|
+
* beamnonprofitselect
|
|
8237
|
+
* Emitted when the end user selects a nonprofit in the Beam widget, and when the previous selection was restored
|
|
8238
|
+
* automatically
|
|
8239
|
+
*/
|
|
8240
|
+
declare class BeamNonprofitSelectEvent extends CustomEvent<NonprofitSelectDetail> {
|
|
8241
|
+
static eventName: "beamnonprofitselect";
|
|
8242
|
+
constructor(detail: NonprofitSelectDetail);
|
|
8243
|
+
}
|
|
8244
|
+
type CartChangeDetail = TCartApi & {
|
|
8245
|
+
cartId?: string;
|
|
8246
|
+
subtotal?: number;
|
|
8247
|
+
itemCount?: number;
|
|
8248
|
+
currencyCode?: string;
|
|
8249
|
+
};
|
|
8250
|
+
/**
|
|
8251
|
+
* beamcartchange
|
|
8252
|
+
* Emitted when Beam detects that cart contents have changed, and when items are added to the cart for the first time
|
|
8253
|
+
*/
|
|
8254
|
+
declare class BeamCartChangeEvent extends CustomEvent<CartChangeDetail> {
|
|
8255
|
+
static eventName: "beamcartchange";
|
|
8256
|
+
constructor(detail: CartChangeDetail);
|
|
8257
|
+
}
|
|
8258
|
+
type CartCreatedDetail = CartChangeDetail;
|
|
8259
|
+
/**
|
|
8260
|
+
* beamcartcreated
|
|
8261
|
+
* Emitted when a cart is created in Beam for the first time, but NOT when the cart is updated
|
|
8262
|
+
* Beam's cart expiration rules are used to determine when a returning visit counts as the same cart
|
|
8263
|
+
*/
|
|
8264
|
+
declare class BeamCartCreatedEvent extends CustomEvent<CartCreatedDetail> {
|
|
8265
|
+
static eventName: "beamcartcreated";
|
|
8266
|
+
constructor(detail: CartCreatedDetail);
|
|
8267
|
+
}
|
|
8268
|
+
type OrderCreatedDetail = {
|
|
8269
|
+
orderId: TId;
|
|
8270
|
+
transactionId: TId;
|
|
8271
|
+
cartTotal: number;
|
|
8272
|
+
currencyCode: string;
|
|
8273
|
+
};
|
|
8274
|
+
/**
|
|
8275
|
+
* beamordercreated
|
|
8276
|
+
* Emitted when an order is registered with Beam for the first time, but NOT on repeat visits, page refreshes, etc.
|
|
8277
|
+
*/
|
|
8278
|
+
declare class BeamOrderCreatedEvent extends CustomEvent<OrderCreatedDetail> {
|
|
8279
|
+
static eventName: "beamordercreated";
|
|
8280
|
+
constructor(detail: OrderCreatedDetail);
|
|
8281
|
+
}
|
|
8282
|
+
/**
|
|
8283
|
+
* beamstatuschange
|
|
8284
|
+
* Emitted when the Beam config object has finished initializing along with all plugins
|
|
8285
|
+
*/
|
|
8286
|
+
type BeamStatusChangeEventDetail = {
|
|
8287
|
+
status: "pending";
|
|
8288
|
+
} | {
|
|
8289
|
+
status: "error";
|
|
8290
|
+
error: Error;
|
|
8291
|
+
} | {
|
|
8292
|
+
status: "ready";
|
|
8293
|
+
};
|
|
8294
|
+
declare class BeamStatusChangeEvent extends CustomEvent<BeamStatusChangeEventDetail> {
|
|
8295
|
+
static eventName: "beamstatuschange";
|
|
8296
|
+
constructor(detail: BeamStatusChangeEventDetail);
|
|
8297
|
+
}
|
|
8298
|
+
type NonprofitSelectionRemovedDetail = {
|
|
8299
|
+
previousNonprofitId?: number | null;
|
|
8300
|
+
newNonprofitId?: number | null;
|
|
8301
|
+
selectionId?: string;
|
|
8302
|
+
timestamp?: Date;
|
|
8303
|
+
};
|
|
8304
|
+
/**
|
|
8305
|
+
* beamnonprofitselectionremoved
|
|
8306
|
+
* Emitted when the nonprofit selection is removed from deselection or due to nonprofit cohort change
|
|
8307
|
+
*/
|
|
8308
|
+
declare class BeamNonprofitSelectionRemovedEvent extends CustomEvent<NonprofitSelectionRemovedDetail> {
|
|
8309
|
+
static eventName: "beamnonprofitselectionremoved";
|
|
8310
|
+
constructor(detail: NonprofitSelectionRemovedDetail);
|
|
8311
|
+
}
|
|
8312
|
+
type PromoStoredDetail = {
|
|
8313
|
+
promoCodes: TPromoCodeRequest;
|
|
8314
|
+
};
|
|
8315
|
+
/**
|
|
8316
|
+
* Emitted when a URL with query parameters is sanitized and stored in localStorage
|
|
8317
|
+
*
|
|
8318
|
+
* @event beampromocodesstored
|
|
8319
|
+
*/
|
|
8320
|
+
declare class BeamPromoCodesStoredEvent extends CustomEvent<PromoStoredDetail> {
|
|
8321
|
+
static eventName: string;
|
|
8322
|
+
constructor(detail: PromoStoredDetail);
|
|
8323
|
+
}
|
|
8324
|
+
type WidgetStoredPromosDetail = {
|
|
8325
|
+
source?: WidgetName | HelperName | null;
|
|
8326
|
+
};
|
|
8327
|
+
/**
|
|
8328
|
+
* Emitted when a widget stores the url or manual promoCodes in local storage
|
|
8329
|
+
*
|
|
8330
|
+
* @event beamwidgetstoredpromocodes
|
|
8331
|
+
*/
|
|
8332
|
+
declare class BeamWidgetStoredPromoCodesEvent extends CustomEvent<WidgetStoredPromosDetail> {
|
|
8333
|
+
static eventName: "beamwidgetstoredpromocodes";
|
|
8334
|
+
constructor(detail: WidgetStoredPromosDetail);
|
|
8335
|
+
}
|
|
8336
|
+
type WidgetInitialNonprofitSyncDetail = {
|
|
8337
|
+
nonprofitId?: number | null;
|
|
8338
|
+
nonprofitIdChanged?: boolean;
|
|
8339
|
+
selectionId?: string;
|
|
8340
|
+
selectionIdChanged?: boolean;
|
|
8341
|
+
};
|
|
8342
|
+
/**
|
|
8343
|
+
* [Shopify Specific] - Emitted the first time a widget restores nonprofit selection from custom attributes
|
|
8344
|
+
*
|
|
8345
|
+
* @event beamwidgetinitialnonprofitsync
|
|
8346
|
+
*/
|
|
8347
|
+
declare class BeamWidgetInitialNonprofitSyncEvent extends CustomEvent<WidgetInitialNonprofitSyncDetail> {
|
|
8348
|
+
static eventName: "beamwidgetinitialnonprofitsync";
|
|
8349
|
+
constructor(detail: WidgetInitialNonprofitSyncDetail);
|
|
8350
|
+
}
|
|
8351
|
+
type BeamWidgetInitialNonprofitSyncCancelDetail = {
|
|
8352
|
+
cancelled?: boolean;
|
|
8353
|
+
};
|
|
8354
|
+
/**
|
|
8355
|
+
* [Shopify Specific] - Allows WidgetInitialNonprofitSyncDetail to be cancelled asynchronously
|
|
8356
|
+
*
|
|
8357
|
+
* @event beamwidgetinitialnonprofitsynccancel
|
|
8358
|
+
*/
|
|
8359
|
+
declare class BeamWidgetInitialNonprofitSyncCancelEvent extends CustomEvent<BeamWidgetInitialNonprofitSyncCancelDetail> {
|
|
8360
|
+
static eventName: "beamwidgetinitialnonprofitsynccancel";
|
|
8361
|
+
constructor(detail: BeamWidgetInitialNonprofitSyncCancelDetail);
|
|
8362
|
+
}
|
|
8363
|
+
type BeamStatsigInitializedDetail = {
|
|
8364
|
+
showBeam: boolean;
|
|
8365
|
+
stableId?: string;
|
|
8366
|
+
};
|
|
8367
|
+
/**
|
|
8368
|
+
* Fired when Statsig experiment assignments for Beam are initialized
|
|
8369
|
+
*
|
|
8370
|
+
* @event beamstatsiginitialized
|
|
8371
|
+
*/
|
|
8372
|
+
declare class BeamStatsigInitializedEvent extends CustomEvent<BeamStatsigInitializedDetail> {
|
|
8373
|
+
static eventName: "beamstatsiginitialized";
|
|
8374
|
+
constructor(detail: BeamStatsigInitializedDetail);
|
|
8375
|
+
}
|
|
8376
|
+
|
|
8377
|
+
type events_BeamCartChangeEvent = BeamCartChangeEvent;
|
|
8378
|
+
declare const events_BeamCartChangeEvent: typeof BeamCartChangeEvent;
|
|
8379
|
+
type events_BeamCartCreatedEvent = BeamCartCreatedEvent;
|
|
8380
|
+
declare const events_BeamCartCreatedEvent: typeof BeamCartCreatedEvent;
|
|
8381
|
+
type events_BeamNetworkCallEvent = BeamNetworkCallEvent;
|
|
8382
|
+
declare const events_BeamNetworkCallEvent: typeof BeamNetworkCallEvent;
|
|
8383
|
+
type events_BeamNonprofitSelectEvent = BeamNonprofitSelectEvent;
|
|
8384
|
+
declare const events_BeamNonprofitSelectEvent: typeof BeamNonprofitSelectEvent;
|
|
8385
|
+
type events_BeamNonprofitSelectionRemovedEvent = BeamNonprofitSelectionRemovedEvent;
|
|
8386
|
+
declare const events_BeamNonprofitSelectionRemovedEvent: typeof BeamNonprofitSelectionRemovedEvent;
|
|
8387
|
+
type events_BeamOrderCreatedEvent = BeamOrderCreatedEvent;
|
|
8388
|
+
declare const events_BeamOrderCreatedEvent: typeof BeamOrderCreatedEvent;
|
|
8389
|
+
type events_BeamPromoCodesStoredEvent = BeamPromoCodesStoredEvent;
|
|
8390
|
+
declare const events_BeamPromoCodesStoredEvent: typeof BeamPromoCodesStoredEvent;
|
|
8391
|
+
type events_BeamStatsigInitializedEvent = BeamStatsigInitializedEvent;
|
|
8392
|
+
declare const events_BeamStatsigInitializedEvent: typeof BeamStatsigInitializedEvent;
|
|
8393
|
+
type events_BeamStatusChangeEvent = BeamStatusChangeEvent;
|
|
8394
|
+
declare const events_BeamStatusChangeEvent: typeof BeamStatusChangeEvent;
|
|
8395
|
+
type events_BeamWidgetInitialNonprofitSyncCancelEvent = BeamWidgetInitialNonprofitSyncCancelEvent;
|
|
8396
|
+
declare const events_BeamWidgetInitialNonprofitSyncCancelEvent: typeof BeamWidgetInitialNonprofitSyncCancelEvent;
|
|
8397
|
+
type events_BeamWidgetInitialNonprofitSyncEvent = BeamWidgetInitialNonprofitSyncEvent;
|
|
8398
|
+
declare const events_BeamWidgetInitialNonprofitSyncEvent: typeof BeamWidgetInitialNonprofitSyncEvent;
|
|
8399
|
+
type events_BeamWidgetStoredPromoCodesEvent = BeamWidgetStoredPromoCodesEvent;
|
|
8400
|
+
declare const events_BeamWidgetStoredPromoCodesEvent: typeof BeamWidgetStoredPromoCodesEvent;
|
|
8401
|
+
declare namespace events {
|
|
8402
|
+
export {
|
|
8403
|
+
events_BeamCartChangeEvent as BeamCartChangeEvent,
|
|
8404
|
+
events_BeamCartCreatedEvent as BeamCartCreatedEvent,
|
|
8405
|
+
events_BeamNetworkCallEvent as BeamNetworkCallEvent,
|
|
8406
|
+
events_BeamNonprofitSelectEvent as BeamNonprofitSelectEvent,
|
|
8407
|
+
events_BeamNonprofitSelectionRemovedEvent as BeamNonprofitSelectionRemovedEvent,
|
|
8408
|
+
events_BeamOrderCreatedEvent as BeamOrderCreatedEvent,
|
|
8409
|
+
events_BeamPromoCodesStoredEvent as BeamPromoCodesStoredEvent,
|
|
8410
|
+
events_BeamStatsigInitializedEvent as BeamStatsigInitializedEvent,
|
|
8411
|
+
events_BeamStatusChangeEvent as BeamStatusChangeEvent,
|
|
8412
|
+
events_BeamWidgetInitialNonprofitSyncCancelEvent as BeamWidgetInitialNonprofitSyncCancelEvent,
|
|
8413
|
+
events_BeamWidgetInitialNonprofitSyncEvent as BeamWidgetInitialNonprofitSyncEvent,
|
|
8414
|
+
events_BeamWidgetStoredPromoCodesEvent as BeamWidgetStoredPromoCodesEvent,
|
|
8415
|
+
};
|
|
8416
|
+
}
|
|
8417
|
+
|
|
8418
|
+
declare const logger: {
|
|
8419
|
+
error: (...args: any[]) => void;
|
|
8420
|
+
log: (...args: any[]) => void;
|
|
8421
|
+
warn: (...args: any[]) => void;
|
|
8422
|
+
debug: (...args: any[]) => void;
|
|
8423
|
+
};
|
|
8424
|
+
|
|
8425
|
+
declare const initNetworkListeners: () => void;
|
|
8426
|
+
/**
|
|
8427
|
+
* Disables Beam event dispatching from the fetch/XHR Proxies without
|
|
8428
|
+
* un-patching them (un-patching is unsafe if another script wrapped
|
|
8429
|
+
* fetch/XHR after us — restoring our saved reference would remove
|
|
8430
|
+
* their wrapper too).
|
|
8431
|
+
*/
|
|
8432
|
+
declare const teardownNetworkListeners: () => void;
|
|
8433
|
+
|
|
8434
|
+
/**
|
|
8435
|
+
* Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys
|
|
8436
|
+
* Also adds helper methods for JSON (de-)serialization
|
|
8437
|
+
*/
|
|
8438
|
+
declare const createScopedLocalStorage: (config: {
|
|
8439
|
+
apiKey: string;
|
|
8440
|
+
}) => {
|
|
8441
|
+
readonly prefix: string;
|
|
8442
|
+
readonly postfix: string;
|
|
8443
|
+
getItem(key: string): string | null;
|
|
8444
|
+
setItem(key: string, value: unknown): void;
|
|
8445
|
+
removeItem(key: string): void;
|
|
8446
|
+
/** Safely parses value as JSON and return JS object */
|
|
8447
|
+
getItemJson<T = Record<string, unknown>>(key: string): T | null;
|
|
8448
|
+
/** Safely stringifies value as JSON */
|
|
8449
|
+
setItemJson(key: string, value: object): void;
|
|
8450
|
+
};
|
|
8451
|
+
|
|
8452
|
+
declare function waitForElement(selector: string, { timeout }?: {
|
|
8453
|
+
timeout?: number | undefined;
|
|
8454
|
+
}): Promise<Element>;
|
|
8455
|
+
|
|
8456
|
+
declare const getCookieMap: (cookieString?: string) => Map<string, string>;
|
|
8457
|
+
declare const getCookieValue: (name: string) => string | undefined;
|
|
8458
|
+
declare const setCookieValue: (options: CookieInit) => undefined;
|
|
8459
|
+
declare const deleteCookieValue: (options: {
|
|
8460
|
+
name: string;
|
|
8461
|
+
domain?: string;
|
|
8462
|
+
path?: string;
|
|
8463
|
+
}) => undefined;
|
|
8464
|
+
interface CookieInit {
|
|
8465
|
+
name: string;
|
|
8466
|
+
value: string;
|
|
8467
|
+
path?: string;
|
|
8468
|
+
domain?: string;
|
|
8469
|
+
expires?: number;
|
|
8470
|
+
sameSite?: "strict" | "lax" | "none";
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8473
|
+
declare function saveRemoteSession({ remoteSessionId, apiKey }: {
|
|
8474
|
+
remoteSessionId: string;
|
|
8475
|
+
apiKey?: string;
|
|
8476
|
+
}): void;
|
|
8477
|
+
declare function getRemoteSession({ apiKey }: {
|
|
8478
|
+
apiKey?: string;
|
|
8479
|
+
}): string | null;
|
|
8480
|
+
|
|
8481
|
+
type Func<T extends any[], R> = (...args: T) => R;
|
|
8482
|
+
/**
|
|
8483
|
+
* Takes a function and returns a new memoized function.
|
|
8484
|
+
* If the same arguments are passed to the memoized function, it will return the previously computed result.
|
|
8485
|
+
* This is a "memoize once" function meaning it only compares the previous and current arguments, not historic values.
|
|
8486
|
+
* Results that throw errors or return rejected Promises are not cached.
|
|
8487
|
+
*
|
|
8488
|
+
* @param {Function} fn - The function to be memoized.
|
|
8489
|
+
* @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.
|
|
8490
|
+
* @returns {Function} - The memoized function.
|
|
8491
|
+
* @param func
|
|
8492
|
+
*/
|
|
8493
|
+
declare function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual }?: {
|
|
8494
|
+
isEqual?: ((value: any, other: any) => boolean) | undefined;
|
|
8495
|
+
}): MemoizedLast<Func<T, R>>;
|
|
8496
|
+
type MemoizedLast<T extends (...args: any[]) => any> = T & {
|
|
8497
|
+
/** Clears the cached args/result so the next call always executes. */
|
|
8498
|
+
reset: () => void;
|
|
8499
|
+
};
|
|
8500
|
+
|
|
8501
|
+
/**
|
|
8502
|
+
* Retrieves all validated promo codes stored in the "beam_promo_codes" cookie and parses it
|
|
8503
|
+
*
|
|
8504
|
+
* @returns {TPromoCodeResponse | undefined} An array of `ValidatedPromoCode` objects if found and parsed successfully, otherwise `undefined`
|
|
8505
|
+
*/
|
|
8506
|
+
declare const getAllPromoCodesFromCookie: () => TPromoCodeResponse | undefined;
|
|
8507
|
+
/**
|
|
8508
|
+
* Stores the validated promo codes in the "beam_promo_codes" cookie, replaces and does not merge
|
|
8509
|
+
*
|
|
8510
|
+
* @param {TValidatedPromoResponse} validatedPromoCodes
|
|
8511
|
+
* @param {string} domain
|
|
8512
|
+
*/
|
|
8513
|
+
declare const setPromoCodeInCookie: ({ validatedPromoCodes, domain, }: {
|
|
8514
|
+
validatedPromoCodes: TValidatedPromoResponse;
|
|
8515
|
+
domain?: string;
|
|
8516
|
+
}) => void;
|
|
8517
|
+
/**
|
|
8518
|
+
* Retrieves promo codes from localStorage, scoped by API key
|
|
8519
|
+
* @param {string} apiKey API key used for storage scoping
|
|
8520
|
+
* @returns {TPromoCodeRequest | null} - Returns stored promo codes object containing both
|
|
8521
|
+
* validated and unvalidated codes
|
|
8522
|
+
* - If no codes exist, returns a fresh object with empty arrays
|
|
8523
|
+
*
|
|
8524
|
+
*/
|
|
8525
|
+
declare const getPromoCodesLocalStorage: ({ apiKey }: {
|
|
8526
|
+
apiKey: string;
|
|
8527
|
+
}) => TPromoCodeRequest | null;
|
|
8528
|
+
/**
|
|
8529
|
+
* Sets promo codes in localStorage
|
|
8530
|
+
* @param {TPromoCodeRequest} promoCodes New promo codes to add
|
|
8531
|
+
* @param {string} apiKey API key for storage scoping
|
|
8532
|
+
*/
|
|
8533
|
+
declare const setPromoCodesInLocalStorage: ({ apiKey, promoCodes, }: {
|
|
8534
|
+
apiKey?: string;
|
|
8535
|
+
promoCodes: Partial<TPromoCodeRequest>;
|
|
8536
|
+
}) => void;
|
|
8537
|
+
/**
|
|
8538
|
+
* Merges new promo codes with existing ones and returns the combined result
|
|
8539
|
+
* @param {Partial<TPromoCodeRequest>} newPromos New promo codes to add
|
|
8540
|
+
* @param {string} apiKey API key for storage scoping
|
|
8541
|
+
* @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
|
|
8542
|
+
* @example
|
|
8543
|
+
* const result = mergePromoCodes({
|
|
8544
|
+
* apiKey: 'beam_123',
|
|
8545
|
+
* newPromos: {
|
|
8546
|
+
* unvalidatedPromoCodes: [
|
|
8547
|
+
* { type: 'manual', attributes: { value: 'WINTER20' } },
|
|
8548
|
+
* { type: 'url', attributes: { url: 'www.example.com/?promo=HOLIDAY25' } }
|
|
8549
|
+
* ]
|
|
8550
|
+
* }
|
|
8551
|
+
* });
|
|
8552
|
+
*/
|
|
8553
|
+
declare const mergeStoreAndReturnPromos: ({ newPromos, apiKey, }: {
|
|
8554
|
+
newPromos: Partial<TPromoCodeRequest>;
|
|
8555
|
+
apiKey: string;
|
|
8556
|
+
}) => TPromoCodeRequest;
|
|
8557
|
+
/**
|
|
8558
|
+
* Formats unvalidated promo codes by determining their source and attributes
|
|
8559
|
+
* The function will assign `QueryParam` as the source if a `url` exists,
|
|
8560
|
+
* otherwise, it will assign `Manual` as the source
|
|
8561
|
+
*
|
|
8562
|
+
* @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
|
|
8563
|
+
* @returns {TUnvalidatedPromoRequest} - An array of UnvalidatedPromoCode objects,
|
|
8564
|
+
* each with a source and attributes object
|
|
8565
|
+
*/
|
|
8566
|
+
declare const mapToUnvalidatedPromoCodes: (promoAttributes: TPromoCodeAttribute[]) => TUnvalidatedPromoRequest;
|
|
8567
|
+
/**
|
|
8568
|
+
* @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
|
|
8569
|
+
* @param {string} apiKey API key for storage scoping
|
|
8570
|
+
* @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
|
|
8571
|
+
*/
|
|
8572
|
+
declare const formatStoreAndReturnPromoCodes: (promoAttributes: TPromoCodeAttribute[], apiKey: string) => TPromoCodeRequest;
|
|
8573
|
+
/**
|
|
8574
|
+
* Extracts applicable promo codes from the cart object
|
|
8575
|
+
* This function retrieves discounts stored in the cart's `content.discounts` array,
|
|
8576
|
+
* filters out only the applicable promo codes, and returns them as an array of strings
|
|
8577
|
+
*
|
|
8578
|
+
* @param {TBeamCartLocalStorage} cart The cart object retrieved from local storage
|
|
8579
|
+
* @returns {string[]} An array of applicable promo codes
|
|
8580
|
+
*/
|
|
8581
|
+
declare const getPromoCodesFromCart: (cart: TBeamCartLocalStorage) => string[];
|
|
8582
|
+
/**
|
|
8583
|
+
* Gets promo code exclusively from Shopify discount cookie
|
|
8584
|
+
* @returns {string | null} Single discount code or null if not found
|
|
8585
|
+
*/
|
|
8586
|
+
declare const getPromoCodeFromShopifyCookie: () => string | null;
|
|
8587
|
+
/**
|
|
8588
|
+
* Safely parses a JSON string into an array of strings
|
|
8589
|
+
* If parsing fails or the input is not a valid JSON array, it returns an empty array
|
|
8590
|
+
*
|
|
8591
|
+
* @param {string | undefined | null} jsonString The JSON string to parse
|
|
8592
|
+
* @returns {string[]} The parsed array of strings or an empty array if parsing fails
|
|
8593
|
+
*/
|
|
8594
|
+
declare const parseJsonStringArray: (jsonString: string | undefined | null) => string[];
|
|
8595
|
+
/**
|
|
8596
|
+
* Retrieves and sanitizes the current URL for storage, preserving only safe query parameters
|
|
8597
|
+
*
|
|
8598
|
+
* @returns {TPromoCodeAttribute} Returns an object with only the `url` property set
|
|
8599
|
+
*/
|
|
8600
|
+
declare const getSanitizedUrlForStorage: () => TPromoCodeAttribute | undefined;
|
|
8601
|
+
declare const promoCodesAreEqual: (a: TPromoCodeRequest, b: TPromoCodeRequest) => boolean;
|
|
8602
|
+
declare const isEmptyPromoData: (promos: {
|
|
8603
|
+
unvalidatedPromoCodes?: unknown[];
|
|
8604
|
+
validatedPromoCodes?: unknown[];
|
|
8605
|
+
}) => boolean;
|
|
8606
|
+
|
|
8607
|
+
/**
|
|
8608
|
+
* Clears every piece of Beam-related browser state this SDK writes, by iterating the
|
|
8609
|
+
* LOCAL_STORAGE_KEYS/BEAM_COOKIE_NAMES registries (src/api-sdk/constants.ts) directly —
|
|
8610
|
+
* anything added to those objects is cleared automatically, with nothing to update here.
|
|
8611
|
+
*
|
|
8612
|
+
* Not tied to any one integration's lifecycle (e.g. registerCartIntegration/
|
|
8613
|
+
* unregisterCartIntegration) — safe to call on its own, from any integration or directly,
|
|
8614
|
+
* whenever a full reset of Beam's local footprint is needed.
|
|
8615
|
+
*/
|
|
8616
|
+
declare function clearBeamStorage(config: {
|
|
8617
|
+
apiKey: string;
|
|
8618
|
+
domain?: string;
|
|
8619
|
+
}): void;
|
|
8620
|
+
|
|
8621
|
+
type index_MemoizedLast<T extends (...args: any[]) => any> = MemoizedLast<T>;
|
|
8622
|
+
declare const index_clearBeamStorage: typeof clearBeamStorage;
|
|
8623
|
+
declare const index_createScopedLocalStorage: typeof createScopedLocalStorage;
|
|
8624
|
+
declare const index_debounce: typeof debounce;
|
|
8625
|
+
declare const index_deleteCookieValue: typeof deleteCookieValue;
|
|
8626
|
+
declare const index_events: typeof events;
|
|
8627
|
+
declare const index_formatStoreAndReturnPromoCodes: typeof formatStoreAndReturnPromoCodes;
|
|
8628
|
+
declare const index_getAllPromoCodesFromCookie: typeof getAllPromoCodesFromCookie;
|
|
8629
|
+
declare const index_getCookieMap: typeof getCookieMap;
|
|
8630
|
+
declare const index_getCookieValue: typeof getCookieValue;
|
|
8631
|
+
declare const index_getPromoCodeFromShopifyCookie: typeof getPromoCodeFromShopifyCookie;
|
|
8632
|
+
declare const index_getPromoCodesFromCart: typeof getPromoCodesFromCart;
|
|
8633
|
+
declare const index_getPromoCodesLocalStorage: typeof getPromoCodesLocalStorage;
|
|
8634
|
+
declare const index_getRemoteSession: typeof getRemoteSession;
|
|
8635
|
+
declare const index_getSanitizedUrlForStorage: typeof getSanitizedUrlForStorage;
|
|
8636
|
+
declare const index_initNetworkListeners: typeof initNetworkListeners;
|
|
8637
|
+
declare const index_isEmptyPromoData: typeof isEmptyPromoData;
|
|
8638
|
+
declare const index_isEqual: typeof isEqual;
|
|
8639
|
+
declare const index_logger: typeof logger;
|
|
8640
|
+
declare const index_mapToUnvalidatedPromoCodes: typeof mapToUnvalidatedPromoCodes;
|
|
8641
|
+
declare const index_memoizeLast: typeof memoizeLast;
|
|
8642
|
+
declare const index_mergeStoreAndReturnPromos: typeof mergeStoreAndReturnPromos;
|
|
8643
|
+
declare const index_parseJsonStringArray: typeof parseJsonStringArray;
|
|
8644
|
+
declare const index_promoCodesAreEqual: typeof promoCodesAreEqual;
|
|
8645
|
+
declare const index_saveRemoteSession: typeof saveRemoteSession;
|
|
8646
|
+
declare const index_setCookieValue: typeof setCookieValue;
|
|
8647
|
+
declare const index_setPromoCodeInCookie: typeof setPromoCodeInCookie;
|
|
8648
|
+
declare const index_setPromoCodesInLocalStorage: typeof setPromoCodesInLocalStorage;
|
|
8649
|
+
declare const index_teardownNetworkListeners: typeof teardownNetworkListeners;
|
|
8650
|
+
declare const index_waitForElement: typeof waitForElement;
|
|
8651
|
+
declare namespace index {
|
|
8652
|
+
export { index_clearBeamStorage as clearBeamStorage, index_createScopedLocalStorage as createScopedLocalStorage, index_debounce as debounce, index_deleteCookieValue as deleteCookieValue, beamErrors as errors, index_events as events, index_formatStoreAndReturnPromoCodes as formatStoreAndReturnPromoCodes, index_getAllPromoCodesFromCookie as getAllPromoCodesFromCookie, index_getCookieMap as getCookieMap, index_getCookieValue as getCookieValue, index_getPromoCodeFromShopifyCookie as getPromoCodeFromShopifyCookie, index_getPromoCodesFromCart as getPromoCodesFromCart, index_getPromoCodesLocalStorage as getPromoCodesLocalStorage, index_getRemoteSession as getRemoteSession, index_getSanitizedUrlForStorage as getSanitizedUrlForStorage, index_initNetworkListeners as initNetworkListeners, index_isEmptyPromoData as isEmptyPromoData, index_isEqual as isEqual, index_logger as logger, index_mapToUnvalidatedPromoCodes as mapToUnvalidatedPromoCodes, index_memoizeLast as memoizeLast, index_mergeStoreAndReturnPromos as mergeStoreAndReturnPromos, index_parseJsonStringArray as parseJsonStringArray, index_promoCodesAreEqual as promoCodesAreEqual, index_saveRemoteSession as saveRemoteSession, index_setCookieValue as setCookieValue, index_setPromoCodeInCookie as setPromoCodeInCookie, index_setPromoCodesInLocalStorage as setPromoCodesInLocalStorage, index_teardownNetworkListeners as teardownNetworkListeners, index_waitForElement as waitForElement };
|
|
8653
|
+
export type { index_MemoizedLast as MemoizedLast };
|
|
8654
|
+
}
|
|
8655
|
+
|
|
8656
|
+
/**
|
|
8657
|
+
* Retrieves the Beam cart ID from cookies
|
|
8658
|
+
* @param CART_COOKIE_NAME - The name of the cookie that stores the Beam cart ID
|
|
8659
|
+
* @returns The Beam cart ID if present in cookies or local storage, otherwise null
|
|
8660
|
+
*/
|
|
8661
|
+
declare const getBeamCartId: (CART_COOKIE_NAME: string, config: {
|
|
8662
|
+
apiKey: string;
|
|
8663
|
+
}) => string | null;
|
|
8664
|
+
/**
|
|
8665
|
+
* Retrieves the external cart ID
|
|
8666
|
+
* @param CART_COOKIE_NAME - The name of the cookie that stores the external cart ID
|
|
8667
|
+
* @returns The external cart ID if available or null if neither is available
|
|
8668
|
+
*/
|
|
8669
|
+
declare const getExternalCartId: (CART_COOKIE_NAME: string, config: {
|
|
8670
|
+
apiKey: string;
|
|
8671
|
+
}) => string | null;
|
|
8672
|
+
|
|
8673
|
+
declare function makeApiKeyHeader(apiKey: string): {
|
|
8674
|
+
authorization: string;
|
|
8675
|
+
};
|
|
8676
|
+
|
|
8677
|
+
export { BeamStatusChangeEvent as $, memoizeLast as A, BeamNonprofitSelectEvent as B, mergeStoreAndReturnPromos as C, parseJsonStringArray as D, promoCodesAreEqual as E, saveRemoteSession as F, setCookieValue as G, setPromoCodeInCookie as H, setPromoCodesInLocalStorage as I, teardownNetworkListeners as J, BeamError as O, LocalStorageError as P, MissingConfig as Q, NetworkError as R, SetupError as S, BeamCartChangeEvent as U, BeamCartCreatedEvent as V, BeamNetworkCallEvent as W, BeamNonprofitSelectionRemovedEvent as X, BeamOrderCreatedEvent as Y, BeamPromoCodesStoredEvent as Z, BeamStatsigInitializedEvent as _, index as a, BeamWidgetInitialNonprofitSyncCancelEvent as a0, BeamWidgetInitialNonprofitSyncEvent as a1, BeamWidgetStoredPromoCodesEvent as a2, getBeamCartId as a3, getExternalCartId as a4, makeApiKeyHeader as a5, events as e, initNetworkListeners as i, clearBeamStorage as j, createScopedLocalStorage as k, deleteCookieValue as l, beamErrors as m, formatStoreAndReturnPromoCodes as n, getAllPromoCodesFromCookie as o, getCookieMap as p, getCookieValue as q, getPromoCodeFromShopifyCookie as r, getPromoCodesFromCart as s, getPromoCodesLocalStorage as t, getRemoteSession as u, getSanitizedUrlForStorage as v, waitForElement as w, isEmptyPromoData as x, logger as y, mapToUnvalidatedPromoCodes as z };
|
|
8678
|
+
export type { paths as K, LANGUAGES as L, MemoizedLast as M, TApiKey as N, TUrl$1 as T, TNumericId as b, TId as c, TCart as d, TUrl as f, BeamBaseAPIConfig as g, TCartApi as h };
|