@oxyhq/services 5.15.9 → 5.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/lib/commonjs/core/OxyServices.js +0 -1
  2. package/lib/commonjs/core/OxyServices.js.map +1 -1
  3. package/lib/commonjs/core/mixins/OxyServices.assets.js +15 -0
  4. package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
  5. package/lib/commonjs/core/mixins/OxyServices.auth.js +3 -6
  6. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  7. package/lib/commonjs/core/mixins/OxyServices.devices.js +1 -1
  8. package/lib/commonjs/core/mixins/OxyServices.devices.js.map +1 -1
  9. package/lib/commonjs/core/mixins/index.js +11 -12
  10. package/lib/commonjs/core/mixins/index.js.map +1 -1
  11. package/lib/commonjs/crypto/signatureService.js +3 -2
  12. package/lib/commonjs/crypto/signatureService.js.map +1 -1
  13. package/lib/commonjs/i18n/locales/ar-SA.json +1 -9
  14. package/lib/commonjs/i18n/locales/ca-ES.json +1 -9
  15. package/lib/commonjs/i18n/locales/de-DE.json +1 -9
  16. package/lib/commonjs/i18n/locales/en-US.json +3 -21
  17. package/lib/commonjs/i18n/locales/es-ES.json +3 -21
  18. package/lib/commonjs/i18n/locales/fr-FR.json +1 -9
  19. package/lib/commonjs/i18n/locales/it-IT.json +1 -9
  20. package/lib/commonjs/i18n/locales/ja-JP.json +1 -9
  21. package/lib/commonjs/i18n/locales/ko-KR.json +1 -9
  22. package/lib/commonjs/i18n/locales/pt-PT.json +1 -9
  23. package/lib/commonjs/i18n/locales/zh-CN.json +1 -9
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/ui/context/OxyContext.js +24 -4
  26. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  27. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +217 -100
  28. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  29. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +2 -319
  30. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/OxyAuthScreen.js +16 -7
  32. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +0 -1
  34. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/SessionManagementScreen.js +43 -29
  36. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  37. package/lib/commonjs/ui/stores/authStore.js +14 -1
  38. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  39. package/lib/module/core/OxyServices.js +0 -1
  40. package/lib/module/core/OxyServices.js.map +1 -1
  41. package/lib/module/core/mixins/OxyServices.assets.js +15 -0
  42. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  43. package/lib/module/core/mixins/OxyServices.auth.js +3 -6
  44. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  45. package/lib/module/core/mixins/OxyServices.devices.js +1 -1
  46. package/lib/module/core/mixins/OxyServices.devices.js.map +1 -1
  47. package/lib/module/core/mixins/index.js +1 -2
  48. package/lib/module/core/mixins/index.js.map +1 -1
  49. package/lib/module/crypto/signatureService.js +3 -2
  50. package/lib/module/crypto/signatureService.js.map +1 -1
  51. package/lib/module/i18n/locales/ar-SA.json +1 -9
  52. package/lib/module/i18n/locales/ca-ES.json +1 -9
  53. package/lib/module/i18n/locales/de-DE.json +1 -9
  54. package/lib/module/i18n/locales/en-US.json +3 -21
  55. package/lib/module/i18n/locales/es-ES.json +3 -21
  56. package/lib/module/i18n/locales/fr-FR.json +1 -9
  57. package/lib/module/i18n/locales/it-IT.json +1 -9
  58. package/lib/module/i18n/locales/ja-JP.json +1 -9
  59. package/lib/module/i18n/locales/ko-KR.json +1 -9
  60. package/lib/module/i18n/locales/pt-PT.json +1 -9
  61. package/lib/module/i18n/locales/zh-CN.json +1 -9
  62. package/lib/module/index.js.map +1 -1
  63. package/lib/module/ui/context/OxyContext.js +24 -4
  64. package/lib/module/ui/context/OxyContext.js.map +1 -1
  65. package/lib/module/ui/context/hooks/useAuthOperations.js +217 -100
  66. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  67. package/lib/module/ui/screens/AccountSettingsScreen.js +2 -319
  68. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  69. package/lib/module/ui/screens/OxyAuthScreen.js +16 -7
  70. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  71. package/lib/module/ui/screens/PrivacySettingsScreen.js +0 -1
  72. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  73. package/lib/module/ui/screens/SessionManagementScreen.js +44 -29
  74. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  75. package/lib/module/ui/stores/authStore.js +14 -1
  76. package/lib/module/ui/stores/authStore.js.map +1 -1
  77. package/lib/typescript/core/OxyServices.d.ts +0 -1
  78. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  79. package/lib/typescript/core/mixins/OxyServices.assets.d.ts +7 -1
  80. package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
  81. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +3 -4
  82. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  83. package/lib/typescript/core/mixins/OxyServices.devices.d.ts +1 -4
  84. package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
  85. package/lib/typescript/core/mixins/index.d.ts +2 -64
  86. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  87. package/lib/typescript/crypto/signatureService.d.ts +2 -1
  88. package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
  89. package/lib/typescript/index.d.ts +1 -1
  90. package/lib/typescript/index.d.ts.map +1 -1
  91. package/lib/typescript/models/interfaces.d.ts +22 -1
  92. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  93. package/lib/typescript/types/bip39.d.ts +1 -0
  94. package/lib/typescript/types/buffer.d.ts +1 -0
  95. package/lib/typescript/types/color.d.ts +1 -0
  96. package/lib/typescript/types/elliptic.d.ts +1 -0
  97. package/lib/typescript/types/expo-crypto.d.ts +1 -0
  98. package/lib/typescript/types/expo-secure-store.d.ts +1 -0
  99. package/lib/typescript/ui/context/OxyContext.d.ts +11 -3
  100. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  101. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +13 -5
  102. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  103. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  104. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  105. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  106. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  107. package/lib/typescript/ui/stores/authStore.d.ts +4 -0
  108. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  109. package/package.json +5 -4
  110. package/src/core/OxyServices.ts +0 -1
  111. package/src/core/mixins/OxyServices.assets.ts +16 -1
  112. package/src/core/mixins/OxyServices.auth.ts +3 -8
  113. package/src/core/mixins/OxyServices.devices.ts +1 -4
  114. package/src/core/mixins/index.ts +2 -5
  115. package/src/crypto/index.ts +1 -0
  116. package/src/crypto/keyManager.ts +1 -0
  117. package/src/crypto/polyfill.ts +1 -0
  118. package/src/crypto/recoveryPhrase.ts +1 -0
  119. package/src/crypto/signatureService.ts +4 -5
  120. package/src/i18n/locales/ar-SA.json +1 -9
  121. package/src/i18n/locales/ca-ES.json +1 -9
  122. package/src/i18n/locales/de-DE.json +1 -9
  123. package/src/i18n/locales/en-US.json +3 -21
  124. package/src/i18n/locales/es-ES.json +3 -21
  125. package/src/i18n/locales/fr-FR.json +1 -9
  126. package/src/i18n/locales/it-IT.json +1 -9
  127. package/src/i18n/locales/ja-JP.json +1 -9
  128. package/src/i18n/locales/ko-KR.json +1 -9
  129. package/src/i18n/locales/pt-PT.json +1 -9
  130. package/src/i18n/locales/zh-CN.json +1 -9
  131. package/src/index.ts +4 -1
  132. package/src/models/interfaces.ts +24 -1
  133. package/src/types/bip39.d.ts +1 -0
  134. package/src/types/buffer.d.ts +1 -0
  135. package/src/types/color.d.ts +1 -0
  136. package/src/types/elliptic.d.ts +1 -0
  137. package/src/types/expo-crypto.d.ts +1 -0
  138. package/src/types/expo-secure-store.d.ts +1 -0
  139. package/src/ui/context/OxyContext.tsx +35 -3
  140. package/src/ui/context/hooks/useAuthOperations.ts +212 -98
  141. package/src/ui/screens/AccountSettingsScreen.tsx +1 -201
  142. package/src/ui/screens/OxyAuthScreen.tsx +16 -8
  143. package/src/ui/screens/PrivacySettingsScreen.tsx +0 -2
  144. package/src/ui/screens/SessionManagementScreen.tsx +43 -26
  145. package/src/ui/stores/authStore.ts +31 -2
  146. package/lib/commonjs/core/mixins/OxyServices.totp.js +0 -53
  147. package/lib/commonjs/core/mixins/OxyServices.totp.js.map +0 -1
  148. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js +0 -467
  149. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js.map +0 -1
  150. package/lib/module/core/mixins/OxyServices.totp.js +0 -49
  151. package/lib/module/core/mixins/OxyServices.totp.js.map +0 -1
  152. package/lib/module/ui/components/profile/TwoFactorSetupModal.js +0 -460
  153. package/lib/module/ui/components/profile/TwoFactorSetupModal.js.map +0 -1
  154. package/lib/typescript/core/mixins/OxyServices.totp.d.ts +0 -66
  155. package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +0 -1
  156. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts +0 -11
  157. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts.map +0 -1
  158. package/src/core/mixins/OxyServices.totp.ts +0 -36
  159. package/src/ui/components/profile/TwoFactorSetupModal.tsx +0 -442
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Now using {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Two‑Factor Code",
51
- "subtitle": "Enter the 6‑digit code from your authenticator app for @{{username}}",
52
- "invalidCode": "Invalid code. Please try again.",
53
- "noAccess": "No access to your authenticator?",
54
- "useBackupCode": "Use backup code",
55
- "useRecoveryKey": "Use recovery key"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Password"
99
91
  },
