@zyphr-dev/node-sdk 0.1.64 → 0.1.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyphr-dev/node-sdk",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
4
4
  "description": "Official Zyphr SDK for Node.js, React, and React Native",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -112,7 +112,7 @@ export interface AuthEmailTemplatesApiUpsertAuthEmailTemplateOperationRequest {
112
112
  */
113
113
  export interface AuthEmailTemplatesApiInterface {
114
114
  /**
115
- * Atomic upsert of any subset of magic_link, password_reset, email_verification. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
115
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
116
116
  * @summary Bulk-upsert auth email templates
117
117
  * @param {BulkUpsertAuthEmailTemplatesRequest} bulkUpsertAuthEmailTemplatesRequest
118
118
  * @param {*} [options] Override http request option.
@@ -122,7 +122,7 @@ export interface AuthEmailTemplatesApiInterface {
122
122
  bulkUpsertAuthEmailTemplatesRaw(requestParameters: AuthEmailTemplatesApiBulkUpsertAuthEmailTemplatesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkUpsertAuthEmailTemplatesResponse>>;
123
123
 
124
124
  /**
125
- * Atomic upsert of any subset of magic_link, password_reset, email_verification. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
125
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
126
126
  * Bulk-upsert auth email templates
127
127
  */
128
128
  bulkUpsertAuthEmailTemplates(bulkUpsertAuthEmailTemplatesRequest: BulkUpsertAuthEmailTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkUpsertAuthEmailTemplatesResponse>;
@@ -281,7 +281,7 @@ export interface AuthEmailTemplatesApiInterface {
281
281
  export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailTemplatesApiInterface {
282
282
 
283
283
  /**
284
- * Atomic upsert of any subset of magic_link, password_reset, email_verification. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
284
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
285
285
  * Bulk-upsert auth email templates
286
286
  */
287
287
  async bulkUpsertAuthEmailTemplatesRaw(requestParameters: AuthEmailTemplatesApiBulkUpsertAuthEmailTemplatesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkUpsertAuthEmailTemplatesResponse>> {
@@ -332,7 +332,7 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
332
332
  }
333
333
 
334
334
  /**
335
- * Atomic upsert of any subset of magic_link, password_reset, email_verification. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
335
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
336
336
  * Bulk-upsert auth email templates
337
337
  */
338
338
  async bulkUpsertAuthEmailTemplates(bulkUpsertAuthEmailTemplatesRequest: BulkUpsertAuthEmailTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkUpsertAuthEmailTemplatesResponse> {
@@ -66,7 +66,7 @@ export interface AuthMagicLinksApiInterface {
66
66
  sendMagicLink(magicLinkSendRequest: MagicLinkSendRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResult>;
67
67
 
68
68
  /**
69
- * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag.
69
+ * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag. A magic link is a single factor, so a user who has enrolled MFA gets `mfa_required: true` and an `mfa_challenge` instead of tokens; complete the login with the challenge token at `POST /auth/mfa/verify`, exactly as after password login.
70
70
  * @summary Verify a magic link
71
71
  * @param {MagicLinkVerifyRequest} magicLinkVerifyRequest
72
72
  * @param {*} [options] Override http request option.
@@ -76,7 +76,7 @@ export interface AuthMagicLinksApiInterface {
76
76
  verifyMagicLinkRaw(requestParameters: AuthMagicLinksApiVerifyMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MagicLinkVerifyResponse>>;
77
77
 
78
78
  /**
79
- * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag.
79
+ * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag. A magic link is a single factor, so a user who has enrolled MFA gets `mfa_required: true` and an `mfa_challenge` instead of tokens; complete the login with the challenge token at `POST /auth/mfa/verify`, exactly as after password login.
80
80
  * Verify a magic link
81
81
  */
82
82
  verifyMagicLink(magicLinkVerifyRequest: MagicLinkVerifyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MagicLinkVerifyResponse>;
@@ -149,7 +149,7 @@ export class AuthMagicLinksApi extends runtime.BaseAPI implements AuthMagicLinks
149
149
  }
150
150
 
151
151
  /**
152
- * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag.
152
+ * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag. A magic link is a single factor, so a user who has enrolled MFA gets `mfa_required: true` and an `mfa_challenge` instead of tokens; complete the login with the challenge token at `POST /auth/mfa/verify`, exactly as after password login.
153
153
  * Verify a magic link
154
154
  */
155
155
  async verifyMagicLinkRaw(requestParameters: AuthMagicLinksApiVerifyMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MagicLinkVerifyResponse>> {
@@ -200,7 +200,7 @@ export class AuthMagicLinksApi extends runtime.BaseAPI implements AuthMagicLinks
200
200
  }
201
201
 
202
202
  /**
203
- * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag.
203
+ * Verify a magic link token and authenticate the user. Returns auth result with is_new_user flag. A magic link is a single factor, so a user who has enrolled MFA gets `mfa_required: true` and an `mfa_challenge` instead of tokens; complete the login with the challenge token at `POST /auth/mfa/verify`, exactly as after password login.
204
204
  * Verify a magic link
205
205
  */
206
206
  async verifyMagicLink(magicLinkVerifyRequest: MagicLinkVerifyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MagicLinkVerifyResponse> {
@@ -175,7 +175,7 @@ export interface AuthUserDirectoryApiInterface {
175
175
  getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEndUserClaims200Response>;
176
176
 
177
177
  /**
178
- * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
178
+ * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"invitation\"` sends the `invitation` auth email: a set-password link (valid 7 days) redeemed at `POST /auth/reset-password`, so the invitee ends up with a password. It has its own per-application template, separate from password reset\'s. Not sent to an identity that can already sign in. - `send_link: \"password_reset\"` sends a set-password email using the password-reset template. - `send_link: \"magic\"` sends a magic-link sign-in email. The user still has no credential afterwards. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required whenever `send_link` is not \"none\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
179
179
  * @summary Pre-provision (invite) an end user (server-side admin)
180
180
  * @param {InviteEndUserRequest} inviteEndUserRequest
181
181
  * @param {*} [options] Override http request option.
@@ -185,7 +185,7 @@ export interface AuthUserDirectoryApiInterface {
185
185
  inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteEndUser200Response>>;
186
186
 
187
187
  /**
188
- * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
188
+ * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"invitation\"` sends the `invitation` auth email: a set-password link (valid 7 days) redeemed at `POST /auth/reset-password`, so the invitee ends up with a password. It has its own per-application template, separate from password reset\'s. Not sent to an identity that can already sign in. - `send_link: \"password_reset\"` sends a set-password email using the password-reset template. - `send_link: \"magic\"` sends a magic-link sign-in email. The user still has no credential afterwards. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required whenever `send_link` is not \"none\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
189
189
  * Pre-provision (invite) an end user (server-side admin)
190
190
  */
191
191
  inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteEndUser200Response>;
@@ -539,7 +539,7 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
539
539
  }
540
540
 
541
541
  /**
542
- * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
542
+ * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"invitation\"` sends the `invitation` auth email: a set-password link (valid 7 days) redeemed at `POST /auth/reset-password`, so the invitee ends up with a password. It has its own per-application template, separate from password reset\'s. Not sent to an identity that can already sign in. - `send_link: \"password_reset\"` sends a set-password email using the password-reset template. - `send_link: \"magic\"` sends a magic-link sign-in email. The user still has no credential afterwards. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required whenever `send_link` is not \"none\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
543
543
  * Pre-provision (invite) an end user (server-side admin)
544
544
  */
545
545
  async inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteEndUser200Response>> {
@@ -590,7 +590,7 @@ export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDir
590
590
  }
591
591
 
592
592
  /**
593
- * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
593
+ * Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"invitation\"` sends the `invitation` auth email: a set-password link (valid 7 days) redeemed at `POST /auth/reset-password`, so the invitee ends up with a password. It has its own per-application template, separate from password reset\'s. Not sent to an identity that can already sign in. - `send_link: \"password_reset\"` sends a set-password email using the password-reset template. - `send_link: \"magic\"` sends a magic-link sign-in email. The user still has no credential afterwards. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required whenever `send_link` is not \"none\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
594
594
  * Pre-provision (invite) an end user (server-side admin)
595
595
  */
596
596
  async inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteEndUser200Response> {
@@ -194,7 +194,7 @@ export interface SubscribersApiInterface {
194
194
  createCategory(createCategoryRequest: CreateCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CategoryResponse>;
195
195
 
196
196
  /**
197
- * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated.
197
+ * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated; fields you omit keep their existing values. A new subscriber\'s timezone defaults to UTC and locale to en.
198
198
  * @summary Create or update a subscriber
199
199
  * @param {CreateSubscriberRequest} createSubscriberRequest
200
200
  * @param {*} [options] Override http request option.
@@ -204,7 +204,7 @@ export interface SubscribersApiInterface {
204
204
  createSubscriberRaw(requestParameters: SubscribersApiCreateSubscriberOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriberResponse>>;
205
205
 
206
206
  /**
207
- * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated.
207
+ * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated; fields you omit keep their existing values. A new subscriber\'s timezone defaults to UTC and locale to en.
208
208
  * Create or update a subscriber
209
209
  */
210
210
  createSubscriber(createSubscriberRequest: CreateSubscriberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriberResponse>;
@@ -550,7 +550,7 @@ export class SubscribersApi extends runtime.BaseAPI implements SubscribersApiInt
550
550
  }
551
551
 
552
552
  /**
553
- * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated.
553
+ * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated; fields you omit keep their existing values. A new subscriber\'s timezone defaults to UTC and locale to en.
554
554
  * Create or update a subscriber
555
555
  */
556
556
  async createSubscriberRaw(requestParameters: SubscribersApiCreateSubscriberOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriberResponse>> {
@@ -590,7 +590,7 @@ export class SubscribersApi extends runtime.BaseAPI implements SubscribersApiInt
590
590
  }
591
591
 
592
592
  /**
593
- * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated.
593
+ * Upsert a subscriber by external_id. If a subscriber with the given external_id already exists, it will be updated; fields you omit keep their existing values. A new subscriber\'s timezone defaults to UTC and locale to en.
594
594
  * Create or update a subscriber
595
595
  */
596
596
  async createSubscriber(createSubscriberRequest: CreateSubscriberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriberResponse> {
@@ -20,7 +20,9 @@
20
20
  export const AuthEmailType = {
21
21
  MAGIC_LINK: 'magic_link',
22
22
  PASSWORD_RESET: 'password_reset',
23
- EMAIL_VERIFICATION: 'email_verification'
23
+ EMAIL_VERIFICATION: 'email_verification',
24
+ EMAIL_OTP: 'email_otp',
25
+ INVITATION: 'invitation'
24
26
  } as const;
25
27
  export type AuthEmailType = typeof AuthEmailType[keyof typeof AuthEmailType];
26
28
 
@@ -22,7 +22,7 @@ import {
22
22
  } from './UpsertAuthEmailTemplateRequest';
23
23
 
24
24
  /**
25
- * Atomic upsert of any subset of magic_link, password_reset, email_verification.
25
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation.
26
26
  * At least one entry must be provided.
27
27
  *
28
28
  * @export
@@ -47,6 +47,18 @@ export interface BulkUpsertAuthEmailTemplatesRequest {
47
47
  * @memberof BulkUpsertAuthEmailTemplatesRequest
48
48
  */
49
49
  emailVerification?: UpsertAuthEmailTemplateRequest;
50
+ /**
51
+ *
52
+ * @type {UpsertAuthEmailTemplateRequest}
53
+ * @memberof BulkUpsertAuthEmailTemplatesRequest
54
+ */
55
+ emailOtp?: UpsertAuthEmailTemplateRequest;
56
+ /**
57
+ *
58
+ * @type {UpsertAuthEmailTemplateRequest}
59
+ * @memberof BulkUpsertAuthEmailTemplatesRequest
60
+ */
61
+ invitation?: UpsertAuthEmailTemplateRequest;
50
62
  }
51
63
 
52
64
  /**
@@ -69,6 +81,8 @@ export function BulkUpsertAuthEmailTemplatesRequestFromJSONTyped(json: any, igno
69
81
  'magicLink': json['magic_link'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['magic_link']),
70
82
  'passwordReset': json['password_reset'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['password_reset']),
71
83
  'emailVerification': json['email_verification'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['email_verification']),
84
+ 'emailOtp': json['email_otp'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['email_otp']),
85
+ 'invitation': json['invitation'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['invitation']),
72
86
  };
73
87
  }
74
88
 
@@ -86,6 +100,8 @@ export function BulkUpsertAuthEmailTemplatesRequestToJSONTyped(value?: BulkUpser
86
100
  'magic_link': UpsertAuthEmailTemplateRequestToJSON(value['magicLink']),
87
101
  'password_reset': UpsertAuthEmailTemplateRequestToJSON(value['passwordReset']),
88
102
  'email_verification': UpsertAuthEmailTemplateRequestToJSON(value['emailVerification']),
103
+ 'email_otp': UpsertAuthEmailTemplateRequestToJSON(value['emailOtp']),
104
+ 'invitation': UpsertAuthEmailTemplateRequestToJSON(value['invitation']),
89
105
  };
90
106
  }
91
107
 
@@ -32,7 +32,7 @@ export interface InviteEndUser200ResponseData {
32
32
  */
33
33
  created?: boolean;
34
34
  /**
35
- * True when a magic-link or password-reset email was successfully dispatched.
35
+ * True when the requested invitation, magic-link or password-reset email was successfully dispatched.
36
36
  * @type {boolean}
37
37
  * @memberof InviteEndUser200ResponseData
38
38
  */
@@ -47,6 +47,10 @@ export interface InviteEndUser200ResponseData {
47
47
  * linked OAuth provider and/or a passkey, so it is not locked out and no
48
48
  * set-password link is sent. The attempt is recorded as a suppressed message,
49
49
  * visible via `GET /emails`.
50
+ * (For `send_link: "invitation"` the reason is returned here only; no
51
+ * suppressed message is recorded.)
52
+ * - `user_has_password` — `send_link: "invitation"` only: the identity already has
53
+ * a password, so there is nothing to accept. Use `password_reset` to send a reset.
50
54
  * - `user_not_found_in_environment` — the identity could not be resolved in the
51
55
  * calling environment (a race; it was created or resolved immediately prior).
52
56
  * - `recipient_not_allowlisted` — the application's `test_recipients` allowlist
@@ -56,6 +56,7 @@ export interface InviteEndUserRequest {
56
56
  * @export
57
57
  */
58
58
  export const InviteEndUserRequestSendLinkEnum = {
59
+ INVITATION: 'invitation',
59
60
  MAGIC: 'magic',
60
61
  PASSWORD_RESET: 'password_reset',
61
62
  NONE: 'none'
@@ -20,6 +20,13 @@ import {
20
20
  AuthTokensToJSON,
21
21
  AuthTokensToJSONTyped,
22
22
  } from './AuthTokens';
23
+ import type { AuthLoginResultMfaChallenge } from './AuthLoginResultMfaChallenge';
24
+ import {
25
+ AuthLoginResultMfaChallengeFromJSON,
26
+ AuthLoginResultMfaChallengeFromJSONTyped,
27
+ AuthLoginResultMfaChallengeToJSON,
28
+ AuthLoginResultMfaChallengeToJSONTyped,
29
+ } from './AuthLoginResultMfaChallenge';
23
30
  import type { AuthUser } from './AuthUser';
24
31
  import {
25
32
  AuthUserFromJSON,
@@ -34,6 +41,12 @@ import {
34
41
  * @interface MagicLinkVerifyResponseData
35
42
  */
36
43
  export interface MagicLinkVerifyResponseData {
44
+ /**
45
+ *
46
+ * @type {boolean}
47
+ * @memberof MagicLinkVerifyResponseData
48
+ */
49
+ mfaRequired?: boolean;
37
50
  /**
38
51
  *
39
52
  * @type {AuthUser}
@@ -46,6 +59,12 @@ export interface MagicLinkVerifyResponseData {
46
59
  * @memberof MagicLinkVerifyResponseData
47
60
  */
48
61
  tokens?: AuthTokens;
62
+ /**
63
+ *
64
+ * @type {AuthLoginResultMfaChallenge}
65
+ * @memberof MagicLinkVerifyResponseData
66
+ */
67
+ mfaChallenge?: AuthLoginResultMfaChallenge;
49
68
  /**
50
69
  *
51
70
  * @type {boolean}
@@ -71,8 +90,10 @@ export function MagicLinkVerifyResponseDataFromJSONTyped(json: any, ignoreDiscri
71
90
  }
72
91
  return {
73
92
 
93
+ 'mfaRequired': json['mfa_required'] == null ? undefined : json['mfa_required'],
74
94
  'user': json['user'] == null ? undefined : AuthUserFromJSON(json['user']),
75
95
  'tokens': json['tokens'] == null ? undefined : AuthTokensFromJSON(json['tokens']),
96
+ 'mfaChallenge': json['mfa_challenge'] == null ? undefined : AuthLoginResultMfaChallengeFromJSON(json['mfa_challenge']),
76
97
  'isNewUser': json['is_new_user'] == null ? undefined : json['is_new_user'],
77
98
  };
78
99
  }
@@ -88,8 +109,10 @@ export function MagicLinkVerifyResponseDataToJSONTyped(value?: MagicLinkVerifyRe
88
109
 
89
110
  return {
90
111
 
112
+ 'mfa_required': value['mfaRequired'],
91
113
  'user': AuthUserToJSON(value['user']),
92
114
  'tokens': AuthTokensToJSON(value['tokens']),
115
+ 'mfa_challenge': AuthLoginResultMfaChallengeToJSON(value['mfaChallenge']),
93
116
  'is_new_user': value['isNewUser'],
94
117
  };
95
118
  }