@onairos/react-native 3.1.18 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (734) hide show
  1. package/README.md +374 -403
  2. package/lib/commonjs/api/index.js +1 -75
  3. package/lib/commonjs/api/index.js.map +1 -1
  4. package/lib/commonjs/assets/images/email.png +0 -0
  5. package/lib/commonjs/assets/images/linkedin.png +0 -0
  6. package/lib/commonjs/assets/images/reddit.png +0 -0
  7. package/lib/commonjs/assets/images/youtube.png +0 -0
  8. package/lib/commonjs/components/DataRequestModal.js.map +1 -1
  9. package/lib/commonjs/components/DataRequestScreen.js.map +1 -1
  10. package/lib/commonjs/components/EmailVerificationModal.js.map +1 -1
  11. package/lib/commonjs/components/Onairos.js +3 -1
  12. package/lib/commonjs/components/Onairos.js.map +1 -1
  13. package/lib/commonjs/components/OnairosButton.js +190 -171
  14. package/lib/commonjs/components/OnairosButton.js.map +1 -1
  15. package/lib/commonjs/components/Overlay.js +5 -5
  16. package/lib/commonjs/components/Overlay.js.map +1 -1
  17. package/lib/commonjs/components/PinInput.js +120 -282
  18. package/lib/commonjs/components/PinInput.js.map +1 -1
  19. package/lib/commonjs/components/PlatformList.js.map +1 -1
  20. package/lib/commonjs/components/TrainingModal.js +563 -808
  21. package/lib/commonjs/components/TrainingModal.js.map +1 -1
  22. package/lib/commonjs/components/UniversalOnboarding.js +1296 -2302
  23. package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
  24. package/lib/commonjs/components/UniversalOnboarding.tsx.new +455 -0
  25. package/lib/commonjs/components/onboarding/OAuthWebView.js +743 -134
  26. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
  27. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +1 -1
  28. package/lib/commonjs/components/onboarding/PinInput.js.map +1 -1
  29. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -1
  30. package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -1
  31. package/lib/commonjs/components/screens/LoadingScreen.js.map +1 -1
  32. package/lib/commonjs/components/screens/PinCreationScreen.js.map +1 -1
  33. package/lib/commonjs/constants/index.js.map +1 -1
  34. package/lib/commonjs/hooks/useConnections.js +125 -120
  35. package/lib/commonjs/hooks/useConnections.js.map +1 -1
  36. package/lib/commonjs/hooks/useCredentials.js.map +1 -1
  37. package/lib/commonjs/index.js +27 -157
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +428 -0
  40. package/lib/commonjs/services/apiKeyService.js +106 -105
  41. package/lib/commonjs/services/apiKeyService.js.map +1 -1
  42. package/lib/commonjs/services/oauthService.js.map +1 -1
  43. package/lib/commonjs/services/platformAuthService.js +722 -956
  44. package/lib/commonjs/services/platformAuthService.js.map +1 -1
  45. package/lib/commonjs/types/ambient.d.js.map +1 -1
  46. package/lib/commonjs/types/declarations.d.js.map +1 -1
  47. package/lib/commonjs/types/index.d.js.map +1 -1
  48. package/lib/commonjs/types/index.js.map +1 -1
  49. package/lib/commonjs/types/node-fix.d.js.map +1 -1
  50. package/lib/commonjs/types/node-override.d.js.map +1 -1
  51. package/lib/commonjs/types/opacity.d.js.map +1 -1
  52. package/lib/commonjs/types/types.d.js.map +1 -1
  53. package/lib/commonjs/types.js.map +1 -1
  54. package/lib/commonjs/utils/Portal.js +4 -4
  55. package/lib/commonjs/utils/Portal.js.map +1 -1
  56. package/lib/commonjs/utils/api.js +24 -24
  57. package/lib/commonjs/utils/api.js.map +1 -1
  58. package/lib/commonjs/utils/auth.js +18 -18
  59. package/lib/commonjs/utils/auth.js.map +1 -1
  60. package/lib/commonjs/utils/crypto.js +13 -13
  61. package/lib/commonjs/utils/crypto.js.map +1 -1
  62. package/lib/commonjs/utils/debugHelper.js.map +1 -1
  63. package/lib/commonjs/utils/encryption.js +12 -12
  64. package/lib/commonjs/utils/encryption.js.map +1 -1
  65. package/lib/commonjs/utils/onairosApi.js.map +1 -1
  66. package/lib/commonjs/utils/programmaticFlow.js +16 -16
  67. package/lib/commonjs/utils/programmaticFlow.js.map +1 -1
  68. package/lib/commonjs/utils/retryHelper.js +27 -27
  69. package/lib/commonjs/utils/retryHelper.js.map +1 -1
  70. package/lib/commonjs/utils/secureStorage.js.map +1 -1
  71. package/lib/module/api/index.js +0 -72
  72. package/lib/module/api/index.js.map +1 -1
  73. package/lib/module/assets/images/email.png +0 -0
  74. package/lib/module/assets/images/linkedin.png +0 -0
  75. package/lib/module/assets/images/reddit.png +0 -0
  76. package/lib/module/assets/images/youtube.png +0 -0
  77. package/lib/module/components/DataRequestModal.js.map +1 -1
  78. package/lib/module/components/DataRequestScreen.js.map +1 -1
  79. package/lib/module/components/EmailVerificationModal.js.map +1 -1
  80. package/lib/module/components/Onairos.js +3 -1
  81. package/lib/module/components/Onairos.js.map +1 -1
  82. package/lib/module/components/OnairosButton.js +192 -172
  83. package/lib/module/components/OnairosButton.js.map +1 -1
  84. package/lib/module/components/Overlay.js +5 -5
  85. package/lib/module/components/Overlay.js.map +1 -1
  86. package/lib/module/components/PinInput.js +120 -283
  87. package/lib/module/components/PinInput.js.map +1 -1
  88. package/lib/module/components/PlatformList.js.map +1 -1
  89. package/lib/module/components/TrainingModal.js +565 -809
  90. package/lib/module/components/TrainingModal.js.map +1 -1
  91. package/lib/module/components/UniversalOnboarding.js +1297 -2305
  92. package/lib/module/components/UniversalOnboarding.js.map +1 -1
  93. package/lib/module/components/UniversalOnboarding.tsx.new +455 -0
  94. package/lib/module/components/onboarding/OAuthWebView.js +744 -136
  95. package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
  96. package/lib/module/components/onboarding/OnboardingHeader.js.map +1 -1
  97. package/lib/module/components/onboarding/PinInput.js.map +1 -1
  98. package/lib/module/components/onboarding/PlatformConnector.js.map +1 -1
  99. package/lib/module/components/screens/ConnectorScreen.js.map +1 -1
  100. package/lib/module/components/screens/LoadingScreen.js.map +1 -1
  101. package/lib/module/components/screens/PinCreationScreen.js.map +1 -1
  102. package/lib/module/constants/index.js.map +1 -1
  103. package/lib/module/hooks/useConnections.js +125 -119
  104. package/lib/module/hooks/useConnections.js.map +1 -1
  105. package/lib/module/hooks/useCredentials.js.map +1 -1
  106. package/lib/module/index.js +17 -55
  107. package/lib/module/index.js.map +1 -1
  108. package/lib/module/services/SDK_API_KEY_VALIDATION.md +428 -0
  109. package/lib/module/services/apiKeyService.js +106 -105
  110. package/lib/module/services/apiKeyService.js.map +1 -1
  111. package/lib/module/services/oauthService.js.map +1 -1
  112. package/lib/module/services/platformAuthService.js +704 -943
  113. package/lib/module/services/platformAuthService.js.map +1 -1
  114. package/lib/module/types/ambient.d.js.map +1 -1
  115. package/lib/module/types/declarations.d.js.map +1 -1
  116. package/lib/module/types/index.d.js.map +1 -1
  117. package/lib/module/types/index.js.map +1 -1
  118. package/lib/module/types/node-fix.d.js.map +1 -1
  119. package/lib/module/types/node-override.d.js.map +1 -1
  120. package/lib/module/types/opacity.d.js.map +1 -1
  121. package/lib/module/types/types.d.js.map +1 -1
  122. package/lib/module/types.js.map +1 -1
  123. package/lib/module/utils/Portal.js +4 -4
  124. package/lib/module/utils/Portal.js.map +1 -1
  125. package/lib/module/utils/api.js +24 -24
  126. package/lib/module/utils/api.js.map +1 -1
  127. package/lib/module/utils/auth.js +18 -18
  128. package/lib/module/utils/auth.js.map +1 -1
  129. package/lib/module/utils/crypto.js +13 -13
  130. package/lib/module/utils/crypto.js.map +1 -1
  131. package/lib/module/utils/debugHelper.js.map +1 -1
  132. package/lib/module/utils/encryption.js +12 -12
  133. package/lib/module/utils/encryption.js.map +1 -1
  134. package/lib/module/utils/onairosApi.js.map +1 -1
  135. package/lib/module/utils/programmaticFlow.js +16 -16
  136. package/lib/module/utils/programmaticFlow.js.map +1 -1
  137. package/lib/module/utils/retryHelper.js +27 -27
  138. package/lib/module/utils/retryHelper.js.map +1 -1
  139. package/lib/module/utils/secureStorage.js.map +1 -1
  140. package/lib/typescript/api/index.d.ts +7 -15
  141. package/lib/typescript/api/index.d.ts.map +1 -1
  142. package/lib/typescript/components/DataRequestModal.d.ts +10 -10
  143. package/lib/typescript/components/DataRequestScreen.d.ts +10 -10
  144. package/lib/typescript/components/EmailVerificationModal.d.ts +10 -10
  145. package/lib/typescript/components/Onairos.d.ts +3 -3
  146. package/lib/typescript/components/Onairos.d.ts.map +1 -1
  147. package/lib/typescript/components/OnairosButton.d.ts +11 -36
  148. package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
  149. package/lib/typescript/components/Overlay.d.ts +3 -3
  150. package/lib/typescript/components/PinInput.d.ts +3 -13
  151. package/lib/typescript/components/PinInput.d.ts.map +1 -1
  152. package/lib/typescript/components/PlatformList.d.ts +3 -3
  153. package/lib/typescript/components/TrainingModal.d.ts +3 -14
  154. package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
  155. package/lib/typescript/components/UniversalOnboarding.d.ts +3 -16
  156. package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
  157. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +9 -9
  158. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
  159. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +10 -10
  160. package/lib/typescript/components/onboarding/PinInput.d.ts +3 -3
  161. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +12 -12
  162. package/lib/typescript/components/screens/ConnectorScreen.d.ts +8 -8
  163. package/lib/typescript/components/screens/LoadingScreen.d.ts +8 -8
  164. package/lib/typescript/components/screens/PinCreationScreen.d.ts +9 -9
  165. package/lib/typescript/constants/index.d.ts +52 -52
  166. package/lib/typescript/hooks/useConnections.d.ts +8 -13
  167. package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
  168. package/lib/typescript/hooks/useCredentials.d.ts +8 -8
  169. package/lib/typescript/index.d.ts +17 -38
  170. package/lib/typescript/index.d.ts.map +1 -1
  171. package/lib/typescript/services/apiKeyService.d.ts +131 -131
  172. package/lib/typescript/services/apiKeyService.d.ts.map +1 -1
  173. package/lib/typescript/services/oauthService.d.ts +49 -49
  174. package/lib/typescript/services/platformAuthService.d.ts +143 -68
  175. package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
  176. package/lib/typescript/types/index.d.ts +228 -264
  177. package/lib/typescript/types/index.d.ts.map +1 -1
  178. package/lib/typescript/types.d.ts +268 -266
  179. package/lib/typescript/types.d.ts.map +1 -1
  180. package/lib/typescript/utils/Portal.d.ts +13 -13
  181. package/lib/typescript/utils/api.d.ts +5 -5
  182. package/lib/typescript/utils/auth.d.ts +5 -5
  183. package/lib/typescript/utils/crypto.d.ts +3 -3
  184. package/lib/typescript/utils/debugHelper.d.ts +28 -28
  185. package/lib/typescript/utils/encryption.d.ts +18 -18
  186. package/lib/typescript/utils/onairosApi.d.ts +86 -86
  187. package/lib/typescript/utils/programmaticFlow.d.ts +22 -22
  188. package/lib/typescript/utils/retryHelper.d.ts +68 -68
  189. package/lib/typescript/utils/secureStorage.d.ts +93 -93
  190. package/package.json +149 -145
  191. package/src/api/index.ts +110 -151
  192. package/src/assets/images/email.png +0 -0
  193. package/src/assets/images/linkedin.png +0 -0
  194. package/src/assets/images/reddit.png +0 -0
  195. package/src/assets/images/youtube.png +0 -0
  196. package/src/components/DataRequestScreen.tsx +355 -355
  197. package/src/components/EmailVerificationModal.tsx +363 -363
  198. package/src/components/Onairos.tsx +424 -422
  199. package/src/components/OnairosButton.tsx +359 -339
  200. package/src/components/Overlay.tsx +506 -506
  201. package/src/components/PinInput.tsx +343 -555
  202. package/src/components/PlatformList.tsx +144 -144
  203. package/src/components/TrainingModal.tsx +737 -1047
  204. package/src/components/UniversalOnboarding.tsx +1839 -2888
  205. package/src/components/UniversalOnboarding.tsx.new +455 -0
  206. package/src/components/onboarding/OAuthWebView.tsx +838 -232
  207. package/src/hooks/useConnections.ts +163 -161
  208. package/src/hooks/useCredentials.ts +174 -174
  209. package/src/index.js +14 -14
  210. package/src/index.ts +49 -99
  211. package/src/services/SDK_API_KEY_VALIDATION.md +428 -0
  212. package/src/services/apiKeyService.ts +921 -919
  213. package/src/services/platformAuthService.ts +1113 -1346
  214. package/src/types/ambient.d.ts +28 -28
  215. package/src/types/index.ts +241 -265
  216. package/src/types/node-fix.d.ts +18 -18
  217. package/src/types/node-override.d.ts +23 -23
  218. package/src/types/opacity.d.ts +15 -15
  219. package/src/types/types.d.ts +17 -17
  220. package/src/types.ts +6 -4
  221. package/src/utils/Portal.tsx +82 -82
  222. package/src/utils/api.js +111 -111
  223. package/src/utils/auth.js +103 -103
  224. package/src/utils/crypto.js +59 -59
  225. package/src/utils/encryption.ts +68 -68
  226. package/src/utils/programmaticFlow.ts +112 -112
  227. package/src/utils/retryHelper.ts +274 -274
  228. package/types/index.d.ts +213 -213
  229. package/types/node-env.d.ts +14 -14
  230. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  231. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  232. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  233. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  234. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  235. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  236. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  237. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  238. package/lib/commonjs/assets/icons/farcaster.png +0 -0
  239. package/lib/commonjs/assets/icons/instagram.png +0 -0
  240. package/lib/commonjs/assets/icons/pinterest.png +0 -0
  241. package/lib/commonjs/assets/icons/swerv_logo.png +0 -0
  242. package/lib/commonjs/assets/icons/twitter.jpg +0 -0
  243. package/lib/commonjs/assets/images/Checkbox.svg +0 -3
  244. package/lib/commonjs/assets/images/EnochE.svg +0 -19
  245. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  246. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  247. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  248. package/lib/commonjs/assets/images/Gmail.png +0 -0
  249. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  250. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  251. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  252. package/lib/commonjs/assets/images/Personalityprofile.svg +0 -3
  253. package/lib/commonjs/assets/images/Personalitytraits.svg +0 -3
  254. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  255. package/lib/commonjs/assets/images/Userpreferences.svg +0 -3
  256. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  257. package/lib/commonjs/assets/images/arrow.svg +0 -20
  258. package/lib/commonjs/assets/images/basicproficon.svg +0 -43
  259. package/lib/commonjs/assets/images/basicprofile.svg +0 -3
  260. package/lib/commonjs/assets/images/checkmark.svg +0 -4
  261. package/lib/commonjs/assets/images/contentanalysis.svg +0 -3
  262. package/lib/commonjs/assets/images/contenticon.svg +0 -23
  263. package/lib/commonjs/assets/images/persona1.png +0 -0
  264. package/lib/commonjs/assets/images/persona2.png +0 -0
  265. package/lib/commonjs/assets/images/persona3.png +0 -0
  266. package/lib/commonjs/assets/images/persona4.png +0 -0
  267. package/lib/commonjs/assets/images/persona5.png +0 -0
  268. package/lib/commonjs/assets/images/personalityicon.svg +0 -18
  269. package/lib/commonjs/assets/images/x-close.svg +0 -3
  270. package/lib/commonjs/components/BodyText.js +0 -27
  271. package/lib/commonjs/components/BodyText.js.map +0 -1
  272. package/lib/commonjs/components/BrandMark.js +0 -44
  273. package/lib/commonjs/components/BrandMark.js.map +0 -1
  274. package/lib/commonjs/components/CodeInput.js +0 -30
  275. package/lib/commonjs/components/CodeInput.js.map +0 -1
  276. package/lib/commonjs/components/EmailInput.js +0 -30
  277. package/lib/commonjs/components/EmailInput.js.map +0 -1
  278. package/lib/commonjs/components/ExistingUserDataConfirmation.js +0 -474
  279. package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +0 -1
  280. package/lib/commonjs/components/GoogleButton.js +0 -55
  281. package/lib/commonjs/components/GoogleButton.js.map +0 -1
  282. package/lib/commonjs/components/HeadingGroup.js +0 -43
  283. package/lib/commonjs/components/HeadingGroup.js.map +0 -1
  284. package/lib/commonjs/components/ModalHeader.js +0 -99
  285. package/lib/commonjs/components/ModalHeader.js.map +0 -1
  286. package/lib/commonjs/components/ModalSheet.js +0 -47
  287. package/lib/commonjs/components/ModalSheet.js.map +0 -1
  288. package/lib/commonjs/components/OnairosSignInButton.js +0 -129
  289. package/lib/commonjs/components/OnairosSignInButton.js.map +0 -1
  290. package/lib/commonjs/components/PersonaImage.js +0 -60
  291. package/lib/commonjs/components/PersonaImage.js.map +0 -1
  292. package/lib/commonjs/components/PersonaLoadingScreen.js +0 -156
  293. package/lib/commonjs/components/PersonaLoadingScreen.js.map +0 -1
  294. package/lib/commonjs/components/PersonalizationConsentScreen.js +0 -316
  295. package/lib/commonjs/components/PersonalizationConsentScreen.js.map +0 -1
  296. package/lib/commonjs/components/PinCreationScreen.js +0 -393
  297. package/lib/commonjs/components/PinCreationScreen.js.map +0 -1
  298. package/lib/commonjs/components/PlatformConnectorsStep.js +0 -828
  299. package/lib/commonjs/components/PlatformConnectorsStep.js.map +0 -1
  300. package/lib/commonjs/components/PlatformToggle.js +0 -180
  301. package/lib/commonjs/components/PlatformToggle.js.map +0 -1
  302. package/lib/commonjs/components/PrimaryButton.js +0 -180
  303. package/lib/commonjs/components/PrimaryButton.js.map +0 -1
  304. package/lib/commonjs/components/SignInMatchAnimation.js +0 -197
  305. package/lib/commonjs/components/SignInMatchAnimation.js.map +0 -1
  306. package/lib/commonjs/components/SignInStep.js +0 -179
  307. package/lib/commonjs/components/SignInStep.js.map +0 -1
  308. package/lib/commonjs/components/VerificationStep.js +0 -154
  309. package/lib/commonjs/components/VerificationStep.js.map +0 -1
  310. package/lib/commonjs/components/WelcomeScreen.js +0 -401
  311. package/lib/commonjs/components/WelcomeScreen.js.map +0 -1
  312. package/lib/commonjs/components/icons/Basicproficon.js +0 -37
  313. package/lib/commonjs/components/icons/Basicproficon.js.map +0 -1
  314. package/lib/commonjs/components/icons/Basicprofile.js +0 -21
  315. package/lib/commonjs/components/icons/Basicprofile.js.map +0 -1
  316. package/lib/commonjs/components/icons/Checkbox.js +0 -21
  317. package/lib/commonjs/components/icons/Checkbox.js.map +0 -1
  318. package/lib/commonjs/components/icons/Checkmark.js +0 -27
  319. package/lib/commonjs/components/icons/Checkmark.js.map +0 -1
  320. package/lib/commonjs/components/icons/Contentanalysis.js +0 -21
  321. package/lib/commonjs/components/icons/Contentanalysis.js.map +0 -1
  322. package/lib/commonjs/components/icons/Contenticon.js +0 -39
  323. package/lib/commonjs/components/icons/Contenticon.js.map +0 -1
  324. package/lib/commonjs/components/icons/EnochE.js +0 -41
  325. package/lib/commonjs/components/icons/EnochE.js.map +0 -1
  326. package/lib/commonjs/components/icons/Personalityicon.js +0 -30
  327. package/lib/commonjs/components/icons/Personalityicon.js.map +0 -1
  328. package/lib/commonjs/components/icons/Personalityprofile.js +0 -21
  329. package/lib/commonjs/components/icons/Personalityprofile.js.map +0 -1
  330. package/lib/commonjs/components/icons/Personalitytraits.js +0 -21
  331. package/lib/commonjs/components/icons/Personalitytraits.js.map +0 -1
  332. package/lib/commonjs/components/icons/Userpreferences.js +0 -21
  333. package/lib/commonjs/components/icons/Userpreferences.js.map +0 -1
  334. package/lib/commonjs/components/icons/index.js +0 -84
  335. package/lib/commonjs/components/icons/index.js.map +0 -1
  336. package/lib/commonjs/config/api.js +0 -34
  337. package/lib/commonjs/config/api.js.map +0 -1
  338. package/lib/commonjs/context/AuthContext.js +0 -345
  339. package/lib/commonjs/context/AuthContext.js.map +0 -1
  340. package/lib/commonjs/hooks/useConnectedAccounts.js +0 -111
  341. package/lib/commonjs/hooks/useConnectedAccounts.js.map +0 -1
  342. package/lib/commonjs/hooks/useUserConnections.js +0 -148
  343. package/lib/commonjs/hooks/useUserConnections.js.map +0 -1
  344. package/lib/commonjs/services/apiClient.js +0 -302
  345. package/lib/commonjs/services/apiClient.js.map +0 -1
  346. package/lib/commonjs/services/authService.js +0 -935
  347. package/lib/commonjs/services/authService.js.map +0 -1
  348. package/lib/commonjs/services/biometricPinService.js +0 -184
  349. package/lib/commonjs/services/biometricPinService.js.map +0 -1
  350. package/lib/commonjs/services/connectedAccountsService.js +0 -268
  351. package/lib/commonjs/services/connectedAccountsService.js.map +0 -1
  352. package/lib/commonjs/services/googleAuthService.js +0 -268
  353. package/lib/commonjs/services/googleAuthService.js.map +0 -1
  354. package/lib/commonjs/services/imageCompressionService.js +0 -260
  355. package/lib/commonjs/services/imageCompressionService.js.map +0 -1
  356. package/lib/commonjs/services/jwtStorageService.js +0 -256
  357. package/lib/commonjs/services/jwtStorageService.js.map +0 -1
  358. package/lib/commonjs/services/mobileTrainingService.js +0 -185
  359. package/lib/commonjs/services/mobileTrainingService.js.map +0 -1
  360. package/lib/commonjs/services/pinEncryptionService.js +0 -84
  361. package/lib/commonjs/services/pinEncryptionService.js.map +0 -1
  362. package/lib/commonjs/services/pinStorageUtils.js +0 -105
  363. package/lib/commonjs/services/pinStorageUtils.js.map +0 -1
  364. package/lib/commonjs/services/storageService.js +0 -404
  365. package/lib/commonjs/services/storageService.js.map +0 -1
  366. package/lib/commonjs/services/trainingApiHelpers.js +0 -73
  367. package/lib/commonjs/services/trainingApiHelpers.js.map +0 -1
  368. package/lib/commonjs/services/userConnectionsService.js +0 -486
  369. package/lib/commonjs/services/userConnectionsService.js.map +0 -1
  370. package/lib/commonjs/services/youtubeMigrationService.js +0 -415
  371. package/lib/commonjs/services/youtubeMigrationService.js.map +0 -1
  372. package/lib/commonjs/theme/index.js +0 -249
  373. package/lib/commonjs/theme/index.js.map +0 -1
  374. package/lib/commonjs/utils/eventUtils.js +0 -288
  375. package/lib/commonjs/utils/eventUtils.js.map +0 -1
  376. package/lib/commonjs/utils/haptics.js +0 -66
  377. package/lib/commonjs/utils/haptics.js.map +0 -1
  378. package/lib/commonjs/utils/imagePreloader.js +0 -6
  379. package/lib/commonjs/utils/imagePreloader.js.map +0 -1
  380. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  381. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  382. package/lib/module/assets/icons/Facebookicon.png +0 -0
  383. package/lib/module/assets/icons/Gmail.png +0 -0
  384. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  385. package/lib/module/assets/icons/Redditicon.png +0 -0
  386. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  387. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  388. package/lib/module/assets/icons/farcaster.png +0 -0
  389. package/lib/module/assets/icons/instagram.png +0 -0
  390. package/lib/module/assets/icons/pinterest.png +0 -0
  391. package/lib/module/assets/icons/swerv_logo.png +0 -0
  392. package/lib/module/assets/icons/twitter.jpg +0 -0
  393. package/lib/module/assets/images/Checkbox.svg +0 -3
  394. package/lib/module/assets/images/EnochE.svg +0 -19
  395. package/lib/module/assets/images/Enochicon1.png +0 -0
  396. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  397. package/lib/module/assets/images/Facebookicon.png +0 -0
  398. package/lib/module/assets/images/Gmail.png +0 -0
  399. package/lib/module/assets/images/Googlelogo.png +0 -0
  400. package/lib/module/assets/images/Linkedinicon.png +0 -0
  401. package/lib/module/assets/images/Onairoslogo.png +0 -0
  402. package/lib/module/assets/images/Personalityprofile.svg +0 -3
  403. package/lib/module/assets/images/Personalitytraits.svg +0 -3
  404. package/lib/module/assets/images/Redditicon.png +0 -0
  405. package/lib/module/assets/images/Userpreferences.svg +0 -3
  406. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  407. package/lib/module/assets/images/arrow.svg +0 -20
  408. package/lib/module/assets/images/basicproficon.svg +0 -43
  409. package/lib/module/assets/images/basicprofile.svg +0 -3
  410. package/lib/module/assets/images/checkmark.svg +0 -4
  411. package/lib/module/assets/images/contentanalysis.svg +0 -3
  412. package/lib/module/assets/images/contenticon.svg +0 -23
  413. package/lib/module/assets/images/persona1.png +0 -0
  414. package/lib/module/assets/images/persona2.png +0 -0
  415. package/lib/module/assets/images/persona3.png +0 -0
  416. package/lib/module/assets/images/persona4.png +0 -0
  417. package/lib/module/assets/images/persona5.png +0 -0
  418. package/lib/module/assets/images/personalityicon.svg +0 -18
  419. package/lib/module/assets/images/x-close.svg +0 -3
  420. package/lib/module/components/BodyText.js +0 -20
  421. package/lib/module/components/BodyText.js.map +0 -1
  422. package/lib/module/components/BrandMark.js +0 -37
  423. package/lib/module/components/BrandMark.js.map +0 -1
  424. package/lib/module/components/CodeInput.js +0 -23
  425. package/lib/module/components/CodeInput.js.map +0 -1
  426. package/lib/module/components/EmailInput.js +0 -23
  427. package/lib/module/components/EmailInput.js.map +0 -1
  428. package/lib/module/components/ExistingUserDataConfirmation.js +0 -465
  429. package/lib/module/components/ExistingUserDataConfirmation.js.map +0 -1
  430. package/lib/module/components/GoogleButton.js +0 -48
  431. package/lib/module/components/GoogleButton.js.map +0 -1
  432. package/lib/module/components/HeadingGroup.js +0 -36
  433. package/lib/module/components/HeadingGroup.js.map +0 -1
  434. package/lib/module/components/ModalHeader.js +0 -92
  435. package/lib/module/components/ModalHeader.js.map +0 -1
  436. package/lib/module/components/ModalSheet.js +0 -39
  437. package/lib/module/components/ModalSheet.js.map +0 -1
  438. package/lib/module/components/OnairosSignInButton.js +0 -120
  439. package/lib/module/components/OnairosSignInButton.js.map +0 -1
  440. package/lib/module/components/PersonaImage.js +0 -53
  441. package/lib/module/components/PersonaImage.js.map +0 -1
  442. package/lib/module/components/PersonaLoadingScreen.js +0 -148
  443. package/lib/module/components/PersonaLoadingScreen.js.map +0 -1
  444. package/lib/module/components/PersonalizationConsentScreen.js +0 -309
  445. package/lib/module/components/PersonalizationConsentScreen.js.map +0 -1
  446. package/lib/module/components/PinCreationScreen.js +0 -386
  447. package/lib/module/components/PinCreationScreen.js.map +0 -1
  448. package/lib/module/components/PlatformConnectorsStep.js +0 -820
  449. package/lib/module/components/PlatformConnectorsStep.js.map +0 -1
  450. package/lib/module/components/PlatformToggle.js +0 -173
  451. package/lib/module/components/PlatformToggle.js.map +0 -1
  452. package/lib/module/components/PrimaryButton.js +0 -172
  453. package/lib/module/components/PrimaryButton.js.map +0 -1
  454. package/lib/module/components/SignInMatchAnimation.js +0 -189
  455. package/lib/module/components/SignInMatchAnimation.js.map +0 -1
  456. package/lib/module/components/SignInStep.js +0 -171
  457. package/lib/module/components/SignInStep.js.map +0 -1
  458. package/lib/module/components/VerificationStep.js +0 -146
  459. package/lib/module/components/VerificationStep.js.map +0 -1
  460. package/lib/module/components/WelcomeScreen.js +0 -393
  461. package/lib/module/components/WelcomeScreen.js.map +0 -1
  462. package/lib/module/components/icons/Basicproficon.js +0 -30
  463. package/lib/module/components/icons/Basicproficon.js.map +0 -1
  464. package/lib/module/components/icons/Basicprofile.js +0 -14
  465. package/lib/module/components/icons/Basicprofile.js.map +0 -1
  466. package/lib/module/components/icons/Checkbox.js +0 -14
  467. package/lib/module/components/icons/Checkbox.js.map +0 -1
  468. package/lib/module/components/icons/Checkmark.js +0 -20
  469. package/lib/module/components/icons/Checkmark.js.map +0 -1
  470. package/lib/module/components/icons/Contentanalysis.js +0 -14
  471. package/lib/module/components/icons/Contentanalysis.js.map +0 -1
  472. package/lib/module/components/icons/Contenticon.js +0 -32
  473. package/lib/module/components/icons/Contenticon.js.map +0 -1
  474. package/lib/module/components/icons/EnochE.js +0 -34
  475. package/lib/module/components/icons/EnochE.js.map +0 -1
  476. package/lib/module/components/icons/Personalityicon.js +0 -23
  477. package/lib/module/components/icons/Personalityicon.js.map +0 -1
  478. package/lib/module/components/icons/Personalityprofile.js +0 -14
  479. package/lib/module/components/icons/Personalityprofile.js.map +0 -1
  480. package/lib/module/components/icons/Personalitytraits.js +0 -14
  481. package/lib/module/components/icons/Personalitytraits.js.map +0 -1
  482. package/lib/module/components/icons/Userpreferences.js +0 -14
  483. package/lib/module/components/icons/Userpreferences.js.map +0 -1
  484. package/lib/module/components/icons/index.js +0 -13
  485. package/lib/module/components/icons/index.js.map +0 -1
  486. package/lib/module/config/api.js +0 -26
  487. package/lib/module/config/api.js.map +0 -1
  488. package/lib/module/context/AuthContext.js +0 -335
  489. package/lib/module/context/AuthContext.js.map +0 -1
  490. package/lib/module/hooks/useConnectedAccounts.js +0 -106
  491. package/lib/module/hooks/useConnectedAccounts.js.map +0 -1
  492. package/lib/module/hooks/useUserConnections.js +0 -140
  493. package/lib/module/hooks/useUserConnections.js.map +0 -1
  494. package/lib/module/services/apiClient.js +0 -298
  495. package/lib/module/services/apiClient.js.map +0 -1
  496. package/lib/module/services/authService.js +0 -905
  497. package/lib/module/services/authService.js.map +0 -1
  498. package/lib/module/services/biometricPinService.js +0 -173
  499. package/lib/module/services/biometricPinService.js.map +0 -1
  500. package/lib/module/services/connectedAccountsService.js +0 -255
  501. package/lib/module/services/connectedAccountsService.js.map +0 -1
  502. package/lib/module/services/googleAuthService.js +0 -258
  503. package/lib/module/services/googleAuthService.js.map +0 -1
  504. package/lib/module/services/imageCompressionService.js +0 -250
  505. package/lib/module/services/imageCompressionService.js.map +0 -1
  506. package/lib/module/services/jwtStorageService.js +0 -239
  507. package/lib/module/services/jwtStorageService.js.map +0 -1
  508. package/lib/module/services/mobileTrainingService.js +0 -172
  509. package/lib/module/services/mobileTrainingService.js.map +0 -1
  510. package/lib/module/services/pinEncryptionService.js +0 -75
  511. package/lib/module/services/pinEncryptionService.js.map +0 -1
  512. package/lib/module/services/pinStorageUtils.js +0 -93
  513. package/lib/module/services/pinStorageUtils.js.map +0 -1
  514. package/lib/module/services/storageService.js +0 -383
  515. package/lib/module/services/storageService.js.map +0 -1
  516. package/lib/module/services/trainingApiHelpers.js +0 -67
  517. package/lib/module/services/trainingApiHelpers.js.map +0 -1
  518. package/lib/module/services/userConnectionsService.js +0 -476
  519. package/lib/module/services/userConnectionsService.js.map +0 -1
  520. package/lib/module/services/youtubeMigrationService.js +0 -404
  521. package/lib/module/services/youtubeMigrationService.js.map +0 -1
  522. package/lib/module/theme/index.js +0 -244
  523. package/lib/module/theme/index.js.map +0 -1
  524. package/lib/module/utils/eventUtils.js +0 -270
  525. package/lib/module/utils/eventUtils.js.map +0 -1
  526. package/lib/module/utils/haptics.js +0 -59
  527. package/lib/module/utils/haptics.js.map +0 -1
  528. package/lib/module/utils/imagePreloader.js +0 -3
  529. package/lib/module/utils/imagePreloader.js.map +0 -1
  530. package/lib/typescript/components/BodyText.d.ts +0 -10
  531. package/lib/typescript/components/BodyText.d.ts.map +0 -1
  532. package/lib/typescript/components/BrandMark.d.ts +0 -11
  533. package/lib/typescript/components/BrandMark.d.ts.map +0 -1
  534. package/lib/typescript/components/CodeInput.d.ts +0 -10
  535. package/lib/typescript/components/CodeInput.d.ts.map +0 -1
  536. package/lib/typescript/components/EmailInput.d.ts +0 -8
  537. package/lib/typescript/components/EmailInput.d.ts.map +0 -1
  538. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +0 -12
  539. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +0 -1
  540. package/lib/typescript/components/GoogleButton.d.ts +0 -11
  541. package/lib/typescript/components/GoogleButton.d.ts.map +0 -1
  542. package/lib/typescript/components/HeadingGroup.d.ts +0 -11
  543. package/lib/typescript/components/HeadingGroup.d.ts.map +0 -1
  544. package/lib/typescript/components/ModalHeader.d.ts +0 -11
  545. package/lib/typescript/components/ModalHeader.d.ts.map +0 -1
  546. package/lib/typescript/components/ModalSheet.d.ts +0 -13
  547. package/lib/typescript/components/ModalSheet.d.ts.map +0 -1
  548. package/lib/typescript/components/OnairosSignInButton.d.ts +0 -13
  549. package/lib/typescript/components/OnairosSignInButton.d.ts.map +0 -1
  550. package/lib/typescript/components/PersonaImage.d.ts +0 -8
  551. package/lib/typescript/components/PersonaImage.d.ts.map +0 -1
  552. package/lib/typescript/components/PersonaLoadingScreen.d.ts +0 -10
  553. package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +0 -1
  554. package/lib/typescript/components/PersonalizationConsentScreen.d.ts +0 -10
  555. package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +0 -1
  556. package/lib/typescript/components/PinCreationScreen.d.ts +0 -10
  557. package/lib/typescript/components/PinCreationScreen.d.ts.map +0 -1
  558. package/lib/typescript/components/PlatformConnectorsStep.d.ts +0 -11
  559. package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +0 -1
  560. package/lib/typescript/components/PlatformToggle.d.ts +0 -20
  561. package/lib/typescript/components/PlatformToggle.d.ts.map +0 -1
  562. package/lib/typescript/components/PrimaryButton.d.ts +0 -22
  563. package/lib/typescript/components/PrimaryButton.d.ts.map +0 -1
  564. package/lib/typescript/components/SignInMatchAnimation.d.ts +0 -9
  565. package/lib/typescript/components/SignInMatchAnimation.d.ts.map +0 -1
  566. package/lib/typescript/components/SignInStep.d.ts +0 -12
  567. package/lib/typescript/components/SignInStep.d.ts.map +0 -1
  568. package/lib/typescript/components/VerificationStep.d.ts +0 -13
  569. package/lib/typescript/components/VerificationStep.d.ts.map +0 -1
  570. package/lib/typescript/components/WelcomeScreen.d.ts +0 -9
  571. package/lib/typescript/components/WelcomeScreen.d.ts.map +0 -1
  572. package/lib/typescript/components/icons/Basicproficon.d.ts +0 -5
  573. package/lib/typescript/components/icons/Basicproficon.d.ts.map +0 -1
  574. package/lib/typescript/components/icons/Basicprofile.d.ts +0 -5
  575. package/lib/typescript/components/icons/Basicprofile.d.ts.map +0 -1
  576. package/lib/typescript/components/icons/Checkbox.d.ts +0 -5
  577. package/lib/typescript/components/icons/Checkbox.d.ts.map +0 -1
  578. package/lib/typescript/components/icons/Checkmark.d.ts +0 -5
  579. package/lib/typescript/components/icons/Checkmark.d.ts.map +0 -1
  580. package/lib/typescript/components/icons/Contentanalysis.d.ts +0 -5
  581. package/lib/typescript/components/icons/Contentanalysis.d.ts.map +0 -1
  582. package/lib/typescript/components/icons/Contenticon.d.ts +0 -5
  583. package/lib/typescript/components/icons/Contenticon.d.ts.map +0 -1
  584. package/lib/typescript/components/icons/EnochE.d.ts +0 -5
  585. package/lib/typescript/components/icons/EnochE.d.ts.map +0 -1
  586. package/lib/typescript/components/icons/Personalityicon.d.ts +0 -5
  587. package/lib/typescript/components/icons/Personalityicon.d.ts.map +0 -1
  588. package/lib/typescript/components/icons/Personalityprofile.d.ts +0 -5
  589. package/lib/typescript/components/icons/Personalityprofile.d.ts.map +0 -1
  590. package/lib/typescript/components/icons/Personalitytraits.d.ts +0 -5
  591. package/lib/typescript/components/icons/Personalitytraits.d.ts.map +0 -1
  592. package/lib/typescript/components/icons/Userpreferences.d.ts +0 -5
  593. package/lib/typescript/components/icons/Userpreferences.d.ts.map +0 -1
  594. package/lib/typescript/components/icons/index.d.ts +0 -12
  595. package/lib/typescript/components/icons/index.d.ts.map +0 -1
  596. package/lib/typescript/config/api.d.ts +0 -24
  597. package/lib/typescript/config/api.d.ts.map +0 -1
  598. package/lib/typescript/context/AuthContext.d.ts +0 -34
  599. package/lib/typescript/context/AuthContext.d.ts.map +0 -1
  600. package/lib/typescript/hooks/useConnectedAccounts.d.ts +0 -11
  601. package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +0 -1
  602. package/lib/typescript/hooks/useUserConnections.d.ts +0 -12
  603. package/lib/typescript/hooks/useUserConnections.d.ts.map +0 -1
  604. package/lib/typescript/services/apiClient.d.ts +0 -91
  605. package/lib/typescript/services/apiClient.d.ts.map +0 -1
  606. package/lib/typescript/services/authService.d.ts +0 -216
  607. package/lib/typescript/services/authService.d.ts.map +0 -1
  608. package/lib/typescript/services/biometricPinService.d.ts +0 -29
  609. package/lib/typescript/services/biometricPinService.d.ts.map +0 -1
  610. package/lib/typescript/services/connectedAccountsService.d.ts +0 -56
  611. package/lib/typescript/services/connectedAccountsService.d.ts.map +0 -1
  612. package/lib/typescript/services/googleAuthService.d.ts +0 -63
  613. package/lib/typescript/services/googleAuthService.d.ts.map +0 -1
  614. package/lib/typescript/services/imageCompressionService.d.ts +0 -37
  615. package/lib/typescript/services/imageCompressionService.d.ts.map +0 -1
  616. package/lib/typescript/services/jwtStorageService.d.ts +0 -86
  617. package/lib/typescript/services/jwtStorageService.d.ts.map +0 -1
  618. package/lib/typescript/services/mobileTrainingService.d.ts +0 -45
  619. package/lib/typescript/services/mobileTrainingService.d.ts.map +0 -1
  620. package/lib/typescript/services/pinEncryptionService.d.ts +0 -17
  621. package/lib/typescript/services/pinEncryptionService.d.ts.map +0 -1
  622. package/lib/typescript/services/pinStorageUtils.d.ts +0 -25
  623. package/lib/typescript/services/pinStorageUtils.d.ts.map +0 -1
  624. package/lib/typescript/services/storageService.d.ts +0 -128
  625. package/lib/typescript/services/storageService.d.ts.map +0 -1
  626. package/lib/typescript/services/trainingApiHelpers.d.ts +0 -38
  627. package/lib/typescript/services/trainingApiHelpers.d.ts.map +0 -1
  628. package/lib/typescript/services/userConnectionsService.d.ts +0 -90
  629. package/lib/typescript/services/userConnectionsService.d.ts.map +0 -1
  630. package/lib/typescript/services/youtubeMigrationService.d.ts +0 -12
  631. package/lib/typescript/services/youtubeMigrationService.d.ts.map +0 -1
  632. package/lib/typescript/theme/index.d.ts +0 -416
  633. package/lib/typescript/theme/index.d.ts.map +0 -1
  634. package/lib/typescript/utils/eventUtils.d.ts +0 -108
  635. package/lib/typescript/utils/eventUtils.d.ts.map +0 -1
  636. package/lib/typescript/utils/haptics.d.ts +0 -11
  637. package/lib/typescript/utils/haptics.d.ts.map +0 -1
  638. package/lib/typescript/utils/imagePreloader.d.ts +0 -2
  639. package/lib/typescript/utils/imagePreloader.d.ts.map +0 -1
  640. package/src/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  641. package/src/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  642. package/src/assets/icons/Facebookicon.png +0 -0
  643. package/src/assets/icons/Gmail.png +0 -0
  644. package/src/assets/icons/Linkedinicon.png +0 -0
  645. package/src/assets/icons/Redditicon.png +0 -0
  646. package/src/assets/icons/YouTubeicon2.png +0 -0
  647. package/src/assets/icons/YouTubeicon3.png +0 -0
  648. package/src/assets/icons/farcaster.png +0 -0
  649. package/src/assets/icons/instagram.png +0 -0
  650. package/src/assets/icons/pinterest.png +0 -0
  651. package/src/assets/icons/swerv_logo.png +0 -0
  652. package/src/assets/icons/twitter.jpg +0 -0
  653. package/src/assets/images/Checkbox.svg +0 -3
  654. package/src/assets/images/EnochE.svg +0 -19
  655. package/src/assets/images/Enochicon1.png +0 -0
  656. package/src/assets/images/Face_ID_logo.png +0 -0
  657. package/src/assets/images/Facebookicon.png +0 -0
  658. package/src/assets/images/Gmail.png +0 -0
  659. package/src/assets/images/Googlelogo.png +0 -0
  660. package/src/assets/images/Linkedinicon.png +0 -0
  661. package/src/assets/images/Onairoslogo.png +0 -0
  662. package/src/assets/images/Personalityprofile.svg +0 -3
  663. package/src/assets/images/Personalitytraits.svg +0 -3
  664. package/src/assets/images/Redditicon.png +0 -0
  665. package/src/assets/images/Userpreferences.svg +0 -3
  666. package/src/assets/images/YouTubeicon3.png +0 -0
  667. package/src/assets/images/arrow.svg +0 -20
  668. package/src/assets/images/basicproficon.svg +0 -43
  669. package/src/assets/images/basicprofile.svg +0 -3
  670. package/src/assets/images/checkmark.svg +0 -4
  671. package/src/assets/images/contentanalysis.svg +0 -3
  672. package/src/assets/images/contenticon.svg +0 -23
  673. package/src/assets/images/persona1.png +0 -0
  674. package/src/assets/images/persona2.png +0 -0
  675. package/src/assets/images/persona3.png +0 -0
  676. package/src/assets/images/persona4.png +0 -0
  677. package/src/assets/images/persona5.png +0 -0
  678. package/src/assets/images/personalityicon.svg +0 -18
  679. package/src/assets/images/x-close.svg +0 -3
  680. package/src/components/BodyText.tsx +0 -33
  681. package/src/components/BrandMark.tsx +0 -62
  682. package/src/components/CodeInput.tsx +0 -32
  683. package/src/components/EmailInput.tsx +0 -31
  684. package/src/components/ExistingUserDataConfirmation.tsx +0 -507
  685. package/src/components/GoogleButton.tsx +0 -55
  686. package/src/components/HeadingGroup.tsx +0 -49
  687. package/src/components/ModalHeader.tsx +0 -125
  688. package/src/components/ModalSheet.tsx +0 -59
  689. package/src/components/OnairosSignInButton.tsx +0 -132
  690. package/src/components/PersonaImage.tsx +0 -79
  691. package/src/components/PersonaLoadingScreen.tsx +0 -201
  692. package/src/components/PersonalizationConsentScreen.tsx +0 -410
  693. package/src/components/PinCreationScreen.tsx +0 -492
  694. package/src/components/PlatformConnectorsStep.tsx +0 -892
  695. package/src/components/PlatformToggle.tsx +0 -226
  696. package/src/components/PrimaryButton.tsx +0 -214
  697. package/src/components/SignInMatchAnimation.tsx +0 -225
  698. package/src/components/SignInStep.tsx +0 -217
  699. package/src/components/VerificationStep.tsx +0 -198
  700. package/src/components/WelcomeScreen.tsx +0 -490
  701. package/src/components/icons/Basicproficon.tsx +0 -30
  702. package/src/components/icons/Basicprofile.tsx +0 -17
  703. package/src/components/icons/Checkbox.tsx +0 -17
  704. package/src/components/icons/Checkmark.tsx +0 -24
  705. package/src/components/icons/Contentanalysis.tsx +0 -17
  706. package/src/components/icons/Contenticon.tsx +0 -30
  707. package/src/components/icons/EnochE.tsx +0 -39
  708. package/src/components/icons/Personalityicon.tsx +0 -22
  709. package/src/components/icons/Personalityprofile.tsx +0 -17
  710. package/src/components/icons/Personalitytraits.tsx +0 -17
  711. package/src/components/icons/Userpreferences.tsx +0 -17
  712. package/src/components/icons/index.ts +0 -12
  713. package/src/config/api.ts +0 -25
  714. package/src/context/AuthContext.tsx +0 -393
  715. package/src/hooks/useConnectedAccounts.ts +0 -139
  716. package/src/hooks/useUserConnections.ts +0 -166
  717. package/src/services/apiClient.ts +0 -337
  718. package/src/services/authService.ts +0 -1008
  719. package/src/services/biometricPinService.ts +0 -193
  720. package/src/services/connectedAccountsService.ts +0 -290
  721. package/src/services/googleAuthService.ts +0 -279
  722. package/src/services/imageCompressionService.ts +0 -303
  723. package/src/services/jwtStorageService.ts +0 -257
  724. package/src/services/mobileTrainingService.ts +0 -204
  725. package/src/services/pinEncryptionService.ts +0 -76
  726. package/src/services/pinStorageUtils.ts +0 -97
  727. package/src/services/storageService.ts +0 -452
  728. package/src/services/trainingApiHelpers.ts +0 -67
  729. package/src/services/userConnectionsService.ts +0 -557
  730. package/src/services/youtubeMigrationService.ts +0 -454
  731. package/src/theme/index.ts +0 -239
  732. package/src/utils/eventUtils.ts +0 -303
  733. package/src/utils/haptics.ts +0 -59
  734. package/src/utils/imagePreloader.ts +0 -2
