@atzentis/auth-react 0.0.15 → 0.0.16

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.ts CHANGED
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
4
  import * as _atzentis_auth_sdk from '@atzentis/auth-sdk';
5
- import { AuthClient, User, Session, AuthError, LoginAlert, ITokenStorage, ApiKey, CreateApiKeyRequest, UpdateApiKeyRequest, GetOAuthUrlRequest, LoginCredentials, UsernameLoginCredentials, RequestPasswordResetRequest, ResetPasswordRequest, SendMagicLinkRequest, SendVerificationEmailRequest, SignupData, VerifyEmailRequest, VerifyMagicLinkRequest, VerifyOAuthCodeRequest, Device, LoginEvent, ListLoginEventsRequest, Organization, CreateOrganizationRequest, UpdateOrganizationRequest, ListMembersRequest, UpdateMemberRequest, InviteMemberRequest, ListInvitationsRequest, AcceptInvitationRequest, DeclineInvitationRequest, DeviceSession, RevokeAllSessionsOptions, UserUpdate, ConnectOAuthRequest, OAuthProvider } from '@atzentis/auth-sdk';
5
+ import { AuthClient, User, Session, AuthError, LoginAlert, ITokenStorage, ApiKey, CreateApiKeyRequest, UpdateApiKeyRequest, GetOAuthUrlRequest, LoginCredentials, UsernameLoginCredentials, RequestPasswordResetRequest, ResetPasswordRequest, SendMagicLinkRequest, SendVerificationEmailRequest, SignupData, VerifyEmailRequest, VerifyMagicLinkRequest, VerifyOAuthCodeRequest, Device, LoginEvent, ListLoginEventsRequest, Organization, CreateOrganizationRequest, UpdateOrganizationRequest, ListMembersRequest, UpdateMemberRequest, InviteMemberRequest, ListInvitationsRequest, AcceptInvitationRequest, DeclineInvitationRequest, Passkey, DeviceSession, RevokeAllSessionsOptions, UserUpdate, ConnectOAuthRequest, OAuthProvider } from '@atzentis/auth-sdk';
6
6
  import { z } from 'zod';
7
7
 
8
8
  /**
@@ -195,6 +195,8 @@ declare const authLocalization: {
195
195
  CHANGE_PASSWORD_DESCRIPTION: string;
196
196
  /** @default "Password has been changed" */
197
197
  CHANGE_PASSWORD_SUCCESS: string;
198
+ /** @default "Changing password..." */
199
+ CHANGING_PASSWORD: string;
198
200
  /** @default "Forgot Password" */
199
201
  FORGOT_PASSWORD: string;
200
202
  /** @default "Send reset link" */