100
92
  "notSet": "Not set",
101
- "securityTip": "For stronger security, enable Two‑Factor Authentication (TOTP) from Account Settings after you create your account.",
93
+ "securityTip": "For stronger security, enable biometric authentication from Account Settings after you create your account.",
102
94
  "legalReminder": "By creating an account, you agree to our Terms of Service and Privacy Policy.",
103
95
  "sections": {
104
96
  "account": "Account Information",
@@ -245,7 +237,7 @@
245
237
  "enterCode": "Enter the 6‑digit code from your authenticator app.",
246
238
  "newPassword": "Set New Password",
247
239
  "resetSuccess": "Your password has been reset! You can now sign in.",
248
- "noEmail": "We no longer send recovery emails. If you enabled Two‑Factor Authentication (TOTP), sign in with your username and password, then enter your authenticator code. Otherwise, contact support to regain access.",
240
+ "noEmail": "We no longer send recovery emails. Please use your recovery phrase to restore your identity. Contact support if you need assistance.",
249
241
  "password": {
250
242
  "minLength": "Password must be at least 8 characters long",
251
243
  "mismatch": "Passwords do not match",
@@ -589,11 +581,6 @@
589
581
  "title": "Verify Account",
590
582
  "subtitle": "Get a verified badge"
591
583
  },
592
- "twoFactor": {
593
- "title": "Two‑Factor Authentication",
594
- "enabled": "Enabled",
595
- "disabled": "Disabled (recommended)"
596
- }
597
584
  },
