zixflow-reactnative 1.1.3 → 1.1.4

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 (239) hide show
  1. package/README.md +631 -261
  2. package/android/build.gradle +18 -1
  3. package/android/consumer-rules.pro +3 -2
  4. package/android/gradle.properties +1 -1
  5. package/android/src/main/java/com/zixflow/reactnative/sdk/NativeZixflowModule.kt +40 -5
  6. package/android/src/main/java/com/zixflow/reactnative/sdk/ZixflowReactNativePackage.kt +25 -1
  7. package/android/src/main/java/com/zixflow/reactnative/sdk/constant/Keys.kt +19 -0
  8. package/android/src/main/java/com/zixflow/reactnative/sdk/geofence/NativeGeofenceModule.kt +65 -0
  9. package/android/src/main/java/com/zixflow/reactnative/sdk/liveactivities/NativeLiveActivitiesModule.kt +310 -0
  10. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginapp/NativeMessagingInAppModule.kt +150 -0
  11. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginapp/ReactInboxEventListener.kt +99 -0
  12. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/NotificationInboxBellViewManager.kt +38 -0
  13. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/NotificationInboxViewManager.kt +30 -0
  14. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactComposeHostView.kt +96 -0
  15. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactNotificationInboxBellView.kt +48 -0
  16. package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactNotificationInboxView.kt +17 -0
  17. package/android/src/main/java/com/zixflow/reactnative/sdk/messagingpush/NativeMessagingPushModule.kt +11 -1
  18. package/android/src/main/res/values/zixflow_config.xml +1 -1
  19. package/android/zixflow-core.gradle +17 -7
  20. package/docs/cocoapods-deployment-target-normalization.md +139 -0
  21. package/ios/cocoapods_deployment_target.rb +432 -0
  22. package/ios/wrappers/NativeZixflow.mm +37 -0
  23. package/ios/wrappers/NativeZixflow.swift +135 -1
  24. package/ios/wrappers/ZixflowReactNativeDeepLinkRequestStore.swift +123 -0
  25. package/ios/wrappers/ZixflowReactNativeDeepLinkRouter.swift +312 -0
  26. package/ios/wrappers/geofence/NativeGeofence.mm +46 -0
  27. package/ios/wrappers/geofence/NativeGeofence.swift +27 -0
  28. package/ios/wrappers/inapp/NativeMessagingInApp.mm +22 -0
  29. package/ios/wrappers/inapp/NativeMessagingInApp.swift +90 -0
  30. package/ios/wrappers/inbox/InboxHostContainment.swift +40 -0
  31. package/ios/wrappers/inbox/RCTNotificationInboxBellNative.h +12 -0
  32. package/ios/wrappers/inbox/RCTNotificationInboxBellNative.mm +98 -0
  33. package/ios/wrappers/inbox/RCTNotificationInboxViewNative.h +12 -0
  34. package/ios/wrappers/inbox/RCTNotificationInboxViewNative.mm +78 -0
  35. package/ios/wrappers/inbox/ReactInboxEventListener.swift +76 -0
  36. package/ios/wrappers/inbox/ReactNotificationInboxBellView.h +22 -0
  37. package/ios/wrappers/inbox/ReactNotificationInboxBellView.swift +109 -0
  38. package/ios/wrappers/inbox/ReactNotificationInboxView.h +22 -0
  39. package/ios/wrappers/inbox/ReactNotificationInboxView.swift +69 -0
  40. package/ios/wrappers/liveactivities/NativeLiveActivities.mm +83 -0
  41. package/ios/wrappers/liveactivities/NativeLiveActivities.swift +390 -0
  42. package/ios/wrappers/location/NativeLocation.swift +7 -5
  43. package/ios/wrappers/utils/ZixflowConstants.swift +4 -0
  44. package/ios/wrappers/zixflow_reactnative.h +6 -0
  45. package/lib/commonjs/components/NotificationInboxBellView.js +49 -0
  46. package/lib/commonjs/components/NotificationInboxBellView.js.map +1 -0
  47. package/lib/commonjs/components/NotificationInboxView.js +36 -0
  48. package/lib/commonjs/components/NotificationInboxView.js.map +1 -0
  49. package/lib/commonjs/components/index.js +14 -0
  50. package/lib/commonjs/components/index.js.map +1 -1
  51. package/lib/commonjs/index.js +81 -4
  52. package/lib/commonjs/index.js.map +1 -1
  53. package/lib/commonjs/notification-inbox.js +1 -0
  54. package/lib/commonjs/notification-inbox.js.map +1 -1
  55. package/lib/commonjs/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
  56. package/lib/commonjs/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
  57. package/lib/commonjs/specs/modules/NativeZixflow.js.map +1 -1
  58. package/lib/commonjs/specs/modules/NativeZixflowGeofence.js +15 -0
  59. package/lib/commonjs/specs/modules/NativeZixflowGeofence.js.map +1 -0
  60. package/lib/commonjs/specs/modules/NativeZixflowLiveActivities.js +23 -0
  61. package/lib/commonjs/specs/modules/NativeZixflowLiveActivities.js.map +1 -0
  62. package/lib/commonjs/specs/modules/NativeZixflowMessagingInApp.js +3 -1
  63. package/lib/commonjs/specs/modules/NativeZixflowMessagingInApp.js.map +1 -1
  64. package/lib/commonjs/specs/modules/NativeZixflowMessagingPush.js +3 -1
  65. package/lib/commonjs/specs/modules/NativeZixflowMessagingPush.js.map +1 -1
  66. package/lib/commonjs/types/data-pipelines.js +13 -1
  67. package/lib/commonjs/types/data-pipelines.js.map +1 -1
  68. package/lib/commonjs/types/in-app.js +24 -1
  69. package/lib/commonjs/types/in-app.js.map +1 -1
  70. package/lib/commonjs/types/inbox.js +79 -0
  71. package/lib/commonjs/types/inbox.js.map +1 -0
  72. package/lib/commonjs/types/index.js +22 -0
  73. package/lib/commonjs/types/index.js.map +1 -1
  74. package/lib/commonjs/types/live-activities.js +85 -0
  75. package/lib/commonjs/types/live-activities.js.map +1 -0
  76. package/lib/commonjs/utils/param-validation.js +76 -1
  77. package/lib/commonjs/utils/param-validation.js.map +1 -1
  78. package/lib/commonjs/zixflow-cdp.js +99 -1
  79. package/lib/commonjs/zixflow-cdp.js.map +1 -1
  80. package/lib/commonjs/zixflow-geofence.js +55 -0
  81. package/lib/commonjs/zixflow-geofence.js.map +1 -0
  82. package/lib/commonjs/zixflow-inapp.js +120 -0
  83. package/lib/commonjs/zixflow-inapp.js.map +1 -1
  84. package/lib/commonjs/zixflow-liveactivities.js +85 -0
  85. package/lib/commonjs/zixflow-liveactivities.js.map +1 -0
  86. package/lib/module/components/NotificationInboxBellView.js +44 -0
  87. package/lib/module/components/NotificationInboxBellView.js.map +1 -0
  88. package/lib/module/components/NotificationInboxView.js +31 -0
  89. package/lib/module/components/NotificationInboxView.js.map +1 -0
  90. package/lib/module/components/index.js +5 -0
  91. package/lib/module/components/index.js.map +1 -1
  92. package/lib/module/index.js +8 -3
  93. package/lib/module/index.js.map +1 -1
  94. package/lib/module/notification-inbox.js +1 -1
  95. package/lib/module/notification-inbox.js.map +1 -1
  96. package/lib/module/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
  97. package/lib/module/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
  98. package/lib/module/specs/modules/NativeZixflow.js.map +1 -1
  99. package/lib/module/specs/modules/NativeZixflowGeofence.js +13 -0
  100. package/lib/module/specs/modules/NativeZixflowGeofence.js.map +1 -0
  101. package/lib/module/specs/modules/NativeZixflowLiveActivities.js +21 -0
  102. package/lib/module/specs/modules/NativeZixflowLiveActivities.js.map +1 -0
  103. package/lib/module/specs/modules/NativeZixflowMessagingInApp.js +3 -1
  104. package/lib/module/specs/modules/NativeZixflowMessagingInApp.js.map +1 -1
  105. package/lib/module/specs/modules/NativeZixflowMessagingPush.js +3 -1
  106. package/lib/module/specs/modules/NativeZixflowMessagingPush.js.map +1 -1
  107. package/lib/module/types/data-pipelines.js +13 -0
  108. package/lib/module/types/data-pipelines.js.map +1 -1
  109. package/lib/module/types/in-app.js +24 -0
  110. package/lib/module/types/in-app.js.map +1 -1
  111. package/lib/module/types/inbox.js +75 -0
  112. package/lib/module/types/inbox.js.map +1 -0
  113. package/lib/module/types/index.js +2 -0
  114. package/lib/module/types/index.js.map +1 -1
  115. package/lib/module/types/live-activities.js +88 -0
  116. package/lib/module/types/live-activities.js.map +1 -0
  117. package/lib/module/utils/param-validation.js +76 -1
  118. package/lib/module/utils/param-validation.js.map +1 -1
  119. package/lib/module/zixflow-cdp.js +99 -1
  120. package/lib/module/zixflow-cdp.js.map +1 -1
  121. package/lib/module/zixflow-geofence.js +50 -0
  122. package/lib/module/zixflow-geofence.js.map +1 -0
  123. package/lib/module/zixflow-inapp.js +99 -1
  124. package/lib/module/zixflow-inapp.js.map +1 -1
  125. package/lib/module/zixflow-liveactivities.js +80 -0
  126. package/lib/module/zixflow-liveactivities.js.map +1 -0
  127. package/lib/typescript/commonjs/components/NotificationInboxBellView.d.ts +39 -0
  128. package/lib/typescript/commonjs/components/NotificationInboxBellView.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/components/NotificationInboxView.d.ts +25 -0
  130. package/lib/typescript/commonjs/components/NotificationInboxView.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/components/index.d.ts +4 -0
  132. package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/index.d.ts +8 -1
  134. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/notification-inbox.d.ts +5 -0
  136. package/lib/typescript/commonjs/notification-inbox.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/specs/components/NotificationInboxBellNativeComponent.d.ts +13 -0
  138. package/lib/typescript/commonjs/specs/components/NotificationInboxBellNativeComponent.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/specs/components/NotificationInboxViewNativeComponent.d.ts +12 -0
  140. package/lib/typescript/commonjs/specs/components/NotificationInboxViewNativeComponent.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/specs/modules/NativeZixflow.d.ts +6 -1
  142. package/lib/typescript/commonjs/specs/modules/NativeZixflow.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/specs/modules/NativeZixflowGeofence.d.ts +13 -0
  144. package/lib/typescript/commonjs/specs/modules/NativeZixflowGeofence.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/specs/modules/NativeZixflowLiveActivities.d.ts +31 -0
  146. package/lib/typescript/commonjs/specs/modules/NativeZixflowLiveActivities.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingInApp.d.ts +5 -1
  148. package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingInApp.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingPush.d.ts +1 -1
  150. package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingPush.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/types/data-pipelines.d.ts +53 -1
  152. package/lib/typescript/commonjs/types/data-pipelines.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/types/in-app.d.ts +22 -0
  154. package/lib/typescript/commonjs/types/in-app.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/types/inbox.d.ts +97 -0
  156. package/lib/typescript/commonjs/types/inbox.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/types/index.d.ts +2 -0
  158. package/lib/typescript/commonjs/types/index.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/types/live-activities.d.ts +161 -0
  160. package/lib/typescript/commonjs/types/live-activities.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/utils/param-validation.d.ts +7 -0
  162. package/lib/typescript/commonjs/utils/param-validation.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/zixflow-cdp.d.ts +38 -0
  164. package/lib/typescript/commonjs/zixflow-cdp.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/zixflow-geofence.d.ts +36 -0
  166. package/lib/typescript/commonjs/zixflow-geofence.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/zixflow-inapp.d.ts +36 -2
  168. package/lib/typescript/commonjs/zixflow-inapp.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/zixflow-liveactivities.d.ts +66 -0
  170. package/lib/typescript/commonjs/zixflow-liveactivities.d.ts.map +1 -0
  171. package/lib/typescript/module/components/NotificationInboxBellView.d.ts +39 -0
  172. package/lib/typescript/module/components/NotificationInboxBellView.d.ts.map +1 -0
  173. package/lib/typescript/module/components/NotificationInboxView.d.ts +25 -0
  174. package/lib/typescript/module/components/NotificationInboxView.d.ts.map +1 -0
  175. package/lib/typescript/module/components/index.d.ts +4 -0
  176. package/lib/typescript/module/components/index.d.ts.map +1 -1
  177. package/lib/typescript/module/index.d.ts +8 -1
  178. package/lib/typescript/module/index.d.ts.map +1 -1
  179. package/lib/typescript/module/notification-inbox.d.ts +5 -0
  180. package/lib/typescript/module/notification-inbox.d.ts.map +1 -1
  181. package/lib/typescript/module/specs/components/NotificationInboxBellNativeComponent.d.ts +13 -0
  182. package/lib/typescript/module/specs/components/NotificationInboxBellNativeComponent.d.ts.map +1 -0
  183. package/lib/typescript/module/specs/components/NotificationInboxViewNativeComponent.d.ts +12 -0
  184. package/lib/typescript/module/specs/components/NotificationInboxViewNativeComponent.d.ts.map +1 -0
  185. package/lib/typescript/module/specs/modules/NativeZixflow.d.ts +6 -1
  186. package/lib/typescript/module/specs/modules/NativeZixflow.d.ts.map +1 -1
  187. package/lib/typescript/module/specs/modules/NativeZixflowGeofence.d.ts +13 -0
  188. package/lib/typescript/module/specs/modules/NativeZixflowGeofence.d.ts.map +1 -0
  189. package/lib/typescript/module/specs/modules/NativeZixflowLiveActivities.d.ts +31 -0
  190. package/lib/typescript/module/specs/modules/NativeZixflowLiveActivities.d.ts.map +1 -0
  191. package/lib/typescript/module/specs/modules/NativeZixflowMessagingInApp.d.ts +5 -1
  192. package/lib/typescript/module/specs/modules/NativeZixflowMessagingInApp.d.ts.map +1 -1
  193. package/lib/typescript/module/specs/modules/NativeZixflowMessagingPush.d.ts +1 -1
  194. package/lib/typescript/module/specs/modules/NativeZixflowMessagingPush.d.ts.map +1 -1
  195. package/lib/typescript/module/types/data-pipelines.d.ts +53 -1
  196. package/lib/typescript/module/types/data-pipelines.d.ts.map +1 -1
  197. package/lib/typescript/module/types/in-app.d.ts +22 -0
  198. package/lib/typescript/module/types/in-app.d.ts.map +1 -1
  199. package/lib/typescript/module/types/inbox.d.ts +97 -0
  200. package/lib/typescript/module/types/inbox.d.ts.map +1 -0
  201. package/lib/typescript/module/types/index.d.ts +2 -0
  202. package/lib/typescript/module/types/index.d.ts.map +1 -1
  203. package/lib/typescript/module/types/live-activities.d.ts +161 -0
  204. package/lib/typescript/module/types/live-activities.d.ts.map +1 -0
  205. package/lib/typescript/module/utils/param-validation.d.ts +7 -0
  206. package/lib/typescript/module/utils/param-validation.d.ts.map +1 -1
  207. package/lib/typescript/module/zixflow-cdp.d.ts +38 -0
  208. package/lib/typescript/module/zixflow-cdp.d.ts.map +1 -1
  209. package/lib/typescript/module/zixflow-geofence.d.ts +36 -0
  210. package/lib/typescript/module/zixflow-geofence.d.ts.map +1 -0
  211. package/lib/typescript/module/zixflow-inapp.d.ts +36 -2
  212. package/lib/typescript/module/zixflow-inapp.d.ts.map +1 -1
  213. package/lib/typescript/module/zixflow-liveactivities.d.ts +66 -0
  214. package/lib/typescript/module/zixflow-liveactivities.d.ts.map +1 -0
  215. package/package.json +11 -2
  216. package/src/components/NotificationInboxBellView.tsx +55 -0
  217. package/src/components/NotificationInboxView.tsx +30 -0
  218. package/src/components/index.ts +6 -0
  219. package/src/index.ts +8 -3
  220. package/src/notification-inbox.ts +1 -1
  221. package/src/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
  222. package/src/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
  223. package/src/specs/modules/NativeZixflow.ts +9 -1
  224. package/src/specs/modules/NativeZixflowGeofence.ts +14 -0
  225. package/src/specs/modules/NativeZixflowLiveActivities.ts +39 -0
  226. package/src/specs/modules/NativeZixflowMessagingInApp.ts +12 -1
  227. package/src/specs/modules/NativeZixflowMessagingPush.ts +3 -1
  228. package/src/types/data-pipelines.ts +54 -1
  229. package/src/types/in-app.ts +23 -0
  230. package/src/types/inbox.ts +110 -0
  231. package/src/types/index.ts +2 -0
  232. package/src/types/live-activities.ts +170 -0
  233. package/src/utils/param-validation.ts +103 -0
  234. package/src/zixflow-cdp.ts +117 -1
  235. package/src/zixflow-geofence.ts +56 -0
  236. package/src/zixflow-inapp.ts +125 -2
  237. package/src/zixflow-liveactivities.ts +86 -0
  238. package/zixflow-reactnative-richpush.podspec +4 -1
  239. package/zixflow-reactnative.podspec +26 -0
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.validate = exports.assert = void 0;
7
+ var _index = require("../types/index.js");
7
8
  // Argument validation utilities for SDK internal use
