@niledatabase/react 5.3.3-alpha.0 → 5.3.3-alpha.2

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/index.d.mts CHANGED
@@ -73,7 +73,7 @@ type AllProps = ButtonProps & SSOButtonProps & {
73
73
  * @returns a JSX.Element to render
74
74
  */
75
75
  declare const EmailSignInButton: {
76
- ({ callbackUrl, className, variant, size, asChild, redirect, buttonText, email, onFailure, onSent, fetchUrl, baseUrl, auth, ...props }: AllProps): React__default.JSX.Element;
76
+ ({ callbackUrl, className, variant, size, asChild, redirect, buttonText, email, onFailure, onSent, fetchUrl, baseUrl, auth, init, loading: _loading, type, onClick, children, ...props }: AllProps): React__default.JSX.Element;
77
77
  displayName: string;
78
78
  };
79
79
 
@@ -86,47 +86,47 @@ declare function useEmailSignIn(params?: Props$5): _tanstack_react_query.UseMuta
86
86
  * @returns a JSX.Element to render
87
87
  */
88
88
  declare const GoogleSSOButton: {
89
- ({ callbackUrl, className, variant, size, buttonText, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
89
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
90
90
  displayName: string;
91
91
  };
92
92
 
93
93
  declare const AzureSignInButton: {
94
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
94
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
95
95
  displayName: string;
96
96
  };
97
97
 
98
98
  declare const DiscordSignInButton: {
99
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
99
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
100
100
  displayName: string;
101
101
  };
102
102
 
103
103
  declare const GitHubSignInButton: {
104
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
104
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
105
105
  displayName: string;
106
106
  };
107
107
 
108
108
  declare const HubSpotSignInButton: {
109
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
109
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
110
110
  displayName: string;
111
111
  };
112
112
 
113
113
  declare const LinkedInSignInButton: {
114
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
114
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
115
115
  displayName: string;
116
116
  };
117
117
 
118
118
  declare const SlackSignInButton: {
119
- ({ callbackUrl, className, buttonText, variant, size, init, onClick, asChild, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
119
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
120
120
  displayName: string;
121
121
  };
122
122
 
123
123
  declare const XSignInButton: {
124
- ({ callbackUrl, className, buttonText, variant, size, init, onClick, asChild, auth, fetchUrl, baseUrl, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
124
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
125
125
  displayName: string;
126
126
  };
127
127
 
128
128
  declare const OktaSignInButton: {
129
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
129
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
130
130
  displayName: string;
131
131
  };
132
132
 
@@ -135,13 +135,17 @@ type ComponentFetchProps = {
135
135
  init?: RequestInit;
136
136
  baseUrl?: string;
137
137
  basePath?: string;
138
+ fetchUrl?: string;
138
139
  };
139
140
  type PrefetchParams = {
140
141
  baseUrl?: string;
142
+ basePath?: string;
141
143
  disableQuery?: boolean;
142
144
  init?: RequestInit;
143
145
  client?: QueryClient;
144
146
  fetchUrl?: string;
147
+ providersUrl?: string;
148
+ csrfUrl?: string;
145
149
  };
146
150
 
147
151
  type SignUpInfo = {
@@ -166,7 +170,7 @@ type Props$4 = PrefetchParams & {
166
170
 
167
171
  declare function SigningUp({ className, ...props }: Props$4): React__default.JSX.Element;
168
172
 
169
- declare function useSignUp<T extends SignUpInfo>(params: Props$4, client?: QueryClient): _tanstack_react_query.UseMutateFunction<Response, Error, SignUpInfo, unknown>;
173
+ declare function useSignUp<T extends SignUpInfo>(params?: Props$4, client?: QueryClient): _tanstack_react_query.UseMutateFunction<Response, Error, T, unknown>;
170
174
 
171
175
  type AllowedAny$1 = any;
172
176
  type LoginInfo = {
@@ -183,6 +187,7 @@ type Props$3 = ComponentFetchProps & {
183
187
  resetUrl?: string;
184
188
  client?: QueryClient;
185
189
  className?: string;
190
+ buttonText?: string;
186
191
  baseUrl?: string;
187
192
  fetchUrl?: string;
188
193
  redirect?: boolean;
@@ -201,7 +206,7 @@ type Props$2 = ButtonProps & ComponentFetchProps & {
201
206
  basePath?: string;
202
207
  };
203
208
  declare const SignOutButton: {
204
- ({ callbackUrl, redirect, className, buttonText, variant, size, baseUrl, fetchUrl, basePath, auth, asChild, ...props }: Props$2): React__default.JSX.Element;
209
+ ({ callbackUrl, redirect, className, buttonText, variant, size, baseUrl, fetchUrl, basePath, auth, init, loading: _loading, type, asChild, onClick, children, ...props }: Props$2): React__default.JSX.Element;
205
210
  displayName: string;
206
211
  };
207
212
 
@@ -260,19 +265,6 @@ interface UseSessionOptions<R extends boolean> {
260
265
  * [Documentation](https://next-auth.js.org/getting-started/client#usesession)
261
266
  */
262
267
  declare function useSession<R extends boolean>(options?: UseSessionOptions<R>): SessionContextValue<R>;
263
- /**
264
- * Signs the user out, by removing the session cookie.
265
- * Automatically adds the CSRF token to the request.
266
- *
267
- * [Documentation](https://next-auth.js.org/getting-started/client#signout)
268
- */
269
- /**
270
- * Provider to wrap the app in to make session data available globally.
271
- * Can also be used to throttle the number of requests to the endpoint
272
- * `/api/auth/session`.
273
- *
274
- * [Documentation](https://next-auth.js.org/getting-started/client#sessionprovider)
275
- */
276
268
  declare function SessionProvider(props: SessionProviderProps): React__default.JSX.Element;
277
269
 
278
270
  declare function SignedIn({ children, session: startSession, ...props }: SessionProviderProps & {
@@ -281,7 +273,7 @@ declare function SignedIn({ children, session: startSession, ...props }: Session
281
273
 
282
274
  declare function SignedOut({ children, session: startSession, ...props }: SessionProviderProps & {
283
275
  className?: string;
284
- }): React__default.JSX.Element | null;
276
+ }): React__default.JSX.Element;
285
277
 
286
278
  type MfaMethod = 'authenticator' | 'email';
287
279
  type ChallengeScope = 'setup' | 'challenge';
@@ -302,6 +294,7 @@ type EmailSetup = {
302
294
  type EnrollMfaProps = {
303
295
  enrolled?: boolean;
304
296
  enrolledMethod?: MfaMethod | null;
297
+ promptPath?: string;
305
298
  onRedirect?: (url: string) => void;
306
299
  onChallengeRedirect?: (params: ChallengeRedirect) => void;
307
300
  };
@@ -321,6 +314,7 @@ type EnrollmentError = 'setup' | 'disable' | 'parseSetup' | 'parseDisable' | nul
321
314
  type UseMfaEnrollmentOptions = {
322
315
  method: MfaMethod;
323
316
  currentMethod: MfaMethod | null;
317
+ promptPath?: string;
324
318
  onRedirect?: (url: string) => void;
325
319
  onChallengeRedirect?: (params: ChallengeRedirect) => void;
326
320
  };
@@ -328,11 +322,12 @@ type UseMfaEnrollmentResult<TSetup extends MfaSetup> = {
328
322
  setup: TSetup | null;
329
323
  loading: boolean;
330
324
  errorType: EnrollmentError;
325
+ errorMessage: string | null;
331
326
  startSetup: () => Promise<void>;
332
327
  startDisable: () => Promise<void>;
333
328
  };
334
329
 
335
- declare const useMultiFactor: ({ method, currentMethod, onRedirect, onChallengeRedirect, }: UseMfaEnrollmentOptions) => UseMfaEnrollmentResult<MfaSetup>;
330
+ declare const useMultiFactor: ({ method, currentMethod, promptPath, onRedirect, onChallengeRedirect, }: UseMfaEnrollmentOptions) => UseMfaEnrollmentResult<MfaSetup>;
336
331
 
337
332
  declare function SetupAuthenticator({ setup, onError, onSuccess, }: AuthenticatorSetupProps): React__default.JSX.Element;
338
333
 
@@ -341,18 +336,32 @@ declare function SetupEmail({ setup, onSuccess, }: {
341
336
  onSuccess: (scope: 'setup' | 'challenge') => void;
342
337
  }): React__default.JSX.Element;
343
338
 
344
- declare function ChallengeContent({ payload, message, isEnrolled, onSuccess, }: {
339
+ declare function ChallengeContent({ payload, message, isEnrolled, signInHref, onSuccess, }: {
345
340
  payload: MfaSetup;
346
341
  message?: string;
347
342
  isEnrolled?: boolean;
343
+ signInHref?: string;
348
344
  onSuccess?: (scope: 'setup' | 'challenge') => void;
349
345
  }): React__default.JSX.Element;
350
346
 
347
+ type MfaVerifyFormProps = {
348
+ token: string;
349
+ scope: 'setup' | 'challenge';
350
+ method: 'email' | 'authenticator';
351
+ remove?: boolean;
352
+ signInHref?: string;
353
+ onSuccess?: (scope: 'setup' | 'challenge') => void;
354
+ };
355
+ declare function MultiFactorVerify({ token, scope, method, remove, signInHref, onSuccess, }: MfaVerifyFormProps): React$1.JSX.Element;
356
+
357
+ declare function storeMfaChallenge(params: ChallengeRedirect): void;
358
+ declare function readMfaChallenge(): ChallengeRedirect | null;
359
+ declare function clearMfaChallenge(): void;
360
+
351
361
  type Tenant = {
352
362
  id: string;
353
363
  name: string;
354
364
  };
355
-
356
365
  type HookProps$1 = ComponentFetchProps & {
357
366
  client?: QueryClient;
358
367
  fetchUrl?: string;
@@ -360,9 +369,9 @@ type HookProps$1 = ComponentFetchProps & {
360
369
  onError?: (e: Error) => void;
361
370
  onTenantChange?: (tenant: string) => void;
362
371
  activeTenant?: string | null | undefined;
372
+ useCookie?: boolean;
363
373
  };
364
374
  type ComponentProps = HookProps$1 & {
365
- useCookie?: boolean;
366
375
  className?: string;
367
376
  emptyText?: string;
368
377
  buttonText?: string;
@@ -373,6 +382,7 @@ declare function useTenants(params: HookProps$1 & {
373
382
  }): _tanstack_react_query.UseQueryResult<Tenant[], Error>;
374
383
  declare function useTenantId(params?: HookProps$1 & {
375
384
  tenant?: Tenant;
385
+ disableQuery?: boolean;
376
386
  }): [string | undefined, (tenant: string) => void];
377
387
 
378
388
  declare function TenantSelector(props: ComponentProps): React__default.JSX.Element;
@@ -390,7 +400,6 @@ interface User {
390
400
  multiFactor?: string | null;
391
401
  tenants: string[];
392
402
  }
393
-
394
403
  type HookProps = ComponentFetchProps & {
395
404
  user?: User | undefined | null;
396
405
  baseUrl?: string;
@@ -420,6 +429,8 @@ type MutateFnParams = {
420
429
  };
421
430
  type Props = Params & {
422
431
  className?: string;
432
+ buttonText?: string;
433
+ mode?: 'forgot' | 'reset';
423
434
  defaultValues?: MutateFnParams & {
424
435
  confirmPassword?: string;
425
436
  };
@@ -434,6 +445,8 @@ declare function useResetPassword(params?: Params): _tanstack_react_query.UseMut
434
445
  declare const Email: ({ hide }: {
435
446
  hide?: boolean;
436
447
  }) => React$1.JSX.Element;
437
- declare const Password: () => React$1.JSX.Element;
448
+ declare const Password: ({ autoComplete, }?: {
449
+ autoComplete?: string;
450
+ }) => React$1.JSX.Element;
438
451
 
439
- export { type AuthenticatorSetup, AzureSignInButton as Azure, type ChallengeRedirect, DiscordSignInButton as Discord, Email, type EmailSetup, EmailSigningIn as EmailSignIn, EmailSignInButton, type EnrollMfaProps, type EnrollmentError, GitHubSignInButton as GitHub, GoogleSSOButton as Google, HubSpotSignInButton as HubSpot, LinkedInSignInButton as LinkedIn, type MfaMethod, type MfaSetup, SetupAuthenticator as MultiFactorAuthenticator, ChallengeContent as MultiFactorChallenge, SetupEmail as MultiFactorEmail, OktaSignInButton as Okta, Password, ResetPasswordForm as PasswordResetForm, ResetPasswordForm$1 as PasswordResetRequestForm, SessionContext, SessionProvider, SigningIn as SignInForm, SignOutButton, SigningUp as SignUpForm, SignedIn, SignedOut, SlackSignInButton as Slack, TenantSelector, UserInfo, XSignInButton as X, useEmailSignIn, useMe, useMultiFactor, useResetPassword, useSession, useSignIn, useSignUp, useTenantId, useTenants };
452
+ export { type AuthenticatorSetup, AzureSignInButton as Azure, type ChallengeRedirect, DiscordSignInButton as Discord, Email, type EmailSetup, EmailSigningIn as EmailSignIn, EmailSignInButton, type EnrollMfaProps, type EnrollmentError, GitHubSignInButton as GitHub, GoogleSSOButton as Google, HubSpotSignInButton as HubSpot, LinkedInSignInButton as LinkedIn, type MfaMethod, type MfaSetup, SetupAuthenticator as MultiFactorAuthenticator, ChallengeContent as MultiFactorChallenge, SetupEmail as MultiFactorEmail, MultiFactorVerify, OktaSignInButton as Okta, Password, ResetPasswordForm as PasswordResetForm, ResetPasswordForm$1 as PasswordResetRequestForm, SessionContext, SessionProvider, SigningIn as SignInForm, SignOutButton, SigningUp as SignUpForm, SignedIn, SignedOut, SlackSignInButton as Slack, TenantSelector, UserInfo, XSignInButton as X, clearMfaChallenge, readMfaChallenge, storeMfaChallenge, useEmailSignIn, useMe, useMultiFactor, useResetPassword, useSession, useSignIn, useSignUp, useTenantId, useTenants };
package/dist/index.d.ts CHANGED
@@ -73,7 +73,7 @@ type AllProps = ButtonProps & SSOButtonProps & {
73
73
  * @returns a JSX.Element to render
74
74
  */
75
75
  declare const EmailSignInButton: {
76
- ({ callbackUrl, className, variant, size, asChild, redirect, buttonText, email, onFailure, onSent, fetchUrl, baseUrl, auth, ...props }: AllProps): React__default.JSX.Element;
76
+ ({ callbackUrl, className, variant, size, asChild, redirect, buttonText, email, onFailure, onSent, fetchUrl, baseUrl, auth, init, loading: _loading, type, onClick, children, ...props }: AllProps): React__default.JSX.Element;
77
77
  displayName: string;
78
78
  };
79
79
 
@@ -86,47 +86,47 @@ declare function useEmailSignIn(params?: Props$5): _tanstack_react_query.UseMuta
86
86
  * @returns a JSX.Element to render
87
87
  */
88
88
  declare const GoogleSSOButton: {
89
- ({ callbackUrl, className, variant, size, buttonText, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
89
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
90
90
  displayName: string;
91
91
  };
92
92
 
93
93
  declare const AzureSignInButton: {
94
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
94
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
95
95
  displayName: string;
96
96
  };
97
97
 
98
98
  declare const DiscordSignInButton: {
99
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
99
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
100
100
  displayName: string;
101
101
  };
102
102
 
103
103
  declare const GitHubSignInButton: {
104
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
104
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
105
105
  displayName: string;
106
106
  };
107
107
 
108
108
  declare const HubSpotSignInButton: {
109
- ({ callbackUrl, className, buttonText, variant, size, init, asChild, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
109
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
110
110
  displayName: string;
111
111
  };
112
112
 
113
113
  declare const LinkedInSignInButton: {
114
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
114
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
115
115
  displayName: string;
116
116
  };
117
117
 
118
118
  declare const SlackSignInButton: {
119
- ({ callbackUrl, className, buttonText, variant, size, init, onClick, asChild, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
119
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
120
120
  displayName: string;
121
121
  };
122
122
 
123
123
  declare const XSignInButton: {
124
- ({ callbackUrl, className, buttonText, variant, size, init, onClick, asChild, auth, fetchUrl, baseUrl, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
124
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
125
125
  displayName: string;
126
126
  };
127
127
 
128
128
  declare const OktaSignInButton: {
129
- ({ callbackUrl, className, buttonText, variant, size, asChild, init, auth, fetchUrl, baseUrl, onClick, ...props }: ButtonProps & SSOButtonProps): React__default.JSX.Element;
129
+ (props: ButtonProps & SSOButtonProps): React__default.JSX.Element;
130
130
  displayName: string;
131
131
  };
132
132
 
@@ -135,13 +135,17 @@ type ComponentFetchProps = {
135
135
  init?: RequestInit;
136
136
  baseUrl?: string;
137
137
  basePath?: string;
138
+ fetchUrl?: string;
138
139
  };
139
140
  type PrefetchParams = {
140
141
  baseUrl?: string;
142
+ basePath?: string;
141
143
  disableQuery?: boolean;
142
144
  init?: RequestInit;
143
145
  client?: QueryClient;
144
146
  fetchUrl?: string;
147
+ providersUrl?: string;
148
+ csrfUrl?: string;
145
149
  };
146
150
 
147
151
  type SignUpInfo = {
@@ -166,7 +170,7 @@ type Props$4 = PrefetchParams & {
166
170
 
167
171
  declare function SigningUp({ className, ...props }: Props$4): React__default.JSX.Element;
168
172
 
169
- declare function useSignUp<T extends SignUpInfo>(params: Props$4, client?: QueryClient): _tanstack_react_query.UseMutateFunction<Response, Error, SignUpInfo, unknown>;
173
+ declare function useSignUp<T extends SignUpInfo>(params?: Props$4, client?: QueryClient): _tanstack_react_query.UseMutateFunction<Response, Error, T, unknown>;
170
174
 
171
175
  type AllowedAny$1 = any;
172
176
  type LoginInfo = {
@@ -183,6 +187,7 @@ type Props$3 = ComponentFetchProps & {
183
187
  resetUrl?: string;
184
188
  client?: QueryClient;
185
189
  className?: string;
190
+ buttonText?: string;
186
191
  baseUrl?: string;
187
192
  fetchUrl?: string;
188
193
  redirect?: boolean;
@@ -201,7 +206,7 @@ type Props$2 = ButtonProps & ComponentFetchProps & {
201
206
  basePath?: string;
202
207
  };
203
208
  declare const SignOutButton: {
204
- ({ callbackUrl, redirect, className, buttonText, variant, size, baseUrl, fetchUrl, basePath, auth, asChild, ...props }: Props$2): React__default.JSX.Element;
209
+ ({ callbackUrl, redirect, className, buttonText, variant, size, baseUrl, fetchUrl, basePath, auth, init, loading: _loading, type, asChild, onClick, children, ...props }: Props$2): React__default.JSX.Element;
205
210
  displayName: string;
206
211
  };
207
212
 
@@ -260,19 +265,6 @@ interface UseSessionOptions<R extends boolean> {
260
265
  * [Documentation](https://next-auth.js.org/getting-started/client#usesession)
261
266
  */
262
267
  declare function useSession<R extends boolean>(options?: UseSessionOptions<R>): SessionContextValue<R>;
263
- /**
264
- * Signs the user out, by removing the session cookie.
265
- * Automatically adds the CSRF token to the request.
266
- *
267
- * [Documentation](https://next-auth.js.org/getting-started/client#signout)
268
- */
269
- /**
270
- * Provider to wrap the app in to make session data available globally.
271
- * Can also be used to throttle the number of requests to the endpoint
272
- * `/api/auth/session`.
273
- *
274
- * [Documentation](https://next-auth.js.org/getting-started/client#sessionprovider)
275
- */
276
268
  declare function SessionProvider(props: SessionProviderProps): React__default.JSX.Element;
277
269
 
278
270
  declare function SignedIn({ children, session: startSession, ...props }: SessionProviderProps & {
@@ -281,7 +273,7 @@ declare function SignedIn({ children, session: startSession, ...props }: Session
281
273
 
282
274
  declare function SignedOut({ children, session: startSession, ...props }: SessionProviderProps & {
283
275
  className?: string;
284
- }): React__default.JSX.Element | null;
276
+ }): React__default.JSX.Element;
285
277
 
286
278
  type MfaMethod = 'authenticator' | 'email';
287
279
  type ChallengeScope = 'setup' | 'challenge';
@@ -302,6 +294,7 @@ type EmailSetup = {
302
294
  type EnrollMfaProps = {
303
295
  enrolled?: boolean;
304
296
  enrolledMethod?: MfaMethod | null;
297
+ promptPath?: string;
305
298
  onRedirect?: (url: string) => void;
306
299
  onChallengeRedirect?: (params: ChallengeRedirect) => void;
307
300
  };
@@ -321,6 +314,7 @@ type EnrollmentError = 'setup' | 'disable' | 'parseSetup' | 'parseDisable' | nul
321
314
  type UseMfaEnrollmentOptions = {
322
315
  method: MfaMethod;
323
316
  currentMethod: MfaMethod | null;
317
+ promptPath?: string;
324
318
  onRedirect?: (url: string) => void;
325
319
  onChallengeRedirect?: (params: ChallengeRedirect) => void;
326
320
  };
@@ -328,11 +322,12 @@ type UseMfaEnrollmentResult<TSetup extends MfaSetup> = {
328
322
  setup: TSetup | null;
329
323
  loading: boolean;
330
324
  errorType: EnrollmentError;
325
+ errorMessage: string | null;
331
326
  startSetup: () => Promise<void>;
332
327
  startDisable: () => Promise<void>;
333
328
  };
334
329
 
335
- declare const useMultiFactor: ({ method, currentMethod, onRedirect, onChallengeRedirect, }: UseMfaEnrollmentOptions) => UseMfaEnrollmentResult<MfaSetup>;
330
+ declare const useMultiFactor: ({ method, currentMethod, promptPath, onRedirect, onChallengeRedirect, }: UseMfaEnrollmentOptions) => UseMfaEnrollmentResult<MfaSetup>;
336
331
 
337
332
  declare function SetupAuthenticator({ setup, onError, onSuccess, }: AuthenticatorSetupProps): React__default.JSX.Element;
338
333
 
@@ -341,18 +336,32 @@ declare function SetupEmail({ setup, onSuccess, }: {
341
336
  onSuccess: (scope: 'setup' | 'challenge') => void;
342
337
  }): React__default.JSX.Element;
343
338
 
344
- declare function ChallengeContent({ payload, message, isEnrolled, onSuccess, }: {
339
+ declare function ChallengeContent({ payload, message, isEnrolled, signInHref, onSuccess, }: {
345
340
  payload: MfaSetup;
346
341
  message?: string;
347
342
  isEnrolled?: boolean;
343
+ signInHref?: string;
348
344
  onSuccess?: (scope: 'setup' | 'challenge') => void;
349
345
  }): React__default.JSX.Element;
350
346
 
347
+ type MfaVerifyFormProps = {
348
+ token: string;
349
+ scope: 'setup' | 'challenge';
350
+ method: 'email' | 'authenticator';
351
+ remove?: boolean;
352
+ signInHref?: string;
353
+ onSuccess?: (scope: 'setup' | 'challenge') => void;
354
+ };
355
+ declare function MultiFactorVerify({ token, scope, method, remove, signInHref, onSuccess, }: MfaVerifyFormProps): React$1.JSX.Element;
356
+
357
+ declare function storeMfaChallenge(params: ChallengeRedirect): void;
358
+ declare function readMfaChallenge(): ChallengeRedirect | null;
359
+ declare function clearMfaChallenge(): void;
360
+
351
361
  type Tenant = {
352
362
  id: string;
353
363
  name: string;
354
364
  };
355
-
356
365
  type HookProps$1 = ComponentFetchProps & {
357
366
  client?: QueryClient;
358
367
  fetchUrl?: string;
@@ -360,9 +369,9 @@ type HookProps$1 = ComponentFetchProps & {
360
369
  onError?: (e: Error) => void;
361
370
  onTenantChange?: (tenant: string) => void;
362
371
  activeTenant?: string | null | undefined;
372
+ useCookie?: boolean;
363
373
  };
364
374
  type ComponentProps = HookProps$1 & {
365
- useCookie?: boolean;
366
375
  className?: string;
367
376
  emptyText?: string;
368
377
  buttonText?: string;
@@ -373,6 +382,7 @@ declare function useTenants(params: HookProps$1 & {
373
382
  }): _tanstack_react_query.UseQueryResult<Tenant[], Error>;
374
383
  declare function useTenantId(params?: HookProps$1 & {
375
384
  tenant?: Tenant;
385
+ disableQuery?: boolean;
376
386
  }): [string | undefined, (tenant: string) => void];
377
387
 
378
388
  declare function TenantSelector(props: ComponentProps): React__default.JSX.Element;
@@ -390,7 +400,6 @@ interface User {
390
400
  multiFactor?: string | null;
391
401
  tenants: string[];
392
402
  }
393
-
394
403
  type HookProps = ComponentFetchProps & {
395
404
  user?: User | undefined | null;
396
405
  baseUrl?: string;
@@ -420,6 +429,8 @@ type MutateFnParams = {
420
429
  };
421
430
  type Props = Params & {
422
431
  className?: string;
432
+ buttonText?: string;
433
+ mode?: 'forgot' | 'reset';
423
434
  defaultValues?: MutateFnParams & {
424
435
  confirmPassword?: string;
425
436
  };
@@ -434,6 +445,8 @@ declare function useResetPassword(params?: Params): _tanstack_react_query.UseMut
434
445
  declare const Email: ({ hide }: {
435
446
  hide?: boolean;
436
447
  }) => React$1.JSX.Element;
437
- declare const Password: () => React$1.JSX.Element;
448
+ declare const Password: ({ autoComplete, }?: {
449
+ autoComplete?: string;
450
+ }) => React$1.JSX.Element;
438
451
 
439
- export { type AuthenticatorSetup, AzureSignInButton as Azure, type ChallengeRedirect, DiscordSignInButton as Discord, Email, type EmailSetup, EmailSigningIn as EmailSignIn, EmailSignInButton, type EnrollMfaProps, type EnrollmentError, GitHubSignInButton as GitHub, GoogleSSOButton as Google, HubSpotSignInButton as HubSpot, LinkedInSignInButton as LinkedIn, type MfaMethod, type MfaSetup, SetupAuthenticator as MultiFactorAuthenticator, ChallengeContent as MultiFactorChallenge, SetupEmail as MultiFactorEmail, OktaSignInButton as Okta, Password, ResetPasswordForm as PasswordResetForm, ResetPasswordForm$1 as PasswordResetRequestForm, SessionContext, SessionProvider, SigningIn as SignInForm, SignOutButton, SigningUp as SignUpForm, SignedIn, SignedOut, SlackSignInButton as Slack, TenantSelector, UserInfo, XSignInButton as X, useEmailSignIn, useMe, useMultiFactor, useResetPassword, useSession, useSignIn, useSignUp, useTenantId, useTenants };
452
+ export { type AuthenticatorSetup, AzureSignInButton as Azure, type ChallengeRedirect, DiscordSignInButton as Discord, Email, type EmailSetup, EmailSigningIn as EmailSignIn, EmailSignInButton, type EnrollMfaProps, type EnrollmentError, GitHubSignInButton as GitHub, GoogleSSOButton as Google, HubSpotSignInButton as HubSpot, LinkedInSignInButton as LinkedIn, type MfaMethod, type MfaSetup, SetupAuthenticator as MultiFactorAuthenticator, ChallengeContent as MultiFactorChallenge, SetupEmail as MultiFactorEmail, MultiFactorVerify, OktaSignInButton as Okta, Password, ResetPasswordForm as PasswordResetForm, ResetPasswordForm$1 as PasswordResetRequestForm, SessionContext, SessionProvider, SigningIn as SignInForm, SignOutButton, SigningUp as SignUpForm, SignedIn, SignedOut, SlackSignInButton as Slack, TenantSelector, UserInfo, XSignInButton as X, clearMfaChallenge, readMfaChallenge, storeMfaChallenge, useEmailSignIn, useMe, useMultiFactor, useResetPassword, useSession, useSignIn, useSignUp, useTenantId, useTenants };