598
585
  "confirms": {
599
586
  "removeAvatar": "Remove your profile picture?"
@@ -608,11 +595,6 @@
608
595
  "avatarUpdated": "Avatar updated",
609
596
  "updateAvatarFailed": "Failed to update avatar",
610
597
  "noActiveSession": "No active session",
611
- "totpStartFailed": "Failed to start TOTP enrollment",
612
- "twoFactorEnabled": "Two‑Factor Authentication enabled",
613
- "invalidCode": "Invalid code",
614
- "twoFactorDisabled": "Two‑Factor Authentication disabled",
615
- "disableFailed": "Failed to disable"
616
598
  }
617
599
  },
618
600
  "accountOverview": {
@@ -663,7 +645,7 @@
663
645
  },
664
646
  "security": {
665
647
  "title": "Security & Privacy",
666
- "subtitle": "Password, 2FA, and privacy settings"
648
+ "subtitle": "Security and privacy settings"
667
649
  },
668
650
  "notifications": {
669
651
  "title": "Notifications",
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Ahora usando {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Código de dos factores",
51
- "subtitle": "Introduce el código de 6 dígitos de tu app autenticadora para @{{username}}",
52
- "invalidCode": "Código inválido. Inténtalo de nuevo.",
53
- "noAccess": "¿Sin acceso a tu autenticador?",
54
- "useBackupCode": "Usar código de respaldo",
55
- "useRecoveryKey": "Usar clave de recuperación"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Contraseña"
99
91
  },
100
92
  "notSet": "Sin definir",
101
- "securityTip": "Para mayor seguridad, habilita la Autenticación de Dos Factores (TOTP) en Configuración de la cuenta después de crear tu cuenta.",
93
+ "securityTip": "Para mayor seguridad, habilita la autenticación biométrica en Configuración de la cuenta después de crear tu cuenta.",
102
94
  "legalReminder": "Al crear una cuenta, aceptas nuestros Términos de servicio y Política de privacidad."
103
95
  }