8
9
  // Ensures input safety and throws clear errors when validation fails
9
10
 
@@ -32,6 +33,16 @@ function failIf(condition, message) {
32
33
  }
33
34
  }
34
35
 
36
+ /**
37
+ * Logs a warning if the condition is true.
38
+ * Use this for misconfigurations that degrade behavior but must not fail initialization.
39
+ */
40
+ function warnIf(condition, message) {
41
+ if (__DEV__ && condition) {
42
+ console.warn(`[Zixflow] ${message()}`);
43
+ }
44
+ }
45
+
35
46
  /**
36
47
  * Validates that a value is defined (not undefined or null).
37
48
  * Useful for checking required fields.
@@ -103,6 +114,67 @@ function validateAttributes(value, fieldName, options = {}) {
103
114
  return attributes;
104
115
  }
105
116
 
117
+ /**
118
+ * The placeholder the SDK substitutes with the unread count when rendering
119
+ * `bellWithUnreadCount`.
120
+ */
121
+ const COUNT_PLACEHOLDER = '{count}';
122
+
123
+ /**
124
+ * Warns when `bellWithUnreadCount` is missing its `{count}` placeholder.
125
+ *
126
+ * The label is a template, not a finished string. A misspelled placeholder (`{COUNT}`,
127
+ * `{{count}}`, `%d`) matches nothing, so the template is announced verbatim — braces and all —
128
+ * and the count is never spoken. The check lives here rather than in either native layer
129
+ * because neither can report it usefully: Android logs at `debug`, which the default `ERROR`
130
+ * level discards, and iOS does not check at all. Warning from JavaScript reaches the
131
+ * developer's console on both platforms, whatever the SDK log level.
132
+ */
133
+ function validateInboxAccessibilityLabels(value) {
134
+ if (isUndefined(value) || typeof value !== 'object') {
135
+ return;
136
+ }
137
+ const template = value.bellWithUnreadCount;
138
+ warnIf(typeof template === 'string' && !template.includes(COUNT_PLACEHOLDER), () => `"inApp.notificationInboxAccessibilityLabels.bellWithUnreadCount" has no ` + `"${COUNT_PLACEHOLDER}" placeholder, so the unread count will not be announced.`);
139
+ }
140
+
141
+ /**
142
+ * Warns when a value is not one of the `ZixflowColorScheme` values.
143
+ *
144
+ * TypeScript rejects a bad value already, but JavaScript callers reach both entry points
145
+ * untyped, and neither native layer reports the mistake at the default log level. The
146
+ * failure mode is a message rendered in the wrong theme with no error attached, so
147
+ * JavaScript is the only place the developer reliably sees it.
148
+ *
149
+ * `consequence` differs per entry point because the native fallback does: an unrecognized
150
+ * value at initialization resolves to `auto`, while the runtime setter leaves whatever
151
+ * scheme the app already chose in place.
152
+ */
153
+ function warnIfNotColorScheme(value, fieldName, consequence) {
154
+ const allowed = Object.values(_index.ZixflowColorScheme);
155
+ warnIf(!(typeof value === 'string' && allowed.includes(value)), () => `"${fieldName}" is not a valid ZixflowColorScheme (expected one of ` + `${allowed.join(', ')}), so ${consequence}.`);
156
+ }
157
+
158
+ /**
159
+ * Validates `inApp.colorScheme`. An absent value is legitimate here — the native SDKs
160
+ * already default to `auto` — so only a value the host actually set is checked.
161
+ */
162
+ function validateConfigColorScheme(value) {
163
+ if (isUndefined(value)) {
164
+ return;
165
+ }
166
+ warnIfNotColorScheme(value, 'inApp.colorScheme', 'in-app messages will follow the device appearance');
167
+ }
168
+
169
+ /**
170
+ * Validates the argument to `setColorScheme`. Unlike the config field, an absent value is
171
+ * itself the mistake: the caller asked for a scheme change and named none, and there is no
172
+ * default to fall back to, so null and undefined are reported rather than skipped.
173
+ */
174
+ function validateColorSchemeArgument(value) {
175
+ warnIfNotColorScheme(value, 'colorScheme', 'the color scheme will be left unchanged');
176
+ }
177
+
106
178
  /**
107
179
  * Validates that the given value is a valid ZixflowConfig object.
108
180
  * Throws if required fields are missing or incorrectly typed.
@@ -119,6 +191,8 @@ function validateConfig(value) {
119
191
  allowEmpty: false,
120
192
  usage: usage
121
193
  });
194
+ validateConfigColorScheme(obj.inApp?.colorScheme);
195
+ validateInboxAccessibilityLabels(obj.inApp?.notificationInboxAccessibilityLabels);
122
196
  }
123
197
 
124
198
  // For type safety, we define a ConfigValidator type that asserts the value is a ZixflowConfig
@@ -128,7 +202,8 @@ const assert = exports.assert = {
128
202
  string: validateString,
129
203
  record: validateRecord,
130
204
  attributes: validateAttributes,
131
- config: validateConfig
205
+ config: validateConfig,
206
+ colorScheme: validateColorSchemeArgument
132
207
  };
133
208
  const validate = exports.validate = {
134
209
  isUndefined: isUndefined
@@ -1 +1 @@
1
- {"version":3,"names":["buildErrorMessage","usage","fieldName","error","prefix","isUndefined","value","undefined","failIf","condition","message","__DEV__","Error","failIfUndefined","validateString","options","allowEmpty","optional","typedValue","trim","validateRecord","expectedType","typeName","Array","isArray","validateAttributes","exists","attributes","Map","Object","fromEntries","validateConfig","obj","apiKey","assert","exports","string","record","config","validate"],"sourceRoot":"../../../src","sources":["utils/param-validation.ts"],"mappings":";;;;;;AAAA;AACA;;AAIA;AACA;AACA;AACA,SAASA,iBAAiBA,CACxBC,KAAyB,EACzBC,SAAiB,EACjBC,KAAa,EACL;EACR,MAAMC,MAAM,GAAGH,KAAK,GAAG,GAAGA,KAAK,GAAG,GAAG,EAAE;EACvC,OAAO,GAAGG,MAAM,IAAIF,SAAS,KAAKC,KAAK,GAAG;AAC5C;;AAEA;AACA;AACA;AACA,SAASE,WAAWA,CAACC,KAAc,EAAW;EAC5C,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASE,MAAMA,CAACC,SAAkB,EAAEC,OAAqB,EAAQ;EAC/D,IAAIC,OAAO,IAAIF,SAAS,EAAE;IACxB,MAAM,IAAIG,KAAK,CAAC,aAAaF,OAAO,CAAC,CAAC,EAAE,CAAC;EAC3C;AACF;;AAEA;AACA;AACA;AACA;AACA,SAASG,eAAeA,CACtBP,KAAc,EACdJ,SAAiB,EACjBD,KAAc,EACR;EACNO,MAAM,CAACH,WAAW,CAACC,KAAK,CAAC,EAAE,MACz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;AACV,CAAC;AAEM,MAAMQ,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAAG;EACtBlC,WAAW,EAAEA;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_index","require","buildErrorMessage","usage","fieldName","error","prefix","isUndefined","value","undefined","failIf","condition","message","__DEV__","Error","warnIf","console","warn","failIfUndefined","validateString","options","allowEmpty","optional","typedValue","trim","validateRecord","expectedType","typeName","Array","isArray","validateAttributes","exists","attributes","Map","Object","fromEntries","COUNT_PLACEHOLDER","validateInboxAccessibilityLabels","template","bellWithUnreadCount","includes","warnIfNotColorScheme","consequence","allowed","values","ZixflowColorScheme","join","validateConfigColorScheme","validateColorSchemeArgument","validateConfig","obj","apiKey","inApp","colorScheme","notificationInboxAccessibilityLabels","assert","exports","string","record","config","validate"],"sourceRoot":"../../../src","sources":["utils/param-validation.ts"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;;AAKA;AACA;AACA;AACA,SAASC,iBAAiBA,CACxBC,KAAyB,EACzBC,SAAiB,EACjBC,KAAa,EACL;EACR,MAAMC,MAAM,GAAGH,KAAK,GAAG,GAAGA,KAAK,GAAG,GAAG,EAAE;EACvC,OAAO,GAAGG,MAAM,IAAIF,SAAS,KAAKC,KAAK,GAAG;AAC5C;;AAEA;AACA;AACA;AACA,SAASE,WAAWA,CAACC,KAAc,EAAW;EAC5C,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASE,MAAMA,CAACC,SAAkB,EAAEC,OAAqB,EAAQ;EAC/D,IAAIC,OAAO,IAAIF,SAAS,EAAE;IACxB,MAAM,IAAIG,KAAK,CAAC,aAAaF,OAAO,CAAC,CAAC,EAAE,CAAC;EAC3C;AACF;;AAEA;AACA;AACA;AACA;AACA,SAASG,MAAMA,CAACJ,SAAkB,EAAEC,OAAqB,EAAQ;EAC/D,IAAIC,OAAO,IAAIF,SAAS,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CAAC;EACF4C,yBAAyB,CAACG,GAAG,CAACE,KAAK,EAAEC,WAAW,CAAC;EACjDhB,gCAAgC,CAC9Ba,GAAG,CAACE,KAAK,EAAEE,oCACb,CAAC;AACH;;AAEA;AACA;;AAGO,MAAMC,MAMZ,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACFE,MAAM,EAAEtC,cAAc;EACtBuC,MAAM,EAAEjC,cAAc;EACtBO,UAAU,EAAEF,kBAAkB;EAC9B6B,MAAM,EAAEV,cAAc;EACtBI,WAAW,EAAEL;AACf,CAAC;AAEM,MAAMY,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAAG;EACtBrD,WAAW,EAAEA;AACf,CAAC","ignoreList":[]}
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Zixflow = void 0;
7
+ var _zixflowGeofence = require("./zixflow-geofence.js");
7
8
  var _zixflowInapp = require("./zixflow-inapp.js");
9
+ var _zixflowLiveactivities = require("./zixflow-liveactivities.js");
8
10
  var _zixflowLocation = require("./zixflow-location.js");
9
11
  var _zixflowPush = require("./zixflow-push.js");
10
12
  var _nativeLoggerListener = require("./native-logger-listener.js");
@@ -13,10 +15,21 @@ var _index = require("./types/index.js");
13
15
  var _nativeBridge = require("./utils/native-bridge.js");
14
16
  var _paramValidation = require("./utils/param-validation.js");
15
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- const packageJson = require('../../package.json');
18
+ const packageJson = require('../package.json');
17
19
 
18
20
  // Track whether Zixflow SDK has been initialized to prevent usage before setup
19
21
  let _initialized = false;
22
+ let deepLinkHandlerSubscription;
23
+
24
+ /**
25
+ * Handles a Zixflow deep-link destination delivered from iOS.
26
+ * @public
27
+ */
28
+
29
+ /**
30
+ * Removes a Zixflow deep-link handler.
31
+ * @public
32
+ */
20
33
 
