@braze/web-sdk 6.7.1 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/index.d.ts +165 -38
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +2 -2
  4. package/shared-lib/event-types.js +16 -16
  5. package/shared-lib/indexed-db-adapter.js +65 -65
  6. package/shared-lib/logger.js +18 -18
  7. package/shared-lib/supported-options.js +1 -1
  8. package/src/Banner/banner-provider.js +67 -59
  9. package/src/Banner/banner.js +40 -19
  10. package/src/Banner/dismiss-banner.js +4 -0
  11. package/src/Banner/display/banner-to-html.js +10 -10
  12. package/src/Banner/display/destroy-banner-html.js +2 -2
  13. package/src/Banner/get-all-banners.js +6 -6
  14. package/src/Banner/get-banner.js +6 -6
  15. package/src/Banner/index.js +1 -0
  16. package/src/Banner/log-banner-click.js +7 -7
  17. package/src/Banner/log-banner-dismissal.js +7 -7
  18. package/src/Banner/log-banner-impressions.js +27 -18
  19. package/src/Banner/request-banners-refresh.js +8 -8
  20. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  21. package/src/Banner/ui/insert-banner.js +8 -8
  22. package/src/Card/card-manager.js +31 -31
  23. package/src/Card/log-card-dismissal.js +2 -2
  24. package/src/Card/log-content-card-click.js +2 -2
  25. package/src/Card/log-content-card-impressions.js +4 -4
  26. package/src/Card/models/captioned-image.js +15 -15
  27. package/src/Card/models/card.js +89 -89
  28. package/src/Card/models/classic-card.js +16 -16
  29. package/src/Card/models/control-card.js +7 -7
  30. package/src/Card/models/image-only.js +13 -13
  31. package/src/Card/util/card-factory.js +32 -32
  32. package/src/ContentCards/content-cards-provider-factory.js +13 -11
  33. package/src/ContentCards/content-cards-provider.js +105 -105
  34. package/src/ContentCards/get-cached-content-cards.js +2 -2
  35. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  36. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  37. package/src/ContentCards/ui/show-content-cards.js +7 -7
  38. package/src/Core/add-sdk-metadata.js +2 -2
  39. package/src/Core/change-user.js +5 -5
  40. package/src/Core/destroy.js +2 -2
  41. package/src/Core/disable-sdk.js +4 -4
  42. package/src/Core/enable-sdk.js +4 -4
  43. package/src/Core/get-device-id.js +2 -2
  44. package/src/Core/handle-braze-action.js +5 -5
  45. package/src/Core/index.js +1 -0
  46. package/src/Core/log-custom-event.js +5 -5
  47. package/src/Core/log-ecommerce-event.js +29 -0
  48. package/src/Core/log-purchase.js +23 -198
  49. package/src/Core/open-session.js +10 -10
  50. package/src/Core/set-logger.js +2 -2
  51. package/src/Core/set-sdk-authentication-signature.js +1 -1
  52. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  53. package/src/Core/toggle-logging.js +2 -2
  54. package/src/Core/wipe-data.js +6 -6
  55. package/src/DUST/dust-connection-core.js +1 -0
  56. package/src/DUST/dust-provider-factory.js +10 -10
  57. package/src/DUST/dust-provider.js +258 -226
  58. package/src/DUST/dust-shared-worker-code.js +1 -1
  59. package/src/DUST/dust-shared-worker-impl.js +97 -103
  60. package/src/DUST/dust-worker-bridge.js +55 -40
  61. package/src/DUST/subscribe-to-dust.js +7 -7
  62. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  63. package/src/FeatureFlags/feature-flag.js +3 -3
  64. package/src/FeatureFlags/feature-flags-provider.js +21 -21
  65. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  66. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  67. package/src/InAppMessage/constants.js +3 -3
  68. package/src/InAppMessage/defer-in-app-message.js +3 -3
  69. package/src/InAppMessage/display/html-message-to-html.js +4 -4
  70. package/src/InAppMessage/display/in-app-message-to-html.js +32 -32
  71. package/src/InAppMessage/display/modal-utils.js +2 -2
  72. package/src/InAppMessage/in-app-message-factory.js +36 -36
  73. package/src/InAppMessage/in-app-message-manager.js +35 -35
  74. package/src/InAppMessage/log-in-app-message-button-click.js +3 -3
  75. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  76. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  77. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  78. package/src/InAppMessage/models/control-message.js +4 -4
  79. package/src/InAppMessage/models/full-screen-message.js +9 -9
  80. package/src/InAppMessage/models/html-message.js +2 -2
  81. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  82. package/src/InAppMessage/models/in-app-message.js +34 -34
  83. package/src/InAppMessage/models/modal-message.js +7 -7
  84. package/src/InAppMessage/models/slide-up-message.js +8 -8
  85. package/src/InAppMessage/ui/show-in-app-message.js +20 -20
  86. package/src/Push/push-manager.js +44 -44
  87. package/src/User/user-manager.js +19 -19
  88. package/src/User/user.js +17 -17
  89. package/src/common/base-provider.js +1 -1
  90. package/src/common/constants.js +1 -0
  91. package/src/common/content-cards-display.js +6 -6
  92. package/src/common/event-logger.js +3 -3
  93. package/src/common/properties-base.js +3 -3
  94. package/src/l10n/l10n-manager.js +2 -2
  95. package/src/managers/auth-manager.js +11 -11
  96. package/src/managers/braze-instance.js +59 -59
  97. package/src/managers/device-manager.js +9 -9
  98. package/src/managers/network-manager.js +65 -63
  99. package/src/managers/server-config-manager.js +110 -93
  100. package/src/managers/session-manager.js +20 -20
  101. package/src/managers/storage-manager-factory.js +9 -9
  102. package/src/managers/storage-manager.js +137 -137
  103. package/src/managers/subscription-manager.js +2 -2
  104. package/src/managers/utils.js +1 -1
  105. package/src/models/braze-event.js +2 -2
  106. package/src/models/identifier.js +5 -5
  107. package/src/models/push-token.js +8 -8
  108. package/src/models/request-result.js +1 -1
  109. package/src/models/server-config.js +46 -28
  110. package/src/request-controller.js +124 -124
  111. package/src/triggers/models/custom-event-data.js +4 -4
  112. package/src/triggers/models/custom-event-property-data.js +5 -5
  113. package/src/triggers/models/filter-set.js +2 -2
  114. package/src/triggers/models/filter.js +1 -1
  115. package/src/triggers/models/in-app-message-click-data.js +5 -5
  116. package/src/triggers/models/purchase-data.js +1 -1
  117. package/src/triggers/models/purchase-property-data.js +2 -2
  118. package/src/triggers/models/push-click-data.js +5 -5
  119. package/src/triggers/models/trigger-condition.js +45 -45
  120. package/src/triggers/models/trigger-events.js +3 -3
  121. package/src/triggers/models/trigger.js +30 -30
  122. package/src/triggers/triggers-provider.js +63 -63
  123. package/src/types.js +5 -1
  124. package/src/ui/js/attach-css.js +1 -1
  125. package/src/util/braze-actions.js +6 -6
  126. package/src/util/browser-detector.js +13 -13
  127. package/src/util/client-hints-parser.js +5 -5
  128. package/src/util/code-utils.js +2 -2
  129. package/src/util/deprecation-utils.js +2 -2
  130. package/src/util/dom-utils.js +8 -8
  131. package/src/util/ecommerce-event-validation.js +343 -0
  132. package/src/util/html-display-utils.js +11 -11
  133. package/src/util/iso-4217-currency-codes.js +176 -0
  134. package/src/util/net.js +4 -4
  135. package/src/util/request-header-utils.js +10 -10
  136. package/src/util/string-utils.js +2 -2
  137. package/src/util/user-agent-parser.js +15 -15
  138. package/src/util/validation-utils.js +14 -14
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Type definitions for @braze/web-sdk v6.7.1
2
+ * Type definitions for @braze/web-sdk v6.9.0
3
3
  * Project: https://github.com/braze-inc/braze-web-sdk
