@oxy.so/services 14.24.2 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1273) hide show
  1. package/README.md +7 -6
  2. package/android/src/main/java/so/oxy/security/OxyCallerPolicy.kt +4 -0
  3. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  5. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -14
  6. package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  7. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  8. package/lib/commonjs/assets/fonts/icons/manifest.json +5 -14
  9. package/lib/commonjs/index.js +80 -211
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/ui/boot/runProviderColdBoot.js +3 -2
  12. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  13. package/lib/commonjs/ui/client.js +31 -95
  14. package/lib/commonjs/ui/client.js.map +1 -1
  15. package/lib/commonjs/ui/components/AccountInvitationAcceptance.js +14 -2
  16. package/lib/commonjs/ui/components/AccountInvitationAcceptance.js.map +1 -1
  17. package/lib/commonjs/ui/components/AccountLanguageBoundary.js +1 -1
  18. package/lib/commonjs/ui/components/AccountLanguageBoundary.js.map +1 -1
  19. package/lib/commonjs/ui/components/AvatarCameraBadge.js +10 -4
  20. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
  21. package/lib/commonjs/ui/components/BenefitList.js +0 -4
  22. package/lib/commonjs/ui/components/BenefitList.js.map +1 -1
  23. package/lib/commonjs/ui/components/DisplayCurrencySelector.js +2 -2
  24. package/lib/commonjs/ui/components/DisplayCurrencySelector.js.map +1 -1
  25. package/lib/commonjs/ui/components/ExpoImage.macos.js +2 -6
  26. package/lib/commonjs/ui/components/ExpoImage.macos.js.map +1 -1
  27. package/lib/commonjs/ui/components/FollowButton.js +10 -14
  28. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  29. package/lib/commonjs/ui/components/FollowTargetButton.js +4 -4
  30. package/lib/commonjs/ui/components/FollowTargetButton.js.map +1 -1
  31. package/lib/commonjs/ui/components/OxyAuthChooser.js +9 -13
  32. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  33. package/lib/commonjs/ui/components/OxyAuthPrompt.js +5 -4
  34. package/lib/commonjs/ui/components/OxyAuthPrompt.js.map +1 -1
  35. package/lib/commonjs/ui/components/OxyProvider.js +64 -142
  36. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  37. package/lib/commonjs/ui/components/OxySignInButton.js +2 -9
  38. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  39. package/lib/commonjs/ui/components/ProfileButton.js +4 -7
  40. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  41. package/lib/commonjs/ui/components/RequireOxyAuth.js +2 -9
  42. package/lib/commonjs/ui/components/RequireOxyAuth.js.map +1 -1
  43. package/lib/commonjs/ui/components/SurfaceScreen.js +2 -2
  44. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  45. package/lib/commonjs/ui/components/accountSettings/AccountCategoriesSection.js +12 -2
  46. package/lib/commonjs/ui/components/accountSettings/AccountCategoriesSection.js.map +1 -1
  47. package/lib/commonjs/ui/components/accountSettings/AccountSettings.js +110 -66
  48. package/lib/commonjs/ui/components/accountSettings/AccountSettings.js.map +1 -1
  49. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +88 -22
  50. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  51. package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js +33 -13
  52. package/lib/commonjs/ui/components/fileManagement/FileAppAccessSection.js.map +1 -1
  53. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +61 -16
  54. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  55. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +174 -45
  56. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  57. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +93 -16
  58. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  59. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +29 -6
  60. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  61. package/lib/commonjs/ui/components/organizations/OrganizationClaimReview.js +78 -84
  62. package/lib/commonjs/ui/components/organizations/OrganizationClaimReview.js.map +1 -1
  63. package/lib/commonjs/ui/components/organizations/OrganizationClaims.js +32 -41
  64. package/lib/commonjs/ui/components/organizations/OrganizationClaims.js.map +1 -1
  65. package/lib/commonjs/ui/components/organizations/OrganizationDirectorySearch.js +93 -91
  66. package/lib/commonjs/ui/components/organizations/OrganizationDirectorySearch.js.map +1 -1
  67. package/lib/commonjs/ui/components/organizations/OrganizationSettings.js +35 -32
  68. package/lib/commonjs/ui/components/organizations/OrganizationSettings.js.map +1 -1
  69. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +33 -44
  70. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  71. package/lib/commonjs/ui/components/setupFlow/OxySetupFlow.js +44 -13
  72. package/lib/commonjs/ui/components/setupFlow/OxySetupFlow.js.map +1 -1
  73. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +14 -6
  74. package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -1
  75. package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +104 -26
  76. package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -1
  77. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js +3 -8
  78. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  79. package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js +2 -2
  80. package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
  81. package/lib/commonjs/ui/components/signIn/OxyEmailAccountChoice.js +68 -17
  82. package/lib/commonjs/ui/components/signIn/OxyEmailAccountChoice.js.map +1 -1
  83. package/lib/commonjs/ui/components/signIn/OxyEmailPanel.js +7 -11
  84. package/lib/commonjs/ui/components/signIn/OxyEmailPanel.js.map +1 -1
  85. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +2 -2
  86. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  87. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +3 -8
  88. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  89. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +15 -12
  90. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
  91. package/lib/commonjs/ui/components/signIn/OxySignInSecurityPanel.js +5 -5
  92. package/lib/commonjs/ui/components/signIn/OxySignInSecurityPanel.js.map +1 -1
  93. package/lib/commonjs/ui/components/signIn/SessionsSection.js +55 -30
  94. package/lib/commonjs/ui/components/signIn/SessionsSection.js.map +1 -1
  95. package/lib/commonjs/ui/components/signIn/accountSecurityState.js +4 -4
  96. package/lib/commonjs/ui/components/signIn/accountSecurityState.js.map +1 -1
  97. package/lib/commonjs/ui/components/supervision/PersonPicker.js +7 -14
  98. package/lib/commonjs/ui/components/supervision/PersonPicker.js.map +1 -1
  99. package/lib/commonjs/ui/context/OxyContext.js +61 -118
  100. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  101. package/lib/commonjs/ui/context/OxyHostedContext.js +41 -60
  102. package/lib/commonjs/ui/context/OxyHostedContext.js.map +1 -1
  103. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +1 -3
  104. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  105. package/lib/commonjs/ui/data/account.js +570 -0
  106. package/lib/commonjs/ui/data/account.js.map +1 -0
  107. package/lib/commonjs/ui/data/accountData.js +75 -0
  108. package/lib/commonjs/ui/data/accountData.js.map +1 -0
  109. package/lib/commonjs/ui/data/answer.js +65 -0
  110. package/lib/commonjs/ui/data/answer.js.map +1 -0
  111. package/lib/commonjs/ui/data/assets.js +194 -0
  112. package/lib/commonjs/ui/data/assets.js.map +1 -0
  113. package/lib/commonjs/ui/data/deviceStorage.js +158 -0
  114. package/lib/commonjs/ui/data/deviceStorage.js.map +1 -0
  115. package/lib/commonjs/ui/data/displayRates.js +40 -0
  116. package/lib/commonjs/ui/data/displayRates.js.map +1 -0
  117. package/lib/commonjs/ui/data/domains.js +52 -0
  118. package/lib/commonjs/ui/data/domains.js.map +1 -0
  119. package/lib/commonjs/ui/data/files.js +399 -0
  120. package/lib/commonjs/ui/data/files.js.map +1 -0
  121. package/lib/commonjs/ui/data/follow.js +616 -0
  122. package/lib/commonjs/ui/data/follow.js.map +1 -0
  123. package/lib/commonjs/ui/data/organizations.js +205 -0
  124. package/lib/commonjs/ui/data/organizations.js.map +1 -0
  125. package/lib/commonjs/ui/data/payments.js +83 -0
  126. package/lib/commonjs/ui/data/payments.js.map +1 -0
  127. package/lib/commonjs/ui/data/persister.js +17 -0
  128. package/lib/commonjs/ui/data/persister.js.map +1 -0
  129. package/lib/commonjs/ui/data/persister.native.js +24 -0
  130. package/lib/commonjs/ui/data/persister.native.js.map +1 -0
  131. package/lib/commonjs/ui/data/readOptions.js +57 -0
  132. package/lib/commonjs/ui/data/readOptions.js.map +1 -0
  133. package/lib/commonjs/ui/data/security.js +122 -0
  134. package/lib/commonjs/ui/data/security.js.map +1 -0
  135. package/lib/commonjs/ui/data/sessions.js +252 -0
  136. package/lib/commonjs/ui/data/sessions.js.map +1 -0
  137. package/lib/commonjs/ui/data/supervision.js +106 -0
  138. package/lib/commonjs/ui/data/supervision.js.map +1 -0
  139. package/lib/commonjs/ui/data/trust.js +70 -0
  140. package/lib/commonjs/ui/data/trust.js.map +1 -0
  141. package/lib/commonjs/ui/data/user.js +103 -0
  142. package/lib/commonjs/ui/data/user.js.map +1 -0
  143. package/lib/commonjs/ui/{hooks/queries/userCache.js → data/userRecord.js} +31 -144
  144. package/lib/commonjs/ui/data/userRecord.js.map +1 -0
  145. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +118 -657
  146. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  147. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +45 -155
  148. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  149. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +84 -243
  150. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  151. package/lib/commonjs/ui/hooks/queries/useAuthMethods.js +13 -28
  152. package/lib/commonjs/ui/hooks/queries/useAuthMethods.js.map +1 -1
  153. package/lib/commonjs/ui/hooks/queries/useFileQueries.js +97 -159
  154. package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -1
  155. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +33 -108
  156. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  157. package/lib/commonjs/ui/hooks/queries/usePersonalPlans.js +6 -18
  158. package/lib/commonjs/ui/hooks/queries/usePersonalPlans.js.map +1 -1
  159. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +12 -59
  160. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  161. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +18 -108
  162. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  163. package/lib/commonjs/ui/hooks/queries/useSupervision.js +26 -36
  164. package/lib/commonjs/ui/hooks/queries/useSupervision.js.map +1 -1
  165. package/lib/commonjs/ui/hooks/useAccountColor.js +3 -3
  166. package/lib/commonjs/ui/hooks/useAccountColor.js.map +1 -1
  167. package/lib/commonjs/ui/hooks/useAccountTheme.js +45 -55
  168. package/lib/commonjs/ui/hooks/useAccountTheme.js.map +1 -1
  169. package/lib/commonjs/ui/hooks/useAssets.js +86 -76
  170. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  171. package/lib/commonjs/ui/hooks/useAvatarPicker.js +9 -8
  172. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  173. package/lib/commonjs/ui/hooks/useDisplayCurrency.js +24 -44
  174. package/lib/commonjs/ui/hooks/useDisplayCurrency.js.map +1 -1
  175. package/lib/commonjs/ui/hooks/useDisplayPrice.js +19 -16
  176. package/lib/commonjs/ui/hooks/useDisplayPrice.js.map +1 -1
  177. package/lib/commonjs/ui/hooks/useFollow.js +156 -245
  178. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  179. package/lib/commonjs/ui/hooks/useFollowTarget.js +53 -105
  180. package/lib/commonjs/ui/hooks/useFollowTarget.js.map +1 -1
  181. package/lib/commonjs/ui/hooks/useMutationStatus.js +12 -68
  182. package/lib/commonjs/ui/hooks/useMutationStatus.js.map +1 -1
  183. package/lib/commonjs/ui/hooks/useOnlineStatus.js +7 -11
  184. package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
  185. package/lib/commonjs/ui/hooks/useProfileEditing.js +3 -3
  186. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  187. package/lib/commonjs/ui/hooks/useResolvedFileUrls.js +15 -70
  188. package/lib/commonjs/ui/hooks/useResolvedFileUrls.js.map +1 -1
  189. package/lib/commonjs/ui/hooks/useSessionManagement.js +8 -74
  190. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  191. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +0 -9
  192. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  193. package/lib/commonjs/ui/index.js +3 -9
  194. package/lib/commonjs/ui/index.js.map +1 -1
  195. package/lib/commonjs/ui/navigation/surfaceNavStack.js +39 -17
  196. package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
  197. package/lib/commonjs/ui/runtime/activeRuntime.js +35 -0
  198. package/lib/commonjs/ui/runtime/activeRuntime.js.map +1 -0
  199. package/lib/commonjs/ui/runtime/createOxyRuntime.js +0 -3
  200. package/lib/commonjs/ui/runtime/createOxyRuntime.js.map +1 -1
  201. package/lib/commonjs/ui/screens/AccountMembersScreen.js +242 -194
  202. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  203. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +71 -11
  204. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  205. package/lib/commonjs/ui/screens/AppInfoScreen.js +8 -1
  206. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  207. package/lib/commonjs/ui/screens/AvatarCropScreen.js +37 -74
  208. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  209. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +13 -2
  210. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
  211. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +42 -16
  212. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  213. package/lib/commonjs/ui/screens/CreateAccountScreen.js +60 -12
  214. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  215. package/lib/commonjs/ui/screens/DomainsScreen.js +84 -65
  216. package/lib/commonjs/ui/screens/DomainsScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +25 -4
  218. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  219. package/lib/commonjs/ui/screens/EditProfileScreen.js +8 -1
  220. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  221. package/lib/commonjs/ui/screens/FileManagementScreen.js +178 -97
  222. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  223. package/lib/commonjs/ui/screens/FileTrashScreen.js +67 -33
  224. package/lib/commonjs/ui/screens/FileTrashScreen.js.map +1 -1
  225. package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -1
  226. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  227. package/lib/commonjs/ui/screens/HistoryViewScreen.js +14 -2
  228. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  229. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +26 -7
  230. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  231. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +40 -7
  232. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  233. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +7 -1
  234. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  235. package/lib/commonjs/ui/screens/ManageAccountScreen.js +34 -7
  236. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  237. package/lib/commonjs/ui/screens/NotificationsScreen.js +9 -3
  238. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  239. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +23 -4
  240. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  241. package/lib/commonjs/ui/screens/PreferencesScreen.js +11 -5
  242. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  243. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +39 -48
  244. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  245. package/lib/commonjs/ui/screens/ProfileLinkForm.js +19 -3
  246. package/lib/commonjs/ui/screens/ProfileLinkForm.js.map +1 -1
  247. package/lib/commonjs/ui/screens/ProfileScreen.js +68 -69
  248. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  249. package/lib/commonjs/ui/screens/ReportBugScreen.js +14 -2
  250. package/lib/commonjs/ui/screens/ReportBugScreen.js.map +1 -1
  251. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +12 -5
  252. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  253. package/lib/commonjs/ui/screens/SignInSecurityScreen.js +7 -1
  254. package/lib/commonjs/ui/screens/SignInSecurityScreen.js.map +1 -1
  255. package/lib/commonjs/ui/screens/SupervisionScreen.js +50 -118
  256. package/lib/commonjs/ui/screens/SupervisionScreen.js.map +1 -1
  257. package/lib/commonjs/ui/screens/UserListScreen.js +55 -14
  258. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  259. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +16 -8
  260. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  261. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +25 -7
  262. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  263. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +51 -15
  264. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
  265. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +103 -15
  266. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  267. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +28 -5
  268. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
  269. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +14 -13
  270. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  271. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +47 -9
  272. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  273. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +61 -30
  274. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  275. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +26 -4
  276. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  277. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +55 -14
  278. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  279. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +118 -42
  280. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  281. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +25 -12
  282. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  283. package/lib/commonjs/ui/server.js +1 -4
  284. package/lib/commonjs/ui/server.js.map +1 -1
  285. package/lib/commonjs/ui/utils/netConnectivity.js +9 -17
  286. package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -1
  287. package/lib/commonjs/ui/utils/storageHelpers.js +6 -72
  288. package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
  289. package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  290. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  291. package/lib/module/assets/assets/fonts/icons/manifest.json +5 -14
  292. package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  293. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  294. package/lib/module/assets/fonts/icons/manifest.json +5 -14
  295. package/lib/module/index.js +23 -36
  296. package/lib/module/index.js.map +1 -1
  297. package/lib/module/ui/boot/runProviderColdBoot.js +4 -3
  298. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  299. package/lib/module/ui/client.js +12 -12
  300. package/lib/module/ui/client.js.map +1 -1
  301. package/lib/module/ui/components/AccountInvitationAcceptance.js +14 -2
  302. package/lib/module/ui/components/AccountInvitationAcceptance.js.map +1 -1
  303. package/lib/module/ui/components/AccountLanguageBoundary.js +1 -1
  304. package/lib/module/ui/components/AccountLanguageBoundary.js.map +1 -1
  305. package/lib/module/ui/components/AvatarCameraBadge.js +10 -3
  306. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
  307. package/lib/module/ui/components/BenefitList.js +0 -4
  308. package/lib/module/ui/components/BenefitList.js.map +1 -1
  309. package/lib/module/ui/components/DisplayCurrencySelector.js +2 -2
  310. package/lib/module/ui/components/DisplayCurrencySelector.js.map +1 -1
  311. package/lib/module/ui/components/ExpoImage.macos.js +2 -6
  312. package/lib/module/ui/components/ExpoImage.macos.js.map +1 -1
  313. package/lib/module/ui/components/FollowButton.js +10 -14
  314. package/lib/module/ui/components/FollowButton.js.map +1 -1
  315. package/lib/module/ui/components/FollowTargetButton.js +4 -4
  316. package/lib/module/ui/components/FollowTargetButton.js.map +1 -1
  317. package/lib/module/ui/components/OxyAuthChooser.js +9 -13
  318. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  319. package/lib/module/ui/components/OxyAuthPrompt.js +5 -4
  320. package/lib/module/ui/components/OxyAuthPrompt.js.map +1 -1
  321. package/lib/module/ui/components/OxyProvider.js +65 -143
  322. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  323. package/lib/module/ui/components/OxySignInButton.js +2 -9
  324. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  325. package/lib/module/ui/components/ProfileButton.js +1 -4
  326. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  327. package/lib/module/ui/components/RequireOxyAuth.js +2 -9
  328. package/lib/module/ui/components/RequireOxyAuth.js.map +1 -1
  329. package/lib/module/ui/components/SurfaceScreen.js +2 -2
  330. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  331. package/lib/module/ui/components/accountSettings/AccountCategoriesSection.js +13 -3
  332. package/lib/module/ui/components/accountSettings/AccountCategoriesSection.js.map +1 -1
  333. package/lib/module/ui/components/accountSettings/AccountSettings.js +111 -66
  334. package/lib/module/ui/components/accountSettings/AccountSettings.js.map +1 -1
  335. package/lib/module/ui/components/authChooser/AccountsMenuView.js +78 -12
  336. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  337. package/lib/module/ui/components/fileManagement/FileAppAccessSection.js +34 -13
  338. package/lib/module/ui/components/fileManagement/FileAppAccessSection.js.map +1 -1
  339. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +62 -16
  340. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  341. package/lib/module/ui/components/fileManagement/FileViewer.js +175 -45
  342. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  343. package/lib/module/ui/components/fileManagement/UploadPreview.js +94 -16
  344. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  345. package/lib/module/ui/components/modals/DeleteAccountModal.js +30 -6
  346. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  347. package/lib/module/ui/components/organizations/OrganizationClaimReview.js +79 -85
  348. package/lib/module/ui/components/organizations/OrganizationClaimReview.js.map +1 -1
  349. package/lib/module/ui/components/organizations/OrganizationClaims.js +32 -41
  350. package/lib/module/ui/components/organizations/OrganizationClaims.js.map +1 -1
  351. package/lib/module/ui/components/organizations/OrganizationDirectorySearch.js +94 -92
  352. package/lib/module/ui/components/organizations/OrganizationDirectorySearch.js.map +1 -1
  353. package/lib/module/ui/components/organizations/OrganizationSettings.js +36 -33
  354. package/lib/module/ui/components/organizations/OrganizationSettings.js.map +1 -1
  355. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +33 -44
  356. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  357. package/lib/module/ui/components/setupFlow/OxySetupFlow.js +40 -9
  358. package/lib/module/ui/components/setupFlow/OxySetupFlow.js.map +1 -1
  359. package/lib/module/ui/components/signIn/OxyAccountPicker.js +14 -5
  360. package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -1
  361. package/lib/module/ui/components/signIn/OxyAuthScreen.js +98 -21
  362. package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -1
  363. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js +3 -8
  364. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  365. package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js +2 -2
  366. package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
  367. package/lib/module/ui/components/signIn/OxyEmailAccountChoice.js +64 -12
  368. package/lib/module/ui/components/signIn/OxyEmailAccountChoice.js.map +1 -1
  369. package/lib/module/ui/components/signIn/OxyEmailPanel.js +7 -11
  370. package/lib/module/ui/components/signIn/OxyEmailPanel.js.map +1 -1
  371. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +2 -2
  372. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  373. package/lib/module/ui/components/signIn/OxyPasswordPanel.js +3 -8
  374. package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  375. package/lib/module/ui/components/signIn/OxySignInPanel.js +16 -13
  376. package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
  377. package/lib/module/ui/components/signIn/OxySignInSecurityPanel.js +5 -5
  378. package/lib/module/ui/components/signIn/OxySignInSecurityPanel.js.map +1 -1
  379. package/lib/module/ui/components/signIn/SessionsSection.js +55 -30
  380. package/lib/module/ui/components/signIn/SessionsSection.js.map +1 -1
  381. package/lib/module/ui/components/signIn/accountSecurityState.js +4 -4
  382. package/lib/module/ui/components/signIn/accountSecurityState.js.map +1 -1
  383. package/lib/module/ui/components/supervision/PersonPicker.js +7 -14
  384. package/lib/module/ui/components/supervision/PersonPicker.js.map +1 -1
  385. package/lib/module/ui/context/OxyContext.js +62 -119
  386. package/lib/module/ui/context/OxyContext.js.map +1 -1
  387. package/lib/module/ui/context/OxyHostedContext.js +41 -60
  388. package/lib/module/ui/context/OxyHostedContext.js.map +1 -1
  389. package/lib/module/ui/context/hooks/useAuthOperations.js +1 -3
  390. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  391. package/lib/module/ui/data/account.js +563 -0
  392. package/lib/module/ui/data/account.js.map +1 -0
  393. package/lib/module/ui/data/accountData.js +69 -0
  394. package/lib/module/ui/data/accountData.js.map +1 -0
  395. package/lib/module/ui/data/answer.js +59 -0
  396. package/lib/module/ui/data/answer.js.map +1 -0
  397. package/lib/module/ui/data/assets.js +176 -0
  398. package/lib/module/ui/data/assets.js.map +1 -0
  399. package/lib/module/ui/data/deviceStorage.js +152 -0
  400. package/lib/module/ui/data/deviceStorage.js.map +1 -0
  401. package/lib/module/ui/data/displayRates.js +36 -0
  402. package/lib/module/ui/data/displayRates.js.map +1 -0
  403. package/lib/module/ui/data/domains.js +47 -0
  404. package/lib/module/ui/data/domains.js.map +1 -0
  405. package/lib/module/ui/data/files.js +380 -0
  406. package/lib/module/ui/data/files.js.map +1 -0
  407. package/lib/module/ui/data/follow.js +585 -0
  408. package/lib/module/ui/data/follow.js.map +1 -0
  409. package/lib/module/ui/data/organizations.js +198 -0
  410. package/lib/module/ui/data/organizations.js.map +1 -0
  411. package/lib/module/ui/data/payments.js +78 -0
  412. package/lib/module/ui/data/payments.js.map +1 -0
  413. package/lib/module/ui/data/persister.js +14 -0
  414. package/lib/module/ui/data/persister.js.map +1 -0
  415. package/lib/module/ui/data/persister.native.js +20 -0
  416. package/lib/module/ui/data/persister.native.js.map +1 -0
  417. package/lib/module/ui/data/readOptions.js +51 -0
  418. package/lib/module/ui/data/readOptions.js.map +1 -0
  419. package/lib/module/ui/data/security.js +117 -0
  420. package/lib/module/ui/data/security.js.map +1 -0
  421. package/lib/module/ui/data/sessions.js +247 -0
  422. package/lib/module/ui/data/sessions.js.map +1 -0
  423. package/lib/module/ui/data/supervision.js +103 -0
  424. package/lib/module/ui/data/supervision.js.map +1 -0
  425. package/lib/module/ui/data/trust.js +66 -0
  426. package/lib/module/ui/data/trust.js.map +1 -0
  427. package/lib/module/ui/data/user.js +96 -0
  428. package/lib/module/ui/data/user.js.map +1 -0
  429. package/lib/module/ui/{hooks/queries/userCache.js → data/userRecord.js} +31 -146
  430. package/lib/module/ui/data/userRecord.js.map +1 -0
  431. package/lib/module/ui/hooks/mutations/useAccountMutations.js +116 -654
  432. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  433. package/lib/module/ui/hooks/mutations/useServicesMutations.js +45 -155
  434. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  435. package/lib/module/ui/hooks/queries/useAccountQueries.js +80 -238
  436. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  437. package/lib/module/ui/hooks/queries/useAuthMethods.js +13 -28
  438. package/lib/module/ui/hooks/queries/useAuthMethods.js.map +1 -1
  439. package/lib/module/ui/hooks/queries/useFileQueries.js +93 -149
  440. package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -1
  441. package/lib/module/ui/hooks/queries/usePaymentQueries.js +34 -108
  442. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  443. package/lib/module/ui/hooks/queries/usePersonalPlans.js +6 -18
  444. package/lib/module/ui/hooks/queries/usePersonalPlans.js.map +1 -1
  445. package/lib/module/ui/hooks/queries/useSecurityQueries.js +13 -59
  446. package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  447. package/lib/module/ui/hooks/queries/useServicesQueries.js +18 -108
  448. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  449. package/lib/module/ui/hooks/queries/useSupervision.js +26 -34
  450. package/lib/module/ui/hooks/queries/useSupervision.js.map +1 -1
  451. package/lib/module/ui/hooks/useAccountColor.js +3 -3
  452. package/lib/module/ui/hooks/useAccountColor.js.map +1 -1
  453. package/lib/module/ui/hooks/useAccountTheme.js +45 -55
  454. package/lib/module/ui/hooks/useAccountTheme.js.map +1 -1
  455. package/lib/module/ui/hooks/useAssets.js +87 -77
  456. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  457. package/lib/module/ui/hooks/useAvatarPicker.js +9 -8
  458. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  459. package/lib/module/ui/hooks/useDisplayCurrency.js +25 -45
  460. package/lib/module/ui/hooks/useDisplayCurrency.js.map +1 -1
  461. package/lib/module/ui/hooks/useDisplayPrice.js +20 -17
  462. package/lib/module/ui/hooks/useDisplayPrice.js.map +1 -1
  463. package/lib/module/ui/hooks/useFollow.js +153 -243
  464. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  465. package/lib/module/ui/hooks/useFollowTarget.js +50 -103
  466. package/lib/module/ui/hooks/useFollowTarget.js.map +1 -1
  467. package/lib/module/ui/hooks/useMutationStatus.js +13 -69
  468. package/lib/module/ui/hooks/useMutationStatus.js.map +1 -1
  469. package/lib/module/ui/hooks/useOnlineStatus.js +7 -11
  470. package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
  471. package/lib/module/ui/hooks/useProfileEditing.js +3 -3
  472. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  473. package/lib/module/ui/hooks/useResolvedFileUrls.js +15 -69
  474. package/lib/module/ui/hooks/useResolvedFileUrls.js.map +1 -1
  475. package/lib/module/ui/hooks/useSessionManagement.js +9 -75
  476. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  477. package/lib/module/ui/icons/subsetGlyphMaps.js +0 -9
  478. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  479. package/lib/module/ui/index.js +2 -8
  480. package/lib/module/ui/index.js.map +1 -1
  481. package/lib/module/ui/navigation/surfaceNavStack.js +38 -17
  482. package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
  483. package/lib/module/ui/runtime/activeRuntime.js +30 -0
  484. package/lib/module/ui/runtime/activeRuntime.js.map +1 -0
  485. package/lib/module/ui/runtime/createOxyRuntime.js +0 -3
  486. package/lib/module/ui/runtime/createOxyRuntime.js.map +1 -1
  487. package/lib/module/ui/screens/AccountMembersScreen.js +244 -195
  488. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  489. package/lib/module/ui/screens/AccountVerificationScreen.js +73 -12
  490. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  491. package/lib/module/ui/screens/AppInfoScreen.js +9 -2
  492. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  493. package/lib/module/ui/screens/AvatarCropScreen.js +37 -74
  494. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  495. package/lib/module/ui/screens/ChangeAvatarScreen.js +14 -3
  496. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
  497. package/lib/module/ui/screens/ConnectedAppsScreen.js +43 -16
  498. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  499. package/lib/module/ui/screens/CreateAccountScreen.js +61 -12
  500. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  501. package/lib/module/ui/screens/DomainsScreen.js +85 -65
  502. package/lib/module/ui/screens/DomainsScreen.js.map +1 -1
  503. package/lib/module/ui/screens/EditProfileFieldScreen.js +26 -5
  504. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  505. package/lib/module/ui/screens/EditProfileScreen.js +9 -2
  506. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  507. package/lib/module/ui/screens/FileManagementScreen.js +178 -97
  508. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  509. package/lib/module/ui/screens/FileTrashScreen.js +69 -35
  510. package/lib/module/ui/screens/FileTrashScreen.js.map +1 -1
  511. package/lib/module/ui/screens/HelpSupportScreen.js +8 -2
  512. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  513. package/lib/module/ui/screens/HistoryViewScreen.js +15 -2
  514. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  515. package/lib/module/ui/screens/LanguageSelectorScreen.js +27 -7
  516. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  517. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +41 -7
  518. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  519. package/lib/module/ui/screens/LegalDocumentsScreen.js +8 -2
  520. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  521. package/lib/module/ui/screens/ManageAccountScreen.js +35 -7
  522. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  523. package/lib/module/ui/screens/NotificationsScreen.js +10 -4
  524. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  525. package/lib/module/ui/screens/PaymentGatewayScreen.js +25 -5
  526. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  527. package/lib/module/ui/screens/PreferencesScreen.js +12 -6
  528. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  529. package/lib/module/ui/screens/PrivacySettingsScreen.js +41 -49
  530. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  531. package/lib/module/ui/screens/ProfileLinkForm.js +20 -4
  532. package/lib/module/ui/screens/ProfileLinkForm.js.map +1 -1
  533. package/lib/module/ui/screens/ProfileScreen.js +70 -70
  534. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  535. package/lib/module/ui/screens/ReportBugScreen.js +14 -2
  536. package/lib/module/ui/screens/ReportBugScreen.js.map +1 -1
  537. package/lib/module/ui/screens/SearchSettingsScreen.js +13 -6
  538. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  539. package/lib/module/ui/screens/SignInSecurityScreen.js +8 -2
  540. package/lib/module/ui/screens/SignInSecurityScreen.js.map +1 -1
  541. package/lib/module/ui/screens/SupervisionScreen.js +51 -119
  542. package/lib/module/ui/screens/SupervisionScreen.js.map +1 -1
  543. package/lib/module/ui/screens/UserListScreen.js +57 -15
  544. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  545. package/lib/module/ui/screens/WelcomeNewUserScreen.js +18 -9
  546. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  547. package/lib/module/ui/screens/fileManagement/FileLibraryError.js +26 -8
  548. package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  549. package/lib/module/ui/screens/fileManagement/FileListSection.js +52 -16
  550. package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
  551. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +104 -16
  552. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  553. package/lib/module/ui/screens/fileManagement/UploadBar.js +29 -6
  554. package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
  555. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +14 -13
  556. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  557. package/lib/module/ui/screens/trust/TrustAboutScreen.js +49 -10
  558. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  559. package/lib/module/ui/screens/trust/TrustCenterScreen.js +62 -30
  560. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  561. package/lib/module/ui/screens/trust/TrustFAQScreen.js +26 -4
  562. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  563. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +57 -15
  564. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  565. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +120 -43
  566. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  567. package/lib/module/ui/screens/trust/TrustRulesScreen.js +26 -12
  568. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  569. package/lib/module/ui/server.js +0 -3
  570. package/lib/module/ui/server.js.map +1 -1
  571. package/lib/module/ui/utils/netConnectivity.js +9 -16
  572. package/lib/module/ui/utils/netConnectivity.js.map +1 -1
  573. package/lib/module/ui/utils/storageHelpers.js +5 -70
  574. package/lib/module/ui/utils/storageHelpers.js.map +1 -1
  575. package/lib/typescript/commonjs/index.d.ts +16 -14
  576. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  577. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  578. package/lib/typescript/commonjs/ui/client.d.ts +11 -10
  579. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  580. package/lib/typescript/commonjs/ui/components/AccountInvitationAcceptance.d.ts.map +1 -1
  581. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -1
  582. package/lib/typescript/commonjs/ui/components/BenefitList.d.ts +0 -2
  583. package/lib/typescript/commonjs/ui/components/BenefitList.d.ts.map +1 -1
  584. package/lib/typescript/commonjs/ui/components/ExpoImage.macos.d.ts +1 -3
  585. package/lib/typescript/commonjs/ui/components/ExpoImage.macos.d.ts.map +1 -1
  586. package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
  587. package/lib/typescript/commonjs/ui/components/FollowTargetButton.d.ts.map +1 -1
  588. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  589. package/lib/typescript/commonjs/ui/components/OxyAuthPrompt.d.ts +1 -1
  590. package/lib/typescript/commonjs/ui/components/OxyAuthPrompt.d.ts.map +1 -1
  591. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +1 -1
  592. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  593. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  594. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +1 -7
  595. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  596. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts.map +1 -1
  597. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +1 -1
  598. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  599. package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts +2 -2
  600. package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
  601. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  602. package/lib/typescript/commonjs/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -1
  603. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  604. package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  605. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  606. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  607. package/lib/typescript/commonjs/ui/components/organizations/OrganizationClaimReview.d.ts.map +1 -1
  608. package/lib/typescript/commonjs/ui/components/organizations/OrganizationClaims.d.ts.map +1 -1
  609. package/lib/typescript/commonjs/ui/components/organizations/OrganizationDirectorySearch.d.ts.map +1 -1
  610. package/lib/typescript/commonjs/ui/components/organizations/OrganizationSettings.d.ts.map +1 -1
  611. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  612. package/lib/typescript/commonjs/ui/components/setupFlow/OxySetupFlow.d.ts.map +1 -1
  613. package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
  614. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +9 -5
  615. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
  616. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -1
  617. package/lib/typescript/commonjs/ui/components/signIn/OxyEmailAccountChoice.d.ts.map +1 -1
  618. package/lib/typescript/commonjs/ui/components/signIn/OxyEmailPanel.d.ts.map +1 -1
  619. package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
  620. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  621. package/lib/typescript/commonjs/ui/components/signIn/SessionsSection.d.ts.map +1 -1
  622. package/lib/typescript/commonjs/ui/components/signIn/accountSecurityState.d.ts +3 -3
  623. package/lib/typescript/commonjs/ui/components/signIn/accountSecurityState.d.ts.map +1 -1
  624. package/lib/typescript/commonjs/ui/components/supervision/PersonPicker.d.ts.map +1 -1
  625. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +1 -1
  626. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  627. package/lib/typescript/commonjs/ui/context/OxyHostedContext.d.ts.map +1 -1
  628. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +1 -2
  629. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  630. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +0 -9
  631. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  632. package/lib/typescript/commonjs/ui/data/account.d.ts +261 -0
  633. package/lib/typescript/commonjs/ui/data/account.d.ts.map +1 -0
  634. package/lib/typescript/commonjs/ui/data/accountData.d.ts +24 -0
  635. package/lib/typescript/commonjs/ui/data/accountData.d.ts.map +1 -0
  636. package/lib/typescript/commonjs/ui/data/answer.d.ts +43 -0
  637. package/lib/typescript/commonjs/ui/data/answer.d.ts.map +1 -0
  638. package/lib/typescript/commonjs/ui/data/assets.d.ts +49 -0
  639. package/lib/typescript/commonjs/ui/data/assets.d.ts.map +1 -0
  640. package/lib/typescript/commonjs/ui/data/deviceStorage.d.ts +41 -0
  641. package/lib/typescript/commonjs/ui/data/deviceStorage.d.ts.map +1 -0
  642. package/lib/typescript/commonjs/ui/data/displayRates.d.ts +14 -0
  643. package/lib/typescript/commonjs/ui/data/displayRates.d.ts.map +1 -0
  644. package/lib/typescript/commonjs/ui/data/domains.d.ts +23 -0
  645. package/lib/typescript/commonjs/ui/data/domains.d.ts.map +1 -0
  646. package/lib/typescript/commonjs/ui/data/files.d.ts +216 -0
  647. package/lib/typescript/commonjs/ui/data/files.d.ts.map +1 -0
  648. package/lib/typescript/commonjs/ui/data/follow.d.ts +135 -0
  649. package/lib/typescript/commonjs/ui/data/follow.d.ts.map +1 -0
  650. package/lib/typescript/commonjs/ui/data/organizations.d.ts +157 -0
  651. package/lib/typescript/commonjs/ui/data/organizations.d.ts.map +1 -0
  652. package/lib/typescript/commonjs/ui/data/payments.d.ts +85 -0
  653. package/lib/typescript/commonjs/ui/data/payments.d.ts.map +1 -0
  654. package/lib/typescript/commonjs/ui/data/persister.d.ts +9 -0
  655. package/lib/typescript/commonjs/ui/data/persister.d.ts.map +1 -0
  656. package/lib/typescript/commonjs/ui/data/persister.native.d.ts +13 -0
  657. package/lib/typescript/commonjs/ui/data/persister.native.d.ts.map +1 -0
  658. package/lib/typescript/commonjs/ui/data/readOptions.d.ts +22 -0
  659. package/lib/typescript/commonjs/ui/data/readOptions.d.ts.map +1 -0
  660. package/lib/typescript/commonjs/ui/data/security.d.ts +27 -0
  661. package/lib/typescript/commonjs/ui/data/security.d.ts.map +1 -0
  662. package/lib/typescript/commonjs/ui/data/sessions.d.ts +40 -0
  663. package/lib/typescript/commonjs/ui/data/sessions.d.ts.map +1 -0
  664. package/lib/typescript/commonjs/ui/data/supervision.d.ts +133 -0
  665. package/lib/typescript/commonjs/ui/data/supervision.d.ts.map +1 -0
  666. package/lib/typescript/commonjs/ui/data/trust.d.ts +22 -0
  667. package/lib/typescript/commonjs/ui/data/trust.d.ts.map +1 -0
  668. package/lib/typescript/commonjs/ui/data/user.d.ts +21 -0
  669. package/lib/typescript/commonjs/ui/data/user.d.ts.map +1 -0
  670. package/lib/typescript/commonjs/ui/{hooks/queries/userCache.d.ts → data/userRecord.d.ts} +47 -52
  671. package/lib/typescript/commonjs/ui/data/userRecord.d.ts.map +1 -0
  672. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +34 -304
  673. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  674. package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts +13 -23
  675. package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  676. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +45 -57
  677. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  678. package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts +12 -185
  679. package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
  680. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +43 -65
  681. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  682. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +13 -45
  683. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  684. package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts +6 -6
  685. package/lib/typescript/commonjs/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
  686. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +13 -11
  687. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  688. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +18 -23
  689. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  690. package/lib/typescript/commonjs/ui/hooks/queries/useSupervision.d.ts +37 -482
  691. package/lib/typescript/commonjs/ui/hooks/queries/useSupervision.d.ts.map +1 -1
  692. package/lib/typescript/commonjs/ui/hooks/useAccountTheme.d.ts +3 -3
  693. package/lib/typescript/commonjs/ui/hooks/useAccountTheme.d.ts.map +1 -1
  694. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +2 -1
  695. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  696. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +3 -4
  697. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  698. package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts +2 -2
  699. package/lib/typescript/commonjs/ui/hooks/useDisplayCurrency.d.ts.map +1 -1
  700. package/lib/typescript/commonjs/ui/hooks/useDisplayPrice.d.ts.map +1 -1
  701. package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +23 -83
  702. package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts.map +1 -1
  703. package/lib/typescript/commonjs/ui/hooks/useFollow.types.d.ts +2 -1
  704. package/lib/typescript/commonjs/ui/hooks/useFollow.types.d.ts.map +1 -1
  705. package/lib/typescript/commonjs/ui/hooks/useFollowTarget.d.ts +11 -3
  706. package/lib/typescript/commonjs/ui/hooks/useFollowTarget.d.ts.map +1 -1
  707. package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts +8 -10
  708. package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts.map +1 -1
  709. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +4 -4
  710. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  711. package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts +18 -20
  712. package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
  713. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +6 -13
  714. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  715. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
  716. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
  717. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  718. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  719. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +0 -9
  720. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  721. package/lib/typescript/commonjs/ui/index.d.ts +2 -4
  722. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  723. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +13 -4
  724. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  725. package/lib/typescript/commonjs/ui/runtime/activeRuntime.d.ts +9 -0
  726. package/lib/typescript/commonjs/ui/runtime/activeRuntime.d.ts.map +1 -0
  727. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts +0 -3
  728. package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts.map +1 -1
  729. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  730. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  731. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  732. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  733. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  734. package/lib/typescript/commonjs/ui/screens/DomainsScreen.d.ts.map +1 -1
  735. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  736. package/lib/typescript/commonjs/ui/screens/FileTrashScreen.d.ts.map +1 -1
  737. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  738. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  739. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  740. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  741. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  742. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  743. package/lib/typescript/commonjs/ui/screens/ReportBugScreen.d.ts.map +1 -1
  744. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  745. package/lib/typescript/commonjs/ui/screens/SupervisionScreen.d.ts.map +1 -1
  746. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  747. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  748. package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -1
  749. package/lib/typescript/commonjs/ui/screens/fileManagement/FileListSection.d.ts.map +1 -1
  750. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  751. package/lib/typescript/commonjs/ui/screens/fileManagement/UploadBar.d.ts.map +1 -1
  752. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +1 -1
  753. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  754. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  755. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  756. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  757. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  758. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  759. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  760. package/lib/typescript/commonjs/ui/server.d.ts +0 -1
  761. package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
  762. package/lib/typescript/commonjs/ui/types/navigation.d.ts +0 -13
  763. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  764. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +8 -9
  765. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -1
  766. package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts +3 -4
  767. package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts.map +1 -1
  768. package/lib/typescript/module/index.d.ts +16 -14
  769. package/lib/typescript/module/index.d.ts.map +1 -1
  770. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  771. package/lib/typescript/module/ui/client.d.ts +11 -10
  772. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  773. package/lib/typescript/module/ui/components/AccountInvitationAcceptance.d.ts.map +1 -1
  774. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -1
  775. package/lib/typescript/module/ui/components/BenefitList.d.ts +0 -2
  776. package/lib/typescript/module/ui/components/BenefitList.d.ts.map +1 -1
  777. package/lib/typescript/module/ui/components/ExpoImage.macos.d.ts +1 -3
  778. package/lib/typescript/module/ui/components/ExpoImage.macos.d.ts.map +1 -1
  779. package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
  780. package/lib/typescript/module/ui/components/FollowTargetButton.d.ts.map +1 -1
  781. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  782. package/lib/typescript/module/ui/components/OxyAuthPrompt.d.ts +1 -1
  783. package/lib/typescript/module/ui/components/OxyAuthPrompt.d.ts.map +1 -1
  784. package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
  785. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  786. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  787. package/lib/typescript/module/ui/components/ProfileButton.d.ts +1 -7
  788. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  789. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts.map +1 -1
  790. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +1 -1
  791. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  792. package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts +2 -2
  793. package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts.map +1 -1
  794. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  795. package/lib/typescript/module/ui/components/fileManagement/FileAppAccessSection.d.ts.map +1 -1
  796. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  797. package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  798. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  799. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  800. package/lib/typescript/module/ui/components/organizations/OrganizationClaimReview.d.ts.map +1 -1
  801. package/lib/typescript/module/ui/components/organizations/OrganizationClaims.d.ts.map +1 -1
  802. package/lib/typescript/module/ui/components/organizations/OrganizationDirectorySearch.d.ts.map +1 -1
  803. package/lib/typescript/module/ui/components/organizations/OrganizationSettings.d.ts.map +1 -1
  804. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  805. package/lib/typescript/module/ui/components/setupFlow/OxySetupFlow.d.ts.map +1 -1
  806. package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
  807. package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +9 -5
  808. package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -1
  809. package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -1
  810. package/lib/typescript/module/ui/components/signIn/OxyEmailAccountChoice.d.ts.map +1 -1
  811. package/lib/typescript/module/ui/components/signIn/OxyEmailPanel.d.ts.map +1 -1
  812. package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -1
  813. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  814. package/lib/typescript/module/ui/components/signIn/SessionsSection.d.ts.map +1 -1
  815. package/lib/typescript/module/ui/components/signIn/accountSecurityState.d.ts +3 -3
  816. package/lib/typescript/module/ui/components/signIn/accountSecurityState.d.ts.map +1 -1
  817. package/lib/typescript/module/ui/components/supervision/PersonPicker.d.ts.map +1 -1
  818. package/lib/typescript/module/ui/context/OxyContext.d.ts +1 -1
  819. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  820. package/lib/typescript/module/ui/context/OxyHostedContext.d.ts.map +1 -1
  821. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +1 -2
  822. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  823. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +0 -9
  824. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  825. package/lib/typescript/module/ui/data/account.d.ts +261 -0
  826. package/lib/typescript/module/ui/data/account.d.ts.map +1 -0
  827. package/lib/typescript/module/ui/data/accountData.d.ts +24 -0
  828. package/lib/typescript/module/ui/data/accountData.d.ts.map +1 -0
  829. package/lib/typescript/module/ui/data/answer.d.ts +43 -0
  830. package/lib/typescript/module/ui/data/answer.d.ts.map +1 -0
  831. package/lib/typescript/module/ui/data/assets.d.ts +49 -0
  832. package/lib/typescript/module/ui/data/assets.d.ts.map +1 -0
  833. package/lib/typescript/module/ui/data/deviceStorage.d.ts +41 -0
  834. package/lib/typescript/module/ui/data/deviceStorage.d.ts.map +1 -0
  835. package/lib/typescript/module/ui/data/displayRates.d.ts +14 -0
  836. package/lib/typescript/module/ui/data/displayRates.d.ts.map +1 -0
  837. package/lib/typescript/module/ui/data/domains.d.ts +23 -0
  838. package/lib/typescript/module/ui/data/domains.d.ts.map +1 -0
  839. package/lib/typescript/module/ui/data/files.d.ts +216 -0
  840. package/lib/typescript/module/ui/data/files.d.ts.map +1 -0
  841. package/lib/typescript/module/ui/data/follow.d.ts +135 -0
  842. package/lib/typescript/module/ui/data/follow.d.ts.map +1 -0
  843. package/lib/typescript/module/ui/data/organizations.d.ts +157 -0
  844. package/lib/typescript/module/ui/data/organizations.d.ts.map +1 -0
  845. package/lib/typescript/module/ui/data/payments.d.ts +85 -0
  846. package/lib/typescript/module/ui/data/payments.d.ts.map +1 -0
  847. package/lib/typescript/module/ui/data/persister.d.ts +9 -0
  848. package/lib/typescript/module/ui/data/persister.d.ts.map +1 -0
  849. package/lib/typescript/module/ui/data/persister.native.d.ts +13 -0
  850. package/lib/typescript/module/ui/data/persister.native.d.ts.map +1 -0
  851. package/lib/typescript/module/ui/data/readOptions.d.ts +22 -0
  852. package/lib/typescript/module/ui/data/readOptions.d.ts.map +1 -0
  853. package/lib/typescript/module/ui/data/security.d.ts +27 -0
  854. package/lib/typescript/module/ui/data/security.d.ts.map +1 -0
  855. package/lib/typescript/module/ui/data/sessions.d.ts +40 -0
  856. package/lib/typescript/module/ui/data/sessions.d.ts.map +1 -0
  857. package/lib/typescript/module/ui/data/supervision.d.ts +133 -0
  858. package/lib/typescript/module/ui/data/supervision.d.ts.map +1 -0
  859. package/lib/typescript/module/ui/data/trust.d.ts +22 -0
  860. package/lib/typescript/module/ui/data/trust.d.ts.map +1 -0
  861. package/lib/typescript/module/ui/data/user.d.ts +21 -0
  862. package/lib/typescript/module/ui/data/user.d.ts.map +1 -0
  863. package/lib/typescript/module/ui/{hooks/queries/userCache.d.ts → data/userRecord.d.ts} +47 -52
  864. package/lib/typescript/module/ui/data/userRecord.d.ts.map +1 -0
  865. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +34 -304
  866. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  867. package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts +13 -23
  868. package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  869. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +45 -57
  870. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  871. package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts +12 -185
  872. package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
  873. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +43 -65
  874. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
  875. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +13 -45
  876. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  877. package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts +6 -6
  878. package/lib/typescript/module/ui/hooks/queries/usePersonalPlans.d.ts.map +1 -1
  879. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +13 -11
  880. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  881. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +18 -23
  882. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  883. package/lib/typescript/module/ui/hooks/queries/useSupervision.d.ts +37 -482
  884. package/lib/typescript/module/ui/hooks/queries/useSupervision.d.ts.map +1 -1
  885. package/lib/typescript/module/ui/hooks/useAccountTheme.d.ts +3 -3
  886. package/lib/typescript/module/ui/hooks/useAccountTheme.d.ts.map +1 -1
  887. package/lib/typescript/module/ui/hooks/useAssets.d.ts +2 -1
  888. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  889. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +3 -4
  890. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  891. package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts +2 -2
  892. package/lib/typescript/module/ui/hooks/useDisplayCurrency.d.ts.map +1 -1
  893. package/lib/typescript/module/ui/hooks/useDisplayPrice.d.ts.map +1 -1
  894. package/lib/typescript/module/ui/hooks/useFollow.d.ts +23 -83
  895. package/lib/typescript/module/ui/hooks/useFollow.d.ts.map +1 -1
  896. package/lib/typescript/module/ui/hooks/useFollow.types.d.ts +2 -1
  897. package/lib/typescript/module/ui/hooks/useFollow.types.d.ts.map +1 -1
  898. package/lib/typescript/module/ui/hooks/useFollowTarget.d.ts +11 -3
  899. package/lib/typescript/module/ui/hooks/useFollowTarget.d.ts.map +1 -1
  900. package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts +8 -10
  901. package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts.map +1 -1
  902. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +4 -4
  903. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  904. package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts +18 -20
  905. package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
  906. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +6 -13
  907. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  908. package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
  909. package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
  910. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  911. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  912. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +0 -9
  913. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  914. package/lib/typescript/module/ui/index.d.ts +2 -4
  915. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  916. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +13 -4
  917. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  918. package/lib/typescript/module/ui/runtime/activeRuntime.d.ts +9 -0
  919. package/lib/typescript/module/ui/runtime/activeRuntime.d.ts.map +1 -0
  920. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts +0 -3
  921. package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts.map +1 -1
  922. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  923. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  924. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  925. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  926. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  927. package/lib/typescript/module/ui/screens/DomainsScreen.d.ts.map +1 -1
  928. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  929. package/lib/typescript/module/ui/screens/FileTrashScreen.d.ts.map +1 -1
  930. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  931. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  932. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  933. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  934. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  935. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  936. package/lib/typescript/module/ui/screens/ReportBugScreen.d.ts.map +1 -1
  937. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  938. package/lib/typescript/module/ui/screens/SupervisionScreen.d.ts.map +1 -1
  939. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  940. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  941. package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -1
  942. package/lib/typescript/module/ui/screens/fileManagement/FileListSection.d.ts.map +1 -1
  943. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  944. package/lib/typescript/module/ui/screens/fileManagement/UploadBar.d.ts.map +1 -1
  945. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +1 -1
  946. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  947. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  948. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  949. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  950. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  951. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  952. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  953. package/lib/typescript/module/ui/server.d.ts +0 -1
  954. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  955. package/lib/typescript/module/ui/types/navigation.d.ts +0 -13
  956. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  957. package/lib/typescript/module/ui/utils/netConnectivity.d.ts +8 -9
  958. package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -1
  959. package/lib/typescript/module/ui/utils/storageHelpers.d.ts +3 -4
  960. package/lib/typescript/module/ui/utils/storageHelpers.d.ts.map +1 -1
  961. package/lib/typescript/types/react-native-web-style.d.ts +1 -1
  962. package/package.json +31 -45
  963. package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  964. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  965. package/src/assets/fonts/icons/manifest.json +5 -14
  966. package/src/index.ts +26 -70
  967. package/src/types/react-native-web-style.d.ts +1 -1
  968. package/src/ui/boot/runProviderColdBoot.ts +4 -3
  969. package/src/ui/client.ts +13 -31
  970. package/src/ui/components/AccountInvitationAcceptance.tsx +9 -2
  971. package/src/ui/components/AccountLanguageBoundary.tsx +4 -4
  972. package/src/ui/components/AvatarCameraBadge.tsx +8 -3
  973. package/src/ui/components/BenefitList.tsx +0 -6
  974. package/src/ui/components/DisplayCurrencySelector.tsx +2 -2
  975. package/src/ui/components/ExpoImage.macos.tsx +1 -3
  976. package/src/ui/components/FollowButton.tsx +10 -22
  977. package/src/ui/components/FollowTargetButton.tsx +13 -5
  978. package/src/ui/components/OxyAuthChooser.tsx +9 -13
  979. package/src/ui/components/OxyAuthPrompt.tsx +3 -4
  980. package/src/ui/components/OxyProvider.tsx +72 -164
  981. package/src/ui/components/OxySignInButton.tsx +2 -5
  982. package/src/ui/components/ProfileButton.tsx +1 -11
  983. package/src/ui/components/RequireOxyAuth.tsx +3 -8
  984. package/src/ui/components/SurfaceScreen.tsx +2 -3
  985. package/src/ui/components/__tests__/AccountLanguageBoundary.test.tsx +11 -11
  986. package/src/ui/components/__tests__/followTargetButton.test.ts +1 -1
  987. package/src/ui/components/accountSettings/AccountCategoriesSection.tsx +8 -3
  988. package/src/ui/components/accountSettings/AccountSettings.tsx +121 -83
  989. package/src/ui/components/accountSettings/__tests__/AccountSettings.test.tsx +4 -4
  990. package/src/ui/components/authChooser/AccountsMenuView.tsx +53 -16
  991. package/src/ui/components/fileManagement/FileAppAccessSection.tsx +20 -17
  992. package/src/ui/components/fileManagement/FileDetailsModal.tsx +55 -32
  993. package/src/ui/components/fileManagement/FileViewer.tsx +117 -60
  994. package/src/ui/components/fileManagement/UploadPreview.tsx +46 -23
  995. package/src/ui/components/modals/DeleteAccountModal.tsx +13 -4
  996. package/src/ui/components/organizations/OrganizationClaimReview.tsx +110 -88
  997. package/src/ui/components/organizations/OrganizationClaims.tsx +46 -43
  998. package/src/ui/components/organizations/OrganizationDirectorySearch.tsx +114 -102
  999. package/src/ui/components/organizations/OrganizationSettings.tsx +33 -29
  1000. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +29 -51
  1001. package/src/ui/components/setupFlow/OxySetupFlow.tsx +23 -9
  1002. package/src/ui/components/signIn/OxyAccountPicker.tsx +17 -4
  1003. package/src/ui/components/signIn/OxyAuthScreen.tsx +65 -22
  1004. package/src/ui/components/signIn/OxyAuthenticatorPanel.tsx +3 -7
  1005. package/src/ui/components/signIn/OxyDeleteAccountPanel.tsx +2 -2
  1006. package/src/ui/components/signIn/OxyEmailAccountChoice.tsx +28 -17
  1007. package/src/ui/components/signIn/OxyEmailPanel.tsx +7 -7
  1008. package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +2 -2
  1009. package/src/ui/components/signIn/OxyPasswordPanel.tsx +3 -7
  1010. package/src/ui/components/signIn/OxySignInPanel.tsx +18 -13
  1011. package/src/ui/components/signIn/OxySignInSecurityPanel.tsx +5 -5
  1012. package/src/ui/components/signIn/SessionsSection.tsx +64 -38
  1013. package/src/ui/components/signIn/accountSecurityState.tsx +6 -6
  1014. package/src/ui/components/supervision/PersonPicker.tsx +10 -12
  1015. package/src/ui/context/OxyContext.tsx +66 -138
  1016. package/src/ui/context/OxyHostedContext.tsx +40 -67
  1017. package/src/ui/context/hooks/useAuthOperations.ts +0 -4
  1018. package/src/ui/context/oxyContextTypes.ts +0 -9
  1019. package/src/ui/data/__tests__/accountData.test.tsx +50 -0
  1020. package/src/ui/data/__tests__/assets.test.ts +63 -0
  1021. package/src/ui/data/__tests__/deviceStorage.test.ts +72 -0
  1022. package/src/ui/data/__tests__/files.test.ts +91 -0
  1023. package/src/ui/data/__tests__/follow.test.ts +310 -0
  1024. package/src/ui/data/__tests__/security.test.tsx +147 -0
  1025. package/src/ui/data/__tests__/sessions.test.tsx +349 -0
  1026. package/src/ui/data/__tests__/storeUsers.test.ts +187 -0
  1027. package/src/ui/{hooks/queries/__tests__/userCacheClear.test.ts → data/__tests__/storeUsersClear.test.ts} +55 -110
  1028. package/src/ui/data/__tests__/trust.test.tsx +69 -0
  1029. package/src/ui/data/__tests__/user.test.ts +143 -0
  1030. package/src/ui/data/account.ts +654 -0
  1031. package/src/ui/data/accountData.ts +80 -0
  1032. package/src/ui/data/answer.ts +79 -0
  1033. package/src/ui/data/assets.ts +181 -0
  1034. package/src/ui/data/deviceStorage.ts +152 -0
  1035. package/src/ui/data/displayRates.ts +31 -0
  1036. package/src/ui/data/domains.ts +45 -0
  1037. package/src/ui/data/files.ts +461 -0
  1038. package/src/ui/data/follow.ts +629 -0
  1039. package/src/ui/data/organizations.ts +191 -0
  1040. package/src/ui/data/payments.ts +96 -0
  1041. package/src/ui/data/persister.native.ts +21 -0
  1042. package/src/ui/data/persister.ts +12 -0
  1043. package/src/ui/data/readOptions.ts +52 -0
  1044. package/src/ui/data/security.ts +106 -0
  1045. package/src/ui/data/sessions.ts +258 -0
  1046. package/src/ui/data/supervision.ts +105 -0
  1047. package/src/ui/data/trust.ts +75 -0
  1048. package/src/ui/data/user.ts +103 -0
  1049. package/src/ui/{hooks/queries/userCache.ts → data/userRecord.ts} +33 -164
  1050. package/src/ui/hooks/mutations/useAccountMutations.ts +146 -714
  1051. package/src/ui/hooks/mutations/useServicesMutations.ts +103 -155
  1052. package/src/ui/hooks/queries/__tests__/useSupervision.test.tsx +57 -22
  1053. package/src/ui/hooks/queries/useAccountQueries.ts +149 -253
  1054. package/src/ui/hooks/queries/useAuthMethods.ts +32 -29
  1055. package/src/ui/hooks/queries/useFileQueries.ts +113 -207
  1056. package/src/ui/hooks/queries/usePaymentQueries.ts +34 -97
  1057. package/src/ui/hooks/queries/usePersonalPlans.ts +11 -20
  1058. package/src/ui/hooks/queries/useSecurityQueries.ts +34 -69
  1059. package/src/ui/hooks/queries/useServicesQueries.ts +73 -126
  1060. package/src/ui/hooks/queries/useSupervision.ts +30 -34
  1061. package/src/ui/hooks/useAccountColor.ts +3 -3
  1062. package/src/ui/hooks/useAccountTheme.ts +37 -54
  1063. package/src/ui/hooks/useAssets.ts +145 -91
  1064. package/src/ui/hooks/useAvatarPicker.ts +7 -13
  1065. package/src/ui/hooks/useDisplayCurrency.ts +30 -48
  1066. package/src/ui/hooks/useDisplayPrice.ts +16 -13
  1067. package/src/ui/hooks/useFollow.ts +210 -332
  1068. package/src/ui/hooks/useFollow.types.ts +4 -3
  1069. package/src/ui/hooks/useFollowTarget.ts +87 -130
  1070. package/src/ui/hooks/useMutationStatus.ts +20 -94
  1071. package/src/ui/hooks/useOnlineStatus.ts +7 -11
  1072. package/src/ui/hooks/useProfileEditing.ts +3 -3
  1073. package/src/ui/hooks/useResolvedFileUrls.ts +19 -82
  1074. package/src/ui/hooks/useSessionManagement.ts +8 -93
  1075. package/src/ui/icons/subsetGlyphMaps.ts +0 -9
  1076. package/src/ui/index.ts +2 -8
  1077. package/src/ui/navigation/__tests__/bottomSheetManager.test.ts +1 -1
  1078. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +16 -16
  1079. package/src/ui/navigation/surfaceNavStack.ts +52 -23
  1080. package/src/ui/runtime/activeRuntime.ts +29 -0
  1081. package/src/ui/runtime/createOxyRuntime.ts +1 -13
  1082. package/src/ui/screens/AccountMembersScreen.tsx +196 -209
  1083. package/src/ui/screens/AccountVerificationScreen.tsx +46 -11
  1084. package/src/ui/screens/AppInfoScreen.tsx +6 -2
  1085. package/src/ui/screens/AvatarCropScreen.tsx +39 -71
  1086. package/src/ui/screens/ChangeAvatarScreen.tsx +8 -3
  1087. package/src/ui/screens/ConnectedAppsScreen.tsx +30 -16
  1088. package/src/ui/screens/CreateAccountScreen.tsx +38 -14
  1089. package/src/ui/screens/DomainsScreen.tsx +94 -62
  1090. package/src/ui/screens/EditProfileFieldScreen.tsx +12 -5
  1091. package/src/ui/screens/EditProfileScreen.tsx +6 -2
  1092. package/src/ui/screens/FileManagementScreen.tsx +130 -122
  1093. package/src/ui/screens/FileTrashScreen.tsx +42 -40
  1094. package/src/ui/screens/HelpSupportScreen.tsx +6 -2
  1095. package/src/ui/screens/HistoryViewScreen.tsx +9 -4
  1096. package/src/ui/screens/LanguageSelectorScreen.tsx +22 -9
  1097. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +24 -10
  1098. package/src/ui/screens/LegalDocumentsScreen.tsx +6 -2
  1099. package/src/ui/screens/ManageAccountScreen.tsx +18 -9
  1100. package/src/ui/screens/NotificationsScreen.tsx +8 -4
  1101. package/src/ui/screens/PaymentGatewayScreen.tsx +20 -4
  1102. package/src/ui/screens/PreferencesScreen.tsx +10 -6
  1103. package/src/ui/screens/PrivacySettingsScreen.tsx +32 -61
  1104. package/src/ui/screens/ProfileLinkForm.tsx +10 -4
  1105. package/src/ui/screens/ProfileScreen.tsx +48 -65
  1106. package/src/ui/screens/ReportBugScreen.tsx +9 -2
  1107. package/src/ui/screens/SearchSettingsScreen.tsx +12 -5
  1108. package/src/ui/screens/SignInSecurityScreen.tsx +6 -2
  1109. package/src/ui/screens/SupervisionScreen.tsx +106 -142
  1110. package/src/ui/screens/UserListScreen.tsx +24 -10
  1111. package/src/ui/screens/WelcomeNewUserScreen.tsx +12 -11
  1112. package/src/ui/screens/fileManagement/FileLibraryError.tsx +10 -14
  1113. package/src/ui/screens/fileManagement/FileListSection.tsx +24 -15
  1114. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +68 -24
  1115. package/src/ui/screens/fileManagement/UploadBar.tsx +17 -12
  1116. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +17 -15
  1117. package/src/ui/screens/trust/TrustAboutScreen.tsx +26 -9
  1118. package/src/ui/screens/trust/TrustCenterScreen.tsx +46 -36
  1119. package/src/ui/screens/trust/TrustFAQScreen.tsx +13 -4
  1120. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +25 -13
  1121. package/src/ui/screens/trust/TrustRewardsScreen.tsx +72 -46
  1122. package/src/ui/screens/trust/TrustRulesScreen.tsx +23 -16
  1123. package/src/ui/server.ts +0 -3
  1124. package/src/ui/types/navigation.ts +0 -13
  1125. package/src/ui/utils/netConnectivity.ts +9 -18
  1126. package/src/ui/utils/storageHelpers.ts +6 -76
  1127. package/lib/commonjs/ui/hooks/accountQueryPersistence.js +0 -249
  1128. package/lib/commonjs/ui/hooks/accountQueryPersistence.js.map +0 -1
  1129. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +0 -183
  1130. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +0 -1
  1131. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +0 -44
  1132. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +0 -1
  1133. package/lib/commonjs/ui/hooks/persistedQueryCache.js +0 -219
  1134. package/lib/commonjs/ui/hooks/persistedQueryCache.js.map +0 -1
  1135. package/lib/commonjs/ui/hooks/queries/queryKeys.js +0 -249
  1136. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +0 -1
  1137. package/lib/commonjs/ui/hooks/queries/userCache.js.map +0 -1
  1138. package/lib/commonjs/ui/hooks/queries/userCacheRelationship.js +0 -31
  1139. package/lib/commonjs/ui/hooks/queries/userCacheRelationship.js.map +0 -1
  1140. package/lib/commonjs/ui/hooks/queryClient.js +0 -216
  1141. package/lib/commonjs/ui/hooks/queryClient.js.map +0 -1
  1142. package/lib/commonjs/ui/hooks/useQueryClient.js +0 -20
  1143. package/lib/commonjs/ui/hooks/useQueryClient.js.map +0 -1
  1144. package/lib/commonjs/ui/stores/assetStore.js +0 -252
  1145. package/lib/commonjs/ui/stores/assetStore.js.map +0 -1
  1146. package/lib/commonjs/ui/stores/authStore.js +0 -169
  1147. package/lib/commonjs/ui/stores/authStore.js.map +0 -1
  1148. package/lib/commonjs/ui/stores/followStore.js +0 -566
  1149. package/lib/commonjs/ui/stores/followStore.js.map +0 -1
  1150. package/lib/commonjs/ui/stores/followTargetStore.js +0 -162
  1151. package/lib/commonjs/ui/stores/followTargetStore.js.map +0 -1
  1152. package/lib/commonjs/ui/stores/resetSessionScopedStores.js +0 -21
  1153. package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +0 -1
  1154. package/lib/commonjs/ui/utils/avatarUtils.js +0 -43
  1155. package/lib/commonjs/ui/utils/avatarUtils.js.map +0 -1
  1156. package/lib/commonjs/ui/utils/persistedDataVersion.js +0 -16
  1157. package/lib/commonjs/ui/utils/persistedDataVersion.js.map +0 -1
  1158. package/lib/module/ui/hooks/accountQueryPersistence.js +0 -244
  1159. package/lib/module/ui/hooks/accountQueryPersistence.js.map +0 -1
  1160. package/lib/module/ui/hooks/mutations/mutationFactory.js +0 -179
  1161. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +0 -1
  1162. package/lib/module/ui/hooks/mutations/mutationKeys.js +0 -40
  1163. package/lib/module/ui/hooks/mutations/mutationKeys.js.map +0 -1
  1164. package/lib/module/ui/hooks/persistedQueryCache.js +0 -209
  1165. package/lib/module/ui/hooks/persistedQueryCache.js.map +0 -1
  1166. package/lib/module/ui/hooks/queries/queryKeys.js +0 -234
  1167. package/lib/module/ui/hooks/queries/queryKeys.js.map +0 -1
  1168. package/lib/module/ui/hooks/queries/userCache.js.map +0 -1
  1169. package/lib/module/ui/hooks/queries/userCacheRelationship.js +0 -27
  1170. package/lib/module/ui/hooks/queries/userCacheRelationship.js.map +0 -1
  1171. package/lib/module/ui/hooks/queryClient.js +0 -207
  1172. package/lib/module/ui/hooks/queryClient.js.map +0 -1
  1173. package/lib/module/ui/hooks/useQueryClient.js +0 -15
  1174. package/lib/module/ui/hooks/useQueryClient.js.map +0 -1
  1175. package/lib/module/ui/stores/assetStore.js +0 -239
  1176. package/lib/module/ui/stores/assetStore.js.map +0 -1
  1177. package/lib/module/ui/stores/authStore.js +0 -165
  1178. package/lib/module/ui/stores/authStore.js.map +0 -1
  1179. package/lib/module/ui/stores/followStore.js +0 -561
  1180. package/lib/module/ui/stores/followStore.js.map +0 -1
  1181. package/lib/module/ui/stores/followTargetStore.js +0 -152
  1182. package/lib/module/ui/stores/followTargetStore.js.map +0 -1
  1183. package/lib/module/ui/stores/resetSessionScopedStores.js +0 -18
  1184. package/lib/module/ui/stores/resetSessionScopedStores.js.map +0 -1
  1185. package/lib/module/ui/utils/avatarUtils.js +0 -40
  1186. package/lib/module/ui/utils/avatarUtils.js.map +0 -1
  1187. package/lib/module/ui/utils/persistedDataVersion.js +0 -12
  1188. package/lib/module/ui/utils/persistedDataVersion.js.map +0 -1
  1189. package/lib/typescript/commonjs/ui/hooks/accountQueryPersistence.d.ts +0 -145
  1190. package/lib/typescript/commonjs/ui/hooks/accountQueryPersistence.d.ts.map +0 -1
  1191. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +0 -90
  1192. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +0 -1
  1193. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +0 -33
  1194. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +0 -1
  1195. package/lib/typescript/commonjs/ui/hooks/persistedQueryCache.d.ts +0 -98
  1196. package/lib/typescript/commonjs/ui/hooks/persistedQueryCache.d.ts.map +0 -1
  1197. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +0 -162
  1198. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +0 -1
  1199. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +0 -1
  1200. package/lib/typescript/commonjs/ui/hooks/queries/userCacheRelationship.d.ts +0 -9
  1201. package/lib/typescript/commonjs/ui/hooks/queries/userCacheRelationship.d.ts.map +0 -1
  1202. package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts +0 -76
  1203. package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +0 -1
  1204. package/lib/typescript/commonjs/ui/hooks/useQueryClient.d.ts +0 -7
  1205. package/lib/typescript/commonjs/ui/hooks/useQueryClient.d.ts.map +0 -1
  1206. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts +0 -61
  1207. package/lib/typescript/commonjs/ui/stores/assetStore.d.ts.map +0 -1
  1208. package/lib/typescript/commonjs/ui/stores/authStore.d.ts +0 -61
  1209. package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +0 -1
  1210. package/lib/typescript/commonjs/ui/stores/followStore.d.ts +0 -32
  1211. package/lib/typescript/commonjs/ui/stores/followStore.d.ts.map +0 -1
  1212. package/lib/typescript/commonjs/ui/stores/followTargetStore.d.ts +0 -88
  1213. package/lib/typescript/commonjs/ui/stores/followTargetStore.d.ts.map +0 -1
  1214. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts +0 -10
  1215. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +0 -1
  1216. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +0 -16
  1217. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +0 -1
  1218. package/lib/typescript/commonjs/ui/utils/persistedDataVersion.d.ts +0 -10
  1219. package/lib/typescript/commonjs/ui/utils/persistedDataVersion.d.ts.map +0 -1
  1220. package/lib/typescript/module/ui/hooks/accountQueryPersistence.d.ts +0 -145
  1221. package/lib/typescript/module/ui/hooks/accountQueryPersistence.d.ts.map +0 -1
  1222. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +0 -90
  1223. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +0 -1
  1224. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +0 -33
  1225. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +0 -1
  1226. package/lib/typescript/module/ui/hooks/persistedQueryCache.d.ts +0 -98
  1227. package/lib/typescript/module/ui/hooks/persistedQueryCache.d.ts.map +0 -1
  1228. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +0 -162
  1229. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +0 -1
  1230. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +0 -1
  1231. package/lib/typescript/module/ui/hooks/queries/userCacheRelationship.d.ts +0 -9
  1232. package/lib/typescript/module/ui/hooks/queries/userCacheRelationship.d.ts.map +0 -1
  1233. package/lib/typescript/module/ui/hooks/queryClient.d.ts +0 -76
  1234. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +0 -1
  1235. package/lib/typescript/module/ui/hooks/useQueryClient.d.ts +0 -7
  1236. package/lib/typescript/module/ui/hooks/useQueryClient.d.ts.map +0 -1
  1237. package/lib/typescript/module/ui/stores/assetStore.d.ts +0 -61
  1238. package/lib/typescript/module/ui/stores/assetStore.d.ts.map +0 -1
  1239. package/lib/typescript/module/ui/stores/authStore.d.ts +0 -61
  1240. package/lib/typescript/module/ui/stores/authStore.d.ts.map +0 -1
  1241. package/lib/typescript/module/ui/stores/followStore.d.ts +0 -32
  1242. package/lib/typescript/module/ui/stores/followStore.d.ts.map +0 -1
  1243. package/lib/typescript/module/ui/stores/followTargetStore.d.ts +0 -88
  1244. package/lib/typescript/module/ui/stores/followTargetStore.d.ts.map +0 -1
  1245. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts +0 -10
  1246. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +0 -1
  1247. package/lib/typescript/module/ui/utils/avatarUtils.d.ts +0 -16
  1248. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +0 -1
  1249. package/lib/typescript/module/ui/utils/persistedDataVersion.d.ts +0 -10
  1250. package/lib/typescript/module/ui/utils/persistedDataVersion.d.ts.map +0 -1
  1251. package/lib/typescript/nativewind-env.d.ts +0 -1
  1252. package/lib/typescript/types/react-native-classname.d.ts +0 -39
  1253. package/src/nativewind-env.d.ts +0 -1
  1254. package/src/types/react-native-classname.d.ts +0 -39
  1255. package/src/ui/hooks/accountQueryPersistence.ts +0 -407
  1256. package/src/ui/hooks/mutations/mutationFactory.ts +0 -234
  1257. package/src/ui/hooks/mutations/mutationKeys.ts +0 -44
  1258. package/src/ui/hooks/persistedQueryCache.ts +0 -293
  1259. package/src/ui/hooks/queries/__tests__/fileQueries.test.ts +0 -70
  1260. package/src/ui/hooks/queries/__tests__/userCache.test.ts +0 -482
  1261. package/src/ui/hooks/queries/queryKeys.ts +0 -252
  1262. package/src/ui/hooks/queries/userCacheRelationship.ts +0 -33
  1263. package/src/ui/hooks/queryClient.ts +0 -240
  1264. package/src/ui/hooks/useQueryClient.ts +0 -16
  1265. package/src/ui/stores/__tests__/followStore.test.ts +0 -254
  1266. package/src/ui/stores/__tests__/resetSessionScopedStores.test.ts +0 -23
  1267. package/src/ui/stores/assetStore.ts +0 -309
  1268. package/src/ui/stores/authStore.ts +0 -191
  1269. package/src/ui/stores/followStore.ts +0 -499
  1270. package/src/ui/stores/followTargetStore.ts +0 -165
  1271. package/src/ui/stores/resetSessionScopedStores.ts +0 -15
  1272. package/src/ui/utils/avatarUtils.ts +0 -57
  1273. package/src/ui/utils/persistedDataVersion.ts +0 -9
