@mparticle/web-braze-kit 3.0.0 → 3.0.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  --
4
4
 
5
+ #### 3.0.1 - 2022-05-18
6
+
7
+ - consume initOptions customFlags - this allows a customer to pass a callback to include additional options that mParticle doesn't support in the UI
8
+
5
9
  #### 3.0.0 - 2022-03-28
6
10
 
7
11
  ⚠️ **Breaking** - If you reference any of the below deprecations and implement mParticle via snippet, you will have to make changes to your codebase before June 8, 2022 to be compatible with both version 2 and version 3 of the Braze SDK to ensure your code continues to work.
@@ -305,7 +305,7 @@ window.appboy = appboy_min;
305
305
 
306
306
  var name = 'Appboy',
307
307
  moduleId = 28,
308
- version = '2.0.7',
308
+ version = '3.0.1',
309
309
  MessageType = {
310
310
  PageView: 3,
311
311
  PageEvent: 4,
@@ -328,7 +328,8 @@ var constructor = function() {
328
328
  var self = this,
329
329
  forwarderSettings,
330
330
  options = {},
331
- reportingService;
331
+ reportingService,
332
+ mpCustomFlags;
332
333
 
333
334
  self.name = name;
334
335
 
@@ -647,8 +648,9 @@ var constructor = function() {
647
648
  }
648
649
  }
649
650
 
650
- function initForwarder(settings, service, testMode) {
651
+ function initForwarder(settings, service, testMode, trackerId, userAttributes, userIdentities, appVersion, appName, customFlags) {
651
652
  // eslint-disable-line no-unused-vars
653
+ mpCustomFlags = customFlags;
652
654
  try {
653
655
  forwarderSettings = settings;
654
656
  reportingService = service;
@@ -683,6 +685,14 @@ var constructor = function() {
683
685
  options.baseUrl = customUrl;
684
686
  }
685
687
  }
688
+
689
+ if (mpCustomFlags && mpCustomFlags[moduleId.toString()]) {
690
+ var brazeFlags = mpCustomFlags[moduleId.toString()];
691
+ if (typeof brazeFlags.initOptions === 'function') {
692
+ brazeFlags.initOptions(options);
693
+ }
694
+ }
695
+
686
696
  if (testMode !== true) {
687
697
  appboy.initialize(forwarderSettings.apiKey, options);
688
698
  finishAppboyInitialization(forwarderSettings);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/web-braze-kit",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
5
5
  "description": "mParticle integration sdk for Braze",
6
6
  "main": "dist/BrazeKit.common.js",