@braze/web-sdk 4.6.3 → 4.7.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 (97) hide show
  1. package/index.d.ts +13 -8
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +2 -2
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +18 -17
  6. package/shared-lib/indexed-db-adapter.js +2 -2
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +15 -15
  9. package/src/Core/handle-braze-action.js +40 -34
  10. package/src/Core/log-custom-event.js +2 -7
  11. package/src/Core/log-purchase.js +3 -3
  12. package/src/Core/wipe-data.js +2 -2
  13. package/src/FeatureFlags/feature-flag.js +33 -16
  14. package/src/FeatureFlags/feature-flags-provider.js +86 -75
  15. package/src/FeatureFlags/get-all-feature-flags.js +5 -5
  16. package/src/FeatureFlags/get-feature-flag.js +6 -6
  17. package/src/FeatureFlags/refresh-feature-flags.js +1 -1
  18. package/src/FeatureFlags/types.js +1 -0
  19. package/src/Feed/feed-provider.js +17 -17
  20. package/src/Feed/get-cached-feed.js +1 -1
  21. package/src/Feed/ui/show-feed.js +1 -1
  22. package/src/InAppMessage/display/html-message-to-html.js +135 -120
  23. package/src/InAppMessage/display/in-app-message-to-html.js +21 -21
  24. package/src/InAppMessage/display/modal-utils.js +6 -6
  25. package/src/InAppMessage/in-app-message-factory.js +3 -3
  26. package/src/InAppMessage/in-app-message-manager-factory.js +3 -3
  27. package/src/InAppMessage/in-app-message-manager.js +65 -65
  28. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  29. package/src/InAppMessage/log-in-app-message-click.js +4 -4
  30. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  31. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  32. package/src/InAppMessage/models/full-screen-message.js +1 -1
  33. package/src/InAppMessage/models/html-message.js +1 -1
  34. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  35. package/src/InAppMessage/models/in-app-message.js +80 -80
  36. package/src/InAppMessage/models/modal-message.js +2 -2
  37. package/src/InAppMessage/models/slide-up-message.js +8 -8
  38. package/src/InAppMessage/models/templated-in-app-message.js +4 -4
  39. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  40. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  41. package/src/InAppMessage/ui/show-in-app-message.js +20 -20
  42. package/src/Push/push-manager.js +216 -209
  43. package/src/Push/utils/push-utils.js +4 -4
  44. package/src/User/user-manager.js +11 -8
  45. package/src/User/user.js +52 -41
  46. package/src/common/base-feed.js +1 -1
  47. package/src/common/base-provider.js +1 -1
  48. package/src/common/constants.js +2 -0
  49. package/src/common/feed-display.js +6 -6
  50. package/src/l10n/l10n-manager-factory.js +1 -1
  51. package/src/managers/auth-manager.js +24 -24
  52. package/src/managers/braze-instance.js +120 -120
  53. package/src/managers/device-manager.js +11 -11
  54. package/src/managers/network-manager.js +63 -54
  55. package/src/managers/server-config-manager.js +20 -20
  56. package/src/managers/session-manager.js +29 -29
  57. package/src/managers/storage-manager-factory.js +4 -4
  58. package/src/managers/storage-manager.js +104 -104
  59. package/src/managers/subscription-manager.js +6 -6
  60. package/src/models/backend-errors.js +5 -5
  61. package/src/models/braze-event.js +7 -7
  62. package/src/models/device.js +1 -1
  63. package/src/models/identifier.js +6 -6
  64. package/src/models/push-token.js +3 -3
  65. package/src/models/server-config.js +15 -15
  66. package/src/request-controller.js +92 -88
  67. package/src/triggers/models/custom-event-data.js +4 -4
  68. package/src/triggers/models/custom-event-property-data.js +9 -9
  69. package/src/triggers/models/filter-set.js +9 -9
  70. package/src/triggers/models/filter.js +63 -63
  71. package/src/triggers/models/in-app-message-click-data.js +5 -5
  72. package/src/triggers/models/purchase-data.js +3 -3
  73. package/src/triggers/models/purchase-property-data.js +9 -9
  74. package/src/triggers/models/push-click-data.js +5 -5
  75. package/src/triggers/models/trigger-condition.js +48 -48
  76. package/src/triggers/models/trigger-events.js +1 -1
  77. package/src/triggers/models/trigger.js +29 -29
  78. package/src/triggers/triggers-provider-factory.js +2 -2
  79. package/src/triggers/triggers-provider.js +87 -89
  80. package/src/ui/js/attach-css.js +1 -1
  81. package/src/ui/js/feed-css.js +4 -4
  82. package/src/ui/js/iam-css.js +4 -4
  83. package/src/ui/js/load-font-awesome.js +1 -1
  84. package/src/util/base-device-parser.js +2 -2
  85. package/src/util/braze-actions.js +8 -8
  86. package/src/util/browser-detector.js +8 -8
  87. package/src/util/client-hints-parser.js +3 -3
  88. package/src/util/code-utils.js +10 -3
  89. package/src/util/component-utils.js +1 -1
  90. package/src/util/date-utils.js +2 -2
  91. package/src/util/device-constants.js +1 -1
  92. package/src/util/dom-utils.js +9 -9
  93. package/src/util/key-codes.js +1 -1
  94. package/src/util/net.js +3 -3
  95. package/src/util/user-agent-parser.js +4 -4
  96. package/src/util/validation-utils.js +155 -74
  97. package/src/util/window-utils.js +1 -1