@@ -1,755 +1,187 @@
1
- import { useMutation, useQueryClient } from '@tanstack/react-query';
2
- import { authenticatedApiCall } from '@oxy.so/core';
3
- import type {
4
- AssetMetadata,
5
- AssetUploadInput,
6
- FileApplicationAccessRevocation,
7
- NotificationPreferences,
8
- PrivacySettings,
9
- User,
10
- UserPreferences,
11
- } from '@oxy.so/core';
1
+ import { useCallback } from 'react';
2
+ import { type ActionView, useAction } from '@oxy.so/bloom-data';
3
+ import type { NotificationPreferences, PrivacySettings, User, UserPreferences } from '@oxy.so/core';
12
4
  import type { UserProfileUpdate } from '@oxy.so/contracts';
13
- import {
14
- queryKeys,
15
- invalidateAccountQueries,
16
- invalidateConnectedAppsQueries,
17
- invalidateUserQueries,
18
- invalidateSessionQueries,
19
- } from '../queries/queryKeys';
20
- import { mutationKeys } from './mutationKeys';
21
- import { useOxy } from '../../context/oxyRuntimeContext';
22
5
  import { toast } from '@oxy.so/bloom/toast';
23
- import { useAuthStore } from '../../stores/authStore';
24
- import { clearedFieldsFromProfileUpdate, upsertCachedUser } from '../queries/userCache';
25
- import { removeAppAccessFromCache } from '../queries/useFileQueries';
6
+ import { useOxy } from '../../context/oxyRuntimeContext';
7
+ import {
8
+ type AvatarFile,
9
+ revokeConnectedApp,
10
+ updateAccountSettings,
11
+ updateNotificationPreferences,
12
+ updatePrivacySettings,
13
+ updateProfile,
14
+ updateUserPreferences,
15
+ uploadAvatar,
16
+ } from '../../data/account';
26
17
  import { describeApiError } from '../../utils/apiErrorMessage';