@@ -1,22 +0,0 @@
1
- import * as React from 'react';
2
- import Svg, {G, Rect, Path, Defs} from 'react-native-svg';
3
- /* SVGR has dropped some elements not supported by react-native-svg: filter */
4
- import type {SvgProps} from 'react-native-svg';
5
- const SvgPersonalityicon = (props: SvgProps) => (
6
- <Svg
7
- width={32}
8
- height={32}
9
- fill="none"
10
- viewBox="0 0 32 32"
11
- {...props}>
12
- <G filter="url(#personalityicon_svg__a)">
13
- <Rect width={32} height={32} fill="#ECECED" rx={16} />
14
- <Path
15
- fill="#1F242F"
16
- d="M21.569 11.455a4.48 4.48 0 0 0-3.248-1.288 4.5 4.5 0 0 0-1.955.489 4.5 4.5 0 0 0-2.14-.489 4.5 4.5 0 0 0-3.534 1.828 4.54 4.54 0 0 0-.88 2.697v.224q-.001.361-.145.69l-.6 1.37A.787.787 0 0 0 9.6 18.06l.48.118.198 1.11c.094.528.552.912 1.09.912h1.567c.033 0 .06.022.069.054l.238.966c.095.387.44.657.839.657h2.312c.404 0 .774-.146 1.062-.387a.86.86 0 0 0 .72.387h2.312c.912 0 1.653-.741 1.653-1.653V18.34c0-.625.134-1.247.4-1.848a4.5 4.5 0 0 0 .38-1.816c0-1.222-.48-2.365-1.352-3.22m-5.175 9.666h-2.312a.11.11 0 0 1-.105-.082l-.238-.965a.825.825 0 0 0-.803-.63h-1.568a.35.35 0 0 1-.345-.29l-.202-1.133a.72.72 0 0 0-.537-.572l-.502-.124c-.004 0-.015-.003-.022-.017s-.002-.025 0-.028l.6-1.37c.138-.315.208-.65.208-.994v-.224a3.745 3.745 0 0 1 3.675-3.769 3.8 3.8 0 0 1 1.361.224 4.6 4.6 0 0 0-.818.848 4.54 4.54 0 0 0-.88 2.697v.224q0 .361-.145.69l-.6 1.37a.787.787 0 0 0 .534 1.084l.48.118.198 1.11c.095.528.553.912 1.09.912h1.567c.033 0 .061.022.07.054l.093.378a.9.9 0 0 1-.799.49"
17
- />
18
- </G>
19
- <Defs></Defs>
20
- </Svg>
21
- );
22
- export default SvgPersonalityicon;
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import Svg, {Path} from 'react-native-svg';
3
- import type {SvgProps} from 'react-native-svg';
4
- const SvgPersonalityprofile = (props: SvgProps) => (
5
- <Svg
6
- width={263}
7
- height={22}
8
- fill="none"
9
- viewBox="0 0 263 22"
10
- {...props}>
11
- <Path
12
- fill="#1F242F"
13
- d="M1.004 16V5.818h3.818q1.174 0 1.97.438.8.437 1.207 1.203.413.76.413 1.73 0 .98-.413 1.74a2.95 2.95 0 0 1-1.218 1.198q-.806.433-1.983.433H2.267v-1.517h2.282q.686 0 1.124-.238.437-.24.646-.657.213-.417.214-.96q0-.54-.214-.954a1.45 1.45 0 0 0-.651-.641q-.438-.234-1.129-.234H2.85V16zm11.962.15q-1.149 0-1.984-.478a3.23 3.23 0 0 1-1.278-1.362q-.447-.886-.447-2.083 0-1.178.447-2.069a3.4 3.4 0 0 1 1.263-1.392q.81-.502 1.904-.502.706 0 1.333.229.63.223 1.113.696.487.473.766 1.203.279.726.278 1.73v.552h-6.259v-1.213h4.534a1.94 1.94 0 0 0-.223-.92A1.63 1.63 0 0 0 13.8 9.9a1.7 1.7 0 0 0-.905-.234q-.551 0-.97.269a1.85 1.85 0 0 0-.65.696q-.229.427-.234.94v1.058q0 .666.243 1.144.245.472.681.726.438.248 1.025.248.392 0 .71-.11.32-.113.552-.332.234-.22.353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.133.766q-.69.268-1.581.268m4.678-.15V8.364h1.745v1.272h.08q.208-.66.715-1.019a1.97 1.97 0 0 1 1.169-.363q.15 0 .333.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.388.21-.612.582t-.223.86V16zm11.346-5.618-1.64.18a1.3 1.3 0 0 0-.244-.468 1.2 1.2 0 0 0-.457-.353 1.7 1.7 0 0 0-.706-.134q-.562 0-.945.243-.378.243-.373.632a.66.66 0 0 0 .244.541q.253.21.835.344l1.303.278q1.083.234 1.61.74.533.508.537 1.328-.005.72-.422 1.273-.413.547-1.149.855-.735.308-1.69.308-1.402 0-2.257-.587-.855-.59-1.02-1.645l1.756-.17q.12.519.507.781.388.264 1.009.264.64 0 1.03-.264.391-.263.392-.65q0-.33-.254-.543-.248-.213-.775-.328l-1.303-.273q-1.098-.23-1.626-.77-.526-.548-.522-1.383-.004-.705.383-1.223.393-.522 1.089-.805.7-.29 1.616-.289 1.342 0 2.113.572.776.571.96 1.546m4.74 5.767q-1.12 0-1.94-.492a3.34 3.34 0 0 1-1.272-1.377q-.448-.885-.448-2.068t.448-2.073a3.34 3.34 0 0 1 1.272-1.383q.82-.492 1.94-.492 1.117 0 1.938.492.82.494 1.268 1.383.452.89.452 2.073t-.452 2.068a3.3 3.3 0 0 1-1.268 1.377q-.82.492-1.939.492m.01-1.442q.606 0 1.013-.333.408-.338.607-.905.204-.566.204-1.262q0-.701-.204-1.268a2 2 0 0 0-.607-.91q-.407-.338-1.014-.338-.621 0-1.034.338a2.04 2.04 0 0 0-.611.91 3.8 3.8 0 0 0-.2 1.268q0 .696.2 1.262.204.567.611.905.413.333 1.034.333m6.736-3.181V16h-1.8V8.364h1.72V9.66h.09q.262-.64.84-1.019.582-.378 1.437-.378.79 0 1.377.338.591.338.914.98.33.64.324 1.556V16h-1.8v-4.584q0-.765-.398-1.198-.393-.432-1.089-.432-.472 0-.84.208a1.45 1.45 0 0 0-.572.592q-.204.387-.203.94m8.689 4.628q-.726 0-1.308-.258a2.13 2.13 0 0 1-.915-.776q-.333-.511-.333-1.263 0-.646.239-1.069.238-.422.651-.676.412-.253.93-.383.521-.135 1.079-.193.67-.07 1.088-.125.418-.06.607-.179.195-.124.194-.383v-.03q0-.561-.333-.87t-.96-.308q-.66 0-1.049.289a1.43 1.43 0 0 0-.517.68l-1.68-.238q.198-.696.656-1.163.457-.472 1.119-.706a4.3 4.3 0 0 1 1.461-.239q.552 0 1.099.13.547.129 1 .427.451.293.725.8.279.508.279 1.268V16h-1.73v-1.049h-.06q-.165.318-.463.597-.293.274-.74.442-.443.165-1.04.164m.467-1.322q.541 0 .94-.214a1.6 1.6 0 0 0 .611-.577q.219-.358.219-.78v-.9a.9.9 0 0 1-.289.13 4 4 0 0 1-.447.104q-.249.045-.492.079l-.423.06a3.2 3.2 0 0 0-.72.179q-.319.123-.503.348-.184.218-.184.566 0 .498.363.751.363.255.925.254m6.934-9.014V16h-1.8V5.818zM58.176 16V8.364h1.8V16zm.905-8.72a1.05 1.05 0 0 1-.735-.284.91.91 0 0 1-.309-.69q0-.408.309-.692a1.04 1.04 0 0 1 .735-.288q.433 0 .736.288.309.285.309.691a.91.91 0 0 1-.309.691 1.04 1.04 0 0 1-.736.284m6.32 1.084v1.392h-4.39V8.364zm-3.307-1.83h1.8v7.17q0 .362.11.556a.6.6 0 0 0 .297.258q.185.07.408.07.17 0 .308-.025a3 3 0 0 0 .22-.045l.302 1.407a4 4 0 0 1-.412.11q-.264.06-.647.07a2.9 2.9 0 0 1-1.218-.204 1.9 1.9 0 0 1-.86-.706q-.313-.478-.308-1.194zm5.69 12.33q-.368 0-.681-.06a2.5 2.5 0 0 1-.492-.13l.417-1.401q.393.114.701.11a.86.86 0 0 0 .542-.195q.239-.183.403-.616l.154-.413-2.77-7.795h1.91l1.76 5.767h.08l1.764-5.767h1.914l-3.057 8.56a3.4 3.4 0 0 1-.567 1.04 2.3 2.3 0 0 1-.865.666q-.507.234-1.213.234m9.94 0v-10.5h1.77v1.262h.105a3.3 3.3 0 0 1 .392-.591q.255-.318.686-.542.433-.23 1.104-.229.885 0 1.596.453.716.447 1.134 1.327.422.875.422 2.148 0 1.257-.412 2.137-.413.88-1.124 1.343a2.9 2.9 0 0 1-1.61.462q-.657 0-1.09-.219a2.2 2.2 0 0 1-.696-.526 3.4 3.4 0 0 1-.402-.592h-.075v4.067zm1.765-6.682q0 .74.21 1.297.213.558.61.87.404.309.975.309.596 0 1-.319.402-.322.606-.88.21-.561.209-1.277a3.6 3.6 0 0 0-.204-1.263 1.9 1.9 0 0 0-.607-.865q-.402-.313-1.004-.313-.576 0-.98.303-.403.303-.61.85-.205.547-.205 1.288M86.234 16V8.364h1.745v1.272h.08q.21-.66.716-1.019a1.97 1.97 0 0 1 1.168-.363q.15 0 .333.015.189.01.314.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.473-.035 1.8 1.8 0 0 0-.885.214q-.387.21-.611.582a1.64 1.64 0 0 0-.224.86V16zm8.328.15q-1.118 0-1.94-.493a3.34 3.34 0 0 1-1.272-1.377q-.447-.885-.447-2.068t.447-2.073a3.34 3.34 0 0 1 1.273-1.383q.82-.492 1.939-.492 1.118 0 1.939.492.82.494 1.267 1.383.453.89.453 2.073t-.453 2.068a3.3 3.3 0 0 1-1.267 1.377q-.82.492-1.94.492m.01-1.443q.606 0 1.014-.333.408-.338.606-.905a3.7 3.7 0 0 0 .204-1.262q0-.701-.204-1.268a2 2 0 0 0-.606-.91q-.408-.338-1.014-.338-.623 0-1.035.338a2.04 2.04 0 0 0-.611.91q-.2.566-.199 1.268 0 .696.199 1.262.204.567.611.905.413.333 1.035.333m8.804-6.343v1.392h-4.514V8.364zM99.991 16V7.643q0-.771.318-1.283.323-.512.865-.766a2.8 2.8 0 0 1 1.203-.253q.467 0 .83.074.363.075.537.135l-.358 1.392a3 3 0 0 0-.288-.07 1.7 1.7 0 0 0-.388-.04q-.502 0-.711.244-.204.24-.204.686V16zm4.555 0V8.364h1.799V16zm.904-8.72q-.427 0-.735-.284a.91.91 0 0 1-.309-.69q0-.408.309-.692.308-.288.735-.288.433 0 .736.288.309.285.309.691a.91.91 0 0 1-.309.691 1.04 1.04 0 0 1-.736.284m4.306-1.462V16h-1.8V5.818zm4.991 10.331q-1.149 0-1.984-.477a3.23 3.23 0 0 1-1.277-1.362q-.448-.886-.448-2.083 0-1.178.448-2.069a3.38 3.38 0 0 1 1.263-1.392q.81-.502 1.904-.502.705 0 1.332.229.631.223 1.114.696.487.473.765 1.203.279.726.279 1.73v.552h-6.26v-1.213h4.535a1.94 1.94 0 0 0-.224-.92 1.63 1.63 0 0 0-.612-.641 1.7 1.7 0 0 0-.904-.234q-.552 0-.97.269a1.85 1.85 0 0 0-.651.696 2 2 0 0 0-.234.94v1.058q0 .666.244 1.144.243.472.681.726.437.248 1.024.248.393 0 .711-.11.318-.113.552-.332a1.4 1.4 0 0 0 .353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.134.766q-.692.268-1.581.268"
14
- />
15
- </Svg>
16
- );
17
- export default SvgPersonalityprofile;
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import Svg, {Path} from 'react-native-svg';
3
- import type {SvgProps} from 'react-native-svg';
4
- const SvgPersonalitytraits = (props: SvgProps) => (
5
- <Svg
6
- width={263}
7
- height={22}
8
- fill="none"
9
- viewBox="0 0 263 22"
10
- {...props}>
11
- <Path
12
- fill="#1F242F"
13
- d="M1.004 16V5.818h3.818q1.174 0 1.97.438.8.437 1.207 1.203.413.76.413 1.73 0 .98-.413 1.74a2.95 2.95 0 0 1-1.218 1.198q-.806.433-1.983.433H2.267v-1.517h2.282q.686 0 1.124-.238.437-.24.646-.657.213-.417.214-.96 0-.54-.214-.954a1.45 1.45 0 0 0-.651-.641q-.438-.234-1.129-.234H2.85V16zm11.962.15q-1.149 0-1.984-.478a3.23 3.23 0 0 1-1.278-1.362q-.447-.886-.447-2.083 0-1.178.447-2.069a3.4 3.4 0 0 1 1.263-1.392q.81-.502 1.904-.502.706 0 1.333.229.63.223 1.113.696.487.473.766 1.203.279.726.278 1.73v.552h-6.259v-1.213h4.534a1.94 1.94 0 0 0-.223-.92A1.63 1.63 0 0 0 13.8 9.9a1.7 1.7 0 0 0-.905-.234q-.551 0-.97.269a1.85 1.85 0 0 0-.65.696q-.229.427-.234.94v1.058q0 .666.243 1.144.245.472.681.726.438.248 1.025.248.392 0 .71-.11.32-.113.552-.332.234-.22.353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.133.766q-.69.268-1.581.268m4.678-.15V8.364h1.745v1.272h.08q.208-.66.715-1.019a1.97 1.97 0 0 1 1.169-.363q.15 0 .333.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.388.21-.612.582t-.223.86V16zm11.346-5.618-1.64.18a1.3 1.3 0 0 0-.244-.468 1.2 1.2 0 0 0-.457-.353 1.7 1.7 0 0 0-.706-.134q-.562 0-.945.243-.378.243-.373.632a.66.66 0 0 0 .244.541q.253.21.835.344l1.303.278q1.083.234 1.61.74.533.508.537 1.328-.005.72-.422 1.273-.413.547-1.149.855-.735.308-1.69.308-1.402 0-2.257-.587-.855-.59-1.02-1.645l1.756-.17q.12.519.507.781.388.264 1.009.264.64 0 1.03-.264.391-.263.392-.65 0-.33-.254-.543-.248-.213-.775-.328l-1.303-.273q-1.098-.23-1.626-.77-.526-.548-.522-1.383-.004-.705.383-1.223.393-.522 1.089-.805.7-.29 1.616-.289 1.342 0 2.113.572.776.571.96 1.546m4.74 5.767q-1.12 0-1.94-.492a3.34 3.34 0 0 1-1.272-1.377q-.448-.885-.448-2.068t.448-2.073a3.34 3.34 0 0 1 1.272-1.383q.82-.492 1.94-.492 1.117 0 1.938.492.82.494 1.268 1.383.452.89.452 2.073t-.452 2.068a3.3 3.3 0 0 1-1.268 1.377q-.82.492-1.939.492m.01-1.442q.606 0 1.013-.333.408-.338.607-.905.204-.566.204-1.262 0-.701-.204-1.268a2 2 0 0 0-.607-.91q-.407-.338-1.014-.338-.621 0-1.034.338a2.04 2.04 0 0 0-.611.91 3.8 3.8 0 0 0-.2 1.268q0 .696.2 1.262.204.567.611.905.413.333 1.034.333m6.736-3.181V16h-1.8V8.364h1.72V9.66h.09q.262-.64.84-1.019.582-.378 1.437-.378.79 0 1.377.338.591.338.914.98.33.64.324 1.556V16h-1.8v-4.584q0-.765-.398-1.198-.393-.432-1.089-.432-.472 0-.84.208a1.45 1.45 0 0 0-.572.592q-.204.387-.203.94m8.689 4.628q-.726 0-1.308-.258a2.13 2.13 0 0 1-.915-.776q-.333-.511-.333-1.263 0-.646.239-1.069.238-.422.651-.676.412-.253.93-.383.521-.135 1.079-.193.67-.07 1.088-.125.418-.06.607-.179.195-.124.194-.383v-.03q0-.561-.333-.87t-.96-.308q-.66 0-1.049.289a1.43 1.43 0 0 0-.517.68l-1.68-.238q.198-.696.656-1.163.457-.472 1.119-.706a4.3 4.3 0 0 1 1.461-.239q.552 0 1.099.13.547.129 1 .427.451.293.725.8.279.508.279 1.268V16h-1.73v-1.049h-.06q-.165.318-.463.597-.293.274-.74.442-.443.165-1.04.164m.467-1.322q.541 0 .94-.214a1.6 1.6 0 0 0 .611-.577q.219-.358.219-.78v-.9a.9.9 0 0 1-.289.13 4 4 0 0 1-.447.104q-.249.045-.492.079l-.423.06a3.2 3.2 0 0 0-.72.179q-.319.123-.503.348-.184.218-.184.566 0 .498.363.751.363.255.925.254m6.934-9.014V16h-1.8V5.818zM58.176 16V8.364h1.8V16zm.905-8.72a1.05 1.05 0 0 1-.735-.284.91.91 0 0 1-.309-.69q0-.408.309-.692a1.04 1.04 0 0 1 .735-.288q.433 0 .736.288.309.285.309.691a.91.91 0 0 1-.309.691 1.04 1.04 0 0 1-.736.284m6.32 1.084v1.392h-4.39V8.364zm-3.307-1.83h1.8v7.17q0 .362.11.556a.6.6 0 0 0 .297.258q.185.07.408.07.17 0 .308-.025a3 3 0 0 0 .22-.045l.302 1.407a4 4 0 0 1-.412.11q-.264.06-.647.07a2.9 2.9 0 0 1-1.218-.204 1.9 1.9 0 0 1-.86-.706q-.313-.478-.308-1.194zm5.69 12.33q-.368 0-.681-.06a2.5 2.5 0 0 1-.492-.13l.417-1.401q.393.114.701.11a.86.86 0 0 0 .542-.195q.239-.183.403-.616l.154-.413-2.77-7.795h1.91l1.76 5.767h.08l1.764-5.767h1.914l-3.057 8.56a3.4 3.4 0 0 1-.567 1.04 2.3 2.3 0 0 1-.865.666q-.507.234-1.213.234m9.572-11.5V5.818h8.124v1.546h-3.147V16h-1.83V7.364zM85.935 16V8.364h1.745v1.272h.08q.207-.66.715-1.019a1.97 1.97 0 0 1 1.168-.363q.149 0 .334.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.388.21-.612.582-.225.372-.224.86V16zm7.371.154q-.726 0-1.307-.258a2.13 2.13 0 0 1-.915-.776q-.333-.511-.333-1.263 0-.646.238-1.069.24-.422.652-.676.412-.253.93-.383.521-.135 1.078-.193.671-.07 1.089-.125.417-.06.607-.179.193-.124.193-.383v-.03q0-.561-.333-.87t-.96-.308q-.66 0-1.048.289a1.43 1.43 0 0 0-.517.68l-1.68-.238q.197-.696.656-1.163.457-.472 1.118-.706.661-.24 1.462-.239.552 0 1.099.13.546.129.999.427.451.293.726.8.278.508.278 1.268V16h-1.73v-1.049h-.06q-.164.318-.462.597-.294.274-.74.442-.444.165-1.04.164m.467-1.322q.543 0 .94-.214a1.6 1.6 0 0 0 .612-.577 1.47 1.47 0 0 0 .218-.78v-.9a.9.9 0 0 1-.288.13q-.2.059-.448.104t-.492.079l-.422.06a3.1 3.1 0 0 0-.721.179q-.319.123-.502.348-.184.218-.184.566 0 .498.363.751.363.255.924.254M98.908 16V8.364h1.799V16zm.905-8.72a1.05 1.05 0 0 1-.736-.284.91.91 0 0 1-.308-.69q0-.408.308-.692a1.04 1.04 0 0 1 .736-.288q.432 0 .735.288.309.285.309.691a.91.91 0 0 1-.309.691 1.04 1.04 0 0 1-.735.284m6.318 1.084v1.392h-4.39V8.364zm-3.306-1.83h1.8v7.17q0 .362.109.556a.6.6 0 0 0 .299.258q.183.07.407.07.17 0 .309-.025.144-.024.218-.045l.304 1.407q-.145.05-.413.11-.264.06-.646.07a2.9 2.9 0 0 1-1.218-.204 1.9 1.9 0 0 1-.861-.706q-.312-.478-.308-1.194zm10.498 3.848-1.641.18a1.3 1.3 0 0 0-.244-.468 1.2 1.2 0 0 0-.457-.353 1.7 1.7 0 0 0-.706-.134q-.561 0-.945.243-.377.243-.372.632a.66.66 0 0 0 .243.541q.254.21.835.344l1.303.278q1.084.234 1.611.74.531.508.537 1.328-.005.72-.423 1.273-.413.547-1.148.855-.736.308-1.691.308-1.401 0-2.257-.587-.855-.59-1.019-1.645l1.755-.17q.12.519.507.781.388.264 1.009.264.642 0 1.029-.264.393-.263.393-.65q0-.33-.253-.543-.25-.213-.776-.328l-1.302-.273q-1.1-.23-1.626-.77-.526-.548-.522-1.383-.005-.705.383-1.223.392-.522 1.088-.805.701-.29 1.616-.289 1.342 0 2.113.572.775.571.96 1.546"
14
- />
15
- </Svg>
16
- );
17
- export default SvgPersonalitytraits;
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import Svg, {Path} from 'react-native-svg';
3
- import type {SvgProps} from 'react-native-svg';
4
- const SvgUserpreferences = (props: SvgProps) => (
5
- <Svg
6
- width={263}
7
- height={22}
8
- fill="none"
9
- viewBox="0 0 263 22"
10
- {...props}>
11
- <Path
12
- fill="#1F242F"
13
- d="M7.423 5.818h1.844v6.652q0 1.094-.517 1.924a3.5 3.5 0 0 1-1.442 1.298q-.93.462-2.172.462-1.248 0-2.178-.462a3.5 3.5 0 0 1-1.442-1.298q-.512-.83-.512-1.924V5.818H2.85v6.498q0 .636.278 1.134.284.497.796.78.511.279 1.213.278.7 0 1.213-.278.517-.284.795-.78a2.3 2.3 0 0 0 .279-1.134zm9.565 4.564-1.64.18a1.3 1.3 0 0 0-.244-.468 1.2 1.2 0 0 0-.458-.353 1.7 1.7 0 0 0-.706-.134q-.562 0-.944.243-.379.243-.373.632a.66.66 0 0 0 .243.541q.255.21.836.344l1.302.278q1.085.234 1.61.74.534.508.538 1.328-.004.72-.423 1.273-.413.547-1.148.855-.736.308-1.69.308-1.402 0-2.258-.587-.855-.59-1.019-1.645l1.755-.17q.12.519.507.781.388.264 1.01.264.64 0 1.029-.264.393-.263.392-.65q0-.33-.253-.543-.248-.213-.776-.328l-1.302-.273q-1.1-.23-1.626-.77-.527-.548-.522-1.383-.005-.705.383-1.223.393-.522 1.089-.805.7-.29 1.615-.289 1.343 0 2.113.572.776.571.96 1.546m4.789 5.767q-1.149 0-1.984-.477a3.23 3.23 0 0 1-1.278-1.362q-.447-.886-.447-2.083 0-1.178.447-2.069a3.4 3.4 0 0 1 1.263-1.392q.81-.502 1.904-.502.706 0 1.333.229.63.223 1.113.696.487.473.766 1.203.278.726.278 1.73v.552h-6.26v-1.213h4.535a1.94 1.94 0 0 0-.224-.92 1.63 1.63 0 0 0-.611-.641 1.7 1.7 0 0 0-.905-.234q-.552 0-.97.269a1.85 1.85 0 0 0-.65.696q-.23.427-.234.94v1.058q0 .666.243 1.144.244.472.681.726.438.248 1.024.248.394 0 .711-.11.318-.113.552-.332t.353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.133.766q-.691.268-1.581.268M26.455 16V8.364H28.2v1.272h.08q.208-.66.715-1.019a1.97 1.97 0 0 1 1.168-.363q.15 0 .334.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.389.21-.612.582-.224.372-.224.86V16zm8.623 0V5.818h3.818q1.173 0 1.969.438.8.437 1.208 1.203.412.76.412 1.73 0 .98-.412 1.74a2.95 2.95 0 0 1-1.218 1.198q-.805.433-1.984.433h-2.53v-1.517h2.281q.687 0 1.124-.238.438-.24.646-.657.214-.417.214-.96 0-.54-.214-.954a1.45 1.45 0 0 0-.65-.641q-.439-.234-1.13-.234h-1.69V16zm8.69 0V8.364h1.745v1.272h.08q.208-.66.715-1.019a1.97 1.97 0 0 1 1.169-.363q.15 0 .333.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.388.21-.612.582t-.223.86V16zm8.377.15q-1.149 0-1.984-.478a3.23 3.23 0 0 1-1.277-1.362q-.448-.886-.448-2.083 0-1.178.448-2.069a3.4 3.4 0 0 1 1.262-1.392q.81-.502 1.904-.502.706 0 1.333.229.63.223 1.113.696.487.473.766 1.203.279.726.279 1.73v.552h-6.26v-1.213h4.534a1.94 1.94 0 0 0-.223-.92 1.63 1.63 0 0 0-.612-.641 1.7 1.7 0 0 0-.905-.234q-.551 0-.97.269a1.85 1.85 0 0 0-.65.696q-.229.427-.234.94v1.058q0 .666.244 1.144.243.472.68.726.438.248 1.025.248.393 0 .71-.11.32-.113.553-.332t.353-.542l1.68.189a2.6 2.6 0 0 1-.607 1.163 2.96 2.96 0 0 1-1.133.766q-.69.268-1.581.268m8.546-7.786v1.392h-4.514V8.364zM57.305 16V7.643q0-.771.319-1.283.322-.512.865-.766a2.8 2.8 0 0 1 1.203-.253q.467 0 .83.074.362.075.537.135L60.7 6.942a3 3 0 0 0-.288-.07 1.7 1.7 0 0 0-.388-.04q-.502 0-.711.244-.204.24-.204.686V16zm7.649.15q-1.149 0-1.984-.478a3.23 3.23 0 0 1-1.277-1.362q-.448-.886-.448-2.083 0-1.178.448-2.069a3.4 3.4 0 0 1 1.262-1.392q.81-.502 1.904-.502.706 0 1.333.229.63.223 1.114.696.487.473.765 1.203.279.726.279 1.73v.552h-6.26v-1.213h4.534a1.94 1.94 0 0 0-.223-.92 1.63 1.63 0 0 0-.612-.641 1.7 1.7 0 0 0-.905-.234q-.551 0-.97.269a1.85 1.85 0 0 0-.65.696q-.229.427-.234.94v1.058q0 .666.244 1.144.243.472.68.726.438.248 1.025.248.393 0 .71-.11.32-.113.553-.332t.353-.542l1.68.189a2.6 2.6 0 0 1-.607 1.163 2.96 2.96 0 0 1-1.133.766q-.69.268-1.581.268m4.678-.15V8.364h1.745v1.272h.08q.209-.66.716-1.019a1.97 1.97 0 0 1 1.168-.363q.15 0 .333.015.189.01.313.035V9.96a2 2 0 0 0-.363-.07 3 3 0 0 0-.472-.035 1.8 1.8 0 0 0-.885.214q-.387.21-.611.582-.225.372-.224.86V16zm8.377.15q-1.149 0-1.984-.478a3.23 3.23 0 0 1-1.277-1.362q-.448-.886-.448-2.083 0-1.178.448-2.069a3.4 3.4 0 0 1 1.263-1.392q.81-.502 1.904-.502.705 0 1.332.229.631.223 1.114.696.487.473.765 1.203.279.726.279 1.73v.552h-6.26v-1.213h4.535a1.94 1.94 0 0 0-.224-.92 1.63 1.63 0 0 0-.612-.641 1.7 1.7 0 0 0-.904-.234q-.552 0-.97.269a1.85 1.85 0 0 0-.651.696q-.229.427-.234.94v1.058q0 .666.244 1.144.244.472.68.726.439.248 1.025.248.393 0 .71-.11.32-.113.553-.332t.353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.134.766q-.691.268-1.58.268m6.478-4.624V16h-1.8V8.364h1.72V9.66h.09q.264-.64.84-1.019.582-.378 1.437-.378.79 0 1.377.338.593.338.915.98.328.64.323 1.556V16h-1.8v-4.584q0-.765-.397-1.198-.393-.432-1.09-.432-.471 0-.84.208a1.45 1.45 0 0 0-.571.592q-.204.387-.204.94m9.823 4.623q-1.144 0-1.964-.502a3.35 3.35 0 0 1-1.258-1.387q-.438-.89-.438-2.048 0-1.163.448-2.054a3.34 3.34 0 0 1 1.263-1.392q.82-.502 1.939-.502.93 0 1.645.343.72.338 1.149.96.427.615.487 1.441h-1.72a1.64 1.64 0 0 0-.498-.92q-.387-.372-1.039-.372-.55 0-.969.298-.418.294-.651.845-.23.553-.229 1.323q0 .78.229 1.342.228.557.641.86.417.299.98.298.398 0 .71-.149.32-.153.532-.442.214-.288.294-.701h1.72a3 3 0 0 1-.478 1.437q-.413.621-1.123.974-.71.348-1.67.348m7.889 0q-1.148 0-1.983-.477a3.23 3.23 0 0 1-1.278-1.362q-.448-.886-.448-2.083 0-1.178.448-2.069a3.4 3.4 0 0 1 1.263-1.392q.81-.502 1.904-.502.706 0 1.332.229.631.223 1.114.696.488.473.765 1.203.279.726.279 1.73v.552h-6.26v-1.213h4.535a1.94 1.94 0 0 0-.224-.92 1.63 1.63 0 0 0-.611-.641 1.7 1.7 0 0 0-.905-.234q-.552 0-.97.269a1.85 1.85 0 0 0-.651.696q-.228.427-.234.94v1.058q0 .666.244 1.144.243.472.681.726.438.248 1.024.248.393 0 .711-.11.318-.113.552-.332a1.4 1.4 0 0 0 .353-.542l1.68.189a2.6 2.6 0 0 1-.606 1.163 2.96 2.96 0 0 1-1.134.766q-.69.268-1.581.268m10.714-5.767-1.641.18a1.3 1.3 0 0 0-.243-.468 1.2 1.2 0 0 0-.458-.353 1.7 1.7 0 0 0-.706-.134q-.561 0-.944.243-.378.243-.373.632a.66.66 0 0 0 .244.541q.253.21.835.344l1.302.278q1.084.234 1.611.74.533.508.537 1.328-.005.72-.423 1.273-.412.547-1.148.855t-1.69.308q-1.402 0-2.257-.587-.856-.59-1.02-1.645l1.755-.17q.12.519.507.781.388.264 1.01.264.64 0 1.029-.264.393-.263.393-.65q0-.33-.254-.543-.248-.213-.776-.328l-1.302-.273q-1.099-.23-1.626-.77-.526-.548-.522-1.383-.005-.705.383-1.223.393-.522 1.089-.805.7-.29 1.616-.289 1.342 0 2.112.572.775.571.96 1.546"
14
- />
15
- </Svg>
16
- );
17
- export default SvgUserpreferences;
@@ -1,12 +0,0 @@
1
- // SVG Icon Components - Auto-generated from @svgr/cli with React Native support
2
- export { default as EnochE } from './EnochE';
3
- export { default as Basicproficon } from './Basicproficon';
4
- export { default as Basicprofile } from './Basicprofile';
5
- export { default as Contenticon } from './Contenticon';
6
- export { default as Contentanalysis } from './Contentanalysis';
7
- export { default as Personalityicon } from './Personalityicon';
8
- export { default as Personalityprofile } from './Personalityprofile';
9
- export { default as Personalitytraits } from './Personalitytraits';
10
- export { default as Userpreferences } from './Userpreferences';
11
- export { default as Checkbox } from './Checkbox';
12
- export { default as Checkmark } from './Checkmark';
package/src/config/api.ts DELETED
@@ -1,25 +0,0 @@
1
- /**
2
- * API Configuration for Onairos SDK
3
- */
4
-
5
- export const API_CONFIG = {
6
- BASE_URL: 'https://api.onairos.com',
7
- ENDPOINTS: {
8
- AUTH: '/auth',
9
- USER: '/user',
10
- CONNECTIONS: '/connections',
11
- TRAINING: '/training',
12
- OAUTH: '/oauth',
13
- },
14
- TIMEOUT: 30000,
15
- };
16
-
17
- export const getApiHeaders = () => ({
18
- 'Content-Type': 'application/json',
19
- 'Accept': 'application/json',
20
- });
21
-
22
- export const getAuthHeaders = (token?: string) => ({
23
- ...getApiHeaders(),
24
- ...(token && { 'Authorization': `Bearer ${token}` }),
25
- });
@@ -1,393 +0,0 @@
1
- import React, { createContext, useState, useEffect, useContext } from 'react';
2
- import AsyncStorage from '@react-native-async-storage/async-storage';
3
- import { User } from '../types/index';
4
- import {
5
- saveAuthToken,
6
- getAuthToken,
7
- removeAuthToken,
8
- verifyToken,
9
- getUserProfile,
10
- authenticateWithApple,
11
- authenticateWithOnairos,
12
- authenticateWithOnairosSignIn,
13
- updateUserOnboardedStatus
14
- } from '../services/authService';
15
- import {
16
- saveUserProgress,
17
- saveAuthState,
18
- getAuthState,
19
- clearUserData,
20
- getResumeTarget,
21
- markStepCompleted,
22
- updateLastScreen,
23
- isReturningUser,
24
- markEventPageReached,
25
- hasEventAccessToken,
26
- STORAGE_KEYS
27
- } from '../services/storageService';
28
-
29
- interface AuthContextType {
30
- user: User | null;
31
- isLoading: boolean;
32
- hasCompletedOnboarding: boolean;
33
- login: (userData: User) => void;
34
- logout: () => void;
35
- deleteAccount: () => Promise<void>;
36
- completeOnboarding: (userData: Partial<User>) => void;
37
- updateUser: (userData: Partial<User>) => void;
38
- appleSignIn: (appleAuthData: any) => Promise<User>;
39
- onairosSignIn: (onairosAuthData: { token: string; email: string }) => Promise<User>;
40
- isAuthenticated: boolean;
41
- updateOnboardedStatus: () => Promise<void>;
42
- // New methods for progress tracking
43
- getResumeTarget: () => Promise<{ screen: string; params?: any }>;
44
- markStepCompleted: (step: string) => Promise<void>;
45
- updateLastScreen: (screen: string, params?: any) => Promise<void>;
46
- isReturningUser: () => Promise<boolean>;
47
- // New methods for event access token
48
- markEventPageReached: (eventData?: any) => Promise<void>;
49
- hasEventAccessToken: () => Promise<boolean>;
50
- }
51
-
52
- const AuthContext = createContext<AuthContextType | undefined>(undefined);
53
-
54
- export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
55
- const [user, setUser] = useState<User | null>(null);
56
- const [isLoading, setIsLoading] = useState(true);
57
- const [hasCompletedOnboarding, setHasCompletedOnboarding] = useState(false);
58
- const [isAuthenticated, setIsAuthenticated] = useState(false);
59
-
60
- useEffect(() => {
61
- // Check if user is already logged in
62
- const loadStoredUser = async () => {
63
- try {
64
- // PRIORITY 1: Check if user has completed onboarding (for release mode reliability)
65
- const hasEventToken = await hasEventAccessToken();
66
- const storedUser = await AsyncStorage.getItem('user');
67
-
68
- if (hasEventToken && storedUser) {
69
- console.log('🎯 Found event access token - user has completed onboarding, authentication confirmed');
70
- setUser(JSON.parse(storedUser));
71
- setIsAuthenticated(true);
72
- setHasCompletedOnboarding(true);
73
- setIsLoading(false);
74
- return; // Skip network verification for completed users
75
- }
76
-
77
- // PRIORITY 2: Check if we have a JWT token for users still in onboarding
78
- const token = await getAuthToken();
79
-
80
- if (token) {
81
- // For users with tokens but no completion token, try network verification
82
- // but don't fail if network is unreachable (important for release mode)
83
- let isValid = false;
84
- try {
85
- isValid = await verifyToken();
86
- } catch (networkError) {
87
- console.warn('🌐 Network verification failed, using local token validation:', networkError);
88
- // In release mode, network might be slow/unreliable
89
- // If we have a token and stored user, trust the local state
90
- if (storedUser) {
91
- console.log('💾 Network unreachable, trusting local authentication state');
92
- isValid = true; // Trust local state when network fails
93
- }
94
- }
95
-
96
- if (isValid) {
97
- // Token is valid (or we're trusting local state), get user data
98
- if (storedUser) {
99
- setUser(JSON.parse(storedUser));
100
- setIsAuthenticated(true);
101
- } else {
102
- // If user data is not in AsyncStorage, try to fetch it
103
- try {
104
- const userData = await getUserProfile();
105
- await AsyncStorage.setItem('user', JSON.stringify(userData));
106
- setUser(userData);
107
- setIsAuthenticated(true);
108
- } catch (profileError) {
109
- console.error('Failed to fetch user profile:', profileError);
110
- // Only remove token if we're sure it's invalid (not just network issues)
111
- const errorMessage = profileError instanceof Error ? profileError.message : String(profileError);
112
- if (errorMessage.includes('401') || errorMessage.includes('403')) {
113
- await removeAuthToken();
114
- } else {
115
- console.log('🌐 Profile fetch failed (likely network), keeping authentication state');
116
- // Create fallback user for offline scenarios
117
- if (token) {
118
- const fallbackUser = {
119
- id: 'offline_user',
120
- name: 'Onairos User',
121
- email: 'user@onairos.com',
122
- onboarded: false
123
- };
124
- await AsyncStorage.setItem('user', JSON.stringify(fallbackUser));
125
- setUser(fallbackUser);
126
- setIsAuthenticated(true);
127
- }
128
- }
129
- }
130
- }
131
- } else {
132
- // Token verification definitely failed - remove it
133
- await removeAuthToken();
134
- }
135
- }
136
-
137
- const onboardingCompleted = await AsyncStorage.getItem('onboardingCompleted');
138
- if (onboardingCompleted === 'true') {
139
- setHasCompletedOnboarding(true);
140
- }
141
- } catch (error) {
142
- console.error('Failed to load authentication state:', error);
143
- } finally {
144
- setIsLoading(false);
145
- }
146
- };
147
-
148
- loadStoredUser();
149
- }, []);
150
-
151
- const login = async (userData: User) => {
152
- try {
153
- // Ensure onboarded is set to false for new users
154
- const userWithOnboarded = {
155
- ...userData,
156
- onboarded: false // Always force camera flow for new logins
157
- };
158
-
159
- await AsyncStorage.setItem('user', JSON.stringify(userWithOnboarded));
160
- setUser(userWithOnboarded);
161
- setIsAuthenticated(true);
162
-
163
- // Save auth state and mark authentication step as completed
164
- await saveAuthState({
165
- isAuthenticated: true,
166
- authMethod: userData.email?.includes('apple') ? 'apple' : 'onairos',
167
- hasValidToken: true,
168
- userEmail: userData.email,
169
- userName: userData.name
170
- });
171
-
172
- await markStepCompleted('authentication');
173
-
174
- console.log('User logged in with onboarded=false:', userWithOnboarded);
175
- } catch (error) {
176
- console.error('Failed to save user data:', error);
177
- }
178
- };
179
-
180
- // Handle Apple Sign-In
181
- const appleSignIn = async (appleAuthData: any): Promise<User> => {
182
- try {
183
- setIsLoading(true);
184
-
185
- // Call the API to authenticate with Apple
186
- const authResponse = await authenticateWithApple(appleAuthData);
187
-
188
- // Save the JWT token
189
- await saveAuthToken(authResponse.token);
190
-
191
- // CRITICAL: Save auth method as 'apple' for proper button logic
192
- await AsyncStorage.setItem('auth_method', 'apple');
193
-
194
- // Save Onairos connection status from backend response
195
- if (authResponse.onairos) {
196
- await AsyncStorage.setItem('hasConnectedOnairos', authResponse.onairos.hasConnectedOnairos.toString());
197
- if (authResponse.onairos.onairosUserId) {
198
- await AsyncStorage.setItem('onairosUserId', authResponse.onairos.onairosUserId);
199
- }
200
- if (authResponse.onairos.lastConnectedAt) {
201
- await AsyncStorage.setItem('lastConnectedAt', authResponse.onairos.lastConnectedAt);
202
- }
203
- console.log('🔗 Stored Onairos connection status:', authResponse.onairos.hasConnectedOnairos);
204
- } else {
205
- // Default to false if no Onairos info provided
206
- await AsyncStorage.setItem('hasConnectedOnairos', 'false');
207
- console.log('🔗 No Onairos connection info from backend, defaulting to false');
208
- }
209
-
210
- // Create user object from response
211
- const userData: User = {
212
- id: authResponse.user.id,
213
- name: authResponse.user.name || 'Onairos User',
214
- email: authResponse.user.email,
215
- profilePicture: authResponse.user.profilePicture,
216
- onboarded: false // Default to false for new Apple sign-ins
217
- };
218
-
219
- // Save user data to AsyncStorage and update state
220
- await AsyncStorage.setItem('user', JSON.stringify(userData));
221
- setUser(userData);
222
- setIsAuthenticated(true);
223
-
224
- console.log('🍎 Apple sign-in completed - auth_method set to "apple"');
225
-
226
- return userData;
227
- } catch (error) {
228
- console.error('Apple sign-in failed:', error);
229
- throw error;
230
- } finally {
231
- setIsLoading(false);
232
- }
233
- };
234
-
235
- // Handle Onairos Sign-In (similar to Apple)
236
- const onairosSignIn = async (onairosAuthData: { token: string; email: string }): Promise<User> => {
237
- try {
238
- setIsLoading(true);
239
-
240
- // Call the API to authenticate with Onairos
241
- const authResponse = await authenticateWithOnairos(onairosAuthData);
242
-
243
- // Save the JWT token
244
- await saveAuthToken(authResponse.token);
245
-
246
- // CRITICAL: Save auth method as 'onairos' for proper button logic
247
- await AsyncStorage.setItem('auth_method', 'onairos');
248
-
249
- // Create user object from response
250
- const userData: User = {
251
- id: authResponse.user.id,
252
- name: authResponse.user.name || 'Onairos User',
253
- email: authResponse.user.email,
254
- profilePicture: authResponse.user.profilePicture,
255
- onboarded: false // Default to false for new Onairos sign-ins
256
- };
257
-
258
- // Save user data to AsyncStorage and update state
259
- await AsyncStorage.setItem('user', JSON.stringify(userData));
260
- setUser(userData);
261
- setIsAuthenticated(true);
262
-
263
- console.log('🔑 Onairos sign-in completed - auth_method set to "onairos"');
264
-
265
- return userData;
266
- } catch (error) {
267
- console.error('Onairos sign-in failed:', error);
268
- throw error;
269
- } finally {
270
- setIsLoading(false);
271
- }
272
- };
273
-
274
- const logout = async () => {
275
- try {
276
- // Clear all user data using the new storage service
277
- await clearUserData();
278
- setUser(null);
279
- setIsAuthenticated(false);
280
- } catch (error) {
281
- console.error('Failed to remove user data:', error);
282
- }
283
- };
284
-
285
- const completeOnboarding = async (userData: Partial<User>) => {
286
- try {
287
- // Update user data
288
- const updatedUser = { ...user, ...userData };
289
- await AsyncStorage.setItem('user', JSON.stringify(updatedUser));
290
- setUser(updatedUser as User);
291
-
292
- // Update onboarded status on backend
293
- await updateOnboardedStatus();
294
- } catch (error) {
295
- console.error('Failed to complete onboarding:', error);
296
- throw error;
297
- }
298
- };
299
-
300
- const updateUser = async (userData: Partial<User>) => {
301
- try {
302
- if (!user) return;
303
- const updatedUser = { ...user, ...userData };
304
- await AsyncStorage.setItem('user', JSON.stringify(updatedUser));
305
- setUser(updatedUser);
306
- } catch (error) {
307
- console.error('Failed to update user data:', error);
308
- }
309
- };
310
-
311
- // Update user onboarded status
312
- const updateOnboardedStatus = async (): Promise<void> => {
313
- try {
314
- setIsLoading(true);
315
-
316
- // Call the API to update onboarded status
317
- await updateUserOnboardedStatus();
318
-
319
- // Update local user data
320
- if (user) {
321
- const updatedUser = { ...user, onboarded: true };
322
- await AsyncStorage.setItem('user', JSON.stringify(updatedUser));
323
- setUser(updatedUser);
324
- }
325
- } catch (error) {
326
- console.error('Failed to update onboarded status:', error);
327
- throw error;
328
- } finally {
329
- setIsLoading(false);
330
- }
331
- };
332
-
333
- const deleteAccount = async () => {
334
- try {
335
- // In a real app, you would make an API call to delete the user account on the server
336
- // For example: await api.deleteUser(user.id);
337
-
338
- // Remove user data from AsyncStorage
339
- await AsyncStorage.removeItem('user');
340
-
341
- // Remove JWT token
342
- await removeAuthToken();
343
-
344
- // Clear any other user-related data from AsyncStorage
345
- await AsyncStorage.removeItem('onboardingCompleted');
346
-
347
- // Update state
348
- setUser(null);
349
- setIsAuthenticated(false);
350
- setHasCompletedOnboarding(false);
351
-
352
- console.log('Account deleted successfully');
353
- } catch (error) {
354
- console.error('Failed to delete account:', error);
355
- throw error;
356
- }
357
- };
358
-
359
- return (
360
- <AuthContext.Provider value={{
361
- user,
362
- isLoading,
363
- hasCompletedOnboarding,
364
- login,
365
- logout,
366
- deleteAccount,
367
- completeOnboarding,
368
- updateUser,
369
- appleSignIn,
370
- onairosSignIn,
371
- isAuthenticated,
372
- updateOnboardedStatus,
373
- // Progress tracking methods
374
- getResumeTarget,
375
- markStepCompleted,
376
- updateLastScreen,
377
- isReturningUser,
378
- // Event access token methods
379
- markEventPageReached,
380
- hasEventAccessToken
381
- }}>
382
- {children}
383
- </AuthContext.Provider>
384
- );
385
- };
386
-
387
- export const useAuth = (): AuthContextType => {
388
- const context = useContext(AuthContext);
389
- if (context === undefined) {
390
- throw new Error('useAuth must be used within an AuthProvider');
391
- }
392
- return context;
393
- };
@@ -1,139 +0,0 @@
1
- import { useState, useEffect, useCallback } from 'react';
2
- import {
3
- ConnectedAccount,
4
- getConnectedAccountsSmart,
5
- // Keep legacy imports for any edge cases
6
- getConnectedAccountsByUsername,
7
- getConnectedAccountsByEmail,
8
- getConnectedAccountsByUserId
9
- } from '../services/connectedAccountsService';
10
- import { useAuth } from '../context/AuthContext';
11
-
12
- export interface UseConnectedAccountsReturn {
13
- connectedAccounts: ConnectedAccount[];
14
- isLoading: boolean;
15
- error: string | null;
16
- refreshAccounts: () => Promise<void>;
17
- addAccount: (platform: string, username: string) => void;
18
- removeAccount: (platform: string) => void;
19
- }
20
-
21
- export const useConnectedAccounts = (): UseConnectedAccountsReturn => {
22
- const { user } = useAuth();
23
- const [connectedAccounts, setConnectedAccounts] = useState<ConnectedAccount[]>([]);
24
- const [isLoading, setIsLoading] = useState<boolean>(true);
25
- const [error, setError] = useState<string | null>(null);
26
-
27
- const fetchConnectedAccounts = useCallback(async () => {
28
- if (!user) {
29
- console.log('🔍 No user available for fetching connected accounts');
30
- setIsLoading(false);
31
- return;
32
- }
33
-
34
- try {
35
- setIsLoading(true);
36
- setError(null);
37
-
38
- console.log('🚀 [HOOK] Starting connected accounts fetch with new smart API...');
39
- console.log('🚀 [HOOK] User info available:', {
40
- email: user.email,
41
- id: user.id,
42
- name: user.name
43
- });
44
-
45
- // Use the new smart API function - makes only ONE request with intelligent fallbacks
46
- const accounts = await getConnectedAccountsSmart(
47
- user.email, // Primary identifier (email)
48
- user.id, // Secondary identifier (user ID)
49
- user.name // Tertiary identifier (username)
50
- );
51
-
52
- console.log(`✅ [HOOK] Connected accounts loaded via smart API: ${accounts.length} accounts`);
53
- setConnectedAccounts(accounts);
54
-
55
- } catch (err) {
56
- console.error('❌ [HOOK] Error fetching connected accounts:', err);
57
- setError('Failed to load connected accounts');
58
- } finally {
59
- setIsLoading(false);
60
- }
61
- }, [user]);
62
-
63
- const refreshAccounts = useCallback(async () => {
64
- console.log('🔄 [HOOK] Refreshing connected accounts...');
65
- await fetchConnectedAccounts();
66
- }, [fetchConnectedAccounts]);
67
-
68
- const addAccount = useCallback((platform: string, username: string) => {
69
- // Create a temporary URL for the account
70
- const tempUrl = `https://${platform.toLowerCase()}.com/${username}`;
71
-
72
- const newAccount: ConnectedAccount = {
73
- platform,
74
- username,
75
- url: tempUrl,
76
- };
77
-
78
- setConnectedAccounts(prev => {
79
- // Check if account already exists
80
- const exists = prev.some(acc =>
81
- acc.platform.toLowerCase() === platform.toLowerCase()
82
- );
83
-
84
- if (exists) {
85
- // Update existing account
86
- return prev.map(acc =>
87
- acc.platform.toLowerCase() === platform.toLowerCase()
88
- ? newAccount
89
- : acc
90
- );
91
- } else {
92
- // Add new account
93
- return [...prev, newAccount];
94
- }
95
- });
96
-
97
- console.log('✅ [HOOK] Account added locally:', newAccount);
98
-
99
- // TODO: In a real implementation, you would also send this to your backend
100
- // Example:
101
- // try {
102
- // await saveConnectedAccount(user.id, platform, username);
103
- // } catch (error) {
104
- // console.error('Failed to save account to backend:', error);
105
- // // Optionally revert the local change
106
- // }
107
- }, []);
108
-
109
- const removeAccount = useCallback((platform: string) => {
110
- setConnectedAccounts(prev =>
111
- prev.filter(acc => acc.platform.toLowerCase() !== platform.toLowerCase())
112
- );
113
-
114
- console.log('✅ [HOOK] Account removed locally:', platform);
115
-
116
- // TODO: In a real implementation, you would also remove this from your backend
117
- // Example:
118
- // try {
119
- // await removeConnectedAccount(user.id, platform);
120
- // } catch (error) {
121
- // console.error('Failed to remove account from backend:', error);
122
- // // Optionally revert the local change
123
- // }
124
- }, []);
125
-
126
- // Fetch accounts when component mounts or user changes
127
- useEffect(() => {
128
- fetchConnectedAccounts();
129
- }, [fetchConnectedAccounts]);
130
-
131
- return {
132
- connectedAccounts,
133
- isLoading,
134
- error,
135
- refreshAccounts,
136
- addAccount,
137
- removeAccount,
138
- };
139
- };