104
96
  },
@@ -133,7 +125,7 @@
133
125
  "enterCode": "Introduce el código de 6 dígitos de tu app de autenticación.",
134
126
  "newPassword": "Establecer nueva contraseña",
135
127
  "resetSuccess": "¡Tu contraseña ha sido restablecida! Ahora puedes iniciar sesión.",
136
- "noEmail": "Ya no enviamos correos de recuperación. Si activaste la autenticación de dos factores (TOTP), inicia sesión con tu usuario y contraseña y luego introduce el código del autenticador. De lo contrario, contacta con soporte.",
128
+ "noEmail": "Ya no enviamos correos de recuperación. Por favor, usa tu frase de recuperación para restaurar tu identidad. Contacta con soporte si necesitas ayuda.",
137
129
  "password": {
138
130
  "minLength": "La contraseña debe tener al menos 8 caracteres",
139
131
  "mismatch": "Las contraseñas no coinciden",
@@ -196,11 +188,6 @@
196
188
  "subtitle": "Obtén una insignia verificada",
197
189
  "coming": "¡La verificación de cuenta estará disponible pronto!"
198
190
  },
199
- "twoFactor": {
200
- "title": "Autenticación de dos factores",
201
- "enabled": "Activada",
202
- "disabled": "Desactivada (recomendado)"
203
- }
204
191
  },
205
192
  "confirms": {
206
193
  "removeAvatar": "¿Eliminar tu foto de perfil?"
@@ -215,11 +202,6 @@
215
202
  "avatarUpdated": "Avatar actualizado",
216
203
  "updateAvatarFailed": "Error al actualizar el avatar",
217
204
  "noActiveSession": "No hay sesión activa",
218
- "totpStartFailed": "Error al iniciar el registro TOTP",
219
- "twoFactorEnabled": "Autenticación de dos factores activada",
220
- "invalidCode": "Código inválido",
221
- "twoFactorDisabled": "Autenticación de dos factores desactivada",
222
- "disableFailed": "Error al desactivar"
223
205
  }
224
206
  },
225
207
  "common": {
@@ -291,7 +273,7 @@
291
273
  },
292
274
  "security": {
293
275
  "title": "Seguridad y privacidad",
294
- "subtitle": "Contraseña, 2FA y ajustes de privacidad"
276
+ "subtitle": "Seguridad y ajustes de privacidad"
295
277
  },