27
18
  import { describeUsernameRefusal } from '../../utils/usernamePolicy';
28
19
  import { useApiErrorToast } from '../useApiErrorToast';
29
20
  import { useI18n } from '../useI18n';
30
21
 
31
22
  /**
32
- * Update user profile with optimistic updates and offline queue support
23
+ * The account family's writes, as a component calls them: each is a
24
+ * `@oxy.so/bloom-data` action (`data/account.ts`) with the client and session
25
+ * bound. Running one shows the change at once, rejects when it fails (the person is
26
+ * told why, here), and `isPending`/`error` describe the last call.
33
27
  */
34
- export const useUpdateProfile = () => {
35
- const { t } = useI18n();
36
- const { oxyServices, activeSessionId, user } = useOxy();
37
- const queryClient = useQueryClient();
38
-
39
- return useMutation({
40
- mutationKey: [...mutationKeys.account.updateProfile],
41
- mutationFn: async (updates: UserProfileUpdate) => {
42
- return authenticatedApiCall<User>(oxyServices, activeSessionId, () =>
43
- oxyServices.users.updateMe(updates),
44
- );
45
- },
46
- // Optimistic update
47
- onMutate: async (updates) => {
48
- // Cancel outgoing refetches
49
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.current(activeSessionId) });
50
-
51
- // Snapshot previous value
52
- const previousUser = queryClient.getQueryData<User>(
53
- queryKeys.accounts.current(activeSessionId),
54
- );
55
-
56
- // Optimistically update
57
- if (previousUser) {
58
- const optimisticUser: User = {
59
- ...previousUser,
60
- ...updates,
61
- name: updates.name ? { ...previousUser.name, ...updates.name } : previousUser.name,
62
- };
63
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), optimisticUser);
64
-
65
- // Also update profile query if sessionId is available
66
- if (activeSessionId) {
67
- queryClient.setQueryData<User>(queryKeys.users.profile(activeSessionId), optimisticUser);
68
- }
69
- }
70
-
71
- return { previousUser };
72
- },
73
- // On error, rollback ONLY the keys this mutation tried to change
74
- onError: (error, updates, context) => {
75
- if (context?.previousUser && updates) {
76
- const previousUser = context.previousUser;
77
- const changedKeys = Object.keys(updates) as Array<keyof User>;
78
- const partialRollback = changedKeys.reduce<Partial<User>>((acc, key) => {
79
- (acc as Record<string, unknown>)[key as string] = previousUser[key];
80
- return acc;
81
- }, {});
82
-
83
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
84
- if (current) {
85
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
86
- ...current,
87
- ...partialRollback,
88
- });
89
- }
90
- if (activeSessionId) {
91
- const currentProfile = queryClient.getQueryData<User>(
92
- queryKeys.users.profile(activeSessionId),
93
- );
94
- if (currentProfile) {
95
- queryClient.setQueryData<User>(queryKeys.users.profile(activeSessionId), {
96
- ...currentProfile,
97
- ...partialRollback,
98
- });
99
- }
100
- }
101
- }
102
- toast.error(
103
- describeUsernameRefusal(error, updates?.username ?? '', t) ??
104
- describeApiError(error, t, t('actionErrors.updateProfile')),
105
- );
106
- },
107
- // On success, invalidate and refetch
108
- onSuccess: (data, updates) => {
109
- // Update cache with server response
110
- queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
111
- if (activeSessionId) {
112
- queryClient.setQueryData(queryKeys.users.profile(activeSessionId), data);
113
- }
114
28
 
115
- // Update authStore so frontend components see the changes immediately
116
- useAuthStore.getState().setUser(data);
117
-
118
- const cleared = clearedFieldsFromProfileUpdate(updates);
119
- upsertCachedUser(queryClient, data, data.id, {
120
- cleared: cleared.length > 0 ? cleared : undefined,
121
- });
122
-
123
- // Invalidate all related queries so every consumer (the account dialog,
124
- // session lists, managed accounts, etc.) refetches the fresh profile.
125
- // This is critical right after `username` is set the first time, when
126
- // every cached "session profile" still reports the user as unnamed.
127
- invalidateUserQueries(queryClient);
128
- invalidateAccountQueries(queryClient);
129
- invalidateSessionQueries(queryClient);
130
- },
131
- });
132
- };
133
-
134
- /**
135
- * Upload avatar with progress tracking and offline queue support
136
- */
137
- export const useUploadAvatar = () => {
138
- const showApiError = useApiErrorToast();
29
+ /** Changes the signed-in person's profile; shown at once, rolled back if refused. */
30
+ export const useUpdateProfile = (): ActionView<[UserProfileUpdate], User> => {
31
+ const { t } = useI18n();
139
32
  const { oxyServices, activeSessionId } = useOxy();
140
- const queryClient = useQueryClient();
141
-
142
- return useMutation({
143
- mutationKey: [...mutationKeys.account.uploadAvatar],
144
- mutationFn: async (file: { uri: string; type?: string; name?: string; size?: number }) => {
145
- return authenticatedApiCall<User>(oxyServices, activeSessionId, async () => {
146
- const uploadResult = await oxyServices.assets.upload(file, { visibility: 'public' });
147
- const fileId = uploadResult?.file?.id;
148
-
149
- if (!fileId || typeof fileId !== 'string') {
150
- throw new Error('Upload succeeded but response did not contain a file ID');
151
- }
152
-
153
- // Update profile with file ID
154
- return await oxyServices.users.updateMe({ avatar: fileId });
155
- });
156
- },
157
- onMutate: async (file) => {
158
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.current(activeSessionId) });
159
- const previousUser = queryClient.getQueryData<User>(
160
- queryKeys.accounts.current(activeSessionId),
161
- );
162
-
163
- // Optimistically set a temporary avatar (using file URI as placeholder)
164
- if (previousUser) {
165
- const optimisticUser = {
166
- ...previousUser,
167
- avatar: file.uri, // Temporary, will be replaced with fileId
168
- };
169
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), optimisticUser);
170
- if (activeSessionId) {
171
- queryClient.setQueryData<User>(queryKeys.users.profile(activeSessionId), optimisticUser);
172
- }
173
- }
174
-
175
- return { previousUser };
176
- },
177
- onError: (error, _file, context) => {
178
- // Avatar upload only mutates the `avatar` field — restore only that key
179
- if (context?.previousUser) {
180
- const previousAvatar = context.previousUser.avatar;
181
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
182
- if (current) {
183
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
184
- ...current,
185
- avatar: previousAvatar,
186
- });
187
- }
188
- if (activeSessionId) {
189
- const currentProfile = queryClient.getQueryData<User>(
190
- queryKeys.users.profile(activeSessionId),
191
- );
192
- if (currentProfile) {
193
- queryClient.setQueryData<User>(queryKeys.users.profile(activeSessionId), {
194
- ...currentProfile,
195
- avatar: previousAvatar,
196
- });
197
- }
198
- }
199
- }
200
- showApiError(error, 'actionErrors.uploadAvatar');
201
- },
202
- onSuccess: (data) => {
203
- queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
204
- if (activeSessionId) {
205
- queryClient.setQueryData(queryKeys.users.profile(activeSessionId), data);
206
- }
207
-
208
- // Update authStore so frontend components see the changes immediately
209
- useAuthStore.getState().setUser(data);
210
-
211
- // Invalidate all related queries to refresh everywhere, including the
212
- // sessions cache so other-account avatars update too.
213
- invalidateUserQueries(queryClient);
214
- invalidateAccountQueries(queryClient);
215
- invalidateSessionQueries(queryClient);
216
- toast.success('Avatar updated successfully');
217
- },
218
- });
33
+ const view = useAction(updateProfile);
34
+ const { run: call } = view;
35
+ const run = useCallback(
36
+ (updates: UserProfileUpdate) =>
37
+ call(oxyServices, activeSessionId, updates).catch((error: unknown) => {
38
+ toast.error(
39
+ describeUsernameRefusal(error, updates.username ?? '', t) ??
40
+ describeApiError(error, t, t('actionErrors.updateProfile')),
41
+ );
42
+ throw error;
43
+ }),
44
+ [call, oxyServices, activeSessionId, t],
45
+ );
46
+ return { ...view, run };
219
47
  };
