@movmo_app/types 1.22.0 → 1.24.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.
package/dist/auth.d.ts CHANGED
@@ -28,5 +28,17 @@ export type PasskeyOptionsResponse = {
28
28
  export type MovmoVerifyResponse = {
29
29
  user_id: string;
30
30
  new_user: boolean;
31
+ /** RFC3339 end of the account-recovery cool-down; present only for recovery sign-ins (MOVMO-687). */
32
+ recovery_until?: string;
31
33
  };
32
- export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'topOrigin_required' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed';
34
+ /** POST /v1/auth/recovery/cancel body: the `rc1.`-prefixed token from the recovery notification email. */
35
+ export type MovmoRecoveryCancelRequest = {
36
+ token: string;
37
+ };
38
+ export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'topOrigin_required' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed' | 'recovery_required' | 'recovery_blocked' | 'recovery_cooldown' | 'code_sends_paused';
39
+ /**
40
+ * ContactType represents the types of contact information that can be changed
41
+ * through the contact-change flow (initiate, verify-identity, confirm).
42
+ * JSON values use snake_case to match the Go backend (MOVMO-687).
43
+ */
44
+ export type ContactType = 'email' | 'phone' | 'backup_email';
@@ -5,6 +5,12 @@
5
5
  export type SecurityPreferences = {
6
6
  user_id: string;
7
7
  phone_number_verified: boolean;
8
+ /** RFC3339 end of the account-recovery cool-down, or null when none is active (MOVMO-687). */
9
+ recovery_until: string | null;
10
+ /** Backup email (masked by the server), or null when none is set (MOVMO-687). */
11
+ backup_email: string | null;
12
+ /** Whether the backup email address has been verified (MOVMO-687). */
13
+ backup_email_verified: boolean;
8
14
  };
9
15
  /**
10
16
  * AuthEvent represents a recorded authentication event returned by
@@ -13,7 +19,7 @@ export type SecurityPreferences = {
13
19
  export type AuthEvent = {
14
20
  id: string;
15
21
  user_id: string;
16
- event_type: 'sign_in' | 'sign_up' | 'email_change' | 'phone_change' | 'passkey_added' | 'passkey_removed';
22
+ event_type: 'sign_in' | 'sign_up' | 'email_change' | 'phone_change' | 'backup_email_change' | 'backup_email_remove' | 'passkey_added' | 'passkey_removed' | 'recovery_started' | 'recovery_blocked' | 'recovery_cancelled';
17
23
  browser: string;
18
24
  device_type: string;
19
25
  os: string;
@@ -23,7 +29,7 @@ export type AuthEvent = {
23
29
  timezone: string;
24
30
  created_at: string;
25
31
  /** How the traveler authenticated (server: `user_auth_events.method`, MOVMO-705). */
26
- method?: 'otp' | 'passkey';
32
+ method?: 'otp' | 'passkey' | 'recovery';
27
33
  };
28
34
  /**
29
35
  * @deprecated Use AuthEvent instead. This type was a placeholder before the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",