zixflow-reactnative 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +451 -0
  3. package/android/build.gradle +155 -0
  4. package/android/cio-core.gradle +12 -0
  5. package/android/consumer-rules.pro +3 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +19 -0
  8. package/android/src/main/java/io/customer/reactnative/sdk/CustomerIOReactNativePackage.kt +85 -0
  9. package/android/src/main/java/io/customer/reactnative/sdk/NativeCustomerIOModule.kt +201 -0
  10. package/android/src/main/java/io/customer/reactnative/sdk/constant/Keys.kt +20 -0
  11. package/android/src/main/java/io/customer/reactnative/sdk/extension/MapExtensions.kt +92 -0
  12. package/android/src/main/java/io/customer/reactnative/sdk/extension/ReactExtensions.kt +11 -0
  13. package/android/src/main/java/io/customer/reactnative/sdk/extension/StringExtensions.kt +3 -0
  14. package/android/src/main/java/io/customer/reactnative/sdk/extension/ViewExtensions.kt +34 -0
  15. package/android/src/main/java/io/customer/reactnative/sdk/location/NativeLocationModule.kt +66 -0
  16. package/android/src/main/java/io/customer/reactnative/sdk/logging/NativeCustomerIOLoggingModule.kt +90 -0
  17. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/InlineInAppMessageViewManager.kt +56 -0
  18. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/NativeMessagingInAppModule.kt +215 -0
  19. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/NotificationInboxExtensions.kt +23 -0
  20. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/ReactInAppEventListener.kt +77 -0
  21. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/ReactInAppPlatformDelegate.kt +37 -0
  22. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/ReactInlineInAppMessageView.kt +44 -0
  23. package/android/src/main/java/io/customer/reactnative/sdk/messaginginapp/ReactNotificationInboxChangeListener.kt +47 -0
  24. package/android/src/main/java/io/customer/reactnative/sdk/messagingpush/NativeMessagingPushModule.kt +283 -0
  25. package/android/src/main/java/io/customer/reactnative/sdk/messagingpush/PermissionStatus.kt +9 -0
  26. package/android/src/main/java/io/customer/reactnative/sdk/messagingpush/PushMessagingExtensions.kt +58 -0
  27. package/android/src/main/java/io/customer/reactnative/sdk/util/Preconditions.kt +35 -0
  28. package/android/src/main/res/values/customer_io_config.xml +13 -0
  29. package/customerio-reactnative.podspec +60 -0
  30. package/ios/CustomerioReactnative.xcodeproj/project.pbxproj +285 -0
  31. package/ios/CustomerioReactnative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  32. package/ios/CustomerioReactnative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  33. package/ios/wrappers/CustomerioReactnative-Bridging-Header.h +2 -0
  34. package/ios/wrappers/NativeCustomerIO.mm +100 -0
  35. package/ios/wrappers/NativeCustomerIO.swift +162 -0
  36. package/ios/wrappers/inapp/InboxMessage+Conversion.swift +22 -0
  37. package/ios/wrappers/inapp/NativeMessagingInApp.mm +122 -0
  38. package/ios/wrappers/inapp/NativeMessagingInApp.swift +214 -0
  39. package/ios/wrappers/inapp/ReactInAppEventListener.swift +74 -0
  40. package/ios/wrappers/inapp/inline/InlineInAppMessageStateEvent.swift +23 -0
  41. package/ios/wrappers/inapp/inline/RCTInlineMessageNative.h +18 -0
  42. package/ios/wrappers/inapp/inline/RCTInlineMessageNative.mm +168 -0
  43. package/ios/wrappers/inapp/inline/ReactInlineMessageView.h +42 -0
  44. package/ios/wrappers/inapp/inline/ReactInlineMessageView.swift +124 -0
  45. package/ios/wrappers/location/NativeLocation.mm +52 -0
  46. package/ios/wrappers/location/NativeLocation.swift +37 -0
  47. package/ios/wrappers/logging/NativeCustomerIOLogging.mm +81 -0
  48. package/ios/wrappers/logging/NativeCustomerIOLogging.swift +62 -0
  49. package/ios/wrappers/push/NativeMessagingPush.mm +87 -0
  50. package/ios/wrappers/push/NativeMessagingPush.swift +119 -0
  51. package/ios/wrappers/utils/CioConfigUtils.swift +63 -0
  52. package/ios/wrappers/utils/CioConstants.swift +25 -0
  53. package/ios/wrappers/utils/Preconditions.swift +20 -0
  54. package/ios/wrappers/utils/RCTCustomerIOUtils.h +19 -0
  55. package/lib/commonjs/cio-params.js +2 -0
  56. package/lib/commonjs/cio-params.js.map +1 -0
  57. package/lib/commonjs/components/InlineInAppMessageView.js +146 -0
  58. package/lib/commonjs/components/InlineInAppMessageView.js.map +1 -0
  59. package/lib/commonjs/components/index.js +14 -0
  60. package/lib/commonjs/components/index.js.map +1 -0
  61. package/lib/commonjs/customerio-cdp.js +163 -0
  62. package/lib/commonjs/customerio-cdp.js.map +1 -0
  63. package/lib/commonjs/customerio-inapp.js +107 -0
  64. package/lib/commonjs/customerio-inapp.js.map +1 -0
  65. package/lib/commonjs/customerio-location.js +53 -0
  66. package/lib/commonjs/customerio-location.js.map +1 -0
  67. package/lib/commonjs/customerio-push.js +115 -0
  68. package/lib/commonjs/customerio-push.js.map +1 -0
  69. package/lib/commonjs/index.js +17 -0
  70. package/lib/commonjs/index.js.map +1 -0
  71. package/lib/commonjs/native-logger-listener.js +84 -0
  72. package/lib/commonjs/native-logger-listener.js.map +1 -0
  73. package/lib/commonjs/notification-inbox.js +132 -0
  74. package/lib/commonjs/notification-inbox.js.map +1 -0
  75. package/lib/commonjs/package.json +1 -0
  76. package/lib/commonjs/postInstall.js +13 -0
  77. package/lib/commonjs/postInstall.js.map +1 -0
  78. package/lib/commonjs/specs/components/InlineMessageNativeComponent.ts +59 -0
  79. package/lib/commonjs/specs/modules/NativeCustomerIO.js +40 -0
  80. package/lib/commonjs/specs/modules/NativeCustomerIO.js.map +1 -0
  81. package/lib/commonjs/specs/modules/NativeCustomerIOLocation.js +15 -0
  82. package/lib/commonjs/specs/modules/NativeCustomerIOLocation.js.map +1 -0
  83. package/lib/commonjs/specs/modules/NativeCustomerIOLogging.js +19 -0
  84. package/lib/commonjs/specs/modules/NativeCustomerIOLogging.js.map +1 -0
  85. package/lib/commonjs/specs/modules/NativeCustomerIOMessagingInApp.js +16 -0
  86. package/lib/commonjs/specs/modules/NativeCustomerIOMessagingInApp.js.map +1 -0
  87. package/lib/commonjs/specs/modules/NativeCustomerIOMessagingPush.js +15 -0
  88. package/lib/commonjs/specs/modules/NativeCustomerIOMessagingPush.js.map +1 -0
  89. package/lib/commonjs/types/data-pipelines.js +123 -0
  90. package/lib/commonjs/types/data-pipelines.js.map +1 -0
  91. package/lib/commonjs/types/in-app.js +43 -0
  92. package/lib/commonjs/types/in-app.js.map +1 -0
  93. package/lib/commonjs/types/index.js +39 -0
  94. package/lib/commonjs/types/index.js.map +1 -0
  95. package/lib/commonjs/types/internal.js +2 -0
  96. package/lib/commonjs/types/internal.js.map +1 -0
  97. package/lib/commonjs/types/push.js +49 -0
  98. package/lib/commonjs/types/push.js.map +1 -0
  99. package/lib/commonjs/utils/native-bridge.js +31 -0
  100. package/lib/commonjs/utils/native-bridge.js.map +1 -0
  101. package/lib/commonjs/utils/param-validation.js +136 -0
  102. package/lib/commonjs/utils/param-validation.js.map +1 -0
  103. package/lib/commonjs/zixflow.js +71 -0
  104. package/lib/commonjs/zixflow.js.map +1 -0
  105. package/lib/module/cio-params.js +2 -0
  106. package/lib/module/cio-params.js.map +1 -0
  107. package/lib/module/components/InlineInAppMessageView.js +141 -0
  108. package/lib/module/components/InlineInAppMessageView.js.map +1 -0
  109. package/lib/module/components/index.js +6 -0
  110. package/lib/module/components/index.js.map +1 -0
  111. package/lib/module/customerio-cdp.js +157 -0
  112. package/lib/module/customerio-cdp.js.map +1 -0
  113. package/lib/module/customerio-inapp.js +92 -0
  114. package/lib/module/customerio-inapp.js.map +1 -0
  115. package/lib/module/customerio-location.js +48 -0
  116. package/lib/module/customerio-location.js.map +1 -0
  117. package/lib/module/customerio-push.js +111 -0
  118. package/lib/module/customerio-push.js.map +1 -0
  119. package/lib/module/index.js +12 -0
  120. package/lib/module/index.js.map +1 -0
  121. package/lib/module/native-logger-listener.js +79 -0
  122. package/lib/module/native-logger-listener.js.map +1 -0
  123. package/lib/module/notification-inbox.js +127 -0
  124. package/lib/module/notification-inbox.js.map +1 -0
  125. package/lib/module/package.json +1 -0
  126. package/lib/module/postInstall.js +13 -0
  127. package/lib/module/postInstall.js.map +1 -0
  128. package/lib/module/specs/components/InlineMessageNativeComponent.ts +59 -0
  129. package/lib/module/specs/modules/NativeCustomerIO.js +41 -0
  130. package/lib/module/specs/modules/NativeCustomerIO.js.map +1 -0
  131. package/lib/module/specs/modules/NativeCustomerIOLocation.js +13 -0
  132. package/lib/module/specs/modules/NativeCustomerIOLocation.js.map +1 -0
  133. package/lib/module/specs/modules/NativeCustomerIOLogging.js +18 -0
  134. package/lib/module/specs/modules/NativeCustomerIOLogging.js.map +1 -0
  135. package/lib/module/specs/modules/NativeCustomerIOMessagingInApp.js +15 -0
  136. package/lib/module/specs/modules/NativeCustomerIOMessagingInApp.js.map +1 -0
  137. package/lib/module/specs/modules/NativeCustomerIOMessagingPush.js +13 -0
  138. package/lib/module/specs/modules/NativeCustomerIOMessagingPush.js.map +1 -0
  139. package/lib/module/types/data-pipelines.js +126 -0
  140. package/lib/module/types/data-pipelines.js.map +1 -0
  141. package/lib/module/types/in-app.js +42 -0
  142. package/lib/module/types/in-app.js.map +1 -0
  143. package/lib/module/types/index.js +6 -0
  144. package/lib/module/types/index.js.map +1 -0
  145. package/lib/module/types/internal.js +2 -0
  146. package/lib/module/types/internal.js.map +1 -0
  147. package/lib/module/types/push.js +47 -0
  148. package/lib/module/types/push.js.map +1 -0
  149. package/lib/module/utils/native-bridge.js +25 -0
  150. package/lib/module/utils/native-bridge.js.map +1 -0
  151. package/lib/module/utils/param-validation.js +132 -0
  152. package/lib/module/utils/param-validation.js.map +1 -0
  153. package/lib/module/zixflow.js +23 -0
  154. package/lib/module/zixflow.js.map +1 -0
  155. package/lib/typescript/commonjs/cio-params.d.ts +5 -0
  156. package/lib/typescript/commonjs/cio-params.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/components/InlineInAppMessageView.d.ts +41 -0
  158. package/lib/typescript/commonjs/components/InlineInAppMessageView.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/components/index.d.ts +3 -0
  160. package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/customerio-cdp.d.ts +40 -0
  162. package/lib/typescript/commonjs/customerio-cdp.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/customerio-inapp.d.ts +48 -0
  164. package/lib/typescript/commonjs/customerio-inapp.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/customerio-location.d.ts +31 -0
  166. package/lib/typescript/commonjs/customerio-location.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/customerio-push.d.ts +56 -0
  168. package/lib/typescript/commonjs/customerio-push.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/index.d.ts +8 -0
  170. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/native-logger-listener.d.ts +8 -0
  172. package/lib/typescript/commonjs/native-logger-listener.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/notification-inbox.d.ts +57 -0
  174. package/lib/typescript/commonjs/notification-inbox.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/package.json +1 -0
  176. package/lib/typescript/commonjs/postInstall.d.ts +2 -0
  177. package/lib/typescript/commonjs/postInstall.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/specs/components/InlineMessageNativeComponent.d.ts +40 -0
  179. package/lib/typescript/commonjs/specs/components/InlineMessageNativeComponent.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/specs/modules/NativeCustomerIO.d.ts +46 -0
  181. package/lib/typescript/commonjs/specs/modules/NativeCustomerIO.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOLocation.d.ts +14 -0
  183. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOLocation.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOLogging.d.ts +18 -0
  185. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOLogging.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOMessagingInApp.d.ts +23 -0
  187. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOMessagingInApp.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOMessagingPush.d.ts +20 -0
  189. package/lib/typescript/commonjs/specs/modules/NativeCustomerIOMessagingPush.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/types/data-pipelines.d.ts +143 -0
  191. package/lib/typescript/commonjs/types/data-pipelines.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/types/in-app.d.ts +67 -0
  193. package/lib/typescript/commonjs/types/in-app.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/types/index.d.ts +4 -0
  195. package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/types/internal.d.ts +20 -0
  197. package/lib/typescript/commonjs/types/internal.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/types/push.d.ts +49 -0
  199. package/lib/typescript/commonjs/types/push.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/utils/native-bridge.d.ts +9 -0
  201. package/lib/typescript/commonjs/utils/native-bridge.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/utils/param-validation.d.ts +44 -0
  203. package/lib/typescript/commonjs/utils/param-validation.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/zixflow.d.ts +14 -0
  205. package/lib/typescript/commonjs/zixflow.d.ts.map +1 -0
  206. package/lib/typescript/module/cio-params.d.ts +5 -0
  207. package/lib/typescript/module/cio-params.d.ts.map +1 -0
  208. package/lib/typescript/module/components/InlineInAppMessageView.d.ts +41 -0
  209. package/lib/typescript/module/components/InlineInAppMessageView.d.ts.map +1 -0
  210. package/lib/typescript/module/components/index.d.ts +3 -0
  211. package/lib/typescript/module/components/index.d.ts.map +1 -0
  212. package/lib/typescript/module/customerio-cdp.d.ts +40 -0
  213. package/lib/typescript/module/customerio-cdp.d.ts.map +1 -0
  214. package/lib/typescript/module/customerio-inapp.d.ts +48 -0
  215. package/lib/typescript/module/customerio-inapp.d.ts.map +1 -0
  216. package/lib/typescript/module/customerio-location.d.ts +31 -0
  217. package/lib/typescript/module/customerio-location.d.ts.map +1 -0
  218. package/lib/typescript/module/customerio-push.d.ts +56 -0
  219. package/lib/typescript/module/customerio-push.d.ts.map +1 -0
  220. package/lib/typescript/module/index.d.ts +8 -0
  221. package/lib/typescript/module/index.d.ts.map +1 -0
  222. package/lib/typescript/module/native-logger-listener.d.ts +8 -0
  223. package/lib/typescript/module/native-logger-listener.d.ts.map +1 -0
  224. package/lib/typescript/module/notification-inbox.d.ts +57 -0
  225. package/lib/typescript/module/notification-inbox.d.ts.map +1 -0
  226. package/lib/typescript/module/package.json +1 -0
  227. package/lib/typescript/module/postInstall.d.ts +2 -0
  228. package/lib/typescript/module/postInstall.d.ts.map +1 -0
  229. package/lib/typescript/module/specs/components/InlineMessageNativeComponent.d.ts +40 -0
  230. package/lib/typescript/module/specs/components/InlineMessageNativeComponent.d.ts.map +1 -0
  231. package/lib/typescript/module/specs/modules/NativeCustomerIO.d.ts +46 -0
  232. package/lib/typescript/module/specs/modules/NativeCustomerIO.d.ts.map +1 -0
  233. package/lib/typescript/module/specs/modules/NativeCustomerIOLocation.d.ts +14 -0
  234. package/lib/typescript/module/specs/modules/NativeCustomerIOLocation.d.ts.map +1 -0
  235. package/lib/typescript/module/specs/modules/NativeCustomerIOLogging.d.ts +18 -0
  236. package/lib/typescript/module/specs/modules/NativeCustomerIOLogging.d.ts.map +1 -0
  237. package/lib/typescript/module/specs/modules/NativeCustomerIOMessagingInApp.d.ts +23 -0
  238. package/lib/typescript/module/specs/modules/NativeCustomerIOMessagingInApp.d.ts.map +1 -0
  239. package/lib/typescript/module/specs/modules/NativeCustomerIOMessagingPush.d.ts +20 -0
  240. package/lib/typescript/module/specs/modules/NativeCustomerIOMessagingPush.d.ts.map +1 -0
  241. package/lib/typescript/module/types/data-pipelines.d.ts +143 -0
  242. package/lib/typescript/module/types/data-pipelines.d.ts.map +1 -0
  243. package/lib/typescript/module/types/in-app.d.ts +67 -0
  244. package/lib/typescript/module/types/in-app.d.ts.map +1 -0
  245. package/lib/typescript/module/types/index.d.ts +4 -0
  246. package/lib/typescript/module/types/index.d.ts.map +1 -0
  247. package/lib/typescript/module/types/internal.d.ts +20 -0
  248. package/lib/typescript/module/types/internal.d.ts.map +1 -0
  249. package/lib/typescript/module/types/push.d.ts +49 -0
  250. package/lib/typescript/module/types/push.d.ts.map +1 -0
  251. package/lib/typescript/module/utils/native-bridge.d.ts +9 -0
  252. package/lib/typescript/module/utils/native-bridge.d.ts.map +1 -0
  253. package/lib/typescript/module/utils/param-validation.d.ts +44 -0
  254. package/lib/typescript/module/utils/param-validation.d.ts.map +1 -0
  255. package/lib/typescript/module/zixflow.d.ts +14 -0
  256. package/lib/typescript/module/zixflow.d.ts.map +1 -0
  257. package/package.json +165 -0
  258. package/src/cio-params.ts +4 -0
  259. package/src/components/InlineInAppMessageView.tsx +187 -0
  260. package/src/components/index.ts +3 -0
  261. package/src/customerio-cdp.ts +190 -0
  262. package/src/customerio-inapp.ts +127 -0
  263. package/src/customerio-location.ts +56 -0
  264. package/src/customerio-push.ts +127 -0
  265. package/src/index.ts +9 -0
  266. package/src/native-logger-listener.ts +84 -0
  267. package/src/notification-inbox.ts +154 -0
  268. package/src/postInstall.js +10 -0
  269. package/src/specs/components/InlineMessageNativeComponent.ts +59 -0
  270. package/src/specs/modules/NativeCustomerIO.ts +55 -0
  271. package/src/specs/modules/NativeCustomerIOLocation.ts +15 -0
  272. package/src/specs/modules/NativeCustomerIOLogging.ts +24 -0
  273. package/src/specs/modules/NativeCustomerIOMessagingInApp.ts +30 -0
  274. package/src/specs/modules/NativeCustomerIOMessagingPush.ts +27 -0
  275. package/src/types/data-pipelines.ts +150 -0
  276. package/src/types/in-app.ts +69 -0
  277. package/src/types/index.ts +3 -0
  278. package/src/types/internal.ts +20 -0
  279. package/src/types/push.ts +50 -0
  280. package/src/utils/native-bridge.ts +30 -0
  281. package/src/utils/param-validation.ts +178 -0
  282. package/src/zixflow.ts +24 -0
  283. package/zixflow-reactnative-richpush.podspec +42 -0
  284. package/zixflow-reactnative.podspec +66 -0
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Android-specific behavior when a push notification is clicked.
5
+ *
6
+ * Controls how the Android system handles activity lifecycle
7
+ * when users tap on push notifications.
8
+ *
9
+ * @public
10
+ */
11
+ export let PushClickBehaviorAndroid = /*#__PURE__*/function (PushClickBehaviorAndroid) {
12
+ /** Clear the activity task stack and start fresh */
13
+ PushClickBehaviorAndroid["ResetTaskStack"] = "RESET_TASK_STACK";
14
+ /** Prevent the current activity from restarting */
15
+ PushClickBehaviorAndroid["ActivityPreventRestart"] = "ACTIVITY_PREVENT_RESTART";
16
+ /** Use default behavior without special flags */
17
+ PushClickBehaviorAndroid["ActivityNoFlags"] = "ACTIVITY_NO_FLAGS";
18
+ return PushClickBehaviorAndroid;
19
+ }({});
20
+
21
+ /**
22
+ * Push notification permission request options.
23
+ *
24
+ * Configure which types of notifications to request permission for
25
+ * on different platforms.
26
+ *
27
+ * @public
28
+ */
29
+
30
+ /**
31
+ * Current push notification permission status.
32
+ *
33
+ * Indicates whether the user has granted, denied, or not yet
34
+ * responded to push notification permission requests.
35
+ *
36
+ * @public
37
+ */
38
+ export let CioPushPermissionStatus = /*#__PURE__*/function (CioPushPermissionStatus) {
39
+ /** User has granted push notification permissions */
40
+ CioPushPermissionStatus["Granted"] = "GRANTED";
41
+ /** User has denied push notification permissions */
42
+ CioPushPermissionStatus["Denied"] = "DENIED";
43
+ /** User may not yet have been asked for permissions and permission status is unknown */
44
+ CioPushPermissionStatus["NotDetermined"] = "NOTDETERMINED";
45
+ return CioPushPermissionStatus;
46
+ }({});
47
+ //# sourceMappingURL=push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PushClickBehaviorAndroid","CioPushPermissionStatus"],"sourceRoot":"../../../src","sources":["types/push.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,wBAAwB,0BAAxBA,wBAAwB;EAClC;EADUA,wBAAwB;EAGlC;EAHUA,wBAAwB;EAKlC;EALUA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AASpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EACjC;EADUA,uBAAuB;EAGjC;EAHUA,uBAAuB;EAKjC;EALUA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ const LINKING_ERROR = `The package 'customerio-reactnative' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
5
+ ios: "- You have run 'pod install'\n",
6
+ default: ''
7
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
8
+
9
+ /**
10
+ * Ensures the native module is available, otherwise throws a helpful linking error.
11
+ */
12
+ export function ensureNativeModule(nativeModule) {
13
+ if (!nativeModule) {
14
+ throw new Error(LINKING_ERROR);
15
+ }
16
+ return nativeModule;
17
+ }
18
+
19
+ /**
20
+ * Calls a method on a native module with type-safe access.
21
+ */
22
+ export const callNativeModule = (nativeModule, fn) => {
23
+ return fn(nativeModule);
24
+ };
25
+ //# sourceMappingURL=native-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","LINKING_ERROR","select","ios","default","ensureNativeModule","nativeModule","Error","callNativeModule","fn"],"sourceRoot":"../../../src","sources":["utils/native-bridge.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,aAAa,GACjB,iFAAiF,GACjFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;;AAE/C;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,YAAiC,EACnB;EACd,IAAI,CAACA,YAAY,EAAE;IACjB,MAAM,IAAIC,KAAK,CAACN,aAAa,CAAC;EAChC;EAEA,OAAOK,YAAY;AACrB;;AAEA;AACA;AACA;AACA,OAAO,MAAME,gBAAgB,GAAGA,CAC9BF,YAAkB,EAClBG,EAA4B,KACjB;EACX,OAAOA,EAAE,CAACH,YAAY,CAAC;AACzB,CAAC","ignoreList":[]}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ // Argument validation utilities for SDK internal use
4
+ // Ensures input safety and throws clear errors when validation fails
5
+
6
+ /**
7
+ * Builds a standardized error message for validation failures.
8
+ */
9
+ function buildErrorMessage(usage, fieldName, error) {
10
+ const prefix = usage ? `${usage} ` : '';
11
+ return `${prefix}"${fieldName}" ${error}.`;
12
+ }
13
+
14
+ /**
15
+ * Returns true if the value is undefined or null.
16
+ */
17
+ function isUndefined(value) {
18
+ return value === undefined || value === null;
19
+ }
20
+
21
+ /**
22
+ * Throws an error if the condition is true.
23
+ * Use this to fail validation checks with cleaner syntax.
24
+ */
25
+ function failIf(condition, message) {
26
+ if (__DEV__ && condition) {
27
+ throw new Error(`[CustomerIO] ${message()}`);
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Validates that a value is defined (not undefined or null).
33
+ * Useful for checking required fields.
34
+ */
35
+ function failIfUndefined(value, fieldName, usage) {
36
+ failIf(isUndefined(value), () => buildErrorMessage(usage, fieldName, 'is required'));
37
+ }
38
+
39
+ /**
40
+ * Validates that a value is a string.
41
+ * Throws if the value is not a string, or if it's empty (unless allowEmpty is true).
42
+ */
43
+ function validateString(value, fieldName, options = {
44
+ allowEmpty: true
45
+ }) {
46
+ const {
47
+ allowEmpty,
48
+ usage,
49
+ optional
50
+ } = options;
51
+ if (optional && isUndefined(value)) {
52
+ return; // Skip validation for optional fields
53
+ }
54
+ const prefix = usage ? `${usage} ` : '';
55
+ failIfUndefined(value, fieldName, usage);
56
+ failIf(typeof value !== 'string', () => `${prefix}"${fieldName}" must be a string.`);
57
+ // Since typeof value is already checked to be a string,
58
+ // we can safely cast it here without additional checks.
59
+ const typedValue = value;
60
+ failIf(!allowEmpty && typedValue.trim() === '', () => `${prefix}"${fieldName}" must be a non-empty string.`);
61
+ }
62
+
63
+ /**
64
+ * Validates that a value is a plain object (not null or an array).
65
+ */
66
+ function validateRecord(value, fieldName, options = {}) {
67
+ const {
68
+ usage,
69
+ expectedType,
70
+ optional
71
+ } = options;
72
+ if (optional && isUndefined(value)) {
73
+ return; // Skip validation for optional fields
74
+ }
75
+ const prefix = usage ? `${usage} ` : '';
76
+ const typeName = expectedType ?? 'plain';
77
+ failIfUndefined(value, fieldName, usage);
78
+ failIf(typeof value !== 'object' || Array.isArray(value), () => `${prefix}"${fieldName}" must be a valid ${typeName} object.`);
79
+ }
80
+
81
+ /**
82
+ * Validates that a value is a valid CustomAttributes object.
83
+ * Automatically converts Map objects to plain objects for compatibility.
84
+ * This is a specialized version of validateRecord optimized for attribute validation.
85
+ */
86
+ function validateAttributes(value, fieldName, options = {}) {
87
+ const exists = !isUndefined(value);
88
+ if (options.optional && !exists) {
89
+ return; // Skip validation for optional fields
90
+ }
91
+ let attributes;
92
+ if (exists && value instanceof Map) {
93
+ // Convert Map to plain object for native serialization
94
+ attributes = Object.fromEntries(value);
95
+ } else {
96
+ attributes = value;
97
+ }
98
+ validateRecord(attributes, fieldName, options);
99
+ return attributes;
100
+ }
101
+
102
+ /**
103
+ * Validates that the given value is a valid CioConfig object.
104
+ * Throws if required fields are missing or incorrectly typed.
105
+ */
106
+ function validateConfig(value) {
107
+ const fieldName = 'config';
108
+ const usage = 'SDK';
109
+ validateRecord(value, fieldName, {
110
+ expectedType: 'CioConfig',
111
+ usage: usage
112
+ });
113
+ const obj = value;
114
+ validateString(obj.cdpApiKey, `${fieldName}.cdpApiKey`, {
115
+ allowEmpty: false,
116
+ usage: usage
117
+ });
118
+ }
119
+
120
+ // For type safety, we define a ConfigValidator type that asserts the value is a CioConfig
121
+ // This allows us to use it in the assert object without needing to redefine the function signature
122
+
123
+ export const assert = {
124
+ string: validateString,
125
+ record: validateRecord,
126
+ attributes: validateAttributes,
127
+ config: validateConfig
128
+ };
129
+ export const validate = {
130
+ isUndefined: isUndefined
131
+ };
132
+ //# sourceMappingURL=param-validation.js.map
@@ -0,0 +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","cdpApiKey","assert","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,gBAAgBF,OAAO,CAAC,CAAC,EAAE,CAAC;EAC9C;AACF;;AAEA;AACA;AACA;AACA;AACA,SAASG,eAAeA,CACtB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MAAM,EAAEhB,cAAc;EACtBO,UAAU,EAAEF,kBAAkB;EAC9BY,MAAM,EAAEN;AACV,CAAC;AAED,OAAO,MAAMO,QAAQ,GAAG;EACtBjC,WAAW,EAAEA;AACf,CAAC","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Zixflow SDK - Main entry point
5
+ *
6
+ * This provides the Zixflow-branded API that wraps the underlying Customer.io implementation.
7
+ */
8
+
9
+ import { CustomerIO } from "./customerio-cdp.js";
10
+ import { CustomerIOInAppMessaging } from "./customerio-inapp.js";
11
+ import { CustomerIOLocation } from "./customerio-location.js";
12
+ import { CustomerIOPushMessaging } from "./customerio-push.js";
13
+
14
+ // Re-export the CustomerIO class as Zixflow for branding
15
+ export const Zixflow = CustomerIO;
16
+
17
+ // Re-export all types and utilities
18
+ export * from "./types/index.js";
19
+ export * from "./notification-inbox.js";
20
+
21
+ // Export sub-modules with their original names (they work with the main Zixflow class)
22
+ export { CustomerIOInAppMessaging, CustomerIOLocation, CustomerIOPushMessaging };
23
+ //# sourceMappingURL=zixflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CustomerIO","CustomerIOInAppMessaging","CustomerIOLocation","CustomerIOPushMessaging","Zixflow"],"sourceRoot":"../../src","sources":["zixflow.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,qBAAkB;AAC7C,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,uBAAuB,QAAQ,sBAAmB;;AAE3D;AACA,OAAO,MAAMC,OAAO,GAAGJ,UAAU;;AAEjC;AACA,cAAc,kBAAS;AACvB,cAAc,yBAAsB;;AAEpC;AACA,SACEC,wBAAwB,EACxBC,kBAAkB,EAClBC,uBAAuB","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export interface IdentifyParams {
2
+ userId?: string;
3
+ traits?: Record<string, any>;
4
+ }
5
+ //# sourceMappingURL=cio-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cio-params.d.ts","sourceRoot":"","sources":["../../../src/cio-params.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B"}
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { type ActivityIndicatorProps, type ViewStyle } from 'react-native';
3
+ import { type NativeProps } from '../specs/components/InlineMessageNativeComponent';
4
+ import type { InAppMessage } from '../types';
5
+ /**
6
+ * Props for the InlineInAppMessageView component.
7
+ */
8
+ /** @public */
9
+ export interface InlineInAppMessageViewProps extends Omit<NativeProps, 'onSizeChange' | 'onStateChange' | 'onActionClick'> {
10
+ /** Custom loading component to display while message is loading */
11
+ loadingComponent?: React.ReactNode;
12
+ /** Props for the default ActivityIndicator with optional minimum height */
13
+ loadingIndicatorProps?: ActivityIndicatorProps & {
14
+ /** Minimum height for the loading state (default: 36) */
15
+ minimumHeight?: number;
16
+ };
17
+ /** Custom styles for the loading container */
18
+ loadingContainerStyle?: ViewStyle;
19
+ /** Callback triggered when a user clicks an action button in the inline message */
20
+ onActionClick?: (message: InAppMessage, actionValue: string, actionName: string) => void;
21
+ }
22
+ /**
23
+ * A React Native component for displaying inline in-app messages with animated sizing
24
+ * and customizable loading states.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <InlineInAppMessageView
29
+ * elementId="my-message"
30
+ * loadingIndicatorProps={{ minimumHeight: 50 }}
31
+ * style={{ width: '100%' }}
32
+ * onActionClick={(message, actionValue, actionName) => {
33
+ * console.log('Action clicked:', { message, actionValue, actionName });
34
+ * }}
35
+ * />
36
+ * ```
37
+ */
38
+ /** @public */
39
+ declare const InlineInAppMessageView: React.FC<InlineInAppMessageViewProps>;
40
+ export default InlineInAppMessageView;
41
+ //# sourceMappingURL=InlineInAppMessageView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineInAppMessageView.d.ts","sourceRoot":"","sources":["../../../../src/components/InlineInAppMessageView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAEL,KAAK,sBAAsB,EAI3B,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAqC,EAGnC,KAAK,WAAW,EAGjB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;GAEG;AACH,cAAc;AACd,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,WAAW,EACX,cAAc,GAAG,eAAe,GAAG,eAAe,CACnD;IACC,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,2EAA2E;IAC3E,qBAAqB,CAAC,EAAE,sBAAsB,GAAG;QAC/C,yDAAyD;QACzD,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,mFAAmF;IACnF,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;CACX;AAED;;;;;;;;;;;;;;;GAeG;AACH,cAAc;AACd,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAgHjE,CAAC;AAcF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { InlineInAppMessageViewProps } from './InlineInAppMessageView';
2
+ export { default as InlineInAppMessageView } from './InlineInAppMessageView';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { CustomerIOInAppMessaging } from './customerio-inapp';
2
+ import { CustomerIOLocation } from './customerio-location';
3
+ import { CustomerIOPushMessaging } from './customerio-push';
4
+ import { MetricEvent, type CioConfig, type IdentifyParams } from './types';
5
+ /** @public */
6
+ export declare class CustomerIO {
7
+ /** Initialize the CustomerIO SDK with given configuration. */
8
+ static readonly initialize: (config: CioConfig) => Promise<void>;
9
+ /** Identify a user to start tracking their activity. Requires userId, traits, or both. */
10
+ static readonly identify: ({ userId, traits, }?: IdentifyParams) => Promise<any>;
11
+ /** Clear current user identification and stop tracking. */
12
+ static readonly clearIdentify: () => Promise<any>;
13
+ /** Track an event with optional properties. */
14
+ static readonly track: (name: string, properties?: Record<string, any>) => Promise<any>;
15
+ /** Track a screen view event with optional properties. */
16
+ static readonly screen: (title: string, properties?: Record<string, any>) => Promise<any>;
17
+ /** Set or update attributes for the currently identified user profile. */
18
+ static readonly setProfileAttributes: (attributes: Record<string, any>) => Promise<any>;
19
+ /** Set attributes for the current device. */
20
+ static readonly setDeviceAttributes: (attributes: Record<string, any>) => Promise<any>;
21
+ /** Register a device token for push notifications. */
22
+ static readonly registerDeviceToken: (token: string) => Promise<void>;
23
+ /** Remove the current device token to stop receiving push notifications. */
24
+ static readonly deleteDeviceToken: () => Promise<void>;
25
+ /** Track push notification metrics for delivered, opened, or converted events. */
26
+ static readonly trackMetric: ({ deliveryID, deviceToken, event, }: {
27
+ deliveryID: string;
28
+ deviceToken: string;
29
+ event: MetricEvent;
30
+ }) => Promise<void>;
31
+ /**
32
+ * Check if the CustomerIO SDK has been initialized.
33
+ * @deprecated This method will be removed in a future version. If you need this functionality, please contact us.
34
+ */
35
+ static readonly isInitialized: () => boolean;
36
+ static readonly inAppMessaging: CustomerIOInAppMessaging;
37
+ static readonly location: CustomerIOLocation;
38
+ static readonly pushMessaging: CustomerIOPushMessaging;
39
+ }
40
+ //# sourceMappingURL=customerio-cdp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customerio-cdp.d.ts","sourceRoot":"","sources":["../../../src/customerio-cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAM5D,OAAO,EAEL,WAAW,EACX,KAAK,SAAS,EAEd,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAkBjB,cAAc;AACd,qBAAa,UAAU;IACrB,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAU,QAAQ,SAAS,mBAmBnD;IAEF,0FAA0F;IAC1F,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAU,sBAG/B,cAAmB,kBAkBpB;IAEF,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAE3B;IAEF,+CAA+C;IAC/C,MAAM,CAAC,QAAQ,CAAC,KAAK,GACnB,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0DAA0D;IAC1D,MAAM,CAAC,QAAQ,CAAC,MAAM,GACpB,OAAO,MAAM,EACb,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,oBAAoB,GAClC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,6CAA6C;IAC7C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GACjC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,sDAAsD;IACtD,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GAAU,OAAO,MAAM,mBAIxD;IAEF,4EAA4E;IAC5E,MAAM,CAAC,QAAQ,CAAC,iBAAiB,sBAE/B;IAEF,kFAAkF;IAClF,MAAM,CAAC,QAAQ,CAAC,WAAW,GAAU,qCAIlC;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,WAAW,CAAC;KACpB,mBAQC;IAEF;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,aAAa,gBAAsB;IAEnD,MAAM,CAAC,QAAQ,CAAC,cAAc,2BAAkC;IAChE,MAAM,CAAC,QAAQ,CAAC,QAAQ,qBAA4B;IACpD,MAAM,CAAC,QAAQ,CAAC,aAAa,0BAAiC;CAC/D"}
@@ -0,0 +1,48 @@
1
+ import { type EventSubscription, type TurboModule } from 'react-native';
2
+ import { InlineInAppMessageView } from './components';
3
+ import { NotificationInbox, type NotificationInboxSpec } from './notification-inbox';
4
+ import { type Spec as CodegenSpec } from './specs/modules/NativeCustomerIOMessagingInApp';
5
+ import type { InAppMessageEventType } from './types';
6
+ /**
7
+ * Ensures all methods defined in codegen spec are implemented by the public module
8
+ *
9
+ * @internal
10
+ */
11
+ interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | NotificationInboxSpec | 'onInAppEventReceived'> {
12
+ }
13
+ /**
14
+ * Helper class so that registering event listeners is easier for customers.
15
+ *
16
+ * @public
17
+ */
18
+ declare class CustomerIOInAppMessaging implements NativeInAppSpec {
19
+ private _notificationInbox?;
20
+ registerEventsListener(listener: (event: InAppMessageEvent) => void): EventSubscription;
21
+ /**
22
+ * Dismisses any currently displayed in-app message
23
+ */
24
+ dismissMessage(): void;
25
+ /**
26
+ * Gets the message inbox instance for managing inbox messages
27
+ *
28
+ * @returns NotificationInbox instance for fetching and managing inbox messages
29
+ */
30
+ inbox(): NotificationInbox;
31
+ }
32
+ /**
33
+ * Class to hold in-app event attributes.
34
+ */
35
+ /** @public */
36
+ declare class InAppMessageEvent {
37
+ eventType: InAppMessageEventType;
38
+ messageId: string;
39
+ deliveryId?: string;
40
+ actionValue?: string;
41
+ actionName?: string;
42
+ constructor(eventType: InAppMessageEventType, messageId: string, deliveryId?: string, actionValue?: string, actionName?: string);
43
+ }
44
+ export type { InlineInAppMessageViewProps } from './components';
45
+ export { NotificationInbox } from './notification-inbox';
46
+ export type { InboxMessage, NotificationInboxChangeListener } from './types';
47
+ export { CustomerIOInAppMessaging, InAppMessageEvent, InlineInAppMessageView };
48
+ //# sourceMappingURL=customerio-inapp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customerio-inapp.d.ts","sourceRoot":"","sources":["../../../src/customerio-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,OAAuC,EACrC,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,gDAAgD,CAAC;AACxD,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,wBAAyB,YAAW,eAAe;IACvD,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,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { type TurboModule } from 'react-native';
2
+ import { type Spec as CodegenSpec } from './specs/modules/NativeCustomerIOLocation';
3
+ /**
4
+ * Ensures all methods defined in codegen spec are implemented by the public module
5
+ *
6
+ * @internal
7
+ */
8
+ interface NativeLocationSpec extends Omit<CodegenSpec, keyof TurboModule> {
9
+ }
10
+ /** @public */
11
+ export declare class CustomerIOLocation implements NativeLocationSpec {
12
+ /**
13
+ * Sets the last known location from the host app's existing location system.
14
+ * Use this when your app already manages location and you want to send that data
15
+ * to Customer.io without the SDK managing location permissions directly.
16
+ *
17
+ * @param latitude - Latitude in degrees, must be between -90 and 90
18
+ * @param longitude - Longitude in degrees, must be between -180 and 180
19
+ */
20
+ setLastKnownLocation(latitude: number, longitude: number): void;
21
+ /**
22
+ * Requests a single location update and sends the result to Customer.io.
23
+ * No-ops if location tracking is disabled or permission is not granted.
24
+ *
25
+ * The SDK does not request location permission. The host app must request
26
+ * runtime permissions and only call this when permission is granted.
27
+ */
28
+ requestLocationUpdate(): void;
29
+ }
30
+ export {};
31
+ //# sourceMappingURL=customerio-location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customerio-location.d.ts","sourceRoot":"","sources":["../../../src/customerio-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAEL,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,0CAA0C,CAAC;AAElD;;;;GAIG;AACH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,WAAW,CAAC;CAAG;AAkB5E,cAAc;AACd,qBAAa,kBAAmB,YAAW,kBAAkB;IAC3D;;;;;;;OAOG;IACH,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAM/D;;;;;;OAMG;IACH,qBAAqB,IAAI,IAAI;CAG9B"}
@@ -0,0 +1,56 @@
1
+ import { type TurboModule } from 'react-native';
2
+ import { type Spec as CodegenSpec } from './specs/modules/NativeCustomerIOMessagingPush';
3
+ import { type CioPushPermissionOptions, CioPushPermissionStatus } from './types';
4
+ /**
5
+ * Ensures all methods defined in codegen spec are implemented by the public module
6
+ *
7
+ * @internal
8
+ */
9
+ interface NativePushSpec extends Omit<CodegenSpec, keyof TurboModule> {
10
+ }
11
+ /** @public */
12
+ declare class CustomerIOPushMessaging implements NativePushSpec {
13
+ /**
14
+ * Processes push notification received outside the CIO SDK. The method displays notification on
15
+ * device and tracks CIO metrics for push notification.
16
+ *
17
+ * @param message - push payload received from FCM. The payload must contain data payload received in push
18
+ * notification.
19
+ * @param handleNotificationTrigger - indicates whether it should display the notification or not.
20
+ * true (default): The SDK will display the notification and track associated metrics.
21
+ * false: The SDK will only process the notification to track metrics but will not display any notification.
22
+ * @returns promise that resolves to boolean indicating if the notification was handled by the SDK or not.
23
+ */
24
+ onMessageReceived(message: any, handleNotificationTrigger?: boolean): Promise<boolean>;
25
+ /**
26
+ * Handles push notification received when app is background. Since FCM itself displays the notification
27
+ * when app is background, this method makes it easier to determine whether the notification should be
28
+ * displayed or not.
29
+ *
30
+ * @see [onMessageReceived] for more details
31
+ */
32
+ onBackgroundMessageReceived(message: any): Promise<boolean>;
33
+ /**
34
+ * Track push notifications metrics using this method.
35
+ * Call this method when a user interacts and taps open the push notification.
36
+ * @param payload - Customer.io payload as received from the push notification
37
+ */
38
+ trackNotificationResponseReceived(payload: Object): void;
39
+ /**
40
+ * Track push notifications metrics using this method.
41
+ * Call this method when a push notification is received.
42
+ * @param payload - Customer.io payload as received from the push notification
43
+ */
44
+ trackNotificationReceived(payload: Object): void;
45
+ /**
46
+ * Get the registered device token for the app.
47
+ * @returns Promise with device token as a string, or error if no token is
48
+ * registered or the method fails to fetch token.
49
+ */
50
+ getRegisteredDeviceToken(): Promise<string>;
51
+ showPromptForPushNotifications(options?: CioPushPermissionOptions): Promise<CioPushPermissionStatus>;
52
+ getPushPermissionStatus(): Promise<CioPushPermissionStatus>;
53
+ isAndroid(): boolean;
54
+ }
55
+ export { CustomerIOPushMessaging };
56
+ //# sourceMappingURL=customerio-push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customerio-push.d.ts","sourceRoot":"","sources":["../../../src/customerio-push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAsC,EACpC,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,KAAK,wBAAwB,EAC7B,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAGjB;;;;GAIG;AACH,UAAU,cAAe,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,WAAW,CAAC;CAAG;AAUxE,cAAc;AACd,cAAM,uBAAwB,YAAW,cAAc;IACrD;;;;;;;;;;OAUG;IACH,iBAAiB,CACf,OAAO,EAAE,GAAG,EACZ,yBAAyB,GAAE,OAAc,GACxC,OAAO,CAAC,OAAO,CAAC;IAcnB;;;;;;OAMG;IACH,2BAA2B,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D;;;;OAIG;IACH,iCAAiC,CAAC,OAAO,EAAE,MAAM;IAYjD;;;;OAIG;IACH,yBAAyB,CAAC,OAAO,EAAE,MAAM;IAUzC;;;;OAIG;IACH,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C,8BAA8B,CAC5B,OAAO,GAAE,wBAAgE,GACxE,OAAO,CAAC,uBAAuB,CAAC;IAMnC,uBAAuB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAM3D,SAAS,IAAI,OAAO;CAGrB;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file serves as the entry point for the module zixflow-reactnative.
3
+ *
4
+ * This SDK is a customized fork of the Customer.io React Native SDK,
5
+ * optimized for use with the Zixflow platform.
6
+ */
7
+ export * from './zixflow';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,WAAW,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare class NativeLoggerListener {
2
+ private static isInitialized;
3
+ private static loggerPrefix;
4
+ static initialize(): Promise<void>;
5
+ static warn(message: string, error?: unknown): void;
6
+ static initNativeLogger(): void;
7
+ }
8
+ //# sourceMappingURL=native-logger-listener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-logger-listener.d.ts","sourceRoot":"","sources":["../../../src/native-logger-listener.ts"],"names":[],"mappings":"AAeA,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,aAAa,CAAS;IAErC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAY;WAE1B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAiDxC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;IAO5C,MAAM,CAAC,gBAAgB;CAOxB"}
@@ -0,0 +1,57 @@
1
+ import { type EventSubscription } from 'react-native';
2
+ import type { InboxMessage, NotificationInboxChangeListener } from './types';
3
+ /**
4
+ * Public API methods for NotificationInbox.
5
+ * Define the TypeScript API here with proper types (InboxMessage instead of UnsafeObject).
6
+ *
7
+ * @internal
8
+ */
9
+ interface NotificationInboxPublicSpec {
10
+ getMessages(topic?: string): Promise<InboxMessage[]>;
11
+ subscribeToMessages(listener: NotificationInboxChangeListener, topic?: string): EventSubscription;
12
+ markMessageOpened(message: InboxMessage): void;
13
+ markMessageUnopened(message: InboxMessage): void;
14
+ markMessageDeleted(message: InboxMessage): void;
15
+ trackMessageClicked(message: InboxMessage, actionName?: string): void;
16
+ }
17
+ /**
18
+ * Native inbox methods from CodegenSpec that should be excluded from CustomerIOInAppMessaging.
19
+ * Includes both public methods (in NotificationInboxPublicSpec) and internal methods.
20
+ *
21
+ * @internal
22
+ */
23
+ export type NotificationInboxSpec = keyof NotificationInboxPublicSpec | 'subscribeToMessagesChanged' | 'setupInboxListener';
24
+ /**
25
+ * Manages inbox messages for the current user.
26
+ *
27
+ * @public
28
+ */
29
+ export declare class NotificationInbox implements NotificationInboxPublicSpec {
30
+ /**
31
+ * Gets inbox messages.
32
+ */
33
+ getMessages(topic?: string): Promise<InboxMessage[]>;
34
+ /**
35
+ * Subscribes to inbox message changes.
36
+ * Optionally filter messages by topic.
37
+ */
38
+ subscribeToMessages(listener: NotificationInboxChangeListener, topic?: string): EventSubscription;
39
+ /**
40
+ * Marks an inbox message as opened/read.
41
+ */
42
+ markMessageOpened(message: InboxMessage): void;
43
+ /**
44
+ * Marks an inbox message as unopened/unread.
45
+ */
46
+ markMessageUnopened(message: InboxMessage): void;
47
+ /**
48
+ * Marks an inbox message as deleted.
49
+ */
50
+ markMessageDeleted(message: InboxMessage): void;
51
+ /**
52
+ * Tracks a click event for an inbox message.
53
+ */
54
+ trackMessageClicked(message: InboxMessage, actionName?: string): void;
55
+ }
56
+ export {};
57
+ //# sourceMappingURL=notification-inbox.d.ts.map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AAO,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,MAAM;CAK/D"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=postInstall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postInstall.d.ts","sourceRoot":"","sources":["../../../src/postInstall.js"],"names":[],"mappings":""}