220
48
 
221
- /**
222
- * Variables accepted by the `useUpdateAccountSettings` mutation.
223
- *
224
- * `currentUser` is captured at dispatch time so the rebuilt user object the
225
- * mutation returns is computed against a stable snapshot — NOT the cache
226
- * value at the moment the API call settles. Reading from the cache inside
227
- * `mutationFn` would race with sibling optimistic updates: a concurrent
228
- * write could already have overwritten the cache by the time the privacy
229
- * update returns, causing the rebuilt user to clobber the sibling's
230
- * optimistic value.
231
- */
232
- interface UpdateAccountSettingsVariables {
233
- /** Subset of privacy fields to write. */
234
- updates: Partial<PrivacySettings>;
235
- /**
236
- * The User snapshot captured at mutation dispatch time. The mutation
237
- * rebuilds this user with the updated `privacySettings` and returns it
238
- * to `onSuccess`. Required to avoid the race described above.
239
- */
240
- currentUser: User;
241
- }
242
-
243
- /**
244
- * Update account settings (privacy preferences).
245
- *
246
- * Privacy settings are not part of the `PUT /users/me` allow-list; the API
247
- * would silently drop them. Route through `updatePrivacySettings` so the
248
- * dedicated `PATCH /privacy/:id/privacy` endpoint performs a dot-path merge
249
- * and returns the updated `privacySettings` object.
250
- *
251
- * The returned object exposes the standard mutation surface PLUS a
252
- * convenience `mutate(updates)` / `mutateAsync(updates)` that snapshots
253
- * the current user from `useOxy()` at dispatch time. Callers that need to
254
- * supply their own user snapshot (testing, server-side) can call the
255
- * underlying `.mutate({ updates, currentUser })` form via `.mutation`.
256
- */
257
- export const useUpdateAccountSettings = () => {
49
+ /** Uploads a new picture and makes it the signed-in person's avatar. */
50
+ export const useUploadAvatar = (): ActionView<[AvatarFile], User> => {
258
51
  const showApiError = useApiErrorToast();
259
- const { oxyServices, activeSessionId, user } = useOxy();
260
- const queryClient = useQueryClient();
261
-
262
- const mutation = useMutation({
263
- mutationKey: [...mutationKeys.account.updateSettings],
264
- mutationFn: async ({ updates, currentUser }: UpdateAccountSettingsVariables) => {
265
- const userId = currentUser.id;
266
- if (!userId) {
267
- throw new Error('User ID is required to update account settings');
268
- }
269
- const updatedPrivacy = await authenticatedApiCall<PrivacySettings>(
270
- oxyServices,
271
- activeSessionId,
272
- () => oxyServices.privacy.updateSettings(updates, userId),
273
- );
274
- // Rebuild against the dispatch-time snapshot, NOT the live cache.
275
- // The cache may have been mutated by a sibling write between
276
- // dispatch and settle; using `currentUser` keeps this mutation
277
- // hermetic.
278
- return {
279
- ...currentUser,
280
- privacySettings: updatedPrivacy,
281
- };
282
- },
283
- onMutate: async ({ updates }) => {
284
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.settings() });
285
- const previousUser = queryClient.getQueryData<User>(
286
- queryKeys.accounts.current(activeSessionId),
287
- );
288
-
289
- if (previousUser) {
290
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
291
- ...previousUser,
292
- privacySettings: {
293
- ...previousUser.privacySettings,
294
- ...updates,
295
- },
296
- });
297
- }
298
-
299
- return { previousUser };
300
- },
301
- onError: (error, { updates }, context) => {
302
- // Restore only the privacySettings keys this mutation tried to change
303
- if (context?.previousUser && updates) {
304
- const previousPrivacy = context.previousUser.privacySettings ?? {};
305
- const changedKeys = Object.keys(updates) as Array<keyof PrivacySettings>;
306
- const partialPrivacyRollback = changedKeys.reduce<Partial<PrivacySettings>>((acc, key) => {
307
- (acc as Record<string, unknown>)[key as string] = (
308
- previousPrivacy as Record<string, unknown>
309
- )[key as string];
310
- return acc;
311
- }, {});
312
-
313
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
314
- if (current) {
315
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
316
- ...current,
317
- privacySettings: {
318
- ...(current.privacySettings ?? {}),
319
- ...partialPrivacyRollback,
320
- },
321
- });
322
- }
323
- }
324
- showApiError(error, 'actionErrors.updateSettings');
325
- },
326
- onSuccess: (data) => {
327
- queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
328
-
329
- // Update authStore so frontend components see the changes immediately
330
- useAuthStore.getState().setUser(data);
331
-
332
- invalidateAccountQueries(queryClient);
333
- toast.success('Settings updated successfully');
334
- },
335
- onSettled: () => {
336
- queryClient.invalidateQueries({ queryKey: queryKeys.accounts.settings() });
337
- },
338
- });
339
-
340
- // Snapshot the current user at dispatch time. Reading `user` here (from
341
- // the `useOxy()` closure of the call to `useUpdateAccountSettings`) is
342
- // the dispatch-time value, captured the moment `mutate()` runs — exactly
343
- // what the race fix needs.
344
- return {
345
- ...mutation,
346
- mutate: (updates: Partial<PrivacySettings>): void => {
347
- const currentUser =
348
- user ?? queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
349
- if (!currentUser) {
350
- toast.error('Cannot update account settings: no current user');
351
- return;
352
- }
353
- mutation.mutate({ updates, currentUser });
354
- },
355
- mutateAsync: async (updates: Partial<PrivacySettings>): Promise<User> => {
356
- const currentUser =
357
- user ?? queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
358
- if (!currentUser) {
359
- throw new Error('Cannot update account settings: no current user');
360
- }
361
- return mutation.mutateAsync({ updates, currentUser });
362
- },
363
- };
52
+ const { oxyServices, activeSessionId } = useOxy();
53
+ const view = useAction(uploadAvatar);
54
+ const { run: call } = view;
55
+ const run = useCallback(
56
+ async (file: AvatarFile) => {
57
+ try {
58
+ const user = await call(oxyServices, activeSessionId, file);
59
+ toast.success('Avatar updated successfully');
60
+ return user;
61
+ } catch (error) {
62
+ showApiError(error, 'actionErrors.uploadAvatar');
63
+ throw error;
64
+ }
65
+ },
66
+ [call, oxyServices, activeSessionId, showApiError],
67
+ );
68
+ return { ...view, run };
364
69
  };
