@onairos/react-native 3.1.17 → 3.2.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 +374 -403
- package/lib/commonjs/api/index.js +1 -75
- package/lib/commonjs/api/index.js.map +1 -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.map +1 -1
- package/lib/commonjs/components/DataRequestScreen.js.map +1 -1
- package/lib/commonjs/components/EmailVerificationModal.js.map +1 -1
- package/lib/commonjs/components/Onairos.js +3 -1
- package/lib/commonjs/components/Onairos.js.map +1 -1
- package/lib/commonjs/components/OnairosButton.js +190 -171
- package/lib/commonjs/components/OnairosButton.js.map +1 -1
- package/lib/commonjs/components/Overlay.js +5 -5
- package/lib/commonjs/components/Overlay.js.map +1 -1
- package/lib/commonjs/components/PinInput.js +120 -282
- package/lib/commonjs/components/PinInput.js.map +1 -1
- package/lib/commonjs/components/PlatformList.js.map +1 -1
- package/lib/commonjs/components/TrainingModal.js +563 -808
- package/lib/commonjs/components/TrainingModal.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +1283 -2304
- package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +455 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +743 -134
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js.map +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -1
- package/lib/commonjs/components/screens/LoadingScreen.js.map +1 -1
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +1 -1
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/hooks/useConnections.js +125 -120
- package/lib/commonjs/hooks/useConnections.js.map +1 -1
- package/lib/commonjs/hooks/useCredentials.js.map +1 -1
- package/lib/commonjs/index.js +31 -193
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/apiKeyService.js +102 -101
- package/lib/commonjs/services/apiKeyService.js.map +1 -1
- package/lib/commonjs/services/oauthService.js.map +1 -1
- package/lib/commonjs/services/platformAuthService.js +722 -956
- package/lib/commonjs/services/platformAuthService.js.map +1 -1
- package/lib/commonjs/types/ambient.d.js.map +1 -1
- package/lib/commonjs/types/declarations.d.js.map +1 -1
- package/lib/commonjs/types/index.d.js.map +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/node-fix.d.js.map +1 -1
- package/lib/commonjs/types/node-override.d.js.map +1 -1
- package/lib/commonjs/types/opacity.d.js.map +1 -1
- package/lib/commonjs/types/types.d.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/Portal.js +4 -4
- package/lib/commonjs/utils/Portal.js.map +1 -1
- package/lib/commonjs/utils/api.js +24 -24
- package/lib/commonjs/utils/api.js.map +1 -1
- package/lib/commonjs/utils/auth.js +18 -18
- package/lib/commonjs/utils/auth.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +13 -13
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/debugHelper.js.map +1 -1
- package/lib/commonjs/utils/encryption.js +12 -12
- package/lib/commonjs/utils/encryption.js.map +1 -1
- package/lib/commonjs/utils/onairosApi.js.map +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +16 -16
- package/lib/commonjs/utils/programmaticFlow.js.map +1 -1
- package/lib/commonjs/utils/retryHelper.js +27 -27
- package/lib/commonjs/utils/retryHelper.js.map +1 -1
- package/lib/commonjs/utils/secureStorage.js.map +1 -1
- package/lib/module/api/index.js +0 -72
- package/lib/module/api/index.js.map +1 -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.map +1 -1
- package/lib/module/components/DataRequestScreen.js.map +1 -1
- package/lib/module/components/EmailVerificationModal.js.map +1 -1
- package/lib/module/components/Onairos.js +3 -1
- package/lib/module/components/Onairos.js.map +1 -1
- package/lib/module/components/OnairosButton.js +192 -172
- package/lib/module/components/OnairosButton.js.map +1 -1
- package/lib/module/components/Overlay.js +5 -5
- package/lib/module/components/Overlay.js.map +1 -1
- package/lib/module/components/PinInput.js +120 -283
- package/lib/module/components/PinInput.js.map +1 -1
- package/lib/module/components/PlatformList.js.map +1 -1
- package/lib/module/components/TrainingModal.js +565 -809
- package/lib/module/components/TrainingModal.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.js +1284 -2307
- package/lib/module/components/UniversalOnboarding.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.tsx.new +455 -0
- package/lib/module/components/onboarding/OAuthWebView.js +744 -136
- package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js.map +1 -1
- package/lib/module/components/onboarding/PinInput.js.map +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +1 -1
- package/lib/module/components/screens/ConnectorScreen.js.map +1 -1
- package/lib/module/components/screens/LoadingScreen.js.map +1 -1
- package/lib/module/components/screens/PinCreationScreen.js.map +1 -1
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/hooks/useConnections.js +125 -119
- package/lib/module/hooks/useConnections.js.map +1 -1
- package/lib/module/hooks/useCredentials.js.map +1 -1
- package/lib/module/index.js +15 -51
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/apiKeyService.js +102 -101
- package/lib/module/services/apiKeyService.js.map +1 -1
- package/lib/module/services/oauthService.js.map +1 -1
- package/lib/module/services/platformAuthService.js +704 -943
- package/lib/module/services/platformAuthService.js.map +1 -1
- package/lib/module/types/ambient.d.js.map +1 -1
- package/lib/module/types/declarations.d.js.map +1 -1
- package/lib/module/types/index.d.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/node-fix.d.js.map +1 -1
- package/lib/module/types/node-override.d.js.map +1 -1
- package/lib/module/types/opacity.d.js.map +1 -1
- package/lib/module/types/types.d.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/Portal.js +4 -4
- package/lib/module/utils/Portal.js.map +1 -1
- package/lib/module/utils/api.js +24 -24
- package/lib/module/utils/api.js.map +1 -1
- package/lib/module/utils/auth.js +18 -18
- package/lib/module/utils/auth.js.map +1 -1
- package/lib/module/utils/crypto.js +13 -13
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/debugHelper.js.map +1 -1
- package/lib/module/utils/encryption.js +12 -12
- package/lib/module/utils/encryption.js.map +1 -1
- package/lib/module/utils/onairosApi.js.map +1 -1
- package/lib/module/utils/programmaticFlow.js +16 -16
- package/lib/module/utils/programmaticFlow.js.map +1 -1
- package/lib/module/utils/retryHelper.js +27 -27
- package/lib/module/utils/retryHelper.js.map +1 -1
- package/lib/module/utils/secureStorage.js.map +1 -1
- package/lib/typescript/api/index.d.ts +7 -15
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/components/DataRequestModal.d.ts +10 -10
- package/lib/typescript/components/DataRequestScreen.d.ts +10 -10
- package/lib/typescript/components/EmailVerificationModal.d.ts +10 -10
- package/lib/typescript/components/Onairos.d.ts +3 -3
- package/lib/typescript/components/Onairos.d.ts.map +1 -1
- package/lib/typescript/components/OnairosButton.d.ts +11 -36
- package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
- package/lib/typescript/components/Overlay.d.ts +3 -3
- package/lib/typescript/components/PinInput.d.ts +3 -13
- package/lib/typescript/components/PinInput.d.ts.map +1 -1
- package/lib/typescript/components/PlatformList.d.ts +3 -3
- package/lib/typescript/components/TrainingModal.d.ts +3 -14
- package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +3 -16
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +9 -9
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +10 -10
- package/lib/typescript/components/onboarding/PinInput.d.ts +3 -3
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +12 -12
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +8 -8
- package/lib/typescript/components/screens/LoadingScreen.d.ts +8 -8
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +9 -9
- package/lib/typescript/constants/index.d.ts +52 -52
- package/lib/typescript/hooks/useConnections.d.ts +8 -13
- package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
- package/lib/typescript/hooks/useCredentials.d.ts +8 -8
- package/lib/typescript/index.d.ts +17 -35
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/services/apiKeyService.d.ts +131 -131
- package/lib/typescript/services/apiKeyService.d.ts.map +1 -1
- package/lib/typescript/services/oauthService.d.ts +49 -49
- package/lib/typescript/services/platformAuthService.d.ts +143 -68
- package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +225 -264
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +266 -266
- package/lib/typescript/utils/Portal.d.ts +13 -13
- package/lib/typescript/utils/api.d.ts +5 -5
- package/lib/typescript/utils/auth.d.ts +5 -5
- package/lib/typescript/utils/crypto.d.ts +3 -3
- package/lib/typescript/utils/debugHelper.d.ts +28 -28
- package/lib/typescript/utils/encryption.d.ts +18 -18
- package/lib/typescript/utils/onairosApi.d.ts +86 -86
- package/lib/typescript/utils/programmaticFlow.d.ts +22 -22
- package/lib/typescript/utils/retryHelper.d.ts +68 -68
- package/lib/typescript/utils/secureStorage.d.ts +93 -93
- package/package.json +149 -163
- package/src/api/index.ts +110 -151
- 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/DataRequestScreen.tsx +355 -355
- package/src/components/EmailVerificationModal.tsx +363 -363
- package/src/components/Onairos.tsx +424 -422
- package/src/components/OnairosButton.tsx +359 -339
- package/src/components/Overlay.tsx +506 -506
- package/src/components/PinInput.tsx +343 -555
- package/src/components/PlatformList.tsx +144 -144
- package/src/components/TrainingModal.tsx +737 -1047
- package/src/components/UniversalOnboarding.tsx +1820 -2888
- package/src/components/UniversalOnboarding.tsx.new +455 -0
- package/src/components/onboarding/OAuthWebView.tsx +838 -232
- package/src/hooks/useConnections.ts +163 -161
- package/src/hooks/useCredentials.ts +174 -174
- package/src/index.js +14 -14
- package/src/index.ts +49 -94
- package/src/services/apiKeyService.ts +921 -919
- package/src/services/platformAuthService.ts +1113 -1346
- package/src/types/ambient.d.ts +28 -28
- package/src/types/index.ts +238 -265
- package/src/types/node-fix.d.ts +18 -18
- package/src/types/node-override.d.ts +23 -23
- package/src/types/opacity.d.ts +15 -15
- package/src/types/types.d.ts +17 -17
- package/src/utils/Portal.tsx +82 -82
- package/src/utils/api.js +111 -111
- package/src/utils/auth.js +103 -103
- package/src/utils/crypto.js +59 -59
- package/src/utils/encryption.ts +68 -68
- package/src/utils/programmaticFlow.ts +112 -112
- package/src/utils/retryHelper.ts +274 -274
- package/types/index.d.ts +213 -213
- package/types/node-env.d.ts +14 -14
- 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 +0 -3
- package/lib/commonjs/assets/images/EnochE.svg +0 -19
- 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 +0 -3
- package/lib/commonjs/assets/images/Personalitytraits.svg +0 -3
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +0 -3
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +0 -20
- package/lib/commonjs/assets/images/basicproficon.svg +0 -43
- package/lib/commonjs/assets/images/basicprofile.svg +0 -3
- package/lib/commonjs/assets/images/checkmark.svg +0 -4
- package/lib/commonjs/assets/images/contentanalysis.svg +0 -3
- package/lib/commonjs/assets/images/contenticon.svg +0 -23
- 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 +0 -18
- package/lib/commonjs/assets/images/x-close.svg +0 -3
- package/lib/commonjs/components/BodyText.js +0 -27
- package/lib/commonjs/components/BodyText.js.map +0 -1
- package/lib/commonjs/components/BrandMark.js +0 -44
- package/lib/commonjs/components/BrandMark.js.map +0 -1
- package/lib/commonjs/components/CodeInput.js +0 -30
- package/lib/commonjs/components/CodeInput.js.map +0 -1
- package/lib/commonjs/components/EmailInput.js +0 -30
- package/lib/commonjs/components/EmailInput.js.map +0 -1
- package/lib/commonjs/components/ExistingUserDataConfirmation.js +0 -474
- package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +0 -1
- package/lib/commonjs/components/GoogleButton.js +0 -55
- package/lib/commonjs/components/GoogleButton.js.map +0 -1
- package/lib/commonjs/components/HeadingGroup.js +0 -43
- package/lib/commonjs/components/HeadingGroup.js.map +0 -1
- package/lib/commonjs/components/ModalHeader.js +0 -99
- package/lib/commonjs/components/ModalHeader.js.map +0 -1
- package/lib/commonjs/components/ModalSheet.js +0 -41
- package/lib/commonjs/components/ModalSheet.js.map +0 -1
- package/lib/commonjs/components/OnairosSignInButton.js +0 -127
- package/lib/commonjs/components/OnairosSignInButton.js.map +0 -1
- package/lib/commonjs/components/PersonaImage.js +0 -60
- package/lib/commonjs/components/PersonaImage.js.map +0 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +0 -156
- package/lib/commonjs/components/PersonaLoadingScreen.js.map +0 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +0 -316
- package/lib/commonjs/components/PersonalizationConsentScreen.js.map +0 -1
- package/lib/commonjs/components/PinCreationScreen.js +0 -393
- package/lib/commonjs/components/PinCreationScreen.js.map +0 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +0 -828
- package/lib/commonjs/components/PlatformConnectorsStep.js.map +0 -1
- package/lib/commonjs/components/PlatformToggle.js +0 -180
- package/lib/commonjs/components/PlatformToggle.js.map +0 -1
- package/lib/commonjs/components/PrimaryButton.js +0 -180
- package/lib/commonjs/components/PrimaryButton.js.map +0 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +0 -197
- package/lib/commonjs/components/SignInMatchAnimation.js.map +0 -1
- package/lib/commonjs/components/SignInStep.js +0 -179
- package/lib/commonjs/components/SignInStep.js.map +0 -1
- package/lib/commonjs/components/VerificationStep.js +0 -154
- package/lib/commonjs/components/VerificationStep.js.map +0 -1
- package/lib/commonjs/components/WelcomeScreen.js +0 -385
- package/lib/commonjs/components/WelcomeScreen.js.map +0 -1
- package/lib/commonjs/components/icons/Basicproficon.js +0 -37
- package/lib/commonjs/components/icons/Basicproficon.js.map +0 -1
- package/lib/commonjs/components/icons/Basicprofile.js +0 -21
- package/lib/commonjs/components/icons/Basicprofile.js.map +0 -1
- package/lib/commonjs/components/icons/Checkbox.js +0 -21
- package/lib/commonjs/components/icons/Checkbox.js.map +0 -1
- package/lib/commonjs/components/icons/Checkmark.js +0 -27
- package/lib/commonjs/components/icons/Checkmark.js.map +0 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +0 -21
- package/lib/commonjs/components/icons/Contentanalysis.js.map +0 -1
- package/lib/commonjs/components/icons/Contenticon.js +0 -39
- package/lib/commonjs/components/icons/Contenticon.js.map +0 -1
- package/lib/commonjs/components/icons/EnochE.js +0 -41
- package/lib/commonjs/components/icons/EnochE.js.map +0 -1
- package/lib/commonjs/components/icons/Personalityicon.js +0 -30
- package/lib/commonjs/components/icons/Personalityicon.js.map +0 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +0 -21
- package/lib/commonjs/components/icons/Personalityprofile.js.map +0 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +0 -21
- package/lib/commonjs/components/icons/Personalitytraits.js.map +0 -1
- package/lib/commonjs/components/icons/Userpreferences.js +0 -21
- package/lib/commonjs/components/icons/Userpreferences.js.map +0 -1
- package/lib/commonjs/components/icons/index.js +0 -84
- package/lib/commonjs/components/icons/index.js.map +0 -1
- package/lib/commonjs/config/api.js +0 -34
- package/lib/commonjs/config/api.js.map +0 -1
- package/lib/commonjs/context/AuthContext.js +0 -345
- package/lib/commonjs/context/AuthContext.js.map +0 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +0 -111
- package/lib/commonjs/hooks/useConnectedAccounts.js.map +0 -1
- package/lib/commonjs/hooks/useUserConnections.js +0 -148
- package/lib/commonjs/hooks/useUserConnections.js.map +0 -1
- package/lib/commonjs/services/apiClient.js +0 -302
- package/lib/commonjs/services/apiClient.js.map +0 -1
- package/lib/commonjs/services/authService.js +0 -935
- package/lib/commonjs/services/authService.js.map +0 -1
- package/lib/commonjs/services/biometricPinService.js +0 -184
- package/lib/commonjs/services/biometricPinService.js.map +0 -1
- package/lib/commonjs/services/connectedAccountsService.js +0 -268
- package/lib/commonjs/services/connectedAccountsService.js.map +0 -1
- package/lib/commonjs/services/googleAuthService.js +0 -268
- package/lib/commonjs/services/googleAuthService.js.map +0 -1
- package/lib/commonjs/services/imageCompressionService.js +0 -260
- package/lib/commonjs/services/imageCompressionService.js.map +0 -1
- package/lib/commonjs/services/jwtStorageService.js +0 -256
- package/lib/commonjs/services/jwtStorageService.js.map +0 -1
- package/lib/commonjs/services/mobileTrainingService.js +0 -185
- package/lib/commonjs/services/mobileTrainingService.js.map +0 -1
- package/lib/commonjs/services/pinEncryptionService.js +0 -84
- package/lib/commonjs/services/pinEncryptionService.js.map +0 -1
- package/lib/commonjs/services/pinStorageUtils.js +0 -105
- package/lib/commonjs/services/pinStorageUtils.js.map +0 -1
- package/lib/commonjs/services/storageService.js +0 -404
- package/lib/commonjs/services/storageService.js.map +0 -1
- package/lib/commonjs/services/trainingApiHelpers.js +0 -73
- package/lib/commonjs/services/trainingApiHelpers.js.map +0 -1
- package/lib/commonjs/services/userConnectionsService.js +0 -486
- package/lib/commonjs/services/userConnectionsService.js.map +0 -1
- package/lib/commonjs/services/youtubeMigrationService.js +0 -415
- package/lib/commonjs/services/youtubeMigrationService.js.map +0 -1
- package/lib/commonjs/theme/index.js +0 -249
- package/lib/commonjs/theme/index.js.map +0 -1
- package/lib/commonjs/utils/eventUtils.js +0 -288
- package/lib/commonjs/utils/eventUtils.js.map +0 -1
- package/lib/commonjs/utils/haptics.js +0 -66
- package/lib/commonjs/utils/haptics.js.map +0 -1
- package/lib/commonjs/utils/imagePreloader.js +0 -6
- package/lib/commonjs/utils/imagePreloader.js.map +0 -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 +0 -3
- package/lib/module/assets/images/EnochE.svg +0 -19
- 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 +0 -3
- package/lib/module/assets/images/Personalitytraits.svg +0 -3
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +0 -3
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +0 -20
- package/lib/module/assets/images/basicproficon.svg +0 -43
- package/lib/module/assets/images/basicprofile.svg +0 -3
- package/lib/module/assets/images/checkmark.svg +0 -4
- package/lib/module/assets/images/contentanalysis.svg +0 -3
- package/lib/module/assets/images/contenticon.svg +0 -23
- 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 +0 -18
- package/lib/module/assets/images/x-close.svg +0 -3
- package/lib/module/components/BodyText.js +0 -20
- package/lib/module/components/BodyText.js.map +0 -1
- package/lib/module/components/BrandMark.js +0 -37
- package/lib/module/components/BrandMark.js.map +0 -1
- package/lib/module/components/CodeInput.js +0 -23
- package/lib/module/components/CodeInput.js.map +0 -1
- package/lib/module/components/EmailInput.js +0 -23
- package/lib/module/components/EmailInput.js.map +0 -1
- package/lib/module/components/ExistingUserDataConfirmation.js +0 -465
- package/lib/module/components/ExistingUserDataConfirmation.js.map +0 -1
- package/lib/module/components/GoogleButton.js +0 -48
- package/lib/module/components/GoogleButton.js.map +0 -1
- package/lib/module/components/HeadingGroup.js +0 -36
- package/lib/module/components/HeadingGroup.js.map +0 -1
- package/lib/module/components/ModalHeader.js +0 -92
- package/lib/module/components/ModalHeader.js.map +0 -1
- package/lib/module/components/ModalSheet.js +0 -34
- package/lib/module/components/ModalSheet.js.map +0 -1
- package/lib/module/components/OnairosSignInButton.js +0 -118
- package/lib/module/components/OnairosSignInButton.js.map +0 -1
- package/lib/module/components/PersonaImage.js +0 -53
- package/lib/module/components/PersonaImage.js.map +0 -1
- package/lib/module/components/PersonaLoadingScreen.js +0 -148
- package/lib/module/components/PersonaLoadingScreen.js.map +0 -1
- package/lib/module/components/PersonalizationConsentScreen.js +0 -309
- package/lib/module/components/PersonalizationConsentScreen.js.map +0 -1
- package/lib/module/components/PinCreationScreen.js +0 -386
- package/lib/module/components/PinCreationScreen.js.map +0 -1
- package/lib/module/components/PlatformConnectorsStep.js +0 -820
- package/lib/module/components/PlatformConnectorsStep.js.map +0 -1
- package/lib/module/components/PlatformToggle.js +0 -173
- package/lib/module/components/PlatformToggle.js.map +0 -1
- package/lib/module/components/PrimaryButton.js +0 -172
- package/lib/module/components/PrimaryButton.js.map +0 -1
- package/lib/module/components/SignInMatchAnimation.js +0 -189
- package/lib/module/components/SignInMatchAnimation.js.map +0 -1
- package/lib/module/components/SignInStep.js +0 -171
- package/lib/module/components/SignInStep.js.map +0 -1
- package/lib/module/components/VerificationStep.js +0 -146
- package/lib/module/components/VerificationStep.js.map +0 -1
- package/lib/module/components/WelcomeScreen.js +0 -378
- package/lib/module/components/WelcomeScreen.js.map +0 -1
- package/lib/module/components/icons/Basicproficon.js +0 -30
- package/lib/module/components/icons/Basicproficon.js.map +0 -1
- package/lib/module/components/icons/Basicprofile.js +0 -14
- package/lib/module/components/icons/Basicprofile.js.map +0 -1
- package/lib/module/components/icons/Checkbox.js +0 -14
- package/lib/module/components/icons/Checkbox.js.map +0 -1
- package/lib/module/components/icons/Checkmark.js +0 -20
- package/lib/module/components/icons/Checkmark.js.map +0 -1
- package/lib/module/components/icons/Contentanalysis.js +0 -14
- package/lib/module/components/icons/Contentanalysis.js.map +0 -1
- package/lib/module/components/icons/Contenticon.js +0 -32
- package/lib/module/components/icons/Contenticon.js.map +0 -1
- package/lib/module/components/icons/EnochE.js +0 -34
- package/lib/module/components/icons/EnochE.js.map +0 -1
- package/lib/module/components/icons/Personalityicon.js +0 -23
- package/lib/module/components/icons/Personalityicon.js.map +0 -1
- package/lib/module/components/icons/Personalityprofile.js +0 -14
- package/lib/module/components/icons/Personalityprofile.js.map +0 -1
- package/lib/module/components/icons/Personalitytraits.js +0 -14
- package/lib/module/components/icons/Personalitytraits.js.map +0 -1
- package/lib/module/components/icons/Userpreferences.js +0 -14
- package/lib/module/components/icons/Userpreferences.js.map +0 -1
- package/lib/module/components/icons/index.js +0 -13
- package/lib/module/components/icons/index.js.map +0 -1
- package/lib/module/config/api.js +0 -26
- package/lib/module/config/api.js.map +0 -1
- package/lib/module/context/AuthContext.js +0 -335
- package/lib/module/context/AuthContext.js.map +0 -1
- package/lib/module/hooks/useConnectedAccounts.js +0 -106
- package/lib/module/hooks/useConnectedAccounts.js.map +0 -1
- package/lib/module/hooks/useUserConnections.js +0 -140
- package/lib/module/hooks/useUserConnections.js.map +0 -1
- package/lib/module/services/apiClient.js +0 -298
- package/lib/module/services/apiClient.js.map +0 -1
- package/lib/module/services/authService.js +0 -905
- package/lib/module/services/authService.js.map +0 -1
- package/lib/module/services/biometricPinService.js +0 -173
- package/lib/module/services/biometricPinService.js.map +0 -1
- package/lib/module/services/connectedAccountsService.js +0 -255
- package/lib/module/services/connectedAccountsService.js.map +0 -1
- package/lib/module/services/googleAuthService.js +0 -258
- package/lib/module/services/googleAuthService.js.map +0 -1
- package/lib/module/services/imageCompressionService.js +0 -250
- package/lib/module/services/imageCompressionService.js.map +0 -1
- package/lib/module/services/jwtStorageService.js +0 -239
- package/lib/module/services/jwtStorageService.js.map +0 -1
- package/lib/module/services/mobileTrainingService.js +0 -172
- package/lib/module/services/mobileTrainingService.js.map +0 -1
- package/lib/module/services/pinEncryptionService.js +0 -75
- package/lib/module/services/pinEncryptionService.js.map +0 -1
- package/lib/module/services/pinStorageUtils.js +0 -93
- package/lib/module/services/pinStorageUtils.js.map +0 -1
- package/lib/module/services/storageService.js +0 -383
- package/lib/module/services/storageService.js.map +0 -1
- package/lib/module/services/trainingApiHelpers.js +0 -67
- package/lib/module/services/trainingApiHelpers.js.map +0 -1
- package/lib/module/services/userConnectionsService.js +0 -476
- package/lib/module/services/userConnectionsService.js.map +0 -1
- package/lib/module/services/youtubeMigrationService.js +0 -404
- package/lib/module/services/youtubeMigrationService.js.map +0 -1
- package/lib/module/theme/index.js +0 -244
- package/lib/module/theme/index.js.map +0 -1
- package/lib/module/utils/eventUtils.js +0 -270
- package/lib/module/utils/eventUtils.js.map +0 -1
- package/lib/module/utils/haptics.js +0 -59
- package/lib/module/utils/haptics.js.map +0 -1
- package/lib/module/utils/imagePreloader.js +0 -3
- package/lib/module/utils/imagePreloader.js.map +0 -1
- package/lib/typescript/components/BodyText.d.ts +0 -10
- package/lib/typescript/components/BodyText.d.ts.map +0 -1
- package/lib/typescript/components/BrandMark.d.ts +0 -11
- package/lib/typescript/components/BrandMark.d.ts.map +0 -1
- package/lib/typescript/components/CodeInput.d.ts +0 -10
- package/lib/typescript/components/CodeInput.d.ts.map +0 -1
- package/lib/typescript/components/EmailInput.d.ts +0 -8
- package/lib/typescript/components/EmailInput.d.ts.map +0 -1
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +0 -12
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +0 -1
- package/lib/typescript/components/GoogleButton.d.ts +0 -11
- package/lib/typescript/components/GoogleButton.d.ts.map +0 -1
- package/lib/typescript/components/HeadingGroup.d.ts +0 -11
- package/lib/typescript/components/HeadingGroup.d.ts.map +0 -1
- package/lib/typescript/components/ModalHeader.d.ts +0 -11
- package/lib/typescript/components/ModalHeader.d.ts.map +0 -1
- package/lib/typescript/components/ModalSheet.d.ts +0 -13
- package/lib/typescript/components/ModalSheet.d.ts.map +0 -1
- package/lib/typescript/components/OnairosSignInButton.d.ts +0 -14
- package/lib/typescript/components/OnairosSignInButton.d.ts.map +0 -1
- package/lib/typescript/components/PersonaImage.d.ts +0 -8
- package/lib/typescript/components/PersonaImage.d.ts.map +0 -1
- package/lib/typescript/components/PersonaLoadingScreen.d.ts +0 -10
- package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +0 -1
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts +0 -10
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +0 -1
- package/lib/typescript/components/PinCreationScreen.d.ts +0 -10
- package/lib/typescript/components/PinCreationScreen.d.ts.map +0 -1
- package/lib/typescript/components/PlatformConnectorsStep.d.ts +0 -11
- package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +0 -1
- package/lib/typescript/components/PlatformToggle.d.ts +0 -20
- package/lib/typescript/components/PlatformToggle.d.ts.map +0 -1
- package/lib/typescript/components/PrimaryButton.d.ts +0 -22
- package/lib/typescript/components/PrimaryButton.d.ts.map +0 -1
- package/lib/typescript/components/SignInMatchAnimation.d.ts +0 -9
- package/lib/typescript/components/SignInMatchAnimation.d.ts.map +0 -1
- package/lib/typescript/components/SignInStep.d.ts +0 -12
- package/lib/typescript/components/SignInStep.d.ts.map +0 -1
- package/lib/typescript/components/VerificationStep.d.ts +0 -13
- package/lib/typescript/components/VerificationStep.d.ts.map +0 -1
- package/lib/typescript/components/WelcomeScreen.d.ts +0 -9
- package/lib/typescript/components/WelcomeScreen.d.ts.map +0 -1
- package/lib/typescript/components/icons/Basicproficon.d.ts +0 -5
- package/lib/typescript/components/icons/Basicproficon.d.ts.map +0 -1
- package/lib/typescript/components/icons/Basicprofile.d.ts +0 -5
- package/lib/typescript/components/icons/Basicprofile.d.ts.map +0 -1
- package/lib/typescript/components/icons/Checkbox.d.ts +0 -5
- package/lib/typescript/components/icons/Checkbox.d.ts.map +0 -1
- package/lib/typescript/components/icons/Checkmark.d.ts +0 -5
- package/lib/typescript/components/icons/Checkmark.d.ts.map +0 -1
- package/lib/typescript/components/icons/Contentanalysis.d.ts +0 -5
- package/lib/typescript/components/icons/Contentanalysis.d.ts.map +0 -1
- package/lib/typescript/components/icons/Contenticon.d.ts +0 -5
- package/lib/typescript/components/icons/Contenticon.d.ts.map +0 -1
- package/lib/typescript/components/icons/EnochE.d.ts +0 -5
- package/lib/typescript/components/icons/EnochE.d.ts.map +0 -1
- package/lib/typescript/components/icons/Personalityicon.d.ts +0 -5
- package/lib/typescript/components/icons/Personalityicon.d.ts.map +0 -1
- package/lib/typescript/components/icons/Personalityprofile.d.ts +0 -5
- package/lib/typescript/components/icons/Personalityprofile.d.ts.map +0 -1
- package/lib/typescript/components/icons/Personalitytraits.d.ts +0 -5
- package/lib/typescript/components/icons/Personalitytraits.d.ts.map +0 -1
- package/lib/typescript/components/icons/Userpreferences.d.ts +0 -5
- package/lib/typescript/components/icons/Userpreferences.d.ts.map +0 -1
- package/lib/typescript/components/icons/index.d.ts +0 -12
- package/lib/typescript/components/icons/index.d.ts.map +0 -1
- package/lib/typescript/config/api.d.ts +0 -24
- package/lib/typescript/config/api.d.ts.map +0 -1
- package/lib/typescript/context/AuthContext.d.ts +0 -34
- package/lib/typescript/context/AuthContext.d.ts.map +0 -1
- package/lib/typescript/hooks/useConnectedAccounts.d.ts +0 -11
- package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +0 -1
- package/lib/typescript/hooks/useUserConnections.d.ts +0 -12
- package/lib/typescript/hooks/useUserConnections.d.ts.map +0 -1
- package/lib/typescript/services/apiClient.d.ts +0 -91
- package/lib/typescript/services/apiClient.d.ts.map +0 -1
- package/lib/typescript/services/authService.d.ts +0 -216
- package/lib/typescript/services/authService.d.ts.map +0 -1
- package/lib/typescript/services/biometricPinService.d.ts +0 -29
- package/lib/typescript/services/biometricPinService.d.ts.map +0 -1
- package/lib/typescript/services/connectedAccountsService.d.ts +0 -56
- package/lib/typescript/services/connectedAccountsService.d.ts.map +0 -1
- package/lib/typescript/services/googleAuthService.d.ts +0 -63
- package/lib/typescript/services/googleAuthService.d.ts.map +0 -1
- package/lib/typescript/services/imageCompressionService.d.ts +0 -37
- package/lib/typescript/services/imageCompressionService.d.ts.map +0 -1
- package/lib/typescript/services/jwtStorageService.d.ts +0 -86
- package/lib/typescript/services/jwtStorageService.d.ts.map +0 -1
- package/lib/typescript/services/mobileTrainingService.d.ts +0 -45
- package/lib/typescript/services/mobileTrainingService.d.ts.map +0 -1
- package/lib/typescript/services/pinEncryptionService.d.ts +0 -17
- package/lib/typescript/services/pinEncryptionService.d.ts.map +0 -1
- package/lib/typescript/services/pinStorageUtils.d.ts +0 -25
- package/lib/typescript/services/pinStorageUtils.d.ts.map +0 -1
- package/lib/typescript/services/storageService.d.ts +0 -128
- package/lib/typescript/services/storageService.d.ts.map +0 -1
- package/lib/typescript/services/trainingApiHelpers.d.ts +0 -38
- package/lib/typescript/services/trainingApiHelpers.d.ts.map +0 -1
- package/lib/typescript/services/userConnectionsService.d.ts +0 -90
- package/lib/typescript/services/userConnectionsService.d.ts.map +0 -1
- package/lib/typescript/services/youtubeMigrationService.d.ts +0 -12
- package/lib/typescript/services/youtubeMigrationService.d.ts.map +0 -1
- package/lib/typescript/theme/index.d.ts +0 -416
- package/lib/typescript/theme/index.d.ts.map +0 -1
- package/lib/typescript/utils/eventUtils.d.ts +0 -108
- package/lib/typescript/utils/eventUtils.d.ts.map +0 -1
- package/lib/typescript/utils/haptics.d.ts +0 -11
- package/lib/typescript/utils/haptics.d.ts.map +0 -1
- package/lib/typescript/utils/imagePreloader.d.ts +0 -2
- package/lib/typescript/utils/imagePreloader.d.ts.map +0 -1
- 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 +0 -3
- package/src/assets/images/EnochE.svg +0 -19
- 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 +0 -3
- package/src/assets/images/Personalitytraits.svg +0 -3
- package/src/assets/images/Redditicon.png +0 -0
- package/src/assets/images/Userpreferences.svg +0 -3
- package/src/assets/images/YouTubeicon3.png +0 -0
- package/src/assets/images/arrow.svg +0 -20
- package/src/assets/images/basicproficon.svg +0 -43
- package/src/assets/images/basicprofile.svg +0 -3
- package/src/assets/images/checkmark.svg +0 -4
- package/src/assets/images/contentanalysis.svg +0 -3
- package/src/assets/images/contenticon.svg +0 -23
- 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 +0 -18
- package/src/assets/images/x-close.svg +0 -3
- package/src/components/BodyText.tsx +0 -33
- package/src/components/BrandMark.tsx +0 -62
- package/src/components/CodeInput.tsx +0 -32
- package/src/components/EmailInput.tsx +0 -31
- package/src/components/ExistingUserDataConfirmation.tsx +0 -507
- package/src/components/GoogleButton.tsx +0 -55
- package/src/components/HeadingGroup.tsx +0 -49
- package/src/components/ModalHeader.tsx +0 -125
- package/src/components/ModalSheet.tsx +0 -57
- package/src/components/OnairosSignInButton.tsx +0 -130
- package/src/components/PersonaImage.tsx +0 -79
- package/src/components/PersonaLoadingScreen.tsx +0 -201
- package/src/components/PersonalizationConsentScreen.tsx +0 -410
- package/src/components/PinCreationScreen.tsx +0 -492
- package/src/components/PlatformConnectorsStep.tsx +0 -892
- package/src/components/PlatformToggle.tsx +0 -226
- package/src/components/PrimaryButton.tsx +0 -214
- package/src/components/SignInMatchAnimation.tsx +0 -225
- package/src/components/SignInStep.tsx +0 -217
- package/src/components/VerificationStep.tsx +0 -198
- package/src/components/WelcomeScreen.tsx +0 -473
- package/src/components/icons/Basicproficon.tsx +0 -30
- package/src/components/icons/Basicprofile.tsx +0 -17
- package/src/components/icons/Checkbox.tsx +0 -17
- package/src/components/icons/Checkmark.tsx +0 -24
- package/src/components/icons/Contentanalysis.tsx +0 -17
- package/src/components/icons/Contenticon.tsx +0 -30
- package/src/components/icons/EnochE.tsx +0 -39
- package/src/components/icons/Personalityicon.tsx +0 -22
- package/src/components/icons/Personalityprofile.tsx +0 -17
- package/src/components/icons/Personalitytraits.tsx +0 -17
- package/src/components/icons/Userpreferences.tsx +0 -17
- package/src/components/icons/index.ts +0 -12
- package/src/config/api.ts +0 -25
- package/src/context/AuthContext.tsx +0 -393
- package/src/hooks/useConnectedAccounts.ts +0 -139
- package/src/hooks/useUserConnections.ts +0 -166
- package/src/services/apiClient.ts +0 -337
- package/src/services/authService.ts +0 -1008
- package/src/services/biometricPinService.ts +0 -193
- package/src/services/connectedAccountsService.ts +0 -290
- package/src/services/googleAuthService.ts +0 -279
- package/src/services/imageCompressionService.ts +0 -303
- package/src/services/jwtStorageService.ts +0 -257
- package/src/services/mobileTrainingService.ts +0 -204
- package/src/services/pinEncryptionService.ts +0 -76
- package/src/services/pinStorageUtils.ts +0 -97
- package/src/services/storageService.ts +0 -452
- package/src/services/trainingApiHelpers.ts +0 -67
- package/src/services/userConnectionsService.ts +0 -557
- package/src/services/youtubeMigrationService.ts +0 -454
- package/src/theme/index.ts +0 -239
- package/src/utils/eventUtils.ts +0 -303
- package/src/utils/haptics.ts +0 -59
- package/src/utils/imagePreloader.ts +0 -2
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.updateLastScreen = exports.saveUserProgress = exports.saveAuthState = exports.markStepCompleted = exports.markEventPageReached = exports.markAppActive = exports.isReturningUser = exports.hasEventAccessToken = exports.hasCompletedOnboarding = exports.getUserProgress = exports.getResumeTarget = exports.getDebugStorageInfo = exports.getAuthState = exports.clearUserData = exports.clearAllProgress = exports.STORAGE_KEYS = void 0;
|
|
7
|
-
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
8
|
-
var _pinStorageUtils = require("./pinStorageUtils");
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
// Storage keys
|
|
11
|
-
const STORAGE_KEYS = exports.STORAGE_KEYS = {
|
|
12
|
-
// Authentication
|
|
13
|
-
AUTH_TOKEN: 'auth_token',
|
|
14
|
-
ONAIROS_JWT_TOKEN: 'onairos_jwt_token',
|
|
15
|
-
ENOCH_TOKEN: 'enoch_token',
|
|
16
|
-
// User data
|
|
17
|
-
USER: 'user',
|
|
18
|
-
USER_PROFILE: 'userProfile',
|
|
19
|
-
USER_PROFILE_FALLBACK: 'userProfileFallback',
|
|
20
|
-
// App state
|
|
21
|
-
USER_PROGRESS: 'user_progress',
|
|
22
|
-
ONBOARDING_COMPLETED: 'onboardingCompleted',
|
|
23
|
-
IS_FIRST_TIME_USER: 'isFirstTimeUser',
|
|
24
|
-
USER_ATTENDANCE_CONFIRMED: 'userAttendanceConfirmed',
|
|
25
|
-
// New: Token for completed onboarding with Results access
|
|
26
|
-
ONBOARDING_COMPLETE_TOKEN: 'onboarding_complete_token',
|
|
27
|
-
EVENT_ACCESS_TOKEN: 'event_access_token',
|
|
28
|
-
// Authentication method tracking
|
|
29
|
-
ONAIROS_USER: 'onairos_user',
|
|
30
|
-
APPLE_USER: 'apple_user',
|
|
31
|
-
AUTH_METHOD: 'auth_method',
|
|
32
|
-
// Session data
|
|
33
|
-
CURRENT_EVENT_DATA: 'currentEventData',
|
|
34
|
-
CONNECTED_PLATFORMS: 'connectedPlatforms',
|
|
35
|
-
PROFILE_IMAGE: 'profileImage',
|
|
36
|
-
// Admin status
|
|
37
|
-
USER_ADMIN_STATUS: 'user_admin_status'
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// User progress tracking
|
|
41
|
-
|
|
42
|
-
// Authentication state
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Save user progress to track where they left off
|
|
46
|
-
*/
|
|
47
|
-
const saveUserProgress = async progress => {
|
|
48
|
-
try {
|
|
49
|
-
const existingProgress = await getUserProgress();
|
|
50
|
-
const updatedProgress = {
|
|
51
|
-
...existingProgress,
|
|
52
|
-
...progress,
|
|
53
|
-
timestamp: Date.now()
|
|
54
|
-
};
|
|
55
|
-
await _asyncStorage.default.setItem(STORAGE_KEYS.USER_PROGRESS, JSON.stringify(updatedProgress));
|
|
56
|
-
console.log('✅ User progress saved:', updatedProgress);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error('❌ Error saving user progress:', error);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Get user progress to determine where to resume
|
|
64
|
-
*/
|
|
65
|
-
exports.saveUserProgress = saveUserProgress;
|
|
66
|
-
const getUserProgress = async () => {
|
|
67
|
-
try {
|
|
68
|
-
const progressData = await _asyncStorage.default.getItem(STORAGE_KEYS.USER_PROGRESS);
|
|
69
|
-
if (progressData) {
|
|
70
|
-
return JSON.parse(progressData);
|
|
71
|
-
}
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error('❌ Error getting user progress:', error);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Return default progress
|
|
77
|
-
return {
|
|
78
|
-
lastScreen: 'Welcome',
|
|
79
|
-
completedSteps: [],
|
|
80
|
-
authMethod: null,
|
|
81
|
-
hasProfilePhoto: false,
|
|
82
|
-
hasCompletedProfile: false,
|
|
83
|
-
hasSelectedIntentions: false,
|
|
84
|
-
hasViewedResults: false,
|
|
85
|
-
hasEnteredEventCode: false,
|
|
86
|
-
hasRegisteredForEvent: false,
|
|
87
|
-
hasReachedEventPage: false,
|
|
88
|
-
timestamp: Date.now()
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Save authentication state
|
|
94
|
-
*/
|
|
95
|
-
exports.getUserProgress = getUserProgress;
|
|
96
|
-
const saveAuthState = async authState => {
|
|
97
|
-
try {
|
|
98
|
-
const existingState = await getAuthState();
|
|
99
|
-
const updatedState = {
|
|
100
|
-
...existingState,
|
|
101
|
-
...authState
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// Also save the auth method separately for quick access
|
|
105
|
-
if (authState.authMethod) {
|
|
106
|
-
await _asyncStorage.default.setItem(STORAGE_KEYS.AUTH_METHOD, authState.authMethod);
|
|
107
|
-
}
|
|
108
|
-
console.log('✅ Auth state saved:', updatedState);
|
|
109
|
-
} catch (error) {
|
|
110
|
-
console.error('❌ Error saving auth state:', error);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Get authentication state
|
|
116
|
-
*/
|
|
117
|
-
exports.saveAuthState = saveAuthState;
|
|
118
|
-
const getAuthState = async () => {
|
|
119
|
-
try {
|
|
120
|
-
const authMethod = await _asyncStorage.default.getItem(STORAGE_KEYS.AUTH_METHOD);
|
|
121
|
-
const hasToken = !!(await _asyncStorage.default.getItem(STORAGE_KEYS.AUTH_TOKEN));
|
|
122
|
-
return {
|
|
123
|
-
isAuthenticated: hasToken,
|
|
124
|
-
authMethod,
|
|
125
|
-
hasValidToken: hasToken
|
|
126
|
-
};
|
|
127
|
-
} catch (error) {
|
|
128
|
-
console.error('❌ Error getting auth state:', error);
|
|
129
|
-
return {
|
|
130
|
-
isAuthenticated: false,
|
|
131
|
-
authMethod: null,
|
|
132
|
-
hasValidToken: false
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Clear all user data (for logout)
|
|
139
|
-
*/
|
|
140
|
-
exports.getAuthState = getAuthState;
|
|
141
|
-
const clearUserData = async () => {
|
|
142
|
-
try {
|
|
143
|
-
const keysToRemove = [STORAGE_KEYS.USER, STORAGE_KEYS.USER_PROFILE, STORAGE_KEYS.USER_PROFILE_FALLBACK, STORAGE_KEYS.USER_PROGRESS, STORAGE_KEYS.AUTH_TOKEN, STORAGE_KEYS.ONAIROS_JWT_TOKEN, STORAGE_KEYS.ENOCH_TOKEN, STORAGE_KEYS.ONAIROS_USER, STORAGE_KEYS.APPLE_USER, STORAGE_KEYS.AUTH_METHOD, STORAGE_KEYS.IS_FIRST_TIME_USER, STORAGE_KEYS.USER_ATTENDANCE_CONFIRMED, STORAGE_KEYS.PROFILE_IMAGE, STORAGE_KEYS.ONBOARDING_COMPLETED,
|
|
144
|
-
// Clear the new onboarding completion tokens
|
|
145
|
-
STORAGE_KEYS.ONBOARDING_COMPLETE_TOKEN, STORAGE_KEYS.EVENT_ACCESS_TOKEN];
|
|
146
|
-
await _asyncStorage.default.multiRemove(keysToRemove);
|
|
147
|
-
|
|
148
|
-
// Also clear biometrically stored PIN
|
|
149
|
-
try {
|
|
150
|
-
await (0, _pinStorageUtils.clearStoredPin)();
|
|
151
|
-
console.log('✅ Biometrically stored PIN cleared');
|
|
152
|
-
} catch (error) {
|
|
153
|
-
console.warn('⚠️ Error clearing stored PIN (continuing):', error);
|
|
154
|
-
}
|
|
155
|
-
console.log('✅ User data cleared including onboarding completion tokens');
|
|
156
|
-
} catch (error) {
|
|
157
|
-
console.error('❌ Error clearing user data:', error);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Get resume navigation target based on user progress
|
|
163
|
-
*/
|
|
164
|
-
exports.clearUserData = clearUserData;
|
|
165
|
-
const getResumeTarget = async () => {
|
|
166
|
-
try {
|
|
167
|
-
const progress = await getUserProgress();
|
|
168
|
-
const authState = await getAuthState();
|
|
169
|
-
|
|
170
|
-
// HIGHEST PRIORITY: Check event access token first (regardless of auth state)
|
|
171
|
-
// This ensures release mode reliability when network auth fails
|
|
172
|
-
const hasEventToken = await hasEventAccessToken();
|
|
173
|
-
if (hasEventToken || progress.hasReachedEventPage && progress.hasViewedResults) {
|
|
174
|
-
console.log('🎯 User has completed onboarding (verified by token) - returning to Home screen');
|
|
175
|
-
|
|
176
|
-
// After completing first event, users go to Home screen instead of Results
|
|
177
|
-
// This provides a better post-event experience and central hub
|
|
178
|
-
return {
|
|
179
|
-
screen: 'Home'
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// If not authenticated, start from Welcome
|
|
184
|
-
if (!authState.isAuthenticated) {
|
|
185
|
-
return {
|
|
186
|
-
screen: 'Welcome'
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// If authenticated but no progress, start camera flow
|
|
191
|
-
if (progress.completedSteps.length === 0) {
|
|
192
|
-
return {
|
|
193
|
-
screen: 'Welcome',
|
|
194
|
-
params: {
|
|
195
|
-
isNewUser: true,
|
|
196
|
-
activateCamera: true
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Resume based on last completed step for users still in onboarding
|
|
202
|
-
if (!progress.hasProfilePhoto) {
|
|
203
|
-
return {
|
|
204
|
-
screen: 'Welcome',
|
|
205
|
-
params: {
|
|
206
|
-
isNewUser: true,
|
|
207
|
-
activateCamera: true
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
if (!progress.hasCompletedProfile) {
|
|
212
|
-
const profileImage = await _asyncStorage.default.getItem(STORAGE_KEYS.PROFILE_IMAGE);
|
|
213
|
-
return {
|
|
214
|
-
screen: 'CreateFreshProfile',
|
|
215
|
-
params: {
|
|
216
|
-
photo: profileImage,
|
|
217
|
-
isReviewerBypass: authState.authMethod === 'onairos'
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
if (!progress.hasSelectedIntentions) {
|
|
222
|
-
const userProfile = await _asyncStorage.default.getItem(STORAGE_KEYS.USER_PROFILE);
|
|
223
|
-
return {
|
|
224
|
-
screen: 'Intention',
|
|
225
|
-
params: {
|
|
226
|
-
userProfile: userProfile ? JSON.parse(userProfile) : null
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// Default to Results if everything is complete
|
|
232
|
-
const userProfile = await _asyncStorage.default.getItem(STORAGE_KEYS.USER_PROFILE);
|
|
233
|
-
return {
|
|
234
|
-
screen: 'Results',
|
|
235
|
-
params: {
|
|
236
|
-
userProfile: userProfile ? JSON.parse(userProfile) : null
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
} catch (error) {
|
|
240
|
-
console.error('❌ Error determining resume target:', error);
|
|
241
|
-
return {
|
|
242
|
-
screen: 'Welcome'
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Check if user has completed onboarding flow
|
|
249
|
-
*/
|
|
250
|
-
exports.getResumeTarget = getResumeTarget;
|
|
251
|
-
const hasCompletedOnboarding = async () => {
|
|
252
|
-
try {
|
|
253
|
-
const progress = await getUserProgress();
|
|
254
|
-
return progress.hasCompletedProfile && progress.hasViewedResults;
|
|
255
|
-
} catch (error) {
|
|
256
|
-
console.error('❌ Error checking onboarding status:', error);
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Mark user as having reached the event page (completed full onboarding)
|
|
263
|
-
* This creates the token that ensures they always return to Results
|
|
264
|
-
*/
|
|
265
|
-
exports.hasCompletedOnboarding = hasCompletedOnboarding;
|
|
266
|
-
const markEventPageReached = async eventData => {
|
|
267
|
-
try {
|
|
268
|
-
const progress = await getUserProgress();
|
|
269
|
-
const updatedProgress = {
|
|
270
|
-
...progress,
|
|
271
|
-
hasReachedEventPage: true,
|
|
272
|
-
hasViewedResults: true,
|
|
273
|
-
eventData: eventData || progress.eventData,
|
|
274
|
-
timestamp: Date.now()
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
// Save the updated progress
|
|
278
|
-
await saveUserProgress(updatedProgress);
|
|
279
|
-
|
|
280
|
-
// Save the onboarding completion token for extra security
|
|
281
|
-
await _asyncStorage.default.setItem(STORAGE_KEYS.ONBOARDING_COMPLETE_TOKEN, 'true');
|
|
282
|
-
await _asyncStorage.default.setItem(STORAGE_KEYS.EVENT_ACCESS_TOKEN, JSON.stringify({
|
|
283
|
-
timestamp: Date.now(),
|
|
284
|
-
eventData: eventData,
|
|
285
|
-
hasAccess: true
|
|
286
|
-
}));
|
|
287
|
-
console.log('✅ User marked as having reached event page - will always return to Results');
|
|
288
|
-
} catch (error) {
|
|
289
|
-
console.error('❌ Error marking event page reached:', error);
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Check if user has the event access token (completed onboarding)
|
|
295
|
-
*/
|
|
296
|
-
exports.markEventPageReached = markEventPageReached;
|
|
297
|
-
const hasEventAccessToken = async () => {
|
|
298
|
-
try {
|
|
299
|
-
const token = await _asyncStorage.default.getItem(STORAGE_KEYS.ONBOARDING_COMPLETE_TOKEN);
|
|
300
|
-
const progress = await getUserProgress();
|
|
301
|
-
return token === 'true' && progress.hasReachedEventPage;
|
|
302
|
-
} catch (error) {
|
|
303
|
-
console.error('❌ Error checking event access token:', error);
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Mark a step as completed
|
|
310
|
-
*/
|
|
311
|
-
exports.hasEventAccessToken = hasEventAccessToken;
|
|
312
|
-
const markStepCompleted = async step => {
|
|
313
|
-
try {
|
|
314
|
-
const progress = await getUserProgress();
|
|
315
|
-
if (!progress.completedSteps.includes(step)) {
|
|
316
|
-
progress.completedSteps.push(step);
|
|
317
|
-
await saveUserProgress(progress);
|
|
318
|
-
}
|
|
319
|
-
} catch (error) {
|
|
320
|
-
console.error('❌ Error marking step completed:', error);
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Update user's last screen
|
|
326
|
-
*/
|
|
327
|
-
exports.markStepCompleted = markStepCompleted;
|
|
328
|
-
const updateLastScreen = async (screen, params) => {
|
|
329
|
-
try {
|
|
330
|
-
await saveUserProgress({
|
|
331
|
-
lastScreen: screen,
|
|
332
|
-
timestamp: Date.now()
|
|
333
|
-
});
|
|
334
|
-
} catch (error) {
|
|
335
|
-
console.error('❌ Error updating last screen:', error);
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Check if this is a returning user with existing progress
|
|
341
|
-
*/
|
|
342
|
-
exports.updateLastScreen = updateLastScreen;
|
|
343
|
-
const isReturningUser = async () => {
|
|
344
|
-
try {
|
|
345
|
-
const progress = await getUserProgress();
|
|
346
|
-
const authState = await getAuthState();
|
|
347
|
-
return authState.isAuthenticated && progress.completedSteps.length > 0;
|
|
348
|
-
} catch (error) {
|
|
349
|
-
console.error('❌ Error checking returning user status:', error);
|
|
350
|
-
return false;
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Mark app as active (call this when app becomes active)
|
|
356
|
-
*/
|
|
357
|
-
exports.isReturningUser = isReturningUser;
|
|
358
|
-
const markAppActive = async () => {
|
|
359
|
-
try {
|
|
360
|
-
await saveUserProgress({
|
|
361
|
-
timestamp: Date.now()
|
|
362
|
-
});
|
|
363
|
-
console.log('✅ App marked as active');
|
|
364
|
-
} catch (error) {
|
|
365
|
-
console.error('❌ Error marking app as active:', error);
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Development utility: Get all stored progress data for debugging
|
|
371
|
-
*/
|
|
372
|
-
exports.markAppActive = markAppActive;
|
|
373
|
-
const getDebugStorageInfo = async () => {
|
|
374
|
-
try {
|
|
375
|
-
const progress = await getUserProgress();
|
|
376
|
-
const authState = await getAuthState();
|
|
377
|
-
const isReturning = await isReturningUser();
|
|
378
|
-
const resumeTarget = await getResumeTarget();
|
|
379
|
-
return {
|
|
380
|
-
progress,
|
|
381
|
-
authState,
|
|
382
|
-
isReturning,
|
|
383
|
-
resumeTarget
|
|
384
|
-
};
|
|
385
|
-
} catch (error) {
|
|
386
|
-
console.error('❌ Error getting debug storage info:', error);
|
|
387
|
-
throw error;
|
|
388
|
-
}
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Development utility: Clear all progress (for testing)
|
|
393
|
-
*/
|
|
394
|
-
exports.getDebugStorageInfo = getDebugStorageInfo;
|
|
395
|
-
const clearAllProgress = async () => {
|
|
396
|
-
try {
|
|
397
|
-
await clearUserData();
|
|
398
|
-
console.log('✅ All progress data cleared');
|
|
399
|
-
} catch (error) {
|
|
400
|
-
console.error('❌ Error clearing progress data:', error);
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
exports.clearAllProgress = clearAllProgress;
|
|
404
|
-
//# sourceMappingURL=storageService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_asyncStorage","_interopRequireDefault","require","_pinStorageUtils","e","__esModule","default","STORAGE_KEYS","exports","AUTH_TOKEN","ONAIROS_JWT_TOKEN","ENOCH_TOKEN","USER","USER_PROFILE","USER_PROFILE_FALLBACK","USER_PROGRESS","ONBOARDING_COMPLETED","IS_FIRST_TIME_USER","USER_ATTENDANCE_CONFIRMED","ONBOARDING_COMPLETE_TOKEN","EVENT_ACCESS_TOKEN","ONAIROS_USER","APPLE_USER","AUTH_METHOD","CURRENT_EVENT_DATA","CONNECTED_PLATFORMS","PROFILE_IMAGE","USER_ADMIN_STATUS","saveUserProgress","progress","existingProgress","getUserProgress","updatedProgress","timestamp","Date","now","AsyncStorage","setItem","JSON","stringify","console","log","error","progressData","getItem","parse","lastScreen","completedSteps","authMethod","hasProfilePhoto","hasCompletedProfile","hasSelectedIntentions","hasViewedResults","hasEnteredEventCode","hasRegisteredForEvent","hasReachedEventPage","saveAuthState","authState","existingState","getAuthState","updatedState","hasToken","isAuthenticated","hasValidToken","clearUserData","keysToRemove","multiRemove","clearStoredPin","warn","getResumeTarget","hasEventToken","hasEventAccessToken","screen","length","params","isNewUser","activateCamera","profileImage","photo","isReviewerBypass","userProfile","hasCompletedOnboarding","markEventPageReached","eventData","hasAccess","token","markStepCompleted","step","includes","push","updateLastScreen","isReturningUser","markAppActive","getDebugStorageInfo","isReturning","resumeTarget","clearAllProgress"],"sourceRoot":"../../../src","sources":["services/storageService.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAAmD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnD;AACO,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,UAAU,EAAE,YAAY;EACxBC,iBAAiB,EAAE,mBAAmB;EACtCC,WAAW,EAAE,aAAa;EAE1B;EACAC,IAAI,EAAE,MAAM;EACZC,YAAY,EAAE,aAAa;EAC3BC,qBAAqB,EAAE,qBAAqB;EAE5C;EACAC,aAAa,EAAE,eAAe;EAC9BC,oBAAoB,EAAE,qBAAqB;EAC3CC,kBAAkB,EAAE,iBAAiB;EACrCC,yBAAyB,EAAE,yBAAyB;EAEpD;EACAC,yBAAyB,EAAE,2BAA2B;EACtDC,kBAAkB,EAAE,oBAAoB;EAExC;EACAC,YAAY,EAAE,cAAc;EAC5BC,UAAU,EAAE,YAAY;EACxBC,WAAW,EAAE,aAAa;EAE1B;EACAC,kBAAkB,EAAE,kBAAkB;EACtCC,mBAAmB,EAAE,oBAAoB;EACzCC,aAAa,EAAE,cAAc;EAE7B;EACAC,iBAAiB,EAAE;AACrB,CAAU;;AAEV;;AAyBA;;AASA;AACA;AACA;AACO,MAAMC,gBAAgB,GAAG,MAAOC,QAA+B,IAAoB;EACxF,IAAI;IACF,MAAMC,gBAAgB,GAAG,MAAMC,eAAe,CAAC,CAAC;IAChD,MAAMC,eAA6B,GAAG;MACpC,GAAGF,gBAAgB;MACnB,GAAGD,QAAQ;MACXI,SAAS,EAAEC,IAAI,CAACC,GAAG,CAAC;IACtB,C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,MAAME,eAAe,CAAC,CAAC;IACxC,MAAM0B,SAAS,GAAG,MAAME,YAAY,CAAC,CAAC;IACtC,MAAMmC,WAAW,GAAG,MAAMH,eAAe,CAAC,CAAC;IAC3C,MAAMI,YAAY,GAAG,MAAM1B,eAAe,CAAC,CAAC;IAE5C,OAAO;MACLxC,QAAQ;MACR4B,SAAS;MACTqC,WAAW;MACXC;IACF,CAAC;EACH,CAAC,CAAC,OAAOrD,KAAK,EAAE;IACdF,OAAO,CAACE,KAAK,CAAC,qCAAqC,EAAEA,KAAK,CAAC;IAC3D,MAAMA,KAAK;EACb;AACF,CAAC;;AAED;AACA;AACA;AAFAlC,OAAA,CAAAqF,mBAAA,GAAAA,mBAAA;AAGO,MAAMG,gBAAgB,GAAG,MAAAA,CAAA,KAA2B;EACzD,IAAI;IACF,MAAMhC,aAAa,CAAC,CAAC;IACrBxB,OAAO,CAACC,GAAG,CAAC,6BAA6B,CAAC;EAC5C,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdF,OAAO,CAACE,KAAK,CAAC,iCAAiC,EAAEA,KAAK,CAAC;EACzD;AACF,CAAC;AAAClC,OAAA,CAAAwF,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1,73 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|