@oxyhq/services 11.0.0 → 11.1.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 (434) hide show
  1. package/lib/commonjs/index.js +7 -0
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/AccountMenu.js +9 -5
  4. package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
  5. package/lib/commonjs/ui/components/AnotherDeviceQR.js +51 -56
  6. package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +1 -1
  7. package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -0
  8. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  9. package/lib/commonjs/ui/components/FollowButton.js +18 -5
  10. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  11. package/lib/commonjs/ui/components/OxyLogo.js +1 -1
  12. package/lib/commonjs/ui/components/OxyLogo.js.map +1 -1
  13. package/lib/commonjs/ui/components/OxyProvider.js +23 -7
  14. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  15. package/lib/commonjs/ui/components/SignInModal.js +20 -1
  16. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  17. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +19 -9
  18. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  19. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +4 -2
  20. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  21. package/lib/commonjs/ui/context/OxyContext.js +153 -19
  22. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  23. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -17
  24. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  25. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
  26. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +38 -38
  28. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +2 -2
  30. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/queries/queryKeys.js +3 -3
  32. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +1 -1
  34. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  35. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +16 -12
  36. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +10 -6
  38. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  39. package/lib/commonjs/ui/hooks/queryClient.js +6 -5
  40. package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
  41. package/lib/commonjs/ui/hooks/useOxyAuthSession.js +40 -2
  42. package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +1 -1
  43. package/lib/commonjs/ui/hooks/useProfileEditing.js +21 -0
  44. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  45. package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
  46. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  47. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +100 -108
  48. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/AppInfoScreen.js +227 -273
  50. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -4
  52. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +20 -37
  54. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +89 -201
  56. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +80 -208
  58. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/FAQScreen.js +56 -208
  60. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/FeedbackScreen.js +303 -352
  62. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
  64. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/HelpSupportScreen.js +77 -89
  66. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/HistoryViewScreen.js +43 -58
  68. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +67 -90
  70. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +77 -177
  72. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +113 -107
  74. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/ManageAccountScreen.js +55 -114
  76. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/NotificationsScreen.js +67 -85
  78. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/OxyAuthScreen.js +71 -135
  80. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +15 -9
  82. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/PreferencesScreen.js +65 -83
  84. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +378 -1023
  86. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +294 -242
  88. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/ProfileScreen.js +194 -333
  90. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +57 -97
  92. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +41 -41
  94. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/UserLinksScreen.js +17 -24
  96. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/UserListScreen.js +83 -214
  98. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +115 -77
  100. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +70 -57
  102. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  103. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +136 -332
  104. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  105. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +47 -137
  106. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  107. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +182 -115
  108. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  109. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +138 -214
  110. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  111. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +54 -92
  112. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  113. package/lib/commonjs/ui/utils/activeAuthuser.js +15 -9
  114. package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
  115. package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
  116. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  117. package/lib/module/index.js +2 -0
  118. package/lib/module/index.js.map +1 -1
  119. package/lib/module/ui/components/AccountMenu.js +10 -6
  120. package/lib/module/ui/components/AccountMenu.js.map +1 -1
  121. package/lib/module/ui/components/AnotherDeviceQR.js +50 -56
  122. package/lib/module/ui/components/AnotherDeviceQR.js.map +1 -1
  123. package/lib/module/ui/components/BottomSheetRouter.js +2 -1
  124. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  125. package/lib/module/ui/components/FollowButton.js +18 -5
  126. package/lib/module/ui/components/FollowButton.js.map +1 -1
  127. package/lib/module/ui/components/OxyLogo.js +1 -1
  128. package/lib/module/ui/components/OxyLogo.js.map +1 -1
  129. package/lib/module/ui/components/OxyProvider.js +23 -7
  130. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  131. package/lib/module/ui/components/SignInModal.js +20 -1
  132. package/lib/module/ui/components/SignInModal.js.map +1 -1
  133. package/lib/module/ui/components/fileManagement/FileViewer.js +19 -9
  134. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  135. package/lib/module/ui/components/fileManagement/UploadPreview.js +4 -2
  136. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  137. package/lib/module/ui/context/OxyContext.js +154 -20
  138. package/lib/module/ui/context/OxyContext.js.map +1 -1
  139. package/lib/module/ui/context/hooks/useAuthOperations.js +6 -17
  140. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  141. package/lib/module/ui/hooks/mutations/mutationFactory.js +5 -5
  142. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
  143. package/lib/module/ui/hooks/mutations/useAccountMutations.js +38 -38
  144. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  145. package/lib/module/ui/hooks/mutations/useServicesMutations.js +2 -2
  146. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  147. package/lib/module/ui/hooks/queries/queryKeys.js +3 -3
  148. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  149. package/lib/module/ui/hooks/queries/useAccountQueries.js +1 -1
  150. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  151. package/lib/module/ui/hooks/queries/usePaymentQueries.js +16 -12
  152. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  153. package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -6
  154. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  155. package/lib/module/ui/hooks/queryClient.js +6 -5
  156. package/lib/module/ui/hooks/queryClient.js.map +1 -1
  157. package/lib/module/ui/hooks/useOxyAuthSession.js +40 -2
  158. package/lib/module/ui/hooks/useOxyAuthSession.js.map +1 -1
  159. package/lib/module/ui/hooks/useProfileEditing.js +21 -0
  160. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  161. package/lib/module/ui/hooks/useSessionManagement.js +4 -3
  162. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  163. package/lib/module/ui/screens/AccountVerificationScreen.js +101 -109
  164. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  165. package/lib/module/ui/screens/AppInfoScreen.js +228 -275
  166. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  167. package/lib/module/ui/screens/AvatarCropScreen.js +10 -4
  168. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  169. package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -39
  170. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  171. package/lib/module/ui/screens/CreateManagedAccountScreen.js +90 -202
  172. package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  173. package/lib/module/ui/screens/EditProfileFieldScreen.js +77 -205
  174. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  175. package/lib/module/ui/screens/FAQScreen.js +55 -207
  176. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  177. package/lib/module/ui/screens/FeedbackScreen.js +301 -350
  178. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  179. package/lib/module/ui/screens/FileManagementScreen.js +20 -20
  180. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  181. package/lib/module/ui/screens/HelpSupportScreen.js +78 -90
  182. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  183. package/lib/module/ui/screens/HistoryViewScreen.js +44 -59
  184. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  185. package/lib/module/ui/screens/LanguageSelectorScreen.js +68 -91
  186. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  187. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +75 -177
  188. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  189. package/lib/module/ui/screens/LegalDocumentsScreen.js +116 -108
  190. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  191. package/lib/module/ui/screens/ManageAccountScreen.js +52 -112
  192. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  193. package/lib/module/ui/screens/NotificationsScreen.js +68 -86
  194. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  195. package/lib/module/ui/screens/OxyAuthScreen.js +69 -134
  196. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  197. package/lib/module/ui/screens/PaymentGatewayScreen.js +16 -10
  198. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  199. package/lib/module/ui/screens/PreferencesScreen.js +66 -84
  200. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  201. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +366 -1012
  202. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  203. package/lib/module/ui/screens/PrivacySettingsScreen.js +295 -243
  204. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  205. package/lib/module/ui/screens/ProfileScreen.js +192 -331
  206. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  207. package/lib/module/ui/screens/SavesCollectionsScreen.js +58 -98
  208. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  209. package/lib/module/ui/screens/SearchSettingsScreen.js +42 -42
  210. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  211. package/lib/module/ui/screens/UserLinksScreen.js +18 -25
  212. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  213. package/lib/module/ui/screens/UserListScreen.js +81 -212
  214. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  215. package/lib/module/ui/screens/WelcomeNewUserScreen.js +114 -76
  216. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  217. package/lib/module/ui/screens/trust/TrustAboutScreen.js +69 -57
  218. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  219. package/lib/module/ui/screens/trust/TrustCenterScreen.js +135 -332
  220. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  221. package/lib/module/ui/screens/trust/TrustFAQScreen.js +48 -138
  222. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  223. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +184 -117
  224. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  225. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +132 -208
  226. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  227. package/lib/module/ui/screens/trust/TrustRulesScreen.js +58 -94
  228. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  229. package/lib/module/ui/utils/activeAuthuser.js +15 -9
  230. package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
  231. package/lib/module/ui/utils/avatarUtils.js +1 -1
  232. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  233. package/lib/typescript/commonjs/index.d.ts +2 -0
  234. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +2 -0
  236. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +12 -2
  238. package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
  242. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +34 -0
  247. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +6 -0
  250. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +3 -3
  252. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +22 -0
  256. package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +3 -0
  258. package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +2 -1
  260. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
  294. package/lib/typescript/module/index.d.ts +2 -0
  295. package/lib/typescript/module/index.d.ts.map +1 -1
  296. package/lib/typescript/module/ui/components/AccountMenu.d.ts +2 -0
  297. package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +12 -2
  299. package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  301. package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
  303. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
  306. package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/context/OxyContext.d.ts +34 -0
  308. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +6 -0
  311. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +3 -3
  313. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
  316. package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +22 -0
  317. package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +3 -0
  319. package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +2 -1
  321. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  322. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  323. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  325. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
  327. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  329. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  330. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  332. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  337. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  338. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  340. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  342. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  344. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  351. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  353. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  354. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
  355. package/lib/typescript/types/expo-haptics.d.ts +42 -0
  356. package/package.json +8 -3
  357. package/src/index.ts +2 -0
  358. package/src/types/expo-haptics.d.ts +42 -0
  359. package/src/ui/components/AccountMenu.tsx +11 -5
  360. package/src/ui/components/AnotherDeviceQR.tsx +53 -45
  361. package/src/ui/components/BottomSheetRouter.tsx +2 -1
  362. package/src/ui/components/FollowButton.tsx +24 -5
  363. package/src/ui/components/OxyLogo.tsx +1 -1
  364. package/src/ui/components/OxyProvider.tsx +22 -8
  365. package/src/ui/components/SignInModal.tsx +21 -2
  366. package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
  367. package/src/ui/components/fileManagement/FileViewer.tsx +9 -9
  368. package/src/ui/components/fileManagement/UploadPreview.tsx +2 -2
  369. package/src/ui/context/OxyContext.tsx +178 -21
  370. package/src/ui/context/hooks/useAuthOperations.ts +6 -17
  371. package/src/ui/hooks/mutations/mutationFactory.ts +5 -5
  372. package/src/ui/hooks/mutations/useAccountMutations.ts +38 -38
  373. package/src/ui/hooks/mutations/useServicesMutations.ts +2 -2
  374. package/src/ui/hooks/queries/queryKeys.ts +6 -3
  375. package/src/ui/hooks/queries/useAccountQueries.ts +1 -1
  376. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  377. package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
  378. package/src/ui/hooks/queryClient.ts +5 -5
  379. package/src/ui/hooks/useOxyAuthSession.ts +76 -2
  380. package/src/ui/hooks/useProfileEditing.ts +24 -0
  381. package/src/ui/hooks/useSessionManagement.ts +9 -6
  382. package/src/ui/screens/AccountVerificationScreen.tsx +101 -113
  383. package/src/ui/screens/AppInfoScreen.tsx +200 -238
  384. package/src/ui/screens/AvatarCropScreen.tsx +17 -4
  385. package/src/ui/screens/ConnectedAppsScreen.tsx +16 -34
  386. package/src/ui/screens/CreateManagedAccountScreen.tsx +94 -170
  387. package/src/ui/screens/EditProfileFieldScreen.tsx +77 -190
  388. package/src/ui/screens/FAQScreen.tsx +77 -208
  389. package/src/ui/screens/FeedbackScreen.tsx +330 -239
  390. package/src/ui/screens/FileManagementScreen.tsx +20 -20
  391. package/src/ui/screens/HelpSupportScreen.tsx +67 -82
  392. package/src/ui/screens/HistoryViewScreen.tsx +32 -38
  393. package/src/ui/screens/LanguageSelectorScreen.tsx +79 -93
  394. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +81 -164
  395. package/src/ui/screens/LegalDocumentsScreen.tsx +184 -123
  396. package/src/ui/screens/ManageAccountScreen.tsx +48 -114
  397. package/src/ui/screens/NotificationsScreen.tsx +107 -106
  398. package/src/ui/screens/OxyAuthScreen.tsx +76 -109
  399. package/src/ui/screens/PaymentGatewayScreen.tsx +16 -7
  400. package/src/ui/screens/PreferencesScreen.tsx +96 -116
  401. package/src/ui/screens/PremiumSubscriptionScreen.tsx +419 -872
  402. package/src/ui/screens/PrivacySettingsScreen.tsx +203 -185
  403. package/src/ui/screens/ProfileScreen.tsx +162 -246
  404. package/src/ui/screens/SavesCollectionsScreen.tsx +78 -125
  405. package/src/ui/screens/SearchSettingsScreen.tsx +52 -41
  406. package/src/ui/screens/UserLinksScreen.tsx +18 -25
  407. package/src/ui/screens/UserListScreen.tsx +95 -188
  408. package/src/ui/screens/WelcomeNewUserScreen.tsx +109 -36
  409. package/src/ui/screens/trust/TrustAboutScreen.tsx +52 -41
  410. package/src/ui/screens/trust/TrustCenterScreen.tsx +184 -222
  411. package/src/ui/screens/trust/TrustFAQScreen.tsx +64 -124
  412. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +190 -67
  413. package/src/ui/screens/trust/TrustRewardsScreen.tsx +147 -182
  414. package/src/ui/screens/trust/TrustRulesScreen.tsx +77 -50
  415. package/src/ui/utils/activeAuthuser.ts +15 -9
  416. package/src/ui/utils/avatarUtils.ts +1 -1
  417. package/lib/commonjs/ui/components/feedback/FormInput.js +0 -72
  418. package/lib/commonjs/ui/components/feedback/FormInput.js.map +0 -1
  419. package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -261
  420. package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +0 -1
  421. package/lib/module/ui/components/feedback/FormInput.js +0 -67
  422. package/lib/module/ui/components/feedback/FormInput.js.map +0 -1
  423. package/lib/module/ui/components/feedback/feedbackStyles.js +0 -256
  424. package/lib/module/ui/components/feedback/feedbackStyles.js.map +0 -1
  425. package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts +0 -20
  426. package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts.map +0 -1
  427. package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -279
  428. package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
  429. package/lib/typescript/module/ui/components/feedback/FormInput.d.ts +0 -20
  430. package/lib/typescript/module/ui/components/feedback/FormInput.d.ts.map +0 -1
  431. package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -279
  432. package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
  433. package/src/ui/components/feedback/FormInput.tsx +0 -84
  434. package/src/ui/components/feedback/feedbackStyles.ts +0 -246