365
70
 
366
71
  /**
367
- * Update privacy settings with optimistic updates and authentication handling
72
+ * Changes the signed-in person's privacy preferences through the dedicated
73
+ * privacy endpoint (`PUT /users/me` would silently drop them). The person is
74
+ * snapshotted when the write is made, and the user it returns is rebuilt
75
+ * from that snapshot, so a sibling write settling meanwhile is not overwritten.
368
76
  */
369
- export const useUpdatePrivacySettings = () => {
77
+ export const useUpdateAccountSettings = (): ActionView<[Partial<PrivacySettings>], User> => {
370
78
  const showApiError = useApiErrorToast();
371
79
  const { oxyServices, activeSessionId, user } = useOxy();
372
- const queryClient = useQueryClient();
373
-
374
- return useMutation({
375
- mutationKey: [...mutationKeys.account.updatePrivacySettings],
376
- mutationFn: async ({
377
- settings,
378
- userId,
379
- }: {
380
- settings: Partial<PrivacySettings>;
381
- userId?: string;
382
- }) => {
383
- const targetUserId = userId || user?.id;
384
- if (!targetUserId) {
385
- throw new Error('User ID is required');
386
- }
387
-
388
- return authenticatedApiCall<PrivacySettings>(oxyServices, activeSessionId, () =>
389
- oxyServices.privacy.updateSettings(settings, targetUserId),
390
- );
391
- },
392
- // Optimistic update
393
- onMutate: async ({ settings, userId }) => {
394
- const targetUserId = userId || user?.id;
395
- if (!targetUserId) return;
396
-
397
- // Cancel outgoing refetches
398
- await queryClient.cancelQueries({ queryKey: queryKeys.privacy.settings(targetUserId) });
399
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.current(activeSessionId) });
400
-
401
- // Snapshot previous values
402
- const previousPrivacySettings = queryClient.getQueryData(
403
- queryKeys.privacy.settings(targetUserId),
404
- );
405
- const previousUser = queryClient.getQueryData<User>(
406
- queryKeys.accounts.current(activeSessionId),
407
- );
408
-
409
- // Optimistically update privacy settings
410
- if (previousPrivacySettings) {
411
- queryClient.setQueryData<PrivacySettings>(queryKeys.privacy.settings(targetUserId), {
412
- ...(previousPrivacySettings as PrivacySettings),
413
- ...settings,
414
- });
415
- }
416
-
417
- // Also update user query if available
418
- if (previousUser) {
419
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
420
- ...previousUser,
421
- privacySettings: {
422
- ...previousUser.privacySettings,
423
- ...settings,
424
- },
425
- });
426
- }
427
-
428
- return { previousPrivacySettings, previousUser };
429
- },
430
- // On error, rollback ONLY the privacy keys this mutation tried to change.
431
- // Restoring the entire previous object would wipe out other concurrent
432
- // optimistic updates (e.g. user toggles two privacy switches in quick
433
- // succession; failure on one must not revert the other).
434
- onError: (error, { settings, userId }, context) => {
435
- const targetUserId = userId || user?.id;
436
- const changedKeys = settings ? (Object.keys(settings) as Array<keyof PrivacySettings>) : [];
437
-
438
- // Rollback the privacy.settings query (partial)
439
- if (context?.previousPrivacySettings && targetUserId && changedKeys.length > 0) {
440
- const previousPrivacy = context.previousPrivacySettings as Record<string, unknown>;
441
- const partialPrivacyRollback = changedKeys.reduce<Partial<PrivacySettings>>((acc, key) => {
442
- (acc as Record<string, unknown>)[key as string] = previousPrivacy[key as string];
443
- return acc;
444
- }, {});
445
- const currentPrivacy = queryClient.getQueryData<PrivacySettings>(
446
- queryKeys.privacy.settings(targetUserId),
447
- );
448
- if (currentPrivacy) {
449
- queryClient.setQueryData<PrivacySettings>(queryKeys.privacy.settings(targetUserId), {
450
- ...currentPrivacy,
451
- ...partialPrivacyRollback,
452
- });
453
- }
454
- }
455
-
456
- // Rollback the accounts.current() user.privacySettings (partial)
457
- if (context?.previousUser && changedKeys.length > 0) {
458
- const previousPrivacy = (context.previousUser.privacySettings ?? {}) as Record<
459
- string,
460
- unknown
461
- >;
462
- const partialPrivacyRollback = changedKeys.reduce<Partial<PrivacySettings>>((acc, key) => {
463
- (acc as Record<string, unknown>)[key as string] = previousPrivacy[key as string];
464
- return acc;
465
- }, {});
466
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
467
- if (current) {
468
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
469
- ...current,
470
- privacySettings: {
471
- ...(current.privacySettings ?? {}),
472
- ...partialPrivacyRollback,
473
- },
474
- });
475
- }
476
- }
477
-
478
- // After partial rollback, force a fresh fetch from the server so any
479
- // concurrent-mutation state we may have failed to restore correctly
480
- // gets reconciled with the source of truth. Targeted at privacy.settings
481
- // only — NOT onSettled, which would defeat the merge fix on success.
482
- if (targetUserId) {
483
- queryClient.invalidateQueries({ queryKey: queryKeys.privacy.settings(targetUserId) });
484
- }
485
-
486
- showApiError(error, 'actionErrors.updatePrivacy');
487
- },
488
- // On success, MERGE the server response into the cached state. Older
489
- // API builds returned only the changed field (or wiped the privacySettings
490
- // subdocument when handed a partial update), which would clobber every
491
- // other toggle if we blindly replaced. Defensive merge means the UI stays
492
- // consistent regardless of server behaviour.
493
- //
494
- // BOTH the privacy.settings query AND the accounts.current() user are
495
- // gated on `targetUserId`. If it's missing (no userId param, no logged-in
496
- // user) the optimistic update in onMutate would have early-returned too,
497
- // so neither cache was ever touched — there's nothing to reconcile here.
498
- onSuccess: (data, { userId, settings }) => {
499
- const targetUserId = userId || user?.id;
500
- if (!targetUserId) return;
501
-
502
- const incoming = (data ?? {}) as PrivacySettings;
503
- const requested = (settings ?? {}) as Partial<PrivacySettings>;
504
-
505
- queryClient.setQueryData<PrivacySettings>(
506
- queryKeys.privacy.settings(targetUserId),
507
- (previous) => ({
508
- ...(previous ?? {}),
509
- ...requested,
510
- ...incoming, // server wins for fields it explicitly returned
511
- }),
512
- );
513
-
514
- const currentUser = queryClient.getQueryData<User>(
515
- queryKeys.accounts.current(activeSessionId),
516
- );
517
- if (currentUser) {
518
- const updatedUser: User = {
519
- ...currentUser,
520
- privacySettings: {
521
- ...(currentUser.privacySettings ?? {}),
522
- ...requested,
523
- ...incoming,
524
- },
525
- };
526
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), updatedUser);
527
- useAuthStore.getState().setUser(updatedUser);
528
- }
529
- // Deliberately NOT invalidating any queries here. invalidateAccountQueries
530
- // invalidates accounts.all which is the prefix for accounts.current(),
531
- // triggering a background refetch of useCurrentUser that would overwrite
532
- // the merged state above. The onSuccess merge is the source of truth.
533
- },
534
- });
80
+ const view = useAction(updateAccountSettings);
81
+ const { run: call } = view;
82
+ const run = useCallback(
83
+ async (updates: Partial<PrivacySettings>) => {
84
+ if (!user) throw new Error('Cannot update account settings: no current user');
85
+ try {
86
+ const updated = await call(oxyServices, activeSessionId, user, updates);
87
+ toast.success('Settings updated successfully');
88
+ return updated;
89
+ } catch (error) {
90
+ showApiError(error, 'actionErrors.updateSettings');
91
+ throw error;
92
+ }
93
+ },
94
+ [call, oxyServices, activeSessionId, user, showApiError],
95
+ );
96
+ return { ...view, run };
535
97
  };
