@onairos/react-native 3.1.11 → 3.1.13
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/lib/commonjs/api/index.js +75 -1
- package/lib/commonjs/api/index.js.map +1 -1
- 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/farcaster.png +0 -0
- package/lib/commonjs/assets/icons/instagram.png +0 -0
- package/lib/commonjs/assets/icons/pinterest.png +0 -0
- package/lib/commonjs/assets/icons/swerv_logo.png +0 -0
- package/lib/commonjs/assets/icons/twitter.jpg +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/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/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -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 +27 -0
- package/lib/commonjs/components/BodyText.js.map +1 -0
- package/lib/commonjs/components/BrandMark.js +44 -0
- package/lib/commonjs/components/BrandMark.js.map +1 -0
- package/lib/commonjs/components/CodeInput.js +30 -0
- package/lib/commonjs/components/CodeInput.js.map +1 -0
- package/lib/commonjs/components/EmailInput.js +30 -0
- package/lib/commonjs/components/EmailInput.js.map +1 -0
- package/lib/commonjs/components/ExistingUserDataConfirmation.js +474 -0
- package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +1 -0
- package/lib/commonjs/components/GoogleButton.js +55 -0
- package/lib/commonjs/components/GoogleButton.js.map +1 -0
- package/lib/commonjs/components/HeadingGroup.js +43 -0
- package/lib/commonjs/components/HeadingGroup.js.map +1 -0
- package/lib/commonjs/components/ModalHeader.js +99 -0
- package/lib/commonjs/components/ModalHeader.js.map +1 -0
- package/lib/commonjs/components/ModalSheet.js +41 -0
- package/lib/commonjs/components/ModalSheet.js.map +1 -0
- package/lib/commonjs/components/Onairos.js +1 -3
- package/lib/commonjs/components/Onairos.js.map +1 -1
- package/lib/commonjs/components/OnairosButton.js +171 -190
- package/lib/commonjs/components/OnairosButton.js.map +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +169 -0
- package/lib/commonjs/components/OnairosSignInButton.js.map +1 -0
- package/lib/commonjs/components/Overlay.js +5 -5
- package/lib/commonjs/components/Overlay.js.map +1 -1
- package/lib/commonjs/components/PersonaImage.js +60 -0
- package/lib/commonjs/components/PersonaImage.js.map +1 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +156 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js.map +1 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +316 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js.map +1 -0
- package/lib/commonjs/components/PinCreationScreen.js +393 -0
- package/lib/commonjs/components/PinCreationScreen.js.map +1 -0
- package/lib/commonjs/components/PinInput.js +282 -120
- package/lib/commonjs/components/PinInput.js.map +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +828 -0
- package/lib/commonjs/components/PlatformConnectorsStep.js.map +1 -0
- package/lib/commonjs/components/PlatformToggle.js +180 -0
- package/lib/commonjs/components/PlatformToggle.js.map +1 -0
- package/lib/commonjs/components/PrimaryButton.js +180 -0
- package/lib/commonjs/components/PrimaryButton.js.map +1 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +197 -0
- package/lib/commonjs/components/SignInMatchAnimation.js.map +1 -0
- package/lib/commonjs/components/SignInStep.js +179 -0
- package/lib/commonjs/components/SignInStep.js.map +1 -0
- package/lib/commonjs/components/TrainingModal.js +808 -563
- package/lib/commonjs/components/TrainingModal.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +2304 -1283
- package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
- package/lib/commonjs/components/VerificationStep.js +154 -0
- package/lib/commonjs/components/VerificationStep.js.map +1 -0
- package/lib/commonjs/components/WelcomeScreen.js +385 -0
- package/lib/commonjs/components/WelcomeScreen.js.map +1 -0
- package/lib/commonjs/components/icons/Basicproficon.js +37 -0
- package/lib/commonjs/components/icons/Basicproficon.js.map +1 -0
- package/lib/commonjs/components/icons/Basicprofile.js +21 -0
- package/lib/commonjs/components/icons/Basicprofile.js.map +1 -0
- package/lib/commonjs/components/icons/Checkbox.js +21 -0
- package/lib/commonjs/components/icons/Checkbox.js.map +1 -0
- package/lib/commonjs/components/icons/Checkmark.js +27 -0
- package/lib/commonjs/components/icons/Checkmark.js.map +1 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +21 -0
- package/lib/commonjs/components/icons/Contentanalysis.js.map +1 -0
- package/lib/commonjs/components/icons/Contenticon.js +39 -0
- package/lib/commonjs/components/icons/Contenticon.js.map +1 -0
- package/lib/commonjs/components/icons/EnochE.js +41 -0
- package/lib/commonjs/components/icons/EnochE.js.map +1 -0
- package/lib/commonjs/components/icons/Personalityicon.js +30 -0
- package/lib/commonjs/components/icons/Personalityicon.js.map +1 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +21 -0
- package/lib/commonjs/components/icons/Personalityprofile.js.map +1 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +21 -0
- package/lib/commonjs/components/icons/Personalitytraits.js.map +1 -0
- package/lib/commonjs/components/icons/Userpreferences.js +21 -0
- package/lib/commonjs/components/icons/Userpreferences.js.map +1 -0
- package/lib/commonjs/components/icons/index.js +84 -0
- package/lib/commonjs/components/icons/index.js.map +1 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +134 -743
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/commonjs/config/api.js +34 -0
- package/lib/commonjs/config/api.js.map +1 -0
- package/lib/commonjs/context/AuthContext.js +345 -0
- package/lib/commonjs/context/AuthContext.js.map +1 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +111 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js.map +1 -0
- package/lib/commonjs/hooks/useConnections.js +120 -125
- package/lib/commonjs/hooks/useConnections.js.map +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +148 -0
- package/lib/commonjs/hooks/useUserConnections.js.map +1 -0
- package/lib/commonjs/index.js +149 -27
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/apiClient.js +302 -0
- package/lib/commonjs/services/apiClient.js.map +1 -0
- package/lib/commonjs/services/authService.js +935 -0
- package/lib/commonjs/services/authService.js.map +1 -0
- package/lib/commonjs/services/biometricPinService.js +184 -0
- package/lib/commonjs/services/biometricPinService.js.map +1 -0
- package/lib/commonjs/services/connectedAccountsService.js +268 -0
- package/lib/commonjs/services/connectedAccountsService.js.map +1 -0
- package/lib/commonjs/services/googleAuthService.js +268 -0
- package/lib/commonjs/services/googleAuthService.js.map +1 -0
- package/lib/commonjs/services/imageCompressionService.js +260 -0
- package/lib/commonjs/services/imageCompressionService.js.map +1 -0
- package/lib/commonjs/services/jwtStorageService.js +256 -0
- package/lib/commonjs/services/jwtStorageService.js.map +1 -0
- package/lib/commonjs/services/mobileTrainingService.js +185 -0
- package/lib/commonjs/services/mobileTrainingService.js.map +1 -0
- package/lib/commonjs/services/pinEncryptionService.js +84 -0
- package/lib/commonjs/services/pinEncryptionService.js.map +1 -0
- package/lib/commonjs/services/pinStorageUtils.js +105 -0
- package/lib/commonjs/services/pinStorageUtils.js.map +1 -0
- package/lib/commonjs/services/platformAuthService.js +956 -722
- package/lib/commonjs/services/platformAuthService.js.map +1 -1
- package/lib/commonjs/services/storageService.js +404 -0
- package/lib/commonjs/services/storageService.js.map +1 -0
- package/lib/commonjs/services/trainingApiHelpers.js +73 -0
- package/lib/commonjs/services/trainingApiHelpers.js.map +1 -0
- package/lib/commonjs/services/userConnectionsService.js +486 -0
- package/lib/commonjs/services/userConnectionsService.js.map +1 -0
- package/lib/commonjs/services/youtubeMigrationService.js +415 -0
- package/lib/commonjs/services/youtubeMigrationService.js.map +1 -0
- package/lib/commonjs/theme/index.js +249 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/utils/eventUtils.js +288 -0
- package/lib/commonjs/utils/eventUtils.js.map +1 -0
- package/lib/commonjs/utils/haptics.js +66 -0
- package/lib/commonjs/utils/haptics.js.map +1 -0
- package/lib/commonjs/utils/imagePreloader.js +6 -0
- package/lib/commonjs/utils/imagePreloader.js.map +1 -0
- package/lib/module/api/index.js +72 -0
- package/lib/module/api/index.js.map +1 -1
- 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/farcaster.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/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/checkmark.svg +4 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -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 +20 -0
- package/lib/module/components/BodyText.js.map +1 -0
- package/lib/module/components/BrandMark.js +37 -0
- package/lib/module/components/BrandMark.js.map +1 -0
- package/lib/module/components/CodeInput.js +23 -0
- package/lib/module/components/CodeInput.js.map +1 -0
- package/lib/module/components/EmailInput.js +23 -0
- package/lib/module/components/EmailInput.js.map +1 -0
- package/lib/module/components/ExistingUserDataConfirmation.js +465 -0
- package/lib/module/components/ExistingUserDataConfirmation.js.map +1 -0
- package/lib/module/components/GoogleButton.js +48 -0
- package/lib/module/components/GoogleButton.js.map +1 -0
- package/lib/module/components/HeadingGroup.js +36 -0
- package/lib/module/components/HeadingGroup.js.map +1 -0
- package/lib/module/components/ModalHeader.js +92 -0
- package/lib/module/components/ModalHeader.js.map +1 -0
- package/lib/module/components/ModalSheet.js +34 -0
- package/lib/module/components/ModalSheet.js.map +1 -0
- package/lib/module/components/Onairos.js +1 -3
- package/lib/module/components/Onairos.js.map +1 -1
- package/lib/module/components/OnairosButton.js +172 -192
- package/lib/module/components/OnairosButton.js.map +1 -1
- package/lib/module/components/OnairosSignInButton.js +160 -0
- package/lib/module/components/OnairosSignInButton.js.map +1 -0
- package/lib/module/components/Overlay.js +5 -5
- package/lib/module/components/Overlay.js.map +1 -1
- package/lib/module/components/PersonaImage.js +53 -0
- package/lib/module/components/PersonaImage.js.map +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +148 -0
- package/lib/module/components/PersonaLoadingScreen.js.map +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +309 -0
- package/lib/module/components/PersonalizationConsentScreen.js.map +1 -0
- package/lib/module/components/PinCreationScreen.js +386 -0
- package/lib/module/components/PinCreationScreen.js.map +1 -0
- package/lib/module/components/PinInput.js +283 -120
- package/lib/module/components/PinInput.js.map +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +820 -0
- package/lib/module/components/PlatformConnectorsStep.js.map +1 -0
- package/lib/module/components/PlatformToggle.js +173 -0
- package/lib/module/components/PlatformToggle.js.map +1 -0
- package/lib/module/components/PrimaryButton.js +172 -0
- package/lib/module/components/PrimaryButton.js.map +1 -0
- package/lib/module/components/SignInMatchAnimation.js +189 -0
- package/lib/module/components/SignInMatchAnimation.js.map +1 -0
- package/lib/module/components/SignInStep.js +171 -0
- package/lib/module/components/SignInStep.js.map +1 -0
- package/lib/module/components/TrainingModal.js +809 -565
- package/lib/module/components/TrainingModal.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.js +2307 -1284
- package/lib/module/components/UniversalOnboarding.js.map +1 -1
- package/lib/module/components/VerificationStep.js +146 -0
- package/lib/module/components/VerificationStep.js.map +1 -0
- package/lib/module/components/WelcomeScreen.js +378 -0
- package/lib/module/components/WelcomeScreen.js.map +1 -0
- package/lib/module/components/icons/Basicproficon.js +30 -0
- package/lib/module/components/icons/Basicproficon.js.map +1 -0
- package/lib/module/components/icons/Basicprofile.js +14 -0
- package/lib/module/components/icons/Basicprofile.js.map +1 -0
- package/lib/module/components/icons/Checkbox.js +14 -0
- package/lib/module/components/icons/Checkbox.js.map +1 -0
- package/lib/module/components/icons/Checkmark.js +20 -0
- package/lib/module/components/icons/Checkmark.js.map +1 -0
- package/lib/module/components/icons/Contentanalysis.js +14 -0
- package/lib/module/components/icons/Contentanalysis.js.map +1 -0
- package/lib/module/components/icons/Contenticon.js +32 -0
- package/lib/module/components/icons/Contenticon.js.map +1 -0
- package/lib/module/components/icons/EnochE.js +34 -0
- package/lib/module/components/icons/EnochE.js.map +1 -0
- package/lib/module/components/icons/Personalityicon.js +23 -0
- package/lib/module/components/icons/Personalityicon.js.map +1 -0
- package/lib/module/components/icons/Personalityprofile.js +14 -0
- package/lib/module/components/icons/Personalityprofile.js.map +1 -0
- package/lib/module/components/icons/Personalitytraits.js +14 -0
- package/lib/module/components/icons/Personalitytraits.js.map +1 -0
- package/lib/module/components/icons/Userpreferences.js +14 -0
- package/lib/module/components/icons/Userpreferences.js.map +1 -0
- package/lib/module/components/icons/index.js +13 -0
- package/lib/module/components/icons/index.js.map +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +136 -744
- package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/module/config/api.js +26 -0
- package/lib/module/config/api.js.map +1 -0
- package/lib/module/context/AuthContext.js +335 -0
- package/lib/module/context/AuthContext.js.map +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +106 -0
- package/lib/module/hooks/useConnectedAccounts.js.map +1 -0
- package/lib/module/hooks/useConnections.js +119 -125
- package/lib/module/hooks/useConnections.js.map +1 -1
- package/lib/module/hooks/useUserConnections.js +140 -0
- package/lib/module/hooks/useUserConnections.js.map +1 -0
- package/lib/module/index.js +51 -15
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/apiClient.js +298 -0
- package/lib/module/services/apiClient.js.map +1 -0
- package/lib/module/services/authService.js +905 -0
- package/lib/module/services/authService.js.map +1 -0
- package/lib/module/services/biometricPinService.js +173 -0
- package/lib/module/services/biometricPinService.js.map +1 -0
- package/lib/module/services/connectedAccountsService.js +255 -0
- package/lib/module/services/connectedAccountsService.js.map +1 -0
- package/lib/module/services/googleAuthService.js +258 -0
- package/lib/module/services/googleAuthService.js.map +1 -0
- package/lib/module/services/imageCompressionService.js +250 -0
- package/lib/module/services/imageCompressionService.js.map +1 -0
- package/lib/module/services/jwtStorageService.js +239 -0
- package/lib/module/services/jwtStorageService.js.map +1 -0
- package/lib/module/services/mobileTrainingService.js +172 -0
- package/lib/module/services/mobileTrainingService.js.map +1 -0
- package/lib/module/services/pinEncryptionService.js +75 -0
- package/lib/module/services/pinEncryptionService.js.map +1 -0
- package/lib/module/services/pinStorageUtils.js +93 -0
- package/lib/module/services/pinStorageUtils.js.map +1 -0
- package/lib/module/services/platformAuthService.js +943 -704
- package/lib/module/services/platformAuthService.js.map +1 -1
- package/lib/module/services/storageService.js +383 -0
- package/lib/module/services/storageService.js.map +1 -0
- package/lib/module/services/trainingApiHelpers.js +67 -0
- package/lib/module/services/trainingApiHelpers.js.map +1 -0
- package/lib/module/services/userConnectionsService.js +476 -0
- package/lib/module/services/userConnectionsService.js.map +1 -0
- package/lib/module/services/youtubeMigrationService.js +404 -0
- package/lib/module/services/youtubeMigrationService.js.map +1 -0
- package/lib/module/theme/index.js +244 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/utils/eventUtils.js +270 -0
- package/lib/module/utils/eventUtils.js.map +1 -0
- package/lib/module/utils/haptics.js +59 -0
- package/lib/module/utils/haptics.js.map +1 -0
- package/lib/module/utils/imagePreloader.js +3 -0
- package/lib/module/utils/imagePreloader.js.map +1 -0
- package/lib/typescript/api/index.d.ts +8 -0
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/components/BodyText.d.ts +10 -0
- package/lib/typescript/components/BodyText.d.ts.map +1 -0
- package/lib/typescript/components/BrandMark.d.ts +11 -0
- package/lib/typescript/components/BrandMark.d.ts.map +1 -0
- package/lib/typescript/components/CodeInput.d.ts +10 -0
- package/lib/typescript/components/CodeInput.d.ts.map +1 -0
- package/lib/typescript/components/EmailInput.d.ts +8 -0
- package/lib/typescript/components/EmailInput.d.ts.map +1 -0
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +12 -0
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +1 -0
- package/lib/typescript/components/GoogleButton.d.ts +11 -0
- package/lib/typescript/components/GoogleButton.d.ts.map +1 -0
- package/lib/typescript/components/HeadingGroup.d.ts +11 -0
- package/lib/typescript/components/HeadingGroup.d.ts.map +1 -0
- package/lib/typescript/components/ModalHeader.d.ts +11 -0
- package/lib/typescript/components/ModalHeader.d.ts.map +1 -0
- package/lib/typescript/components/ModalSheet.d.ts +13 -0
- package/lib/typescript/components/ModalSheet.d.ts.map +1 -0
- package/lib/typescript/components/Onairos.d.ts.map +1 -1
- package/lib/typescript/components/OnairosButton.d.ts +29 -4
- package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
- package/lib/typescript/components/OnairosSignInButton.d.ts +14 -0
- package/lib/typescript/components/OnairosSignInButton.d.ts.map +1 -0
- package/lib/typescript/components/PersonaImage.d.ts +8 -0
- package/lib/typescript/components/PersonaImage.d.ts.map +1 -0
- package/lib/typescript/components/PersonaLoadingScreen.d.ts +10 -0
- package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +1 -0
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts +10 -0
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +1 -0
- package/lib/typescript/components/PinCreationScreen.d.ts +10 -0
- package/lib/typescript/components/PinCreationScreen.d.ts.map +1 -0
- package/lib/typescript/components/PinInput.d.ts +11 -1
- package/lib/typescript/components/PinInput.d.ts.map +1 -1
- package/lib/typescript/components/PlatformConnectorsStep.d.ts +11 -0
- package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +1 -0
- package/lib/typescript/components/PlatformToggle.d.ts +20 -0
- package/lib/typescript/components/PlatformToggle.d.ts.map +1 -0
- package/lib/typescript/components/PrimaryButton.d.ts +22 -0
- package/lib/typescript/components/PrimaryButton.d.ts.map +1 -0
- package/lib/typescript/components/SignInMatchAnimation.d.ts +9 -0
- package/lib/typescript/components/SignInMatchAnimation.d.ts.map +1 -0
- package/lib/typescript/components/SignInStep.d.ts +12 -0
- package/lib/typescript/components/SignInStep.d.ts.map +1 -0
- package/lib/typescript/components/TrainingModal.d.ts +12 -1
- package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +14 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
- package/lib/typescript/components/VerificationStep.d.ts +13 -0
- package/lib/typescript/components/VerificationStep.d.ts.map +1 -0
- package/lib/typescript/components/WelcomeScreen.d.ts +9 -0
- package/lib/typescript/components/WelcomeScreen.d.ts.map +1 -0
- package/lib/typescript/components/icons/Basicproficon.d.ts +5 -0
- package/lib/typescript/components/icons/Basicproficon.d.ts.map +1 -0
- package/lib/typescript/components/icons/Basicprofile.d.ts +5 -0
- package/lib/typescript/components/icons/Basicprofile.d.ts.map +1 -0
- package/lib/typescript/components/icons/Checkbox.d.ts +5 -0
- package/lib/typescript/components/icons/Checkbox.d.ts.map +1 -0
- package/lib/typescript/components/icons/Checkmark.d.ts +5 -0
- package/lib/typescript/components/icons/Checkmark.d.ts.map +1 -0
- package/lib/typescript/components/icons/Contentanalysis.d.ts +5 -0
- package/lib/typescript/components/icons/Contentanalysis.d.ts.map +1 -0
- package/lib/typescript/components/icons/Contenticon.d.ts +5 -0
- package/lib/typescript/components/icons/Contenticon.d.ts.map +1 -0
- package/lib/typescript/components/icons/EnochE.d.ts +5 -0
- package/lib/typescript/components/icons/EnochE.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalityicon.d.ts +5 -0
- package/lib/typescript/components/icons/Personalityicon.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalityprofile.d.ts +5 -0
- package/lib/typescript/components/icons/Personalityprofile.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalitytraits.d.ts +5 -0
- package/lib/typescript/components/icons/Personalitytraits.d.ts.map +1 -0
- package/lib/typescript/components/icons/Userpreferences.d.ts +5 -0
- package/lib/typescript/components/icons/Userpreferences.d.ts.map +1 -0
- package/lib/typescript/components/icons/index.d.ts +12 -0
- package/lib/typescript/components/icons/index.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
- package/lib/typescript/config/api.d.ts +24 -0
- package/lib/typescript/config/api.d.ts.map +1 -0
- package/lib/typescript/context/AuthContext.d.ts +34 -0
- package/lib/typescript/context/AuthContext.d.ts.map +1 -0
- package/lib/typescript/hooks/useConnectedAccounts.d.ts +11 -0
- package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +1 -0
- package/lib/typescript/hooks/useConnections.d.ts +10 -5
- package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
- package/lib/typescript/hooks/useUserConnections.d.ts +12 -0
- package/lib/typescript/hooks/useUserConnections.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +24 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/services/apiClient.d.ts +91 -0
- package/lib/typescript/services/apiClient.d.ts.map +1 -0
- package/lib/typescript/services/authService.d.ts +216 -0
- package/lib/typescript/services/authService.d.ts.map +1 -0
- package/lib/typescript/services/biometricPinService.d.ts +29 -0
- package/lib/typescript/services/biometricPinService.d.ts.map +1 -0
- package/lib/typescript/services/connectedAccountsService.d.ts +56 -0
- package/lib/typescript/services/connectedAccountsService.d.ts.map +1 -0
- package/lib/typescript/services/googleAuthService.d.ts +63 -0
- package/lib/typescript/services/googleAuthService.d.ts.map +1 -0
- package/lib/typescript/services/imageCompressionService.d.ts +37 -0
- package/lib/typescript/services/imageCompressionService.d.ts.map +1 -0
- package/lib/typescript/services/jwtStorageService.d.ts +86 -0
- package/lib/typescript/services/jwtStorageService.d.ts.map +1 -0
- package/lib/typescript/services/mobileTrainingService.d.ts +45 -0
- package/lib/typescript/services/mobileTrainingService.d.ts.map +1 -0
- package/lib/typescript/services/pinEncryptionService.d.ts +17 -0
- package/lib/typescript/services/pinEncryptionService.d.ts.map +1 -0
- package/lib/typescript/services/pinStorageUtils.d.ts +25 -0
- package/lib/typescript/services/pinStorageUtils.d.ts.map +1 -0
- package/lib/typescript/services/platformAuthService.d.ts +34 -109
- package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
- package/lib/typescript/services/storageService.d.ts +128 -0
- package/lib/typescript/services/storageService.d.ts.map +1 -0
- package/lib/typescript/services/trainingApiHelpers.d.ts +38 -0
- package/lib/typescript/services/trainingApiHelpers.d.ts.map +1 -0
- package/lib/typescript/services/userConnectionsService.d.ts +90 -0
- package/lib/typescript/services/userConnectionsService.d.ts.map +1 -0
- package/lib/typescript/services/youtubeMigrationService.d.ts +12 -0
- package/lib/typescript/services/youtubeMigrationService.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +416 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +39 -0
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/utils/eventUtils.d.ts +108 -0
- package/lib/typescript/utils/eventUtils.d.ts.map +1 -0
- package/lib/typescript/utils/haptics.d.ts +11 -0
- package/lib/typescript/utils/haptics.d.ts.map +1 -0
- package/lib/typescript/utils/imagePreloader.d.ts +2 -0
- package/lib/typescript/utils/imagePreloader.d.ts.map +1 -0
- package/package.json +158 -145
- package/src/api/index.ts +41 -0
- package/src/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/src/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/src/assets/icons/Facebookicon.png +0 -0
- package/src/assets/icons/Gmail.png +0 -0
- package/src/assets/icons/Linkedinicon.png +0 -0
- package/src/assets/icons/Redditicon.png +0 -0
- package/src/assets/icons/YouTubeicon2.png +0 -0
- package/src/assets/icons/YouTubeicon3.png +0 -0
- package/src/assets/icons/farcaster.png +0 -0
- package/src/assets/icons/instagram.png +0 -0
- package/src/assets/icons/pinterest.png +0 -0
- package/src/assets/icons/swerv_logo.png +0 -0
- package/src/assets/icons/twitter.jpg +0 -0
- package/src/assets/images/Checkbox.svg +3 -0
- package/src/assets/images/EnochE.svg +19 -0
- package/src/assets/images/Enochicon1.png +0 -0
- package/src/assets/images/Face_ID_logo.png +0 -0
- package/src/assets/images/Facebookicon.png +0 -0
- package/src/assets/images/Gmail.png +0 -0
- package/src/assets/images/Googlelogo.png +0 -0
- package/src/assets/images/Linkedinicon.png +0 -0
- package/src/assets/images/Onairoslogo.png +0 -0
- package/src/assets/images/Personalityprofile.svg +3 -0
- package/src/assets/images/Personalitytraits.svg +3 -0
- package/src/assets/images/Redditicon.png +0 -0
- package/src/assets/images/Userpreferences.svg +3 -0
- package/src/assets/images/YouTubeicon3.png +0 -0
- package/src/assets/images/arrow.svg +20 -0
- package/src/assets/images/basicproficon.svg +43 -0
- package/src/assets/images/basicprofile.svg +3 -0
- package/src/assets/images/checkmark.svg +4 -0
- package/src/assets/images/contentanalysis.svg +3 -0
- package/src/assets/images/contenticon.svg +23 -0
- package/src/assets/images/persona1.png +0 -0
- package/src/assets/images/persona2.png +0 -0
- package/src/assets/images/persona3.png +0 -0
- package/src/assets/images/persona4.png +0 -0
- package/src/assets/images/persona5.png +0 -0
- package/src/assets/images/personalityicon.svg +18 -0
- package/src/assets/images/x-close.svg +3 -0
- package/src/components/BodyText.tsx +33 -0
- package/src/components/BrandMark.tsx +62 -0
- package/src/components/CodeInput.tsx +32 -0
- package/src/components/EmailInput.tsx +31 -0
- package/src/components/ExistingUserDataConfirmation.tsx +507 -0
- package/src/components/GoogleButton.tsx +55 -0
- package/src/components/HeadingGroup.tsx +49 -0
- package/src/components/ModalHeader.tsx +125 -0
- package/src/components/ModalSheet.tsx +57 -0
- package/src/components/Onairos.tsx +422 -424
- package/src/components/OnairosButton.tsx +339 -359
- package/src/components/OnairosSignInButton.tsx +166 -0
- package/src/components/Overlay.tsx +506 -506
- package/src/components/PersonaImage.tsx +79 -0
- package/src/components/PersonaLoadingScreen.tsx +201 -0
- package/src/components/PersonalizationConsentScreen.tsx +410 -0
- package/src/components/PinCreationScreen.tsx +492 -0
- package/src/components/PinInput.tsx +555 -343
- package/src/components/PlatformConnectorsStep.tsx +892 -0
- package/src/components/PlatformToggle.tsx +226 -0
- package/src/components/PrimaryButton.tsx +214 -0
- package/src/components/SignInMatchAnimation.tsx +225 -0
- package/src/components/SignInStep.tsx +217 -0
- package/src/components/TrainingModal.tsx +1047 -737
- package/src/components/UniversalOnboarding.tsx +2888 -1820
- package/src/components/VerificationStep.tsx +198 -0
- package/src/components/WelcomeScreen.tsx +473 -0
- package/src/components/icons/Basicproficon.tsx +30 -0
- package/src/components/icons/Basicprofile.tsx +17 -0
- package/src/components/icons/Checkbox.tsx +17 -0
- package/src/components/icons/Checkmark.tsx +24 -0
- package/src/components/icons/Contentanalysis.tsx +17 -0
- package/src/components/icons/Contenticon.tsx +30 -0
- package/src/components/icons/EnochE.tsx +39 -0
- package/src/components/icons/Personalityicon.tsx +22 -0
- package/src/components/icons/Personalityprofile.tsx +17 -0
- package/src/components/icons/Personalitytraits.tsx +17 -0
- package/src/components/icons/Userpreferences.tsx +17 -0
- package/src/components/icons/index.ts +12 -0
- package/src/components/onboarding/OAuthWebView.tsx +232 -838
- package/src/config/api.ts +25 -0
- package/src/context/AuthContext.tsx +393 -0
- package/src/hooks/useConnectedAccounts.ts +139 -0
- package/src/hooks/useConnections.ts +129 -131
- package/src/hooks/useUserConnections.ts +166 -0
- package/src/index.ts +94 -49
- package/src/services/apiClient.ts +337 -0
- package/src/services/authService.ts +1008 -0
- package/src/services/biometricPinService.ts +193 -0
- package/src/services/connectedAccountsService.ts +290 -0
- package/src/services/googleAuthService.ts +279 -0
- package/src/services/imageCompressionService.ts +303 -0
- package/src/services/jwtStorageService.ts +257 -0
- package/src/services/mobileTrainingService.ts +204 -0
- package/src/services/pinEncryptionService.ts +76 -0
- package/src/services/pinStorageUtils.ts +97 -0
- package/src/services/platformAuthService.ts +1346 -1113
- package/src/services/storageService.ts +452 -0
- package/src/services/trainingApiHelpers.ts +67 -0
- package/src/services/userConnectionsService.ts +557 -0
- package/src/services/youtubeMigrationService.ts +454 -0
- package/src/theme/index.ts +239 -0
- package/src/types/index.ts +265 -238
- package/src/utils/eventUtils.ts +303 -0
- package/src/utils/haptics.ts +59 -0
- package/src/utils/imagePreloader.ts +2 -0
- package/README.md +0 -375
- 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/UniversalOnboarding.tsx.new +0 -455
- 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/UniversalOnboarding.tsx.new +0 -455
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/UniversalOnboarding.tsx.new +0 -455
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addEncryptedPinToTrainingData = void 0;
|
|
7
|
+
var _pinEncryptionService = require("./pinEncryptionService");
|
|
8
|
+
/**
|
|
9
|
+
* Helper functions for training API modifications
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Add encrypted PIN to training data if available
|
|
14
|
+
*/
|
|
15
|
+
const addEncryptedPinToTrainingData = async trainingData => {
|
|
16
|
+
try {
|
|
17
|
+
// Get encrypted PIN
|
|
18
|
+
const encryptedPin = await (0, _pinEncryptionService.getEncryptedPinForAPI)();
|
|
19
|
+
if (encryptedPin) {
|
|
20
|
+
console.log('✅ Adding encrypted PIN to training data');
|
|
21
|
+
return {
|
|
22
|
+
...trainingData,
|
|
23
|
+
encryptedPin: encryptedPin,
|
|
24
|
+
hasPinData: true
|
|
25
|
+
};
|
|
26
|
+
} else {
|
|
27
|
+
console.log('⚠️ No PIN available for training data');
|
|
28
|
+
return {
|
|
29
|
+
...trainingData,
|
|
30
|
+
hasPinData: false
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error('❌ Error adding encrypted PIN to training data:', error);
|
|
35
|
+
return {
|
|
36
|
+
...trainingData,
|
|
37
|
+
hasPinData: false
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Example of how to modify the training API call to include PIN
|
|
44
|
+
*
|
|
45
|
+
* Usage in UniversalOnboarding.tsx:
|
|
46
|
+
*
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Before sending to API
|
|
49
|
+
* const trainingData = {
|
|
50
|
+
* socketId,
|
|
51
|
+
* username: finalUsername,
|
|
52
|
+
* email: userInfo?.email || null,
|
|
53
|
+
* modelKey: null,
|
|
54
|
+
* connectedPlatforms: platformsList,
|
|
55
|
+
* platformConnections: connections
|
|
56
|
+
* };
|
|
57
|
+
*
|
|
58
|
+
* // Add encrypted PIN if needed
|
|
59
|
+
* const trainingDataWithPin = await addEncryptedPinToTrainingData(trainingData);
|
|
60
|
+
*
|
|
61
|
+
* // Send to API
|
|
62
|
+
* const response = await fetch('https://api2.onairos.uk/mobile-training/enoch', {
|
|
63
|
+
* method: 'POST',
|
|
64
|
+
* headers: {
|
|
65
|
+
* 'Content-Type': 'application/json',
|
|
66
|
+
* 'Authorization': `Bearer ${token}`
|
|
67
|
+
* },
|
|
68
|
+
* body: JSON.stringify(trainingDataWithPin)
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
exports.addEncryptedPinToTrainingData = addEncryptedPinToTrainingData;
|
|
73
|
+
//# sourceMappingURL=trainingApiHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_pinEncryptionService","require","addEncryptedPinToTrainingData","trainingData","encryptedPin","getEncryptedPinForAPI","console","log","hasPinData","error","exports"],"sourceRoot":"..\\..\\..\\src","sources":["services/trainingApiHelpers.ts"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMC,6BAA6B,GAAG,MAAOC,YAAiB,IAAmB;EACtF,IAAI;IACF;IACA,MAAMC,YAAY,GAAG,MAAM,IAAAC,2CAAqB,EAAC,CAAC;IAElD,IAAID,YAAY,EAAE;MAChBE,OAAO,CAACC,GAAG,CAAC,yCAAyC,CAAC;MACtD,OAAO;QACL,GAAGJ,YAAY;QACfC,YAAY,EAAEA,YAAY;QAC1BI,UAAU,EAAE;MACd,CAAC;IACH,CAAC,MAAM;MACLF,OAAO,CAACC,GAAG,CAAC,uCAAuC,CAAC;MACpD,OAAO;QACL,GAAGJ,YAAY;QACfK,UAAU,EAAE;MACd,CAAC;IACH;EACF,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdH,OAAO,CAACG,KAAK,CAAC,gDAAgD,EAAEA,KAAK,CAAC;IACtE,OAAO;MACL,GAAGN,YAAY;MACfK,UAAU,EAAE;IACd,CAAC;EACH;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7BAE,OAAA,CAAAR,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.uploadProfilePicture = exports.getUserConnectionsByUsername = exports.getUserConnectionsByUserId = exports.getUserConnections = void 0;
|
|
7
|
+
var _authService = require("./authService");
|
|
8
|
+
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
9
|
+
var _imageCompressionService = require("./imageCompressionService");
|
|
10
|
+
var _api = require("../config/api");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* Get user identifier (ID or username) using multiple fallback methods
|
|
14
|
+
* Backend now supports both user IDs and usernames for profile picture uploads
|
|
15
|
+
* @returns Promise<string | null>
|
|
16
|
+
*/
|
|
17
|
+
const getUserIdWithFallbacks = async () => {
|
|
18
|
+
try {
|
|
19
|
+
console.log('🔍 [USER ID] Attempting to get user identifier with multiple methods...');
|
|
20
|
+
|
|
21
|
+
// Method 1: Try getUserProfile first
|
|
22
|
+
try {
|
|
23
|
+
const userProfile = await (0, _authService.getUserProfile)();
|
|
24
|
+
if (userProfile !== null && userProfile !== void 0 && userProfile.id && userProfile.id !== 'fallback_user') {
|
|
25
|
+
console.log('✅ [USER ID] Got user ID from getUserProfile:', userProfile.id);
|
|
26
|
+
return userProfile.id;
|
|
27
|
+
} else {
|
|
28
|
+
console.warn('⚠️ [USER ID] getUserProfile returned invalid/fallback ID:', userProfile === null || userProfile === void 0 ? void 0 : userProfile.id);
|
|
29
|
+
}
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.warn('⚠️ [USER ID] getUserProfile failed:', error);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Method 2: Check AsyncStorage for stored user ID (but validate it)
|
|
35
|
+
const storedUserId = await _asyncStorage.default.getItem('user_id');
|
|
36
|
+
if (storedUserId && storedUserId !== 'marker' && storedUserId !== 'fallback_user' && storedUserId.length > 10) {
|
|
37
|
+
console.log('✅ [USER ID] Got user ID from AsyncStorage:', storedUserId);
|
|
38
|
+
return storedUserId;
|
|
39
|
+
} else if (storedUserId) {
|
|
40
|
+
console.warn('⚠️ [USER ID] Invalid stored user ID found:', storedUserId);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Method 3: Try stored username (backend now supports usernames!)
|
|
44
|
+
const storedUsername = await _asyncStorage.default.getItem('onairos_username');
|
|
45
|
+
if (storedUsername && storedUsername.length > 2 && storedUsername !== 'marker') {
|
|
46
|
+
console.log('✅ [USER ID] Got username from AsyncStorage (backend supports usernames):', storedUsername);
|
|
47
|
+
return storedUsername;
|
|
48
|
+
} else if (storedUsername) {
|
|
49
|
+
console.warn('⚠️ [USER ID] Invalid stored username found:', storedUsername);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Method 4: Try stored email as username fallback
|
|
53
|
+
const storedEmail = await _asyncStorage.default.getItem('user_email');
|
|
54
|
+
if (storedEmail && storedEmail.includes('@') && storedEmail.length > 5) {
|
|
55
|
+
console.log('✅ [USER ID] Got email from AsyncStorage (backend supports usernames):', storedEmail);
|
|
56
|
+
return storedEmail;
|
|
57
|
+
} else if (storedEmail) {
|
|
58
|
+
console.warn('⚠️ [USER ID] Invalid stored email found:', storedEmail);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Method 5: Check JWT token for user info (but don't decode, just log)
|
|
62
|
+
try {
|
|
63
|
+
const token = await (0, _authService.getAuthToken)();
|
|
64
|
+
if (token && token.split('.').length === 3) {
|
|
65
|
+
console.log('🔍 [USER ID] JWT token found but no local user identifier - backend should handle via token');
|
|
66
|
+
// Don't try to decode JWT here - let the backend handle it
|
|
67
|
+
}
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.warn('⚠️ [USER ID] JWT token access failed:', error);
|
|
70
|
+
}
|
|
71
|
+
console.error('❌ [USER ID] No valid user identifier found');
|
|
72
|
+
return null;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error('❌ [USER ID] Error getting user identifier:', error);
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Import images for fallback connections
|
|
80
|
+
const samImage = require('../assets/images/persona1.png');
|
|
81
|
+
const anandImage = require('../assets/images/persona2.png');
|
|
82
|
+
const chrisImage = require('../assets/images/persona3.png');
|
|
83
|
+
const katieImage = require('../assets/images/persona4.png');
|
|
84
|
+
const yanniImage = require('../assets/images/persona5.png');
|
|
85
|
+
const API_BASE_URL = _api.API_CONFIG.BASE_URL;
|
|
86
|
+
|
|
87
|
+
// Interface for API connection response - updated to match actual backend format
|
|
88
|
+
|
|
89
|
+
// Interface for API response
|
|
90
|
+
|
|
91
|
+
// Interface for the transformed connection used by UI
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Transform API connection to UI connection format
|
|
95
|
+
*/
|
|
96
|
+
const transformAPIConnection = apiConnection => {
|
|
97
|
+
var _apiConnection$photo, _apiConnection$mutual;
|
|
98
|
+
console.log('🔄 Transforming API connection:', {
|
|
99
|
+
id: apiConnection.id,
|
|
100
|
+
name: apiConnection.name,
|
|
101
|
+
description: apiConnection.description,
|
|
102
|
+
hasPhoto: !!apiConnection.photo,
|
|
103
|
+
photoLength: (_apiConnection$photo = apiConnection.photo) === null || _apiConnection$photo === void 0 ? void 0 : _apiConnection$photo.length,
|
|
104
|
+
interests: apiConnection.interests,
|
|
105
|
+
sharedPassions: apiConnection.sharedPassions,
|
|
106
|
+
complementaryQualities: apiConnection.complementaryQualities,
|
|
107
|
+
compatibility: apiConnection.compatibility
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
id: parseInt(apiConnection.id) || parseInt(apiConnection._id || '') || Math.random() * 1000,
|
|
111
|
+
// Try id first, then _id, then random
|
|
112
|
+
name: apiConnection.name || 'Unknown User',
|
|
113
|
+
description: apiConnection.description || 'Looking to connect',
|
|
114
|
+
photo: apiConnection.photo || '',
|
|
115
|
+
// This will be a URL string from API, or empty string
|
|
116
|
+
bio: apiConnection.bio || '',
|
|
117
|
+
interests: apiConnection.interests || [],
|
|
118
|
+
mutualConnections: apiConnection.mutualConnections || 0,
|
|
119
|
+
compatibility: apiConnection.compatibility || 0,
|
|
120
|
+
conversationStarters: apiConnection.conversationStarters || ['Hi! Nice to meet you.'],
|
|
121
|
+
// UI REQUIRED FIELDS - These are actually rendered in ProfileDetailScreen
|
|
122
|
+
sharedPassions: apiConnection.sharedPassions || [],
|
|
123
|
+
// Don't fallback to interests since we now have separate Interests section
|
|
124
|
+
complementaryQualities: apiConnection.complementaryQualities || [],
|
|
125
|
+
meaningfulCoincidences: apiConnection.meaningfulCoincidences || [],
|
|
126
|
+
mutualConnectionsList: ((_apiConnection$mutual = apiConnection.mutualConnectionsList) === null || _apiConnection$mutual === void 0 ? void 0 : _apiConnection$mutual.map(mutual => ({
|
|
127
|
+
name: mutual.name,
|
|
128
|
+
photo: mutual.photo,
|
|
129
|
+
// URL string from API
|
|
130
|
+
context: mutual.context
|
|
131
|
+
}))) || []
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get user connections by username
|
|
137
|
+
* @param username - Username to fetch connections for
|
|
138
|
+
* @returns Promise<Connection[]>
|
|
139
|
+
*/
|
|
140
|
+
const getUserConnectionsByUsername = async username => {
|
|
141
|
+
try {
|
|
142
|
+
var _response$connections, _response$connections2;
|
|
143
|
+
console.log('🔍 Fetching connections for username:', username);
|
|
144
|
+
const token = await (0, _authService.getAuthToken)();
|
|
145
|
+
|
|
146
|
+
// Enhanced token validation and warning
|
|
147
|
+
if (!token) {
|
|
148
|
+
console.warn('⚠️ [CONNECTIONS API] No authentication token available for connections request');
|
|
149
|
+
console.warn('⚠️ [CONNECTIONS API] This may result in limited or cached data from backend');
|
|
150
|
+
return []; // Return empty array instead of making unauthenticated request
|
|
151
|
+
}
|
|
152
|
+
console.log('✅ [CONNECTIONS API] Using authenticated request with token:', `${token.substring(0, 20)}...`);
|
|
153
|
+
|
|
154
|
+
// Use the same pattern as other working APIs - import and call with token
|
|
155
|
+
// const { getUserConnectionsByUsername: apiCall } = await import('../../services/api'); // Commented out - path issue
|
|
156
|
+
const response = {
|
|
157
|
+
success: false,
|
|
158
|
+
message: 'API function not available',
|
|
159
|
+
connections: [],
|
|
160
|
+
source: 'mock'
|
|
161
|
+
};
|
|
162
|
+
console.log('✅ API connections fetched by username:', {
|
|
163
|
+
success: response.success,
|
|
164
|
+
connectionsCount: ((_response$connections = response.connections) === null || _response$connections === void 0 ? void 0 : _response$connections.length) || 0,
|
|
165
|
+
source: response.source,
|
|
166
|
+
firstConnection: (_response$connections2 = response.connections) !== null && _response$connections2 !== void 0 && _response$connections2[0] ? {
|
|
167
|
+
id: response.connections[0].id,
|
|
168
|
+
name: response.connections[0].name,
|
|
169
|
+
description: response.connections[0].description
|
|
170
|
+
} : null
|
|
171
|
+
});
|
|
172
|
+
if (response.success && response.connections && response.connections.length > 0) {
|
|
173
|
+
const transformedConnections = response.connections.map(transformAPIConnection);
|
|
174
|
+
console.log('🔄 Transformed connections by username:', transformedConnections.length);
|
|
175
|
+
return transformedConnections;
|
|
176
|
+
}
|
|
177
|
+
return [];
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.log('❌ Error fetching connections by username:', error);
|
|
180
|
+
console.log('❌ [NETWORK ERROR] Full error details:', JSON.stringify(error, Object.getOwnPropertyNames(error)));
|
|
181
|
+
return [];
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Get user connections by user ID
|
|
187
|
+
* @param userId - User ID to fetch connections for
|
|
188
|
+
* @returns Promise<Connection[]>
|
|
189
|
+
*/
|
|
190
|
+
exports.getUserConnectionsByUsername = getUserConnectionsByUsername;
|
|
191
|
+
const getUserConnectionsByUserId = async userId => {
|
|
192
|
+
try {
|
|
193
|
+
var _response$connections3, _response$connections4;
|
|
194
|
+
console.log('🔍 Fetching connections for userId:', userId);
|
|
195
|
+
const token = await (0, _authService.getAuthToken)();
|
|
196
|
+
if (!token) {
|
|
197
|
+
console.warn('⚠️ [CONNECTIONS API] No authentication token available for user ID connections request');
|
|
198
|
+
return []; // Return empty array instead of making unauthenticated request
|
|
199
|
+
}
|
|
200
|
+
console.log('✅ [CONNECTIONS API] Using authenticated request with token:', `${token.substring(0, 20)}...`);
|
|
201
|
+
|
|
202
|
+
// Use the same pattern as other working APIs - import and call with token
|
|
203
|
+
// const { getUserConnections: apiCall } = await import('../../services/api'); // Commented out - path issue
|
|
204
|
+
const response = {
|
|
205
|
+
success: false,
|
|
206
|
+
message: 'API function not available',
|
|
207
|
+
connections: [],
|
|
208
|
+
source: 'mock'
|
|
209
|
+
};
|
|
210
|
+
console.log('✅ API connections fetched by userId:', {
|
|
211
|
+
success: response.success,
|
|
212
|
+
connectionsCount: ((_response$connections3 = response.connections) === null || _response$connections3 === void 0 ? void 0 : _response$connections3.length) || 0,
|
|
213
|
+
source: response.source,
|
|
214
|
+
firstConnection: (_response$connections4 = response.connections) !== null && _response$connections4 !== void 0 && _response$connections4[0] ? {
|
|
215
|
+
id: response.connections[0].id,
|
|
216
|
+
name: response.connections[0].name,
|
|
217
|
+
description: response.connections[0].description
|
|
218
|
+
} : null
|
|
219
|
+
});
|
|
220
|
+
if (response.success && response.connections && response.connections.length > 0) {
|
|
221
|
+
const transformedConnections = response.connections.map(transformAPIConnection);
|
|
222
|
+
console.log('🔄 Transformed connections by userId:', transformedConnections.length);
|
|
223
|
+
return transformedConnections;
|
|
224
|
+
}
|
|
225
|
+
return [];
|
|
226
|
+
} catch (error) {
|
|
227
|
+
console.log('❌ Error fetching connections by userId:', error);
|
|
228
|
+
console.log('❌ [NETWORK ERROR FALLBACK] Full error details:', JSON.stringify(error, Object.getOwnPropertyNames(error)));
|
|
229
|
+
return [];
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Get user connections with automatic detection of user info
|
|
235
|
+
* PRIORITIZES the working email/username endpoint over the failing user ID endpoint
|
|
236
|
+
* @returns Promise<Connection[]>
|
|
237
|
+
*/
|
|
238
|
+
exports.getUserConnectionsByUserId = getUserConnectionsByUserId;
|
|
239
|
+
const getUserConnections = async () => {
|
|
240
|
+
try {
|
|
241
|
+
// ENHANCED DEBUG: Check authentication status first
|
|
242
|
+
await (0, _authService.ensureAuthentication)('USER_CONNECTIONS');
|
|
243
|
+
|
|
244
|
+
// ENHANCED DEBUG: Check what user data we actually have available
|
|
245
|
+
console.log('🔍 [USER DEBUG] Checking all available user data sources...');
|
|
246
|
+
|
|
247
|
+
// Check AsyncStorage for user data
|
|
248
|
+
const storedUsername = await _asyncStorage.default.getItem('onairos_username');
|
|
249
|
+
const storedEmail = await _asyncStorage.default.getItem('user_email');
|
|
250
|
+
const storedUserId = await _asyncStorage.default.getItem('user_id');
|
|
251
|
+
const authToken = await _asyncStorage.default.getItem('auth_token');
|
|
252
|
+
console.log('🔍 [USER DEBUG] AsyncStorage data:', {
|
|
253
|
+
storedUsername,
|
|
254
|
+
storedEmail,
|
|
255
|
+
storedUserId,
|
|
256
|
+
hasAuthToken: !!authToken,
|
|
257
|
+
authTokenPreview: authToken ? `${authToken.substring(0, 20)}...` : 'none'
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// First try to get user profile to determine username/userId
|
|
261
|
+
const userProfile = await (0, _authService.getUserProfile)();
|
|
262
|
+
console.log('🎯 getUserConnections - User profile:', {
|
|
263
|
+
hasId: !!(userProfile !== null && userProfile !== void 0 && userProfile.id),
|
|
264
|
+
hasEmail: !!(userProfile !== null && userProfile !== void 0 && userProfile.email),
|
|
265
|
+
email: userProfile === null || userProfile === void 0 ? void 0 : userProfile.email,
|
|
266
|
+
id: userProfile === null || userProfile === void 0 ? void 0 : userProfile.id
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// FALLBACK: If getUserProfile fails, try to use stored data directly
|
|
270
|
+
let userEmail = userProfile === null || userProfile === void 0 ? void 0 : userProfile.email;
|
|
271
|
+
let userId = userProfile === null || userProfile === void 0 ? void 0 : userProfile.id;
|
|
272
|
+
if (!userEmail && storedUsername) {
|
|
273
|
+
console.log('🔄 [USER DEBUG] Using stored username as email fallback:', storedUsername);
|
|
274
|
+
userEmail = storedUsername;
|
|
275
|
+
}
|
|
276
|
+
if (!userEmail && storedEmail) {
|
|
277
|
+
console.log('🔄 [USER DEBUG] Using stored email as fallback:', storedEmail);
|
|
278
|
+
userEmail = storedEmail;
|
|
279
|
+
}
|
|
280
|
+
if (!userId && storedUserId) {
|
|
281
|
+
console.log('🔄 [USER DEBUG] Using stored user ID as fallback:', storedUserId);
|
|
282
|
+
userId = storedUserId;
|
|
283
|
+
}
|
|
284
|
+
console.log('🎯 [USER DEBUG] Final user identifiers to use:', {
|
|
285
|
+
userEmail,
|
|
286
|
+
userId,
|
|
287
|
+
willTryEmail: !!userEmail,
|
|
288
|
+
willTryUserId: !!userId
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
// PRIORITY 1: Try by email/username first (this endpoint is working!)
|
|
292
|
+
if (userEmail) {
|
|
293
|
+
console.log('🎯 PRIORITY: Attempting to fetch connections by email (working endpoint):', userEmail);
|
|
294
|
+
const connections = await getUserConnectionsByUsername(userEmail);
|
|
295
|
+
if (connections.length > 0) {
|
|
296
|
+
console.log('✅ Successfully got connections by email:', connections.length);
|
|
297
|
+
return connections;
|
|
298
|
+
}
|
|
299
|
+
console.log('⚠️ No connections found by email, trying user ID...');
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// PRIORITY 2: Try by user ID only if email fails (this endpoint has ObjectId issues)
|
|
303
|
+
if (userId) {
|
|
304
|
+
console.log('🎯 FALLBACK: Attempting to fetch connections by user ID:', userId);
|
|
305
|
+
const connections = await getUserConnectionsByUserId(userId);
|
|
306
|
+
if (connections.length > 0) {
|
|
307
|
+
console.log('✅ Successfully got connections by user ID:', connections.length);
|
|
308
|
+
return connections;
|
|
309
|
+
}
|
|
310
|
+
console.log('⚠️ No connections found by user ID');
|
|
311
|
+
}
|
|
312
|
+
console.log('⚠️ No user identifier available or no connections found');
|
|
313
|
+
return [];
|
|
314
|
+
} catch (error) {
|
|
315
|
+
console.log('❌ Error in getUserConnections:', error);
|
|
316
|
+
return [];
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Upload profile picture using base64 data with compression
|
|
322
|
+
* The backend identifies the user from the JWT token, no need for user ID in URL
|
|
323
|
+
* @param imageUri - Image URI (file:// or base64)
|
|
324
|
+
* @param fileType - File type (jpg, png) - optional, will be extracted from imageUri if not provided
|
|
325
|
+
* @returns Promise<{ success: boolean; photoUrl?: string; error?: string }>
|
|
326
|
+
*/
|
|
327
|
+
exports.getUserConnections = getUserConnections;
|
|
328
|
+
const uploadProfilePicture = async (imageUri, fileType) => {
|
|
329
|
+
try {
|
|
330
|
+
console.log('🔍 [UPLOAD] Starting profile picture upload process...');
|
|
331
|
+
console.log('🔍 [UPLOAD] Input parameters:', {
|
|
332
|
+
imageUri: imageUri.substring(0, 100) + '...',
|
|
333
|
+
// Show first 100 chars
|
|
334
|
+
imageUriLength: imageUri.length,
|
|
335
|
+
providedFileType: fileType,
|
|
336
|
+
isFileUri: imageUri.startsWith('file://'),
|
|
337
|
+
isHttpUri: imageUri.startsWith('http'),
|
|
338
|
+
isBase64: !imageUri.startsWith('file://') && !imageUri.startsWith('http')
|
|
339
|
+
});
|
|
340
|
+
const token = await (0, _authService.getAuthToken)();
|
|
341
|
+
if (!token) {
|
|
342
|
+
console.error('❌ [UPLOAD] No authentication token available');
|
|
343
|
+
throw new Error('No authentication token available');
|
|
344
|
+
}
|
|
345
|
+
console.log('✅ [UPLOAD] Authentication token found:', `${token.substring(0, 20)}...`);
|
|
346
|
+
|
|
347
|
+
// Log token details for debugging
|
|
348
|
+
console.log('🔍 [UPLOAD] Token details:', {
|
|
349
|
+
tokenLength: token.length,
|
|
350
|
+
tokenPreview: `${token.substring(0, 20)}...`,
|
|
351
|
+
hasBearer: token.startsWith('eyJ'),
|
|
352
|
+
isJWT: token.split('.').length === 3
|
|
353
|
+
});
|
|
354
|
+
let imageData;
|
|
355
|
+
let finalFileType;
|
|
356
|
+
|
|
357
|
+
// Extract file type from imageUri if not provided
|
|
358
|
+
if (!fileType) {
|
|
359
|
+
if (imageUri.startsWith('file://') || imageUri.startsWith('http')) {
|
|
360
|
+
// Extract file extension from file path or URL
|
|
361
|
+
const urlParts = imageUri.split('.');
|
|
362
|
+
const extension = urlParts[urlParts.length - 1].toLowerCase();
|
|
363
|
+
|
|
364
|
+
// Handle common image extensions
|
|
365
|
+
if (['jpg', 'jpeg', 'png', 'gif', 'webp'].includes(extension)) {
|
|
366
|
+
finalFileType = extension === 'jpeg' ? 'jpg' : extension;
|
|
367
|
+
} else {
|
|
368
|
+
finalFileType = 'jpg'; // Default fallback
|
|
369
|
+
}
|
|
370
|
+
console.log('🔍 [UPLOAD] Extracted file type from URI:', finalFileType, 'from', imageUri.substring(0, 100));
|
|
371
|
+
} else {
|
|
372
|
+
finalFileType = 'jpg'; // Default for base64 data
|
|
373
|
+
console.log('🔍 [UPLOAD] Using default file type for base64 data:', finalFileType);
|
|
374
|
+
}
|
|
375
|
+
} else {
|
|
376
|
+
// Clean up provided file type
|
|
377
|
+
finalFileType = fileType.toLowerCase().replace('.', '');
|
|
378
|
+
console.log('🔍 [UPLOAD] Using provided file type:', finalFileType);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// Prepare image data
|
|
382
|
+
if (!imageUri.startsWith('file://') && !imageUri.startsWith('http')) {
|
|
383
|
+
// Assume it's already base64 data
|
|
384
|
+
console.log('📸 [UPLOAD] Using provided base64 data');
|
|
385
|
+
|
|
386
|
+
// Validate that it looks like base64 image data
|
|
387
|
+
if (imageUri.length < 100 || !/^[A-Za-z0-9+/]/.test(imageUri)) {
|
|
388
|
+
console.error('❌ [UPLOAD] Invalid base64 data detected:', {
|
|
389
|
+
length: imageUri.length,
|
|
390
|
+
preview: imageUri.substring(0, 50),
|
|
391
|
+
looksLikeBase64: /^[A-Za-z0-9+/]/.test(imageUri)
|
|
392
|
+
});
|
|
393
|
+
throw new Error('Invalid image data provided - expected base64 encoded image');
|
|
394
|
+
}
|
|
395
|
+
imageData = imageUri;
|
|
396
|
+
} else {
|
|
397
|
+
var _compressedResult$com;
|
|
398
|
+
// It's a file URI, need to compress and convert to base64
|
|
399
|
+
console.log('📸 [UPLOAD] Converting file URI to base64...');
|
|
400
|
+
const compressedResult = await (0, _imageCompressionService.compressProfilePicture)(imageUri);
|
|
401
|
+
|
|
402
|
+
// Check if compression was successful
|
|
403
|
+
if (!compressedResult.success || !compressedResult.base64) {
|
|
404
|
+
console.error('❌ [UPLOAD] Image compression failed:', compressedResult.error);
|
|
405
|
+
throw new Error(compressedResult.error || 'Failed to compress image');
|
|
406
|
+
}
|
|
407
|
+
console.log(`✅ [UPLOAD] Image compressed: ${compressedResult.sizeKB}KB (${(_compressedResult$com = compressedResult.compressionRatio) === null || _compressedResult$com === void 0 ? void 0 : _compressedResult$com.toFixed(2)}x compression)`);
|
|
408
|
+
imageData = compressedResult.base64;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Final validation of image data and file type
|
|
412
|
+
console.log('🔍 [UPLOAD] Final upload data:', {
|
|
413
|
+
imageDataLength: imageData.length,
|
|
414
|
+
imageDataPreview: imageData.substring(0, 50) + '...',
|
|
415
|
+
fileType: finalFileType,
|
|
416
|
+
isValidBase64: /^[A-Za-z0-9+/]/.test(imageData),
|
|
417
|
+
hasValidLength: imageData.length > 1000 // Should be substantial for an image
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
// Now try to upload using the correct backend endpoint
|
|
421
|
+
console.log('📤 [UPLOAD] Trying user-specific profile picture endpoint (backend supports usernames)...');
|
|
422
|
+
|
|
423
|
+
// Get the user identifier (could be username or user ID - backend now supports both)
|
|
424
|
+
const userIdentifier = await getUserIdWithFallbacks();
|
|
425
|
+
if (!userIdentifier) {
|
|
426
|
+
console.error('❌ [UPLOAD] Cannot determine user identifier');
|
|
427
|
+
throw new Error('Unable to determine user identifier - please ensure you are logged in properly');
|
|
428
|
+
}
|
|
429
|
+
console.log('📸 [UPLOAD] Uploading profile picture for user identifier:', userIdentifier);
|
|
430
|
+
const response = await fetch(`${API_BASE_URL}/enoch/users/${userIdentifier}/profile-picture/base64`, {
|
|
431
|
+
method: 'POST',
|
|
432
|
+
headers: (0, _api.getAuthHeaders)(token),
|
|
433
|
+
body: JSON.stringify({
|
|
434
|
+
imageData,
|
|
435
|
+
fileType: finalFileType
|
|
436
|
+
})
|
|
437
|
+
});
|
|
438
|
+
const responseData = await response.json();
|
|
439
|
+
console.log('📡 [UPLOAD] Backend response:', {
|
|
440
|
+
status: response.status,
|
|
441
|
+
success: responseData.success,
|
|
442
|
+
photoUrl: responseData.photoUrl,
|
|
443
|
+
error: responseData.error,
|
|
444
|
+
userIdentifier: userIdentifier
|
|
445
|
+
});
|
|
446
|
+
if (response.ok && responseData.success) {
|
|
447
|
+
console.log('✅ [UPLOAD] Profile picture uploaded successfully');
|
|
448
|
+
return {
|
|
449
|
+
success: true,
|
|
450
|
+
photoUrl: responseData.photoUrl || responseData.url
|
|
451
|
+
};
|
|
452
|
+
} else {
|
|
453
|
+
console.error('❌ [UPLOAD] Profile picture upload failed:', responseData.error || 'Unknown error');
|
|
454
|
+
|
|
455
|
+
// Enhanced error logging for debugging
|
|
456
|
+
if (response.status === 403) {
|
|
457
|
+
console.error('🚫 [UPLOAD] 403 Forbidden - Authentication issue detected');
|
|
458
|
+
console.error('🔍 [UPLOAD] Debug info:', {
|
|
459
|
+
userIdentifier: userIdentifier,
|
|
460
|
+
tokenPreview: `${token.substring(0, 20)}...`,
|
|
461
|
+
tokenLength: token.length,
|
|
462
|
+
responseError: responseData.error
|
|
463
|
+
});
|
|
464
|
+
} else if (response.status === 400) {
|
|
465
|
+
console.error('🚫 [UPLOAD] 400 Bad Request - Data format issue detected');
|
|
466
|
+
console.error('🔍 [UPLOAD] Debug info:', {
|
|
467
|
+
imageDataLength: imageData.length,
|
|
468
|
+
fileType: finalFileType,
|
|
469
|
+
responseError: responseData.error
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
return {
|
|
473
|
+
success: false,
|
|
474
|
+
error: responseData.error || `HTTP ${response.status}: ${response.statusText}`
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
} catch (error) {
|
|
478
|
+
console.error('❌ [UPLOAD] Error uploading profile picture:', error);
|
|
479
|
+
return {
|
|
480
|
+
success: false,
|
|
481
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred'
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
exports.uploadProfilePicture = uploadProfilePicture;
|
|
486
|
+
//# sourceMappingURL=userConnectionsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_authService","require","_asyncStorage","_interopRequireDefault","_imageCompressionService","_api","e","__esModule","default","getUserIdWithFallbacks","console","log","userProfile","getUserProfile","id","warn","error","storedUserId","AsyncStorage","getItem","length","storedUsername","storedEmail","includes","token","getAuthToken","split","samImage","anandImage","chrisImage","katieImage","yanniImage","API_BASE_URL","API_CONFIG","BASE_URL","transformAPIConnection","apiConnection","_apiConnection$photo","_apiConnection$mutual","name","description","hasPhoto","photo","photoLength","interests","sharedPassions","complementaryQualities","compatibility","parseInt","_id","Math","random","bio","mutualConnections","conversationStarters","meaningfulCoincidences","mutualConnectionsList","map","mutual","context","getUserConnectionsByUsername","username","_response$connections","_response$connections2","substring","response","success","message","connections","source","connectionsCount","firstConnection","transformedConnections","JSON","stringify","Object","getOwnPropertyNames","exports","getUserConnectionsByUserId","userId","_response$connections3","_response$connections4","getUserConnections","ensureAuthentication","authToken","hasAuthToken","authTokenPreview","hasId","hasEmail","email","userEmail","willTryEmail","willTryUserId","uploadProfilePicture","imageUri","fileType","imageUriLength","providedFileType","isFileUri","startsWith","isHttpUri","isBase64","Error","tokenLength","tokenPreview","hasBearer","isJWT","imageData","finalFileType","urlParts","extension","toLowerCase","replace","test","preview","looksLikeBase64","_compressedResult$com","compressedResult","compressProfilePicture","base64","sizeKB","compressionRatio","toFixed","imageDataLength","imageDataPreview","isValidBase64","hasValidLength","userIdentifier","fetch","method","headers","getAuthHeaders","body","responseData","json","status","photoUrl","ok","url","responseError","statusText"],"sourceRoot":"..\\..\\..\\src","sources":["services/userConnectionsService.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAA0E,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CA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