296
278
  "notifications": {
297
279
  "title": "Notificaciones",
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Utilisation de {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Code à deux facteurs",
51
- "subtitle": "Entrez le code à 6 chiffres de votre application d'authentification pour @{{username}}",
52
- "invalidCode": "Code invalide. Veuillez réessayer.",
53
- "noAccess": "Pas d'accès à votre authentificateur ?",
54
- "useBackupCode": "Utiliser le code de sauvegarde",
55
- "useRecoveryKey": "Utiliser la clé de récupération"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Mot de passe"
99
91
  },
100
92
  "notSet": "Non défini",
101
- "securityTip": "Pour une sécurité renforcée, activez l'authentification à deux facteurs (TOTP) dans les paramètres du compte après avoir créé votre compte.",
93
+ "securityTip": "Pour une sécurité renforcée, activez l'authentification biométrique dans les paramètres du compte après avoir créé votre compte.",
102
94
  "legalReminder": "En créant un compte, vous acceptez nos Conditions d'utilisation et notre Politique de confidentialité."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Ora usando {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Codice a due fattori",
51
- "subtitle": "Inserisci il codice a 6 cifre dalla tua app autenticatore per @{{username}}",
52
- "invalidCode": "Codice non valido. Riprova.",
53
- "noAccess": "Nessun accesso al tuo autenticatore?",
54
- "useBackupCode": "Usa codice di backup",
55
- "useRecoveryKey": "Usa chiave di recupero"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Password"
99
91
  },
100
92
  "notSet": "Non impostato",
101
- "securityTip": "Per una maggiore sicurezza, abilita l'autenticazione a due fattori (TOTP) dalle Impostazioni account dopo aver creato il tuo account.",
93
+ "securityTip": "Per una maggiore sicurezza, abilita l'autenticazione biometrica dalle Impostazioni account dopo aver creato il tuo account.",
102
94
  "legalReminder": "Creando un account, accetti i nostri Termini di servizio e l'Informativa sulla privacy."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "{{name}}を使用中"
48
48
  },
49
- "totp": {
50
- "title": "二要素認証コード",
51
- "subtitle": "@{{username}}の認証アプリから6桁のコードを入力してください",
52
- "invalidCode": "無効なコードです。もう一度お試しください。",
53
- "noAccess": "認証アプリにアクセスできませんか?",
54
- "useBackupCode": "バックアップコードを使用",
55
- "useRecoveryKey": "回復キーを使用"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "パスワード"
99
91
  },
100
92
  "notSet": "未設定",
101
- "securityTip": "より強力なセキュリティのため、アカウント作成後、アカウント設定から二要素認証(TOTP)を有効にしてください。",
93
+ "securityTip": "より強力なセキュリティのため、アカウント作成後、アカウント設定から生体認証を有効にしてください。",
102
94
  "legalReminder": "アカウントを作成することで、利用規約とプライバシーポリシーに同意したことになります。"
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "{{name}} 사용 중"
48
48
  },
49
- "totp": {
50
- "title": "2단계 인증 코드",
51
- "subtitle": "@{{username}}의 인증 앱에서 6자리 코드를 입력하세요",
52
- "invalidCode": "잘못된 코드입니다. 다시 시도해주세요.",
53
- "noAccess": "인증 앱에 액세스할 수 없나요?",
54
- "useBackupCode": "백업 코드 사용",
55
- "useRecoveryKey": "복구 키 사용"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "비밀번호"
99
91
  },
100
92
  "notSet": "설정되지 않음",
101
- "securityTip": "더 강력한 보안을 위해 계정을 만든 후 계정 설정에서 2단계 인증(TOTP)을 활성화하세요.",
93
+ "securityTip": "더 강력한 보안을 위해 계정을 만든 후 계정 설정에서 생체 인증을 활성화하세요.",
102
94
  "legalReminder": "계정을 만들면 서비스 약관 및 개인정보 보호정책에 동의하는 것입니다."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Agora a usar {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Código de dois fatores",
51
- "subtitle": "Introduza o código de 6 dígitos da sua app autenticadora para @{{username}}",
52
- "invalidCode": "Código inválido. Por favor, tente novamente.",
53
- "noAccess": "Sem acesso ao seu autenticador?",
54
- "useBackupCode": "Usar código de backup",
55
- "useRecoveryKey": "Usar chave de recuperação"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Palavra-passe"
99
91
  },
100
92
  "notSet": "Não definido",