536
98
 
537
- /** Uploaded file data structure from API */
538
- interface UploadedFile {
539
- id: string;
540
- originalName?: string;
541
- sha256?: string;
542
- mime?: string;
543
- size?: number;
544
- createdAt?: string;
545
- metadata?: Record<string, unknown>;
546
- variants?: Array<{
547
- type: string;
548
- key: string;
549
- width?: number;
550
- height?: number;
551
- readyAt?: string;
552
- metadata?: Record<string, unknown>;
553
- }>;
554
- }
555
-
556
- /** Upload result type that supports both single file and batch responses */
557
- interface UploadResult {
558
- file?: UploadedFile;
559
- files?: UploadedFile[];
560
- id?: string;
99
+ /** What `useUpdatePrivacySettings` writes: some settings of a person, the active account by default. */
100
+ export interface PrivacySettingsChange {
101
+ settings: Partial<PrivacySettings>;
102
+ userId?: string;
561
103
  }
562
104
 
563
105
  /**
564
- * Update the authenticated user's notification preferences with optimistic
565
- * updates. Persisted on the User document via `PUT /users/me` — same cache-
566
- * invalidation behaviour as `useUpdateProfile`.
106
+ * Changes privacy settings, shown at once. Only the fields asked for are
107
+ * written, so two quick toggles never undo each other, and a failure drops
108
+ * exactly its own.
567
109
  */
568
- export const useUpdateNotificationPreferences = () => {
110
+ export const useUpdatePrivacySettings = (): ActionView<
111
+ [PrivacySettingsChange],
112
+ PrivacySettings
113
+ > => {
569
114
  const showApiError = useApiErrorToast();
570
- const { oxyServices, activeSessionId } = useOxy();
571
- const queryClient = useQueryClient();
572
-
573
- return useMutation({
574
- mutationKey: [...mutationKeys.account.updateNotificationPreferences],
575
- mutationFn: async (preferences: Partial<NotificationPreferences>) => {
576
- return authenticatedApiCall<User>(oxyServices, activeSessionId, () =>
577
- oxyServices.users.updateMe({ notificationPreferences: preferences }),
578
- );
579
- },
580
- onMutate: async (preferences) => {
581
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.current(activeSessionId) });
582
- const previousUser = queryClient.getQueryData<User>(
583
- queryKeys.accounts.current(activeSessionId),
584
- );
585
-
586
- if (previousUser) {
587
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
588
- ...previousUser,
589
- notificationPreferences: {
590
- ...previousUser.notificationPreferences,
591
- ...preferences,
592
- },
593
- });
594
- }
595
-
596
- return { previousUser };
597
- },
598
- onError: (error, _preferences, context) => {
599
- if (context?.previousUser) {
600
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
601
- if (current) {
602
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
603
- ...current,
604
- notificationPreferences: context.previousUser.notificationPreferences,
605
- });
606
- }
607
- }
608
- showApiError(error, 'actionErrors.updateNotifications');
609
- },
610
- onSuccess: (data) => {
611
- queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
612
- useAuthStore.getState().setUser(data);
613
- invalidateAccountQueries(queryClient);
614
- },
615
- });
115
+ const { oxyServices, activeSessionId, user } = useOxy();
116
+ const view = useAction(updatePrivacySettings);
117
+ const { run: call } = view;
118
+ const userId = user?.id;
119
+ const run = useCallback(
120
+ (change: PrivacySettingsChange) =>
121
+ call(oxyServices, activeSessionId, change.userId || userId, change.settings).catch(
122
+ (error: unknown) => {
123
+ showApiError(error, 'actionErrors.updatePrivacy');
124
+ throw error;
125
+ },
126
+ ),
127
+ [call, oxyServices, activeSessionId, userId, showApiError],
128
+ );
129
+ return { ...view, run };
616
130
  };
