@onairos/react-native 3.4.1 → 3.6.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.
- package/README.md +423 -374
- package/lib/commonjs/api/index.js +9 -145
- package/lib/commonjs/assets/animations/loaderani.json +1 -0
- package/lib/commonjs/assets/animations/persona-animation.json +1 -0
- package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
- package/lib/commonjs/assets/icons/Gmail.png +0 -0
- package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/icons/Redditicon.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/icons/chatgpt.png +0 -0
- package/lib/commonjs/assets/icons/claude.png +0 -0
- package/lib/commonjs/assets/icons/gemini.png +0 -0
- package/lib/commonjs/assets/icons/grok.png +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -0
- package/lib/commonjs/assets/images/EnochE.svg +19 -0
- package/lib/commonjs/assets/images/Enochicon1.png +0 -0
- package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
- package/lib/commonjs/assets/images/Facebookicon.png +0 -0
- package/lib/commonjs/assets/images/Gmail.png +0 -0
- package/lib/commonjs/assets/images/Googlelogo.png +0 -0
- package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/images/OnairosNewLogo.png +0 -0
- package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +20 -0
- package/lib/commonjs/assets/images/basicproficon.svg +43 -0
- package/lib/commonjs/assets/images/basicprofile.svg +3 -0
- package/lib/commonjs/assets/images/chatgpt.png +0 -0
- package/lib/commonjs/assets/images/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/claude.png +0 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -0
- package/lib/commonjs/assets/images/gemini.png +0 -0
- package/lib/commonjs/assets/images/grok.png +0 -0
- package/lib/commonjs/assets/images/persona1.png +0 -0
- package/lib/commonjs/assets/images/persona2.png +0 -0
- package/lib/commonjs/assets/images/persona3.png +0 -0
- package/lib/commonjs/assets/images/persona4.png +0 -0
- package/lib/commonjs/assets/images/persona5.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -0
- package/lib/commonjs/assets/images/x-close.svg +3 -0
- package/lib/commonjs/components/BodyText.js +9 -0
- package/lib/commonjs/components/BrandMark.js +10 -0
- package/lib/commonjs/components/CodeInput.js +9 -0
- package/lib/commonjs/components/EmailInput.js +8 -0
- package/lib/commonjs/components/GoogleButton.js +9 -0
- package/lib/commonjs/components/HeadingGroup.js +9 -0
- package/lib/commonjs/components/LLMDataInputModal.js +14 -0
- package/lib/commonjs/components/ModalHeader.js +9 -0
- package/lib/commonjs/components/ModalSheet.js +9 -0
- package/lib/commonjs/components/Onairos.js +14 -374
- package/lib/commonjs/components/OnairosButton.js +13 -309
- package/lib/commonjs/components/OnairosSignInButton.js +12 -0
- package/lib/commonjs/components/Overlay.js +13 -483
- package/lib/commonjs/components/PersonaImage.js +10 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
- package/lib/commonjs/components/PinCreationScreen.js +12 -0
- package/lib/commonjs/components/PinInput.js +9 -302
- package/lib/commonjs/components/PlatformConnectorsStep.js +23 -0
- package/lib/commonjs/components/PlatformList.js +10 -137
- package/lib/commonjs/components/PlatformToggle.js +9 -0
- package/lib/commonjs/components/PrimaryButton.js +10 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
- package/lib/commonjs/components/SignInStep.js +12 -0
- package/lib/commonjs/components/UniversalOnboarding.js +30 -1702
- package/lib/commonjs/components/VerificationStep.js +11 -0
- package/lib/commonjs/components/WelcomeScreen.js +22 -0
- package/lib/commonjs/components/icons/Basicproficon.js +8 -0
- package/lib/commonjs/components/icons/Basicprofile.js +8 -0
- package/lib/commonjs/components/icons/Checkbox.js +8 -0
- package/lib/commonjs/components/icons/Checkmark.js +8 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
- package/lib/commonjs/components/icons/Contenticon.js +8 -0
- package/lib/commonjs/components/icons/EnochE.js +8 -0
- package/lib/commonjs/components/icons/Personalityicon.js +8 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
- package/lib/commonjs/components/icons/Userpreferences.js +8 -0
- package/lib/commonjs/components/icons/index.js +17 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +18 -827
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
- package/lib/commonjs/components/onboarding/PinInput.js +10 -283
- package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
- package/lib/commonjs/config/api.js +7 -0
- package/lib/commonjs/constants/index.js +7 -83
- package/lib/commonjs/context/AuthContext.js +10 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
- package/lib/commonjs/hooks/useConnections.js +8 -159
- package/lib/commonjs/hooks/useCredentials.js +10 -177
- package/lib/commonjs/hooks/useUserConnections.js +10 -0
- package/lib/commonjs/index.js +34 -106
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/commonjs/services/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -952
- package/lib/commonjs/services/authService.js +10 -0
- package/lib/commonjs/services/biometricPinService.js +8 -0
- package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
- package/lib/commonjs/services/chatGPTConversationService.js +9 -0
- package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
- package/lib/commonjs/services/claudeConversationService.js +9 -0
- package/lib/commonjs/services/connectedAccountsService.js +10 -0
- package/lib/commonjs/services/googleAuthService.js +11 -0
- package/lib/commonjs/services/hingeDataExtractor.js +8 -0
- package/lib/commonjs/services/hingeDataService.js +9 -0
- package/lib/commonjs/services/imageCompressionService.js +7 -0
- package/lib/commonjs/services/instagramDataExtractor.js +8 -0
- package/lib/commonjs/services/instagramDataService.js +9 -0
- package/lib/commonjs/services/jwtStorageService.js +7 -0
- package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
- package/lib/commonjs/services/linkedinProfileService.js +9 -0
- package/lib/commonjs/services/linkedinScrapingService.js +8 -0
- package/lib/commonjs/services/llmDataStorage.js +8 -0
- package/lib/commonjs/services/mobileTrainingService.js +8 -0
- package/lib/commonjs/services/oauthService.js +11 -390
- package/lib/commonjs/services/pinEncryptionService.js +8 -0
- package/lib/commonjs/services/pinStorageUtils.js +7 -0
- package/lib/commonjs/services/platformAuthService.js +12 -1067
- package/lib/commonjs/services/sephoraDataExtractor.js +8 -0
- package/lib/commonjs/services/sephoraDataService.js +9 -0
- package/lib/commonjs/services/storageService.js +8 -0
- package/lib/commonjs/services/telegramDataExtractor.js +8 -0
- package/lib/commonjs/services/telegramDataService.js +11 -0
- package/lib/commonjs/services/trainingApiHelpers.js +7 -0
- package/lib/commonjs/services/userConnectionsService.js +10 -0
- package/lib/commonjs/services/youtubeMigrationService.js +10 -0
- package/lib/commonjs/theme/index.js +7 -0
- package/lib/commonjs/types/ambient.d.js +1 -2
- package/lib/commonjs/types/declarations.d.js +1 -2
- package/lib/commonjs/types/index.js +1 -6
- package/lib/commonjs/types/node-fix.d.js +1 -2
- package/lib/commonjs/types/node-override.d.js +1 -2
- package/lib/commonjs/types/opacity.d.js +1 -2
- package/lib/commonjs/types.js +1 -14
- package/lib/commonjs/utils/Portal.js +8 -98
- package/lib/commonjs/utils/api.js +9 -129
- package/lib/commonjs/utils/assetRegistry.js +33 -0
- package/lib/commonjs/utils/auth.js +9 -111
- package/lib/commonjs/utils/connectorTests.js +29 -0
- package/lib/commonjs/utils/crypto.js +8 -62
- package/lib/commonjs/utils/debugHelper.js +1 -64
- package/lib/commonjs/utils/encryption.js +7 -76
- package/lib/commonjs/utils/eventUtils.js +1 -0
- package/lib/commonjs/utils/haptics.js +9 -0
- package/lib/commonjs/utils/imagePreloader.js +1 -0
- package/lib/commonjs/utils/networkDiagnostics.js +8 -0
- package/lib/commonjs/utils/onairosApi.js +9 -350
- package/lib/commonjs/utils/programmaticFlow.js +9 -117
- package/lib/commonjs/utils/retryHelper.js +1 -220
- package/lib/commonjs/utils/secureStorage.js +10 -349
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +13 -0
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -0
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -0
- package/lib/module/api/index.js +1 -139
- package/lib/module/assets/animations/loaderani.json +1 -0
- package/lib/module/assets/animations/persona-animation.json +1 -0
- package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/module/assets/icons/Facebookicon.png +0 -0
- package/lib/module/assets/icons/Gmail.png +0 -0
- package/lib/module/assets/icons/Linkedinicon.png +0 -0
- package/lib/module/assets/icons/Redditicon.png +0 -0
- package/lib/module/assets/icons/YouTubeicon2.png +0 -0
- package/lib/module/assets/icons/YouTubeicon3.png +0 -0
- package/lib/module/assets/icons/chatgpt.png +0 -0
- package/lib/module/assets/icons/claude.png +0 -0
- package/lib/module/assets/icons/farcaster.png +0 -0
- package/lib/module/assets/icons/gemini.png +0 -0
- package/lib/module/assets/icons/grok.png +0 -0
- package/lib/module/assets/icons/instagram.png +0 -0
- package/lib/module/assets/icons/pinterest.png +0 -0
- package/lib/module/assets/icons/swerv_logo.png +0 -0
- package/lib/module/assets/icons/twitter.jpg +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -0
- package/lib/module/assets/images/EnochE.svg +19 -0
- package/lib/module/assets/images/Enochicon1.png +0 -0
- package/lib/module/assets/images/Face_ID_logo.png +0 -0
- package/lib/module/assets/images/Facebookicon.png +0 -0
- package/lib/module/assets/images/Gmail.png +0 -0
- package/lib/module/assets/images/Googlelogo.png +0 -0
- package/lib/module/assets/images/Linkedinicon.png +0 -0
- package/lib/module/assets/images/OnairosNewLogo.png +0 -0
- package/lib/module/assets/images/Onairoslogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -0
- package/lib/module/assets/images/Personalitytraits.svg +3 -0
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +3 -0
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +20 -0
- package/lib/module/assets/images/basicproficon.svg +43 -0
- package/lib/module/assets/images/basicprofile.svg +3 -0
- package/lib/module/assets/images/chatgpt.png +0 -0
- package/lib/module/assets/images/checkmark.svg +4 -0
- package/lib/module/assets/images/claude.png +0 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -0
- package/lib/module/assets/images/gemini.png +0 -0
- package/lib/module/assets/images/grok.png +0 -0
- package/lib/module/assets/images/persona1.png +0 -0
- package/lib/module/assets/images/persona2.png +0 -0
- package/lib/module/assets/images/persona3.png +0 -0
- package/lib/module/assets/images/persona4.png +0 -0
- package/lib/module/assets/images/persona5.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -0
- package/lib/module/assets/images/x-close.svg +3 -0
- package/lib/module/components/BodyText.js +1 -0
- package/lib/module/components/BrandMark.js +1 -0
- package/lib/module/components/CodeInput.js +1 -0
- package/lib/module/components/EmailInput.js +1 -0
- package/lib/module/components/GoogleButton.js +1 -0
- package/lib/module/components/HeadingGroup.js +1 -0
- package/lib/module/components/LLMDataInputModal.js +8 -0
- package/lib/module/components/ModalHeader.js +1 -0
- package/lib/module/components/ModalSheet.js +1 -0
- package/lib/module/components/Onairos.js +1 -367
- package/lib/module/components/OnairosButton.js +1 -302
- package/lib/module/components/OnairosSignInButton.js +1 -0
- package/lib/module/components/Overlay.js +1 -474
- package/lib/module/components/PersonaImage.js +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +1 -0
- package/lib/module/components/PinCreationScreen.js +1 -0
- package/lib/module/components/PinInput.js +1 -293
- package/lib/module/components/PlatformConnectorsStep.js +7 -0
- package/lib/module/components/PlatformList.js +1 -129
- package/lib/module/components/PlatformToggle.js +1 -0
- package/lib/module/components/PrimaryButton.js +1 -0
- package/lib/module/components/SignInMatchAnimation.js +1 -0
- package/lib/module/components/SignInStep.js +1 -0
- package/lib/module/components/UniversalOnboarding.js +1 -1693
- package/lib/module/components/VerificationStep.js +1 -0
- package/lib/module/components/WelcomeScreen.js +1 -0
- package/lib/module/components/icons/Basicproficon.js +1 -0
- package/lib/module/components/icons/Basicprofile.js +1 -0
- package/lib/module/components/icons/Checkbox.js +1 -0
- package/lib/module/components/icons/Checkmark.js +1 -0
- package/lib/module/components/icons/Contentanalysis.js +1 -0
- package/lib/module/components/icons/Contenticon.js +1 -0
- package/lib/module/components/icons/EnochE.js +1 -0
- package/lib/module/components/icons/Personalityicon.js +1 -0
- package/lib/module/components/icons/Personalityprofile.js +1 -0
- package/lib/module/components/icons/Personalitytraits.js +1 -0
- package/lib/module/components/icons/Userpreferences.js +1 -0
- package/lib/module/components/icons/index.js +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +1 -818
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
- package/lib/module/components/onboarding/PinInput.js +1 -274
- package/lib/module/components/onboarding/PlatformConnector.js +1 -240
- package/lib/module/config/api.js +1 -0
- package/lib/module/constants/index.js +1 -77
- package/lib/module/context/AuthContext.js +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +1 -0
- package/lib/module/hooks/useConnections.js +1 -152
- package/lib/module/hooks/useCredentials.js +6 -169
- package/lib/module/hooks/useUserConnections.js +1 -0
- package/lib/module/index.js +1 -32
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/module/services/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -925
- package/lib/module/services/authService.js +1 -0
- package/lib/module/services/biometricPinService.js +1 -0
- package/lib/module/services/chatGPTConversationExtractor.js +1 -0
- package/lib/module/services/chatGPTConversationService.js +1 -0
- package/lib/module/services/claudeConversationExtractor.js +1 -0
- package/lib/module/services/claudeConversationService.js +1 -0
- package/lib/module/services/connectedAccountsService.js +1 -0
- package/lib/module/services/googleAuthService.js +1 -0
- package/lib/module/services/hingeDataExtractor.js +1 -0
- package/lib/module/services/hingeDataService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -0
- package/lib/module/services/instagramDataExtractor.js +1 -0
- package/lib/module/services/instagramDataService.js +1 -0
- package/lib/module/services/jwtStorageService.js +1 -0
- package/lib/module/services/linkedinDOMExtractor.js +1 -0
- package/lib/module/services/linkedinProfileService.js +1 -0
- package/lib/module/services/linkedinScrapingService.js +1 -0
- package/lib/module/services/llmDataStorage.js +1 -0
- package/lib/module/services/mobileTrainingService.js +1 -0
- package/lib/module/services/oauthService.js +1 -380
- package/lib/module/services/pinEncryptionService.js +7 -0
- package/lib/module/services/pinStorageUtils.js +1 -0
- package/lib/module/services/platformAuthService.js +1 -1041
- package/lib/module/services/sephoraDataExtractor.js +1 -0
- package/lib/module/services/sephoraDataService.js +1 -0
- package/lib/module/services/storageService.js +1 -0
- package/lib/module/services/telegramDataExtractor.js +1 -0
- package/lib/module/services/telegramDataService.js +8 -0
- package/lib/module/services/trainingApiHelpers.js +1 -0
- package/lib/module/services/userConnectionsService.js +1 -0
- package/lib/module/services/youtubeMigrationService.js +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/types.js +1 -10
- package/lib/module/utils/Portal.js +1 -90
- package/lib/module/utils/api.js +1 -117
- package/lib/module/utils/assetRegistry.js +33 -0
- package/lib/module/utils/auth.js +1 -99
- package/lib/module/utils/connectorTests.js +28 -0
- package/lib/module/utils/crypto.js +1 -54
- package/lib/module/utils/debugHelper.js +1 -54
- package/lib/module/utils/encryption.js +1 -67
- package/lib/module/utils/eventUtils.js +1 -0
- package/lib/module/utils/haptics.js +8 -0
- package/lib/module/utils/imagePreloader.js +1 -0
- package/lib/module/utils/networkDiagnostics.js +1 -0
- package/lib/module/utils/onairosApi.js +1 -333
- package/lib/module/utils/programmaticFlow.js +1 -111
- package/lib/module/utils/retryHelper.js +1 -211
- package/lib/module/utils/secureStorage.js +6 -330
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/module/utils/webviewScripts/claude.js +1 -0
- package/lib/module/utils/webviewScripts/hinge.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -0
- package/lib/module/utils/webviewScripts/instagram.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -0
- package/lib/module/utils/webviewScripts/sephora.js +1 -0
- package/lib/module/utils/webviewScripts/telegram.js +1 -0
- package/package.json +62 -39
- package/lib/commonjs/api/index.js.map +0 -1
- package/lib/commonjs/assets/images/email.png +0 -0
- package/lib/commonjs/assets/images/linkedin.png +0 -0
- package/lib/commonjs/assets/images/reddit.png +0 -0
- package/lib/commonjs/assets/images/youtube.png +0 -0
- package/lib/commonjs/components/DataRequestModal.js +0 -228
- package/lib/commonjs/components/DataRequestModal.js.map +0 -1
- package/lib/commonjs/components/DataRequestScreen.js +0 -329
- package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
- package/lib/commonjs/components/EmailVerificationModal.js +0 -320
- package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
- package/lib/commonjs/components/Onairos.js.map +0 -1
- package/lib/commonjs/components/OnairosButton.js.map +0 -1
- package/lib/commonjs/components/Overlay.js.map +0 -1
- package/lib/commonjs/components/PinInput.js.map +0 -1
- package/lib/commonjs/components/PlatformList.js.map +0 -1
- package/lib/commonjs/components/TrainingModal.js +0 -717
- package/lib/commonjs/components/TrainingModal.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
- package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
- package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/hooks/useConnections.js.map +0 -1
- package/lib/commonjs/hooks/useCredentials.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/services/apiKeyService.js.map +0 -1
- package/lib/commonjs/services/oauthService.js.map +0 -1
- package/lib/commonjs/services/platformAuthService.js.map +0 -1
- package/lib/commonjs/types/ambient.d.js.map +0 -1
- package/lib/commonjs/types/declarations.d.js.map +0 -1
- package/lib/commonjs/types/index.d.js.map +0 -1
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/types/node-fix.d.js.map +0 -1
- package/lib/commonjs/types/node-override.d.js.map +0 -1
- package/lib/commonjs/types/opacity.d.js.map +0 -1
- package/lib/commonjs/types/types.d.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils/Portal.js.map +0 -1
- package/lib/commonjs/utils/api.js.map +0 -1
- package/lib/commonjs/utils/auth.js.map +0 -1
- package/lib/commonjs/utils/crypto.js.map +0 -1
- package/lib/commonjs/utils/debugHelper.js.map +0 -1
- package/lib/commonjs/utils/encryption.js.map +0 -1
- package/lib/commonjs/utils/onairosApi.js.map +0 -1
- package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
- package/lib/commonjs/utils/retryHelper.js.map +0 -1
- package/lib/commonjs/utils/secureStorage.js.map +0 -1
- package/lib/module/api/index.js.map +0 -1
- package/lib/module/assets/images/email.png +0 -0
- package/lib/module/assets/images/linkedin.png +0 -0
- package/lib/module/assets/images/reddit.png +0 -0
- package/lib/module/assets/images/youtube.png +0 -0
- package/lib/module/components/DataRequestModal.js +0 -220
- package/lib/module/components/DataRequestModal.js.map +0 -1
- package/lib/module/components/DataRequestScreen.js +0 -321
- package/lib/module/components/DataRequestScreen.js.map +0 -1
- package/lib/module/components/EmailVerificationModal.js +0 -311
- package/lib/module/components/EmailVerificationModal.js.map +0 -1
- package/lib/module/components/Onairos.js.map +0 -1
- package/lib/module/components/OnairosButton.js.map +0 -1
- package/lib/module/components/Overlay.js.map +0 -1
- package/lib/module/components/PinInput.js.map +0 -1
- package/lib/module/components/PlatformList.js.map +0 -1
- package/lib/module/components/TrainingModal.js +0 -708
- package/lib/module/components/TrainingModal.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/module/components/onboarding/PinInput.js.map +0 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/module/components/screens/ConnectorScreen.js +0 -138
- package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/module/components/screens/LoadingScreen.js +0 -83
- package/lib/module/components/screens/LoadingScreen.js.map +0 -1
- package/lib/module/components/screens/PinCreationScreen.js +0 -53
- package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/module/constants/index.js.map +0 -1
- package/lib/module/hooks/useConnections.js.map +0 -1
- package/lib/module/hooks/useCredentials.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/services/apiKeyService.js.map +0 -1
- package/lib/module/services/oauthService.js.map +0 -1
- package/lib/module/services/platformAuthService.js.map +0 -1
- package/lib/module/types/ambient.d.js.map +0 -1
- package/lib/module/types/declarations.d.js.map +0 -1
- package/lib/module/types/index.d.js.map +0 -1
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/types/node-fix.d.js.map +0 -1
- package/lib/module/types/node-override.d.js.map +0 -1
- package/lib/module/types/opacity.d.js.map +0 -1
- package/lib/module/types/types.d.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils/Portal.js.map +0 -1
- package/lib/module/utils/api.js.map +0 -1
- package/lib/module/utils/auth.js.map +0 -1
- package/lib/module/utils/crypto.js.map +0 -1
- package/lib/module/utils/debugHelper.js.map +0 -1
- package/lib/module/utils/encryption.js.map +0 -1
- package/lib/module/utils/onairosApi.js.map +0 -1
- package/lib/module/utils/programmaticFlow.js.map +0 -1
- package/lib/module/utils/retryHelper.js.map +0 -1
- package/lib/module/utils/secureStorage.js.map +0 -1
- package/lib/typescript/api/index.d.ts +0 -8
- package/lib/typescript/api/index.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestModal.d.ts +0 -11
- package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
- package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
- package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
- package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
- package/lib/typescript/components/Onairos.d.ts +0 -4
- package/lib/typescript/components/Onairos.d.ts.map +0 -1
- package/lib/typescript/components/OnairosButton.d.ts +0 -12
- package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
- package/lib/typescript/components/Overlay.d.ts +0 -4
- package/lib/typescript/components/Overlay.d.ts.map +0 -1
- package/lib/typescript/components/PinInput.d.ts +0 -4
- package/lib/typescript/components/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/PlatformList.d.ts +0 -4
- package/lib/typescript/components/PlatformList.d.ts.map +0 -1
- package/lib/typescript/components/TrainingModal.d.ts +0 -4
- package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
- package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
- package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
- package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
- package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts +0 -53
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useConnections.d.ts +0 -9
- package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
- package/lib/typescript/hooks/useCredentials.d.ts +0 -9
- package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -18
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/services/apiKeyService.d.ts +0 -132
- package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
- package/lib/typescript/services/oauthService.d.ts +0 -50
- package/lib/typescript/services/oauthService.d.ts.map +0 -1
- package/lib/typescript/services/platformAuthService.d.ts +0 -144
- package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts +0 -231
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -270
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils/Portal.d.ts +0 -14
- package/lib/typescript/utils/Portal.d.ts.map +0 -1
- package/lib/typescript/utils/api.d.ts +0 -6
- package/lib/typescript/utils/api.d.ts.map +0 -1
- package/lib/typescript/utils/auth.d.ts +0 -6
- package/lib/typescript/utils/auth.d.ts.map +0 -1
- package/lib/typescript/utils/crypto.d.ts +0 -4
- package/lib/typescript/utils/crypto.d.ts.map +0 -1
- package/lib/typescript/utils/debugHelper.d.ts +0 -29
- package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
- package/lib/typescript/utils/encryption.d.ts +0 -19
- package/lib/typescript/utils/encryption.d.ts.map +0 -1
- package/lib/typescript/utils/onairosApi.d.ts +0 -87
- package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
- package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
- package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
- package/lib/typescript/utils/retryHelper.d.ts +0 -69
- package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
- package/lib/typescript/utils/secureStorage.d.ts +0 -94
- package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
- package/src/api/index.ts +0 -111
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/onairos_logo.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/DataRequestModal.tsx +0 -227
- package/src/components/DataRequestScreen.tsx +0 -356
- package/src/components/EmailVerificationModal.tsx +0 -364
- package/src/components/Onairos.tsx +0 -425
- package/src/components/OnairosButton.tsx +0 -359
- package/src/components/Overlay.tsx +0 -506
- package/src/components/PinInput.tsx +0 -343
- package/src/components/PlatformList.tsx +0 -145
- package/src/components/TrainingModal.tsx +0 -737
- package/src/components/UniversalOnboarding.tsx +0 -1839
- package/src/components/UniversalOnboarding.tsx.new +0 -455
- package/src/components/onboarding/OAuthWebView.tsx +0 -838
- package/src/components/onboarding/OnboardingHeader.tsx +0 -70
- package/src/components/onboarding/PinInput.tsx +0 -356
- package/src/components/onboarding/PlatformConnector.tsx +0 -302
- package/src/components/screens/ConnectorScreen.tsx +0 -153
- package/src/components/screens/LoadingScreen.tsx +0 -100
- package/src/components/screens/PinCreationScreen.tsx +0 -67
- package/src/constants/index.ts +0 -83
- package/src/hooks/useConnections.ts +0 -163
- package/src/hooks/useCredentials.ts +0 -175
- package/src/index.js +0 -14
- package/src/index.ts +0 -50
- package/src/services/SDK_API_KEY_VALIDATION.md +0 -421
- package/src/services/apiKeyService.ts +0 -984
- package/src/services/oauthService.ts +0 -412
- package/src/services/platformAuthService.ts +0 -1113
- package/src/types/ambient.d.ts +0 -29
- package/src/types/declarations.d.ts +0 -26
- package/src/types/index.d.ts +0 -274
- package/src/types/index.ts +0 -244
- package/src/types/node-fix.d.ts +0 -19
- package/src/types/node-override.d.ts +0 -24
- package/src/types/opacity.d.ts +0 -16
- package/src/types/types.d.ts +0 -18
- package/src/types.ts +0 -298
- package/src/utils/Portal.tsx +0 -83
- package/src/utils/api.js +0 -112
- package/src/utils/auth.js +0 -104
- package/src/utils/crypto.js +0 -60
- package/src/utils/debugHelper.ts +0 -53
- package/src/utils/encryption.ts +0 -69
- package/src/utils/onairosApi.ts +0 -391
- package/src/utils/programmaticFlow.ts +0 -113
- package/src/utils/retryHelper.ts +0 -275
- package/src/utils/secureStorage.ts +0 -361
- package/types/index.d.ts +0 -218
- package/types/node-env.d.ts +0 -15
- /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
|
@@ -1,159 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
// Create a mock storage for environments without Keychain access (like Expo Go)
|
|
10
|
-
const mockConnectionStorage = {};
|
|
11
|
-
|
|
12
|
-
// Try to import Keychain, but provide fallbacks if not available
|
|
13
|
-
let Keychain = null;
|
|
14
|
-
try {
|
|
15
|
-
// This import might fail in Expo Go or environments without native modules
|
|
16
|
-
Keychain = require('react-native-keychain');
|
|
17
|
-
} catch (error) {
|
|
18
|
-
console.warn('react-native-keychain module not available in useConnections, using mock storage');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Check if Keychain is properly initialized and available
|
|
22
|
-
const isKeychainAvailable = () => {
|
|
23
|
-
try {
|
|
24
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
25
|
-
} catch (e) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const useConnections = () => {
|
|
30
|
-
const [isConnecting, setIsConnecting] = (0, _react.useState)(false);
|
|
31
|
-
const getConnectionStatus = (0, _react.useCallback)(async () => {
|
|
32
|
-
try {
|
|
33
|
-
if (isKeychainAvailable()) {
|
|
34
|
-
try {
|
|
35
|
-
const stored = await Keychain.getGenericPassword({
|
|
36
|
-
service: _constants.STORAGE_KEYS.connections
|
|
37
|
-
});
|
|
38
|
-
if (stored && stored.password) {
|
|
39
|
-
const parsed = JSON.parse(stored.password);
|
|
40
|
-
// Validate the parsed data structure
|
|
41
|
-
if (parsed && typeof parsed === 'object') {
|
|
42
|
-
return parsed;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
} catch (keychainError) {
|
|
46
|
-
console.warn('Keychain access failed, using fallback:', keychainError);
|
|
47
|
-
// Clear corrupted data
|
|
48
|
-
try {
|
|
49
|
-
await Keychain.resetGenericPassword({
|
|
50
|
-
service: _constants.STORAGE_KEYS.connections
|
|
51
|
-
});
|
|
52
|
-
} catch (resetError) {
|
|
53
|
-
console.warn('Failed to reset keychain:', resetError);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Use in-memory mock storage if Keychain is not available or failed
|
|
59
|
-
const mockData = mockConnectionStorage[_constants.STORAGE_KEYS.connections] || {};
|
|
60
|
-
console.log('Using mock connection storage:', mockData);
|
|
61
|
-
return mockData;
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error('Error getting connection status:', error);
|
|
64
|
-
|
|
65
|
-
// Always return empty object as safe fallback
|
|
66
|
-
console.log('Returning empty connections due to error');
|
|
67
|
-
return {};
|
|
68
|
-
}
|
|
69
|
-
}, []);
|
|
70
|
-
const saveConnectionStatus = (0, _react.useCallback)(async status => {
|
|
71
|
-
try {
|
|
72
|
-
if (isKeychainAvailable()) {
|
|
73
|
-
await Keychain.setGenericPassword('connections', JSON.stringify(status), {
|
|
74
|
-
service: _constants.STORAGE_KEYS.connections
|
|
75
|
-
});
|
|
76
|
-
} else {
|
|
77
|
-
// Use in-memory mock storage if Keychain is not available
|
|
78
|
-
mockConnectionStorage[_constants.STORAGE_KEYS.connections] = status;
|
|
79
|
-
}
|
|
80
|
-
} catch (error) {
|
|
81
|
-
console.error('Error saving connection status:', error);
|
|
82
|
-
// Save to mock storage as fallback
|
|
83
|
-
mockConnectionStorage[_constants.STORAGE_KEYS.connections] = status;
|
|
84
|
-
}
|
|
85
|
-
}, []);
|
|
86
|
-
const connectPlatform = (0, _react.useCallback)(async platform => {
|
|
87
|
-
setIsConnecting(true);
|
|
88
|
-
try {
|
|
89
|
-
console.log(`[Mock] Connecting to ${platform}`);
|
|
90
|
-
|
|
91
|
-
// Simulate connection delay
|
|
92
|
-
await new Promise(resolve => {
|
|
93
|
-
setTimeout(() => resolve(), 1000);
|
|
94
|
-
});
|
|
95
|
-
const status = await getConnectionStatus();
|
|
96
|
-
status[platform] = {
|
|
97
|
-
userName: `Mock User (${platform})`,
|
|
98
|
-
connected: true
|
|
99
|
-
};
|
|
100
|
-
await saveConnectionStatus(status);
|
|
101
|
-
console.log(`[Mock] Successfully connected to ${platform}`);
|
|
102
|
-
} catch (error) {
|
|
103
|
-
console.error(`Error connecting to ${platform}:`, error);
|
|
104
|
-
// In development, provide mock data even on error
|
|
105
|
-
if (__DEV__) {
|
|
106
|
-
const status = {
|
|
107
|
-
[platform]: {
|
|
108
|
-
userName: `Fallback User (${platform})`,
|
|
109
|
-
connected: true
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
await saveConnectionStatus(status);
|
|
113
|
-
} else {
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
} finally {
|
|
117
|
-
setIsConnecting(false);
|
|
118
|
-
}
|
|
119
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
120
|
-
const disconnectPlatform = (0, _react.useCallback)(async platform => {
|
|
121
|
-
try {
|
|
122
|
-
const status = await getConnectionStatus();
|
|
123
|
-
if (status && platform in status) {
|
|
124
|
-
delete status[platform];
|
|
125
|
-
await saveConnectionStatus(status);
|
|
126
|
-
}
|
|
127
|
-
} catch (error) {
|
|
128
|
-
console.error(`Error disconnecting ${platform}:`, error);
|
|
129
|
-
// Don't throw in development mode
|
|
130
|
-
if (!__DEV__) {
|
|
131
|
-
throw error;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
135
|
-
const handleOAuthCallback = (0, _react.useCallback)(async (platform, data) => {
|
|
136
|
-
try {
|
|
137
|
-
console.log(`[Mock] Handling callback for ${platform}`);
|
|
138
|
-
const status = await getConnectionStatus();
|
|
139
|
-
status[platform] = {
|
|
140
|
-
userName: data.userName || `Mock User (${platform})`,
|
|
141
|
-
connected: true
|
|
142
|
-
};
|
|
143
|
-
await saveConnectionStatus(status);
|
|
144
|
-
return true;
|
|
145
|
-
} catch (error) {
|
|
146
|
-
console.error('Error handling callback:', error);
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
150
|
-
return {
|
|
151
|
-
isConnecting,
|
|
152
|
-
connectPlatform,
|
|
153
|
-
disconnectPlatform,
|
|
154
|
-
getConnectionStatus,
|
|
155
|
-
handleOAuthCallback
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
exports.useConnections = useConnections;
|
|
159
|
-
//# sourceMappingURL=useConnections.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react"),
|
|
5
|
+
require("../services/platformAuthService")
|
|
6
|
+
];
|
|
7
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
+
function _0x36f5(_0x108926,_0x36f506){_0x108926=_0x108926-0x0;const _0x55f2ca=_0x1089();let _0x1f627b=_0x55f2ca[_0x108926];return _0x1f627b;}Object[_0x36f5(0x0)](exports,'__esModule',{'value':!![]}),exports['useConnections']=void 0x0;var _react=__ONAIROS_REQ_FUNC__(0x0),_platformAuthService=__ONAIROS_REQ_FUNC__(0x1);const useConnections=()=>{const _0x29259e={'EMxcR':function(_0x5bc7a0,_0x32ce78){return _0x5bc7a0(_0x32ce78);},'BqVXR':_0x36f5(0x1),'nyRTf':function(_0x7dca1c,_0x4453a9){return _0x7dca1c===_0x4453a9;},'fbJed':_0x36f5(0x2),'FfYcJ':function(_0x916d90,_0x2ac331){return _0x916d90!==_0x2ac331;},'gyyKZ':_0x36f5(0x3),'EwZhc':_0x36f5(0x4),'ITBlp':function(_0x45700d,_0x37e9ee){return _0x45700d!==_0x37e9ee;},'BHXZZ':_0x36f5(0x5),'kCiNJ':_0x36f5(0x6),'kGths':_0x36f5(0x7),'crXqA':_0x36f5(0x8),'fxkDC':function(_0x2b2702,_0x17da42){return _0x2b2702(_0x17da42);}},[_0x40ebfd,_0x33a1c8]=(0x0,_react[_0x36f5(0x9)])({}),[_0x241637,_0x5b8379]=(0x0,_react['useState'])(![]),_0x4d4a2e=(0x0,_react[_0x36f5(0xa)])(async(_0x5c2381,_0x4dfdeb)=>{const _0x2bb114={'ikZfP':function(_0xa32fad,_0x5bb56b){return _0xa32fad(_0x5bb56b);}};try{_0x29259e[_0x36f5(0xb)](_0x5b8379,!![]);const useNativeSDK=_0x5c2381===_0x29259e['BqVXR']||_0x29259e['nyRTf'](_0x5c2381,_0x36f5(0xc));let _0x4a9516=![];if(useNativeSDK)_0x4a9516=await(0x0,_platformAuthService['initiateNativeAuth'])(_0x5c2381,_0x4dfdeb);else{if(_0x29259e[_0x36f5(0xd)](_0x29259e[_0x36f5(0xe)],_0x29259e[_0x36f5(0xe)]))await new Promise(_0x2846d6=>setTimeout(()=>_0x2846d6(undefined),0x3e8)),_0x4a9516=!![];else return _0x317bc5;}if(_0x4a9516){if(_0x29259e[_0x36f5(0xf)](_0x29259e[_0x36f5(0x10)],_0x29259e[_0x36f5(0x10)]))_0x2bb114[_0x36f5(0x11)](_0x2bddb1,![]);else return _0x33a1c8(_0x1c5bc9=>({..._0x1c5bc9,[_0x5c2381]:{'userName':_0x4dfdeb,'connected':!![]}})),console[_0x36f5(0x12)](_0x36f5(0x13)+_0x5c2381+_0x36f5(0x14)),console[_0x36f5(0x12)](_0x29259e[_0x36f5(0x15)]),!![];}return![];}catch(_0x509541){return console[_0x36f5(0x16)](_0x36f5(0x17)+_0x5c2381+':',_0x509541),![];}finally{if(_0x29259e[_0x36f5(0x18)](_0x29259e[_0x36f5(0x19)],_0x29259e[_0x36f5(0x1a)]))_0x5b8379(![]);else try{return _0x29259e[_0x36f5(0xb)](_0xb263f,_0x12878e=>{const _0x4d5974={..._0x12878e};return delete _0x4d5974[_0x142117],_0x4d5974;}),_0x219179[_0x36f5(0x12)](_0x36f5(0x13)+_0xe897e0+_0x36f5(0x1b)),_0x4cf3bf[_0x36f5(0x12)](_0x36f5(0x4)),!![];}catch(_0x2b567){return _0x562f81[_0x36f5(0x16)](_0x36f5(0x1c)+_0xc54d5+':',_0x2b567),![];}}},[]),_0x2c93f1=(0x0,_react['useCallback'])(async(_0x3251ba,_0x30523f)=>{const _0x162cf0={'EkMcy':function(_0x138be4,_0x32f2f9){return _0x29259e[_0x36f5(0xb)](_0x138be4,_0x32f2f9);},'yfXup':_0x29259e[_0x36f5(0x15)],'ELmfW':function(_0x24a026,_0x12c761){return _0x24a026!==_0x12c761;},'hEOrZ':_0x29259e[_0x36f5(0x1d)],'CdGii':_0x29259e[_0x36f5(0x1e)]};try{return _0x36f5(0x1f)!==_0x36f5(0x20)?(_0x29259e[_0x36f5(0x21)](_0x33a1c8,_0x5f1821=>{if(_0x162cf0[_0x36f5(0x22)](_0x162cf0[_0x36f5(0x23)],_0x162cf0['CdGii'])){const _0x45c159={..._0x5f1821};return delete _0x45c159[_0x3251ba],_0x45c159;}else return _0x162cf0['EkMcy'](_0x3d441e,_0x30e096=>({..._0x30e096,[_0x20dc15]:{'userName':_0x5046f3,'connected':!![]}})),_0x1ea711[_0x36f5(0x12)](_0x36f5(0x13)+_0xbbb920+_0x36f5(0x14)),_0x43f148['log'](_0x162cf0[_0x36f5(0x24)]),!![];}),console[_0x36f5(0x12)](_0x36f5(0x13)+_0x3251ba+_0x36f5(0x1b)),console['log'](_0x29259e[_0x36f5(0x15)]),!![]):(_0x162cf0['EkMcy'](_0x13d40e,_0x3aeefe=>{const _0x2e3b34={..._0x3aeefe};return delete _0x2e3b34[_0x1a0c3c],_0x2e3b34;}),_0x11ed1c[_0x36f5(0x12)](_0x36f5(0x13)+_0x49bba7+'\x20disconnected\x20locally'),_0x5c9329[_0x36f5(0x12)](_0x162cf0['yfXup']),!![]);}catch(_0x187f9d){return console[_0x36f5(0x16)](_0x36f5(0x1c)+_0x3251ba+':',_0x187f9d),![];}},[]),_0x4c56a3=(0x0,_react[_0x36f5(0xa)])(async()=>{return _0x40ebfd;},[_0x40ebfd]);return{'connections':_0x40ebfd,'connectPlatform':_0x4d4a2e,'disconnectPlatform':_0x2c93f1,'getConnectionStatus':_0x4c56a3,'isConnecting':_0x241637};};function _0x1089(){const _0x836463=['defineProperty','youtube','WBiqi','eOiKR','ℹ️\x20NOTE:\x20Backend\x20sync\x20removed\x20from\x20SDK\x20-\x20app\x20should\x20call\x20/enoch/users/update\x20if\x20needed','Escng','QmiZq','tOWEN','GPuxW','useState','useCallback','EMxcR','instagram','nyRTf','fbJed','FfYcJ','gyyKZ','ikZfP','log','✅\x20Platform\x20','\x20connected\x20locally','EwZhc','error','Error\x20connecting\x20platform\x20','ITBlp','BHXZZ','kCiNJ','\x20disconnected\x20locally','Error\x20disconnecting\x20platform\x20','kGths','crXqA','WHMpF','syKfq','fxkDC','ELmfW','hEOrZ','yfXup'];_0x1089=function(){return _0x836463;};return _0x1089();}exports['useConnections']=useConnections;
|
|
@@ -1,177 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const mockCredentialStorage = {};
|
|
11
|
-
|
|
12
|
-
// Try to import Keychain, but provide fallbacks if not available
|
|
13
|
-
let Keychain = null;
|
|
14
|
-
try {
|
|
15
|
-
Keychain = require('react-native-keychain');
|
|
16
|
-
} catch (error) {
|
|
17
|
-
console.warn('react-native-keychain module not available in useCredentials, using mock storage');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Check if Keychain is properly initialized and available
|
|
21
|
-
const isKeychainAvailable = () => {
|
|
22
|
-
try {
|
|
23
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
24
|
-
} catch (e) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Safe wrapper for getGenericPassword
|
|
30
|
-
const safeGetGenericPassword = async options => {
|
|
31
|
-
try {
|
|
32
|
-
if (isKeychainAvailable()) {
|
|
33
|
-
return await Keychain.getGenericPassword(options);
|
|
34
|
-
} else {
|
|
35
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
36
|
-
return mockCredentialStorage[key] || null;
|
|
37
|
-
}
|
|
38
|
-
} catch (error) {
|
|
39
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
40
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
41
|
-
return mockCredentialStorage[key] || null;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// Safe wrapper for setGenericPassword
|
|
46
|
-
const safeSetGenericPassword = async (username, password, options) => {
|
|
47
|
-
try {
|
|
48
|
-
if (isKeychainAvailable()) {
|
|
49
|
-
return await Keychain.setGenericPassword(username, password, options);
|
|
50
|
-
} else {
|
|
51
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
52
|
-
mockCredentialStorage[key] = {
|
|
53
|
-
username,
|
|
54
|
-
password
|
|
55
|
-
};
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
60
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
61
|
-
mockCredentialStorage[key] = {
|
|
62
|
-
username,
|
|
63
|
-
password
|
|
64
|
-
};
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// Safe wrapper for resetGenericPassword
|
|
70
|
-
const safeResetGenericPassword = async options => {
|
|
71
|
-
try {
|
|
72
|
-
if (isKeychainAvailable()) {
|
|
73
|
-
return await Keychain.resetGenericPassword(options);
|
|
74
|
-
} else {
|
|
75
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
76
|
-
delete mockCredentialStorage[key];
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
} catch (error) {
|
|
80
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
81
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
82
|
-
delete mockCredentialStorage[key];
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const useCredentials = () => {
|
|
87
|
-
const hasCredentials = (0, _react.useCallback)(async () => {
|
|
88
|
-
try {
|
|
89
|
-
const credentials = await safeGetGenericPassword({
|
|
90
|
-
service: _constants.STORAGE_KEYS.credentials
|
|
91
|
-
});
|
|
92
|
-
return !!credentials;
|
|
93
|
-
} catch (error) {
|
|
94
|
-
console.error('Error checking credentials:', error);
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}, []);
|
|
98
|
-
const getCredentials = (0, _react.useCallback)(async () => {
|
|
99
|
-
try {
|
|
100
|
-
const credentials = await safeGetGenericPassword({
|
|
101
|
-
service: _constants.STORAGE_KEYS.credentials
|
|
102
|
-
});
|
|
103
|
-
if (credentials) {
|
|
104
|
-
return JSON.parse(credentials.password);
|
|
105
|
-
}
|
|
106
|
-
return null;
|
|
107
|
-
} catch (error) {
|
|
108
|
-
console.error('Error getting credentials:', error);
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
}, []);
|
|
112
|
-
const storeCredentials = (0, _react.useCallback)(async (username, userPin, accessToken) => {
|
|
113
|
-
try {
|
|
114
|
-
const options = {
|
|
115
|
-
service: _constants.STORAGE_KEYS.credentials
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// Only use secure storage options on real devices
|
|
119
|
-
if (isKeychainAvailable()) {
|
|
120
|
-
var _Keychain$ACCESS_CONT, _Keychain$ACCESSIBLE;
|
|
121
|
-
options.accessControl = (_Keychain$ACCESS_CONT = Keychain.ACCESS_CONTROL) === null || _Keychain$ACCESS_CONT === void 0 ? void 0 : _Keychain$ACCESS_CONT.BIOMETRY_ANY;
|
|
122
|
-
options.accessible = (_Keychain$ACCESSIBLE = Keychain.ACCESSIBLE) === null || _Keychain$ACCESSIBLE === void 0 ? void 0 : _Keychain$ACCESSIBLE.WHEN_UNLOCKED;
|
|
123
|
-
}
|
|
124
|
-
await safeSetGenericPassword(username, JSON.stringify({
|
|
125
|
-
userPin,
|
|
126
|
-
accessToken
|
|
127
|
-
}), options);
|
|
128
|
-
return true;
|
|
129
|
-
} catch (error) {
|
|
130
|
-
console.error('Error storing credentials:', error);
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
}, []);
|
|
134
|
-
const clearCredentials = (0, _react.useCallback)(async () => {
|
|
135
|
-
try {
|
|
136
|
-
await safeResetGenericPassword({
|
|
137
|
-
service: _constants.STORAGE_KEYS.credentials
|
|
138
|
-
});
|
|
139
|
-
} catch (error) {
|
|
140
|
-
console.error('Error clearing credentials:', error);
|
|
141
|
-
}
|
|
142
|
-
}, []);
|
|
143
|
-
const validateCredentials = (0, _react.useCallback)(async username => {
|
|
144
|
-
try {
|
|
145
|
-
const response = await fetch(`https://api2.onairos.uk/validate`, {
|
|
146
|
-
method: 'POST',
|
|
147
|
-
headers: {
|
|
148
|
-
'Content-Type': 'application/json'
|
|
149
|
-
},
|
|
150
|
-
body: JSON.stringify({
|
|
151
|
-
username
|
|
152
|
-
})
|
|
153
|
-
});
|
|
154
|
-
const data = await response.json();
|
|
155
|
-
return {
|
|
156
|
-
success: true,
|
|
157
|
-
isValid: data.valid,
|
|
158
|
-
credentials: data.credentials
|
|
159
|
-
};
|
|
160
|
-
} catch (error) {
|
|
161
|
-
console.error('Error validating credentials:', error);
|
|
162
|
-
return {
|
|
163
|
-
success: false,
|
|
164
|
-
isValid: false
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}, []);
|
|
168
|
-
return {
|
|
169
|
-
hasCredentials,
|
|
170
|
-
getCredentials,
|
|
171
|
-
storeCredentials,
|
|
172
|
-
clearCredentials,
|
|
173
|
-
validateCredentials
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
exports.useCredentials = useCredentials;
|
|
177
|
-
//# sourceMappingURL=useCredentials.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react"),
|
|
5
|
+
require("../constants"),
|
|
6
|
+
require("../config/api"),
|
|
7
|
+
require('react-native-keychain')
|
|
8
|
+
];
|
|
9
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
10
|
+
Object[_0x1df3(0x0)](exports,_0x1df3(0x1),{'value':!![]}),exports[_0x1df3(0x2)]=void 0x0;function _0x1df3(_0x2aabc9,_0x1df3c9){_0x2aabc9=_0x2aabc9-0x0;const _0x5704cf=_0x2aab();let _0x2ce03e=_0x5704cf[_0x2aabc9];return _0x2ce03e;}var _react=__ONAIROS_REQ_FUNC__(0x0),_constants=__ONAIROS_REQ_FUNC__(0x1),_api=__ONAIROS_REQ_FUNC__(0x2);const mockCredentialStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x3);}catch(_0x511fa7){console[_0x1df3(0x3)]('react-native-keychain module not available in useCredentials, using mock storage');}const isKeychainAvailable=()=>{const _0x1aa8cb={'LIpcZ':function(_0xc8fe2f,_0x5ec730){return _0xc8fe2f===_0x5ec730;},'TLLzU':_0x1df3(0x4),'TXzzV':'wFmkz','jJhWL':function(_0x2dbeb2,_0x1ce313){return _0x2dbeb2===_0x1ce313;}};try{if(_0x1aa8cb['LIpcZ'](_0x1df3(0x5),_0x1aa8cb[_0x1df3(0x6)])){_0x1732eb[_0x1df3(0x3)](_0x1df3(0x7),_0x44b3be);const _0x37776a=(_0x1aa8cb[_0x1df3(0x8)](_0x14057a,null)||_0x15b8d4===void 0x0?void 0x0:_0xbd8235[_0x1df3(0x9)])||_0x1aa8cb[_0x1df3(0xa)];return _0x457897[_0x37776a]||null;}else return Keychain&&_0x1aa8cb['jJhWL'](typeof Keychain[_0x1df3(0xb)],_0x1df3(0xc));}catch(_0x13727d){return![];}},safeGetGenericPassword=async _0x42ab5b=>{const _0x47c8bc={'ONbBI':function(_0x289a18){return _0x289a18();},'cRwYV':function(_0x15952f,_0x17e331){return _0x15952f===_0x17e331;},'TcAqc':_0x1df3(0x4),'SjUfl':_0x1df3(0x7)};try{if(_0x47c8bc['ONbBI'](isKeychainAvailable))return await Keychain[_0x1df3(0xb)](_0x42ab5b);else{const _0x1c20b3=(_0x47c8bc[_0x1df3(0xd)](_0x42ab5b,null)||_0x42ab5b===void 0x0?void 0x0:_0x42ab5b[_0x1df3(0x9)])||_0x47c8bc[_0x1df3(0xe)];return mockCredentialStorage[_0x1c20b3]||null;}}catch(_0x146e96){console['warn'](_0x47c8bc[_0x1df3(0xf)],_0x146e96);const _0x427a28=(_0x42ab5b===null||_0x42ab5b===void 0x0?void 0x0:_0x42ab5b[_0x1df3(0x9)])||_0x47c8bc['TcAqc'];return mockCredentialStorage[_0x427a28]||null;}},safeSetGenericPassword=async(_0x1e7e3d,_0xf579eb,_0x45f743)=>{const _0x628e11={'hIanN':function(_0xaf76d9,_0x2c8a11){return _0xaf76d9===_0x2c8a11;},'BZgmE':function(_0x21913b){return _0x21913b();},'gwqon':_0x1df3(0x10),'UclYG':function(_0x28c7ed,_0x533de9){return _0x28c7ed===_0x533de9;},'blJKL':_0x1df3(0x4),'rtZfv':_0x1df3(0x7)};try{if(_0x628e11['BZgmE'](isKeychainAvailable))return await Keychain[_0x1df3(0x11)](_0x1e7e3d,_0xf579eb,_0x45f743);else{if(_0x628e11[_0x1df3(0x12)](_0x628e11[_0x1df3(0x13)],_0x628e11[_0x1df3(0x13)])){const _0x38e0d4=(_0x628e11['UclYG'](_0x45f743,null)||_0x45f743===void 0x0?void 0x0:_0x45f743[_0x1df3(0x9)])||_0x628e11[_0x1df3(0x14)];return mockCredentialStorage[_0x38e0d4]={'username':_0x1e7e3d,'password':_0xf579eb},!![];}else return Keychain&&_0x628e11[_0x1df3(0x12)](typeof Keychain[_0x1df3(0xb)],_0x1df3(0xc));}}catch(_0x337ae6){console['warn'](_0x628e11[_0x1df3(0x15)],_0x337ae6);const _0xc02459=(_0x628e11['UclYG'](_0x45f743,null)||_0x628e11[_0x1df3(0x16)](_0x45f743,void 0x0)?void 0x0:_0x45f743[_0x1df3(0x9)])||_0x628e11[_0x1df3(0x14)];return mockCredentialStorage[_0xc02459]={'username':_0x1e7e3d,'password':_0xf579eb},!![];}},safeResetGenericPassword=async _0x1e5b8f=>{const _0xa74e3={'eaNkM':'function','apeQg':'vBaic','YomNW':function(_0x4d09f3){return _0x4d09f3();},'PXviG':_0x1df3(0x4),'jnqlo':function(_0x2f03e3,_0x3a1156){return _0x2f03e3===_0x3a1156;},'iscra':function(_0x14d671,_0xe8dec6){return _0x14d671===_0xe8dec6;}};try{if(_0xa74e3['apeQg']===_0x1df3(0x17))try{return Keychain&&typeof Keychain[_0x1df3(0xb)]===_0xa74e3[_0x1df3(0x18)];}catch(_0x16a85a){return![];}else{if(_0xa74e3[_0x1df3(0x19)](isKeychainAvailable))return await Keychain[_0x1df3(0x1a)](_0x1e5b8f);else{const _0x3be1e0=(_0x1e5b8f===null||_0x1e5b8f===void 0x0?void 0x0:_0x1e5b8f['service'])||_0xa74e3[_0x1df3(0x1b)];return delete mockCredentialStorage[_0x3be1e0],!![];}}}catch(_0x210dcc){console['warn'](_0x1df3(0x7),_0x210dcc);const _0x59b914=(_0xa74e3[_0x1df3(0x1c)](_0x1e5b8f,null)||_0xa74e3[_0x1df3(0x1d)](_0x1e5b8f,void 0x0)?void 0x0:_0x1e5b8f[_0x1df3(0x9)])||_0xa74e3[_0x1df3(0x1b)];return delete mockCredentialStorage[_0x59b914],!![];}},useCredentials=()=>{const _0x5d7c5c={'uBNdM':function(_0x25c13a,_0x53e4f3){return _0x25c13a===_0x53e4f3;},'RnaQZ':function(_0x35dcee,_0x1c335d){return _0x35dcee===_0x1c335d;},'sXjKE':function(_0x47ce61,_0x4fce7a){return _0x47ce61!==_0x4fce7a;},'IXoZs':_0x1df3(0x1e),'MBbir':_0x1df3(0x1f),'wkRnW':function(_0x30a972,_0x20dcff){return _0x30a972(_0x20dcff);},'uJFVh':_0x1df3(0x20),'WLHCR':function(_0xb760eb,_0x35b76a){return _0xb760eb(_0x35b76a);},'zonBP':'Error\x20getting\x20credentials:','zzQoT':_0x1df3(0x4),'FCprU':'Error\x20validating\x20credentials:','bkFVd':function(_0x3b80bc,_0x501a0b){return _0x3b80bc===_0x501a0b;},'qnalT':_0x1df3(0x21),'dINjO':function(_0xb004b9,_0x376f93){return _0xb004b9!==_0x376f93;},'huIuK':_0x1df3(0x22),'HhYac':'zoKgO','aCwcg':function(_0x4e24c1){return _0x4e24c1();},'wsyvc':function(_0x1482d9,_0x29776b){return _0x1482d9===_0x29776b;},'qAkpX':function(_0x1444f2,_0x366b3e){return _0x1444f2===_0x366b3e;},'nPyCn':function(_0x32dbef,_0x4e0f26){return _0x32dbef===_0x4e0f26;},'ABeFW':function(_0x5ad184,_0x1859c9,_0x51ef13,_0x3197c4){return _0x5ad184(_0x1859c9,_0x51ef13,_0x3197c4);},'dEyUa':_0x1df3(0x23),'DFSIO':_0x1df3(0x24),'icNeR':function(_0x2eef97,_0x2847e6){return _0x2eef97===_0x2847e6;},'XNQFi':'Error\x20clearing\x20credentials:','Xeich':_0x1df3(0x25),'DuFac':function(_0x46385c,_0x57d6f5){return _0x46385c!==_0x57d6f5;},'jKlAt':_0x1df3(0x26),'fNBAo':function(_0x36da85,_0x43577d){return _0x36da85(_0x43577d);},'SZcmv':'oDbEh','XWYsn':function(_0x3b49b3,_0x1fcdc5,_0x4994e7){return _0x3b49b3(_0x1fcdc5,_0x4994e7);}},_0x367073=(0x0,_react[_0x1df3(0x27)])(async()=>{const _0x10990e={'ahOfc':function(_0x237c25,_0x210ac1){return _0x5d7c5c[_0x1df3(0x28)](_0x237c25,_0x210ac1);},'yOgUL':function(_0x4fabf1,_0x19de2d){return _0x5d7c5c[_0x1df3(0x29)](_0x4fabf1,_0x19de2d);}};try{if(_0x5d7c5c[_0x1df3(0x2a)](_0x5d7c5c[_0x1df3(0x2b)],_0x5d7c5c[_0x1df3(0x2c)])){const _0x1844d0=await _0x5d7c5c[_0x1df3(0x2d)](safeGetGenericPassword,{'service':_constants[_0x1df3(0x2e)][_0x1df3(0x2f)]});return!!_0x1844d0;}else{var _0x22e75d,_0x92833a;_0x1824fd['accessControl']=_0x10990e[_0x1df3(0x30)](_0x22e75d=Keychain[_0x1df3(0x31)],null)||_0x10990e[_0x1df3(0x30)](_0x22e75d,void 0x0)?void 0x0:_0x22e75d['BIOMETRY_ANY'],_0x1bc2ed['accessible']=_0x10990e[_0x1df3(0x32)](_0x92833a=Keychain[_0x1df3(0x33)],null)||_0x92833a===void 0x0?void 0x0:_0x92833a[_0x1df3(0x34)];}}catch(_0x48164c){return console[_0x1df3(0x35)](_0x5d7c5c['uJFVh'],_0x48164c),![];}},[]),_0x44d48b=(0x0,_react[_0x1df3(0x27)])(async()=>{try{const _0x1cb4ba=await _0x5d7c5c['WLHCR'](safeGetGenericPassword,{'service':_constants['STORAGE_KEYS'][_0x1df3(0x2f)]});if(_0x1cb4ba)return JSON[_0x1df3(0x36)](_0x1cb4ba['password']);return null;}catch(_0x2960cb){return console[_0x1df3(0x35)](_0x5d7c5c[_0x1df3(0x37)],_0x2960cb),null;}},[]),_0x4ad8d5=(0x0,_react[_0x1df3(0x27)])(async(_0x3ca43f,_0x2a0b13,_0x66203)=>{const _0x314893={'kAQBv':_0x5d7c5c[_0x1df3(0x38)]};if(_0x5d7c5c[_0x1df3(0x39)](_0x5d7c5c[_0x1df3(0x3a)],_0x5d7c5c[_0x1df3(0x3a)]))try{if(_0x5d7c5c[_0x1df3(0x3b)](_0x5d7c5c[_0x1df3(0x3c)],_0x5d7c5c[_0x1df3(0x3d)])){const _0x29d0db={'service':_constants['STORAGE_KEYS']['credentials']};if(_0x5d7c5c[_0x1df3(0x3e)](isKeychainAvailable)){var _0x383f6a,_0x5292d6;_0x29d0db['accessControl']=(_0x383f6a=Keychain['ACCESS_CONTROL'])===null||_0x5d7c5c[_0x1df3(0x3f)](_0x383f6a,void 0x0)?void 0x0:_0x383f6a['BIOMETRY_ANY'],_0x29d0db[_0x1df3(0x40)]=_0x5d7c5c[_0x1df3(0x41)](_0x5292d6=Keychain[_0x1df3(0x33)],null)||_0x5d7c5c[_0x1df3(0x42)](_0x5292d6,void 0x0)?void 0x0:_0x5292d6[_0x1df3(0x34)];}return await _0x5d7c5c[_0x1df3(0x43)](safeSetGenericPassword,_0x3ca43f,JSON[_0x1df3(0x44)]({'userPin':_0x2a0b13,'accessToken':_0x66203}),_0x29d0db),!![];}else return _0x3d07a1[_0x1df3(0x35)](_0x314893[_0x1df3(0x45)],_0x1cfa1b),{'success':![],'isValid':![]};}catch(_0xc26df1){if(_0x5d7c5c[_0x1df3(0x3b)](_0x5d7c5c['dEyUa'],_0x5d7c5c[_0x1df3(0x46)])){const _0x2ac937=(_0x1fc81f===null||_0x16555f===void 0x0?void 0x0:_0x4235bc[_0x1df3(0x9)])||_0x5d7c5c[_0x1df3(0x47)];return _0xce05b8[_0x2ac937]||null;}else return console['error'](_0x5d7c5c['DFSIO'],_0xc26df1),![];}else return![];},[]),_0x1f1104=(0x0,_react[_0x1df3(0x27)])(async()=>{const _0x5c8a86={'PkrPW':_0x5d7c5c[_0x1df3(0x37)]};if(_0x5d7c5c[_0x1df3(0x3f)](_0x5d7c5c[_0x1df3(0x48)],_0x5d7c5c[_0x1df3(0x48)]))try{if(_0x5d7c5c[_0x1df3(0x49)](_0x5d7c5c[_0x1df3(0x4a)],_0x1df3(0x26)))return _0x1cfd7c[_0x1df3(0x35)](_0x5c8a86['PkrPW'],_0x4e4967),null;else await _0x5d7c5c[_0x1df3(0x4b)](safeResetGenericPassword,{'service':_constants[_0x1df3(0x2e)]['credentials']});}catch(_0x2b830d){if(_0x5d7c5c[_0x1df3(0x4c)]!==_0x5d7c5c[_0x1df3(0x4c)]){const _0x5ab836=(_0x5d7c5c[_0x1df3(0x4d)](_0x16ca3d,null)||_0x5d7c5c[_0x1df3(0x39)](_0x192555,void 0x0)?void 0x0:_0x27375d['service'])||_0x1df3(0x4);return _0x867e91[_0x5ab836]={'username':_0x51719a,'password':_0x464acc},!![];}else console['error'](_0x5d7c5c['XNQFi'],_0x2b830d);}else _0x2d0061[_0x1df3(0x35)](_0x5d7c5c[_0x1df3(0x4e)],_0x314c79);},[]),_0x4a52c2=(0x0,_react['useCallback'])(async _0x4bdcc0=>{try{const _0x24ed6f=await _0x5d7c5c[_0x1df3(0x4f)](fetch,_api['API_CONFIG'][_0x1df3(0x50)]+_0x1df3(0x51),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x1df3(0x44)]({'username':_0x4bdcc0})}),_0x4e6db6=await _0x24ed6f['json']();return{'success':!![],'isValid':_0x4e6db6['valid'],'credentials':_0x4e6db6[_0x1df3(0x2f)]};}catch(_0x4f0165){return console[_0x1df3(0x35)](_0x5d7c5c[_0x1df3(0x38)],_0x4f0165),{'success':![],'isValid':![]};}},[]);return{'hasCredentials':_0x367073,'getCredentials':_0x44d48b,'storeCredentials':_0x4ad8d5,'clearCredentials':_0x1f1104,'validateCredentials':_0x4a52c2};};exports[_0x1df3(0x2)]=useCredentials;function _0x2aab(){const _0x55209b=['defineProperty','__esModule','useCredentials','warn','default','zrYqR','TXzzV','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','LIpcZ','service','TLLzU','getGenericPassword','function','cRwYV','TcAqc','SjUfl','WsmwZ','setGenericPassword','hIanN','gwqon','blJKL','rtZfv','UclYG','pitvE','eaNkM','YomNW','resetGenericPassword','PXviG','jnqlo','iscra','oBNmT','rBGeH','Error\x20checking\x20credentials:','KKpcp','xDZQE','bIRXm','Error\x20storing\x20credentials:','GwCom','FUeJj','useCallback','uBNdM','RnaQZ','sXjKE','IXoZs','MBbir','wkRnW','STORAGE_KEYS','credentials','ahOfc','ACCESS_CONTROL','yOgUL','ACCESSIBLE','WHEN_UNLOCKED','error','parse','zonBP','FCprU','bkFVd','qnalT','dINjO','huIuK','HhYac','aCwcg','wsyvc','accessible','qAkpX','nPyCn','ABeFW','stringify','kAQBv','dEyUa','zzQoT','Xeich','DuFac','jKlAt','fNBAo','SZcmv','icNeR','XNQFi','XWYsn','BASE_URL','/validate'];_0x2aab=function(){return _0x55209b;};return _0x2aab();}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react"),
|
|
5
|
+
require("../services/userConnectionsService"),
|
|
6
|
+
require("../services/authService"),
|
|
7
|
+
require("@react-native-async-storage/async-storage")
|
|
8
|
+
];
|
|
9
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
10
|
+
function _0x1827(_0x22404c,_0x18270e){_0x22404c=_0x22404c-0x0;const _0x2ec8d7=_0x2240();let _0x171f76=_0x2ec8d7[_0x22404c];return _0x171f76;}function _0x2240(){const _0x5167b2=['defineProperty','__esModule','useUserConnections','❌\x20Error\x20uploading\x20profile\x20picture:','EuWnQ','onairos_jwt_token','reviewer-bypass-token','DFBXn','Authentication\x20required\x20for\x20connections','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20connections\x20refresh','⚠️\x20[CONNECTIONS\x20HOOK]\x20Skipping\x20API\x20call\x20to\x20prevent\x20unauthenticated\x20requests','❌\x20[CONNECTIONS\x20HOOK]\x20Unexpected\x20null\x20token\x20after\x20validation','Authentication\x20error','✅\x20Connections\x20loaded:','❌\x20Error\x20fetching\x20connections\x20by\x20userId:','✅\x20[CONNECTIONS\x20HOOK]\x20Connections\x20refresh\x20completed','FJakw','qwUOn','❌\x20Error\x20fetching\x20connections\x20by\x20username:','OZgQj','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20user\x20ID\x20connections','LBmjc','📷\x20Uploading\x20profile\x20picture\x20for\x20user:','XcteC','RmzMP','useState','useCallback','FTbig','lMWbK','wScAX','VQQJN','ZCLJv','getAuthToken','pGYWm','yBInx','IuwDS','KpgoK','wTemB','split','xVXIc','KiDAd','Kcrjh','warn','iqxsn','vqExu','log','IWQdy','vTeMf','error','NINJL','mlEdb','🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','substring','...','getUserConnections','cbIbm','length','aOgFs','message','❌\x20Error\x20loading\x20connections:','vCXlh','ZTENh','yItiR','ylNJH','cxrWZ','SFGSz','caVox','NykUH','xxmJk','UnvXB','getUserConnectionsByUsername','0|4|1|3|2','VkMID','STpTc','jvBQk','kMtYu','fKaTI','poRxz','XWrNA','🔍\x20Fetching\x20connections\x20by\x20userId:','getUserConnectionsByUserId','Acryf','htgQf','jsLXI','YmaEG','eDtlO','jpg','beZaN','BQqfE','uploadProfilePicture','success','sfHrI','RYoMk','useEffect'];_0x2240=function(){return _0x5167b2;};return _0x2240();}Object[_0x1827(0x0)](exports,_0x1827(0x1),{'value':!![]}),exports[_0x1827(0x2)]=void 0x0;var _react=__ONAIROS_REQ_FUNC__(0x0),_userConnectionsService=__ONAIROS_REQ_FUNC__(0x1),_authService=__ONAIROS_REQ_FUNC__(0x2),_asyncStorage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x3));function _interopRequireDefault(_0x18d407){return _0x18d407&&_0x18d407[_0x1827(0x1)]?_0x18d407:{'default':_0x18d407};}const useUserConnections=()=>{const _0x1789b8={'aOgFs':_0x1827(0x3),'FTbig':function(_0x22ed00,_0x2f1ad9){return _0x22ed00(_0x2f1ad9);},'lMWbK':function(_0x435235,_0x3cab63){return _0x435235!==_0x3cab63;},'wScAX':_0x1827(0x4),'ZCLJv':function(_0x476be1,_0x448519){return _0x476be1(_0x448519);},'pGYWm':_0x1827(0x5),'yBInx':function(_0x4ae837,_0x4d5ea6){return _0x4ae837===_0x4d5ea6;},'IuwDS':_0x1827(0x6),'KpgoK':_0x1827(0x7),'wTemB':'3|4|2|0|1','xVXIc':function(_0x5a5d1a,_0x406bb2){return _0x5a5d1a(_0x406bb2);},'KiDAd':_0x1827(0x8),'Kcrjh':function(_0xc67b73,_0x4ead9f){return _0xc67b73(_0x4ead9f);},'iqxsn':_0x1827(0x9),'vqExu':_0x1827(0xa),'IWQdy':'🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo','vTeMf':function(_0x2159b2,_0x12a9e5){return _0x2159b2(_0x12a9e5);},'NINJL':_0x1827(0xb),'mlEdb':_0x1827(0xc),'fiFKE':'🔄\x20Loading\x20user\x20connections\x20with\x20authentication...','cbIbm':_0x1827(0xd),'vCXlh':function(_0x1794b3,_0x1175fb){return _0x1794b3(_0x1175fb);},'noGhv':_0x1827(0xe),'ZTENh':function(_0x1047b7,_0x2f40c8){return _0x1047b7===_0x2f40c8;},'ylNJH':'yItiR','cxrWZ':'🔄\x20[CONNECTIONS\x20HOOK]\x20Refreshing\x20connections...','SFGSz':function(_0x385e4f){return _0x385e4f();},'nfWJn':_0x1827(0xf),'VkMID':function(_0x18d6ac,_0x199ab3){return _0x18d6ac(_0x199ab3);},'NykUH':function(_0x3b7d11,_0x10cd0f){return _0x3b7d11(_0x10cd0f);},'xxmJk':_0x1827(0x10),'eDtlO':'⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20username\x20connections','UnvXB':'🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','STpTc':_0x1827(0x11),'kMtYu':_0x1827(0x12),'fKaTI':function(_0x4f7c4d,_0x531cf3){return _0x4f7c4d(_0x531cf3);},'poRxz':_0x1827(0x13),'XWrNA':_0x1827(0x14),'Acryf':function(_0x54c905,_0x4712a2){return _0x54c905!==_0x4712a2;},'htgQf':_0x1827(0x15),'beZaN':function(_0x4958f){return _0x4958f();},'BQqfE':_0x1827(0x16),'sfHrI':_0x1827(0x17),'zsfId':_0x1827(0x18)},[_0x2fb07f,_0x1ebee4]=(0x0,_react[_0x1827(0x19)])([]),[_0x19024c,_0x2ea7b2]=(0x0,_react['useState'])(!![]),[_0x19aa0b,_0x5a722f]=(0x0,_react['useState'])(null),_0x40d7e5=(0x0,_react[_0x1827(0x1a)])(async()=>{const _0x265966={'TvdqK':function(_0x18d6fb,_0x3f7ded){return _0x1789b8[_0x1827(0x1b)](_0x18d6fb,_0x3f7ded);}};try{if(_0x1789b8[_0x1827(0x1c)](_0x1789b8[_0x1827(0x1d)],_0x1827(0x1e))){_0x1789b8[_0x1827(0x1b)](_0x2ea7b2,!![]),_0x1789b8[_0x1827(0x1f)](_0x5a722f,null);const _0x53da73=await(0x0,_authService[_0x1827(0x20)])(),_0x255d1b=await _asyncStorage['default']['getItem'](_0x1789b8[_0x1827(0x21)]),_0x9a3341=_0x1789b8[_0x1827(0x22)](_0x255d1b,_0x1789b8[_0x1827(0x23)]);if(!_0x53da73&&!_0x9a3341){if(_0x1789b8[_0x1827(0x24)]!==_0x1789b8[_0x1827(0x24)])_0x265966['TvdqK'](_0x5a00e8,![]);else{const _0x24ef3b=_0x1789b8[_0x1827(0x25)][_0x1827(0x26)]('|');let _0x540cf6=0x0;while(!![]){switch(_0x24ef3b[_0x540cf6++]){case'0':_0x1789b8[_0x1827(0x27)](_0x5a722f,_0x1789b8[_0x1827(0x28)]);continue;case'1':return;case'2':_0x1789b8[_0x1827(0x29)](_0x1ebee4,[]);continue;case'3':console[_0x1827(0x2a)](_0x1789b8[_0x1827(0x2b)]);continue;case'4':console[_0x1827(0x2a)](_0x1789b8[_0x1827(0x2c)]);continue;}break;}}}if(_0x9a3341){console[_0x1827(0x2d)](_0x1789b8[_0x1827(0x2e)]),_0x1ebee4([]),_0x1789b8[_0x1827(0x2f)](_0x5a722f,null);return;}if(!_0x53da73){console[_0x1827(0x30)](_0x1789b8[_0x1827(0x31)]),_0x1ebee4([]),_0x5a722f(_0x1789b8[_0x1827(0x32)]);return;}console[_0x1827(0x2d)](_0x1789b8['fiFKE']),console[_0x1827(0x2d)](_0x1827(0x33),_0x53da73[_0x1827(0x34)](0x0,0x14)+_0x1827(0x35));const _0x4b37e9=await(0x0,_userConnectionsService[_0x1827(0x36)])();_0x1789b8[_0x1827(0x1b)](_0x1ebee4,_0x4b37e9),console[_0x1827(0x2d)](_0x1789b8[_0x1827(0x37)],_0x4b37e9[_0x1827(0x38)]);}else return _0x2c50a5[_0x1827(0x30)](_0x1789b8[_0x1827(0x39)],_0x41522a),![];}catch(_0x119c97){const _0x23b499=_0x119c97 instanceof Error?_0x119c97[_0x1827(0x3a)]:'Failed\x20to\x20load\x20connections';console[_0x1827(0x30)](_0x1827(0x3b),_0x23b499),_0x1789b8[_0x1827(0x1b)](_0x5a722f,_0x23b499),_0x1ebee4([]);}finally{_0x1789b8[_0x1827(0x3c)](_0x2ea7b2,![]);}},[]),_0x5b08b2=(0x0,_react['useCallback'])(async()=>{const _0xe503bb={'caVox':_0x1789b8['noGhv']};if(_0x1789b8[_0x1827(0x3d)](_0x1827(0x3e),_0x1789b8[_0x1827(0x3f)]))console['log'](_0x1789b8[_0x1827(0x40)]),await _0x1789b8[_0x1827(0x41)](_0x40d7e5),console[_0x1827(0x2d)](_0x1789b8['nfWJn']);else return _0x1fa29c[_0x1827(0x30)](_0xe503bb[_0x1827(0x42)],_0x20b643),[];},[_0x40d7e5]),_0x242971=(0x0,_react[_0x1827(0x1a)])(async _0x54a2d4=>{const _0xbf4656={'STzzY':function(_0x4c8fba,_0x4b26e6){return _0x4c8fba(_0x4b26e6);},'jvBQk':function(_0x37046b,_0x384454){return _0x1789b8[_0x1827(0x43)](_0x37046b,_0x384454);},'XJuLW':_0x1789b8[_0x1827(0x32)]};try{if(_0x1789b8['ZTENh'](_0x1827(0x10),_0x1789b8[_0x1827(0x44)])){const _0x4f047a=await(0x0,_authService['getAuthToken'])();if(!_0x4f047a)return console[_0x1827(0x2a)](_0x1789b8['eDtlO']),[];return console[_0x1827(0x2d)]('🔍\x20Fetching\x20connections\x20by\x20username:',_0x54a2d4),console['log'](_0x1789b8[_0x1827(0x45)],_0x4f047a[_0x1827(0x34)](0x0,0x14)+'...'),await(0x0,_userConnectionsService[_0x1827(0x46)])(_0x54a2d4);}else{const _0x2aba91=_0x1827(0x47)['split']('|');let _0x5f4d87=0x0;while(!![]){switch(_0x2aba91[_0x5f4d87++]){case'0':_0x42430c[_0x1827(0x2a)](_0x1789b8['iqxsn']);continue;case'1':_0x1789b8[_0x1827(0x48)](_0x3970b5,[]);continue;case'2':return;case'3':_0x1789b8[_0x1827(0x27)](_0x401de8,_0x1789b8[_0x1827(0x28)]);continue;case'4':_0x3abf37[_0x1827(0x2a)](_0x1789b8[_0x1827(0x2c)]);continue;}break;}}}catch(_0x4b23fb){if(_0x1789b8[_0x1827(0x49)]!==_0x1789b8[_0x1827(0x49)]){_0xca409b['error'](_0x1827(0xb)),_0xbf4656['STzzY'](_0x296dd9,[]),_0xbf4656[_0x1827(0x4a)](_0x243f54,_0xbf4656['XJuLW']);return;}else return console[_0x1827(0x30)](_0x1789b8[_0x1827(0x4b)],_0x4b23fb),[];}},[]),_0x4fcb8b=(0x0,_react[_0x1827(0x1a)])(async _0x37b2f3=>{const _0x44223d={'jsLXI':_0x1789b8[_0x1827(0x2e)],'YmaEG':function(_0x1d2160,_0x314398){return _0x1789b8[_0x1827(0x4c)](_0x1d2160,_0x314398);}};if(_0x1789b8[_0x1827(0x4d)]===_0x1789b8['poRxz'])try{const _0x25689a=await(0x0,_authService[_0x1827(0x20)])();if(!_0x25689a)return console[_0x1827(0x2a)](_0x1789b8[_0x1827(0x4e)]),[];return console['log'](_0x1827(0x4f),_0x37b2f3),console['log'](_0x1789b8[_0x1827(0x45)],_0x25689a['substring'](0x0,0x14)+_0x1827(0x35)),await(0x0,_userConnectionsService[_0x1827(0x50)])(_0x37b2f3);}catch(_0x360ec9){if(_0x1789b8[_0x1827(0x51)](_0x1827(0x15),_0x1789b8[_0x1827(0x52)])){_0x15778b['log'](_0x44223d[_0x1827(0x53)]),_0x44223d['YmaEG'](_0x15127c,[]),_0x44223d[_0x1827(0x54)](_0x180192,null);return;}else return console[_0x1827(0x30)](_0x1789b8['noGhv'],_0x360ec9),[];}else return _0x67bf5f['warn'](_0x1789b8[_0x1827(0x55)]),[];},[]),_0x38506e=(0x0,_react['useCallback'])(async(_0x7c1d1,_0x471083=_0x1827(0x56))=>{const _0x502327={'RYoMk':function(_0x1d18ef){return _0x1789b8[_0x1827(0x57)](_0x1d18ef);}};try{console['log'](_0x1789b8[_0x1827(0x58)]);const _0x1b12ff=await(0x0,_userConnectionsService[_0x1827(0x59)])(_0x7c1d1,_0x471083);return _0x1b12ff[_0x1827(0x5a)];}catch(_0x3ad04e){if(_0x1789b8[_0x1827(0x22)](_0x1789b8[_0x1827(0x5b)],_0x1789b8['zsfId']))_0x502327[_0x1827(0x5c)](_0x21b1a4);else return console['error'](_0x1789b8[_0x1827(0x39)],_0x3ad04e),![];}},[]);return(0x0,_react[_0x1827(0x5d)])(()=>{_0x40d7e5();},[_0x40d7e5]),{'connections':_0x2fb07f,'isLoading':_0x19024c,'error':_0x19aa0b,'refreshConnections':_0x5b08b2,'getConnectionsByUsername':_0x242971,'getConnectionsByUserId':_0x4fcb8b,'uploadUserProfilePicture':_0x38506e};};exports[_0x1827(0x2)]=useUserConnections;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,106 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "decodeJWTPayload", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _apiKeyService.decodeJWTPayload;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
exports.default = void 0;
|
|
43
|
-
Object.defineProperty(exports, "executeOnairosFlow", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _programmaticFlow.executeOnairosFlow;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports, "extractUserDataFromJWT", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function () {
|
|
52
|
-
return _apiKeyService.extractUserDataFromJWT;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(exports, "extractUsernameFromJWT", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function () {
|
|
58
|
-
return _apiKeyService.extractUsernameFromJWT;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "getStoredJwtToken", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () {
|
|
64
|
-
return _platformAuthService.getStoredJwtToken;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "initializeApiKey", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function () {
|
|
70
|
-
return _apiKeyService.initializeApiKey;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(exports, "requestEmailVerification", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function () {
|
|
76
|
-
return _platformAuthService.requestEmailVerification;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(exports, "verifyEmailCode", {
|
|
80
|
-
enumerable: true,
|
|
81
|
-
get: function () {
|
|
82
|
-
return _platformAuthService.verifyEmailCode;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
var _OnairosButton = require("./components/OnairosButton");
|
|
86
|
-
var _Onairos = require("./components/Onairos");
|
|
87
|
-
var _apiKeyService = require("./services/apiKeyService");
|
|
88
|
-
var _platformAuthService = require("./services/platformAuthService");
|
|
89
|
-
var _programmaticFlow = require("./utils/programmaticFlow");
|
|
90
|
-
/**
|
|
91
|
-
* Onairos React Native SDK
|
|
92
|
-
* A React Native implementation for Onairos personalized data integration
|
|
93
|
-
*
|
|
94
|
-
* PUBLIC API - Only expose what developers need
|
|
95
|
-
*/
|
|
96
|
-
// Essential Types Only
|
|
97
|
-
// Core Components
|
|
98
|
-
// SDK Initialization
|
|
99
|
-
// Authentication & PIN Management
|
|
100
|
-
// Programmatic Function (for custom buttons)
|
|
101
|
-
// Default export for convenience
|
|
102
|
-
var _default = exports.default = {
|
|
103
|
-
OnairosButton: _OnairosButton.OnairosButton,
|
|
104
|
-
Onairos: _Onairos.Onairos
|
|
105
|
-
};
|
|
106
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("./components/OnairosButton"),
|
|
5
|
+
require("./components/OnairosSignInButton"),
|
|
6
|
+
require("./components/Onairos"),
|
|
7
|
+
require("./components/UniversalOnboarding"),
|
|
8
|
+
require("./components/onboarding/OAuthWebView"),
|
|
9
|
+
require("./utils/Portal"),
|
|
10
|
+
require("./components/WelcomeScreen"),
|
|
11
|
+
require("./components/PrimaryButton"),
|
|
12
|
+
require("./components/ModalSheet"),
|
|
13
|
+
require("./components/ModalHeader"),
|
|
14
|
+
require("./components/BrandMark"),
|
|
15
|
+
require("./components/HeadingGroup"),
|
|
16
|
+
require("./components/BodyText"),
|
|
17
|
+
require("./components/SignInStep"),
|
|
18
|
+
require("./components/VerificationStep"),
|
|
19
|
+
require("./components/PlatformConnectorsStep"),
|
|
20
|
+
require("./components/PersonalizationConsentScreen"),
|
|
21
|
+
require("./components/PinCreationScreen"),
|
|
22
|
+
require("./components/PersonaImage"),
|
|
23
|
+
require("./hooks/useConnections"),
|
|
24
|
+
require("./services/apiKeyService"),
|
|
25
|
+
require("./services/authService"),
|
|
26
|
+
require("./services/googleAuthService"),
|
|
27
|
+
require("./services/platformAuthService"),
|
|
28
|
+
require("./utils/networkDiagnostics"),
|
|
29
|
+
require("./services/linkedinScrapingService"),
|
|
30
|
+
require("./services/linkedinDOMExtractor"),
|
|
31
|
+
require("./services/apiClient")
|
|
32
|
+
];
|
|
33
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
34
|
+
Object[_0x5ade(0x0)](exports,_0x5ade(0x1),{'value':!![]}),Object[_0x5ade(0x0)](exports,_0x5ade(0x2),{'enumerable':!![],'get':function(){return _apiClient[_0x5ade(0x2)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x3),{'enumerable':!![],'get':function(){return _BodyText[_0x5ade(0x3)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x4),{'enumerable':!![],'get':function(){return _BrandMark[_0x5ade(0x4)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x5),{'enumerable':!![],'get':function(){return _HeadingGroup['HeadingGroup'];}}),Object['defineProperty'](exports,_0x5ade(0x6),{'enumerable':!![],'get':function(){return _ModalHeader['ModalHeader'];}}),Object[_0x5ade(0x0)](exports,'ModalSheet',{'enumerable':!![],'get':function(){return _ModalSheet[_0x5ade(0x7)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x8),{'enumerable':!![],'get':function(){return _OAuthWebView[_0x5ade(0x8)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x9),{'enumerable':!![],'get':function(){return _Onairos[_0x5ade(0x9)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0xa),{'enumerable':!![],'get':function(){return _OnairosButton[_0x5ade(0xa)];}}),Object['defineProperty'](exports,_0x5ade(0xb),{'enumerable':!![],'get':function(){return _OnairosSignInButton[_0x5ade(0xb)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0xc),{'enumerable':!![],'get':function(){return _PersonaImage['default'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0xd),{'enumerable':!![],'get':function(){return _PersonalizationConsentScreen[_0x5ade(0xd)];}}),Object['defineProperty'](exports,_0x5ade(0xe),{'enumerable':!![],'get':function(){return _PinCreationScreen[_0x5ade(0xe)];}}),Object['defineProperty'](exports,_0x5ade(0xf),{'enumerable':!![],'get':function(){return _PlatformConnectorsStep[_0x5ade(0x10)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x11),{'enumerable':!![],'get':function(){return _Portal[_0x5ade(0x11)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x12),{'enumerable':!![],'get':function(){return _Portal[_0x5ade(0x12)];}}),Object[_0x5ade(0x0)](exports,'PrimaryButton',{'enumerable':!![],'get':function(){return _PrimaryButton[_0x5ade(0x13)];}}),Object['defineProperty'](exports,_0x5ade(0x14),{'enumerable':!![],'get':function(){return _SignInStep['SignInStep'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x15),{'enumerable':!![],'get':function(){return _UniversalOnboarding[_0x5ade(0x15)];}}),Object[_0x5ade(0x0)](exports,'VerificationStep',{'enumerable':!![],'get':function(){return _VerificationStep[_0x5ade(0x16)];}}),Object[_0x5ade(0x0)](exports,'WelcomeScreen',{'enumerable':!![],'get':function(){return _WelcomeScreen[_0x5ade(0x10)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x17),{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x17)];}}),Object['defineProperty'](exports,_0x5ade(0x18),{'enumerable':!![],'get':function(){return _linkedinDOMExtractor[_0x5ade(0x18)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x19),{'enumerable':!![],'get':function(){return _authService['clearAllAuthTokens'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x1a),{'enumerable':!![],'get':function(){return _linkedinDOMExtractor[_0x5ade(0x1a)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x1b),{'enumerable':!![],'get':function(){return _apiKeyService[_0x5ade(0x1b)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x1c),{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x1c)];}}),Object['defineProperty'](exports,'extractUserDataFromJWT',{'enumerable':!![],'get':function(){return _apiKeyService[_0x5ade(0x1d)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x1e),{'enumerable':!![],'get':function(){return _apiKeyService[_0x5ade(0x1e)];}}),Object[_0x5ade(0x0)](exports,'formatLinkedInUrl',{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x1f)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x20),{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x20)];}}),Object['defineProperty'](exports,_0x5ade(0x21),{'enumerable':!![],'get':function(){return _networkDiagnostics[_0x5ade(0x21)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x22),{'enumerable':!![],'get':function(){return _apiKeyService['initializeApiKey'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x23),{'enumerable':!![],'get':function(){return _linkedinDOMExtractor[_0x5ade(0x23)];}}),Object[_0x5ade(0x0)](exports,'isApiReachable',{'enumerable':!![],'get':function(){return _networkDiagnostics[_0x5ade(0x24)];}}),Object[_0x5ade(0x0)](exports,'isAuthenticated',{'enumerable':!![],'get':function(){return _authService[_0x5ade(0x25)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x26),{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x26)];}}),Object[_0x5ade(0x0)](exports,'parseExtractionMessage',{'enumerable':!![],'get':function(){return _linkedinDOMExtractor[_0x5ade(0x27)];}}),Object['defineProperty'](exports,_0x5ade(0x28),{'enumerable':!![],'get':function(){return _networkDiagnostics['runFullDiagnostics'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x29),{'enumerable':!![],'get':function(){return _linkedinScrapingService[_0x5ade(0x29)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x2a),{'enumerable':!![],'get':function(){return _platformAuthService[_0x5ade(0x2a)];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x2b),{'enumerable':!![],'get':function(){return _googleAuthService['updateGoogleClientIds'];}}),Object[_0x5ade(0x0)](exports,_0x5ade(0x2c),{'enumerable':!![],'get':function(){return _useConnections['useConnections'];}}),Object[_0x5ade(0x0)](exports,'validateExtractedUrl',{'enumerable':!![],'get':function(){return _linkedinDOMExtractor[_0x5ade(0x2d)];}});function _0x5ade(_0x547163,_0x5adef8){_0x547163=_0x547163-0x0;var _0x405b85=_0x5471();var _0x3a971a=_0x405b85[_0x547163];return _0x3a971a;}var _OnairosButton=__ONAIROS_REQ_FUNC__(0x0),_OnairosSignInButton=__ONAIROS_REQ_FUNC__(0x1),_Onairos=__ONAIROS_REQ_FUNC__(0x2),_UniversalOnboarding=__ONAIROS_REQ_FUNC__(0x3),_OAuthWebView=__ONAIROS_REQ_FUNC__(0x4),_Portal=__ONAIROS_REQ_FUNC__(0x5),_WelcomeScreen=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x6)),_PrimaryButton=__ONAIROS_REQ_FUNC__(0x7),_ModalSheet=__ONAIROS_REQ_FUNC__(0x8),_ModalHeader=__ONAIROS_REQ_FUNC__(0x9),_BrandMark=__ONAIROS_REQ_FUNC__(0xa),_HeadingGroup=__ONAIROS_REQ_FUNC__(0xb),_BodyText=__ONAIROS_REQ_FUNC__(0xc),_SignInStep=__ONAIROS_REQ_FUNC__(0xd),_VerificationStep=__ONAIROS_REQ_FUNC__(0xe),_PlatformConnectorsStep=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0xf)),_PersonalizationConsentScreen=__ONAIROS_REQ_FUNC__(0x10),_PinCreationScreen=__ONAIROS_REQ_FUNC__(0x11),_PersonaImage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x12)),_useConnections=__ONAIROS_REQ_FUNC__(0x13),_apiKeyService=__ONAIROS_REQ_FUNC__(0x14),_authService=__ONAIROS_REQ_FUNC__(0x15),_googleAuthService=__ONAIROS_REQ_FUNC__(0x16),_platformAuthService=__ONAIROS_REQ_FUNC__(0x17),_networkDiagnostics=__ONAIROS_REQ_FUNC__(0x18),_linkedinScrapingService=__ONAIROS_REQ_FUNC__(0x19),_linkedinDOMExtractor=__ONAIROS_REQ_FUNC__(0x1a),_apiClient=__ONAIROS_REQ_FUNC__(0x1b);function _interopRequireDefault(_0x7906ab){return _0x7906ab&&_0x7906ab[_0x5ade(0x1)]?_0x7906ab:{'default':_0x7906ab};}function _0x5471(){var _0x3ff145=['defineProperty','__esModule','ApiClient','BodyText','BrandMark','HeadingGroup','ModalHeader','ModalSheet','OAuthWebView','Onairos','OnairosButton','OnairosSignInButton','PersonaImage','PersonalizationConsentScreen','PinCreationScreen','PlatformConnectorsStep','default','Portal','PortalHost','PrimaryButton','SignInStep','UniversalOnboarding','VerificationStep','canScrapeProfile','checkScrapingStatus','clearAllAuthTokens','completeLinkedInExtraction','decodeJWTPayload','extractLinkedInUsername','extractUserDataFromJWT','extractUsernameFromJWT','formatLinkedInUrl','getLinkedInConnectionStatus','getNetworkStatus','initializeApiKey','initiateProfileScraping','isApiReachable','isAuthenticated','isValidLinkedInUrl','parseExtractionMessage','runFullDiagnostics','scrapeLinkedInProfile','testApiConnectivity','updateGoogleClientIds','useConnections','validateExtractedUrl','log'];_0x5471=function(){return _0x3ff145;};return _0x5471();}console[_0x5ade(0x2e)]('🚀\x20[ONAIROS\x20SDK]\x20LOCAL\x20SDK\x20LOADED\x20-\x20Version\x205.0.0-local-dev'),console[_0x5ade(0x2e)]('\uD83D\uDE80 [ONAIROS SDK] Source: onairos-npm-react-native/src/index.ts');
|