101
- "securityTip": "Para maior segurança, ative a Autenticação de Dois Fatores (TOTP) nas Definições da conta após criar a sua conta.",
93
+ "securityTip": "Para maior segurança, ative a autenticação biométrica nas Definições da conta após criar a sua conta.",
102
94
  "legalReminder": "Ao criar uma conta, concorda com os nossos Termos de Serviço e Política de Privacidade."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "正在使用{{name}}"
48
48
  },
49
- "totp": {
50
- "title": "双因素验证码",
51
- "subtitle": "输入@{{username}}的验证器应用中的6位数字代码",
52
- "invalidCode": "无效的代码。请重试。",
53
- "noAccess": "无法访问您的验证器?",
54
- "useBackupCode": "使用备份代码",
55
- "useRecoveryKey": "使用恢复密钥"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "密码"
99
91
  },
100
92
  "notSet": "未设置",
101
- "securityTip": "为了更强的安全性,创建账户后,请在账户设置中启用双因素身份验证(TOTP)。",
93
+ "securityTip": "为了更强的安全性,创建账户后,请在账户设置中启用生物识别身份验证。",
102
94
  "legalReminder": "创建账户即表示您同意我们的服务条款和隐私政策。"
103
95
  }
104
96
  },
package/src/index.ts CHANGED
@@ -100,7 +100,10 @@ export type {
100
100
  AssetDeleteSummary,
101
101
  AssetUploadProgress,
102
102
  AssetUpdateVisibilityRequest,
103
- AssetUpdateVisibilityResponse
103
+ AssetUpdateVisibilityResponse,
104
+ // Account storage usage
105
+ AccountStorageCategoryUsage,
106
+ AccountStorageUsageResponse
104
107
  } from './models/interfaces';
105
108
 
