@oxyhq/services 14.1.0 → 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 (262) hide show
  1. package/lib/commonjs/index.js +0 -17
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/SignInAccountChooser.js +189 -0
  4. package/lib/commonjs/ui/components/SignInAccountChooser.js.map +1 -0
  5. package/lib/commonjs/ui/components/SignInModal.js +350 -131
  6. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  7. package/lib/commonjs/ui/context/OxyContext.js +340 -1547
  8. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  9. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +61 -64
  10. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  11. package/lib/commonjs/ui/hooks/useAuth.js +14 -33
  12. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/usePasswordSignIn.js +170 -0
  14. package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +1 -0
  15. package/lib/commonjs/ui/hooks/useProfileEditing.js +2 -5
  16. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  17. package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -2
  18. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  19. package/lib/commonjs/ui/navigation/routes.js +1 -0
  20. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  21. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +93 -68
  22. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/EditProfileScreen.js +187 -0
  24. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -0
  25. package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -7
  26. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/OxyAuthScreen.js +231 -95
  28. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/ProfileScreen.js +15 -2
  30. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/linkFormat.js +38 -0
  32. package/lib/commonjs/ui/screens/linkFormat.js.map +1 -0
  33. package/lib/commonjs/ui/session/authStore.js +146 -0
  34. package/lib/commonjs/ui/session/authStore.js.map +1 -0
  35. package/lib/commonjs/ui/session/createSessionClient.js +23 -17
  36. package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
  37. package/lib/commonjs/ui/session/index.js +13 -7
  38. package/lib/commonjs/ui/session/index.js.map +1 -1
  39. package/lib/commonjs/ui/session/tokenTransport.js +19 -31
  40. package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
  41. package/lib/commonjs/ui/utils/isWebBrowser.js +13 -0
  42. package/lib/commonjs/ui/utils/isWebBrowser.js.map +1 -0
  43. package/lib/commonjs/utils/deviceFlowSignIn.js +13 -16
  44. package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
  45. package/lib/module/index.js +0 -5
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/ui/components/SignInAccountChooser.js +183 -0
  48. package/lib/module/ui/components/SignInAccountChooser.js.map +1 -0
  49. package/lib/module/ui/components/SignInModal.js +352 -134
  50. package/lib/module/ui/components/SignInModal.js.map +1 -1
  51. package/lib/module/ui/context/OxyContext.js +342 -1551
  52. package/lib/module/ui/context/OxyContext.js.map +1 -1
  53. package/lib/module/ui/context/hooks/useAuthOperations.js +60 -63
  54. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  55. package/lib/module/ui/hooks/useAuth.js +14 -33
  56. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  57. package/lib/module/ui/hooks/usePasswordSignIn.js +165 -0
  58. package/lib/module/ui/hooks/usePasswordSignIn.js.map +1 -0
  59. package/lib/module/ui/hooks/useProfileEditing.js +2 -5
  60. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  61. package/lib/module/ui/hooks/useSessionManagement.js +1 -1
  62. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  63. package/lib/module/ui/navigation/routes.js +1 -0
  64. package/lib/module/ui/navigation/routes.js.map +1 -1
  65. package/lib/module/ui/screens/EditProfileFieldScreen.js +91 -66
  66. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  67. package/lib/module/ui/screens/EditProfileScreen.js +182 -0
  68. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -0
  69. package/lib/module/ui/screens/ManageAccountScreen.js +3 -7
  70. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  71. package/lib/module/ui/screens/OxyAuthScreen.js +233 -97
  72. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  73. package/lib/module/ui/screens/ProfileScreen.js +15 -2
  74. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  75. package/lib/module/ui/screens/linkFormat.js +31 -0
  76. package/lib/module/ui/screens/linkFormat.js.map +1 -0
  77. package/lib/module/ui/session/authStore.js +143 -0
  78. package/lib/module/ui/session/authStore.js.map +1 -0
  79. package/lib/module/ui/session/createSessionClient.js +22 -16
  80. package/lib/module/ui/session/createSessionClient.js.map +1 -1
  81. package/lib/module/ui/session/index.js +9 -9
  82. package/lib/module/ui/session/index.js.map +1 -1
  83. package/lib/module/ui/session/tokenTransport.js +20 -33
  84. package/lib/module/ui/session/tokenTransport.js.map +1 -1
  85. package/lib/module/ui/utils/isWebBrowser.js +11 -0
  86. package/lib/module/ui/utils/isWebBrowser.js.map +1 -0
  87. package/lib/module/utils/deviceFlowSignIn.js +14 -17
  88. package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
  89. package/lib/typescript/commonjs/index.d.ts +0 -1
  90. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +29 -0
  92. package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +15 -10
  94. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +36 -42
  96. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +18 -23
  98. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
  100. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +31 -0
  103. package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +0 -1
  105. package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  107. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts +14 -0
  110. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  112. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +13 -12
  114. package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +23 -0
  117. package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/ui/session/authStore.d.ts +33 -0
  119. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +19 -15
  121. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/session/index.d.ts +9 -9
  123. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +13 -19
  125. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts +9 -0
  127. package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +15 -13
  129. package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
  130. package/lib/typescript/module/index.d.ts +0 -1
  131. package/lib/typescript/module/index.d.ts.map +1 -1
  132. package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +29 -0
  133. package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +1 -0
  134. package/lib/typescript/module/ui/components/SignInModal.d.ts +15 -10
  135. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  136. package/lib/typescript/module/ui/context/OxyContext.d.ts +36 -42
  137. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  138. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +18 -23
  139. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  140. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
  141. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  142. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +31 -0
  144. package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
  145. package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +0 -1
  146. package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
  147. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  148. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  149. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  150. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts +14 -0
  151. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -0
  152. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  153. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +13 -12
  155. package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  156. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/screens/linkFormat.d.ts +23 -0
  158. package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -0
  159. package/lib/typescript/module/ui/session/authStore.d.ts +33 -0
  160. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -0
  161. package/lib/typescript/module/ui/session/createSessionClient.d.ts +19 -15
  162. package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/session/index.d.ts +9 -9
  164. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/session/tokenTransport.d.ts +13 -19
  166. package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/utils/isWebBrowser.d.ts +9 -0
  168. package/lib/typescript/module/ui/utils/isWebBrowser.d.ts.map +1 -0
  169. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +15 -13
  170. package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
  171. package/package.json +4 -4
  172. package/src/index.ts +0 -4
  173. package/src/ui/components/SignInAccountChooser.tsx +162 -0
  174. package/src/ui/components/SignInModal.tsx +309 -139
  175. package/src/ui/context/OxyContext.tsx +532 -1785
  176. package/src/ui/context/hooks/useAuthOperations.ts +65 -76
  177. package/src/ui/hooks/useAuth.ts +14 -35
  178. package/src/ui/hooks/usePasswordSignIn.ts +207 -0
  179. package/src/ui/hooks/useProfileEditing.ts +2 -8
  180. package/src/ui/hooks/useSessionManagement.ts +1 -1
  181. package/src/ui/navigation/routes.ts +2 -0
  182. package/src/ui/screens/EditProfileFieldScreen.tsx +102 -66
  183. package/src/ui/screens/EditProfileScreen.tsx +155 -0
  184. package/src/ui/screens/ManageAccountScreen.tsx +3 -7
  185. package/src/ui/screens/OxyAuthScreen.tsx +259 -112
  186. package/src/ui/screens/ProfileScreen.tsx +15 -2
  187. package/src/ui/screens/__tests__/linkFormat.test.ts +73 -0
  188. package/src/ui/screens/linkFormat.ts +37 -0
  189. package/src/ui/session/__tests__/createSessionClient.test.ts +22 -7
  190. package/src/ui/session/__tests__/tokenTransport.test.ts +37 -49
  191. package/src/ui/session/authStore.ts +164 -0
  192. package/src/ui/session/createSessionClient.ts +30 -17
  193. package/src/ui/session/index.ts +10 -9
  194. package/src/ui/session/tokenTransport.ts +26 -36
  195. package/src/ui/utils/isWebBrowser.ts +8 -0
  196. package/src/utils/__tests__/deviceFlowSignIn.test.ts +50 -131
  197. package/src/utils/deviceFlowSignIn.ts +19 -26
  198. package/lib/commonjs/ui/context/inSessionTokenRefresh.js +0 -243
  199. package/lib/commonjs/ui/context/inSessionTokenRefresh.js.map +0 -1
  200. package/lib/commonjs/ui/context/silentSessionRestore.js +0 -56
  201. package/lib/commonjs/ui/context/silentSessionRestore.js.map +0 -1
  202. package/lib/commonjs/ui/hooks/useWebSSO.js +0 -28
  203. package/lib/commonjs/ui/hooks/useWebSSO.js.map +0 -1
  204. package/lib/commonjs/ui/session/projectSessionState.js +0 -86
  205. package/lib/commonjs/ui/session/projectSessionState.js.map +0 -1
  206. package/lib/commonjs/ui/session/sessionClientHost.js +0 -30
  207. package/lib/commonjs/ui/session/sessionClientHost.js.map +0 -1
  208. package/lib/commonjs/ui/utils/activeAuthuser.js +0 -142
  209. package/lib/commonjs/ui/utils/activeAuthuser.js.map +0 -1
  210. package/lib/commonjs/utils/crossApex.js +0 -74
  211. package/lib/commonjs/utils/crossApex.js.map +0 -1
  212. package/lib/module/ui/context/inSessionTokenRefresh.js +0 -238
  213. package/lib/module/ui/context/inSessionTokenRefresh.js.map +0 -1
  214. package/lib/module/ui/context/silentSessionRestore.js +0 -53
  215. package/lib/module/ui/context/silentSessionRestore.js.map +0 -1
  216. package/lib/module/ui/hooks/useWebSSO.js +0 -24
  217. package/lib/module/ui/hooks/useWebSSO.js.map +0 -1
  218. package/lib/module/ui/session/projectSessionState.js +0 -79
  219. package/lib/module/ui/session/projectSessionState.js.map +0 -1
  220. package/lib/module/ui/session/sessionClientHost.js +0 -26
  221. package/lib/module/ui/session/sessionClientHost.js.map +0 -1
  222. package/lib/module/ui/utils/activeAuthuser.js +0 -134
  223. package/lib/module/ui/utils/activeAuthuser.js.map +0 -1
  224. package/lib/module/utils/crossApex.js +0 -69
  225. package/lib/module/utils/crossApex.js.map +0 -1
  226. package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts +0 -106
  227. package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
  228. package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts +0 -36
  229. package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts.map +0 -1
  230. package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +0 -19
  231. package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +0 -1
  232. package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts +0 -45
  233. package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts.map +0 -1
  234. package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts +0 -14
  235. package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts.map +0 -1
  236. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +0 -67
  237. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +0 -1
  238. package/lib/typescript/commonjs/utils/crossApex.d.ts +0 -55
  239. package/lib/typescript/commonjs/utils/crossApex.d.ts.map +0 -1
  240. package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts +0 -106
  241. package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
  242. package/lib/typescript/module/ui/context/silentSessionRestore.d.ts +0 -36
  243. package/lib/typescript/module/ui/context/silentSessionRestore.d.ts.map +0 -1
  244. package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +0 -19
  245. package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +0 -1
  246. package/lib/typescript/module/ui/session/projectSessionState.d.ts +0 -45
  247. package/lib/typescript/module/ui/session/projectSessionState.d.ts.map +0 -1
  248. package/lib/typescript/module/ui/session/sessionClientHost.d.ts +0 -14
  249. package/lib/typescript/module/ui/session/sessionClientHost.d.ts.map +0 -1
  250. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +0 -67
  251. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +0 -1
  252. package/lib/typescript/module/utils/crossApex.d.ts +0 -55
  253. package/lib/typescript/module/utils/crossApex.d.ts.map +0 -1
  254. package/src/ui/context/inSessionTokenRefresh.ts +0 -264
  255. package/src/ui/context/silentSessionRestore.ts +0 -53
  256. package/src/ui/hooks/useWebSSO.ts +0 -23
  257. package/src/ui/session/__tests__/projectSessionState.test.ts +0 -114
  258. package/src/ui/session/__tests__/sessionClientHost.test.ts +0 -43
  259. package/src/ui/session/projectSessionState.ts +0 -85
  260. package/src/ui/session/sessionClientHost.ts +0 -27
  261. package/src/ui/utils/activeAuthuser.ts +0 -142
  262. package/src/utils/crossApex.ts +0 -75
