@onairos/react-native 3.4.0 → 3.5.4

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 (546) hide show
  1. package/README.md +62 -13
  2. package/lib/commonjs/api/index.js +9 -145
  3. package/lib/commonjs/assets/animations/loaderani.json +1 -0
  4. package/lib/commonjs/assets/animations/persona-animation.json +1 -0
  5. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  7. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  8. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  9. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  10. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  11. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  12. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  13. package/lib/commonjs/assets/icons/chatgpt.png +0 -0
  14. package/lib/commonjs/assets/icons/claude.png +0 -0
  15. package/lib/commonjs/assets/icons/gemini.png +0 -0
  16. package/lib/commonjs/assets/icons/grok.png +0 -0
  17. package/lib/commonjs/assets/images/Checkbox.svg +3 -0
  18. package/lib/commonjs/assets/images/EnochE.svg +19 -0
  19. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  20. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  21. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  22. package/lib/commonjs/assets/images/Gmail.png +0 -0
  23. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  24. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  25. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  26. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
  27. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
  28. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  29. package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
  30. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  31. package/lib/commonjs/assets/images/arrow.svg +20 -0
  32. package/lib/commonjs/assets/images/basicproficon.svg +43 -0
  33. package/lib/commonjs/assets/images/basicprofile.svg +3 -0
  34. package/lib/commonjs/assets/images/chatgpt.png +0 -0
  35. package/lib/commonjs/assets/images/checkmark.svg +4 -0
  36. package/lib/commonjs/assets/images/claude.png +0 -0
  37. package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
  38. package/lib/commonjs/assets/images/contenticon.svg +23 -0
  39. package/lib/commonjs/assets/images/gemini.png +0 -0
  40. package/lib/commonjs/assets/images/grok.png +0 -0
  41. package/lib/commonjs/assets/images/persona1.png +0 -0
  42. package/lib/commonjs/assets/images/persona2.png +0 -0
  43. package/lib/commonjs/assets/images/persona3.png +0 -0
  44. package/lib/commonjs/assets/images/persona4.png +0 -0
  45. package/lib/commonjs/assets/images/persona5.png +0 -0
  46. package/lib/commonjs/assets/images/personalityicon.svg +18 -0
  47. package/lib/commonjs/assets/images/x-close.svg +3 -0
  48. package/lib/commonjs/components/BodyText.js +9 -0
  49. package/lib/commonjs/components/BrandMark.js +10 -0
  50. package/lib/commonjs/components/CodeInput.js +9 -0
  51. package/lib/commonjs/components/EmailInput.js +8 -0
  52. package/lib/commonjs/components/GoogleButton.js +9 -0
  53. package/lib/commonjs/components/HeadingGroup.js +9 -0
  54. package/lib/commonjs/components/LLMDataInputModal.js +14 -0
  55. package/lib/commonjs/components/ModalHeader.js +9 -0
  56. package/lib/commonjs/components/ModalSheet.js +9 -0
  57. package/lib/commonjs/components/Onairos.js +14 -374
  58. package/lib/commonjs/components/OnairosButton.js +13 -309
  59. package/lib/commonjs/components/OnairosSignInButton.js +12 -0
  60. package/lib/commonjs/components/Overlay.js +13 -483
  61. package/lib/commonjs/components/PersonaImage.js +10 -0
  62. package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
  63. package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
  64. package/lib/commonjs/components/PinCreationScreen.js +12 -0
  65. package/lib/commonjs/components/PinInput.js +9 -302
  66. package/lib/commonjs/components/PlatformConnectorsStep.js +22 -0
  67. package/lib/commonjs/components/PlatformList.js +10 -137
  68. package/lib/commonjs/components/PlatformToggle.js +9 -0
  69. package/lib/commonjs/components/PrimaryButton.js +10 -0
  70. package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
  71. package/lib/commonjs/components/SignInStep.js +12 -0
  72. package/lib/commonjs/components/UniversalOnboarding.js +29 -1702
  73. package/lib/commonjs/components/VerificationStep.js +11 -0
  74. package/lib/commonjs/components/WelcomeScreen.js +21 -0
  75. package/lib/commonjs/components/icons/Basicproficon.js +8 -0
  76. package/lib/commonjs/components/icons/Basicprofile.js +8 -0
  77. package/lib/commonjs/components/icons/Checkbox.js +8 -0
  78. package/lib/commonjs/components/icons/Checkmark.js +8 -0
  79. package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
  80. package/lib/commonjs/components/icons/Contenticon.js +8 -0
  81. package/lib/commonjs/components/icons/EnochE.js +8 -0
  82. package/lib/commonjs/components/icons/Personalityicon.js +8 -0
  83. package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
  84. package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
  85. package/lib/commonjs/components/icons/Userpreferences.js +8 -0
  86. package/lib/commonjs/components/icons/index.js +17 -0
  87. package/lib/commonjs/components/onboarding/OAuthWebView.js +14 -827
  88. package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
  89. package/lib/commonjs/components/onboarding/PinInput.js +10 -283
  90. package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
  91. package/lib/commonjs/config/api.js +7 -0
  92. package/lib/commonjs/constants/index.js +7 -83
  93. package/lib/commonjs/context/AuthContext.js +10 -0
  94. package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
  95. package/lib/commonjs/hooks/useConnections.js +8 -159
  96. package/lib/commonjs/hooks/useCredentials.js +10 -177
  97. package/lib/commonjs/hooks/useUserConnections.js +10 -0
  98. package/lib/commonjs/index.js +35 -106
  99. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +31 -38
  100. package/lib/commonjs/services/apiClient.js +8 -0
  101. package/lib/commonjs/services/apiKeyService.js +9 -946
  102. package/lib/commonjs/services/authService.js +10 -0
  103. package/lib/commonjs/services/biometricPinService.js +8 -0
  104. package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
  105. package/lib/commonjs/services/chatGPTConversationService.js +9 -0
  106. package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
  107. package/lib/commonjs/services/claudeConversationService.js +9 -0
  108. package/lib/commonjs/services/connectedAccountsService.js +10 -0
  109. package/lib/commonjs/services/googleAuthService.js +11 -0
  110. package/lib/commonjs/services/imageCompressionService.js +7 -0
  111. package/lib/commonjs/services/jwtStorageService.js +7 -0
  112. package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
  113. package/lib/commonjs/services/linkedinProfileService.js +9 -0
  114. package/lib/commonjs/services/linkedinScrapingService.js +8 -0
  115. package/lib/commonjs/services/llmDataStorage.js +8 -0
  116. package/lib/commonjs/services/mobileTrainingService.js +8 -0
  117. package/lib/commonjs/services/oauthService.js +11 -390
  118. package/lib/commonjs/services/pinEncryptionService.js +8 -0
  119. package/lib/commonjs/services/pinStorageUtils.js +7 -0
  120. package/lib/commonjs/services/platformAuthService.js +12 -1067
  121. package/lib/commonjs/services/storageService.js +8 -0
  122. package/lib/commonjs/services/trainingApiHelpers.js +7 -0
  123. package/lib/commonjs/services/userConnectionsService.js +10 -0
  124. package/lib/commonjs/services/youtubeMigrationService.js +10 -0
  125. package/lib/commonjs/theme/index.js +7 -0
  126. package/lib/commonjs/types/ambient.d.js +1 -2
  127. package/lib/commonjs/types/declarations.d.js +1 -2
  128. package/lib/commonjs/types/index.js +1 -6
  129. package/lib/commonjs/types/node-fix.d.js +1 -2
  130. package/lib/commonjs/types/node-override.d.js +1 -2
  131. package/lib/commonjs/types/opacity.d.js +1 -2
  132. package/lib/commonjs/types.js +1 -14
  133. package/lib/commonjs/utils/Portal.js +8 -98
  134. package/lib/commonjs/utils/api.js +9 -129
  135. package/lib/commonjs/utils/assetRegistry.js +33 -0
  136. package/lib/commonjs/utils/auth.js +9 -111
  137. package/lib/commonjs/utils/crypto.js +8 -62
  138. package/lib/commonjs/utils/debugHelper.js +1 -64
  139. package/lib/commonjs/utils/encryption.js +7 -76
  140. package/lib/commonjs/utils/eventUtils.js +1 -0
  141. package/lib/commonjs/utils/haptics.js +9 -0
  142. package/lib/commonjs/utils/imagePreloader.js +1 -0
  143. package/lib/commonjs/utils/networkDiagnostics.js +8 -0
  144. package/lib/commonjs/utils/onairosApi.js +9 -350
  145. package/lib/commonjs/utils/programmaticFlow.js +9 -117
  146. package/lib/commonjs/utils/retryHelper.js +1 -220
  147. package/lib/commonjs/utils/secureStorage.js +10 -349
  148. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
  149. package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
  150. package/lib/commonjs/utils/webviewScripts/index.js +9 -0
  151. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
  152. package/lib/module/api/index.js +1 -139
  153. package/lib/module/assets/animations/loaderani.json +1 -0
  154. package/lib/module/assets/animations/persona-animation.json +1 -0
  155. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  156. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  157. package/lib/module/assets/icons/Facebookicon.png +0 -0
  158. package/lib/module/assets/icons/Gmail.png +0 -0
  159. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  160. package/lib/module/assets/icons/Redditicon.png +0 -0
  161. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  162. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  163. package/lib/module/assets/icons/chatgpt.png +0 -0
  164. package/lib/module/assets/icons/claude.png +0 -0
  165. package/lib/module/assets/icons/farcaster.png +0 -0
  166. package/lib/module/assets/icons/gemini.png +0 -0
  167. package/lib/module/assets/icons/grok.png +0 -0
  168. package/lib/module/assets/icons/instagram.png +0 -0
  169. package/lib/module/assets/icons/pinterest.png +0 -0
  170. package/lib/module/assets/icons/swerv_logo.png +0 -0
  171. package/lib/module/assets/icons/twitter.jpg +0 -0
  172. package/lib/module/assets/images/Checkbox.svg +3 -0
  173. package/lib/module/assets/images/EnochE.svg +19 -0
  174. package/lib/module/assets/images/Enochicon1.png +0 -0
  175. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  176. package/lib/module/assets/images/Facebookicon.png +0 -0
  177. package/lib/module/assets/images/Gmail.png +0 -0
  178. package/lib/module/assets/images/Googlelogo.png +0 -0
  179. package/lib/module/assets/images/Linkedinicon.png +0 -0
  180. package/lib/module/assets/images/Onairoslogo.png +0 -0
  181. package/lib/module/assets/images/Personalityprofile.svg +3 -0
  182. package/lib/module/assets/images/Personalitytraits.svg +3 -0
  183. package/lib/module/assets/images/Redditicon.png +0 -0
  184. package/lib/module/assets/images/Userpreferences.svg +3 -0
  185. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  186. package/lib/module/assets/images/arrow.svg +20 -0
  187. package/lib/module/assets/images/basicproficon.svg +43 -0
  188. package/lib/module/assets/images/basicprofile.svg +3 -0
  189. package/lib/module/assets/images/chatgpt.png +0 -0
  190. package/lib/module/assets/images/checkmark.svg +4 -0
  191. package/lib/module/assets/images/claude.png +0 -0
  192. package/lib/module/assets/images/contentanalysis.svg +3 -0
  193. package/lib/module/assets/images/contenticon.svg +23 -0
  194. package/lib/module/assets/images/gemini.png +0 -0
  195. package/lib/module/assets/images/grok.png +0 -0
  196. package/lib/module/assets/images/persona1.png +0 -0
  197. package/lib/module/assets/images/persona2.png +0 -0
  198. package/lib/module/assets/images/persona3.png +0 -0
  199. package/lib/module/assets/images/persona4.png +0 -0
  200. package/lib/module/assets/images/persona5.png +0 -0
  201. package/lib/module/assets/images/personalityicon.svg +18 -0
  202. package/lib/module/assets/images/x-close.svg +3 -0
  203. package/lib/module/components/BodyText.js +1 -0
  204. package/lib/module/components/BrandMark.js +1 -0
  205. package/lib/module/components/CodeInput.js +1 -0
  206. package/lib/module/components/EmailInput.js +1 -0
  207. package/lib/module/components/GoogleButton.js +1 -0
  208. package/lib/module/components/HeadingGroup.js +1 -0
  209. package/lib/module/components/LLMDataInputModal.js +8 -0
  210. package/lib/module/components/ModalHeader.js +1 -0
  211. package/lib/module/components/ModalSheet.js +1 -0
  212. package/lib/module/components/Onairos.js +1 -367
  213. package/lib/module/components/OnairosButton.js +1 -302
  214. package/lib/module/components/OnairosSignInButton.js +1 -0
  215. package/lib/module/components/Overlay.js +1 -474
  216. package/lib/module/components/PersonaImage.js +1 -0
  217. package/lib/module/components/PersonaLoadingScreen.js +1 -0
  218. package/lib/module/components/PersonalizationConsentScreen.js +1 -0
  219. package/lib/module/components/PinCreationScreen.js +1 -0
  220. package/lib/module/components/PinInput.js +1 -293
  221. package/lib/module/components/PlatformConnectorsStep.js +1 -0
  222. package/lib/module/components/PlatformList.js +1 -129
  223. package/lib/module/components/PlatformToggle.js +1 -0
  224. package/lib/module/components/PrimaryButton.js +1 -0
  225. package/lib/module/components/SignInMatchAnimation.js +1 -0
  226. package/lib/module/components/SignInStep.js +1 -0
  227. package/lib/module/components/UniversalOnboarding.js +1 -1693
  228. package/lib/module/components/VerificationStep.js +1 -0
  229. package/lib/module/components/WelcomeScreen.js +1 -0
  230. package/lib/module/components/icons/Basicproficon.js +1 -0
  231. package/lib/module/components/icons/Basicprofile.js +1 -0
  232. package/lib/module/components/icons/Checkbox.js +1 -0
  233. package/lib/module/components/icons/Checkmark.js +1 -0
  234. package/lib/module/components/icons/Contentanalysis.js +1 -0
  235. package/lib/module/components/icons/Contenticon.js +1 -0
  236. package/lib/module/components/icons/EnochE.js +1 -0
  237. package/lib/module/components/icons/Personalityicon.js +1 -0
  238. package/lib/module/components/icons/Personalityprofile.js +1 -0
  239. package/lib/module/components/icons/Personalitytraits.js +1 -0
  240. package/lib/module/components/icons/Userpreferences.js +1 -0
  241. package/lib/module/components/icons/index.js +1 -0
  242. package/lib/module/components/onboarding/OAuthWebView.js +1 -818
  243. package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
  244. package/lib/module/components/onboarding/PinInput.js +1 -274
  245. package/lib/module/components/onboarding/PlatformConnector.js +1 -240
  246. package/lib/module/config/api.js +1 -0
  247. package/lib/module/constants/index.js +1 -77
  248. package/lib/module/context/AuthContext.js +1 -0
  249. package/lib/module/hooks/useConnectedAccounts.js +1 -0
  250. package/lib/module/hooks/useConnections.js +1 -152
  251. package/lib/module/hooks/useCredentials.js +6 -169
  252. package/lib/module/hooks/useUserConnections.js +1 -0
  253. package/lib/module/index.js +1 -32
  254. package/lib/module/services/SDK_API_KEY_VALIDATION.md +31 -38
  255. package/lib/module/services/apiClient.js +1 -0
  256. package/lib/module/services/apiKeyService.js +1 -919
  257. package/lib/module/services/authService.js +1 -0
  258. package/lib/module/services/biometricPinService.js +1 -0
  259. package/lib/module/services/chatGPTConversationExtractor.js +1 -0
  260. package/lib/module/services/chatGPTConversationService.js +1 -0
  261. package/lib/module/services/claudeConversationExtractor.js +1 -0
  262. package/lib/module/services/claudeConversationService.js +1 -0
  263. package/lib/module/services/connectedAccountsService.js +1 -0
  264. package/lib/module/services/googleAuthService.js +1 -0
  265. package/lib/module/services/imageCompressionService.js +1 -0
  266. package/lib/module/services/jwtStorageService.js +1 -0
  267. package/lib/module/services/linkedinDOMExtractor.js +1 -0
  268. package/lib/module/services/linkedinProfileService.js +1 -0
  269. package/lib/module/services/linkedinScrapingService.js +1 -0
  270. package/lib/module/services/llmDataStorage.js +1 -0
  271. package/lib/module/services/mobileTrainingService.js +1 -0
  272. package/lib/module/services/oauthService.js +1 -380
  273. package/lib/module/services/pinEncryptionService.js +7 -0
  274. package/lib/module/services/pinStorageUtils.js +1 -0
  275. package/lib/module/services/platformAuthService.js +1 -1041
  276. package/lib/module/services/storageService.js +1 -0
  277. package/lib/module/services/trainingApiHelpers.js +1 -0
  278. package/lib/module/services/userConnectionsService.js +1 -0
  279. package/lib/module/services/youtubeMigrationService.js +1 -0
  280. package/lib/module/theme/index.js +1 -0
  281. package/lib/module/types.js +1 -10
  282. package/lib/module/utils/Portal.js +1 -90
  283. package/lib/module/utils/api.js +1 -117
  284. package/lib/module/utils/assetRegistry.js +33 -0
  285. package/lib/module/utils/auth.js +1 -99
  286. package/lib/module/utils/crypto.js +1 -54
  287. package/lib/module/utils/debugHelper.js +1 -54
  288. package/lib/module/utils/encryption.js +1 -67
  289. package/lib/module/utils/eventUtils.js +1 -0
  290. package/lib/module/utils/haptics.js +8 -0
  291. package/lib/module/utils/imagePreloader.js +1 -0
  292. package/lib/module/utils/networkDiagnostics.js +1 -0
  293. package/lib/module/utils/onairosApi.js +1 -333
  294. package/lib/module/utils/programmaticFlow.js +1 -111
  295. package/lib/module/utils/retryHelper.js +1 -211
  296. package/lib/module/utils/secureStorage.js +6 -330
  297. package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
  298. package/lib/module/utils/webviewScripts/claude.js +1 -0
  299. package/lib/module/utils/webviewScripts/index.js +1 -0
  300. package/lib/module/utils/webviewScripts/linkedin.js +1 -0
  301. package/package.json +62 -39
  302. package/lib/commonjs/api/index.js.map +0 -1
  303. package/lib/commonjs/assets/images/email.png +0 -0
  304. package/lib/commonjs/assets/images/linkedin.png +0 -0
  305. package/lib/commonjs/assets/images/reddit.png +0 -0
  306. package/lib/commonjs/assets/images/youtube.png +0 -0
  307. package/lib/commonjs/components/DataRequestModal.js +0 -228
  308. package/lib/commonjs/components/DataRequestModal.js.map +0 -1
  309. package/lib/commonjs/components/DataRequestScreen.js +0 -329
  310. package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
  311. package/lib/commonjs/components/EmailVerificationModal.js +0 -320
  312. package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
  313. package/lib/commonjs/components/Onairos.js.map +0 -1
  314. package/lib/commonjs/components/OnairosButton.js.map +0 -1
  315. package/lib/commonjs/components/Overlay.js.map +0 -1
  316. package/lib/commonjs/components/PinInput.js.map +0 -1
  317. package/lib/commonjs/components/PlatformList.js.map +0 -1
  318. package/lib/commonjs/components/TrainingModal.js +0 -717
  319. package/lib/commonjs/components/TrainingModal.js.map +0 -1
  320. package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
  321. package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
  322. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
  323. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
  324. package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
  325. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
  326. package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
  327. package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
  328. package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
  329. package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
  330. package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
  331. package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
  332. package/lib/commonjs/constants/index.js.map +0 -1
  333. package/lib/commonjs/hooks/useConnections.js.map +0 -1
  334. package/lib/commonjs/hooks/useCredentials.js.map +0 -1
  335. package/lib/commonjs/index.js.map +0 -1
  336. package/lib/commonjs/services/apiKeyService.js.map +0 -1
  337. package/lib/commonjs/services/oauthService.js.map +0 -1
  338. package/lib/commonjs/services/platformAuthService.js.map +0 -1
  339. package/lib/commonjs/types/ambient.d.js.map +0 -1
  340. package/lib/commonjs/types/declarations.d.js.map +0 -1
  341. package/lib/commonjs/types/index.d.js.map +0 -1
  342. package/lib/commonjs/types/index.js.map +0 -1
  343. package/lib/commonjs/types/node-fix.d.js.map +0 -1
  344. package/lib/commonjs/types/node-override.d.js.map +0 -1
  345. package/lib/commonjs/types/opacity.d.js.map +0 -1
  346. package/lib/commonjs/types/types.d.js.map +0 -1
  347. package/lib/commonjs/types.js.map +0 -1
  348. package/lib/commonjs/utils/Portal.js.map +0 -1
  349. package/lib/commonjs/utils/api.js.map +0 -1
  350. package/lib/commonjs/utils/auth.js.map +0 -1
  351. package/lib/commonjs/utils/crypto.js.map +0 -1
  352. package/lib/commonjs/utils/debugHelper.js.map +0 -1
  353. package/lib/commonjs/utils/encryption.js.map +0 -1
  354. package/lib/commonjs/utils/onairosApi.js.map +0 -1
  355. package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
  356. package/lib/commonjs/utils/retryHelper.js.map +0 -1
  357. package/lib/commonjs/utils/secureStorage.js.map +0 -1
  358. package/lib/module/api/index.js.map +0 -1
  359. package/lib/module/assets/images/email.png +0 -0
  360. package/lib/module/assets/images/linkedin.png +0 -0
  361. package/lib/module/assets/images/reddit.png +0 -0
  362. package/lib/module/assets/images/youtube.png +0 -0
  363. package/lib/module/components/DataRequestModal.js +0 -220
  364. package/lib/module/components/DataRequestModal.js.map +0 -1
  365. package/lib/module/components/DataRequestScreen.js +0 -321
  366. package/lib/module/components/DataRequestScreen.js.map +0 -1
  367. package/lib/module/components/EmailVerificationModal.js +0 -311
  368. package/lib/module/components/EmailVerificationModal.js.map +0 -1
  369. package/lib/module/components/Onairos.js.map +0 -1
  370. package/lib/module/components/OnairosButton.js.map +0 -1
  371. package/lib/module/components/Overlay.js.map +0 -1
  372. package/lib/module/components/PinInput.js.map +0 -1
  373. package/lib/module/components/PlatformList.js.map +0 -1
  374. package/lib/module/components/TrainingModal.js +0 -708
  375. package/lib/module/components/TrainingModal.js.map +0 -1
  376. package/lib/module/components/UniversalOnboarding.js.map +0 -1
  377. package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
  378. package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
  379. package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
  380. package/lib/module/components/onboarding/PinInput.js.map +0 -1
  381. package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
  382. package/lib/module/components/screens/ConnectorScreen.js +0 -138
  383. package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
  384. package/lib/module/components/screens/LoadingScreen.js +0 -83
  385. package/lib/module/components/screens/LoadingScreen.js.map +0 -1
  386. package/lib/module/components/screens/PinCreationScreen.js +0 -53
  387. package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
  388. package/lib/module/constants/index.js.map +0 -1
  389. package/lib/module/hooks/useConnections.js.map +0 -1
  390. package/lib/module/hooks/useCredentials.js.map +0 -1
  391. package/lib/module/index.js.map +0 -1
  392. package/lib/module/services/apiKeyService.js.map +0 -1
  393. package/lib/module/services/oauthService.js.map +0 -1
  394. package/lib/module/services/platformAuthService.js.map +0 -1
  395. package/lib/module/types/ambient.d.js.map +0 -1
  396. package/lib/module/types/declarations.d.js.map +0 -1
  397. package/lib/module/types/index.d.js.map +0 -1
  398. package/lib/module/types/index.js.map +0 -1
  399. package/lib/module/types/node-fix.d.js.map +0 -1
  400. package/lib/module/types/node-override.d.js.map +0 -1
  401. package/lib/module/types/opacity.d.js.map +0 -1
  402. package/lib/module/types/types.d.js.map +0 -1
  403. package/lib/module/types.js.map +0 -1
  404. package/lib/module/utils/Portal.js.map +0 -1
  405. package/lib/module/utils/api.js.map +0 -1
  406. package/lib/module/utils/auth.js.map +0 -1
  407. package/lib/module/utils/crypto.js.map +0 -1
  408. package/lib/module/utils/debugHelper.js.map +0 -1
  409. package/lib/module/utils/encryption.js.map +0 -1
  410. package/lib/module/utils/onairosApi.js.map +0 -1
  411. package/lib/module/utils/programmaticFlow.js.map +0 -1
  412. package/lib/module/utils/retryHelper.js.map +0 -1
  413. package/lib/module/utils/secureStorage.js.map +0 -1
  414. package/lib/typescript/api/index.d.ts +0 -8
  415. package/lib/typescript/api/index.d.ts.map +0 -1
  416. package/lib/typescript/components/DataRequestModal.d.ts +0 -11
  417. package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
  418. package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
  419. package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
  420. package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
  421. package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
  422. package/lib/typescript/components/Onairos.d.ts +0 -4
  423. package/lib/typescript/components/Onairos.d.ts.map +0 -1
  424. package/lib/typescript/components/OnairosButton.d.ts +0 -12
  425. package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
  426. package/lib/typescript/components/Overlay.d.ts +0 -4
  427. package/lib/typescript/components/Overlay.d.ts.map +0 -1
  428. package/lib/typescript/components/PinInput.d.ts +0 -4
  429. package/lib/typescript/components/PinInput.d.ts.map +0 -1
  430. package/lib/typescript/components/PlatformList.d.ts +0 -4
  431. package/lib/typescript/components/PlatformList.d.ts.map +0 -1
  432. package/lib/typescript/components/TrainingModal.d.ts +0 -4
  433. package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
  434. package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
  435. package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
  436. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
  437. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
  438. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
  439. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
  440. package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
  441. package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
  442. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
  443. package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
  444. package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
  445. package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
  446. package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
  447. package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
  448. package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
  449. package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
  450. package/lib/typescript/constants/index.d.ts +0 -53
  451. package/lib/typescript/constants/index.d.ts.map +0 -1
  452. package/lib/typescript/hooks/useConnections.d.ts +0 -9
  453. package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
  454. package/lib/typescript/hooks/useCredentials.d.ts +0 -9
  455. package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
  456. package/lib/typescript/index.d.ts +0 -18
  457. package/lib/typescript/index.d.ts.map +0 -1
  458. package/lib/typescript/services/apiKeyService.d.ts +0 -132
  459. package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
  460. package/lib/typescript/services/oauthService.d.ts +0 -50
  461. package/lib/typescript/services/oauthService.d.ts.map +0 -1
  462. package/lib/typescript/services/platformAuthService.d.ts +0 -144
  463. package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
  464. package/lib/typescript/types/index.d.ts +0 -231
  465. package/lib/typescript/types/index.d.ts.map +0 -1
  466. package/lib/typescript/types.d.ts +0 -270
  467. package/lib/typescript/types.d.ts.map +0 -1
  468. package/lib/typescript/utils/Portal.d.ts +0 -14
  469. package/lib/typescript/utils/Portal.d.ts.map +0 -1
  470. package/lib/typescript/utils/api.d.ts +0 -6
  471. package/lib/typescript/utils/api.d.ts.map +0 -1
  472. package/lib/typescript/utils/auth.d.ts +0 -6
  473. package/lib/typescript/utils/auth.d.ts.map +0 -1
  474. package/lib/typescript/utils/crypto.d.ts +0 -4
  475. package/lib/typescript/utils/crypto.d.ts.map +0 -1
  476. package/lib/typescript/utils/debugHelper.d.ts +0 -29
  477. package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
  478. package/lib/typescript/utils/encryption.d.ts +0 -19
  479. package/lib/typescript/utils/encryption.d.ts.map +0 -1
  480. package/lib/typescript/utils/onairosApi.d.ts +0 -87
  481. package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
  482. package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
  483. package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
  484. package/lib/typescript/utils/retryHelper.d.ts +0 -69
  485. package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
  486. package/lib/typescript/utils/secureStorage.d.ts +0 -94
  487. package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
  488. package/src/api/index.ts +0 -111
  489. package/src/assets/images/email.png +0 -0
  490. package/src/assets/images/linkedin.png +0 -0
  491. package/src/assets/images/onairos_logo.png +0 -0
  492. package/src/assets/images/reddit.png +0 -0
  493. package/src/assets/images/youtube.png +0 -0
  494. package/src/components/DataRequestModal.tsx +0 -227
  495. package/src/components/DataRequestScreen.tsx +0 -356
  496. package/src/components/EmailVerificationModal.tsx +0 -364
  497. package/src/components/Onairos.tsx +0 -425
  498. package/src/components/OnairosButton.tsx +0 -359
  499. package/src/components/Overlay.tsx +0 -506
  500. package/src/components/PinInput.tsx +0 -343
  501. package/src/components/PlatformList.tsx +0 -145
  502. package/src/components/TrainingModal.tsx +0 -737
  503. package/src/components/UniversalOnboarding.tsx +0 -1839
  504. package/src/components/UniversalOnboarding.tsx.new +0 -455
  505. package/src/components/onboarding/OAuthWebView.tsx +0 -838
  506. package/src/components/onboarding/OnboardingHeader.tsx +0 -70
  507. package/src/components/onboarding/PinInput.tsx +0 -356
  508. package/src/components/onboarding/PlatformConnector.tsx +0 -302
  509. package/src/components/screens/ConnectorScreen.tsx +0 -153
  510. package/src/components/screens/LoadingScreen.tsx +0 -100
  511. package/src/components/screens/PinCreationScreen.tsx +0 -67
  512. package/src/constants/index.ts +0 -83
  513. package/src/hooks/useConnections.ts +0 -163
  514. package/src/hooks/useCredentials.ts +0 -175
  515. package/src/index.js +0 -14
  516. package/src/index.ts +0 -50
  517. package/src/services/SDK_API_KEY_VALIDATION.md +0 -428
  518. package/src/services/apiKeyService.ts +0 -979
  519. package/src/services/oauthService.ts +0 -412
  520. package/src/services/platformAuthService.ts +0 -1113
  521. package/src/types/ambient.d.ts +0 -29
  522. package/src/types/declarations.d.ts +0 -26
  523. package/src/types/index.d.ts +0 -274
  524. package/src/types/index.ts +0 -244
  525. package/src/types/node-fix.d.ts +0 -19
  526. package/src/types/node-override.d.ts +0 -24
  527. package/src/types/opacity.d.ts +0 -16
  528. package/src/types/types.d.ts +0 -18
  529. package/src/types.ts +0 -298
  530. package/src/utils/Portal.tsx +0 -83
  531. package/src/utils/api.js +0 -112
  532. package/src/utils/auth.js +0 -104
  533. package/src/utils/crypto.js +0 -60
  534. package/src/utils/debugHelper.ts +0 -53
  535. package/src/utils/encryption.ts +0 -69
  536. package/src/utils/onairosApi.ts +0 -391
  537. package/src/utils/programmaticFlow.ts +0 -113
  538. package/src/utils/retryHelper.ts +0 -275
  539. package/src/utils/secureStorage.ts +0 -361
  540. package/types/index.d.ts +0 -218
  541. package/types/node-env.d.ts +0 -15
  542. /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
  543. /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
  544. /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
  545. /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
  546. /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