106
109
  export type {
@@ -30,7 +30,6 @@ export interface User {
30
30
  avatar?: string;
31
31
  // Privacy and security settings
32
32
  privacySettings?: {
33
- twoFactorEnabled?: boolean;
34
33
  [key: string]: unknown;
35
34
  };
36
35
  name?: {
@@ -60,6 +59,7 @@ export interface User {
60
59
  followers?: number;
61
60
  following?: number;
62
61
  };
62
+ accountExpiresAfterInactivityDays?: number | null; // Days of inactivity before account expires (null = never expire)
63
63
  [key: string]: unknown;
64
64
  }
65
65
 
@@ -384,6 +384,29 @@ export interface AssetUpdateVisibilityResponse {
384
384
  };
385
385
  }
386
386
 
387
+ /**
388
+ * Account storage usage (server-side usage, not local AsyncStorage)
389
+ */
390
+ export interface AccountStorageCategoryUsage {
391
+ bytes: number;
392
+ count: number;
393
+ }
394
+
395
+ export interface AccountStorageUsageResponse {
396
+ plan: 'basic' | 'pro' | 'business';
397
+ totalUsedBytes: number;
398
+ totalLimitBytes: number;
399
+ categories: {
400
+ documents: AccountStorageCategoryUsage;
401
+ mail: AccountStorageCategoryUsage;
402
+ photosVideos: AccountStorageCategoryUsage;
403
+ recordings: AccountStorageCategoryUsage;
404
+ family: AccountStorageCategoryUsage;
405
+ other: AccountStorageCategoryUsage;
406
+ };
407
+ updatedAt: string;
408
+ }
409
+
387
410
  export interface AssetUploadProgress {
388
411
  fileId: string;
389
412
  uploaded: number;
@@ -29,3 +29,4 @@ declare module 'bip39' {
29
29
  export function mnemonicToSeedHexSync(mnemonic: string, passphrase?: string): string;
30
30
  }
31
31
 
32
+
@@ -94,3 +94,4 @@ declare module 'buffer' {
94
94
 
95
95
  type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
96
96
  }
97
+
@@ -17,3 +17,4 @@ declare module 'color' {
17
17
  export default color;
18
18
  }
19
19
 
20
+
@@ -59,3 +59,4 @@ declare module 'elliptic' {
59
59
  export const ec: ECConstructor;
60
60
  }
61
61
 
62
+
@@ -27,3 +27,4 @@ declare module 'expo-crypto' {
27
27
  export function getRandomUUIDAsync(): Promise<string>;
28
28
  }
29
29
 
30
+
@@ -19,3 +19,4 @@ declare module 'expo-secure-store' {
19
19
  export async function isAvailableAsync(): Promise<boolean>;
20
20
  }
21
21
 
22
+
@@ -40,12 +40,20 @@ export interface OxyContextState {
40
40
  currentLanguageName: string;
41
41
  currentNativeLanguageName: string;
42
42
 
43
- // Identity management (public key authentication)
44
- createIdentity: (username: string, email?: string) => Promise<{ user: User; recoveryPhrase: string[] }>;
45
- importIdentity: (phrase: string, username?: string, email?: string) => Promise<User>;
43
+ // Identity management (public key authentication - offline-first)
44
+ createIdentity: () => Promise<{ recoveryPhrase: string[]; synced: boolean }>;
45
+ importIdentity: (phrase: string) => Promise<{ synced: boolean }>;
46
46
  signIn: (deviceName?: string) => Promise<User>;
47
47
  hasIdentity: () => Promise<boolean>;
48
48
  getPublicKey: () => Promise<string | null>;
49
+ isIdentitySynced: () => Promise<boolean>;
50
+ syncIdentity: () => Promise<User>;
51
+
52
+ // Identity sync state (reactive, from Zustand store)
53
+ identitySyncState: {
54
+ isSynced: boolean;
55
+ isSyncing: boolean;
56
+ };
49
57
 
50
58
  // Session management
51
59
  logout: (targetSessionId?: string) => Promise<void>;
@@ -140,6 +148,11 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
140
148
  loginSuccess,
141
149
  loginFailure,
142
150
  logoutStore,
151
+ // Identity sync state and actions
152
+ isIdentitySyncedStore,
153
+ isSyncing,
154
+ setIdentitySynced,
155
+ setSyncing,
143
156
  } = useAuthStore(
144
157
  useShallow((state: AuthState) => ({
145
158
  user: state.user,
@@ -149,6 +162,11 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
149
162
  loginSuccess: state.loginSuccess,
150
163
  loginFailure: state.loginFailure,
151
164
  logoutStore: state.logout,
165
+ // Identity sync state and actions
166
+ isIdentitySyncedStore: state.isIdentitySynced,
167
+ isSyncing: state.isSyncing,
168
+ setIdentitySynced: state.setIdentitySynced,
169
+ setSyncing: state.setSyncing,
152
170
  })),
153
171
  );
154
172
 
@@ -212,6 +230,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
212
230
  logoutAll,
213
231
  hasIdentity,
214
232
  getPublicKey,
233
+ isIdentitySynced,
234
+ syncIdentity,
215
235
  } = useAuthOperations({
216
236
  oxyServices,
217
237
  storage,
@@ -229,6 +249,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
229
249
  loginFailure,
230
250
  logoutStore,
231
251
  setAuthState,
252
+ setIdentitySynced,
253
+ setSyncing,
232
254
  logger,
233
255
  });
234
256
 
@@ -392,6 +414,12 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
392
414
  signIn,
393
415
  hasIdentity,
394
416
  getPublicKey,
417
+ isIdentitySynced,
418
+ syncIdentity,
419
+ identitySyncState: {
420
+ isSynced: isIdentitySyncedStore ?? true,
421
+ isSyncing: isSyncing ?? false,
422
+ },
395
423
  logout,
396
424
  logoutAll,
397
425
  switchSession: switchSessionForContext,
@@ -411,6 +439,10 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
411
439
  signIn,
412
440
  hasIdentity,
413
441
  getPublicKey,
442
+ isIdentitySynced,
443
+ syncIdentity,
444
+ isIdentitySyncedStore,
445
+ isSyncing,
414
446
  currentLanguage,
415
447
  currentLanguageMetadata,
416
448
  currentLanguageName,