@@ -1,7 +1,10 @@
1
1
  import r from "../../shared-lib/braze-shared-lib.js";
2
2
  export function values(t) {
3
3
  const e = [];
4
- for (let r in t) t.hasOwnProperty(r) && void 0 !== t[r] && e.push(t[r]);
4
+ for (let r in t)
5
+ Object.prototype.hasOwnProperty.call(t, r) &&
6
+ void 0 !== t[r] &&
7
+ e.push(t[r]);
5
8
  return e;
6
9
  }
7
10
  export function validateValueIsFromEnum(t, e, n, o) {
@@ -37,7 +40,7 @@ export function intersection(t) {
37
40
  }
38
41
  export function keys(t) {
39
42
  const e = [];
40
- for (let r in t) t.hasOwnProperty(r) && e.push(r);
43
+ for (let r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r);
41
44
  return e;
42
45
  }
43
46
  export function isEqual(t, e) {
@@ -85,7 +88,11 @@ export function isEqual(t, e) {
85
88
  n = keys(t);
86
89
  if (((i = n.length), keys(e).length !== i)) return !1;
87
90
  for (; i--; )
88
- if (((r = n[i]), !e.hasOwnProperty(r) || !isEqual(t[r], e[r], o, c)))
91
+ if (
92
+ ((r = n[i]),
93
+ !Object.prototype.hasOwnProperty.call(e, r) ||
94
+ !isEqual(t[r], e[r], o, c))
95
+ )
89
96
  return !1;
90
97
  }
91
98
  return o.pop(), c.pop(), !0;
@@ -5,7 +5,7 @@ export function createCloseButton(t, o, e) {
5
5
  n.setAttribute("aria-label", t),
6
6
  n.setAttribute("tabindex", "0"),
7
7
  n.setAttribute("role", "button"),
8
- oe(n, "touchstart", () => {}),
8
+ oe(n, "touchstart"),
9
9
  (n.className = "ab-close-button");
10
10
  const r = ae(
11
11
  "0 0 15 15",
@@ -1,4 +1,4 @@
1
- import { isDate as yt } from "./code-utils.js";
1
+ import { isDate as Nt } from "./code-utils.js";
2
2
  export function convertMsToSeconds(e, n) {
3
3
  let t = e / 1e3;
4
4
  return n && (t = Math.floor(t)), t;
@@ -11,7 +11,7 @@ export function dateFromUnixTimestamp(e) {
11
11
  return null == e || isNaN(n) ? null : new Date(1e3 * n);
12
12
  }
13
13
  export function toValidBackendTimeString(e) {
14
- return null != e && yt(e) ? e.toISOString().replace(/\.[0-9]{3}Z$/, "") : e;
14
+ return null != e && Nt(e) ? e.toISOString().replace(/\.[0-9]{3}Z$/, "") : e;
15
15
  }
16
16
  export function rehydrateDateAfterJsonization(e) {
17
17
  return null == e || "" === e ? null : new Date(e);
@@ -8,7 +8,7 @@ export const Browsers = {
8
8
  };
9
9
  export const OperatingSystems = {
10
10
  Fg: "Android",
11
- ln: "iOS",
11
+ $e: "iOS",
12
12
  jg: "Mac",
13
13
  Dg: "Windows"
14
14
  };
@@ -16,24 +16,24 @@ export function _isInView(t, n, e, s) {
16
16
  !s)
17
17
  );
18
18
  }
19
- export const DOMUtils = { vu: null, eo: _isInView };
20
- export const DIRECTIONS = { We: "up", Xe: "down", ot: "left", et: "right" };
19
+ export const DOMUtils = { Ou: null, eo: _isInView };
20
+ export const DIRECTIONS = { Je: "up", Ke: "down", ot: "left", et: "right" };
21
21
  export function supportsPassive() {
22
- if (null == DOMUtils.vu) {
23
- DOMUtils.vu = !1;
22
+ if (null == DOMUtils.Ou) {
23
+ DOMUtils.Ou = !1;
24
24
  try {
25
25
  const t = Object.defineProperty({}, "passive", {
26
26
  get: () => {
27
- DOMUtils.vu = !0;
27
+ DOMUtils.Ou = !0;
28
28
  }
29
29
  });
30
30
  window.addEventListener("testPassive", null, t),
31
31
  window.removeEventListener("testPassive", null, t);
32
32
  } catch (t) {}
33
33
  }
34
- return DOMUtils.vu;
34
+ return DOMUtils.Ou;
35
35
  }
36
- export function addPassiveEventListener(t, n, e) {
36
+ export function addPassiveEventListener(t, n, e = () => {}) {
37
37
  t.addEventListener(n, e, !!supportsPassive() && { passive: !0 });
38
38
  }
39
39
  export function topIsInView(t) {
@@ -65,9 +65,9 @@ export function detectSwipe(t, n, e) {
65
65
  (i = null))
66
66
  : Math.abs(u) >= 25 &&
67
67
  (((u > 0 &&
68
- n === DIRECTIONS.We &&
68
+ n === DIRECTIONS.Je &&
69
69
  t.scrollTop === t.scrollHeight - t.offsetHeight) ||
70
- (u < 0 && n === DIRECTIONS.Xe && 0 === t.scrollTop)) &&
70
+ (u < 0 && n === DIRECTIONS.Ke && 0 === t.scrollTop)) &&
71
71
  e(o),
72
72
  (s = null),
73
73
  (i = null));
@@ -1 +1 @@
1
- export const KeyCodes = { fo: 32, oo: 9, co: 13, ih: 27 };
1
+ export const KeyCodes = { fo: 32, oo: 9, co: 13, mh: 27 };
package/src/util/net.js CHANGED
@@ -13,7 +13,7 @@ const b = {
13
13
  ) {
14
14
  const r = () => {
15
15
  "function" == typeof t.error && t.error(e.status),
16
- "function" == typeof t.Ue && t.Ue(!1);
16
+ "function" == typeof t.wi && t.wi(!1);
17
17
  };
18
18
  (e.onload = () => {
19
19
  let o = !1;
@@ -28,14 +28,14 @@ const b = {
28
28
  (r = e.getAllResponseHeaders());
29
29
  } catch (o) {
30
30
  const n = {
31
- error: "" === e.responseText ? qt.ma : qt.pa,
31
+ error: "" === e.responseText ? qt.ca : qt.la,
32
32
  response: e.responseText
33
33
  };
34
34
  t.S(n, r);
35
35
  }
36
36
  o && t.S(o, r);
37
37
  }
38
- "function" == typeof t.Ue && t.Ue(!0);
38
+ "function" == typeof t.wi && t.wi(!0);
39
39
  } else r();
40
40
  }),
41
41
  (e.onerror = () => {
@@ -1,6 +1,6 @@
1
- import Se from "./base-device-parser.js";
1
+ import Oe from "./base-device-parser.js";
2
2
  import { Browsers as ri, OperatingSystems as rt } from "./device-constants.js";
3
- export default class ni extends Se {
3
+ export default class ni extends Oe {
4
4
  constructor() {
5
5
  super(), (this.Su = ni.Vu(navigator.userAgent || ""));
6
6
  }
@@ -10,13 +10,13 @@ export default class ni extends Se {
10
10
  ef() {
11
11
  return this.Su[1] || "Unknown Version";
12
12
  }
13
- Zo(r) {
13
+ Xo(r) {
14
14
  for (let e = 0; e < r.length; e++) {
15
15
  let n = r[e].string,
16
16
  i = ni.rf(n, r[e]);
17
17
  if (i)
18
18
  return (
19
- i === rt.jg && navigator.maxTouchPoints > 1 && (i = rt.ln),
19
+ i === rt.jg && navigator.maxTouchPoints > 1 && (i = rt.$e),
20
20
  Promise.resolve(i)
21
21
  );
22
22
  }
@@ -1,136 +1,217 @@
1
1
  import {
2
2
  isArray as p,
3
- isDate as yt,
4
- isObject as Jt,
5
- keys as rr
3
+ isDate as Nt,
4
+ isObject as yt,
5
+ keys as or
6
6
  } from "./code-utils.js";
7
7
  import { getByteLength as U } from "./string-utils.js";
8
8
  import r from "../../shared-lib/braze-shared-lib.js";
9
- import { toValidBackendTimeString as Nt } from "./date-utils.js";
10
- import { BRAZE_ACTIONS as _ } from "./braze-actions.js";
9
+ import { toValidBackendTimeString as Ft } from "./date-utils.js";
10
+ import { BRAZE_ACTIONS as P } from "./braze-actions.js";
11
+ import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Ut } from "../common/constants.js";
11
12
  export const CUSTOM_DATA_REGEX = /^[^\x00-\x1F\x22]+$/;
13
+ export const CUSTOM_ATTRIBUTE_SPECIAL_CHARS_REGEX = /[$.]/;
14
+ export const CUSTOM_ATTRIBUTE_RESERVED_OPERATORS = [
15
+ "$add",
16
+ "$update",
17
+ "$remove",
18
+ "$identifier_key",
19
+ "$identifier_value",
20
+ "$new_object",
21
+ "$time"
22
+ ];
12
23
  export const EMAIL_ADDRESS_REGEX = new RegExp(/^.+@.+\..+$/);
13
24
  export const CUSTOM_PROPERTIES_MAX_SIZE_BYTES = 51200;
14
25
  export const CUSTOM_PROPERTIES_MAX_SIZE_STRING = "50KB";
26
+ export const CUSTOM_ATTRIBUTES_MAX_SIZE_BYTES = 76800;
27
+ export const CUSTOM_ATTRIBUTES_MAX_SIZE_STRING = "75KB";
28
+ export const CUSTOM_ATTRIBUTE_MAX_DEPTH = 50;
15
29
  export const BRAZE_ACTION_URI_REGEX = /^brazeActions:\/\/v\d+\//;
16
- export function _validatePropertyType(e) {
17
- const t = typeof e;
30
+ export function validateCustomString(t, e, n) {
31
+ const o =
32
+ null != t &&
33
+ "string" == typeof t &&
34
+ ("" === t || t.match(CUSTOM_DATA_REGEX));
35
+ return o || r.D.error(`Cannot ${e} because ${n} "${t}" is invalid.`), o;
36
+ }
37
+ export function validateCustomAttributeKey(t) {
38
+ return (
39
+ null != t &&
40
+ t.match(CUSTOM_ATTRIBUTE_SPECIAL_CHARS_REGEX) &&
41
+ -1 === CUSTOM_ATTRIBUTE_RESERVED_OPERATORS.indexOf(t) &&
42
+ r.D.warn("Custom attribute keys cannot contain '$' or '.'"),
43
+ validateCustomString(t, "set custom user attribute", "the given key")
44
+ );
45
+ }
46
+ export function validatePropertyType(t) {
47
+ const e = typeof t;
18
48
  return (
19
- null == e || "number" === t || "boolean" === t || yt(e) || "string" === t
49
+ null == t || "number" === e || "boolean" === e || Nt(t) || "string" === e
20
50
  );
21
51
  }
22
- export function _validateNestedProperties(e, t) {
23
- if (p(e) && p(t)) {
24
- for (let r = 0; r < e.length && r < t.length; r++)
52
+ export function _validateNestedProperties(t, e, n) {
53
+ const o = -1 !== n;
54
+ if (o && n > 50)
55
+ return (
56
+ r.D.error("Nested attributes cannot be more than 50 levels deep."), !1
57
+ );
58
+ const i = o ? n + 1 : -1;
59
+ if (p(t) && p(e)) {
60
+ for (let r = 0; r < t.length && r < e.length; r++)
25
61
  if (
26
- (yt(e[r]) && (t[r] = Nt(e[r])), !_validateNestedProperties(e[r], t[r]))
62
+ (Nt(t[r]) && (e[r] = Ft(t[r])),
63
+ !_validateNestedProperties(t[r], e[r], i))
27
64
  )
28
65
  return !1;
29
66
  } else {
30
- if (!Jt(e)) return _validatePropertyType(e);
31
- for (const r of rr(e))
67
+ if (!yt(t)) return validatePropertyType(t);
68
+ for (const r of or(t)) {
69
+ if (o && !validateCustomAttributeKey(r)) return !1;
32
70
  if (
33
- (yt(e[r]) && (t[r] = Nt(e[r])), !_validateNestedProperties(e[r], t[r]))
71
+ (Nt(t[r]) && (e[r] = Ft(t[r])),
72
+ !_validateNestedProperties(t[r], e[r], i))
34
73
  )
35
74
  return !1;
75
+ }
36
76
  }
37
77
  return !0;
38
78
  }
39
- export function _validateEventPropertyValue(e, t, n, o) {
40
- let i;
79
+ export function _validateEventPropertyValue(t, e, n, o, i) {
80
+ let a;
41
81
  return (
42
- (i =
43
- Jt(e) || p(e)
44
- ? _validateNestedProperties(e, t)
45
- : _validatePropertyType(e)),
46
- i || r.D.error(`Cannot ${n} because ${o} "${e}" is invalid.`),
47
- i
82
+ (a =
83
+ yt(t) || p(t)
84
+ ? _validateNestedProperties(t, e, i ? 1 : -1)
85
+ : validatePropertyType(t)),
86
+ a || r.D.error(`Cannot ${n} because ${o} "${t}" is invalid.`),
87
+ a
48
88
  );
49
89
  }
50
- export function validateStandardString(e, t, n, o) {
51
- const i = "string" == typeof e || (null === e && o);
52
- return i || r.D.error(`Cannot ${t} because ${n} "${e}" is invalid.`), i;
53
- }
54
- export function validateCustomString(e, t, n) {
55
- const o =
56
- null != e &&
57
- "string" == typeof e &&
58
- ("" === e || e.match(CUSTOM_DATA_REGEX));
59
- return o || r.D.error(`Cannot ${t} because ${n} "${e}" is invalid.`), o;
90
+ export function validateStandardString(t, e, n, o) {
91
+ const i = "string" == typeof t || (null === t && o);
92
+ return i || r.D.error(`Cannot ${e} because ${n} "${t}" is invalid.`), i;
60
93
  }
61
- export function validateCustomProperties(e, t, n, o, i) {
62
- if ((null == e && (e = {}), "object" != typeof e || p(e)))
94
+ export function validateCustomProperties(t, e, n, o, i) {
95
+ if ((null == t && (t = {}), "object" != typeof t || p(t)))
63
96
  return (
64
- r.D.error(`${t} requires that ${n} be an object. Ignoring ${i}.`),
97
+ r.D.error(`${e} requires that ${n} be an object. Ignoring ${i}.`),
65
98
  [!1, null]
66
99
  );
67
- const a = JSON.stringify(e);
68
- if (U(a) > 51200)
100
+ let a, s;
101
+ e === Ut ? ((a = 76800), (s = "75KB")) : ((a = 51200), (s = "50KB"));
102
+ const u = JSON.stringify(t);
103
+ if (U(u) > a)
69
104
  return (
70
105
  r.D.error(
71
- `Could not ${o} because ${n} was greater than the max size of 50KB.`
106
+ `Could not ${o} because ${n} was greater than the max size of ${s}.`
72
107
  ),
73
108
  [!1, null]
74
109
  );
75
- let s;
110
+ let l;
76
111
  try {
77
- s = JSON.parse(a);
78
- } catch (e) {
112
+ l = JSON.parse(u);
113
+ } catch (t) {
79
114
  return (
80
115
  r.D.error(`Could not ${o} because ${n} did not contain valid JSON.`),
81
116
  [!1, null]
82
117
  );
83
118
  }
84
- for (let t in e) {
85
- if (!validateCustomString(t, o, `the ${i} property name`))
119
+ for (let r in t) {
120
+ if (e === Ut && !validateCustomAttributeKey(r)) return [!1, null];
121
+ if (!validateCustomString(r, o, `the ${i} property name`))
86
122
  return [!1, null];
87
- const r = e[t];
88
- if (null == r) {
89
- delete e[t], delete s[t];
123
+ const n = t[r];
124
+ if (e !== Ut && null == n) {
125
+ delete t[r], delete l[r];
90
126
  continue;
91
127
  }
92
- yt(r) && (s[t] = Nt(r));
93
- if (!_validateEventPropertyValue(r, s[t], o, `the ${i} property "${t}"`))
128
+ Nt(n) && (l[r] = Ft(n));
129
+ if (
130
+ !_validateEventPropertyValue(
131
+ n,
132
+ l[r],
133
+ o,
134
+ `the ${i} property "${r}"`,
135
+ e === Ut
136
+ )
137
+ )
94
138
  return [!1, null];
95
139
  }
96
- return [!0, s];
140
+ return [!0, l];
141
+ }
142
+ export function validateCustomAttributeArrayType(t, e) {
143
+ let n = !1,
144
+ o = !1;
145
+ const i = () => {
146
+ r.D.error(
147
+ "Custom attribute arrays must be either string arrays or object arrays."
148
+ );
149
+ };
150
+ for (const r of e)
151
+ if ("string" == typeof r) {
152
+ if (o) return i(), [!1, !1];
153
+ if (
154
+ !validateCustomString(
155
+ r,
156
+ `set custom user attribute "${t}"`,
157
+ "the element in the given array"
158
+ )
159
+ )
160
+ return [!1, !1];
161
+ n = !0;
162
+ } else {
163
+ if (!yt(r)) return i(), [!1, !1];
164
+ if (n) return i(), [!1, !1];
165
+ if (
166
+ !validateCustomProperties(
167
+ r,
168
+ Ut,
169
+ "attribute value",
170
+ `set custom user attribute "${t}"`,
171
+ "custom user attribute"
172
+ )
173
+ )
174
+ return [!1, !1];
175
+ o = !0;
176
+ }
177
+ return [n, o];
97
178
  }
98
- export function isValidEmail(e) {
179
+ export function isValidEmail(t) {
99
180
  return (
100
- "string" == typeof e && null != e.toLowerCase().match(EMAIL_ADDRESS_REGEX)
181
+ "string" == typeof t && null != t.toLowerCase().match(EMAIL_ADDRESS_REGEX)
101
182
  );
102
183
  }
103
- export function isValidBrazeActionJson(e) {
104
- if (!(_.properties.type in e)) return !1;
105
- switch (e[_.properties.type]) {
106
- case _.types.ue:
107
- if (_.properties.me in e) return !0;
184
+ export function isValidBrazeActionJson(t) {
185
+ if (!(P.properties.type in t)) return !1;
186
+ switch (t[P.properties.type]) {
187
+ case P.types.ue:
188
+ if (P.properties.me in t) return !0;
108
189
  break;
109
- case _.types.logCustomEvent:
110
- case _.types.setEmailNotificationSubscriptionType:
111
- case _.types.setPushNotificationSubscriptionType:
112
- case _.types.setCustomUserAttribute:
113
- case _.types.addToSubscriptionGroup:
114
- case _.types.removeFromSubscriptionGroup:
115
- case _.types.addToCustomAttributeArray:
116
- case _.types.removeFromCustomAttributeArray:
117
- case _.types.de:
118
- case _.types.pe:
119
- if (_.properties.fe in e) return !0;
190
+ case P.types.logCustomEvent:
191
+ case P.types.setEmailNotificationSubscriptionType:
192
+ case P.types.setPushNotificationSubscriptionType:
193
+ case P.types.setCustomUserAttribute:
194
+ case P.types.addToSubscriptionGroup:
195
+ case P.types.removeFromSubscriptionGroup:
196
+ case P.types.addToCustomAttributeArray:
197
+ case P.types.removeFromCustomAttributeArray:
198
+ case P.types.de:
199
+ case P.types.pe:
200
+ if (P.properties.fe in t) return !0;
120
201
  break;
121
- case _.types.requestPushPermission:
202
+ case P.types.requestPushPermission:
122
203
  return !0;
123
204
  default:
124
205
  return !1;
125
206
  }
126
207
  return !1;
127
208
  }
128
- export function isValidBrazeActionType(e) {
129
- let t = !1;
209
+ export function isValidBrazeActionType(t) {
210
+ let e = !1;
130
211
  return (
131
- Object.keys(_.types).forEach(r => {
132
- _.types[r] !== e.toString() || (t = !0);
212
+ Object.keys(P.types).forEach(r => {
213
+ P.types[r] !== t.toString() || (e = !0);
133
214
  }),
134
- t
215
+ e
135
216
  );
136
217
  }
@@ -31,5 +31,5 @@ export const WindowUtils = {
31
31
  openUri: _openUri,
32
32
  so: _isPhone,
33
33
  io: _getOrientation,
34
- yn: _getCurrentUrl
34
+ bn: _getCurrentUrl
35
35
  };