4
4
  * (c) Braze, Inc. 2026 - http://braze.com
5
5
  * License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
@@ -1585,7 +1585,7 @@ export type PropertiesJson = Partial<
1585
1585
  >
1586
1586
  >;
1587
1587
 
1588
- export interface eCommerceProductProperties {
1588
+ export interface EcommerceProductProperties {
1589
1589
  /**
1590
1590
  * A unique identifier for the product, such as product ID or SKU. Cannot exceed 255 characters in length.
1591
1591
  */
@@ -1622,19 +1622,15 @@ export interface eCommerceProductProperties {
1622
1622
  price: number;
1623
1623
 
1624
1624
  /**
1625
- * Additional metadata about the product. Keys are limited to 255 characters in length, cannot begin with a $ character,
1625
+ * Additional metadata about the product. Keys are limited to 255 characters in length, cannot begin with a $ character,
1626
1626
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1627
1627
  */
1628
1628
  metadata?: {
1629
- /**
1630
- * Shopify SKU, only applicable to Shopify integrations. Cannot exceed 255 characters in length.
1631
- */
1632
- sku?: string;
1633
1629
  [key: string]: any;
1634
1630
  };
1635
1631
  }
1636
1632
 
1637
- export interface eCommerceEventProperties {
1633
+ export interface EcommerceEventProperties {
1638
1634
  /**
1639
1635
  * Default USD. Currencies should be represented as an ISO 4217 currency code. Supported
1640
1636
  * currency symbols include: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF,
@@ -1657,14 +1653,14 @@ export interface eCommerceEventProperties {
1657
1653
  }
1658
1654
 
1659
1655
  export interface CheckoutStartedEventProperties
1660
- extends eCommerceEventProperties {
1656
+ extends EcommerceEventProperties {
1661
1657
  /**
1662
1658
  * A unique identifier for the checkout. Cannot exceed 255 characters in length.
1663
1659
  */
1664
1660
  checkout_id: string;
1665
1661
 
1666
1662
  /**
1667
- * A unique identifier for the cart. If no value is passed, a default value is assumed
1663
+ * A unique identifier for the cart. If no value is passed, a default value is assumed
1668
1664
  * (shared across cart/checkout/order events) for user cart mapping.
1669
1665
  * Cannot exceed 255 characters in length.
1670
1666
  */
@@ -1675,13 +1671,28 @@ export interface CheckoutStartedEventProperties
1675
1671
  */
1676
1672
  total_value: number;
1677
1673
 
1674
+ /**
1675
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1676
+ */
1677
+ subtotal_value?: number;
1678
+
1679
+ /**
1680
+ * Total tax applied to the cart.
1681
+ */
1682
+ tax?: number;
1683
+
1684
+ /**
1685
+ * Total shipping cost for the cart.
1686
+ */
1687
+ shipping?: number;
1688
+
1678
1689
  /**
1679
1690
  * The products associated with the checkout.
1680
1691
  */
1681
- products: eCommerceProductProperties[];
1692
+ products: EcommerceProductProperties[];
1682
1693
 
1683
1694
  /**
1684
- * Additional metadata about the checkout. Keys are limited to 255 characters in length, cannot begin with a $ character,
1695
+ * Additional metadata about the checkout. Keys are limited to 255 characters in length, cannot begin with a $ character,
1685
1696
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1686
1697
  */
1687
1698
  metadata?: {
@@ -1690,34 +1701,75 @@ export interface CheckoutStartedEventProperties
1690
1701
  };
1691
1702
  }
1692
1703
 
1693
- export interface CartUpdatedEventProperties extends eCommerceEventProperties {
1704
+ type CartUpdatedBaseProperties = EcommerceEventProperties & {
1694
1705
  /**
1695
- * A unique identifier for the cart. If no value is passed, a default value is assumed
1706
+ * A unique identifier for the cart. If no value is passed, a default value is assumed
1696
1707
  * (shared across cart/checkout/order events) for user cart mapping.
1697
1708
  * Cannot exceed 255 characters in length.
1698
1709
  */
1699
1710
  cart_id: string;
1700
1711
 
1701
1712
  /**
1702
- * The total monetary value of the cart (ex: 12.99).
1713
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1703
1714
  */
1704
- total_value: number;
1715
+ subtotal_value?: number;
1716
+
1717
+ /**
1718
+ * Total tax applied to the cart.
1719
+ */
1720
+ tax?: number;
1721
+
1722
+ /**
1723
+ * Total shipping cost for the cart.
1724
+ */
1725
+ shipping?: number;
1705
1726
 
1706
1727
  /**
1707
1728
  * The products in the updated cart.
1708
1729
  */
1709
- products: eCommerceProductProperties[];
1730
+ products: EcommerceProductProperties[];
1710
1731
 
1711
1732
  /**
1712
- * Additional metadata about the cart update. Keys are limited to 255 characters in length, cannot begin with a $ character,
1733
+ * Additional metadata about the cart update. Keys are limited to 255 characters in length, cannot begin with a $ character,
1713
1734
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1714
1735
  */
1715
1736
  metadata?: {
1716
1737
  [key: string]: any;
1717
1738
  };
1718
- }
1739
+ };
1719
1740
 
1720
- export interface ProductViewedEventProperties extends eCommerceEventProperties {
1741
+ /**
1742
+ * Properties for the `ecommerce.cart_updated` event.
1743
+ *
1744
+ * `total_value` is required when `action` is `"replace"` or omitted (defaults to `"replace"`).
1745
+ * `total_value` is optional when `action` is `"add"` or `"remove"`.
1746
+ */
1747
+ export type CartUpdatedEventProperties =
1748
+ | (CartUpdatedBaseProperties & {
1749
+ /**
1750
+ * The action that triggered the cart update. Defaults to "replace" if not provided.
1751
+ * - "replace": the cart contents were fully replaced (default)
1752
+ */
1753
+ action?: "replace";
1754
+ /**
1755
+ * The total monetary value of the cart (ex: 12.99). Required when action is "replace" or omitted.
1756
+ */
1757
+ total_value: number;
1758
+ })
1759
+ | (CartUpdatedBaseProperties & {
1760
+ /**
1761
+ * The action that triggered the cart update.
1762
+ * - "add": one or more products were added to the cart
1763
+ * - "remove": one or more products were removed from the cart
1764
+ */
1765
+ action: "add" | "remove";
1766
+ /**
1767
+ * The total monetary value of the cart (ex: 12.99). Optional when action is "add" or "remove".
1768
+ */
1769
+ total_value?: number;
1770
+ });
1771
+
1772
+ export interface ProductViewedEventProperties extends EcommerceEventProperties {
1721
1773
  /**
1722
1774
  * A unique identifier for the product that was viewed. Cannot exceed 255 characters in length.
1723
1775
  */
@@ -1749,32 +1801,28 @@ export interface ProductViewedEventProperties extends eCommerceEventProperties {
1749
1801
  price: number;
1750
1802
 
1751
1803
  /**
1752
- * Additional metadata about the product viewed. Keys are limited to 255 characters in length, cannot begin with a $ character,
1804
+ * A list of types for the product that was viewed. The `back_in_stock` and `price_drop` types can be used to trigger
1805
+ * back-in-stock and price drop notifications. Each type cannot exceed 255 characters in length.
1806
+ */
1807
+ type?: string[];
1808
+
1809
+ /**
1810
+ * Additional metadata about the product viewed. Keys are limited to 255 characters in length, cannot begin with a $ character,
1753
1811
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1754
1812
  */
1755
1813
  metadata?: {
1756
- /**
1757
- * Shopify SKU, only applicable to Shopify integrations. Cannot exceed 255 characters in length.
1758
- */
1759
- sku?: string;
1760
-
1761
- /**
1762
- * A list of types for the product that was viewed. The `back_in_stock` and `price_drop` types can be used to trigger
1763
- * back-in-stock and price drop notifications. Each type cannot exceed 255 characters in length.
1764
- */
1765
- type?: string[];
1766
1814
  [key: string]: any;
1767
1815
  };
1768
1816
  }
1769
1817
 
1770
- export interface OrderPlacedEventProperties extends eCommerceEventProperties {
1818
+ export interface OrderPlacedEventProperties extends EcommerceEventProperties {
1771
1819
  /**
1772
1820
  * A unique identifier for the order that was placed. Cannot exceed 255 characters in length.
1773
1821
  */
1774
1822
  order_id: string;
1775
1823
 
1776
1824
  /**
1777
- * A unique identifier for the cart. If no value is passed, a default value is assumed
1825
+ * A unique identifier for the cart. If no value is passed, a default value is assumed
1778
1826
  * (shared across cart/checkout/order events) for user cart mapping.
1779
1827
  * Cannot exceed 255 characters in length.
1780
1828
  */
@@ -1785,6 +1833,21 @@ export interface OrderPlacedEventProperties extends eCommerceEventProperties {
1785
1833
  */
1786
1834
  total_value: number;
1787
1835
 
1836
+ /**
1837
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1838
+ */
1839
+ subtotal_value?: number;
1840
+
1841
+ /**
1842
+ * Total tax applied to the cart.
1843
+ */
1844
+ tax?: number;
1845
+
1846
+ /**
1847
+ * Total shipping cost for the cart.
1848
+ */
1849
+ shipping?: number;
1850
+
1788
1851
  /**
1789
1852
  * The total amount of discounts applied to the order (ex: 12.99).
1790
1853
  */
@@ -1798,10 +1861,10 @@ export interface OrderPlacedEventProperties extends eCommerceEventProperties {
1798
1861
  /**
1799
1862
  * The products in the order.
1800
1863
  */
1801
- products: eCommerceProductProperties[];
1864
+ products: EcommerceProductProperties[];
1802
1865
 
1803
1866
  /**
1804
- * Additional metadata about the product viewed. Keys are limited to 255 characters in length, cannot begin with a $ character,
1867
+ * Additional metadata about the product viewed. Keys are limited to 255 characters in length, cannot begin with a $ character,
1805
1868
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1806
1869
  */
1807
1870
  metadata?: {
@@ -1826,7 +1889,7 @@ export interface OrderPlacedEventProperties extends eCommerceEventProperties {
1826
1889
  referring_site?: string;
1827
1890
 
1828
1891
  /**
1829
- * A list of payment system sources (ex: POS, mobile, etc.), only applicable to Shopify integrations.
1892
+ * A list of payment system sources (ex: POS, mobile, etc.), only applicable to Shopify integrations.
1830
1893
  * Each payment gateway name cannot exceed 255 characters in length.
1831
1894
  */
1832
1895
  payment_gateway_names?: string[];
@@ -1834,6 +1897,22 @@ export interface OrderPlacedEventProperties extends eCommerceEventProperties {
1834
1897
  };
1835
1898
  }
1836
1899
 
1900
+ /**
1901
+ * The `name` field selects which eCommerce event is logged,
1902
+ * `properties` must match the corresponding properties interface.
1903
+ */
1904
+ export type EcommerceEvent =
1905
+ | {
1906
+ name: "ecommerce.product_viewed";
1907
+ properties: ProductViewedEventProperties;
1908
+ }
1909
+ | { name: "ecommerce.cart_updated"; properties: CartUpdatedEventProperties }
1910
+ | {
1911
+ name: "ecommerce.checkout_started";
1912
+ properties: CheckoutStartedEventProperties;
1913
+ }
1914
+ | { name: "ecommerce.order_placed"; properties: OrderPlacedEventProperties };
1915
+
1837
1916
  export class FeatureFlag {
1838
1917
  /** Indicates whether or not this feature flag is enabled. */
1839
1918
  enabled: boolean;
@@ -1923,6 +2002,28 @@ export class Banner {
1923
2002
  /** Whether this banner is a control banner. */
1924
2003
  isControl: boolean;
1925
2004
 
2005
+ /** Remove all event subscriptions from this banner. */
2006
+ removeAllSubscriptions(): void;
2007
+
2008
+ /**
2009
+ * Remove an event subscription that you previously subscribed to.
2010
+ *
2011
+ * @param subscriptionGuid - The identifier of the subscription you wish to remove, returned by the method
2012
+ * you initially used to create it.
2013
+ */
2014
+ removeSubscription(subscriptionGuid: string): void;
2015
+
2016
+ /**
2017
+ * Subscribe to receive dismissed events. The subscriber callback will be called whenever this banner is dismissed.
2018
+ *
2019
+ * @param subscriber - The callback function to receive dismissed events. This function will be invoked with
2020
+ * no arguments when this banner records a dismissal.
2021
+ *
2022
+ * @returns The identifier of the subscription created. This can be passed to `Banner.removeSubscription`
2023
+ * to cancel the subscription. Returns null if the subscriber passed is not a function.
2024
+ */
2025
+ subscribeToDismissedEvent(subscriber: () => void): string | null;
2026
+
1926
2027
  /**
1927
2028
  * Properties of this object.
1928
2029
  *
@@ -2288,6 +2389,21 @@ export function logBannerClick(
2288
2389
  buttonId?: string,
2289
2390
  ): boolean | undefined;
2290
2391
 
2392
+ /**
2393
+ * Dismisses the given Banner.
2394
+ *
2395
+ * Use this when rendering Banners with a custom UI and handling your own close button or dismissal gesture.
2396
+ * The SDK will update its dismissal state, remove the Banner from the active Banner cache, notify
2397
+ * `subscribeToBannersUpdates` subscribers, and sync the dismissal to Braze.
2398
+ *
2399
+ * @param banner - the `Banner` object to dismiss
2400
+ *
2401
+ * @returns `true` if the dismissal event was accepted for logging. Returns `false` if the dismissal was ignored,
2402
+ * including when no Banner is matched to the placement or when the Banner was already dismissed.
2403
+ * Returns `undefined` if the SDK has not been initialized.
2404
+ */
2405
+ export function dismissBanner(banner: Banner): boolean | undefined;
2406
+
2291
2407
  /**
2292
2408
  * Reports that the current user performed a custom named event.
2293
2409
  *
@@ -2305,6 +2421,17 @@ export function logCustomEvent(
2305
2421
  eventProperties?: object,
2306
2422
  ): boolean;
2307
2423
 
2424
+ /**
2425
+ * Logs a typed eCommerce event through the custom event pipeline (`EventTypes.CustomEvent`): `n` is the event
2426
+ * name (e.g. `ecommerce.product_viewed`) and `p` is the validated properties payload. On success, fires the same
2427
+ * custom event trigger as `logCustomEvent` for backwards compatibility.
2428
+ *
2429
+ * @param event - Which eCommerce event to log and its validated properties object.
2430
+ *
2431
+ * @returns Whether the event was successfully queued for later flush.
2432
+ */
2433
+ export function logEcommerceEvent(event: EcommerceEvent): boolean;
2434
+
2308
2435
  /**
2309
2436
  * Logs that the user clicked the given in-app message button. This is done automatically when the user clicks on
2310
2437
  * a button in a message generated by `showInAppMessage`,
@@ -2420,7 +2547,7 @@ export function openSession(): void;
2420
2547
  * - Create a `service-worker.js` file with the content below and place it in the root directory of your website:
2421
2548
  *
2422
2549
  * ```
2423
- * self.importScripts('https://js.appboycdn.com/web-sdk/6.7/service-worker.js');
2550
+ * self.importScripts('https://js.appboycdn.com/web-sdk/6.9/service-worker.js');
2424
2551
  * ```
2425
2552
  *
2426
2553
  * For more details, see [Our Product Documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration).
@@ -2842,7 +2969,7 @@ export type InitializationOptions = {
2842
2969
  * lifecycle of, set this option to true and the Braze SDK will not register or unregister a service worker. If you set this
2843
2970
  * option to true, in order for push to function correctly you must register the service worker yourself BEFORE calling
2844
2971
  * `requestPushPermission`, and ensure that it contains Braze's service worker code, either with
2845
- * `self.importScripts('https://js.appboycdn.com/web-sdk/6.7/service-worker.js');` or by including the content
2972
+ * `self.importScripts('https://js.appboycdn.com/web-sdk/6.9/service-worker.js');` or by including the content
2846
2973
  * of that file directly. When this option is true, the `serviceWorkerLocation` option is irrelevant and is ignored.
2847
2974
  */
2848
2975
  manageServiceWorkerExternally?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braze/web-sdk",
3
- "version": "6.7.1",
3
+ "version": "6.9.0",
4
4
  "description": "Braze SDK for web sites and other JS platforms.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- const ui = {
1
+ const ai = {
2
2
  Nu: function (t) {
3
3
  const r = (t + "=".repeat((4 - (t.length % 4)) % 4))
4
4
  .replace(/\-/g, "+")
@@ -9,4 +9,4 @@ const ui = {
9
9
  return o;
10
10
  },
11
11
  };
12
- export default ui;
12
+ export default ai;
@@ -1,35 +1,35 @@
1
1
  const p = {
2
2
  CustomEvent: "ce",
3
3
  Pr: "p",
4
- Uc: "pc",
5
- ev: "ca",
4
+ $c: "pc",
5
+ Fc: "ca",
6
6
  gl: "i",
7
7
  Ya: "ie",
8
- ds: "cci",
9
- js: "ccic",
10
- os: "ccc",
11
- cs: "ccd",
8
+ vs: "cci",
9
+ ws: "ccic",
10
+ us: "ccc",
11
+ gs: "ccd",
12
12
  wm: "ss",
13
13
  hm: "se",
14
14
  Fn: "si",
15
15
  On: "sc",
16
16
  Xn: "sbc",
17
- tv: "sfe",
17
+ Lc: "sfe",
18
18
  om: "iec",
19
- Oc: "lr",
20
- Nc: "uae",
21
- Kc: "lcaa",
22
- Jc: "lcar",
19
+ Dc: "lr",
20
+ Ac: "uae",
21
+ Mc: "lcaa",
22
+ Cc: "lcar",
23
23
  Zu: "inc",
24
24
  Qu: "add",
25
25
  Xu: "rem",
26
26
  Yu: "set",
27
27
  Vu: "ncam",
28
- Wc: "sgu",
28
+ Tc: "sgu",
29
29
  xo: "ffi",
30
30
  ro: "bi",
31
- Dt: "bc",
32
- Ft: "bd",
31
+ Nt: "bc",
32
+ Rt: "bd",
33
33
  },
34
- Qe = { nv: "content_cards_displayed" };
35
- export { p as EventTypes, Qe as InternalEventTypes };
34
+ We = { Gc: "content_cards_displayed" };
35
+ export { p as EventTypes, We as InternalEventTypes };