@@ -1,9 +1,7 @@
1
1
  import type React from 'react';
2
2
  import { type ReactNode } from 'react';
3
3
  import { OxyServices } from '@oxyhq/core';
4
- import type { User, ApiError, SessionLoginResponse } from '@oxyhq/core';
5
- import type { AccountNode, CreateAccountInput } from '@oxyhq/core';
6
- import type { ClientSession } from '@oxyhq/core';
4
+ import type { User, ApiError, SessionLoginResponse, AccountNode, CreateAccountInput, ClientSession } from '@oxyhq/core';
7
5
  import type { UseFollowHook } from '../hooks/useFollow.types';
8
6
  import { useLanguageManagement } from '../hooks/useLanguageManagement';
9
7
  import type { RouteName } from '../navigation/routes';
@@ -20,16 +18,12 @@ export interface OxyContextState {
20
18
  /**
21
19
  * Whether the initial auth determination has concluded.
22
20
  *
23
- * `false` from mount until the FIRST cold-boot session restore finishes
21
+ * `false` from mount until the FIRST device-first cold boot resolves
24
22
  * during that window `isAuthenticated: false` is UNDETERMINED, not a
25
- * definitive "logged out". Flips to `true` exactly once the restore concludes
23
+ * definitive "logged out". Flips to `true` exactly once the boot concludes
26
24
  * (a session was committed OR none exists) and never reverts. Consumers should
27
25
  * defer their first auth-dependent fetch until this is `true` so a cold-boot
28
26
  * web reload with an existing session does not fetch anonymous data.
29
- *
30
- * On native, cold boot runs only the `stored-session` step, so this resolves
31
- * promptly. It is set in the restore `finally`, so the success, no-session,
32
- * and error paths all reach `true` — it can never get stuck `false`.
33
27
  */
34
28
  isAuthResolved: boolean;
35
29
  isStorageReady: boolean;
@@ -45,22 +39,31 @@ export interface OxyContextState {
45
39
  * Sign in with a username/email + password.
46
40
  *
47
41
  * Commits a successful session into context state through the SAME path the
48
- * SSO / silent-restore steps use (so `isAuthenticated` / `user` update and
49
- * the session is persisted durably). Returns a discriminated result so the
50
- * caller can branch on the
51
- * two-factor-required case which creates NO session; the caller completes
52
- * the 2FA challenge with the returned `loginToken`.
53
- *
54
- * This is the keyless native sign-in path for the slimmed Accounts app, which
55
- * no longer holds a local cryptographic identity key.
42
+ * QR device-flow and cold boot use (so `isAuthenticated` / `user` update and
43
+ * the rotating refresh family is persisted). Returns a discriminated result
44
+ * so the caller can branch on the two-factor-required case — which creates NO
45
+ * session; the caller completes the 2FA challenge with the returned
46
+ * `loginToken` via {@link OxyContextState.completeTwoFactorSignIn}.
56
47
  */
57
48
  signInWithPassword: (identifier: string, password: string, opts?: {
58
49
  deviceName?: string;
59
50
  deviceFingerprint?: string;
60
51
  }) => Promise<PasswordSignInResult>;
61
52
  /**
62
- * Handle a session returned by web SSO.
63
- * Updates auth state, persists session metadata to storage.
53
+ * Complete a 2FA-gated password sign-in started by {@link signInWithPassword}.
54
+ * Presents the short-lived `loginToken` with a TOTP `token` or a `backupCode`;
55
+ * on success the session is committed exactly like a one-step sign-in.
56
+ */
57
+ completeTwoFactorSignIn: (params: {
58
+ loginToken: string;
59
+ token?: string;
60
+ backupCode?: string;
61
+ deviceName?: string;
62
+ }) => Promise<void>;
63
+ /**
64
+ * Commit a session obtained out-of-band (the "Sign in with Oxy" QR device
65
+ * flow). Plants tokens, persists the rotating refresh family, registers the
66
+ * account into the device set, and hydrates the full user profile.
64
67
  */
65
68
  handleWebSession: (session: SessionLoginResponse) => Promise<void>;
66
69
  logout: (targetSessionId?: string) => Promise<void>;
@@ -86,10 +89,9 @@ export interface OxyContextState {
86
89
  * supplied via the `clientId` prop. Required for the cross-app device
87
90
  * sign-in flow: the sign-in components send it to
88
91
  * `POST /auth/session/create` so the API can identify the requesting app by
89
- * its real registered client id (the consent identity is then resolved
90
- * server-side and shown by the central auth web). `null` when the consuming
91
- * app did not configure a client id — the device sign-in flow surfaces a
92
- * configuration error in that case.
92
+ * its real registered client id. `null` when the consuming app did not
93
+ * configure a client id the device sign-in flow surfaces a configuration
94
+ * error in that case.
93
95
  */
94
96
  clientId: string | null;
95
97
  oxyServices: OxyServices;
@@ -102,36 +104,29 @@ export interface OxyContextState {
102
104
  /** Every account the caller can access — own personal root, owned, and shared — from `listAccounts()`. */
103
105
  accounts: AccountNode[];
104
106
  /**
105
- * Switch the active session INTO an account from the {@link accounts} graph
106
- * (a managed org/project/bot, or an account shared with the caller).
107
+ * Switch the active session INTO an account from the {@link accounts} graph.
107
108
  *
108
- * Uniform with every other account switch: if the account is already on
109
- * this device's multi-account set, switches straight through the same
109
+ * Uniform with every other account switch: if the account is already on this
110
+ * device's multi-account set, switches straight through the same
110
111
  * server-authoritative `SessionClient.switchAccount()` path {@link switchSession}
111
- * uses — no re-minting, no session churn. Only the FIRST switch into an
112
- * account mints+plants a REAL session via `oxyServices.switchToAccount` and
113
- * registers it into the device set (server-set httpOnly `oxy_rt_<authuser>`
114
- * cookie), so it survives reload / `refresh-all` and appears in the device
115
- * account list exactly like a device sign-in from then on. Either way,
116
- * afterwards `user` IS the target account, every request authenticates as
117
- * it, and the account graph + all React Query data are refreshed/invalidated.
112
+ * uses. Only the FIRST switch into an account mints+plants a real session via
113
+ * `oxyServices.switchToAccount` and registers it into the device set, so it
114
+ * survives reload and appears in the device account list exactly like a device
115
+ * sign-in from then on. Either way, afterwards `user` IS the target account.
118
116
  */
119
117
  switchToAccount: (accountId: string) => Promise<void>;
120
118
  refreshAccounts: () => Promise<void>;
121
119
  createAccount: (data: CreateAccountInput) => Promise<AccountNode>;
122
120
  }
123
- declare const OxyContext: React.Context<OxyContextState | null>;
124
121
  /**
125
122
  * Result of {@link OxyContextState.signInWithPassword}.
126
123
  *
127
- * `'ok'` — the password was accepted and the resulting session has been
128
- * committed into context state (the SAME path SSO / silent-restore sessions
129
- * use), so `isAuthenticated` / `user` are updated and the session is durably persisted;
130
- * the caller can proceed (e.g. navigate into the app).
124
+ * `'ok'` — the password was accepted and the session committed (so
125
+ * `isAuthenticated` / `user` are updated and the refresh family persisted).
131
126
  *
132
127
  * `'2fa_required'` — the account has two-factor auth enabled, so NO session was
133
- * created. The caller must complete the challenge with the returned short-lived
134
- * `loginToken` (`POST /security/2fa/verify-login`) before a session exists.
128
+ * created. Complete the challenge with the returned short-lived `loginToken`
129
+ * via {@link OxyContextState.completeTwoFactorSignIn}.
135
130
  */
136
131
  export type PasswordSignInResult = {
137
132
  status: 'ok';
@@ -157,5 +152,4 @@ export interface OxyContextProviderProps {
157
152
  export declare const OxyProvider: React.FC<OxyContextProviderProps>;
158
153
  export declare const OxyContextProvider: React.FC<OxyContextProviderProps>;
159
154
  export declare const useOxy: () => OxyContextState;
160
- export default OxyContext;
161
155
  //# sourceMappingURL=OxyContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqBjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAavE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAmBtD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;I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AE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AA4FD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+1BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AA0D9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ApiError, SessionClient, User } from '@oxyhq/core';
1
+ import type { ApiError, AuthStateStore, SessionClient, User } from '@oxyhq/core';
2
2
  import type { AuthState } from '../../stores/authStore';
3
3
  import type { ClientSession } from '@oxyhq/core';
4
4
  import type { StorageInterface } from '../../utils/storageHelpers';
@@ -6,6 +6,15 @@ import type { OxyServices } from '@oxyhq/core';
6
6
  export interface UseAuthOperationsOptions {
7
7
  oxyServices: OxyServices;
8
8
  storage: StorageInterface | null;
9
+ /**
10
+ * The device-first persisted auth-state store. On EXPLICIT full sign-out the
11
+ * session blob is cleared (`store.clear()`) so a reload's cold boot finds no
12
+ * refresh family to restore; on sign-in a returned rotating refresh token is
13
+ * persisted so the next boot warm-restores without a redirect. The long-lived
14
+ * device token SURVIVES sign-out (the device is unchanged), so it is never
15
+ * cleared here.
16
+ */
17
+ store: AuthStateStore;
9
18
  activeSessionId: string | null;
10
19
  setActiveSessionId: (sessionId: string | null) => void;
11
20
  updateSessions: (sessions: ClientSession[], options?: {
@@ -13,14 +22,6 @@ export interface UseAuthOperationsOptions {
13
22
  }) => void;
14
23
  saveActiveSessionId: (sessionId: string) => Promise<void>;
15
24
  clearSessionState: () => Promise<void>;
16
- /**
17
- * Clear the durable returning-user hint (`storageKeys.priorSession`). Called
18
- * ONLY on EXPLICIT full sign-out — alongside `clearSsoBounceState()` — so the
19
- * next cold boot treats this device as a first-time anonymous visitor (no
20
- * forced `/sso` bounce). NEVER called on the passive token-expiry path, so an
21
- * expired session still recovers via a returning-user bounce. Best-effort.
22
- */
23
- clearPriorSessionHint: () => Promise<void>;
24
25
  /** Used only by `performSignIn`'s same-user duplicate-session dedup (legacy session-validate path; unrelated to the SessionClient device-account set). */
25
26
  switchSession: (sessionId: string) => Promise<User>;
26
27
  /**
@@ -50,23 +51,17 @@ export interface UseAuthOperationsResult {
50
51
  logoutAll: () => Promise<void>;
51
52
  }
52
53
  /**
53
- * Fire-and-forget the durable returning-user hint clear on explicit sign-out.
54
- *
55
- * Mirrors the synchronous, non-blocking nature of the sibling
56
- * `clearSsoBounceState()`: sign-out must NEVER block on (or fail because of) a
57
- * best-effort storage write. The clear is invoked synchronously (so unit tests
58
- * can assert it ran) but its async settle is detached; any rejection is logged,
59
- * never thrown.
60
- *
61
- * Exported so `OxyContext`'s `syncFromClient` zero-account branch (a REMOTE
62
- * full sign-out) can invoke the EXACT same cleanup as the LOCAL `logout` /
63
- * `logoutAll` paths below — a remote sign-out must be indistinguishable from
64
- * a local one to the next cold boot.
54
+ * Clear the persisted refresh-token family on an explicit full sign-out.
55
+ * Best-effort and non-blocking: sign-out must never fail because a storage
56
+ * write threw. Exported so `OxyContext`'s zero-account branch (a REMOTE full
57
+ * sign-out pushed over the socket) runs the EXACT same cleanup as the local
58
+ * `logout` / `logoutAll` paths a remote sign-out is indistinguishable from a
59
+ * local one to the next cold boot.
65
60
  */
66
- export declare function clearPriorSessionHintSafe(clearPriorSessionHint: () => Promise<void>, logger?: (message: string, error?: unknown) => void): void;
61
+ export declare function clearPersistedAuthSafe(store: AuthStateStore, logger?: (message: string, error?: unknown) => void): void;
67
62
  /**
68
63
  * Authentication operations using public key cryptography.
69
64
  * Accepts public key as parameter - identity management is handled by the app layer.
70
65
  */
71
- export declare const useAuthOperations: ({ oxyServices, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, clearPriorSessionHint, switchSession, sessionClient, syncFromClient, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
66
+ export declare const useAuthOperations: ({ oxyServices, store, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, sessionClient, syncFromClient, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
72
67
  //# sourceMappingURL=useAuthOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useAuthOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAIvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU/C,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnF,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;;;;OAMG;IACH,qBAAqB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,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AsR7B,CAAC"}
@@ -22,7 +22,6 @@ export declare const useUpdateProfile: () => import("@tanstack/react-query").Use
22
22
  phone: import("zod").ZodOptional<import("zod").ZodString>;
23
23
  address: import("zod").ZodOptional<import("zod").ZodString>;
24
24
  birthday: import("zod").ZodOptional<import("zod").ZodString>;
25
- location: import("zod").ZodOptional<import("zod").ZodString>;
26
25
  locations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
27
26
  links: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
28
27
  linksMetadata: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
@@ -171,7 +170,6 @@ export declare const useUpdateAccountSettings: () => {
171
170
  phone?: string;
172
171
  address?: string;
173
172
  birthday?: string;
174
- location?: string;
175
173
  website?: string;
176
174
  createdAt?: string;
177
175
  updatedAt?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;aA+PrB,CAAN;YAGa,CAAC;;aAEO,CAAA;YACd,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBE,CAAH;mBAIH,CAAF;aAAmC,CAAC;aAAmC,CAAC;;;UAG7D,CAAC;mBAAyC,CAAC;aAEjD,CAAC;aAAmC,CAAC;;;;;;;;;EAhM7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAMQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA4EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;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AAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACxI;AAED,4EAA4E;AAC5E,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;EAmD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EA+CpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,uFAoBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBACrB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAS5C,CAAC"}
1
+ {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;aA4PY,CAAC;YAEhC,CAAF;;aAIU,CAAC;YAEJ,CAAC;;;;;;;;;;;;;;;;;;;;;UAeD,CAAC;mBACF,CAAN;aACI,CAAT;aAGG,CAAN;;;UACsD,CAAC;mBAEnD,CAAH;aACQ,CAAC;aAAmC,CAAC;;;;;;;;;EA9L7C,CAAC;AAEF;;GAEG;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C9D,0CAA0C;IAC1C,gBAAgB,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,aAAa,CA8FvC"}
@@ -0,0 +1,31 @@
1
+ export type PasswordSignInStep = 'identifier' | 'password' | 'twoFactor';
2
+ export interface UsePasswordSignInOptions {
3
+ /** Fired once a session has been committed (the surface should close). */
4
+ onSignedIn?: () => void;
5
+ }
6
+ export interface UsePasswordSignInResult {
7
+ step: PasswordSignInStep;
8
+ identifier: string;
9
+ setIdentifier: (value: string) => void;
10
+ password: string;
11
+ setPassword: (value: string) => void;
12
+ /** The current 2FA input — a TOTP code or a backup code, per `useBackupCode`. */
13
+ code: string;
14
+ setCode: (value: string) => void;
15
+ useBackupCode: boolean;
16
+ setUseBackupCode: (value: boolean) => void;
17
+ error: string | null;
18
+ isSubmitting: boolean;
19
+ /** Advance identifier → password (validates a non-empty identifier). */
20
+ submitIdentifier: () => void;
21
+ /** Submit the password: commits a one-step session, or advances to 2FA. */
22
+ submitPassword: () => Promise<void>;
23
+ /** Submit the 2FA code / backup code and commit the session. */
24
+ submitTwoFactor: () => Promise<void>;
25
+ /** Step back one screen (2FA → password → identifier), clearing the error. */
26
+ back: () => void;
27
+ /** Reset every field back to the identifier step. */
28
+ reset: () => void;
29
+ }
30
+ export declare function usePasswordSignIn(options?: UsePasswordSignInOptions): UsePasswordSignInResult;
31
+ //# sourceMappingURL=usePasswordSignIn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePasswordSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/usePasswordSignIn.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAEzE,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,2EAA2E;IAC3E,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,gEAAgE;IAChE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,8EAA8E;IAC9E,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,CA4JjG"}
@@ -20,7 +20,6 @@ export interface ProfileUpdateData {
20
20
  username?: string;
21
21
  email?: string;
22
22
  bio?: string;
23
- location?: string;
24
23
  locations?: ProfileLocation[];
25
24
  links?: string[];
26
25
  linksMetadata?: ProfileLinkMetadata[];
@@ -1 +1 @@
1
- {"version":3,"file":"useProfileEditing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useProfileEditing.ts"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EA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AC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,UAAU,mBAAmB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,iBAAiB,GAAG,MAAM,GAAG,eAAe,EAAE,GAAG,mBAAmB,EAAE,CAAC;AAU5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;2BAMsB,iBAAiB;yBAyDnB,MAAM,SAAS,iBAAiB;;CAqDjF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { ComponentType, ReactNode } from 'react';
2
2
  import type { BaseScreenProps } from '../types/navigation';
3
- export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'AccountSwitcher' | 'CreateAccount' | 'AccountMembers' | 'AccountSettings' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
3
+ export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfile' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'AccountSwitcher' | 'CreateAccount' | 'AccountMembers' | 'AccountSettings' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
4
4
  export declare const getScreenComponent: (routeName: RouteName) => ComponentType<BaseScreenProps> | undefined;
5
5
  export declare const isValidRoute: (routeName: string) => routeName is RouteName;
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,CAAC;AAmDpB,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,KAAG,aAAa,CAAC,eAAe,CAAC,GAAG,SAsB1F,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,SAAS,IAAI,SAE7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CACrC;AA+BD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACvB,WAAW,SAAS,GAAG,IAAI,EAC3B,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACrC,gBASF,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,aAAa,GACb,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,CAAC;AAoDpB,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,KAAG,aAAa,CAAC,eAAe,CAAC,GAAG,SAsB1F,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,SAAS,IAAI,SAE7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CACrC;AA+BD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACvB,WAAW,SAAS,GAAG,IAAI,EAC3B,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACrC,gBASF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAYzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAa3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,aAAa,GACb,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAmBd,UAAU,2BAA4B,SAAQ,eAAe;IACzD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;;AAihBD,wBAAkD"}
1
+ {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAY9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAe3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,aAAa,GACb,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAmBd,UAAU,2BAA4B,SAAQ,eAAe;IACzD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;;AAmjBD,wBAAkD"}
@@ -0,0 +1,14 @@
1
+ import type React from 'react';
2
+ import type { BaseScreenProps } from '../types/navigation';
3
+ /**
4
+ * EditProfileScreen — the profile-editing HUB.
5
+ *
6
+ * Lists every editable profile field as its own row; each row deep-links into
7
+ * {@link EditProfileFieldScreen} with the matching `fieldType`. The avatar row
8
+ * reuses the exact same `openAvatarPicker` entry point that
9
+ * {@link ManageAccountScreen} uses. This is the single entry into per-field
10
+ * editing — reached from ManageAccount's "Edit profile" row.
11
+ */
12
+ declare const EditProfileScreen: React.FC<BaseScreenProps>;
13
+ export default EditProfileScreen;
14
+ //# sourceMappingURL=EditProfileScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQ3D;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgIhD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -6,7 +6,7 @@ import type { BaseScreenProps } from '../types/navigation';
6
6
  * Replaces AccountOverview + AccountSettings + the per-account half of
7
7
  * SessionManagement. Lists ONLY the active user's profile, sessions on this
8
8
  * device, and security/destructive actions for THIS account. Multi-account
9
- * surface lives in {@link AccountMenu} — keep these concerns separate.
9
+ * surface lives in {@link AccountSwitcher} — keep these concerns separate.
10
10
  */
11
11
  declare const ManageAccountScreen: React.FC<BaseScreenProps>;
12
12
  export default ManageAccountScreen;
@@ -1 +1 @@
1
- {"version":3,"file":"ManageAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ManageAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAoD3D;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+5BlD,CAAC;AA+BF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ManageAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ManageAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAoD3D;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA25BlD,CAAC;AA+BF,eAAe,mBAAmB,CAAC"}
@@ -1,18 +1,19 @@
1
1
  /**
2
- * OxyAuthScreen - Sign in with Oxy (native bottom-sheet container)
2
+ * OxyAuthScreen Sign in with Oxy (native bottom-sheet container).
3
3
  *
4
- * Used by OTHER apps in the Oxy ecosystem to authenticate users. The primary
5
- * action is the one-tap "Continue with Oxy" approval flow (opens the Oxy Auth
6
- * web flow with a deep-link `redirect_uri` so the app→app return path can
7
- * complete the sign-in). The QR code is demoted to a collapsed "Sign in on
8
- * another device" disclosure you can't scan your own screen.
4
+ * Two phases, Google-style:
5
+ * 1. Account chooser (FRONT screen, shown when the device/user already has
6
+ * accounts): pick an account to continue as one tap switches through the
7
+ * SAME `switchToAccount` path the account switcher uses or "Use another
8
+ * account" to reveal the sign-in options.
9
+ * 2. Sign-in options: the first-party password flow (identifier → password →
10
+ * optional 2FA, `usePasswordSignIn`) as the PRIMARY action, with the
11
+ * cross-app device flow (same-device deep-link + "sign in on another device"
12
+ * QR) as a SECONDARY option below an "or" divider.
9
13
  *
10
- * ALL of the auth-session machinery (session-token creation, QR data, socket +
11
- * polling, the native deep-link return path, waiting/error/retry state, the
12
- * open-auth handler, and cleanup) lives in the shared `useOxyAuthSession` hook,
13
- * which the web `SignInModal` also consumes — neither container re-implements
14
- * the transport. The Oxy Accounts app is where users manage their cryptographic
15
- * identity; this screen should NOT be used within the Accounts app itself.
14
+ * The device-flow machinery lives in the shared `useOxyAuthSession` hook (the
15
+ * web `SignInModal` consumes it too). This screen should NOT be used within the
16
+ * Oxy Accounts app itself.
16
17
  */
17
18
  import type React from 'react';
18
19
  import type { BaseScreenProps } from '../types/navigation';
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAc3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6I5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAmB3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyR5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAe3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAOD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkS/C,CAAC;AA0CF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAe3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAOD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+S/C,CAAC;AA0CF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Pure link-display helpers for the profile "links" editor. Kept out of the
3
+ * screen component so the string-coercion guard can be unit-tested without
4
+ * rendering the whole React Native screen.
5
+ */
6
+ /** Strip the protocol and any trailing slash from a link URL for display. */
7
+ export declare const getLinkTitle: (url: string) => string;
8
+ /** Human-readable description for a link URL. */
9
+ export declare const getLinkDescription: (url: string) => string;
10
+ export interface LinkListItem {
11
+ id: string;
12
+ url: string;
13
+ title: string;
14
+ description: string;
15
+ }
16
+ /**
17
+ * Build editable list items from a raw links array. The array can come from
18
+ * legacy or untrusted profile data whose elements are not guaranteed to be
19
+ * strings, so each entry is coerced with `String(item ?? '')` before formatting
20
+ * — a non-string element must never crash the editor.
21
+ */
22
+ export declare function linksToListItems(links: readonly unknown[]): LinkListItem[];
23
+ //# sourceMappingURL=linkFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linkFormat.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/linkFormat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MACW,CAAC;AAEvD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAA0B,CAAC;AAE5E,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,YAAY,EAAE,CAU1E"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Platform `AuthStateStore` for `@oxyhq/services`.
3
+ *
4
+ * The device-first session model persists the rotating refresh-token family
5
+ * head per origin (web) / per device (native). `@oxyhq/core` owns the store
6
+ * shape + logic (`createWebAuthStateStore` / `createNativeAuthStateStore`); this
7
+ * module only supplies the platform storage seam and wires the native device
8
+ * token to the SHARED keychain so every native Oxy app joins one DeviceSession:
9
+ *
10
+ * - web → `createWebAuthStateStore()` (localStorage, in-memory fallback).
11
+ * - native → `createNativeAuthStateStore(secureKV)` for the SESSION blob
12
+ * (refresh token) over `expo-secure-store` (AsyncStorage fallback), with the
13
+ * long-lived DEVICE token delegated to `KeyManager`'s shared keychain
14
+ * (`group.so.oxy.shared`) instead of per-app storage — so an in-app login on
15
+ * any native Oxy app attributes to the SAME server-side DeviceSession.
16
+ *
17
+ * `expo-secure-store` is loaded via a runtime-computed dynamic import (the same
18
+ * optional-native-module pattern `OxyProvider` uses for netinfo / keyboard
19
+ * controller), so the web bundle never pulls it and a device without it falls
20
+ * back to AsyncStorage rather than crashing.
21
+ */
22
+ import { type AuthStateStore } from '@oxyhq/core';
23
+ /**
24
+ * Build the platform {@link AuthStateStore} for this runtime.
25
+ *
26
+ * Native additionally routes the device token through the shared keychain so
27
+ * every native Oxy app shares one server-side DeviceSession; the session blob
28
+ * (refresh token) stays per-app in SecureStore. Best-effort keychain access —
29
+ * a locked/failed shared-keychain read degrades to "no device token" rather
30
+ * than throwing out of cold boot / refresh.
31
+ */
32
+ export declare function createPlatformAuthStateStore(): AuthStateStore;
33
+ //# sourceMappingURL=authStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AAmFrB;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,IAAI,cAAc,CA2C7D"}
@@ -1,21 +1,25 @@
1
- import type { OxyServices } from '@oxyhq/core';
2
- import { SessionClient } from '@oxyhq/core';
3
- import { createSessionClientHost } from './sessionClientHost';
1
+ import { SessionClient, createSessionClientHost, type AuthStateStore, type OxyServices } from '@oxyhq/core';
4
2
  /**
5
- * Wires a `SessionClient` for `@oxyhq/services`: builds the `SessionClientHost`
6
- * adapter (Task 1) and the platform `TokenTransport` (Task 3) over the given
7
- * `OxyServices` instance, and returns both the client and the host — the host
8
- * is returned (not just the client) so `OxyContext` (Fase 3-B) can call
9
- * `host.setCurrentAccountId(...)` as the active account changes.
3
+ * Wire a `SessionClient` for `@oxyhq/services`.
10
4
  *
11
- * `socket.io-client`'s `io` is STATICALLY imported and injected as the
12
- * `SessionClient` `socketFactory` (socket.io-client is a real dependency of
13
- * `@oxyhq/services`). This is what keeps realtime session sync working in the
14
- * Metro/Expo-web bundle: core's lazy dynamic `import('socket.io-client')` of a
15
- * bare specifier does not resolve reliably against the published core dist, so
16
- * the app-bundled static import is the reliable source of the factory.
5
+ * The platform-agnostic parts (host adapter, client, projection helpers) live
6
+ * ONCE in `@oxyhq/core`; this thin factory only injects the pieces specific to
7
+ * the RN/Expo SDK:
8
+ *
9
+ * - `socket.io-client`'s `io`, STATICALLY imported (socket.io-client is a real
10
+ * dependency of `@oxyhq/services`) so realtime session sync never relies on
11
+ * core's lazy dynamic import of a bare specifier — bundler-fragile in
12
+ * Metro/Expo-web against the published core dist.
13
+ * - the device-first {@link createTokenTransport}, which mints a fallback token
14
+ * by rotating the persisted refresh family (`store`).
15
+ *
16
+ * `onUnauthenticated` fires when an applied device state has zero accounts (a
17
+ * device signout-all): the provider clears the persisted store + local state so
18
+ * a reload does not try to restore a dead session. The host is returned
19
+ * alongside the client so the caller can call `host.setCurrentAccountId(...)`
20
+ * as the active account changes.
17
21
  */
18
- export declare function createSessionClient(oxyServices: OxyServices): {
22
+ export declare function createSessionClient(oxyServices: OxyServices, store: AuthStateStore, onUnauthenticated?: () => void): {
19
23
  client: SessionClient;
20
24
  host: ReturnType<typeof createSessionClientHost>;
21
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createSessionClient.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/createSessionClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG9D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG;IAC7D,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAClD,CAKA"}
1
+ {"version":3,"file":"createSessionClient.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/createSessionClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,cAAc,EACrB,iBAAiB,CAAC,EAAE,MAAM,IAAI,GAC7B;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAClD,CAKA"}
@@ -1,15 +1,15 @@
1
1
  /**
2
- * Session-sync integration layer (Fase 3-A) — intra-package use only.
2
+ * Session-sync integration layer — intra-package use only.
3
3
  *
4
- * These modules let `@oxyhq/services` drive the platform-agnostic
5
- * `SessionClient` (in `@oxyhq/core`): a thin host adapter over `OxyServices`,
6
- * pure `DeviceSessionState services` projection helpers, a platform token
7
- * transport, and the factory that wires them together. Nothing here is
8
- * re-exported from the package root — `OxyContext` consumes it directly in
9
- * Fase 3-B.
4
+ * `@oxyhq/core` owns the platform-agnostic `SessionClient`, its host adapter,
5
+ * and the pure `DeviceSessionState services` projection helpers; those are
6
+ * re-exported straight from core here so `OxyContext` has one import site.
7
+ * `@oxyhq/services` supplies only the two platform pieces: the thin
8
+ * `createSessionClient` factory (injects socket.io-client `io` + the
9
+ * device-first token transport) and the `AuthStateStore` factory.
10
10
  */
11
11
  export { createSessionClient } from './createSessionClient';
12
- export { createSessionClientHost } from './sessionClientHost';
13
12
  export { createTokenTransport } from './tokenTransport';
14
- export { accountIdsOf, activeSessionIdOf, activeUserOf, deviceStateToClientSessions, } from './projectSessionState';
13
+ export { createPlatformAuthStateStore } from './authStore';
14
+ export { createSessionClientHost, accountIdsOf, activeSessionIdOf, activeUserOf, deviceStateToClientSessions, } from '@oxyhq/core';
15
15
  //# sourceMappingURL=index.d.ts.map