617
131
 
618
- /**
619
- * Update the authenticated user's general preferences (language, theme,
620
- * reduce-motion, timezone). Persisted on the User document via
621
- * `PUT /users/me`.
622
- */
623
- export const useUpdateUserPreferences = () => {
132
+ /** Changes the signed-in person's notification preferences, shown at once. */
133
+ export const useUpdateNotificationPreferences = (): ActionView<
134
+ [Partial<NotificationPreferences>],
135
+ User
136
+ > => {
624
137
  const showApiError = useApiErrorToast();
625
138
  const { oxyServices, activeSessionId } = useOxy();
626
- const queryClient = useQueryClient();
627
-
628
- return useMutation({
629
- mutationKey: [...mutationKeys.account.updateUserPreferences],
630
- mutationFn: async (preferences: Partial<UserPreferences>) => {
631
- return authenticatedApiCall<User>(oxyServices, activeSessionId, () =>
632
- oxyServices.users.updateMe({ userPreferences: preferences }),
633
- );
634
- },
635
- onMutate: async (preferences) => {
636
- await queryClient.cancelQueries({ queryKey: queryKeys.accounts.current(activeSessionId) });
637
- const previousUser = queryClient.getQueryData<User>(
638
- queryKeys.accounts.current(activeSessionId),
639
- );
640
-
641
- if (previousUser) {
642
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
643
- ...previousUser,
644
- userPreferences: {
645
- ...previousUser.userPreferences,
646
- ...preferences,
647
- },
648
- });
649
- }
650
-
651
- return { previousUser };
652
- },
653
- onError: (error, _preferences, context) => {
654
- if (context?.previousUser) {
655
- const current = queryClient.getQueryData<User>(queryKeys.accounts.current(activeSessionId));
656
- if (current) {
657
- queryClient.setQueryData<User>(queryKeys.accounts.current(activeSessionId), {
658
- ...current,
659
- userPreferences: context.previousUser.userPreferences,
660
- });
661
- }
662
- }
663
- showApiError(error, 'actionErrors.updatePreferences');
664
- },
665
- onSuccess: (data) => {
666
- queryClient.setQueryData(queryKeys.accounts.current(activeSessionId), data);
667
- useAuthStore.getState().setUser(data);
668
- invalidateAccountQueries(queryClient);
669
- },
670
- });
139
+ const view = useAction(updateNotificationPreferences);
140
+ const { run: call } = view;
141
+ const run = useCallback(
142
+ (preferences: Partial<NotificationPreferences>) =>
143
+ call(oxyServices, activeSessionId, preferences).catch((error: unknown) => {
144
+ showApiError(error, 'actionErrors.updateNotifications');
145
+ throw error;
146
+ }),
147
+ [call, oxyServices, activeSessionId, showApiError],
148
+ );
149
+ return { ...view, run };
671
150
  };