@@ -17,7 +17,10 @@ export const queryKeys = {
17
17
  list: (sessionIds: string[]) => [...queryKeys.accounts.lists(), sessionIds] as const,
18
18
  details: () => [...queryKeys.accounts.all, 'detail'] as const,
19
19
  detail: (sessionId: string) => [...queryKeys.accounts.details(), sessionId] as const,
20
- current: () => [...queryKeys.accounts.all, 'current'] as const,
20
+ current: (sessionId?: string | null) =>
21
+ sessionId
22
+ ? ([...queryKeys.accounts.all, 'current', sessionId] as const)
23
+ : ([...queryKeys.accounts.all, 'current'] as const),
21
24
  settings: () => [...queryKeys.accounts.all, 'settings'] as const,
22
25
  },
23
26
 
@@ -46,7 +49,7 @@ export const queryKeys = {
46
49
  devices: {
47
50
  all: ['devices'] as const,
48
51
  lists: () => [...queryKeys.devices.all, 'list'] as const,
49
- list: (userId?: string) => [...queryKeys.devices.lists(), userId] as const,
52
+ list: (accountScope?: string) => [...queryKeys.devices.lists(), accountScope] as const,
50
53
  details: () => [...queryKeys.devices.all, 'detail'] as const,
51
54
  detail: (deviceId: string) => [...queryKeys.devices.details(), deviceId] as const,
52
55
  },
@@ -71,7 +74,7 @@ export const queryKeys = {
71
74
  // Storage usage queries
72
75
  storage: {
73
76
  all: ['storage'] as const,
74
- usage: () => [...queryKeys.storage.all, 'usage'] as const,
77
+ usage: (accountScope?: string) => [...queryKeys.storage.all, 'usage', accountScope] as const,
75
78
  },
76
79
 
77
80
  // Connected apps (FedCM grants the user has authorized)
@@ -65,7 +65,7 @@ export const useCurrentUser = (options?: { enabled?: boolean }) => {
65
65
  const queryClient = useQueryClient();
66
66
 
67
67
  const query = useQuery({
68
- queryKey: queryKeys.accounts.current(),
68
+ queryKey: queryKeys.accounts.current(activeSessionId),
69
69
  queryFn: async () => {
70
70
  if (!activeSessionId) {
71
71
  throw new Error('No active session');
@@ -34,10 +34,10 @@ import type {
34
34
  * API's `{ plan: 'basic' }` fallback when the user has never subscribed.
35
35
  */
36
36
  export const useUserSubscription = (options?: { enabled?: boolean }) => {
37
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
37
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
38
38
 
39
39
  return useQuery({
40
- queryKey: queryKeys.payments.subscription(),
40
+ queryKey: queryKeys.payments.subscription(user?.id),
41
41
  queryFn: async () => {
42
42
  return authenticatedApiCall<Subscription>(
43
43
  oxyServices,
@@ -45,7 +45,7 @@ export const useUserSubscription = (options?: { enabled?: boolean }) => {
45
45
  () => oxyServices.getCurrentUserSubscription(),
46
46
  );
47
47
  },
48
- enabled: (options?.enabled !== false) && isAuthenticated,
48
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
49
49
  // Subscription state changes rarely; tolerate a longer fresh window.
50
50
  staleTime: 5 * 60 * 1000, // 5 minutes
51
51
  gcTime: 30 * 60 * 1000, // 30 minutes
@@ -59,10 +59,10 @@ export const useUserSubscription = (options?: { enabled?: boolean }) => {
59
59
  * returns the user's `deposit` and `purchase` transactions newest-first.
60
60
  */
61
61
  export const useUserPayments = (options?: { enabled?: boolean }) => {
62
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
62
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
63
63
 
64
64
  return useQuery({
65
- queryKey: queryKeys.payments.history(),
65
+ queryKey: queryKeys.payments.history(user?.id),
66
66
  queryFn: async () => {
67
67
  return authenticatedApiCall<Payment[]>(
68
68
  oxyServices,
@@ -70,7 +70,7 @@ export const useUserPayments = (options?: { enabled?: boolean }) => {
70
70
  () => oxyServices.getUserPayments(),
71
71
  );
72
72
  },
73
- enabled: (options?.enabled !== false) && isAuthenticated,
73
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
74
74
  // Billing history is append-mostly; a short fresh window is fine.
75
75
  staleTime: 2 * 60 * 1000, // 2 minutes
76
76
  gcTime: 30 * 60 * 1000, // 30 minutes
@@ -84,10 +84,10 @@ export const useUserPayments = (options?: { enabled?: boolean }) => {
84
84
  * Balance changes frequently, so the fresh window is intentionally short.
85
85
  */
86
86
  export const useUserWallet = (options?: { enabled?: boolean }) => {
87
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
87
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
88
88
 
89
89
  return useQuery({
90
- queryKey: queryKeys.payments.wallet(),
90
+ queryKey: queryKeys.payments.wallet(user?.id),
91
91
  queryFn: async () => {
92
92
  return authenticatedApiCall<Wallet>(
93
93
  oxyServices,
@@ -95,7 +95,7 @@ export const useUserWallet = (options?: { enabled?: boolean }) => {
95
95
  () => oxyServices.getCurrentUserWallet(),
96
96
  );
97
97
  },
98
- enabled: (options?.enabled !== false) && isAuthenticated,
98
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
99
99
  staleTime: 60 * 1000, // 1 minute (balance moves often)
100
100
  gcTime: 10 * 60 * 1000, // 10 minutes
101
101
  });
@@ -116,12 +116,12 @@ export const useUserWalletTransactions = (
116
116
  params?: { limit?: number; offset?: number },
117
117
  options?: { enabled?: boolean },
118
118
  ) => {
119
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
119
+ const { oxyServices, isAuthenticated, activeSessionId, user } = useOxy();
120
120
  const limit = params?.limit;
121
121
  const offset = params?.offset;
122
122
 
123
123
  return useQuery({
124
- queryKey: queryKeys.payments.walletTransactions(limit, offset),
124
+ queryKey: queryKeys.payments.walletTransactions(limit, offset, user?.id),
125
125
  queryFn: async () => {
126
126
  return authenticatedApiCall<WalletTransactionsResponse>(
127
127
  oxyServices,
@@ -129,7 +129,7 @@ export const useUserWalletTransactions = (
129
129
  () => oxyServices.getCurrentUserWalletTransactions({ limit, offset }),
130
130
  );
131
131
  },
132
- enabled: (options?.enabled !== false) && isAuthenticated,
132
+ enabled: (options?.enabled !== false) && isAuthenticated && !!user?.id,
133
133
  staleTime: 60 * 1000, // 1 minute (ledger updates frequently)
134
134
  gcTime: 10 * 60 * 1000, // 10 minutes
135
135
  });
@@ -5,6 +5,9 @@ import { queryKeys } from './queryKeys';
5
5
  import { useOxy } from '../../context/OxyContext';
6
6
  import { fetchSessionsWithFallback, mapSessionsToClient } from '../../utils/sessionHelpers';
7
7
 
8
+ const accountQueryScope = (activeSessionId: string | null, actingAs?: string | null): string =>
9
+ `${activeSessionId ?? 'no-session'}:${actingAs ?? 'self'}`;
10
+
8
11
  /**
9
12
  * Get all active sessions for the current user
10
13
  */
@@ -90,10 +93,10 @@ export const useDeviceSessions = (options?: { enabled?: boolean }) => {
90
93
  * Get user devices
91
94
  */
92
95
  export const useUserDevices = (options?: { enabled?: boolean }) => {
93
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
96
+ const { oxyServices, isAuthenticated, activeSessionId, actingAs } = useOxy();
94
97
 
95
98
  return useQuery({
96
- queryKey: queryKeys.devices.list(),
99
+ queryKey: queryKeys.devices.list(accountQueryScope(activeSessionId, actingAs)),
97
100
  queryFn: async () => {
98
101
  return authenticatedApiCall(
99
102
  oxyServices,
@@ -101,7 +104,7 @@ export const useUserDevices = (options?: { enabled?: boolean }) => {
101
104
  () => oxyServices.getUserDevices()
102
105
  );
103
106
  },
104
- enabled: (options?.enabled !== false) && isAuthenticated,
107
+ enabled: (options?.enabled !== false) && isAuthenticated && !!activeSessionId,
105
108
  staleTime: 5 * 60 * 1000,
106
109
  gcTime: 30 * 60 * 1000,
107
110
  });
@@ -132,10 +135,10 @@ export const useSecurityInfo = (options?: { enabled?: boolean }) => {
132
135
  * `useEffect` fetches.
133
136
  */
134
137
  export const useAccountStorageUsage = (options?: { enabled?: boolean }) => {
135
- const { oxyServices, isAuthenticated, activeSessionId } = useOxy();
138
+ const { oxyServices, isAuthenticated, activeSessionId, actingAs } = useOxy();
136
139
 
137
140
  return useQuery<AccountStorageUsageResponse>({
138
- queryKey: queryKeys.storage.usage(),
141
+ queryKey: queryKeys.storage.usage(accountQueryScope(activeSessionId, actingAs)),
139
142
  queryFn: async () => {
140
143
  return authenticatedApiCall(
141
144
  oxyServices,
@@ -143,7 +146,7 @@ export const useAccountStorageUsage = (options?: { enabled?: boolean }) => {
143
146
  () => oxyServices.getAccountStorageUsage()
144
147
  );
145
148
  },
146
- enabled: (options?.enabled !== false) && isAuthenticated,
149
+ enabled: (options?.enabled !== false) && isAuthenticated && !!activeSessionId,
147
150
  staleTime: 5 * 60 * 1000,
148
151
  gcTime: 30 * 60 * 1000,
149
152
  });
@@ -33,7 +33,7 @@ import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persi
33
33
  import { isDev } from '@oxyhq/core';
34
34
  import type { StorageInterface } from '../utils/storageHelpers';
35
35
 
36
- const QUERY_CACHE_KEY = 'oxy_query_cache_v2';
36
+ const QUERY_CACHE_KEY = 'oxy_query_cache_v3';
37
37
  const QUERY_CACHE_MAX_AGE = 30 * 24 * 60 * 60 * 1000; // 30 days
38
38
  const QUERY_PERSIST_THROTTLE_MS = 1_000;
39
39
 
@@ -50,7 +50,6 @@ const PERSISTED_QUERY_PREFIXES: ReadonlyArray<string> = [
50
50
  'sessions',
51
51
  'devices',
52
52
  'privacy',
53
- 'payments',
54
53
  ];
55
54
 
56
55
  /**
@@ -209,9 +208,10 @@ export const attachQueryPersistence = (
209
208
  return { unsubscribe, restored };
210
209
  };
211
210
 
212
- // Legacy v1 cache key — kept so we can opportunistically purge stale blobs
213
- // written by older builds. Safe to drop after a few releases.
214
- const LEGACY_QUERY_CACHE_KEYS: ReadonlyArray<string> = ['oxy_query_cache'];
211
+ // Legacy cache keys — kept so we can opportunistically purge stale blobs
212
+ // written by older builds. v2 may contain persisted payments data, so the
213
+ // active key is bumped to v3 and old blobs are only removed during explicit clears.
214
+ const LEGACY_QUERY_CACHE_KEYS: ReadonlyArray<string> = ['oxy_query_cache_v2', 'oxy_query_cache'];
215
215
 
216
216
  /**
217
217
  * Remove the persisted query+mutation cache (used on full sign-out / data
@@ -53,6 +53,27 @@ export interface AuthSession {
53
53
  expiresAt: number;
54
54
  }
55
55
 
56
+ /**
57
+ * Extended `POST /auth/session/create` response (the "Sign in with Oxy" handoff
58
+ * fields, Workstream C2). Both are optional so this hook degrades gracefully
59
+ * when the handoff backend is not yet deployed — the legacy `oxyauth://<token>`
60
+ * QR (`qrData`) remains the fallback.
61
+ */
62
+ interface AuthSessionCreateResponse {
63
+ /**
64
+ * Public, single-use authorize code carried in the QR / deep-link. NEVER the
65
+ * secret `sessionToken` — the approver resolves the requesting app's identity
66
+ * from this code server-side.
67
+ */
68
+ authorizeCode?: string;
69
+ /** Ready-to-render deep-link / universal-link string (`oxycommons://approve?...`). */
70
+ qrPayload?: string;
71
+ /** Session lifecycle status (e.g. `'pending'`). */
72
+ status?: string;
73
+ /** Server-authoritative expiry (epoch ms); the client-proposed value is the fallback. */
74
+ expiresAt?: number;
75
+ }
76
+
56
77
  /** Real-time auth-session socket payload (also matches the poll status shape). */
57
78
  interface AuthUpdatePayload {
58
79
  status: 'authorized' | 'cancelled' | 'expired';
@@ -76,6 +97,21 @@ export interface UseOxyAuthSessionResult {
76
97
  authSession: AuthSession | null;
77
98
  /** The QR payload string (`oxyauth://<token>`), or `''` when no session. */
78
99
  qrData: string;
100
+ /**
101
+ * The PUBLIC, single-use authorize code for the "Sign in with Oxy" handoff,
102
+ * or `null` when the handoff backend did not return one. The approver (the
103
+ * Oxy identity app) resolves the requesting app's identity from this code —
104
+ * it is safe to display; it is NOT the secret `sessionToken`.
105
+ */
106
+ authorizeCode: string | null;
107
+ /**
108
+ * The structured "Sign in with Oxy" deep-link payload
109
+ * (`oxycommons://approve?...`) to render in the cross-device QR and to open on
110
+ * the same device, or `null` when the handoff backend did not return one.
111
+ * Render this (preferred over `qrData`) in the QR and pass it to
112
+ * `Linking.openURL` for same-device approval.
113
+ */
114
+ qrPayload: string | null;
79
115
  /** `true` while the session is being created (initial spinner). */
80
116
  isLoading: boolean;
81
117
  /** A user-facing error message, or `null`. Drives the retry UI. */
@@ -89,6 +125,13 @@ export interface UseOxyAuthSessionResult {
89
125
  * This is the action behind the platform-primary "Continue with Oxy" button.
90
126
  */
91
127
  openAuthApproval: () => Promise<void>;
128
+ /**
129
+ * Same-device "Sign in with Oxy" handoff: deep-link to `qrPayload`
130
+ * (`oxycommons://approve?...`) so the native Oxy identity app opens directly
131
+ * to approve. No-op when no `qrPayload` was returned. The socket / poll still
132
+ * completes the sign-in once the approval lands.
133
+ */
134
+ openSameDeviceApproval: () => Promise<void>;
92
135
  /** Tear down the current session and create a fresh one (the retry action). */
93
136
  retry: () => void;
94
137
  /** Disconnect the socket and stop polling. Idempotent. */
@@ -198,6 +241,9 @@ export function useOxyAuthSession(
198
241
  const [isLoading, setIsLoading] = useState(true);
199
242
  const [error, setError] = useState<string | null>(null);
200
243
  const [isWaiting, setIsWaiting] = useState(false);
244
+ // "Sign in with Oxy" handoff fields surfaced from the `create` response.
245
+ const [authorizeCode, setAuthorizeCode] = useState<string | null>(null);
246
+ const [qrPayload, setQrPayload] = useState<string | null>(null);
201
247
 
202
248
  const socketRef = useRef<Socket | null>(null);
203
249
  const pollingIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
@@ -376,6 +422,9 @@ export function useOxyAuthSession(
376
422
  const generateAuthSession = useCallback(async () => {
377
423
  setIsLoading(true);
378
424
  setError(null);
425
+ // Reset the handoff fields for the fresh session (also clears them on retry).
426
+ setAuthorizeCode(null);
427
+ setQrPayload(null);
379
428
  isProcessingRef.current = false;
380
429
 
381
430
  // The cross-app device sign-in flow identifies the requesting app by its
@@ -393,8 +442,11 @@ export function useOxyAuthSession(
393
442
  const sessionToken = generateSessionToken();
394
443
  const expiresAt = Date.now() + AUTH_SESSION_EXPIRY_MS;
395
444
 
396
- // Register the auth session with the server.
397
- await oxyServices.makeRequest(
445
+ // Register the auth session with the server. The response carries the
446
+ // "Sign in with Oxy" handoff fields (public `authorizeCode` + structured
447
+ // `qrPayload`) when the handoff backend is deployed; both are optional, so
448
+ // the legacy `oxyauth://<token>` QR path keeps working without them.
449
+ const createResponse = await oxyServices.makeRequest<AuthSessionCreateResponse>(
398
450
  'POST',
399
451
  '/auth/session/create',
400
452
  { sessionToken, expiresAt, clientId },
@@ -402,6 +454,8 @@ export function useOxyAuthSession(
402
454
  );
403
455
 
404
456
  setAuthSession({ sessionToken, expiresAt });
457
+ setAuthorizeCode(createResponse?.authorizeCode ?? null);
458
+ setQrPayload(createResponse?.qrPayload ?? null);
405
459
  setIsWaiting(true);
406
460
 
407
461
  // Socket is the fast path; the poll is a transport-independent backstop
@@ -461,6 +515,23 @@ export function useOxyAuthSession(
461
515
  }
462
516
  }, [authSession, oxyServices]);
463
517
 
518
+ // Same-device "Sign in with Oxy" handoff: deep-link to the `qrPayload`
519
+ // (`oxycommons://approve?...`) so the native Oxy identity app opens directly
520
+ // to approve. The socket / poll already resolves the flow once the approval
521
+ // lands, so this only needs to launch the deep link. No-op when the handoff
522
+ // backend returned no `qrPayload`.
523
+ const openSameDeviceApproval = useCallback(async () => {
524
+ if (!qrPayload) {
525
+ return;
526
+ }
527
+ try {
528
+ await Linking.openURL(qrPayload);
529
+ } catch (err) {
530
+ debug.error('Unable to open the Oxy app for approval:', err);
531
+ setError('Unable to open the Oxy app. Scan the QR code from another device instead.');
532
+ }
533
+ }, [qrPayload]);
534
+
464
535
  // Tear down and recreate the session (the retry action).
465
536
  const retry = useCallback(() => {
466
537
  cleanup();
@@ -546,10 +617,13 @@ export function useOxyAuthSession(
546
617
  return {
547
618
  authSession,
548
619
  qrData,
620
+ authorizeCode,
621
+ qrPayload,
549
622
  isLoading,
550
623
  error,
551
624
  isWaiting,
552
625
  openAuthApproval,
626
+ openSameDeviceApproval,
553
627
  retry,
554
628
  cleanup,
555
629
  };
@@ -29,6 +29,9 @@ export interface ProfileUpdateData {
29
29
  links?: string[];
30
30
  linksMetadata?: ProfileLinkMetadata[];
31
31
  avatar?: string;
32
+ phone?: string;
33
+ address?: string;
34
+ birthday?: string;
32
35
  }
33
36
 
34
37
  type ProfileFieldValue = string | ProfileLocation[] | ProfileLinkMetadata[];
@@ -81,6 +84,15 @@ export const useProfileEditing = () => {
81
84
  if (updates.avatar !== undefined) {
82
85
  updateData.avatar = updates.avatar;
83
86
  }
87
+ if (updates.phone !== undefined) {
88
+ updateData.phone = updates.phone;
89
+ }
90
+ if (updates.address !== undefined) {
91
+ updateData.address = updates.address;
92
+ }
93
+ if (updates.birthday !== undefined) {
94
+ updateData.birthday = updates.birthday;
95
+ }
84
96
 
85
97
  // Handle name field
86
98
  if (updates.firstName !== undefined || updates.lastName !== undefined) {
@@ -124,6 +136,18 @@ export const useProfileEditing = () => {
124
136
  if (typeof value !== 'string') return false;
125
137
  updates.bio = value;
126
138
  break;
139
+ case 'phone':
140
+ if (typeof value !== 'string') return false;
141
+ updates.phone = value;
142
+ break;
143
+ case 'address':
144
+ if (typeof value !== 'string') return false;
145
+ updates.address = value;
146
+ break;
147
+ case 'birthday':
148
+ if (typeof value !== 'string') return false;
149
+ updates.birthday = value;
150
+ break;
127
151
  case 'location':
128
152
  if (!isProfileLocationArray(value)) return false;
129
153
  updates.locations = value;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import type { ApiError, User } from '@oxyhq/core';
2
+ import { isDev, type ApiError, type User } from '@oxyhq/core';
3
3
  import type { ClientSession } from '@oxyhq/core';
4
4
  import { mergeSessions, normalizeAndSortSessions, sessionsArraysEqual } from '@oxyhq/core';
5
5
  import { fetchSessionsWithFallback, validateSessionBatch } from '../utils/sessionHelpers';
@@ -30,7 +30,7 @@ export interface UseSessionManagementResult {
30
30
  sessions: ClientSession[];
31
31
  activeSessionId: string | null;
32
32
  setActiveSessionId: (sessionId: string | null) => void;
33
- updateSessions: (incoming: ClientSession[], options?: { merge?: boolean }) => void;
33
+ updateSessions: (incoming: ClientSession[], options?: { merge?: boolean; preserveSessionIds?: string[] }) => void;
34
34
  switchSession: (sessionId: string) => Promise<User>;
35
35
  refreshSessions: (activeUserId?: string) => Promise<void>;
36
36
  clearSessionState: () => Promise<void>;
@@ -86,7 +86,7 @@ export const useSessionManagement = ({
86
86
  } catch (error) {
87
87
  if (logger) {
88
88
  logger(DEFAULT_SAVE_ERROR_MESSAGE, error);
89
- } else if (__DEV__) {
89
+ } else if (isDev()) {
90
90
  console.warn('Failed to save session IDs:', error);
91
91
  }
92
92
  }
@@ -95,14 +95,17 @@ export const useSessionManagement = ({
95
95
  );
96
96
 
97
97
  const updateSessions = useCallback(
98
- (incoming: ClientSession[], options: { merge?: boolean } = {}): void => {
98
+ (incoming: ClientSession[], options: { merge?: boolean; preserveSessionIds?: string[] } = {}): void => {
99
99
  setSessions((prevSessions) => {
100
100
  const processed = options.merge
101
101
  ? mergeSessions(prevSessions, incoming, activeSessionIdRef.current, false)
102
102
  : normalizeAndSortSessions(incoming, activeSessionIdRef.current, false);
103
103
 
104
104
  if (storage) {
105
- void saveSessionIds(processed.map((session) => session.sessionId));
105
+ void saveSessionIds([
106
+ ...processed.map((session) => session.sessionId),
107
+ ...(options.preserveSessionIds ?? []),
108
+ ]);
106
109
  }
107
110
 
108
111
  if (sessionsArraysEqual(prevSessions, processed)) {
@@ -309,7 +312,7 @@ export const useSessionManagement = ({
309
312
  });
310
313
  updateSessions(deviceSessions, { merge: true });
311
314
  } catch (error) {
312
- if (__DEV__) {
315
+ if (isDev()) {
313
316
  console.warn('Failed to synchronize sessions after switch:', error);
314
317
  }
315
318
  }