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
@@ -0,0 +1,36 @@
1
+ import { type TurboModule } from 'react-native';
2
+ import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowGeofence';
3
+ /**
4
+ * Ensures all methods defined in codegen spec are implemented by the public module
5
+ *
6
+ * @internal
7
+ */
8
+ interface NativeGeofenceSpec extends Omit<CodegenSpec, keyof TurboModule> {
9
+ }
10
+ /**
11
+ * Public entry point for the optional Geofence module.
12
+ *
13
+ * Geofence runs automatically once enabled. Apps opt in by passing a `geofence` config to
14
+ * `initialize` and enabling the module at build time: set `zixflow_geofence_enabled=true`
15
+ * in `gradle.properties` (Android) or add the `geofence` subspec to your Podfile (iOS).
16
+ * Enabling geofence also enables the Location module, which geofence depends on.
17
+ *
18
+ * @public
19
+ */
20
+ export declare class ZixflowGeofence implements NativeGeofenceSpec {
21
+ /**
22
+ * Requests a one-shot location fix and refreshes the nearby geofence set from it,
23
+ * without sending a location analytics event (unlike
24
+ * `Zixflow.location.requestLocationUpdate()`) and without caching the fix.
25
+ *
26
+ * Call this after the host app has been granted location permission — the SDK never
27
+ * requests permission itself. It is the primary way to drive geofencing when the module
28
+ * is configured with `MANUAL` location mode; with the default `AUTOMATIC` the SDK acquires
29
+ * location on its own and this only forces an immediate refresh.
30
+ *
31
+ * No-ops if the geofence module is not enabled or a user has not been identified.
32
+ */
33
+ refreshFromCurrentLocation(): void;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=zixflow-geofence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zixflow-geofence.d.ts","sourceRoot":"","sources":["../../../src/zixflow-geofence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAEL,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,uCAAuC,CAAC;AAE/C;;;;GAIG;AACH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,WAAW,CAAC;CAAG;AAkB5E;;;;;;;;;GASG;AACH,qBAAa,eAAgB,YAAW,kBAAkB;IACxD;;;;;;;;;;;OAWG;IACH,0BAA0B,IAAI,IAAI;CAGnC"}
@@ -2,13 +2,14 @@ import { type EventSubscription, type TurboModule } from 'react-native';
2
2
  import { InlineInAppMessageView } from './components';
3
3
  import { NotificationInbox, type NotificationInboxSpec } from './notification-inbox';
4
4
  import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowMessagingInApp';
5
- import type { InAppMessageEventType } from './types';
5
+ import type { ZixflowColorScheme, InAppMessageEventType } from './types';
6
+ import { InboxMessageEvent } from './types';
6
7
  /**
7
8
  * Ensures all methods defined in codegen spec are implemented by the public module
8
9
  *
9
10
  * @internal
10
11
  */
11
- interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | NotificationInboxSpec | 'onInAppEventReceived'> {
12
+ interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | NotificationInboxSpec | 'onInAppEventReceived' | 'registerInboxEventListener' | 'unregisterInboxEventListener' | 'onInboxEventReceived'> {
12
13
  }
13
14
  /**
14
15
  * Helper class so that registering event listeners is easier for customers.
@@ -17,11 +18,41 @@ interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | Notifica
17
18
  */
18
19
  declare class ZixflowInAppMessaging implements NativeInAppSpec {
19
20
  private _notificationInbox?;
21
+ /**
22
+ * Live inbox subscriptions. The SDK's inbox forwarder is a SINGLE global listener, so it is
23
+ * registered when the first subscription is created and unregistered when the last one goes away —
24
+ * never per subscription, or one `remove()` would tear it out from under the others.
25
+ */
26
+ private _inboxListenerCount;
20
27
  registerEventsListener(listener: (event: InAppMessageEvent) => void): EventSubscription;
28
+ /**
29
+ * Registers a listener for Visual Notification Inbox events (action taken,
30
+ * shown, opened, dismissed).
31
+ *
32
+ * While a listener is registered the host owns action navigation: the native
33
+ * SDK suppresses its default action handling and forwards the event here.
34
+ * Call `.remove()` on the returned subscription to unregister and restore the
35
+ * SDK's default behavior.
36
+ *
37
+ * @param listener - callback invoked with an {@link InboxMessageEvent}
38
+ * @returns an EventSubscription; call `.remove()` to stop listening
39
+ */
40
+ registerInboxEventListener(listener: (event: InboxMessageEvent) => void): EventSubscription;
21
41
  /**
22
42
  * Dismisses any currently displayed in-app message
23
43
  */
24
44
  dismissMessage(): void;
45
+ /**
46
+ * Overrides the color scheme used to render in-app messages.
47
+ *
48
+ * Takes effect immediately: messages already on screen — inline views included — are
49
+ * re-themed in place, so this can be called whenever the app's appearance setting
50
+ * changes rather than only before a message is shown.
51
+ *
52
+ * @param colorScheme - scheme to render with; `ZixflowColorScheme.Auto` returns to following
53
+ * the device appearance
54
+ */
55
+ setColorScheme(colorScheme: ZixflowColorScheme): void;
25
56
  /**
26
57
  * Gets the message inbox instance for managing inbox messages
27
58
  *
@@ -42,7 +73,10 @@ declare class InAppMessageEvent {
42
73
  constructor(eventType: InAppMessageEventType, messageId: string, deliveryId?: string, actionValue?: string, actionName?: string);
43
74
  }
44
75
  export type { InlineInAppMessageViewProps } from './components';
76
+ export type { NotificationInboxBellViewProps, NotificationInboxViewProps, } from './components';
77
+ export { NotificationInboxBellView, NotificationInboxView } from './components';
45
78
  export { NotificationInbox } from './notification-inbox';
46
79
  export type { InboxMessage, NotificationInboxChangeListener } from './types';
80
+ export { InboxEventType, InboxMessageEvent } from './types';
47
81
  export { ZixflowInAppMessaging, InAppMessageEvent, InlineInAppMessageView };
48
82
  //# sourceMappingURL=zixflow-inapp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zixflow-inapp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-inapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAoC,EAClC,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrD;;;;GAIG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,WAAW,EACX,MAAM,WAAW,GAAG,qBAAqB,GAAG,sBAAsB,CACnE;CAAG;AAUJ;;;;GAIG;AACH,cAAM,qBAAsB,YAAW,eAAe;IACpD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAE/C,sBAAsB,CACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAC3C,iBAAiB;IAmCpB;;OAEG;IACH,cAAc;IAId;;;;OAIG;IACH,KAAK,IAAI,iBAAiB;CAM3B;AAED;;GAEG;AACH,cAAc;AACd,cAAM,iBAAiB;IACrB,SAAS,EAAE,qBAAqB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;gBAGlB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM;CAQtB;AAGD,YAAY,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"zixflow-inapp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-inapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EACL,iBAAiB,EAEjB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAoC,EAClC,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAkB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI5D;;;;GAIG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,WAAW,EACT,MAAM,WAAW,GACjB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,8BAA8B,GAC9B,sBAAsB,CACzB;CAAG;AAUJ;;;;GAIG;AACH,cAAM,qBAAsB,YAAW,eAAe;IACpD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAE/C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,CAAK;IAEhC,sBAAsB,CACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAC3C,iBAAiB;IAmCpB;;;;;;;;;;;OAWG;IACH,0BAA0B,CACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAC3C,iBAAiB;IAuEpB;;OAEG;IACH,cAAc;IAId;;;;;;;;;OASG;IACH,cAAc,CAAC,WAAW,EAAE,kBAAkB;IAO9C;;;;OAIG;IACH,KAAK,IAAI,iBAAiB;CAM3B;AAED;;GAEG;AACH,cAAc;AACd,cAAM,iBAAiB;IACrB,SAAS,EAAE,qBAAqB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;gBAGlB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM;CAQtB;AAGD,YAAY,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACV,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { type TurboModule } from 'react-native';
2
+ import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowLiveActivities';
3
+ import type { LiveActivityPayload } from './types/live-activities';
4
+ /**
5
+ * Ensures all methods defined in codegen spec are implemented by the public module
6
+ *
7
+ * @internal
8
+ */
9
+ interface NativeLiveActivitiesSpec extends Omit<CodegenSpec, keyof TurboModule> {
10
+ }
11
+ /**
12
+ * Live Activities (iOS) / Live Notifications (Android).
13
+ *
14
+ * Start, update, and end live, updating notifications from built-in templates
15
+ * (Segments, Countdown Timer). Enable the activity types via the `liveNotifications`
16
+ * key of the SDK config passed to {@link Zixflow.initialize}.
17
+ *
18
+ * @public
19
+ */
20
+ export declare class ZixflowLiveActivities implements NativeLiveActivitiesSpec {
21
+ /**
22
+ * Report an opened Live Activity and return the URL the app should route.
23
+ *
24
+ * Zixflow tracking URLs are unwrapped to their destination after attribution is recorded.
25
+ * A tracking URL without a destination returns `null`; any other URL is returned unchanged.
26
+ * This method never rejects, so it can safely compose with Expo Router's
27
+ * `redirectSystemPath` hook. On Android it is a pass-through.
28
+ *
29
+ * Use this in exactly one URL-routing layer. Calling it more than once for the same Zixflow
30
+ * tracking URL reports more than one opened event.
31
+ *
32
+ * @param url - The incoming URL from the host's linking lifecycle.
33
+ * @returns The URL to route, or `null` when the Zixflow URL has no destination.
34
+ */
35
+ handleWidgetUrl(url: string): Promise<string | null>;
36
+ /**
37
+ * Start a built-in-template activity.
38
+ *
39
+ * @param payload - Template payload; `payload.type` selects the template.
40
+ * @returns The SDK-minted activity id, used for later `update`/`end`.
41
+ */
42
+ start(payload: LiveActivityPayload): Promise<string>;
43
+ /**
44
+ * Replace the whole content-state of a running activity.
45
+ *
46
+ * ActivityKit (iOS) replaces content-state wholesale, so pass the **full** desired
47
+ * state — not just the changed fields. Static attributes (e.g. `header`) cannot
48
+ * change after start and are ignored on iOS.
49
+ *
50
+ * @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
51
+ * @param payload - The complete desired state.
52
+ */
53
+ update(activityId: string, payload: LiveActivityPayload): Promise<void>;
54
+ /**
55
+ * End a running activity, optionally rendering a final content-state.
56
+ *
57
+ * @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
58
+ * @param payload - **iOS only.** The final content-state to render as the activity ends.
59
+ * ActivityKit keeps the last content-state on screen when none is given, so pass one to show
60
+ * a terminal state (e.g. all segments complete). Android renders its own terminal state and
61
+ * ignores this.
62
+ */
63
+ end(activityId: string, payload?: LiveActivityPayload): Promise<void>;
64
+ }
65
+ export {};
66
+ //# sourceMappingURL=zixflow-liveactivities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zixflow-liveactivities.d.ts","sourceRoot":"","sources":["../../../src/zixflow-liveactivities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAEL,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;GAIG;AACH,UAAU,wBAAyB,SAAQ,IAAI,CAC7C,WAAW,EACX,MAAM,WAAW,CAClB;CAAG;AAEJ;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,YAAW,wBAAwB;IACpE;;;;;;;;;;;;;OAaG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQ1D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIpD;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE;;;;;;;;OAQG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zixflow-reactnative",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Official Zixflow SDK for React Native. Track customers and send messages to your iOS/Android apps.",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/commonjs/index.js",
@@ -26,6 +26,7 @@
26
26
  "lib",
27
27
  "android",
28
28
  "ios",
29
+ "docs/cocoapods-deployment-target-normalization.md",
29
30
  "cpp",
30
31
  "*.podspec",
31
32
  "react-native.config.js",
@@ -44,6 +45,7 @@
44
45
  "pre-deploy": "npm run typescript",
45
46
  "typecheck": "tsc",
46
47
  "typescript": "tsc --noEmit",
48
+ "test": "jest",
47
49
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
48
50
  "lint:report": "npm run lint -- --output-file eslint_report.json --format json",
49
51
  "prepare": "bob build",
@@ -73,6 +75,7 @@
73
75
  "@evilmartians/lefthook": "^1.11.12",
74
76
  "@microsoft/api-extractor": "^7.52.8",
75
77
  "@react-native-community/cli": "^20.0.0",
78
+ "@react-native-community/cli-config-apple": "20.1.3",
76
79
  "@react-native/babel-preset": "^0.83.0",
77
80
  "@react-native/eslint-config": "^0.83.0",
78
81
  "@react-native/metro-config": "^0.86.0",
@@ -80,6 +83,7 @@
80
83
  "@types/react": "^19.2.0",
81
84
  "@typescript-eslint/eslint-plugin": "^8.31.1",
82
85
  "@typescript-eslint/parser": "^8.31.1",
86
+ "babel-jest": "^29.7.0",
83
87
  "eslint": "9.25.1",
84
88
  "eslint-config-prettier": "10.1.2",
85
89
  "eslint-plugin-ft-flow": "^3.0.11",
@@ -87,6 +91,7 @@
87
91
  "eslint-plugin-prettier": "^5.2.6",
88
92
  "eslint-plugin-react-hooks": "^5.2.0",
89
93
  "eslint-plugin-react-native": "^5.0.0",
94
+ "jest": "^29.7.0",
90
95
  "prettier": "^3.5.3",
91
96
  "react": "19.2.0",
92
97
  "react-native": "^0.83.0",
@@ -150,12 +155,16 @@
150
155
  },
151
156
  "ios": {
152
157
  "componentProvider": {
153
- "InlineMessageNative": "RCTInlineMessageNative"
158
+ "InlineMessageNative": "RCTInlineMessageNative",
159
+ "NotificationInboxBellNative": "RCTNotificationInboxBellNative",
160
+ "NotificationInboxViewNative": "RCTNotificationInboxViewNative"
154
161
  },
155
162
  "modulesProvider": {
156
163
  "NativeZixflowLogging": "RCTNativeZixflowLogging",
157
164
  "NativeZixflow": "RCTNativeZixflow",
165
+ "NativeZixflowLiveActivities": "RCTNativeLiveActivities",
158
166
  "NativeZixflowLocation": "RCTNativeZixflowLocation",
167
+ "NativeZixflowGeofence": "RCTNativeZixflowGeofence",
159
168
  "NativeZixflowMessagingInApp": "RCTNativeMessagingInApp",
160
169
  "NativeZixflowMessagingPush": "RCTNativeMessagingPush"
161
170
  }
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import NotificationInboxBellNativeComponent, {
3
+ type NativeProps,
4
+ } from '../specs/components/NotificationInboxBellNativeComponent';
5
+
6
+ /**
7
+ * Props for the {@link NotificationInboxBellView} component.
8
+ */
9
+ /** @public */
10
+ export interface NotificationInboxBellViewProps extends Omit<
11
+ NativeProps,
12
+ 'onTap'
13
+ > {
14
+ /**
15
+ * Called when the user taps the bell.
16
+ *
17
+ * Observational only — the SDK opens the inbox itself, so there is nothing the
18
+ * host has to do in response. Reports any tap inside this view's frame, which
19
+ * is the bell when the view is sized to it as recommended.
20
+ */
21
+ onTap?: () => void;
22
+ }
23
+
24
+ /**
25
+ * The Visual Notification Inbox bell (with unread badge). Tapping it opens the
26
+ * SDK's own inbox panel — the host presents nothing.
27
+ *
28
+ * Place it wherever the app's layout calls for it. Remote branding still styles
29
+ * the bell itself (colors, icon), but branding's *position* is not applied: the
30
+ * host owns placement via `style`. The bell renders nothing when the inbox has
31
+ * nothing to show, so give it a fixed size for predictable layout — at least 88
32
+ * points/dp square, since the native composition insets the 56pt bell by 16 on
33
+ * each side and a smaller box squeezes the circle onto the glyph.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <NotificationInboxBellView
38
+ * style={{ width: 88, height: 88 }}
39
+ * onTap={() => analytics.track('inbox_bell_tapped')}
40
+ * />
41
+ * ```
42
+ */
43
+ /** @public */
44
+ const NotificationInboxBellView: React.FC<NotificationInboxBellViewProps> = ({
45
+ onTap,
46
+ ...props
47
+ }) => {
48
+ const handleTap = () => {
49
+ onTap?.();
50
+ };
51
+
52
+ return <NotificationInboxBellNativeComponent {...props} onTap={handleTap} />;
53
+ };
54
+
55
+ export default NotificationInboxBellView;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import NotificationInboxViewNativeComponent, {
3
+ type NativeProps,
4
+ } from '../specs/components/NotificationInboxViewNativeComponent';
5
+
6
+ /**
7
+ * Props for the {@link NotificationInboxView} component.
8
+ */
9
+ /** @public */
10
+ export interface NotificationInboxViewProps extends NativeProps {}
11
+
12
+ /**
13
+ * The Visual Notification Inbox message list — the Jist-rendered messages —
14
+ * embeddable directly in your own screen. It fills the area you give it via
15
+ * `style` and brings no surrounding chrome (no bell, no scrim).
16
+ *
17
+ * Message actions are handled by the existing global InboxEventListener, so this
18
+ * component takes no per-message action callback.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <NotificationInboxView style={{ flex: 1 }} />
23
+ * ```
24
+ */
25
+ /** @public */
26
+ const NotificationInboxView: React.FC<NotificationInboxViewProps> = (props) => {
27
+ return <NotificationInboxViewNativeComponent {...props} />;
28
+ };
29
+
30
+ export default NotificationInboxView;
@@ -1,3 +1,9 @@
1
1
  // Export all components and types from the components directory for simplified imports
2
2
  export type { InlineInAppMessageViewProps } from './InlineInAppMessageView';
3
3
  export { default as InlineInAppMessageView } from './InlineInAppMessageView';
4
+
5
+ // Visual Notification Inbox UI components
6
+ export type { NotificationInboxBellViewProps } from './NotificationInboxBellView';
7
+ export { default as NotificationInboxBellView } from './NotificationInboxBellView';
8
+ export type { NotificationInboxViewProps } from './NotificationInboxView';
9
+ export { default as NotificationInboxView } from './NotificationInboxView';
package/src/index.ts CHANGED
@@ -4,6 +4,11 @@
4
4
  * Zixflow React Native SDK - A powerful SDK for building
5
5
  * customer engagement features in React Native applications.
6
6
  */
7
-
8
- // Export the Zixflow API
9
- export * from './zixflow';
7
+ export * from './zixflow-cdp';
8
+ export * from './zixflow-geofence';
9
+ export * from './zixflow-inapp';
10
+ export * from './zixflow-liveactivities';
11
+ export * from './zixflow-location';
12
+ export * from './zixflow-push';
13
+ export * from './components';
14
+ export * from './types';
@@ -46,7 +46,7 @@ export type NotificationInboxSpec =
46
46
  * Helper function to parse raw inbox message from native layer
47
47
  * @internal
48
48
  */
49
- function parseInboxMessage(raw: any): InboxMessage {
49
+ export function parseInboxMessage(raw: any): InboxMessage {
50
50
  return {
51
51
  queueId: raw.queueId,
52
52
  deliveryId: raw.deliveryId ?? undefined,
@@ -0,0 +1,24 @@
1
+ // React Native docs now recommend Codegen types should be imported from the react-native package
2
+ // But it breaks on Expo and older React Native versions, so we import from react-native/Libraries/Types/CodegenTypes
3
+ // for compatibility with all versions until we can fully migrate to the new import style without breaking older versions
4
+ // https://reactnative.dev/docs/strict-typescript-api#codegen-types-should-now-be-imported-from-the-react-native-package
5
+
6
+ import type { HostComponent, ViewProps } from 'react-native';
7
+ /* eslint-disable @react-native/no-deep-imports */
8
+ import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
9
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
10
+
11
+ /** Event data for inbox bell taps. Carries no payload; presence indicates a tap. */
12
+ export interface BellTapEvent {}
13
+
14
+ /** Props for the native NotificationInboxBell component. */
15
+ export interface NativeProps extends ViewProps {
16
+ /** Fired when the user taps the bell. Host should present its own inbox UI. */
17
+ onTap?: DirectEventHandler<BellTapEvent>;
18
+ }
19
+
20
+ // React Native Codegen automatically generates the native component bridge based on the NativeProps interface.
21
+ // Public view is NotificationInboxBellView in the components directory.
22
+ export default codegenNativeComponent<NativeProps>(
23
+ 'NotificationInboxBellNative'
24
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,22 @@
1
+ // React Native docs now recommend Codegen types should be imported from the react-native package
2
+ // But it breaks on Expo and older React Native versions, so we import from react-native/Libraries/Types/CodegenTypes
3
+ // for compatibility with all versions until we can fully migrate to the new import style without breaking older versions
4
+ // https://reactnative.dev/docs/strict-typescript-api#codegen-types-should-now-be-imported-from-the-react-native-package
5
+
6
+ import type { HostComponent, ViewProps } from 'react-native';
7
+ /* eslint-disable @react-native/no-deep-imports */
8
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
+
10
+ /**
11
+ * Props for the native NotificationInboxView component (the Jist-rendered message list).
12
+ * No required props; the host controls sizing via standard ViewProps style.
13
+ * Message actions are handled by the existing global InboxEventListener, so this
14
+ * component needs no per-component action callback.
15
+ */
16
+ export interface NativeProps extends ViewProps {}
17
+
18
+ // React Native Codegen automatically generates the native component bridge based on the NativeProps interface.
19
+ // Public view is NotificationInboxView in the components directory.
20
+ export default codegenNativeComponent<NativeProps>(
21
+ 'NotificationInboxViewNative'
22
+ ) as HostComponent<NativeProps>;
@@ -1,5 +1,8 @@
1
1
  import { TurboModuleRegistry, type TurboModule } from 'react-native';
2
- import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
2
+ import type {
3
+ EventEmitter,
4
+ UnsafeObject,
5
+ } from 'react-native/Libraries/Types/CodegenTypes';
3
6
 
4
7
  /**
5
8
  * Native module specification for Zixflow React Native SDK
@@ -41,6 +44,11 @@ export interface Spec extends TurboModule {
41
44
  config: NativeBridgeObject,
42
45
  args: NativeBridgeObject
43
46
  ): Promise<void>;
47
+ setDeepLinkRoutingReady(): void;
48
+ readonly onDeepLinkReceived: EventEmitter<UnsafeObject>;
49
+ registerDeepLinkHandler(): void;
50
+ unregisterDeepLinkHandler(): void;
51
+ acknowledgeDeepLink(id: string, handled: boolean): void;
44
52
  identify(params?: NativeBridgeObject): void;
45
53
  clearIdentify(): void;
46
54
  track(name: string, properties?: NativeBridgeObject): void;
@@ -0,0 +1,14 @@
1
+ import { TurboModuleRegistry, type TurboModule } from 'react-native';
2
+
3
+ /**
4
+ * Native module specification for Zixflow Geofence React Native SDK
5
+ *
6
+ * @see NativeZixflow.ts for detailed documentation on TurboModule patterns,
7
+ * Codegen compatibility, and type safety approach.
8
+ */
9
+
10
+ export interface Spec extends TurboModule {
11
+ refreshFromCurrentLocation(): void;
12
+ }
13
+
14
+ export default TurboModuleRegistry.get<Spec>('NativeZixflowGeofence');
@@ -0,0 +1,39 @@
1
+ import { TurboModuleRegistry, type TurboModule } from 'react-native';
2
+ import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
3
+
4
+ /**
5
+ * Native module specification for Zixflow Live Activities React Native SDK
6
+ *
7
+ * Live Activities (iOS) / Live Notifications (Android) let you show a live,
8
+ * updating notification driven by a built-in template (Segments, Countdown Timer)
9
+ * or by a custom type you render yourself.
10
+ *
11
+ * @see NativeZixflow.ts for detailed documentation on TurboModule patterns,
12
+ * Codegen compatibility, and type safety approach.
13
+ */
14
+
15
+ type NativeBridgeObject = UnsafeObject;
16
+
17
+ export interface Spec extends TurboModule {
18
+ /** Report a Live Activity open and return the destination URL to route. */
19
+ handleWidgetUrl(url: string): Promise<string | null>;
20
+ /** Start an activity. Resolves with the SDK-minted activity id. */
21
+ start(payload: NativeBridgeObject): Promise<string>;
22
+ /** Replace the whole content-state of a running activity. Pass the full desired state. */
23
+ update(activityId: string, payload: NativeBridgeObject): Promise<void>;
24
+ /**
25
+ * End a running activity, optionally rendering a final content-state.
26
+ *
27
+ * `payload` is iOS-only: ActivityKit keeps the last content-state on screen unless a final one
28
+ * is supplied. Android renders its own terminal state, so it ignores the payload.
29
+ */
30
+ end(activityId: string, payload?: NativeBridgeObject): Promise<void>;
31
+ }
32
+
33
+ // Registered unconditionally on both platforms — Android in ZixflowReactNativePackage, iOS via
34
+ // an ObjC bridge that is always compiled. When the Live Activities pods are absent the module is
35
+ // still present and its methods reject with `live_activity_module_unavailable`, so `getEnforcing`
36
+ // is accurate here (unlike Location, which really can be absent and uses `get`).
37
+ export default TurboModuleRegistry.getEnforcing<Spec>(
38
+ 'NativeZixflowLiveActivities'
39
+ );
@@ -14,7 +14,16 @@ import type {
14
14
  /** TurboModule interface for Zixflow In-App Messaging native operations */
15
15
  export interface Spec extends TurboModule {
16
16
  dismissMessage(): void;
17
+ // Carries the ZixflowColorScheme string value; the enum itself cannot cross Codegen.
18
+ setColorScheme(colorScheme: string): void;
17
19
  readonly onInAppEventReceived: EventEmitter<UnsafeObject>;
20
+ // Notification Inbox event listener methods.
21
+ // Registers/unregisters a native forwarder with the SDK so inbox events
22
+ // (action taken, shown, opened, dismissed) are emitted to JS. Distinct from
23
+ // onInAppEventReceived so inbox events never collide with in-app events.
24
+ registerInboxEventListener(): void;
25
+ unregisterInboxEventListener(): void;
26
+ readonly onInboxEventReceived: EventEmitter<UnsafeObject>;
18
27
  // Notification Inbox related methods
19
28
  setupInboxListener(): void;
20
29
  readonly subscribeToMessagesChanged: EventEmitter<UnsafeObject>;
@@ -25,6 +34,8 @@ export interface Spec extends TurboModule {
25
34
  trackMessageClicked(message: UnsafeObject, actionName?: string): void;
26
35
  }
27
36
 
28
- export default TurboModuleRegistry.get<Spec>(
37
+ // Registered unconditionally on both platforms, like MessagingPush and DataPipelines — not
38
+ // gated by an optional subspec/module flag the way Location and Geofence are.
39
+ export default TurboModuleRegistry.getEnforcing<Spec>(
29
40
  'NativeZixflowMessagingInApp'
30
41
  );
@@ -22,6 +22,8 @@ export interface Spec extends TurboModule {
22
22
  getPushPermissionStatus(): Promise<string>;
23
23
  }
24
24
 
25
- export default TurboModuleRegistry.get<Spec>(
25
+ // Registered unconditionally on both platforms, like MessagingInApp and DataPipelines — not
26
+ // gated by an optional subspec/module flag the way Location and Geofence are.
27
+ export default TurboModuleRegistry.getEnforcing<Spec>(
26
28
  'NativeZixflowMessagingPush'
27
29
  );
@@ -1,3 +1,6 @@
1
+ import type { ZixflowColorScheme } from './in-app';
2
+ import type { NotificationInboxAccessibilityLabels } from './inbox';
3
+ import type { LiveActivitiesConfig } from './live-activities';
1
4
  import type { PushClickBehaviorAndroid } from './push';
2
5
 
3
6
  /**
@@ -60,7 +63,21 @@ export type ZixflowConfig = {
60
63
  screenViewUse?: ScreenView;
61
64
  trackApplicationLifecycleEvents?: boolean;
62
65
  autoTrackDeviceAttributes?: boolean;
63
- inApp?: {};
66
+ inApp?: {
67
+ /**
68
+ * Color scheme used to render in-app messages. Defaults to `ZixflowColorScheme.Auto`, which
69
+ * follows the device appearance. Set it when the app has its own appearance setting that
70
+ * can disagree with the operating system.
71
+ *
72
+ * Can be changed after initialization with `Zixflow.inAppMessaging.setColorScheme`.
73
+ */
74
+ colorScheme?: ZixflowColorScheme;
75
+ /**
76
+ * Accessibility labels for the Visual Notification Inbox. Optional; an omitted label leaves
77
+ * that element unlabeled rather than falling back to English.
78
+ */
79
+ notificationInboxAccessibilityLabels?: NotificationInboxAccessibilityLabels;
80
+ };
64
81
  push?: {
65
82
  android?: {
66
83
  pushClickBehavior?: PushClickBehaviorAndroid;
@@ -69,6 +86,30 @@ export type ZixflowConfig = {
69
86
  location?: {
70
87
  trackingMode?: ZixflowLocationTrackingMode;
71
88
  };
89
+ /**
90
+ * Geofence configuration. Providing this opts the app into geofence monitoring,
91
+ * which runs automatically once enabled. Enabling geofence also enables the
92
+ * Location module, which geofence depends on.
93
+ */
94
+ geofence?: {
95
+ /**
96
+ * How the SDK acquires location fixes for geofence monitoring. Defaults to
97
+ * `AUTOMATIC` (the SDK acquires location itself on identify and app launch). Use
98
+ * `MANUAL` to drive refreshes yourself via
99
+ * `Zixflow.geofence.refreshFromCurrentLocation()`.
100
+ */
101
+ locationMode?: ZixflowGeofenceLocationMode;
102
+ };
103
+ /** iOS-only SDK configuration. Has no effect on Android. */
104
+ ios?: {
105
+ /**
106
+ * Whether geofence transitions are delivered in real time on a background cold-wake.
107
+ * When unset, defaults to on if the geofence module is enabled, off otherwise.
108
+ */
109
+ allowBackgroundDelivery?: boolean;
110
+ };
111
+ /** Live Activities (iOS) / Live Notifications (Android) configuration. */
112
+ liveNotifications?: LiveActivitiesConfig;
72
113
  };
73
114
 
74
115
  /**
@@ -118,6 +159,18 @@ export enum ZixflowLocationTrackingMode {
118
159
  OnAppStart = 'ON_APP_START',
119
160
  }
120
161
 
162
+ /**
163
+ * How the Geofence module acquires location fixes.
164
+ *
165
+ * @public
166
+ */
167
+ export enum ZixflowGeofenceLocationMode {
168
+ /** SDK acquires location itself (on identify and app launch). Default. */
169
+ Automatic = 'AUTOMATIC',
170
+ /** Host drives refreshes via `Zixflow.geofence.refreshFromCurrentLocation()`. */
171
+ Manual = 'MANUAL',
172
+ }
173
+
121
174
  /**
122
175
  * Enum to specify the type of metric for tracking
123
176
  *
@@ -27,6 +27,29 @@ export enum InAppMessageEventType {
27
27
  messageShown = 'messageShown',
28
28
  }
29
29
 
30
+ /**
31
+ * Color scheme used to render in-app messages.
32
+ *
33
+ * Selects which of the light/dark variants authored in the Zixflow editor is
34
+ * rendered. Use it when the app has its own appearance setting that can disagree with
35
+ * the operating system: `Auto` follows the device, while `Light` and `Dark` pin the
36
+ * variant regardless of it.
37
+ *
38
+ * The string values are the wire contract shared with both native SDKs, which match
39
+ * them lowercase and resolve anything unrecognized to `auto` — so they must stay
40
+ * exactly as written here even if the members are renamed.
41
+ *
42
+ * @public
43
+ */
44
+ export enum ZixflowColorScheme {
45
+ /** Follow the device's current appearance. The default when unset. */
46
+ Auto = 'auto',
47
+ /** Always render the light variant, whatever the device is set to. */
48
+ Light = 'light',
49
+ /** Always render the dark variant, whatever the device is set to. */
50
+ Dark = 'dark',
51
+ }
52
+
30
53
  /**
31
54
  * Represents an inbox message for a user.
32
55
  *