@@ -1,329 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DataRequestScreen = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
10
- var _constants = require("../constants");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const DataRequestScreen = ({
13
- onAccept,
14
- onDecline,
15
- requestData,
16
- AppName,
17
- appIcon
18
- }) => {
19
- // Basic data requests that are always shown
20
- const basicRequests = [{
21
- key: 'basic_profile',
22
- name: 'Basic Profile',
23
- description: 'Your basic social media profile information',
24
- reward: 'Personalized experience',
25
- icon: 'person'
26
- }, {
27
- key: 'content_analysis',
28
- name: 'Content Analysis',
29
- description: 'Analysis of your posts and interactions',
30
- reward: 'Better recommendations',
31
- icon: 'analytics'
32
- }];
33
- const renderDataRequest = (data, key, isBasic = false) => {
34
- let name, description, reward, icon;
35
- if (isBasic) {
36
- ({
37
- name,
38
- description,
39
- reward,
40
- icon
41
- } = data);
42
- } else {
43
- // Handle new format (personality_traits, sentiment_analysis)
44
- if ('name' in data && 'description' in data && 'reward' in data) {
45
- name = data.name;
46
- description = data.description;
47
- reward = data.reward;
48
- icon = key === 'personality_traits' ? 'psychology' : 'analytics';
49
- } else if ('type' in data && 'descriptions' in data && 'reward' in data) {
50
- // Handle old format (Small, Medium, Large)
51
- name = `${key} - ${data.type}`;
52
- description = data.descriptions;
53
- reward = data.reward;
54
- icon = 'data_usage';
55
- } else {
56
- return null;
57
- }
58
- }
59
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
60
- key: key,
61
- style: styles.dataRequestContainer
62
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
63
- style: styles.dataRequestHeader
64
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
65
- style: styles.iconContainer
66
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
67
- name: icon,
68
- size: 24,
69
- color: _constants.COLORS.primary
70
- })), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
71
- style: styles.requestContent
72
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
73
- style: styles.dataRequestName
74
- }, name), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
75
- style: styles.dataRequestDescription
76
- }, description), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
77
- style: styles.rewardContainer
78
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
79
- name: "star",
80
- size: 16,
81
- color: "#FFD700"
82
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
83
- style: styles.rewardText
84
- }, reward)))));
85
- };
86
- const renderCustomRequests = () => {
87
- return Object.entries(requestData).map(([key, data]) => {
88
- // Skip if data is undefined or doesn't have the expected structure
89
- if (!data || typeof data !== 'object') return null;
90
- return renderDataRequest(data, key, false);
91
- });
92
- };
93
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
94
- style: styles.container
95
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
96
- style: styles.header
97
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
98
- style: styles.titleContainer
99
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
100
- style: styles.title
101
- }, "Data Sharing Request"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
102
- style: styles.subtitle
103
- }, AppName, " would like access to the following data")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
104
- style: styles.iconFlow
105
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
106
- source: require('../assets/images/onairos_logo.png'),
107
- style: styles.onairosIcon,
108
- resizeMode: "contain"
109
- }), /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
110
- name: "arrow-forward",
111
- size: 24,
112
- color: "#666",
113
- style: styles.arrowIcon
114
- }), appIcon ? /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
115
- source: appIcon,
116
- style: styles.appIcon,
117
- resizeMode: "contain"
118
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
119
- style: styles.appIconPlaceholder
120
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
121
- style: styles.appIconText
122
- }, AppName.charAt(0).toUpperCase())))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
123
- style: styles.content,
124
- contentContainerStyle: styles.scrollContent,
125
- showsVerticalScrollIndicator: false
126
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
127
- style: styles.section
128
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
129
- style: styles.sectionTitle
130
- }, "Basic Data"), basicRequests.map(request => renderDataRequest(request, request.key, true))), Object.keys(requestData).length > 0 && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
131
- style: styles.section
132
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
133
- style: styles.sectionTitle
134
- }, "Additional Insights"), renderCustomRequests()), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
135
- style: styles.privacyNote
136
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
137
- name: "security",
138
- size: 20,
139
- color: "#28a745"
140
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
141
- style: styles.privacyText
142
- }, "Your data is encrypted and never shared with third parties"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
143
- style: styles.footer
144
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
145
- style: styles.declineButton,
146
- onPress: onDecline
147
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
148
- style: styles.declineButtonText
149
- }, "Decline")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
150
- style: styles.acceptButton,
151
- onPress: onAccept
152
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
153
- style: styles.acceptButtonText
154
- }, "Accept & Continue"))));
155
- };
156
- exports.DataRequestScreen = DataRequestScreen;
157
- const styles = _reactNative.StyleSheet.create({
158
- container: {
159
- flex: 1,
160
- backgroundColor: '#fff'
161
- },
162
- header: {
163
- padding: 24,
164
- paddingTop: 40,
165
- backgroundColor: '#f8f9fa',
166
- borderBottomWidth: 1,
167
- borderBottomColor: '#e9ecef'
168
- },
169
- titleContainer: {
170
- marginBottom: 20
171
- },
172
- title: {
173
- fontSize: 24,
174
- fontWeight: '600',
175
- color: '#000',
176
- textAlign: 'center',
177
- marginBottom: 8
178
- },
179
- subtitle: {
180
- fontSize: 16,
181
- color: '#666',
182
- textAlign: 'center'
183
- },
184
- iconFlow: {
185
- flexDirection: 'row',
186
- alignItems: 'center',
187
- justifyContent: 'center'
188
- },
189
- onairosIcon: {
190
- width: 32,
191
- height: 32
192
- },
193
- arrowIcon: {
194
- marginHorizontal: 12
195
- },
196
- appIcon: {
197
- width: 32,
198
- height: 32,
199
- borderRadius: 8
200
- },
201
- appIconPlaceholder: {
202
- width: 32,
203
- height: 32,
204
- borderRadius: 8,
205
- backgroundColor: _constants.COLORS.primary,
206
- alignItems: 'center',
207
- justifyContent: 'center'
208
- },
209
- appIconText: {
210
- color: '#fff',
211
- fontSize: 16,
212
- fontWeight: '600'
213
- },
214
- content: {
215
- flex: 1
216
- },
217
- scrollContent: {
218
- padding: 20
219
- },
220
- section: {
221
- marginBottom: 24
222
- },
223
- sectionTitle: {
224
- fontSize: 18,
225
- fontWeight: '600',
226
- color: '#000',
227
- marginBottom: 16
228
- },
229
- dataRequestContainer: {
230
- marginBottom: 16,
231
- borderWidth: 1,
232
- borderColor: '#e9ecef',
233
- borderRadius: 12,
234
- padding: 16,
235
- backgroundColor: '#fff'
236
- },
237
- dataRequestHeader: {
238
- flexDirection: 'row',
239
- alignItems: 'flex-start'
240
- },
241
- iconContainer: {
242
- width: 40,
243
- height: 40,
244
- borderRadius: 20,
245
- backgroundColor: '#f0f8ff',
246
- alignItems: 'center',
247
- justifyContent: 'center',
248
- marginRight: 12
249
- },
250
- requestContent: {
251
- flex: 1
252
- },
253
- dataRequestName: {
254
- fontSize: 16,
255
- fontWeight: '600',
256
- color: '#000',
257
- marginBottom: 4
258
- },
259
- dataRequestDescription: {
260
- fontSize: 14,
261
- color: '#666',
262
- lineHeight: 20,
263
- marginBottom: 8
264
- },
265
- rewardContainer: {
266
- flexDirection: 'row',
267
- alignItems: 'center',
268
- backgroundColor: '#fff3cd',
269
- padding: 6,
270
- borderRadius: 6,
271
- alignSelf: 'flex-start'
272
- },
273
- rewardText: {
274
- fontSize: 12,
275
- fontWeight: '500',
276
- marginLeft: 4,
277
- color: '#856404'
278
- },
279
- privacyNote: {
280
- flexDirection: 'row',
281
- alignItems: 'center',
282
- backgroundColor: '#d4edda',
283
- padding: 12,
284
- borderRadius: 8,
285
- marginTop: 8
286
- },
287
- privacyText: {
288
- fontSize: 14,
289
- color: '#155724',
290
- marginLeft: 8,
291
- flex: 1
292
- },
293
- footer: {
294
- flexDirection: 'row',
295
- padding: 20,
296
- borderTopWidth: 1,
297
- borderTopColor: '#e9ecef',
298
- backgroundColor: '#fff'
299
- },
300
- declineButton: {
301
- flex: 1,
302
- paddingVertical: 16,
303
- paddingHorizontal: 24,
304
- borderRadius: 12,
305
- borderWidth: 1,
306
- borderColor: '#dc3545',
307
- marginRight: 12,
308
- alignItems: 'center'
309
- },
310
- declineButtonText: {
311
- fontSize: 16,
312
- fontWeight: '600',
313
- color: '#dc3545'
314
- },
315
- acceptButton: {
316
- flex: 2,
317
- paddingVertical: 16,
318
- paddingHorizontal: 24,
319
- borderRadius: 12,
320
- backgroundColor: '#28a745',
321
- alignItems: 'center'
322
- },
323
- acceptButtonText: {
324
- fontSize: 16,
325
- fontWeight: '600',
326
- color: '#fff'
327
- }
328
- });
329
- //# sourceMappingURL=DataRequestScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_MaterialIcons","_constants","e","__esModule","default","DataRequestScreen","onAccept","onDecline","requestData","AppName","appIcon","basicRequests","key","name","description","reward","icon","renderDataRequest","data","isBasic","type","descriptions","createElement","View","style","styles","dataRequestContainer","dataRequestHeader","iconContainer","size","color","COLORS","primary","requestContent","Text","dataRequestName","dataRequestDescription","rewardContainer","rewardText","renderCustomRequests","Object","entries","map","container","header","titleContainer","title","subtitle","iconFlow","Image","source","onairosIcon","resizeMode","arrowIcon","appIconPlaceholder","appIconText","charAt","toUpperCase","ScrollView","content","contentContainerStyle","scrollContent","showsVerticalScrollIndicator","section","sectionTitle","request","keys","length","privacyNote","privacyText","footer","TouchableOpacity","declineButton","onPress","declineButtonText","acceptButton","acceptButtonText","exports","StyleSheet","create","flex","backgroundColor","padding","paddingTop","borderBottomWidth","borderBottomColor","marginBottom","fontSize","fontWeight","textAlign","flexDirection","alignItems","justifyContent","width","height","marginHorizontal","borderRadius","borderWidth","borderColor","marginRight","lineHeight","alignSelf","marginLeft","marginTop","borderTopWidth","borderTopColor","paddingVertical","paddingHorizontal"],"sourceRoot":"..\\..\\..\\src","sources":["components/DataRequestScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAsC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU/B,MAAMG,iBAAmD,GAAGA,CAAC;EAClEC,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,OAAO;EACPC;AACF,CAAC,KAAK;EAEJ;EACA,MAAMC,aAAa,GAAG,CACpB;IACEC,GAAG,EAAE,eAAe;IACpBC,IAAI,EAAE,eAAe;IACrBC,WAAW,EAAE,6CAA6C;IAC1DC,MAAM,EAAE,yBAAyB;IACjCC,IAAI,EAAE;EACR,CAAC,EACD;IACEJ,GAAG,EAAE,kBAAkB;IACvBC,IAAI,EAAE,kBAAkB;IACxBC,WAAW,EAAE,yCAAyC;IACtDC,MAAM,EAAE,wBAAwB;IAChCC,IAAI,EAAE;EACR,CAAC,CACF;EAED,MAAMC,iBAAiB,GAAGA,CAACC,IAAS,EAAEN,GAAW,EAAEO,OAAO,GAAG,KAAK,KAAK;IACrE,IAAIN,IAAI,EAAEC,WAAW,EAAEC,MAAM,EAAEC,IAAI;IAEnC,IAAIG,OAAO,EAAE;MACX,CAAC;QAAEN,IAAI;QAAEC,WAAW;QAAEC,MAAM;QAAEC;MAAK,CAAC,GAAGE,IAAI;IAC7C,CAAC,MAAM;MACL;MACA,IAAI,MAAM,IAAIA,IAAI,IAAI,aAAa,IAAIA,IAAI,IAAI,QAAQ,IAAIA,IAAI,EAAE;QAC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E,EAAE;IACZzD,KAAK,EAAE,SAAS;IAChBwE,UAAU,EAAE,CAAC;IACbtB,IAAI,EAAE;EACR,CAAC;EACDV,MAAM,EAAE;IACNoB,aAAa,EAAE,KAAK;IACpBR,OAAO,EAAE,EAAE;IACXsB,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE,SAAS;IACzBxB,eAAe,EAAE;EACnB,CAAC;EACDT,aAAa,EAAE;IACbQ,IAAI,EAAE,CAAC;IACP0B,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBX,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,WAAW,EAAE,EAAE;IACfR,UAAU,EAAE;EACd,CAAC;EACDjB,iBAAiB,EAAE;IACjBa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjB1D,KAAK,EAAE;EACT,CAAC;EACD6C,YAAY,EAAE;IACZK,IAAI,EAAE,CAAC;IACP0B,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBX,YAAY,EAAE,EAAE;IAChBf,eAAe,EAAE,SAAS;IAC1BU,UAAU,EAAE;EACd,CAAC;EACDf,gBAAgB,EAAE;IAChBW,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjB1D,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,320 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EmailVerificationModal = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
10
- var _platformAuthService = require("../services/platformAuthService");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
- const EmailVerificationModal = ({
14
- visible,
15
- email,
16
- onClose,
17
- onVerificationComplete,
18
- onVerificationFailed,
19
- testMode = false
20
- }) => {
21
- const [step, setStep] = (0, _react.useState)('request');
22
- const [verificationCode, setVerificationCode] = (0, _react.useState)('');
23
- const [isLoading, setIsLoading] = (0, _react.useState)(false);
24
- const [codeSent, setCodeSent] = (0, _react.useState)(false);
25
- const handleRequestVerification = (0, _react.useCallback)(async () => {
26
- if (!email) {
27
- _reactNative.Alert.alert('Error', 'Email address is required');
28
- return;
29
- }
30
- setIsLoading(true);
31
- try {
32
- console.log('📧 Requesting email verification for:', email);
33
-
34
- // First check if there's already a pending verification
35
- const statusCheck = await (0, _platformAuthService.checkEmailVerificationStatus)(email, testMode);
36
- if (statusCheck.success && statusCheck.isPending) {
37
- console.log('✅ Email verification already pending');
38
- setCodeSent(true);
39
- setStep('verify');
40
- setIsLoading(false);
41
- return;
42
- }
43
-
44
- // Request new verification code
45
- const result = await (0, _platformAuthService.requestEmailVerification)(email, testMode);
46
- if (result.success) {
47
- console.log('✅ Email verification code requested successfully');
48
- setCodeSent(true);
49
- setStep('verify');
50
- _reactNative.Alert.alert('Verification Code Sent', result.message || 'Please check your email for the verification code.\n\nNote: In development mode, any 6-digit code will work.', [{
51
- text: 'OK',
52
- style: 'default'
53
- }]);
54
- } else {
55
- console.error('❌ Failed to request verification code:', result.error);
56
- _reactNative.Alert.alert('Error', result.error || 'Failed to send verification code');
57
- onVerificationFailed(result.error || 'Failed to send verification code');
58
- }
59
- } catch (error) {
60
- console.error('❌ Error requesting verification:', error);
61
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
62
- _reactNative.Alert.alert('Error', errorMessage);
63
- onVerificationFailed(errorMessage);
64
- } finally {
65
- setIsLoading(false);
66
- }
67
- }, [email, onVerificationFailed]);
68
- const handleVerifyCode = (0, _react.useCallback)(async () => {
69
- if (!verificationCode.trim()) {
70
- _reactNative.Alert.alert('Error', 'Please enter the verification code');
71
- return;
72
- }
73
- setIsLoading(true);
74
- try {
75
- console.log('🔍 Verifying email code for:', email);
76
- const result = await (0, _platformAuthService.verifyEmailCode)(email, verificationCode.trim(), testMode);
77
- if (result.success) {
78
- console.log('✅ Email verification successful');
79
-
80
- // Check if JWT token was received and stored
81
- if (result.token) {
82
- console.log('🎫 JWT token received and stored for user authentication');
83
- }
84
-
85
- // Use the existingUser flag from the backend response
86
- const isExistingUser = result.existingUser || false;
87
- _reactNative.Alert.alert('Email Verified', result.message || 'Your email has been verified successfully!\n\n' + (result.token ? 'You are now authenticated and can access user features.' : 'Authentication complete.'), [{
88
- text: 'Continue',
89
- onPress: () => {
90
- onVerificationComplete(email, isExistingUser);
91
- }
92
- }]);
93
- } else {
94
- console.error('❌ Email verification failed:', result.error);
95
- _reactNative.Alert.alert('Verification Failed', result.error || 'Invalid verification code. Please try again.');
96
- }
97
- } catch (error) {
98
- console.error('❌ Error verifying code:', error);
99
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
100
- _reactNative.Alert.alert('Error', errorMessage);
101
- } finally {
102
- setIsLoading(false);
103
- }
104
- }, [email, verificationCode, onVerificationComplete]);
105
- const handleResendCode = (0, _react.useCallback)(async () => {
106
- setVerificationCode('');
107
- await handleRequestVerification();
108
- }, [handleRequestVerification]);
109
- return /*#__PURE__*/_react.default.createElement(_reactNative.Modal, {
110
- visible: visible,
111
- transparent: true,
112
- animationType: "slide",
113
- statusBarTranslucent: true,
114
- onRequestClose: onClose
115
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
116
- onPress: onClose
117
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
118
- style: styles.modalOverlay
119
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
120
- onPress: e => e.stopPropagation()
121
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
122
- style: styles.modalContent
123
- }, /*#__PURE__*/_react.default.createElement(_reactNative.SafeAreaView, {
124
- style: styles.container
125
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
126
- style: styles.header
127
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
128
- onPress: onClose,
129
- style: styles.closeButton
130
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
131
- name: "close",
132
- size: 24,
133
- color: "#666"
134
- })), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
135
- style: styles.headerTitle
136
- }, "Email Verification"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
137
- style: styles.placeholder
138
- })), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
139
- style: styles.content
140
- }, step === 'request' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
141
- style: styles.iconContainer
142
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
143
- name: "email",
144
- size: 48,
145
- color: "#4CAF50"
146
- })), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
147
- style: styles.title
148
- }, "Verify Your Email"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
149
- style: styles.subtitle
150
- }, "We need to verify your email address to continue"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
151
- style: styles.emailContainer
152
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
153
- style: styles.emailLabel
154
- }, "Email Address:"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
155
- style: styles.emailText
156
- }, email)), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
157
- style: [styles.button, isLoading && styles.buttonDisabled],
158
- onPress: handleRequestVerification,
159
- disabled: isLoading
160
- }, isLoading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
161
- size: "small",
162
- color: "#fff"
163
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
164
- style: styles.buttonText
165
- }, "Send Verification Code"))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
166
- style: styles.iconContainer
167
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
168
- name: "verified",
169
- size: 48,
170
- color: "#4CAF50"
171
- })), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
172
- style: styles.title
173
- }, "Enter Verification Code"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
174
- style: styles.subtitle
175
- }, "We've sent a 6-digit code to ", email), testMode && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
176
- style: styles.testingNote
177
- }, "\uD83D\uDD0D Test Mode: Any 6-digit code will work for verification"), /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
178
- style: styles.codeInput,
179
- value: verificationCode,
180
- onChangeText: setVerificationCode,
181
- placeholder: "Enter 6-digit code",
182
- keyboardType: "number-pad",
183
- maxLength: 6,
184
- autoFocus: true,
185
- textAlign: "center"
186
- }), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
187
- style: [styles.button, isLoading && styles.buttonDisabled],
188
- onPress: handleVerifyCode,
189
- disabled: isLoading || !verificationCode.trim()
190
- }, isLoading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
191
- size: "small",
192
- color: "#fff"
193
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
194
- style: styles.buttonText
195
- }, "Verify Code")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
196
- style: styles.resendButton,
197
- onPress: handleResendCode,
198
- disabled: isLoading
199
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
200
- style: styles.resendButtonText
201
- }, "Didn't receive the code? Resend"))))))))));
202
- };
203
- exports.EmailVerificationModal = EmailVerificationModal;
204
- const styles = _reactNative.StyleSheet.create({
205
- modalOverlay: {
206
- flex: 1,
207
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
208
- justifyContent: 'center',
209
- alignItems: 'center'
210
- },
211
- modalContent: {
212
- backgroundColor: '#fff',
213
- borderRadius: 16,
214
- width: '90%',
215
- maxWidth: 400,
216
- maxHeight: '80%'
217
- },
218
- container: {
219
- padding: 24
220
- },
221
- header: {
222
- flexDirection: 'row',
223
- alignItems: 'center',
224
- justifyContent: 'space-between',
225
- marginBottom: 24
226
- },
227
- closeButton: {
228
- padding: 8
229
- },
230
- headerTitle: {
231
- fontSize: 18,
232
- fontWeight: '600',
233
- color: '#000'
234
- },
235
- placeholder: {
236
- width: 40
237
- },
238
- content: {
239
- alignItems: 'center'
240
- },
241
- iconContainer: {
242
- marginBottom: 16
243
- },
244
- title: {
245
- fontSize: 24,
246
- fontWeight: '600',
247
- color: '#000',
248
- textAlign: 'center',
249
- marginBottom: 8
250
- },
251
- subtitle: {
252
- fontSize: 16,
253
- color: '#666',
254
- textAlign: 'center',
255
- marginBottom: 24
256
- },
257
- emailContainer: {
258
- backgroundColor: '#f5f5f5',
259
- padding: 16,
260
- borderRadius: 8,
261
- marginBottom: 24,
262
- width: '100%'
263
- },
264
- emailLabel: {
265
- fontSize: 14,
266
- color: '#666',
267
- marginBottom: 4
268
- },
269
- emailText: {
270
- fontSize: 16,
271
- fontWeight: '500',
272
- color: '#000'
273
- },
274
- testingNote: {
275
- fontSize: 14,
276
- color: '#FF9800',
277
- textAlign: 'center',
278
- marginBottom: 16,
279
- backgroundColor: '#FFF3E0',
280
- padding: 8,
281
- borderRadius: 4
282
- },
283
- codeInput: {
284
- borderWidth: 1,
285
- borderColor: '#ddd',
286
- borderRadius: 8,
287
- padding: 16,
288
- fontSize: 18,
289
- fontWeight: '600',
290
- letterSpacing: 4,
291
- marginBottom: 24,
292
- width: '100%'
293
- },
294
- button: {
295
- backgroundColor: '#4CAF50',
296
- paddingVertical: 16,
297
- paddingHorizontal: 32,
298
- borderRadius: 8,
299
- width: '100%',
300
- alignItems: 'center',
301
- marginBottom: 16
302
- },
303
- buttonDisabled: {
304
- opacity: 0.5
305
- },
306
- buttonText: {
307
- color: '#fff',
308
- fontSize: 16,
309
- fontWeight: '600'
310
- },
311
- resendButton: {
312
- paddingVertical: 8
313
- },
314
- resendButtonText: {
315
- color: '#4CAF50',
316
- fontSize: 14,
317
- textDecorationLine: 'underline'
318
- }
319
- });
320
- //# sourceMappingURL=EmailVerificationModal.js.map