@capillarytech/react-native-hydra-lib 1.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +252 -0
- package/DEPRECATION_POLICY.md +220 -0
- package/LICENSE +20 -0
- package/MIGRATION.md +361 -0
- package/README.md +491 -0
- package/RELEASE_NOTES.md +528 -0
- package/android/build.gradle +565 -0
- package/android/generated/java/com/hydralib/NativeHydraLibSpec.java +185 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNHydraLibSpec-generated.cpp +248 -0
- package/android/generated/jni/RNHydraLibSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ComponentDescriptors.cpp +24 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ComponentDescriptors.h +26 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/EventEmitters.cpp +18 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/EventEmitters.h +37 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/Props.cpp +39 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/Props.h +47 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/RNHydraLibSpecJSI-generated.cpp +283 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/RNHydraLibSpecJSI.h +395 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ShadowNodes.cpp +19 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ShadowNodes.h +54 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/States.h +53 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/AndroidManifestNew.xml +16 -0
- package/android/src/main/AndroidManifestNoFirebaseIcon.xml +5 -0
- package/android/src/main/java/com/hydralib/delegates/HydraActivityCallbacks.kt +90 -0
- package/android/src/main/java/com/hydralib/delegates/NonHydraNotificationActivity.kt +43 -0
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventEmitter.kt +150 -0
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventType.kt +44 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationBannerViewManager.kt +121 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationEmbedViewManager.kt +153 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationLoyaltyViewManager.kt +95 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraCore.kt +860 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraExtenstions.kt +331 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInAppMessages.kt +136 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInbox.kt +70 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInboxUI.kt +54 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraPushNotification.kt +299 -0
- package/android/src/main/java/com/hydralib/nativeapis/Hydra.kt +28 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraFirebaseRemoteConfigKeys.kt +76 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraInitializer.kt +130 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraNativeMessaging.kt +18 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraRemoteConfig.kt +59 -0
- package/android/src/main/java/com/hydralib/utils/RNHydraPreferencesManager.kt +154 -0
- package/android/src/main/java/com/hydralib/utils/ResourceUtil.kt +10 -0
- package/android/src/newarch/HydraLibModule.kt +218 -0
- package/android/src/oldarch/HydraLibModule.kt +258 -0
- package/android/src/rn72OrLess/HydraLibPackage.kt +43 -0
- package/android/src/rn73OrMore/HydraLibPackage.kt +53 -0
- package/ios/Delegates/HydraApplicationDelegate.swift +196 -0
- package/ios/Delegates/HydraFirebaseMessagingDelegate.swift +20 -0
- package/ios/Delegates/HydraUNUserNotificationCenterDelegate.swift +26 -0
- package/ios/EventEmitter/HydraEventEmitter.swift +98 -0
- package/ios/EventEmitter/HydraEventType.swift +28 -0
- package/ios/EventEmitter/HydraNativeEmitterBrigde.h +15 -0
- package/ios/EventEmitter/HydraNativeEmitterBrigde.mm +48 -0
- package/ios/GamificationViews/GamificationBannerViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationBannerViewComponentView.mm +125 -0
- package/ios/GamificationViews/GamificationEmbedViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationEmbedViewComponentView.mm +131 -0
- package/ios/GamificationViews/GamificationLoyaltyViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationLoyaltyViewComponentView.mm +120 -0
- package/ios/HydraLib.h +16 -0
- package/ios/HydraLib.mm +207 -0
- package/ios/HydraSDK/HydraInAppMessages.swift +93 -0
- package/ios/HydraSDK/HydraInbox.swift +97 -0
- package/ios/HydraSDK/HydraInboxUI.swift +105 -0
- package/ios/HydraSDK/HydraPushNotification.swift +476 -0
- package/ios/HydraSDK/HydraSDKCore.swift +707 -0
- package/ios/NativeAPIs/Hydra.h +34 -0
- package/ios/NativeAPIs/Hydra.mm +47 -0
- package/ios/NativeAPIs/HydraNativeFirebaseRemoteConfigKeys.h +23 -0
- package/ios/NativeAPIs/HydraNativeFirebaseRemoteConfigKeys.mm +80 -0
- package/ios/NativeAPIs/HydraNativeInitializer.h +16 -0
- package/ios/NativeAPIs/HydraNativeInitializer.mm +39 -0
- package/ios/NativeAPIs/HydraNativeMessaging.h +24 -0
- package/ios/NativeAPIs/HydraNativeMessaging.mm +53 -0
- package/ios/NativeAPIs/HydraNativeRemoteConfig.h +27 -0
- package/ios/NativeAPIs/HydraNativeRemoteConfig.mm +89 -0
- package/ios/Utils/HydraExtensions.swift +322 -0
- package/ios/Utils/HydraRNConstants.swift +13 -0
- package/ios/Utils/RNHydraLogger.swift +31 -0
- package/ios/generated/RNHydraLibSpec/ComponentDescriptors.cpp +24 -0
- package/ios/generated/RNHydraLibSpec/ComponentDescriptors.h +26 -0
- package/ios/generated/RNHydraLibSpec/EventEmitters.cpp +18 -0
- package/ios/generated/RNHydraLibSpec/EventEmitters.h +37 -0
- package/ios/generated/RNHydraLibSpec/Props.cpp +39 -0
- package/ios/generated/RNHydraLibSpec/Props.h +47 -0
- package/ios/generated/RNHydraLibSpec/RCTComponentViewHelpers.h +28 -0
- package/ios/generated/RNHydraLibSpec/RNHydraLibSpec-generated.mm +291 -0
- package/ios/generated/RNHydraLibSpec/RNHydraLibSpec.h +167 -0
- package/ios/generated/RNHydraLibSpec/ShadowNodes.cpp +19 -0
- package/ios/generated/RNHydraLibSpec/ShadowNodes.h +54 -0
- package/ios/generated/RNHydraLibSpec/States.cpp +16 -0
- package/ios/generated/RNHydraLibSpec/States.h +53 -0
- package/ios/generated/RNHydraLibSpecJSI-generated.cpp +283 -0
- package/ios/generated/RNHydraLibSpecJSI.h +395 -0
- package/lib/commonjs/GamificationBannerViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationBannerViewNativeComponent.js.map +1 -0
- package/lib/commonjs/GamificationEmbedViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationEmbedViewNativeComponent.js.map +1 -0
- package/lib/commonjs/GamificationLoyaltyViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationLoyaltyViewNativeComponent.js.map +1 -0
- package/lib/commonjs/NativeHydraLib.js +11 -0
- package/lib/commonjs/NativeHydraLib.js.map +1 -0
- package/lib/commonjs/components/GamificationBannerView.js +15 -0
- package/lib/commonjs/components/GamificationBannerView.js.map +1 -0
- package/lib/commonjs/components/GamificationEmbedView.js +15 -0
- package/lib/commonjs/components/GamificationEmbedView.js.map +1 -0
- package/lib/commonjs/components/GamificationLoyaltyView.js +15 -0
- package/lib/commonjs/components/GamificationLoyaltyView.js.map +1 -0
- package/lib/commonjs/hydra-apis/Hydra.js +43 -0
- package/lib/commonjs/hydra-apis/Hydra.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraCore.js +42 -0
- package/lib/commonjs/hydra-apis/HydraCore.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInAppMessaging.js +24 -0
- package/lib/commonjs/hydra-apis/HydraInAppMessaging.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInbox.js +29 -0
- package/lib/commonjs/hydra-apis/HydraInbox.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInboxUI.js +18 -0
- package/lib/commonjs/hydra-apis/HydraInboxUI.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js +133 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraPushNotification.js +21 -0
- package/lib/commonjs/hydra-apis/HydraPushNotification.js.map +1 -0
- package/lib/commonjs/index.js +230 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/models/HydraAccountConfig.js +41 -0
- package/lib/commonjs/models/HydraAccountConfig.js.map +1 -0
- package/lib/commonjs/models/HydraFirebaseRemoteConfigKeys.js +40 -0
- package/lib/commonjs/models/HydraFirebaseRemoteConfigKeys.js.map +1 -0
- package/lib/commonjs/models/HydraGeoConfig.js +24 -0
- package/lib/commonjs/models/HydraGeoConfig.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppButtonComponent.js +26 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppButtonComponent.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppComponentStyle.js +26 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppComponentStyle.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js +39 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppMessage.js +60 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppMessage.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTemplateType.js +66 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTemplateType.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTextComponent.js +21 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTextComponent.js.map +1 -0
- package/lib/commonjs/models/HydraLogLevel.js +16 -0
- package/lib/commonjs/models/HydraLogLevel.js.map +1 -0
- package/lib/commonjs/models/HydraNativeEvent.js +27 -0
- package/lib/commonjs/models/HydraNativeEvent.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotification.js +70 -0
- package/lib/commonjs/models/HydraNotification/HydraNotification.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationBody.js +25 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationBody.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCta.js +23 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCta.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCtaType.js +62 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCtaType.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationExpandedDetails.js +25 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationExpandedDetails.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationGateway.js +13 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationGateway.js.map +1 -0
- package/lib/commonjs/models/HydraPushPreferences.js +20 -0
- package/lib/commonjs/models/HydraPushPreferences.js.map +1 -0
- package/lib/commonjs/models/HydraUserDetails.js +26 -0
- package/lib/commonjs/models/HydraUserDetails.js.map +1 -0
- package/lib/commonjs/models/HydraVisitorInfo.js +19 -0
- package/lib/commonjs/models/HydraVisitorInfo.js.map +1 -0
- package/lib/commonjs/models/NonHydraNotification.js +18 -0
- package/lib/commonjs/models/NonHydraNotification.js.map +1 -0
- package/lib/commonjs/models/UserState.js +41 -0
- package/lib/commonjs/models/UserState.js.map +1 -0
- package/lib/module/GamificationBannerViewNativeComponent.js +5 -0
- package/lib/module/GamificationBannerViewNativeComponent.js.map +1 -0
- package/lib/module/GamificationEmbedViewNativeComponent.js +5 -0
- package/lib/module/GamificationEmbedViewNativeComponent.js.map +1 -0
- package/lib/module/GamificationLoyaltyViewNativeComponent.js +5 -0
- package/lib/module/GamificationLoyaltyViewNativeComponent.js.map +1 -0
- package/lib/module/NativeHydraLib.js +7 -0
- package/lib/module/NativeHydraLib.js.map +1 -0
- package/lib/module/components/GamificationBannerView.js +10 -0
- package/lib/module/components/GamificationBannerView.js.map +1 -0
- package/lib/module/components/GamificationEmbedView.js +10 -0
- package/lib/module/components/GamificationEmbedView.js.map +1 -0
- package/lib/module/components/GamificationLoyaltyView.js +10 -0
- package/lib/module/components/GamificationLoyaltyView.js.map +1 -0
- package/lib/module/hydra-apis/Hydra.js +37 -0
- package/lib/module/hydra-apis/Hydra.js.map +1 -0
- package/lib/module/hydra-apis/HydraCore.js +36 -0
- package/lib/module/hydra-apis/HydraCore.js.map +1 -0
- package/lib/module/hydra-apis/HydraInAppMessaging.js +18 -0
- package/lib/module/hydra-apis/HydraInAppMessaging.js.map +1 -0
- package/lib/module/hydra-apis/HydraInbox.js +23 -0
- package/lib/module/hydra-apis/HydraInbox.js.map +1 -0
- package/lib/module/hydra-apis/HydraInboxUI.js +12 -0
- package/lib/module/hydra-apis/HydraInboxUI.js.map +1 -0
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js +127 -0
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js.map +1 -0
- package/lib/module/hydra-apis/HydraPushNotification.js +15 -0
- package/lib/module/hydra-apis/HydraPushNotification.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/models/HydraAccountConfig.js +36 -0
- package/lib/module/models/HydraAccountConfig.js.map +1 -0
- package/lib/module/models/HydraFirebaseRemoteConfigKeys.js +35 -0
- package/lib/module/models/HydraFirebaseRemoteConfigKeys.js.map +1 -0
- package/lib/module/models/HydraGeoConfig.js +19 -0
- package/lib/module/models/HydraGeoConfig.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppButtonComponent.js +21 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppButtonComponent.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppComponentStyle.js +21 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppComponentStyle.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js +35 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppMessage.js +55 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppMessage.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTemplateType.js +62 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTemplateType.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTextComponent.js +16 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTextComponent.js.map +1 -0
- package/lib/module/models/HydraLogLevel.js +12 -0
- package/lib/module/models/HydraLogLevel.js.map +1 -0
- package/lib/module/models/HydraNativeEvent.js +23 -0
- package/lib/module/models/HydraNativeEvent.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotification.js +65 -0
- package/lib/module/models/HydraNotification/HydraNotification.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationBody.js +20 -0
- package/lib/module/models/HydraNotification/HydraNotificationBody.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationCta.js +18 -0
- package/lib/module/models/HydraNotification/HydraNotificationCta.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationCtaType.js +58 -0
- package/lib/module/models/HydraNotification/HydraNotificationCtaType.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationExpandedDetails.js +20 -0
- package/lib/module/models/HydraNotification/HydraNotificationExpandedDetails.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationGateway.js +9 -0
- package/lib/module/models/HydraNotification/HydraNotificationGateway.js.map +1 -0
- package/lib/module/models/HydraPushPreferences.js +15 -0
- package/lib/module/models/HydraPushPreferences.js.map +1 -0
- package/lib/module/models/HydraUserDetails.js +21 -0
- package/lib/module/models/HydraUserDetails.js.map +1 -0
- package/lib/module/models/HydraVisitorInfo.js +14 -0
- package/lib/module/models/HydraVisitorInfo.js.map +1 -0
- package/lib/module/models/NonHydraNotification.js +13 -0
- package/lib/module/models/NonHydraNotification.js.map +1 -0
- package/lib/module/models/UserState.js +37 -0
- package/lib/module/models/UserState.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/GamificationBannerViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationBannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/GamificationEmbedViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationEmbedViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/GamificationLoyaltyViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationLoyaltyViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeHydraLib.d.ts +46 -0
- package/lib/typescript/commonjs/src/NativeHydraLib.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationBannerView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationBannerView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationEmbedView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationEmbedView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationLoyaltyView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationLoyaltyView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/Hydra.d.ts +15 -0
- package/lib/typescript/commonjs/src/hydra-apis/Hydra.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraCore.d.ts +18 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraCore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInAppMessaging.d.ts +8 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInAppMessaging.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInbox.d.ts +9 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInboxUI.d.ts +5 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInboxUI.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts +35 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraPushNotification.d.ts +6 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraPushNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +37 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraAccountConfig.d.ts +14 -0
- package/lib/typescript/commonjs/src/models/HydraAccountConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraFirebaseRemoteConfigKeys.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraFirebaseRemoteConfigKeys.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraGeoConfig.d.ts +14 -0
- package/lib/typescript/commonjs/src/models/HydraGeoConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts +16 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts +10 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppMessage.d.ts +29 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppMessage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts +15 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts +11 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraLogLevel.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/HydraLogLevel.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts +20 -0
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotification.d.ts +32 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationBody.d.ts +19 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationBody.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCta.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCta.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCtaType.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCtaType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts +19 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationGateway.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationGateway.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraPushPreferences.d.ts +10 -0
- package/lib/typescript/commonjs/src/models/HydraPushPreferences.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraUserDetails.d.ts +16 -0
- package/lib/typescript/commonjs/src/models/HydraUserDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraVisitorInfo.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/HydraVisitorInfo.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/NonHydraNotification.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/NonHydraNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/UserState.d.ts +11 -0
- package/lib/typescript/commonjs/src/models/UserState.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/GamificationBannerViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationBannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/GamificationEmbedViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationEmbedViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/GamificationLoyaltyViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationLoyaltyViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeHydraLib.d.ts +46 -0
- package/lib/typescript/module/src/NativeHydraLib.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationBannerView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationBannerView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationEmbedView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationEmbedView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationLoyaltyView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationLoyaltyView.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/Hydra.d.ts +15 -0
- package/lib/typescript/module/src/hydra-apis/Hydra.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraCore.d.ts +18 -0
- package/lib/typescript/module/src/hydra-apis/HydraCore.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInAppMessaging.d.ts +8 -0
- package/lib/typescript/module/src/hydra-apis/HydraInAppMessaging.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInbox.d.ts +9 -0
- package/lib/typescript/module/src/hydra-apis/HydraInbox.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInboxUI.d.ts +5 -0
- package/lib/typescript/module/src/hydra-apis/HydraInboxUI.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts +35 -0
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraPushNotification.d.ts +6 -0
- package/lib/typescript/module/src/hydra-apis/HydraPushNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +37 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraAccountConfig.d.ts +14 -0
- package/lib/typescript/module/src/models/HydraAccountConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraFirebaseRemoteConfigKeys.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraFirebaseRemoteConfigKeys.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraGeoConfig.d.ts +14 -0
- package/lib/typescript/module/src/models/HydraGeoConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts +16 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts +10 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts +9 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppMessage.d.ts +29 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppMessage.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts +15 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts +11 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraLogLevel.d.ts +9 -0
- package/lib/typescript/module/src/models/HydraLogLevel.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts +20 -0
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotification.d.ts +32 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationBody.d.ts +19 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationBody.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCta.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCta.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCtaType.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCtaType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts +19 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationGateway.d.ts +6 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationGateway.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraPushPreferences.d.ts +10 -0
- package/lib/typescript/module/src/models/HydraPushPreferences.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraUserDetails.d.ts +16 -0
- package/lib/typescript/module/src/models/HydraUserDetails.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraVisitorInfo.d.ts +6 -0
- package/lib/typescript/module/src/models/HydraVisitorInfo.d.ts.map +1 -0
- package/lib/typescript/module/src/models/NonHydraNotification.d.ts +9 -0
- package/lib/typescript/module/src/models/NonHydraNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/models/UserState.d.ts +11 -0
- package/lib/typescript/module/src/models/UserState.d.ts.map +1 -0
- package/package.json +225 -0
- package/react-native-hydra-lib.podspec +256 -0
- package/react-native.config.js +33 -0
- package/sbom.spdx.json +544 -0
- package/scripts/HydraPods.rb +151 -0
- package/scripts/generate-sbom.js +367 -0
- package/scripts/hydra-podspecs/HydraCore.podspec +13 -0
- package/scripts/hydra-podspecs/HydraInAppMessage.podspec +15 -0
- package/scripts/hydra-podspecs/HydraInboxCore.podspec +15 -0
- package/scripts/hydra-podspecs/HydraInboxUI.podspec +15 -0
- package/scripts/hydra-podspecs/HydraPushNotification.podspec +14 -0
- package/scripts/hydra-podspecs/HydraPushNotificationServiceExtension.podspec +15 -0
- package/src/GamificationBannerViewNativeComponent.ts +10 -0
- package/src/GamificationEmbedViewNativeComponent.ts +10 -0
- package/src/GamificationLoyaltyViewNativeComponent.ts +10 -0
- package/src/NativeHydraLib.ts +81 -0
- package/src/components/GamificationBannerView.tsx +10 -0
- package/src/components/GamificationEmbedView.tsx +10 -0
- package/src/components/GamificationLoyaltyView.tsx +10 -0
- package/src/hydra-apis/Hydra.ts +52 -0
- package/src/hydra-apis/HydraCore.ts +76 -0
- package/src/hydra-apis/HydraInAppMessaging.ts +25 -0
- package/src/hydra-apis/HydraInbox.ts +33 -0
- package/src/hydra-apis/HydraInboxUI.ts +10 -0
- package/src/hydra-apis/HydraNativeEventEmitter.ts +216 -0
- package/src/hydra-apis/HydraPushNotification.ts +15 -0
- package/src/index.tsx +71 -0
- package/src/models/HydraAccountConfig.ts +45 -0
- package/src/models/HydraFirebaseRemoteConfigKeys.ts +43 -0
- package/src/models/HydraGeoConfig.ts +27 -0
- package/src/models/HydraInAppMessage/HydraInAppButtonComponent.ts +27 -0
- package/src/models/HydraInAppMessage/HydraInAppComponentStyle.ts +24 -0
- package/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.ts +35 -0
- package/src/models/HydraInAppMessage/HydraInAppMessage.ts +89 -0
- package/src/models/HydraInAppMessage/HydraInAppTemplateType.ts +57 -0
- package/src/models/HydraInAppMessage/HydraInAppTextComponent.ts +18 -0
- package/src/models/HydraLogLevel.ts +8 -0
- package/src/models/HydraNativeEvent.ts +19 -0
- package/src/models/HydraNotification/HydraNotification.ts +97 -0
- package/src/models/HydraNotification/HydraNotificationBody.ts +23 -0
- package/src/models/HydraNotification/HydraNotificationCta.ts +20 -0
- package/src/models/HydraNotification/HydraNotificationCtaType.ts +59 -0
- package/src/models/HydraNotification/HydraNotificationExpandedDetails.ts +28 -0
- package/src/models/HydraNotification/HydraNotificationGateway.ts +5 -0
- package/src/models/HydraPushPreferences.ts +16 -0
- package/src/models/HydraUserDetails.ts +31 -0
- package/src/models/HydraVisitorInfo.ts +14 -0
- package/src/models/NonHydraNotification.ts +15 -0
- package/src/models/UserState.ts +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
# @capillary/react-native-hydra-lib
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/@capillary%2Freact-native-hydra-lib)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](http://www.typescriptlang.org/)
|
|
6
|
+
[](https://reactnative.dev/)
|
|
7
|
+
|
|
8
|
+
A comprehensive React Native library that provides seamless integration with Hydra native iOS and Android SDKs, enabling powerful mobile engagement and analytics capabilities.
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- [Features](#features)
|
|
13
|
+
- [Requirements](#requirements)
|
|
14
|
+
- [Installation](#installation)
|
|
15
|
+
- [Quick Start](#quick-start)
|
|
16
|
+
- [API Reference](#api-reference)
|
|
17
|
+
- [Platform-Specific Setup](#platform-specific-setup)
|
|
18
|
+
- [Security & Compliance](#security--compliance)
|
|
19
|
+
- [Development](#development)
|
|
20
|
+
- [Contributing](#contributing)
|
|
21
|
+
- [Troubleshooting](#troubleshooting)
|
|
22
|
+
- [Changelog](#changelog)
|
|
23
|
+
- [Support](#support)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
✨ **Core Capabilities**
|
|
29
|
+
|
|
30
|
+
- 🚀 **Native Performance**: Direct integration with iOS and Android native SDKs
|
|
31
|
+
- 📱 **Cross-Platform**: Unified API for both iOS and Android platforms
|
|
32
|
+
- 🔧 **TypeScript Support**: Full TypeScript definitions and IntelliSense
|
|
33
|
+
- 🎯 **Modern Architecture**: Built with latest React Native Turbo Modules
|
|
34
|
+
|
|
35
|
+
🛡️ **Security & Compliance**
|
|
36
|
+
|
|
37
|
+
- 📋 **SBOM Generation**: Automatic Software Bill of Materials creation
|
|
38
|
+
- 🔒 **Supply Chain Security**: Comprehensive dependency tracking
|
|
39
|
+
- 📊 **Compliance Ready**: SPDX 2.3 format support for enterprise requirements
|
|
40
|
+
|
|
41
|
+
🔄 **Developer Experience**
|
|
42
|
+
|
|
43
|
+
- 📚 **Comprehensive Documentation**: Detailed guides and examples
|
|
44
|
+
- ⚡ **Hot Reload Support**: Seamless development experience
|
|
45
|
+
- 🧪 **Example App**: Full-featured example implementation
|
|
46
|
+
- 🔧 **Easy Integration**: Simple setup with minimal configuration
|
|
47
|
+
|
|
48
|
+
## Requirements
|
|
49
|
+
|
|
50
|
+
| Platform | Version |
|
|
51
|
+
| ---------------- | ----------------------- |
|
|
52
|
+
| **React Native** | >= 0.72.0 |
|
|
53
|
+
| **iOS** | >= 13.0 |
|
|
54
|
+
| **Android** | >= API 21 (Android 5.0) |
|
|
55
|
+
| **Node.js** | >= 18.0.0 |
|
|
56
|
+
| **targetSdk** | >= 32 |
|
|
57
|
+
| **compileSdk** | >= 32 |
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
### Using npm
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install @capillary/react-native-hydra-lib
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Project Setup
|
|
68
|
+
|
|
69
|
+
Before you start development, you need to set up your environment:
|
|
70
|
+
|
|
71
|
+
1. Create a `.env` file in the project root with the following variables:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
HYDRA_GITHUB_USER_NAME=your_github_username
|
|
75
|
+
HYDRA_IOS_GITHUB_PAT=your_github_personal_access_token
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
2. Run the setup script:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
./scripts/setup_local.sh
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This script will:
|
|
85
|
+
|
|
86
|
+
- Configure your GitHub credentials for accessing private repositories
|
|
87
|
+
- Set up necessary environment variables
|
|
88
|
+
- Configure Git authentication for Capillary repositories
|
|
89
|
+
|
|
90
|
+
Note: The setup script will run automatically when you install dependencies in the example app.
|
|
91
|
+
|
|
92
|
+
### Using yarn
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
yarn add @capillary/react-native-hydra-lib
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Post-Installation Setup
|
|
99
|
+
|
|
100
|
+
After installation, the library automatically generates SBOM (Software Bill of Materials) files for security and compliance tracking.
|
|
101
|
+
|
|
102
|
+
#### iOS Setup
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd ios && pod install
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Android Setup
|
|
109
|
+
|
|
110
|
+
No additional setup required for Android.
|
|
111
|
+
|
|
112
|
+
## Quick Start
|
|
113
|
+
|
|
114
|
+
### Basic Integration
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { HydraLib } from '@capillary/react-native-hydra-lib';
|
|
118
|
+
|
|
119
|
+
// Initialize using Firebase Remote Config
|
|
120
|
+
// This is the recommended way to initialize the SDK
|
|
121
|
+
const initializeHydra = async () => {
|
|
122
|
+
try {
|
|
123
|
+
await HydraLib.setFirebaseRemoteConfigKeys({
|
|
124
|
+
keyForAccountId: 'hydra_account_id',
|
|
125
|
+
keyForBaseUrl: 'hydra_base_url',
|
|
126
|
+
keyForSsl: 'hydra_ssl_public_key',
|
|
127
|
+
keyForRemoteLogLevel: 'hydra_remote_log_level'
|
|
128
|
+
});
|
|
129
|
+
console.log('Hydra SDK initialized successfully');
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error('Failed to initialize Hydra SDK:', error);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Alternative: Initialize using Account Config directly
|
|
136
|
+
const initializeWithAccountConfig = async () => {
|
|
137
|
+
try {
|
|
138
|
+
await HydraLib.setHydraAccountConfig({
|
|
139
|
+
accountId: 'your-account-id',
|
|
140
|
+
baseUrl: 'your-base-url',
|
|
141
|
+
sslPublicKey: 'your-ssl-public-key',
|
|
142
|
+
remoteDebugLevel: 4 // 0-5, where 0 is off and 5 is verbose
|
|
143
|
+
});
|
|
144
|
+
console.log('Hydra SDK initialized successfully');
|
|
145
|
+
} catch (error) {
|
|
146
|
+
console.error('Failed to initialize Hydra SDK:', error);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// Call during app startup
|
|
151
|
+
initializeHydra();
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## API Reference
|
|
156
|
+
|
|
157
|
+
### Core Methods
|
|
158
|
+
|
|
159
|
+
#### `setFirebaseRemoteConfigKeys(keys: HydraFirebaseRemoteConfigKeys): Promise<void>`
|
|
160
|
+
|
|
161
|
+
Initializes the Hydra SDK using Firebase Remote Config keys.
|
|
162
|
+
|
|
163
|
+
**Parameters:**
|
|
164
|
+
|
|
165
|
+
- `keys`: Object containing Firebase Remote Config key names
|
|
166
|
+
- `keyForAccountId`: Key for account ID in Firebase Remote Config
|
|
167
|
+
- `keyForBaseUrl`: Key for base URL in Firebase Remote Config
|
|
168
|
+
- `keyForSsl`: Key for SSL public key in Firebase Remote Config
|
|
169
|
+
- `keyForRemoteLogLevel`: Key for remote debug level in Firebase Remote Config
|
|
170
|
+
|
|
171
|
+
**Example:**
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
await HydraLib.setFirebaseRemoteConfigKeys({
|
|
175
|
+
keyForAccountId: 'hydra_account_id',
|
|
176
|
+
keyForBaseUrl: 'hydra_base_url',
|
|
177
|
+
keyForSsl: 'hydra_ssl_public_key',
|
|
178
|
+
keyForRemoteLogLevel: 'hydra_remote_log_level'
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### `setHydraAccountConfig(config: HydraAccountConfig): Promise<void>`
|
|
183
|
+
|
|
184
|
+
Sets the Hydra account configuration directly without using Firebase Remote Config.
|
|
185
|
+
|
|
186
|
+
**Parameters:**
|
|
187
|
+
|
|
188
|
+
- `config`: Account configuration object
|
|
189
|
+
- `accountId`: Your Hydra account ID
|
|
190
|
+
- `baseUrl`: Base URL for the Hydra API
|
|
191
|
+
- `sslPublicKey`: SSL public key for secure communication
|
|
192
|
+
- `remoteDebugLevel`: Debug level (0-5, where 0 is off and 5 is verbose)
|
|
193
|
+
|
|
194
|
+
**Example:**
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
await HydraLib.setHydraAccountConfig({
|
|
198
|
+
accountId: 'your-account-id',
|
|
199
|
+
baseUrl: 'your-base-url',
|
|
200
|
+
sslPublicKey: 'your-ssl-public-key',
|
|
201
|
+
remoteDebugLevel: 4
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### `signIn(userDetails: UserDetails, customData?: object): Promise<void>`
|
|
206
|
+
|
|
207
|
+
Signs in a user with the provided details.
|
|
208
|
+
|
|
209
|
+
**Parameters:**
|
|
210
|
+
|
|
211
|
+
- `userDetails`: User profile information
|
|
212
|
+
- `customData`: Optional custom attributes
|
|
213
|
+
|
|
214
|
+
**Example:**
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
await HydraLib.signIn({
|
|
218
|
+
userId: 'user123',
|
|
219
|
+
email: 'user@example.com'
|
|
220
|
+
}, {
|
|
221
|
+
preferences: ['tech', 'mobile']
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### `signOut(customerId: string): Promise<void>`
|
|
226
|
+
|
|
227
|
+
Signs out the user with the specified customer ID.
|
|
228
|
+
|
|
229
|
+
**Parameters:**
|
|
230
|
+
|
|
231
|
+
- `customerId`: The ID of the customer to sign out
|
|
232
|
+
|
|
233
|
+
**Example:**
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
await HydraLib.signOut('user123');
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Messaging Methods
|
|
240
|
+
|
|
241
|
+
#### `showNotificationCenter(): Promise<void>`
|
|
242
|
+
|
|
243
|
+
Displays the notification center UI.
|
|
244
|
+
|
|
245
|
+
#### `hideNotificationCenterIfShowing(): Promise<void>`
|
|
246
|
+
|
|
247
|
+
Hides the notification center if it's currently visible.
|
|
248
|
+
|
|
249
|
+
#### `getInboxMessages(): Promise<void>`
|
|
250
|
+
|
|
251
|
+
Retrieves the list of inbox messages.
|
|
252
|
+
|
|
253
|
+
#### `getUnreadInboxMessagesCount(): Promise<number>`
|
|
254
|
+
|
|
255
|
+
Returns the number of unread inbox messages.
|
|
256
|
+
|
|
257
|
+
### Utility Methods
|
|
258
|
+
|
|
259
|
+
#### `getSDKVersion(): Promise<string>`
|
|
260
|
+
|
|
261
|
+
Returns the current SDK version.
|
|
262
|
+
|
|
263
|
+
#### `isInitialized(): Promise<boolean>`
|
|
264
|
+
|
|
265
|
+
Checks if the SDK is properly initialized.
|
|
266
|
+
|
|
267
|
+
## Platform-Specific Setup
|
|
268
|
+
|
|
269
|
+
### iOS Configuration
|
|
270
|
+
|
|
271
|
+
Add the following to your `ios/YourApp/Info.plist`:
|
|
272
|
+
|
|
273
|
+
```xml
|
|
274
|
+
<key>NSLocationWhenInUseUsageDescription</key>
|
|
275
|
+
<string>This app uses location for personalized content</string>
|
|
276
|
+
<key>NSUserNotificationUsageDescription</key>
|
|
277
|
+
<string>This app sends notifications for important updates</string>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Android Configuration
|
|
281
|
+
|
|
282
|
+
Add permissions to `android/app/src/main/AndroidManifest.xml`:
|
|
283
|
+
|
|
284
|
+
```xml
|
|
285
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
286
|
+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
287
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false" />
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Security & Compliance
|
|
291
|
+
|
|
292
|
+
### SBOM (Software Bill of Materials)
|
|
293
|
+
|
|
294
|
+
This library automatically generates SBOM files for security and compliance tracking:
|
|
295
|
+
|
|
296
|
+
- **Main Project SBOM**: `sbom.spdx.json` (generated in project root)
|
|
297
|
+
- **Example Project SBOM**: `example/example_sbom.spdx.json`
|
|
298
|
+
|
|
299
|
+
#### SBOM Generation
|
|
300
|
+
|
|
301
|
+
The SBOM is automatically generated during:
|
|
302
|
+
|
|
303
|
+
- Package installation (`postinstall` script)
|
|
304
|
+
- Manual execution: `npm run generate-sbom`
|
|
305
|
+
|
|
306
|
+
#### SBOM Features
|
|
307
|
+
|
|
308
|
+
- ✅ **SPDX 2.3 Compliant**: Industry standard format
|
|
309
|
+
- ✅ **Comprehensive Coverage**: All dependencies tracked
|
|
310
|
+
- ✅ **Automatic Updates**: Regenerated when dependencies change
|
|
311
|
+
- ✅ **Supply Chain Security**: Complete dependency lineage
|
|
312
|
+
- ✅ **Enterprise Ready**: Compliance with security requirements
|
|
313
|
+
|
|
314
|
+
### Deprecation Policy
|
|
315
|
+
|
|
316
|
+
We follow a structured deprecation policy to ensure smooth transitions:
|
|
317
|
+
|
|
318
|
+
- **📅 Advance Notice**: 6-12 months before removal
|
|
319
|
+
- **🔄 Migration Support**: Comprehensive guides and examples
|
|
320
|
+
- **⚠️ Clear Warnings**: Development-time deprecation warnings
|
|
321
|
+
- **📚 Documentation**: Detailed migration paths
|
|
322
|
+
|
|
323
|
+
For complete details, see our [Deprecation Policy](./DEPRECATION_POLICY.md).
|
|
324
|
+
|
|
325
|
+
## Development
|
|
326
|
+
|
|
327
|
+
### Running the Example App
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Install dependencies
|
|
331
|
+
yarn install
|
|
332
|
+
|
|
333
|
+
# iOS
|
|
334
|
+
yarn example ios
|
|
335
|
+
|
|
336
|
+
# Android
|
|
337
|
+
yarn example android
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Building the Library
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# Build TypeScript
|
|
344
|
+
yarn prepare
|
|
345
|
+
|
|
346
|
+
# Run tests
|
|
347
|
+
yarn test
|
|
348
|
+
|
|
349
|
+
# Lint code
|
|
350
|
+
yarn lint
|
|
351
|
+
|
|
352
|
+
# Type checking
|
|
353
|
+
yarn typecheck
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Scripts
|
|
357
|
+
|
|
358
|
+
| Script | Description |
|
|
359
|
+
| -------------------- | ------------------------ |
|
|
360
|
+
| `yarn test` | Run tests |
|
|
361
|
+
| `yarn typecheck` | TypeScript type checking |
|
|
362
|
+
| `yarn lint` | ESLint code linting |
|
|
363
|
+
| `yarn prepare` | Build the library |
|
|
364
|
+
| `yarn generate-sbom` | Generate SBOM files |
|
|
365
|
+
| `yarn clean` | Clean build artifacts |
|
|
366
|
+
|
|
367
|
+
## Contributing
|
|
368
|
+
|
|
369
|
+
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
|
|
370
|
+
|
|
371
|
+
### Development Workflow
|
|
372
|
+
|
|
373
|
+
1. **Fork** the repository
|
|
374
|
+
2. **Clone** your fork
|
|
375
|
+
3. **Create** a feature branch
|
|
376
|
+
4. **Make** your changes
|
|
377
|
+
5. **Test** your changes
|
|
378
|
+
6. **Submit** a pull request
|
|
379
|
+
|
|
380
|
+
### Code Standards
|
|
381
|
+
|
|
382
|
+
- **TypeScript**: All code must be TypeScript
|
|
383
|
+
- **ESLint**: Follow our linting rules
|
|
384
|
+
- **Testing**: Add tests for new features
|
|
385
|
+
- **Documentation**: Update docs for API changes
|
|
386
|
+
|
|
387
|
+
## Troubleshooting
|
|
388
|
+
|
|
389
|
+
### Common Issues
|
|
390
|
+
|
|
391
|
+
#### Installation Issues
|
|
392
|
+
|
|
393
|
+
**Problem**: `pod install` fails on iOS
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# Solution: Clean and reinstall
|
|
397
|
+
cd ios
|
|
398
|
+
rm -rf Pods Podfile.lock
|
|
399
|
+
pod install
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
**Problem**: Android build fails
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
# Solution: Clean and rebuild
|
|
406
|
+
cd android
|
|
407
|
+
./gradlew clean
|
|
408
|
+
cd ..
|
|
409
|
+
yarn android
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
#### Runtime Issues
|
|
413
|
+
|
|
414
|
+
**Problem**: SDK initialization fails
|
|
415
|
+
|
|
416
|
+
- Verify your API key is correct
|
|
417
|
+
- Check network connectivity
|
|
418
|
+
- Ensure required permissions are granted
|
|
419
|
+
|
|
420
|
+
**Problem**: TypeScript errors
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
# Solution: Regenerate types
|
|
424
|
+
yarn prepare
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Getting Help
|
|
428
|
+
|
|
429
|
+
1. **Check Documentation**: Review this README and guides
|
|
430
|
+
2. **Search Issues**: Look for existing solutions in GitHub issues
|
|
431
|
+
3. **Ask Questions**: Create a new issue with detailed information
|
|
432
|
+
4. **Community Support**: Join our discussions
|
|
433
|
+
|
|
434
|
+
## Changelog & Release Notes
|
|
435
|
+
|
|
436
|
+
### Quick Links
|
|
437
|
+
|
|
438
|
+
- 📋 **[Changelog](./CHANGELOG.md)**: Complete change history in standard format
|
|
439
|
+
- 📝 **[Release Notes](./RELEASE_NOTES.md)**: Detailed release information with examples
|
|
440
|
+
- 🔄 **[Migration Guide](./MIGRATION.md)**: Version upgrade instructions
|
|
441
|
+
- 📚 **[Deprecation Policy](./DEPRECATION_POLICY.md)**: How we handle deprecations
|
|
442
|
+
|
|
443
|
+
### Recent Updates
|
|
444
|
+
|
|
445
|
+
- **v1.3.0**: Added SBOM generation, multi-instance support, enhanced security
|
|
446
|
+
- **v1.2.x**: Enhanced iOS and Android SDK integration, Firebase Remote Config
|
|
447
|
+
- **v1.1.x**: Initial stable release with core features
|
|
448
|
+
|
|
449
|
+
## Support
|
|
450
|
+
|
|
451
|
+
### Documentation
|
|
452
|
+
|
|
453
|
+
- 📚 **API Reference**: Detailed API documentation
|
|
454
|
+
- 🎯 **Examples**: Working code examples
|
|
455
|
+
- 🔧 **Platform Guides**: iOS and Android specific setup
|
|
456
|
+
- 📋 **Migration Guides**: Version upgrade instructions
|
|
457
|
+
|
|
458
|
+
### Community
|
|
459
|
+
|
|
460
|
+
- 🐛 **Issues**: [GitHub Issues](https://github.com/Capillary/react-native-hydra-lib/issues)
|
|
461
|
+
- 💬 **Discussions**: [GitHub Discussions](https://github.com/Capillary/react-native-hydra-lib/discussions)
|
|
462
|
+
- 📧 **Contact**: [rakesh.ostwal@capillarytech.com](mailto:rakesh.ostwal@capillarytech.com)
|
|
463
|
+
|
|
464
|
+
### Enterprise Support
|
|
465
|
+
|
|
466
|
+
For enterprise customers, we provide:
|
|
467
|
+
|
|
468
|
+
- Priority support and SLA
|
|
469
|
+
- Custom integration assistance
|
|
470
|
+
- Security and compliance consulting
|
|
471
|
+
- Training and onboarding
|
|
472
|
+
|
|
473
|
+
Contact us at [enterprise@capillarytech.com](mailto:enterprise@capillarytech.com)
|
|
474
|
+
|
|
475
|
+
## License
|
|
476
|
+
|
|
477
|
+
MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## About Capillary Technologies
|
|
482
|
+
|
|
483
|
+
[Capillary Technologies](https://www.capillarytech.com/) is a leading provider of customer engagement and commerce solutions. Our Hydra SDK enables businesses to create personalized, omnichannel experiences that drive customer loyalty and growth.
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
**Made with ❤️ by the Capillary Technologies team**
|
|
488
|
+
|
|
489
|
+
_This library was created using [create-react-native-library](https://github.com/callstack/react-native-builder-bob)_
|
|
490
|
+
|
|
491
|
+
|