@@ -215,6 +217,18 @@ declare const authLocalization: {
215
217
  SET_PASSWORD: string;
216
218
  /** @default "Click the button to receive an email to set your password" */
217
219
  SET_PASSWORD_DESCRIPTION: string;
220
+ /** @default "Change Username" */
221
+ CHANGE_USERNAME: string;
222
+ /** @default "Your unique username" */
223
+ CHANGE_USERNAME_DESCRIPTION: string;
224
+ /** @default "Username available" */
225
+ USERNAME_AVAILABLE_STATUS: string;
226
+ /** @default "Username is taken" */
227
+ USERNAME_TAKEN_STATUS: string;
228
+ /** @default "Checking..." */
229
+ CHECKING_AVAILABILITY: string;
230
+ /** @default "Username updated" */
231
+ USERNAME_UPDATED: string;
218
232
  /** @default "Check your email" */
219
233
  CHECK_YOUR_EMAIL: string;
220
234
  /** @default "Resend in {{seconds}}s" */
@@ -261,6 +275,18 @@ declare const authLocalization: {
261
275
  SESSIONS: string;
262
276
  /** @default "Manage your active sessions" */
263
277
  SESSIONS_DESCRIPTION: string;
278
+ /** @default "Revoke" */
279
+ REVOKE_SESSION: string;
280
+ /** @default "Revoke all other sessions" */
281
+ REVOKE_ALL_OTHER_SESSIONS: string;
282
+ /** @default "Session revoked" */
283
+ SESSION_REVOKED: string;
284
+ /** @default "All other sessions revoked" */
285
+ ALL_SESSIONS_REVOKED: string;
286
+ /** @default "No other sessions" */
287
+ NO_OTHER_SESSIONS: string;
288
+ /** @default "Loading sessions..." */
289
+ LOADING_SESSIONS: string;
264
290
  /** @default "Trust" */
265
291
  TRUST_DEVICE: string;
266
292
  /** @default "Untrust" */
@@ -353,10 +379,26 @@ declare const authLocalization: {
353
379
  DELETE_AVATAR: string;
354
380
  /** @default "Upload Avatar" */
355
381
  UPLOAD_AVATAR: string;
382
+ /** @default "Avatar updated" */
383
+ AVATAR_UPDATED: string;
384
+ /** @default "Avatar deleted" */
385
+ AVATAR_DELETED: string;
386
+ /** @default "Click to upload" */
387
+ CLICK_TO_UPLOAD: string;
388
+ /** @default "File too large" */
389
+ FILE_TOO_LARGE: string;
390
+ /** @default "Max file size:" */
391
+ MAX_FILE_SIZE: string;
356
392
  /** @default "Email" */
357
393
  EMAIL: string;
358
394
  /** @default "Name" */
359
395
  NAME: string;
396
+ /** @default "Update Name" */
397
+ UPDATE_NAME: string;
398
+ /** @default "Your display name" */
399
+ UPDATE_NAME_DESCRIPTION: string;
400
+ /** @default "Name updated" */
401
+ NAME_UPDATED: string;
360
402
  /** @default "Two-Factor" */
361
403
  TWO_FACTOR: string;
362
404
  /** @default "Two-Factor Authentication" */
@@ -385,6 +427,142 @@ declare const authLocalization: {
385
427
  USE_AUTHENTICATOR: string;
386
428
  /** @default "Enter backup code" */
387
429
  BACKUP_CODE_PLACEHOLDER: string;
430
+ /** @default "Scan this QR code with your authenticator app" */
431
+ SCAN_QR_CODE: string;
432
+ /** @default "Or enter this code manually" */
433
+ MANUAL_ENTRY_CODE: string;
434
+ /** @default "Enter the code from your authenticator" */
435
+ ENTER_CODE_TO_VERIFY: string;
436
+ /** @default "Copy all codes" */
437
+ COPY_BACKUP_CODES: string;
438
+ /** @default "Codes copied" */
439
+ BACKUP_CODES_COPIED: string;
440
+ /** @default "Enter your password to disable two-factor" */
441
+ CONFIRM_DISABLE_2FA: string;
442
+ /** @default "Two-factor enabled" */
443
+ TWO_FACTOR_SETUP_SUCCESS: string;
444
+ /** @default "Status" */
445
+ STATUS: string;
446
+ /** @default "Enabled" */
447
+ ENABLED: string;
448
+ /** @default "Disabled" */
449
+ DISABLED: string;
450
+ /** @default "Enable" */
451
+ ENABLE: string;
452
+ /** @default "Disable" */
453
+ DISABLE: string;
454
+ /** @default "Back" */
455
+ BACK: string;
456
+ /** @default "Next" */
457
+ NEXT: string;
458
+ /** @default "Finish" */
459
+ FINISH: string;
460
+ /** @default "Change Email" */
461
+ CHANGE_EMAIL: string;
462
+ /** @default "Enter a new email address" */
463
+ CHANGE_EMAIL_DESCRIPTION: string;
464
+ /** @default "Current email" */
465
+ CURRENT_EMAIL: string;
466
+ /** @default "New email" */
467
+ NEW_EMAIL_PLACEHOLDER: string;
468
+ /** @default "Verification email sent to your new address" */
469
+ CHANGE_EMAIL_SENT: string;
470
+ /** @default "Connected Accounts" */
471
+ CONNECTED_PROVIDERS: string;
472
+ /** @default "Manage linked sign-in methods" */
473
+ CONNECTED_PROVIDERS_DESCRIPTION: string;
474
+ /** @default "Connect" */
475
+ CONNECT_PROVIDER: string;
476
+ /** @default "Disconnect" */
477
+ DISCONNECT_PROVIDER: string;
478
+ /** @default "No accounts connected" */
479
+ NO_PROVIDERS_CONNECTED: string;
480
+ /** @default "Provider disconnected" */
481
+ PROVIDER_DISCONNECTED: string;
482
+ /** @default "Connected on" */
483
+ CONNECTED_ON: string;
484
+ /** @default "Passkeys" */
485
+ PASSKEYS: string;
486
+ /** @default "Manage your passkeys for passwordless sign-in" */
487
+ PASSKEYS_DESCRIPTION: string;
488
+ /** @default "Register passkey" */
489
+ REGISTER_PASSKEY: string;
490
+ /** @default "Remove" */
491
+ REMOVE_PASSKEY: string;
492
+ /** @default "Passkey name" */
493
+ PASSKEY_NAME: string;
494
+ /** @default "No passkeys registered" */
495
+ NO_PASSKEYS: string;
496
+ /** @default "Your browser doesn't support passkeys" */
497
+ WEBAUTHN_NOT_SUPPORTED: string;
498
+ /** @default "Passkey registered" */
499
+ PASSKEY_REGISTERED: string;
500
+ /** @default "Passkey removed" */
501
+ PASSKEY_REMOVED: string;
502
+ /** @default "Loading passkeys..." */
503
+ LOADING_PASSKEYS: string;
504
+ /** @default "Created" */
505
+ CREATED: string;
506
+ /** @default "Last used" */
507
+ LAST_USED_DATE: string;
508
+ /** @default "Never" */
509
+ NEVER: string;
510
+ /** @default "Are you sure you want to remove this passkey?" */
511
+ CONFIRM_REMOVE_PASSKEY: string;
512
+ /** @default "Registering..." */
513
+ REGISTERING_PASSKEY: string;
514
+ /** @default "Removing..." */
515
+ REMOVING_PASSKEY: string;
516
+ /** @default "Delete Account" */
517
+ DELETE_ACCOUNT: string;
518
+ /** @default "Permanently delete your account and all data" */
519
+ DELETE_ACCOUNT_WARNING: string;
520
+ /** @default "Type \"{{phrase}}\" to confirm" */
521
+ TYPE_TO_CONFIRM: string;
522
+ /** @default "delete my account" */
523
+ DEFAULT_CONFIRM_PHRASE: string;
524
+ /** @default "Confirm deletion" */
525
+ CONFIRM_DELETION: string;
526
+ /** @default "Deleting account..." */
527
+ DELETING_ACCOUNT: string;
528
+ /** @default "Reason for leaving (optional)" */
529
+ DELETE_REASON: string;
530
+ /** @default "API Keys" */
531
+ API_KEYS: string;
532
+ /** @default "Manage your API keys" */
533
+ API_KEYS_DESCRIPTION: string;
534
+ /** @default "Create API key" */
535
+ CREATE_API_KEY: string;
536
+ /** @default "Revoke" */
537
+ REVOKE_API_KEY: string;
538
+ /** @default "Key name" */
539
+ KEY_NAME: string;
540
+ /** @default "Scopes" */
541
+ KEY_SCOPES: string;
542
+ /** @default "Expires" */
543
+ KEY_EXPIRES: string;
544
+ /** @default "Copy this key now — it won't be shown again" */
545
+ KEY_CREATED_WARNING: string;
546
+ /** @default "Copy key" */
547
+ COPY_KEY: string;
548
+ /** @default "Key copied" */
549
+ KEY_COPIED: string;
550
+ /** @default "No API keys" */
551
+ NO_API_KEYS: string;
552
+ /** @default "30 days" */
553
+ EXPIRES_30_DAYS: string;
554
+ /** @default "90 days" */
555
+ EXPIRES_90_DAYS: string;
556
+ /** @default "1 year" */
557
+ EXPIRES_1_YEAR: string;
558
+ /** @default "Loading API keys..." */
559
+ LOADING_API_KEYS: string;
560
+ /** @default "my-api-key" */
561
+ KEY_NAME_PLACEHOLDER: string;
562
+ /** @default "Account Settings" */
563
+ ACCOUNT_SETTINGS: string;
564
+ /** @default "Danger Zone" */
565
+ DANGER_ZONE: string;
388
566
  /** @default "Passwords do not match" */
389
567
  PASSWORDS_DO_NOT_MATCH: string;
390
568
  /** @default "Password is required" */
@@ -589,6 +767,15 @@ declare function useOrganizations(): {
589
767
  leave: (orgId: string) => Promise<void>;
590
768
  };
591
769
 
770
+ declare function usePasskeys(): {
771
+ passkeys: Passkey[];
772
+ isLoading: boolean;
773
+ error: AuthError | null;
774
+ refresh: () => Promise<void>;
775
+ register: (name: string) => Promise<_atzentis_auth_sdk.RegisterPasskeyResponse>;
776
+ remove: (passkeyId: string) => Promise<void>;
777
+ };
778
+
592
779
  declare function usePhone(): {
593
780
  isSending: boolean;
594
781
  isVerifying: boolean;
@@ -779,6 +966,85 @@ interface RecoverAccountFormProps {
779
966
  resendCooldown?: number;
780
967
  className?: string;
781
968
  }
969
+ interface ChangePasswordCardProps {
970
+ className?: string;
971
+ onError?: (error: AuthError) => void;
972
+ onSuccess?: () => void;
973
+ }
974
+ interface UpdateNameCardProps {
975
+ onSuccess?: (user: User) => void;
976
+ onError?: (error: AuthError) => void;
977
+ className?: string;
978
+ }
979
+ interface ChangeEmailCardProps {
980
+ redirectUrl: string;
981
+ onSuccess?: () => void;
982
+ onError?: (error: AuthError) => void;
983
+ resendCooldown?: number;
984
+ className?: string;
985
+ }
986
+ interface UpdateUsernameCardProps {
987
+ onSuccess?: (user: User) => void;
988
+ onError?: (error: AuthError) => void;
989
+ className?: string;
990
+ }
991
+ interface UpdateAvatarCardProps {
992
+ onUpload: (file: File) => Promise<string>;
993
+ onSuccess?: (user: User) => void;
994
+ onError?: (error: AuthError) => void;
995
+ maxSizeMB?: number;
996
+ className?: string;
997
+ }
998
+ interface SessionsCardProps {
999
+ onSessionRevoked?: (sessionId: string) => void;
1000
+ className?: string;
1001
+ }
1002
+ interface ProvidersCardProps {
1003
+ availableProviders: OAuthProvider[];
1004
+ oauthRedirectUri: string;
1005
+ onConnect?: (provider: OAuthProvider) => void;
1006
+ onDisconnect?: (provider: string) => void;
1007
+ onError?: (error: AuthError) => void;
1008
+ className?: string;
1009
+ }
1010
+ interface PasskeysCardProps {
1011
+ onRegistered?: (passkey: Passkey) => void;
1012
+ onRemoved?: (passkeyId: string) => void;
1013
+ onError?: (error: AuthError) => void;
1014
+ className?: string;
1015
+ }
1016
+ interface TwoFactorCardProps {
1017
+ onEnabled?: () => void;
1018
+ onDisabled?: () => void;
1019
+ onError?: (error: AuthError) => void;
1020
+ className?: string;
1021
+ }
1022
+ interface DeleteAccountCardProps {
1023
+ onDeleted?: () => void;
1024
+ onError?: (error: AuthError) => void;
1025
+ confirmationPhrase?: string;
1026
+ className?: string;
1027
+ }
1028
+ interface ApiKeysCardProps {
1029
+ availableScopes?: string[];
1030
+ onCreated?: (apiKey: _atzentis_auth_sdk.ApiKey) => void;
1031
+ onRevoked?: (keyId: string) => void;
1032
+ onError?: (error: AuthError) => void;
1033
+ className?: string;
1034
+ }
1035
+ type AccountViewSection = "/account" | "/security" | "/sessions" | "/providers" | "/api-keys" | "/danger";
1036
+ interface AccountViewProps {
1037
+ section: string;
1038
+ sections?: Partial<Record<AccountViewSection, string>>;
1039
+ fallback?: ReactNode;
1040
+ onSectionChange?: (section: string) => void;
1041
+ oauthProviders?: OAuthProvider[];
1042
+ oauthRedirectUri?: string;
1043
+ redirectUrl?: string;
1044
+ onUpload?: (file: File) => Promise<string>;
1045
+ availableScopes?: string[];
1046
+ className?: string;
1047
+ }
782
1048
  interface LoadingBoundaryProps {
783
1049
  children: ReactNode;
784
1050
  spinner?: ReactNode;
@@ -801,6 +1067,81 @@ interface AuthViewProps {
801
1067
  className?: string;
802
1068
  }
803
1069
 
1070
+ /**
1071
+ * AccountView — Section-based settings page orchestrator.
1072
+ * Renders navigation sidebar and the appropriate settings card group.
1073
+ *
1074
+ * @example
1075
+ * // Next.js App Router:
1076
+ * import { AccountView } from "@atzentis/auth-react";
1077
+ *
1078
+ * export default function SettingsPage({ params }) {
1079
+ * const section = `/${params.section || "account"}`;
1080
+ * return (
1081
+ * <AccountView
1082
+ * section={section}
1083
+ * onSectionChange={(s) => router.push(`/settings${s}`)}
1084
+ * redirectUrl="/settings/account"
1085
+ * onUpload={async (file) => uploadToR2(file)}
1086
+ * />
1087
+ * );
1088
+ * }
1089
+ */
1090
+ declare function AccountView({ section, sections, fallback, onSectionChange, oauthProviders, oauthRedirectUri, redirectUrl, onUpload, availableScopes, className, }: AccountViewProps): react_jsx_runtime.JSX.Element;
1091
+
1092
+ /**
1093
+ * Default section mapping for AccountView component.
1094
+ * Maps logical settings sections to URL paths.
1095
+ *
1096
+ * @example
1097
+ * // Use in Next.js App Router:
1098
+ * <AccountView section={pathname} sections={accountViewSections} />
1099
+ *
1100
+ * // Override specific sections:
1101
+ * <AccountView
1102
+ * section={pathname}
1103
+ * sections={{ ...accountViewSections, "/account": "/profile" }}
1104
+ * />
1105
+ */
1106
+ declare const accountViewSections: Record<AccountViewSection, string>;
1107
+
1108
+ interface AccountSettingsCardsProps {
1109
+ redirectUrl?: string;
1110
+ onUpload?: (file: File) => Promise<string>;
1111
+ onSuccess?: (user: User) => void;
1112
+ onError?: (error: AuthError) => void;
1113
+ className?: string;
1114
+ }
1115
+ declare function AccountSettingsCards({ redirectUrl, onUpload, onSuccess, onError, className, }: AccountSettingsCardsProps): react_jsx_runtime.JSX.Element;
1116
+
1117
+ declare function ApiKeysCard({ availableScopes, onCreated, onRevoked, onError, className, }: ApiKeysCardProps): react_jsx_runtime.JSX.Element;
1118
+
1119
+ declare function ChangeEmailCard({ redirectUrl, onSuccess, onError, resendCooldown, className, }: ChangeEmailCardProps): react_jsx_runtime.JSX.Element;
1120
+
1121
+ declare function ChangePasswordCard({ onSuccess, onError, className }: ChangePasswordCardProps): react_jsx_runtime.JSX.Element;
1122
+
1123
+ declare function DeleteAccountCard({ onDeleted, onError, confirmationPhrase, className, }: DeleteAccountCardProps): react_jsx_runtime.JSX.Element;
1124
+
1125
+ declare function PasskeysCard({ onRegistered, onRemoved, onError, className }: PasskeysCardProps): react_jsx_runtime.JSX.Element;
1126
+
1127
+ declare function ProvidersCard({ availableProviders, oauthRedirectUri: _oauthRedirectUri, onConnect, onDisconnect, onError, className, }: ProvidersCardProps): react_jsx_runtime.JSX.Element;
1128
+
1129
+ interface SecuritySettingsCardsProps {
1130
+ onError?: (error: AuthError) => void;
1131
+ className?: string;
1132
+ }
1133
+ declare function SecuritySettingsCards({ onError, className }: SecuritySettingsCardsProps): react_jsx_runtime.JSX.Element;
1134
+
1135
+ declare function SessionsCard({ onSessionRevoked, className }: SessionsCardProps): react_jsx_runtime.JSX.Element;
1136
+
1137
+ declare function TwoFactorCard({ onEnabled, onDisabled, onError, className }: TwoFactorCardProps): react_jsx_runtime.JSX.Element;
1138
+
1139
+ declare function UpdateAvatarCard({ onUpload, onSuccess, onError, maxSizeMB, className, }: UpdateAvatarCardProps): react_jsx_runtime.JSX.Element;
1140
+
1141
+ declare function UpdateNameCard({ onSuccess, onError, className }: UpdateNameCardProps): react_jsx_runtime.JSX.Element;
1142
+
1143
+ declare function UpdateUsernameCard({ onSuccess, onError, className }: UpdateUsernameCardProps): react_jsx_runtime.JSX.Element;
1144
+
804
1145
  declare function AccountSwitcher({ showAddAccount, onSwitch, onAddAccount, maxAccounts, className, }: AccountSwitcherProps): react_jsx_runtime.JSX.Element;
805
1146
 
806
1147
  declare function SessionGuard({ children, fallback, loadingFallback, freshRequired, freshThreshold, requiredRole, className, }: SessionGuardProps): react_jsx_runtime.JSX.Element;
@@ -879,6 +1220,38 @@ declare function OrganizationMenu({ showCreateNew, currentOrgId, onSwitch, onCre
879
1220
 
880
1221
  declare function UserMenu({ showOrganization, menuItems, className }: UserMenuProps): react_jsx_runtime.JSX.Element | null;
881
1222
 
1223
+ declare const changeEmailSchema: z.ZodObject<{
1224
+ email: z.ZodString;
1225
+ }, "strip", z.ZodTypeAny, {
1226
+ email: string;
1227
+ }, {
1228
+ email: string;
1229
+ }>;
1230
+ type ChangeEmailFormData = z.infer<typeof changeEmailSchema>;
1231
+
1232
+ declare const changePasswordSchema: z.ZodEffects<z.ZodObject<{
1233
+ confirmPassword: z.ZodString;
1234
+ currentPassword: z.ZodString;
1235
+ newPassword: z.ZodString;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ confirmPassword: string;
1238
+ currentPassword: string;
1239
+ newPassword: string;
1240
+ }, {
1241
+ confirmPassword: string;
1242
+ currentPassword: string;
1243
+ newPassword: string;
1244
+ }>, {
1245
+ confirmPassword: string;
1246
+ currentPassword: string;
1247
+ newPassword: string;
1248
+ }, {
1249
+ confirmPassword: string;
1250
+ currentPassword: string;
1251
+ newPassword: string;
1252
+ }>;
1253
+ type ChangePasswordFormData = z.infer<typeof changePasswordSchema>;
1254
+
882
1255
  declare const credentialLoginSchema: z.ZodObject<{
883
1256
  identity: z.ZodString;
884
1257
  password: z.ZodString;
@@ -1002,17 +1375,17 @@ declare const recoverNewPasswordSchema: z.ZodEffects<z.ZodObject<{
1002
1375
  newPassword: z.ZodString;
1003
1376
  confirmPassword: z.ZodString;
1004
1377
  }, "strip", z.ZodTypeAny, {
1005
- newPassword: string;
1006
1378
  confirmPassword: string;
1007
- }, {
1008
1379
  newPassword: string;
1380
+ }, {
1009
1381
  confirmPassword: string;
1010
- }>, {
1011
1382
  newPassword: string;
1383
+ }>, {
1012
1384
  confirmPassword: string;
1013
- }, {
1014
1385
  newPassword: string;
1386
+ }, {
1015
1387
  confirmPassword: string;
1388
+ newPassword: string;
1016
1389
  }>;
1017
1390
  type RecoverNewPasswordFormData = z.infer<typeof recoverNewPasswordSchema>;
1018
1391
  declare const recoverPhoneSchema: z.ZodObject<{
@@ -1029,17 +1402,17 @@ declare const resetPasswordSchema: z.ZodEffects<z.ZodObject<{
1029
1402
  newPassword: z.ZodString;
1030
1403
  confirmPassword: z.ZodString;
1031
1404
  }, "strip", z.ZodTypeAny, {
1032
- newPassword: string;
1033
1405
  confirmPassword: string;
1034
- }, {
1035
1406
  newPassword: string;
1407
+ }, {
1036
1408
  confirmPassword: string;
1037
- }>, {
1038
1409
  newPassword: string;
1410
+ }>, {
1039
1411
  confirmPassword: string;
1040
- }, {
1041
1412
  newPassword: string;
1413
+ }, {
1042
1414
  confirmPassword: string;
1415
+ newPassword: string;
1043
1416
  }>;
1044
1417
  type ResetPasswordFormData = z.infer<typeof resetPasswordSchema>;
1045
1418
 
@@ -1090,6 +1463,24 @@ declare const backupCodeSchema: z.ZodObject<{
1090
1463
  }>;
1091
1464
  type BackupCodeFormData = z.infer<typeof backupCodeSchema>;
1092
1465
 
1466
+ declare const updateNameSchema: z.ZodObject<{
1467
+ name: z.ZodString;
1468
+ }, "strip", z.ZodTypeAny, {
1469
+ name: string;
1470
+ }, {
1471
+ name: string;
1472
+ }>;
1473
+ type UpdateNameFormData = z.infer<typeof updateNameSchema>;
1474
+
1475
+ declare const updateUsernameSchema: z.ZodObject<{
1476
+ username: z.ZodString;
1477
+ }, "strip", z.ZodTypeAny, {
1478
+ username: string;
1479
+ }, {
1480
+ username: string;
1481
+ }>;
1482
+ type UpdateUsernameFormData = z.infer<typeof updateUsernameSchema>;
1483
+
1093
1484
  declare function getInitials(name: string): string;
1094
1485
 
1095
1486
  type RiskLevel = "low" | "medium" | "high";
@@ -1103,4 +1494,4 @@ declare const RISK_COLORS: Record<RiskLevel, string>;
1103
1494
  */
1104
1495
  declare function toAuthError(error: unknown): AuthError;
1105
1496
 
1106
- export { AUTH_ERROR_CODES, AccountSwitcher, type AccountSwitcherProps, AuthContext, type AuthContextValue, type AuthLocalization, AuthProvider, type AuthProviderProps, AuthView, type AuthViewPath, type AuthViewProps, type BackupCodeFormData, type CredentialLoginFormData, DeviceList, type DeviceListProps, EmailOTPForm, type EmailOTPFormProps, type EmailOtpCodeFormData, type EmailOtpEmailFormData, EmailVerificationForm, type EmailVerificationFormProps, ForgotPasswordForm, type ForgotPasswordFormData, type ForgotPasswordFormProps, LoadingBoundary, type LoadingBoundaryProps, LocalizationContext, type LocalizationContextValue, LoginActivityFeed, type LoginActivityFeedProps, LoginForm, type LoginFormProps, MagicLinkForm, type MagicLinkFormData, type MagicLinkFormProps, OAuthButton, type OAuthButtonProps, OrganizationMenu, type OrganizationMenuProps, type OtpVerifyFormData$1 as OtpVerifyFormData, PhoneLoginForm, type PhoneLoginFormData, type PhoneLoginFormProps, type PhoneNumberFormData, type OtpVerifyFormData as PhoneOtpVerifyFormData, type PhonePasswordFormData, RISK_COLORS, RecoverAccountForm, type RecoverAccountFormProps, type RecoverCodeFormData, type RecoverEmailFormData, type RecoverNewPasswordFormData, type RecoverPhoneFormData, type RecoveryMethod, ResetPasswordForm, type ResetPasswordFormData, type ResetPasswordFormProps, type RiskLevel, SessionGuard, type SessionGuardProps, SignupForm, type SignupFormData, type SignupFormProps, type TotpFormData, TwoFactorForm, type TwoFactorFormProps, UserMenu, type UserMenuProps, authLocalization, authViewPaths, backupCodeSchema, credentialLoginSchema, emailOtpCodeSchema, emailOtpEmailSchema, forgotPasswordSchema, getInitials, getLocalizedError, getRiskLevel, isEmail, magicLinkSchema, maskEmail, otpVerifySchema$1 as otpVerifySchema, phoneLoginSchema, phoneNumberSchema, otpVerifySchema as phoneOtpVerifySchema, phonePasswordSchema, recoverCodeSchema, recoverEmailSchema, recoverNewPasswordSchema, recoverPhoneSchema, resetPasswordSchema, signupSchema, toAuthError, totpSchema, useApiKeys, useAuth, useAuthContext, useAuthLocalization, useDevices, useLoginActivity, useOrganizations, usePhone, useSession, useSessions, useUser };
1497
+ export { AUTH_ERROR_CODES, AccountSettingsCards, type AccountSettingsCardsProps, AccountSwitcher, type AccountSwitcherProps, AccountView, type AccountViewProps, type AccountViewSection, ApiKeysCard, type ApiKeysCardProps, AuthContext, type AuthContextValue, type AuthLocalization, AuthProvider, type AuthProviderProps, AuthView, type AuthViewPath, type AuthViewProps, type BackupCodeFormData, ChangeEmailCard, type ChangeEmailCardProps, type ChangeEmailFormData, ChangePasswordCard, type ChangePasswordCardProps, type ChangePasswordFormData, type CredentialLoginFormData, DeleteAccountCard, type DeleteAccountCardProps, DeviceList, type DeviceListProps, EmailOTPForm, type EmailOTPFormProps, type EmailOtpCodeFormData, type EmailOtpEmailFormData, EmailVerificationForm, type EmailVerificationFormProps, ForgotPasswordForm, type ForgotPasswordFormData, type ForgotPasswordFormProps, LoadingBoundary, type LoadingBoundaryProps, LocalizationContext, type LocalizationContextValue, LoginActivityFeed, type LoginActivityFeedProps, LoginForm, type LoginFormProps, MagicLinkForm, type MagicLinkFormData, type MagicLinkFormProps, OAuthButton, type OAuthButtonProps, OrganizationMenu, type OrganizationMenuProps, type OtpVerifyFormData$1 as OtpVerifyFormData, PasskeysCard, type PasskeysCardProps, PhoneLoginForm, type PhoneLoginFormData, type PhoneLoginFormProps, type PhoneNumberFormData, type OtpVerifyFormData as PhoneOtpVerifyFormData, type PhonePasswordFormData, ProvidersCard, type ProvidersCardProps, RISK_COLORS, RecoverAccountForm, type RecoverAccountFormProps, type RecoverCodeFormData, type RecoverEmailFormData, type RecoverNewPasswordFormData, type RecoverPhoneFormData, type RecoveryMethod, ResetPasswordForm, type ResetPasswordFormData, type ResetPasswordFormProps, type RiskLevel, SecuritySettingsCards, type SecuritySettingsCardsProps, SessionGuard, type SessionGuardProps, SessionsCard, type SessionsCardProps, SignupForm, type SignupFormData, type SignupFormProps, type TotpFormData, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateNameCard, type UpdateNameCardProps, type UpdateNameFormData, UpdateUsernameCard, type UpdateUsernameCardProps, type UpdateUsernameFormData, UserMenu, type UserMenuProps, accountViewSections, authLocalization, authViewPaths, backupCodeSchema, changeEmailSchema, changePasswordSchema, credentialLoginSchema, emailOtpCodeSchema, emailOtpEmailSchema, forgotPasswordSchema, getInitials, getLocalizedError, getRiskLevel, isEmail, magicLinkSchema, maskEmail, otpVerifySchema$1 as otpVerifySchema, phoneLoginSchema, phoneNumberSchema, otpVerifySchema as phoneOtpVerifySchema, phonePasswordSchema, recoverCodeSchema, recoverEmailSchema, recoverNewPasswordSchema, recoverPhoneSchema, resetPasswordSchema, signupSchema, toAuthError, totpSchema, updateNameSchema, updateUsernameSchema, useApiKeys, useAuth, useAuthContext, useAuthLocalization, useDevices, useLoginActivity, useOrganizations, usePasskeys, usePhone, useSession, useSessions, useUser };