@movmo_app/types 1.23.0 → 1.25.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
@@ -20,6 +20,17 @@ export type MovmoPasskeyFlow = {
20
20
  code_length: number;
21
21
  expires_in: number;
22
22
  };
23
+ /** POST /v1/auth/login body. */
24
+ export type MovmoLoginRequest = {
25
+ email: string;
26
+ locale?: string;
27
+ time_zone?: string;
28
+ /**
29
+ * Create the flow without sending a code for an unenrolled email; `/v1/auth/code` releases the
30
+ * first send. Used by the partner iframe.
31
+ */
32
+ defer_code?: boolean;
33
+ };
23
34
  export type MovmoLoginResponse = MovmoCodeFlow | MovmoPasskeyFlow;
24
35
  export type PasskeyOptionsResponse = {
25
36
  flow_id: string;
@@ -36,3 +47,9 @@ export type MovmoRecoveryCancelRequest = {
36
47
  token: string;
37
48
  };
38
49
  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';
50
+ /**
51
+ * ContactType represents the types of contact information that can be changed
52
+ * through the contact-change flow (initiate, verify-identity, confirm).
53
+ * JSON values use snake_case to match the Go backend (MOVMO-687).
54
+ */
55
+ export type ContactType = 'email' | 'phone' | 'backup_email';
@@ -85,6 +85,10 @@ export interface MovmoInitMessage {
85
85
  type: MovmoFrameMessageType.INIT;
86
86
  /** Origin of the embedding parent page; the iframe targets this for outbound messages. */
87
87
  parentOrigin: string;
88
+ /** Set by SDKs that put `publickey-credentials-get` in the iframe `allow` attribute (MOVMO-686). */
89
+ capabilities?: {
90
+ passkeys?: boolean;
91
+ };
88
92
  }
89
93
  export interface MovmoBookingCompleteMessage {
90
94
  type: MovmoFrameMessageType.BOOKING_COMPLETE;
@@ -7,6 +7,10 @@ export type SecurityPreferences = {
7
7
  phone_number_verified: boolean;
8
8
  /** RFC3339 end of the account-recovery cool-down, or null when none is active (MOVMO-687). */
9
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;
10
14
  };
11
15
  /**
12
16
  * AuthEvent represents a recorded authentication event returned by
@@ -15,7 +19,7 @@ export type SecurityPreferences = {
15
19
  export type AuthEvent = {
16
20
  id: string;
17
21
  user_id: string;
18
- event_type: 'sign_in' | 'sign_up' | 'email_change' | 'phone_change' | 'passkey_added' | 'passkey_removed' | 'recovery_started' | 'recovery_blocked' | 'recovery_cancelled';
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';
19
23
  browser: string;
20
24
  device_type: string;
21
25
  os: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.23.0",
3
+ "version": "1.25.0",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",