672
151
 
673
- /**
674
- * Revoke the current user's grant for a connected application (by its
675
- * `applicationId`). Removes the grant so the app no longer appears in the user's
676
- * "Connected apps" list — next sign-in for that app will require explicit
677
- * re-consent.
678
- */
679
- export const useRevokeConnectedApp = () => {
152
+ /** Changes the signed-in person's general preferences (language, theme, timezone), shown at once. */
153
+ export const useUpdateUserPreferences = (): ActionView<[Partial<UserPreferences>], User> => {
680
154
  const showApiError = useApiErrorToast();
681
155
  const { oxyServices, activeSessionId } = useOxy();
682
- const queryClient = useQueryClient();
683
-
684
- return useMutation({
685
- mutationKey: [...mutationKeys.connectedApps.revoke],
686
- mutationFn: async (applicationId: string) => {
687
- return authenticatedApiCall<void>(oxyServices, activeSessionId, () =>
688
- oxyServices.apps.connected.revoke(applicationId),
689
- );
690
- },
691
- onSuccess: () => {
692
- invalidateConnectedAppsQueries(queryClient);
693
- },
694
- onError: (error) => {
695
- showApiError(error, 'actionErrors.revokeConnectedApp');
696
- },
697
- });
156
+ const view = useAction(updateUserPreferences);
157
+ const { run: call } = view;
158
+ const run = useCallback(
159
+ (preferences: Partial<UserPreferences>) =>
160
+ call(oxyServices, activeSessionId, preferences).catch((error: unknown) => {
161
+ showApiError(error, 'actionErrors.updatePreferences');
162
+ throw error;
163
+ }),
164
+ [call, oxyServices, activeSessionId, showApiError],
165
+ );
166
+ return { ...view, run };
698
167
  };
699
168
 
700
169
  /**
701
- * Upload file with authentication handling and progress tracking
170
+ * Revokes a connected application's grant (by its `applicationId`): it leaves
171
+ * the "Connected apps" list, and its next sign-in asks for consent again.
702
172
  */
703
- export const useUploadFile = () => {
704
- const { oxyServices, activeSessionId } = useOxy();
705
-
706
- return useMutation({
707
- mutationKey: [...mutationKeys.account.uploadFile],
708
- mutationFn: async ({
709
- file,
710
- visibility,
711
- metadata,
712
- onProgress,
713
- }: {
714
- file: AssetUploadInput;
715
- visibility?: 'private' | 'public' | 'unlisted';
716
- metadata?: AssetMetadata;
717
- onProgress?: (progress: number) => void;
718
- }) => {
719
- return authenticatedApiCall<UploadResult>(oxyServices, activeSessionId, () =>
720
- oxyServices.assets.upload(file, { visibility, metadata, onProgress }),
721
- );
722
- },
723
- });
724
- };
725
-
726
- /**
727
- * Take an application's access to one of the person's files away (ADR 0043
728
- * stage 4c): optimistic — the application leaves the cached list at once and
729
- * comes back if the revoke fails — then the list is re-read either way. The
730
- * caller shows its own toasts (it knows the application's name).
731
- */
732
- export const useRevokeFileAppAccess = () => {
173
+ export const useRevokeConnectedApp = (): ActionView<[string], void> => {
174
+ const showApiError = useApiErrorToast();
733
175
  const { oxyServices, activeSessionId } = useOxy();
734
- const queryClient = useQueryClient();
735
-
736
- return useMutation({
737
- mutationKey: [...mutationKeys.fileAppAccess.revoke],
738
- mutationFn: async ({ fileId, applicationId }: { fileId: string; applicationId: string }) =>
739
- authenticatedApiCall<FileApplicationAccessRevocation>(oxyServices, activeSessionId, () =>
740
- oxyServices.assets.revokeAppAccess(fileId, applicationId),
741
- ),
742
- onMutate: async ({ fileId, applicationId }) => {
743
- await queryClient.cancelQueries({ queryKey: queryKeys.files.appAccess(fileId) });
744
- return { previous: removeAppAccessFromCache(queryClient, fileId, applicationId) };
745
- },
746
- onError: (_error, { fileId }, context) => {
747
- if (context?.previous) {
748
- queryClient.setQueryData(queryKeys.files.appAccess(fileId), context.previous);
749
- }
750
- },
751
- onSettled: (_data, _error, { fileId }) => {
752
- void queryClient.invalidateQueries({ queryKey: queryKeys.files.appAccess(fileId) });
753
- },
754
- });
176
+ const view = useAction(revokeConnectedApp);
177
+ const { run: call } = view;
178
+ const run = useCallback(
179
+ (applicationId: string) =>
180
+ call(oxyServices, activeSessionId, applicationId).catch((error: unknown) => {
181
+ showApiError(error, 'actionErrors.revokeConnectedApp');
182
+ throw error;
183
+ }),
184
+ [call, oxyServices, activeSessionId, showApiError],
185
+ );
186
+ return { ...view, run };
755
187
  };