21
34
  // Reference to the native Zixflow Data Pipelines module for SDK operations
22
35
  const nativeModule = (0, _nativeBridge.ensureNativeModule)(_NativeZixflow.default);
@@ -48,6 +61,89 @@ class Zixflow {
48
61
  });
49
62
  };
50
63
 
64
+ /**
65
+ * Signal that the app's React Native Linking listener is ready to receive Zixflow URLs.
66
+ *
67
+ * This is only needed by UIScene hosts that initialize Zixflow natively, such as Expo
68
+ * config-plugin auto-initialization. Call it after registering the Linking listener.
69
+ */
70
+ static setDeepLinkRoutingReady = () => {
71
+ return withNativeModule(native => native.setDeepLinkRoutingReady());
72
+ };
73
+
74
+ /**
75
+ * Register an acknowledged deep-link handler for an iOS UIScene host.
76
+ *
77
+ * This API only handles Zixflow destinations delivered through an iOS UIScene lifecycle.
78
+ * In a native React Native scene host, pair this with
79
+ * `NativeZixflow.configureAcknowledgedSceneDeepLinkRouting()` in the SceneDelegate. Register
80
+ * this before `initialize` when possible. Return `true` after routing a URL. Returning `false`,
81
+ * throwing, or rejecting lets the native SDK try the host AppDelegate, then React Native Linking
82
+ * for a host-owned custom scheme or the system for other URLs. Cold URLs are buffered until this
83
+ * handler is registered, subject to the native timeout. After delivery, the handler has ten
84
+ * seconds to settle. Once that timeout runs the native fallback, a late handler cannot cancel it
85
+ * and may cause a second navigation if it also routes the URL.
86
+ */
87
+ static setDeepLinkHandler = handler => {
88
+ if (typeof handler !== 'function') {
89
+ throw new Error('[Zixflow] "handler" must be a function.');
90
+ }
91
+
92
+ // Native unregister is tokenless and removes the current native handler. Remove the old
93
+ // subscription first so its cleanup cannot unregister the replacement.
94
+ deepLinkHandlerSubscription?.remove();
95
+ return withNativeModule(native => {
96
+ const nativeSubscription = native.onDeepLinkReceived(async data => {
97
+ const event = data;
98
+ if (typeof event.id !== 'string' || typeof event.url !== 'string') {
99
+ _nativeLoggerListener.NativeLoggerListener.warn('Received an invalid native deep-link event.');
100
+ return;
101
+ }
102
+ let handled = false;
103
+ try {
104
+ handled = (await handler(event.url)) === true;
105
+ } catch (error) {
106
+ _nativeLoggerListener.NativeLoggerListener.warn('Deep-link handler failed:', error);
107
+ }
108
+ try {
109
+ native.acknowledgeDeepLink(event.id, handled);
110
+ } catch (error) {
111
+ _nativeLoggerListener.NativeLoggerListener.warn('Failed to acknowledge a deep-link result:', error);
112
+ }
113
+ });
114
+ let removed = false;
115
+ const subscription = {
116
+ remove: () => {
117
+ if (removed) {
118
+ return;
119
+ }
120
+ removed = true;
121
+ try {
122
+ native.unregisterDeepLinkHandler();
123
+ } finally {
124
+ nativeSubscription.remove();
125
+ if (deepLinkHandlerSubscription === subscription) {
126
+ deepLinkHandlerSubscription = undefined;
127
+ }
128
+ }
129
+ }
130
+ };
131
+ try {
132
+ native.registerDeepLinkHandler();
133
+ } catch (error) {
134
+ try {
135
+ native.unregisterDeepLinkHandler();
136
+ } catch {
137
+ // Preserve the registration error; the native timeout still owns pending URLs.
138
+ }
139
+ nativeSubscription.remove();
140
+ throw error;
141
+ }
142
+ deepLinkHandlerSubscription = subscription;
143
+ return subscription;
144
+ });
145
+ };
146
+
51
147
  /** Identify a user to start tracking their activity. Requires userId, traits, or both. */
52
148
  static identify = async ({
53
149
  userId,
@@ -152,7 +248,9 @@ class Zixflow {
152
248
  * @deprecated This method will be removed in a future version. If you need this functionality, please contact us.
153
249
  */
154
250
  static isInitialized = () => _initialized;
251
+ static geofence = new _zixflowGeofence.ZixflowGeofence();
155
252
  static inAppMessaging = new _zixflowInapp.ZixflowInAppMessaging();
253
+ static liveActivities = new _zixflowLiveactivities.ZixflowLiveActivities();
156
254
  static location = new _zixflowLocation.ZixflowLocation();
157
255
  static pushMessaging = new _zixflowPush.ZixflowPushMessaging();
158
256
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_zixflowInapp","require","_zixflowLocation","_zixflowPush","_nativeLoggerListener","_NativeZixflow","_interopRequireDefault","_index","_nativeBridge","_paramValidation","e","__esModule","default","packageJson","_initialized","nativeModule","ensureNativeModule","NativeModule","withNativeModule","fn","callNativeModule","Zixflow","initialize","config","assert","inApp","siteId","apiKey","logLevel","ZixflowLogLevel","None","NativeLoggerListener","expoVersion","args","packageSource","packageVersion","version","promise","native","then","identify","userId","traits","validate","isUndefined","Error","string","allowEmpty","usage","optional","normalizedTraits","attributes","clearIdentify","track","name","properties","normalizedProps","screen","title","setProfileAttributes","normalizedAttrs","setDeviceAttributes","registerDeviceToken","token","deleteDeviceToken","trackMetric","deliveryID","deviceToken","event","isInitialized","inAppMessaging","ZixflowInAppMessaging","location","ZixflowLocation","pushMessaging","ZixflowPushMessaging","exports","initNativeLogger"],"sourceRoot":"../../src","sources":["zixflow-cdp.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAC,sBAAA,CAAAL,OAAA;AAIA,IAAAM,MAAA,GAAAN,OAAA;AAQA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAA4D,SAAAK,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,MAAMG,WAAW,GAAGZ,OAAO,CAAC,oBAAoB,CAAC;;AAEjD;AACA,IAAIa,YAAY,GAAG,KAAK;;AAExB;AACA,MAAMC,YAAY,GAAG,IAAAC,gCAAkB,EAACC,sBAAY,CAAC;;AAErD;AACA,MAAMC,gBAAgB,GAAOC,EAA8B,IAAQ;EACjE,OAAO,IAAAC,8BAAgB,EAACL,YAAY,EAAEI,EAAE,CAAC;AAC3C,CAAC;;AAED;AACO,MAAME,OAAO,CAAC;EACnB;EACA,OAAgBC,UAAU,GAAG,MAAOC,MAAqB,IAAK;IAC5DC,uBAAM,CAACD,MAAM,CAACA,MAAM,CAAC;IAErB,IAAIA,MAAM,CAACE,KAAK,EAAE;MACfF,MAAM,CAACE,KAAK,CAASC,MAAM,GAAGH,MAAM,CAACI,MAAM;IAC9C;IAEA,IAAIJ,MA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,CAAC;EACH,CAAC;;EAED;AACF;AACA;AACA;EACE,OAAgBC,aAAa,GAAGA,CAAA,KAAMvD,YAAY;EAElD,OAAgBwD,cAAc,GAAG,IAAIC,mCAAqB,CAAC,CAAC;EAC5D,OAAgBC,QAAQ,GAAG,IAAIC,gCAAe,CAAC,CAAC;EAChD,OAAgBC,aAAa,GAAG,IAAIC,iCAAoB,CAAC,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AAAAC,OAAA,CAAAvD,OAAA,GAAAA,OAAA;AACAU,0CAAoB,CAAC8C,gBAAgB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_zixflowGeofence","require","_zixflowInapp","_zixflowLiveactivities","_zixflowLocation","_zixflowPush","_nativeLoggerListener","_NativeZixflow","_interopRequireDefault","_index","_nativeBridge","_paramValidation","e","__esModule","default","packageJson","_initialized","deepLinkHandlerSubscription","nativeModule","ensureNativeModule","NativeModule","withNativeModule","fn","callNativeModule","Zixflow","initialize","config","assert","inApp","siteId","apiKey","logLevel","ZixflowLogLevel","None","NativeLoggerListener","expoVersion","args","packageSource","packageVersion","version","promise","native","then","setDeepLinkRoutingReady","setDeepLinkHandler","handler","Error","remove","nativeSubscription","onDeepLinkReceived","data","event","id","url","warn","handled","error","acknowledgeDeepLink","removed","subscription","unregisterDeepLinkHandler","undefined","registerDeepLinkHandler","identify","userId","traits","validate","isUndefined","string","allowEmpty","usage","optional","normalizedTraits","attributes","clearIdentify","track","name","properties","normalizedProps","screen","title","setProfileAttributes","normalizedAttrs","setDeviceAttributes","registerDeviceToken","token","deleteDeviceToken","trackMetric","deliveryID","deviceToken","isInitialized","geofence","ZixflowGeofence","inAppMessaging","ZixflowInAppMessaging","liveActivities","ZixflowLiveActivities","location","ZixflowLocation","pushMessaging","ZixflowPushMessaging","exports","initNativeLogger"],"sourceRoot":"../../src","sources":["zixflow-cdp.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAA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M,CAACyC,MAAM,CAACoB,UAAU,EAAE,YAAY,EAAE;MAAElB,KAAK,EAAE;IAAe,CAAC,CAAC;IAClE3C,uBAAM,CAACyC,MAAM,CAACqB,WAAW,EAAE,aAAa,EAAE;MAAEnB,KAAK,EAAE;IAAe,CAAC,CAAC;IACpE3C,uBAAM,CAACyC,MAAM,CAACjB,KAAK,EAAE,OAAO,EAAE;MAAEmB,KAAK,EAAE;IAAe,CAAC,CAAC;IAExD,OAAOjD,gBAAgB,CAAEoB,MAAM,IAC7BA,MAAM,CAAC8C,WAAW,CAACC,UAAU,EAAEC,WAAW,EAAEtC,KAAK,CACnD,CAAC;EACH,CAAC;;EAED;AACF;AACA;AACA;EACE,OAAgBuC,aAAa,GAAGA,CAAA,KAAM1E,YAAY;EAElD,OAAgB2E,QAAQ,GAAG,IAAIC,gCAAe,CAAC,CAAC;EAChD,OAAgBC,cAAc,GAAG,IAAIC,mCAAqB,CAAC,CAAC;EAC5D,OAAgBC,cAAc,GAAG,IAAIC,4CAAqB,CAAC,CAAC;EAC5D,OAAgBC,QAAQ,GAAG,IAAIC,gCAAe,CAAC,CAAC;EAChD,OAAgBC,aAAa,GAAG,IAAIC,iCAAoB,CAAC,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AAAAC,OAAA,CAAA7E,OAAA,GAAAA,OAAA;AACAU,0CAAoB,CAACoE,gBAAgB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ZixflowGeofence = void 0;
7
+ var _NativeZixflowGeofence = _interopRequireDefault(require("./specs/modules/NativeZixflowGeofence.js"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * Ensures all methods defined in codegen spec are implemented by the public module
11
+ *
12
+ * @internal
13
+ */
14
+
15
+ // Geofence is an optional module — NativeModule may be null when geofence is not enabled.
16
+ // Methods silently no-op when the native module is unavailable, with a one-time dev warning.
17
+ let hasWarnedNotEnabled = false;
18
+ const withNativeModule = fn => {
19
+ if (_NativeZixflowGeofence.default) {
20
+ fn(_NativeZixflowGeofence.default);
21
+ } else if (__DEV__ && !hasWarnedNotEnabled) {
22
+ hasWarnedNotEnabled = true;
23
+ console.warn('Zixflow: Geofence module is not enabled. ' + 'To use geofence features, set zixflow_geofence_enabled=true in ' + 'gradle.properties (Android) or add the geofence subspec to your Podfile (iOS).');
24
+ }
25
+ };
26
+
27
+ /**
28
+ * Public entry point for the optional Geofence module.
29
+ *
30
+ * Geofence runs automatically once enabled. Apps opt in by passing a `geofence` config to
31
+ * `initialize` and enabling the module at build time: set `zixflow_geofence_enabled=true`
32
+ * in `gradle.properties` (Android) or add the `geofence` subspec to your Podfile (iOS).
33
+ * Enabling geofence also enables the Location module, which geofence depends on.
34
+ *
35
+ * @public
36
+ */
37
+ class ZixflowGeofence {
38
+ /**
39
+ * Requests a one-shot location fix and refreshes the nearby geofence set from it,
40
+ * without sending a location analytics event (unlike
41
+ * `Zixflow.location.requestLocationUpdate()`) and without caching the fix.
42
+ *
43
+ * Call this after the host app has been granted location permission — the SDK never
44
+ * requests permission itself. It is the primary way to drive geofencing when the module
45
+ * is configured with `MANUAL` location mode; with the default `AUTOMATIC` the SDK acquires
46
+ * location on its own and this only forces an immediate refresh.
47
+ *
48
+ * No-ops if the geofence module is not enabled or a user has not been identified.
49
+ */
50
+ refreshFromCurrentLocation() {
51
+ return withNativeModule(native => native.refreshFromCurrentLocation());
52
+ }
53
+ }
54
+ exports.ZixflowGeofence = ZixflowGeofence;
55
+ //# sourceMappingURL=zixflow-geofence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_NativeZixflowGeofence","_interopRequireDefault","require","e","__esModule","default","hasWarnedNotEnabled","withNativeModule","fn","NativeModule","__DEV__","console","warn","ZixflowGeofence","refreshFromCurrentLocation","native","exports"],"sourceRoot":"../../src","sources":["zixflow-geofence.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAG+C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA,IAAIG,mBAAmB,GAAG,KAAK;AAC/B,MAAMC,gBAAgB,GAAIC,EAAiC,IAAW;EACpE,IAAIC,8BAAY,EAAE;IAChBD,EAAE,CAACC,8BAAY,CAAC;EAClB,CAAC,MAAM,IAAIC,OAAO,IAAI,CAACJ,mBAAmB,EAAE;IAC1CA,mBAAmB,GAAG,IAAI;IAC1BK,OAAO,CAACC,IAAI,CACV,2CAA2C,GACzC,iEAAiE,GACjE,gFACJ,CAAC;EACH;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAe,CAA+B;EACzD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,0BAA0BA,CAAA,EAAS;IACjC,OAAOP,gBAAgB,CAAEQ,MAAM,IAAKA,MAAM,CAACD,0BAA0B,CAAC,CAAC,CAAC;EAC1E;AACF;AAACE,OAAA,CAAAH,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -4,6 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InAppMessageEvent = void 0;
7
+ Object.defineProperty(exports, "InboxEventType", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _index2.InboxEventType;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "InboxMessageEvent", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _index2.InboxMessageEvent;
17
+ }
18
+ });
7
19
  Object.defineProperty(exports, "InlineInAppMessageView", {
8
20
  enumerable: true,
9
21
  get: function () {
@@ -16,12 +28,26 @@ Object.defineProperty(exports, "NotificationInbox", {
16
28
  return _notificationInbox.NotificationInbox;
17
29
  }
18
30
  });
31
+ Object.defineProperty(exports, "NotificationInboxBellView", {
32
+ enumerable: true,
33
+ get: function () {
34
+ return _index.NotificationInboxBellView;
35
+ }
36
+ });
37
+ Object.defineProperty(exports, "NotificationInboxView", {
38
+ enumerable: true,
39
+ get: function () {
40
+ return _index.NotificationInboxView;
41
+ }
42
+ });
19
43
  exports.ZixflowInAppMessaging = void 0;
20
44
  var _index = require("./components/index.js");
21
45
  var _nativeLoggerListener = require("./native-logger-listener.js");
22
46
  var _notificationInbox = require("./notification-inbox.js");
23
47
  var _NativeZixflowMessagingInApp = _interopRequireDefault(require("./specs/modules/NativeZixflowMessagingInApp.js"));
48
+ var _index2 = require("./types/index.js");
24
49
  var _nativeBridge = require("./utils/native-bridge.js");
50
+ var _paramValidation = require("./utils/param-validation.js");
25
51
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
52
  /**
27
53
  * Ensures all methods defined in codegen spec are implemented by the public module
@@ -43,6 +69,12 @@ const withNativeModule = fn => {
43
69
  * @public
44
70
  */
45
71
  class ZixflowInAppMessaging {
72
+ /**
73
+ * Live inbox subscriptions. The SDK's inbox forwarder is a SINGLE global listener, so it is
74
+ * registered when the first subscription is created and unregistered when the last one goes away —
75
+ * never per subscription, or one `remove()` would tear it out from under the others.
76
+ */
77
+ _inboxListenerCount = 0;
46
78
  registerEventsListener(listener) {
47
79
  const emitter = data => {
48
80
  // Convert raw native payload to InAppMessageEvent
@@ -68,6 +100,77 @@ class ZixflowInAppMessaging {
68
100
  });
69
101
  }
70
102
 
103
+ /**
104
+ * Registers a listener for Visual Notification Inbox events (action taken,
105
+ * shown, opened, dismissed).
106
+ *
107
+ * While a listener is registered the host owns action navigation: the native
108
+ * SDK suppresses its default action handling and forwards the event here.
109
+ * Call `.remove()` on the returned subscription to unregister and restore the
110
+ * SDK's default behavior.
111
+ *
112
+ * @param listener - callback invoked with an {@link InboxMessageEvent}
113
+ * @returns an EventSubscription; call `.remove()` to stop listening
114
+ */
115
+ registerInboxEventListener(listener) {
116
+ const emitter = data => {
117
+ // Convert raw native payload to InboxMessageEvent with a parsed message
118
+ const event = new _index2.InboxMessageEvent(data.eventType, (0, _notificationInbox.parseInboxMessage)(data.message), data.actionName, data.actionValue);
119
+ listener(event);
120
+ };
121
+ return withNativeModule(native => {
122
+ let registeredNativeForwarder = false;
123
+ try {
124
+ // Register the native forwarder with the SDK, then subscribe to the
125
+ // codegen-generated event emitter.
126
+ // Wrapped in try-catch due to previous reports of crashes on certain Android architectures.
127
+ if (this._inboxListenerCount === 0) {
128
+ native.registerInboxEventListener();
129
+ registeredNativeForwarder = true;
130
+ }
131
+ const subscription = native.onInboxEventReceived(emitter);
132
+ this._inboxListenerCount += 1;
133
+
134
+ // Wrap remove() so unregistering the LAST JS listener also unregisters the native forwarder
135
+ // (restoring the SDK's default action handling). Guarded so a double remove() cannot
136
+ // unbalance the count and drop the forwarder while other subscriptions are still live.
137
+ const originalRemove = subscription.remove.bind(subscription);
138
+ let removed = false;
139
+ subscription.remove = () => {
140
+ if (removed) {
141
+ return;
142
+ }
143
+ removed = true;
144
+ originalRemove();
145
+ this._inboxListenerCount -= 1;
146
+ if (this._inboxListenerCount === 0) {
147
+ withNativeModule(n => n.unregisterInboxEventListener());
148
+ }
149
+ };
150
+ return subscription;
151
+ } catch (error) {
152
+ // If the forwarder was registered and subscribing then failed, roll it back. Otherwise the
153
+ // SDK keeps suppressing its own action handling while nothing in JS is listening, so inbox
154
+ // actions are reported as handled and silently go nowhere.
155
+ if (registeredNativeForwarder) {
156
+ try {
157
+ native.unregisterInboxEventListener();
158
+ } catch (rollbackError) {
159
+ _nativeLoggerListener.NativeLoggerListener.warn('Failed to roll back inbox listener registration:', rollbackError);
160
+ }
161
+ }
162
+ _nativeLoggerListener.NativeLoggerListener.warn('Failed to attach inbox event listener:', error);
163
+ // Return a no-op subscription to maintain backwards compatibility
164
+ return {
165
+ remove: () => {},
166
+ eventType: '',
167
+ key: 0,
168
+ subscriber: null
169
+ };
170
+ }
171
+ });
172
+ }
173
+
71
174
  /**
72
175
  * Dismisses any currently displayed in-app message
73
176
  */
@@ -75,6 +178,23 @@ class ZixflowInAppMessaging {
75
178
  withNativeModule(native => native.dismissMessage());
76
179
  }
77
180
 
181
+ /**
182
+ * Overrides the color scheme used to render in-app messages.
183
+ *
184
+ * Takes effect immediately: messages already on screen — inline views included — are
185
+ * re-themed in place, so this can be called whenever the app's appearance setting
186
+ * changes rather than only before a message is shown.
187
+ *
188
+ * @param colorScheme - scheme to render with; `ZixflowColorScheme.Auto` returns to following
189
+ * the device appearance
190
+ */
191
+ setColorScheme(colorScheme) {
192
+ // Validated here as well as in `initialize`: this is a public method reachable from
193
+ // untyped JavaScript, and without it a bad value reaches the native fallback silently.
194
+ _paramValidation.assert.colorScheme(colorScheme);
195
+ withNativeModule(native => native.setColorScheme(colorScheme));
196
+ }
197
+
78
198
  /**
79
199
  * Gets the message inbox instance for managing inbox messages
80
200
  *
@@ -1 +1 @@
1
- {"version":3,"names":["_index","require","_nativeLoggerListener","_notificationInbox","_NativeZixflowMessagingInApp","_interopRequireDefault","_nativeBridge","e","__esModule","default","nativeModule","ensureNativeModule","NativeZixflowMessagingInApp","withNativeModule","fn","callNativeModule","ZixflowInAppMessaging","registerEventsListener","listener","emitter","data","event","InAppMessageEvent","eventType","messageId","deliveryId","actionValue","actionName","native","onInAppEventReceived","error","NativeLoggerListener","warn","remove","key","subscriber","dismissMessage","inbox","NotificationInbox","exports","constructor"],"sourceRoot":"../../src","sources":["zixflow-inapp.ts"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAIA,IAAAG,4BAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AAA6E,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAA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,IAAImC,oCAAiB,CAAC,CAAC;IACnD;IACA,OAAO,IAAI,CAACnC,kBAAkB;EAChC;AACF;;AAEA;AACA;AACA;AACA;AAAAoC,OAAA,CAAAvB,qBAAA,GAAAA,qBAAA;AACA,MAAMM,iBAAiB,CAAC;EAOtBkB,WAAWA,CACTjB,SAAgC,EAChCC,SAAiB,EACjBC,UAAmB,EACnBC,WAAoB,EACpBC,UAAmB,EACnB;IACA,IAAI,CAACJ,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACE,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;AACF;;AAEA;AAAAY,OAAA,CAAAjB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_index","require","_nativeLoggerListener","_notificationInbox","_NativeZixflowMessagingInApp","_interopRequireDefault","_index2","_nativeBridge","_paramValidation","e","__esModule","default","nativeModule","ensureNativeModule","NativeZixflowMessagingInApp","withNativeModule","fn","callNativeModule","ZixflowInAppMessaging","_inboxListenerCount","registerEventsListener","listener","emitter","data","event","InAppMessageEvent","eventType","messageId","deliveryId","actionValue","actionName","native","onInAppEventReceived","error","NativeLoggerListener","warn","remove","key","subscriber","registerInboxEventListener","InboxMessageEvent","parseInboxMessage","message","registeredNativeForwarder","subscription","onInboxEventReceived","originalRemove","bind","removed","n","unregisterInboxEventListener","rollbackError","dismissMessage","setColorScheme","colorScheme","assert","inbox","NotificationInbox","exports","constructor"],"sourceRoot":"../../src","sources":["zixflow-inapp.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAKA,IAAAG,4BAAA,GAAAC,sBAAA,CAAAJ,OAAA;A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W,GAAGA,WAAW;IAC9B,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;AACF;;AAEA;AAAA4B,OAAA,CAAAjC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ZixflowLiveActivities = void 0;
7
+ var _NativeZixflowLiveActivities = _interopRequireDefault(require("./specs/modules/NativeZixflowLiveActivities.js"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * Ensures all methods defined in codegen spec are implemented by the public module
11
+ *
12
+ * @internal
13
+ */
14
+
15
+ /**
16
+ * Live Activities (iOS) / Live Notifications (Android).
17
+ *
18
+ * Start, update, and end live, updating notifications from built-in templates
19
+ * (Segments, Countdown Timer). Enable the activity types via the `liveNotifications`
20
+ * key of the SDK config passed to {@link Zixflow.initialize}.
21
+ *
22
+ * @public
23
+ */
24
+ class ZixflowLiveActivities {
25
+ /**
26
+ * Report an opened Live Activity and return the URL the app should route.
27
+ *
28
+ * Zixflow tracking URLs are unwrapped to their destination after attribution is recorded.
29
+ * A tracking URL without a destination returns `null`; any other URL is returned unchanged.
30
+ * This method never rejects, so it can safely compose with Expo Router's
31
+ * `redirectSystemPath` hook. On Android it is a pass-through.
32
+ *
33
+ * Use this in exactly one URL-routing layer. Calling it more than once for the same Zixflow
34
+ * tracking URL reports more than one opened event.
35
+ *
36
+ * @param url - The incoming URL from the host's linking lifecycle.
37
+ * @returns The URL to route, or `null` when the Zixflow URL has no destination.
38
+ */
39
+ async handleWidgetUrl(url) {
40
+ try {
41
+ return await _NativeZixflowLiveActivities.default.handleWidgetUrl(url);
42
+ } catch {
43
+ return url;
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Start a built-in-template activity.
49
+ *
50
+ * @param payload - Template payload; `payload.type` selects the template.
51
+ * @returns The SDK-minted activity id, used for later `update`/`end`.
52
+ */
53
+ start(payload) {
54
+ return _NativeZixflowLiveActivities.default.start(payload);
55
+ }
56
+
57
+ /**
58
+ * Replace the whole content-state of a running activity.
59
+ *
60
+ * ActivityKit (iOS) replaces content-state wholesale, so pass the **full** desired
61
+ * state — not just the changed fields. Static attributes (e.g. `header`) cannot
62
+ * change after start and are ignored on iOS.
63
+ *
64
+ * @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
65
+ * @param payload - The complete desired state.
66
+ */
67
+ update(activityId, payload) {
68
+ return _NativeZixflowLiveActivities.default.update(activityId, payload);
69
+ }
70
+
71
+ /**
72
+ * End a running activity, optionally rendering a final content-state.
73
+ *
74
+ * @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
75
+ * @param payload - **iOS only.** The final content-state to render as the activity ends.
76
+ * ActivityKit keeps the last content-state on screen when none is given, so pass one to show
77
+ * a terminal state (e.g. all segments complete). Android renders its own terminal state and
78
+ * ignores this.
79
+ */
80
+ end(activityId, payload) {
81
+ return _NativeZixflowLiveActivities.default.end(activityId, payload);
82
+ }
83
+ }
84
+ exports.ZixflowLiveActivities = ZixflowLiveActivities;
85
+ //# sourceMappingURL=zixflow-liveactivities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_NativeZixflowLiveActivities","_interopRequireDefault","require","e","__esModule","default","ZixflowLiveActivities","handleWidgetUrl","url","NativeModule","start","payload","update","activityId","end","exports"],"sourceRoot":"../../src","sources":["zixflow-liveactivities.ts"],"mappings":";;;;;;AACA,IAAAA,4BAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGqD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGrD;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,qBAAqB,CAAqC;EACrE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,eAAeA,CAACC,GAAW,EAA0B;IACzD,IAAI;MACF,OAAO,MAAMC,oCAAY,CAACF,eAAe,CAACC,GAAG,CAAC;IAChD,CAAC,CAAC,MAAM;MACN,OAAOA,GAAG;IACZ;EACF;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEE,KAAKA,CAACC,OAA4B,EAAmB;IACnD,OAAOF,oCAAY,CAACC,KAAK,CAACC,OAAO,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,MAAMA,CAACC,UAAkB,EAAEF,OAA4B,EAAiB;IACtE,OAAOF,oCAAY,CAACG,MAAM,CAACC,UAAU,EAAEF,OAAO,CAAC;EACjD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEG,GAAGA,CAACD,UAAkB,EAAEF,OAA6B,EAAiB;IACpE,OAAOF,oCAAY,CAACK,GAAG,CAACD,UAAU,EAAEF,OAAO,CAAC;EAC9C;AACF;AAACI,OAAA,CAAAT,qBAAA,GAAAA,qBAAA","ignoreList":[]}