import { ClassValue } from 'clsx'; import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React$1 from 'react'; import { ReactNode, ComponentType, ComponentProps } from 'react'; import { LucideIcon } from 'lucide-react'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { Session, User as User$1, Account } from 'better-auth'; import { Organization, Member } from 'better-auth/plugins/organization'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import { BetterFetchError } from '@better-fetch/fetch'; declare const authLocalization: { INVALID_USERNAME_OR_PASSWORD: string; EMAIL_NOT_VERIFIED: string; UNEXPECTED_ERROR: string; USERNAME_IS_ALREADY_TAKEN: string; USERNAME_TOO_SHORT: string; USERNAME_TOO_LONG: string; INVALID_USERNAME: string; OTP_NOT_ENABLED: string; OTP_HAS_EXPIRED: string; TOTP_NOT_ENABLED: string; TWO_FACTOR_NOT_ENABLED: string; BACKUP_CODES_NOT_ENABLED: string; INVALID_BACKUP_CODE: string; INVALID_CODE: string; TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: string; INVALID_TWO_FACTOR_COOKIE: string; INVALID_PHONE_NUMBER: string; PHONE_NUMBER_EXIST: string; INVALID_PHONE_NUMBER_OR_PASSWORD: string; OTP_NOT_FOUND: string; OTP_EXPIRED: string; INVALID_OTP: string; PHONE_NUMBER_NOT_VERIFIED: string; CHALLENGE_NOT_FOUND: string; YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: string; FAILED_TO_VERIFY_REGISTRATION: string; PASSKEY_NOT_FOUND: string; AUTHENTICATION_FAILED: string; UNABLE_TO_CREATE_SESSION: string; FAILED_TO_UPDATE_PASSKEY: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: string; YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: string; ORGANIZATION_ALREADY_EXISTS: string; ORGANIZATION_NOT_FOUND: string; USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: string; NO_ACTIVE_ORGANIZATION: string; USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: string; MEMBER_NOT_FOUND: string; ROLE_NOT_FOUND: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: string; TEAM_ALREADY_EXISTS: string; TEAM_NOT_FOUND: string; YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: string; YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: string; USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: string; INVITATION_NOT_FOUND: string; YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: string; YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: string; INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: string; FAILED_TO_RETRIEVE_INVITATION: string; YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: string; UNABLE_TO_REMOVE_LAST_TEAM: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: string; ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: string; YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: string; INVITATION_LIMIT_REACHED: string; INVALID_SESSION_TOKEN: string; PASSWORD_COMPROMISED: string; INVALID_OAUTH_CONFIGURATION: string; INVALID_EMAIL: string; USER_NOT_FOUND: string; TOO_MANY_ATTEMPTS: string; MISSING_SECRET_KEY: string; SERVICE_UNAVAILABLE: string; VERIFICATION_FAILED: string; MISSING_RESPONSE: string; UNKNOWN_ERROR: string; INVALID_METADATA_TYPE: string; REFILL_AMOUNT_AND_INTERVAL_REQUIRED: string; REFILL_INTERVAL_AND_AMOUNT_REQUIRED: string; USER_BANNED: string; UNAUTHORIZED_SESSION: string; KEY_NOT_FOUND: string; KEY_DISABLED: string; KEY_EXPIRED: string; USAGE_EXCEEDED: string; KEY_NOT_RECOVERABLE: string; EXPIRES_IN_IS_TOO_SMALL: string; EXPIRES_IN_IS_TOO_LARGE: string; INVALID_REMAINING: string; INVALID_PREFIX_LENGTH: string; INVALID_NAME_LENGTH: string; METADATA_DISABLED: string; RATE_LIMIT_EXCEEDED: string; NO_VALUES_TO_UPDATE: string; KEY_DISABLED_EXPIRATION: string; INVALID_API_KEY: string; INVALID_USER_ID_FROM_API_KEY: string; INVALID_API_KEY_GETTER_RETURN_TYPE: string; SERVER_ONLY_PROPERTY: string; FAILED_TO_CREATE_USER: string; COULD_NOT_CREATE_SESSION: string; ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: string; USER_ALREADY_EXISTS: string; YOU_CANNOT_BAN_YOURSELF: string; YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: string; YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: string; YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: string; YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: string; YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: string; YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: string; YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: string; BANNED_USER: string; FAILED_TO_CREATE_SESSION: string; FAILED_TO_UPDATE_USER: string; FAILED_TO_GET_SESSION: string; INVALID_PASSWORD: string; INVALID_EMAIL_OR_PASSWORD: string; SOCIAL_ACCOUNT_ALREADY_LINKED: string; PROVIDER_NOT_FOUND: string; INVALID_TOKEN: string; ID_TOKEN_NOT_SUPPORTED: string; FAILED_TO_GET_USER_INFO: string; USER_EMAIL_NOT_FOUND: string; PASSWORD_TOO_SHORT: string; PASSWORD_TOO_LONG: string; EMAIL_CAN_NOT_BE_UPDATED: string; CREDENTIAL_ACCOUNT_NOT_FOUND: string; SESSION_EXPIRED: string; FAILED_TO_UNLINK_LAST_ACCOUNT: string; ACCOUNT_NOT_FOUND: string; USER_ALREADY_HAS_PASSWORD: string; /** @default "App" */ APP: string; /** @default "Account" */ ACCOUNT: string; /** @default "Accounts" */ ACCOUNTS: string; /** @default "Manage your currently signed in accounts." */ ACCOUNTS_DESCRIPTION: string; /** @default "Sign in to an additional account." */ ACCOUNTS_INSTRUCTIONS: string; /** @default "Add Account" */ ADD_ACCOUNT: string; /** @default "Add Passkey" */ ADD_PASSKEY: string; /** @default "Already have an account?" */ ALREADY_HAVE_AN_ACCOUNT: string; /** @default "Avatar" */ AVATAR: string; /** @default "Click on the avatar to upload a custom one from your files." */ AVATAR_DESCRIPTION: string; /** @default "An avatar is optional but strongly recommended." */ AVATAR_INSTRUCTIONS: string; /** @default "Backup code is required" */ BACKUP_CODE_REQUIRED: string; /** @default "Backup Codes" */ BACKUP_CODES: string; /** @default "Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method." */ BACKUP_CODES_DESCRIPTION: string; /** @default "Backup Code." */ BACKUP_CODE_PLACEHOLDER: string; /** @default "Backup Code" */ BACKUP_CODE: string; /** @default "Cancel" */ CANCEL: string; /** @default "Change Password" */ CHANGE_PASSWORD: string; /** @default "Enter your current password and a new password." */ CHANGE_PASSWORD_DESCRIPTION: string; /** @default "Please use 8 characters at minimum." */ CHANGE_PASSWORD_INSTRUCTIONS: string; /** @default "Your password has been changed." */ CHANGE_PASSWORD_SUCCESS: string; /** @default "Confirm Password" */ CONFIRM_PASSWORD: string; /** @default "Confirm Password" */ CONFIRM_PASSWORD_PLACEHOLDER: string; /** @default "Confirm password is required" */ CONFIRM_PASSWORD_REQUIRED: string; /** @default "Continue with Authenticator" */ CONTINUE_WITH_AUTHENTICATOR: string; /** @default "Copied to clipboard" */ COPIED_TO_CLIPBOARD: string; /** @default "Copy to clipboard" */ COPY_TO_CLIPBOARD: string; /** @default "Copy all codes" */ COPY_ALL_CODES: string; /** @default "Continue" */ CONTINUE: string; /** @default "Loading..." */ LOADING: string; /** @default "Current Password" */ CURRENT_PASSWORD: string; /** @default "Current Password" */ CURRENT_PASSWORD_PLACEHOLDER: string; /** @default "Current Session" */ CURRENT_SESSION: string; /** @default "Delete" */ DELETE: string; /** @default "Delete Avatar" */ DELETE_AVATAR: string; /** @default "Delete Account" */ DELETE_ACCOUNT: string; /** @default "Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution." */ DELETE_ACCOUNT_DESCRIPTION: string; /** @default "Please confirm the deletion of your account. This action is not reversible, so please continue with caution." */ DELETE_ACCOUNT_INSTRUCTIONS: string; /** @default "Please check your email to verify the deletion of your account." */ DELETE_ACCOUNT_VERIFY: string; /** @default "Your account has been deleted." */ DELETE_ACCOUNT_SUCCESS: string; /** @default "Disable Two-Factor" */ DISABLE_TWO_FACTOR: string; /** @default "Choose a provider to login to your account" */ DISABLED_CREDENTIALS_DESCRIPTION: string; /** @default "Don't have an account?" */ DONT_HAVE_AN_ACCOUNT: string; /** @default "Done" */ DONE: string; /** @default "Email" */ EMAIL: string; /** @default "Enter the email address you want to use to log in." */ EMAIL_DESCRIPTION: string; /** @default "Please enter a valid email address." */ EMAIL_INSTRUCTIONS: string; /** @default "Email is the same" */ EMAIL_IS_THE_SAME: string; /** @default "m@example.com" */ EMAIL_PLACEHOLDER: string; /** @default "Email address is required" */ EMAIL_REQUIRED: string; /** @default "Please check your email to verify the change." */ EMAIL_VERIFY_CHANGE: string; /** @default "Please check your email for the verification link." */ EMAIL_VERIFICATION: string; /** @default "Enable Two-Factor" */ ENABLE_TWO_FACTOR: string; /** @default "is invalid" */ IS_INVALID: string; /** @default "is required" */ IS_REQUIRED: string; /** @default "is the same" */ IS_THE_SAME: string; /** @default "Forgot authenticator?" */ FORGOT_AUTHENTICATOR: string; /** @default "Forgot Password" */ FORGOT_PASSWORD: string; /** @default "Send reset link" */ FORGOT_PASSWORD_ACTION: string; /** @default "Enter your email to reset your password" */ FORGOT_PASSWORD_DESCRIPTION: string; /** @default "Check your email for the password reset link." */ FORGOT_PASSWORD_EMAIL: string; /** @default "Forgot your password?" */ FORGOT_PASSWORD_LINK: string; /** @default "Link" */ LINK: string; /** @default "Magic Link" */ MAGIC_LINK: string; /** @default "Send magic link" */ MAGIC_LINK_ACTION: string; /** @default "Enter your email to receive a magic link" */ MAGIC_LINK_DESCRIPTION: string; /** @default "Check your email for the magic link" */ MAGIC_LINK_EMAIL: string; /** @default "Email Code" */ EMAIL_OTP: string; /** @default "Send code" */ EMAIL_OTP_SEND_ACTION: string; /** @default "Verify code" */ EMAIL_OTP_VERIFY_ACTION: string; /** @default "Enter your email to receive a code" */ EMAIL_OTP_DESCRIPTION: string; /** @default "Please check your email for the verification code." */ EMAIL_OTP_VERIFICATION_SENT: string; /** @default "Name" */ NAME: string; /** @default "Please enter your full name, or a display name." */ NAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ NAME_INSTRUCTIONS: string; /** @default "Name" */ NAME_PLACEHOLDER: string; /** @default "New Password" */ NEW_PASSWORD: string; /** @default "New Password" */ NEW_PASSWORD_PLACEHOLDER: string; /** @default "New password is required" */ NEW_PASSWORD_REQUIRED: string; /** @default "One-Time Password" */ ONE_TIME_PASSWORD: string; /** @default "Or continue with" */ OR_CONTINUE_WITH: string; /** @default "Passkey" */ PASSKEY: string; /** @default "Passkeys" */ PASSKEYS: string; /** @default "Manage your passkeys for secure access." */ PASSKEYS_DESCRIPTION: string; /** @default "Securely access your account without a password." */ PASSKEYS_INSTRUCTIONS: string; /** @default "Personal Account" */ PERSONAL_ACCOUNT: string; /** @default "API Keys" */ API_KEYS: string; /** @default "Manage your API keys for secure access." */ API_KEYS_DESCRIPTION: string; /** @default "Generate API keys to access your account programmatically." */ API_KEYS_INSTRUCTIONS: string; /** @default "Create API Key" */ CREATE_API_KEY: string; /** @default "Enter a unique name for your API key to differentiate it from other keys." */ CREATE_API_KEY_DESCRIPTION: string; /** @default "New API Key" */ API_KEY_NAME_PLACEHOLDER: string; /** @default "API Key Created" */ API_KEY_CREATED: string; /** @default "Please copy your API key and store it in a safe place. For security reasons we cannot show it again." */ CREATE_API_KEY_SUCCESS: string; /** @default "Never Expires" */ NEVER_EXPIRES: string; /** @default "Expires" */ EXPIRES: string; /** @default "No Expiration" */ NO_EXPIRATION: string; /** @default "Create Organization" */ CREATE_ORGANIZATION: string; /** @default "Organization" */ ORGANIZATION: string; /** @default "Name" */ ORGANIZATION_NAME: string; /** @default "Acme Inc." */ ORGANIZATION_NAME_PLACEHOLDER: string; /** @default "This is your organization's visible name." */ ORGANIZATION_NAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ ORGANIZATION_NAME_INSTRUCTIONS: string; /** @default "Slug URL" */ ORGANIZATION_SLUG: string; /** @default "This is your organization's URL namespace." */ ORGANIZATION_SLUG_DESCRIPTION: string; /** @default "Please use 48 characters at maximum." */ ORGANIZATION_SLUG_INSTRUCTIONS: string; /** @default "acme-inc" */ ORGANIZATION_SLUG_PLACEHOLDER: string; /** @default "Organization created successfully" */ CREATE_ORGANIZATION_SUCCESS: string; /** @default "Password" */ PASSWORD: string; /** @default "Password" */ PASSWORD_PLACEHOLDER: string; /** @default "Password is required" */ PASSWORD_REQUIRED: string; /** @default "Passwords do not match" */ PASSWORDS_DO_NOT_MATCH: string; /** @default "Providers" */ PROVIDERS: string; /** @default "Connect your account with a third-party service." */ PROVIDERS_DESCRIPTION: string; /** @default "Recover Account" */ RECOVER_ACCOUNT: string; /** @default "Recover account" */ RECOVER_ACCOUNT_ACTION: string; /** @default "Please enter a backup code to access your account" */ RECOVER_ACCOUNT_DESCRIPTION: string; /** @default "Remember me" */ REMEMBER_ME: string; /** @default "Resend code" */ RESEND_CODE: string; /** @default "Resend verification email" */ RESEND_VERIFICATION_EMAIL: string; /** @default "Reset Password" */ RESET_PASSWORD: string; /** @default "Save new password" */ RESET_PASSWORD_ACTION: string; /** @default "Enter your new password below" */ RESET_PASSWORD_DESCRIPTION: string; /** @default "Password reset successfully" */ RESET_PASSWORD_SUCCESS: string; /** @default "Request failed" */ REQUEST_FAILED: string; /** @default "Revoke" */ REVOKE: string; /** @default "Delete API Key" */ DELETE_API_KEY: string; /** @default "Are you sure you want to delete this API key?" */ DELETE_API_KEY_CONFIRM: string; /** @default "API Key" */ API_KEY: string; /** @default "Sign In" */ SIGN_IN: string; /** @default "Login" */ SIGN_IN_ACTION: string; /** @default "Enter your email below to login to your account" */ SIGN_IN_DESCRIPTION: string; /** @default "Enter your username or email below to login to your account" */ SIGN_IN_USERNAME_DESCRIPTION: string; /** @default "Sign in with" */ SIGN_IN_WITH: string; /** @default "Sign in anonymously" */ SIGN_IN_ANONYMOUSLY: string; /** @default "Continue as guest" */ ANONYMOUS_SIGN_IN: string; /** @default "Sign in with Ethereum" */ SIGN_IN_WITH_ETHEREUM: string; /** @default "Connect your Ethereum wallet" */ SIWE_SIGN_IN: string; /** @default "Sign Out" */ SIGN_OUT: string; /** @default "Sign Up" */ SIGN_UP: string; /** @default "Create an account" */ SIGN_UP_ACTION: string; /** @default "Enter your information to create an account" */ SIGN_UP_DESCRIPTION: string; /** @default "Check your email for the verification link." */ SIGN_UP_EMAIL: string; /** @default "Sessions" */ SESSIONS: string; /** @default "Manage your active sessions and revoke access." */ SESSIONS_DESCRIPTION: string; /** @default "Set Password" */ SET_PASSWORD: string; /** @default "Click the button below to receive an email to set up a password for your account." */ SET_PASSWORD_DESCRIPTION: string; /** @default "Settings" */ SETTINGS: string; /** @default "Save" */ SAVE: string; /** @default "Security" */ SECURITY: string; /** @default "Switch Account" */ SWITCH_ACCOUNT: string; /** @default "Trust this device" */ TRUST_DEVICE: string; /** @default "Two-Factor" */ TWO_FACTOR: string; /** @default "Verify code" */ TWO_FACTOR_ACTION: string; /** @default "Please enter your one-time password to continue" */ TWO_FACTOR_DESCRIPTION: string; /** @default "Add an extra layer of security to your account." */ TWO_FACTOR_CARD_DESCRIPTION: string; /** @default "Please enter your password to disable 2FA." */ TWO_FACTOR_DISABLE_INSTRUCTIONS: string; /** @default "Please enter your password to enable 2FA" */ TWO_FACTOR_ENABLE_INSTRUCTIONS: string; /** @default "Two-factor authentication has been enabled" */ TWO_FACTOR_ENABLED: string; /** @default "Two-Factor Authentication has been disabled" */ TWO_FACTOR_DISABLED: string; /** @default "Two-Factor Authentication" */ TWO_FACTOR_PROMPT: string; /** @default "Scan the QR Code with your Authenticator" */ TWO_FACTOR_TOTP_LABEL: string; /** @default "Send verification code" */ SEND_VERIFICATION_CODE: string; /** @default "Unlink" */ UNLINK: string; /** @default "Updated successfully" */ UPDATED_SUCCESSFULLY: string; /** @default "Username" */ USERNAME: string; /** @default "Enter the username you want to use to log in." */ USERNAME_DESCRIPTION: string; /** @default "Please use 32 characters at maximum." */ USERNAME_INSTRUCTIONS: string; /** @default "Username" */ USERNAME_PLACEHOLDER: string; /** @default "Username or email" */ SIGN_IN_USERNAME_PLACEHOLDER: string; /** @default "Verify Your Email" */ VERIFY_YOUR_EMAIL: string; /** @default "Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend." */ VERIFY_YOUR_EMAIL_DESCRIPTION: string; /** @default "Go back" */ GO_BACK: string; /** @default "Your session is not fresh. Please sign in again." */ SESSION_NOT_FRESH: string; /** @default "Upload Avatar" */ UPLOAD_AVATAR: string; /** @default "Logo" */ LOGO: string; /** @default "Click on the logo to upload a custom one from your files." */ LOGO_DESCRIPTION: string; /** @default "A logo is optional but strongly recommended." */ LOGO_INSTRUCTIONS: string; /** @default "Upload" */ UPLOAD: string; /** @default "Upload Logo" */ UPLOAD_LOGO: string; /** @default "Delete Logo" */ DELETE_LOGO: string; /** @default "Privacy Policy" */ PRIVACY_POLICY: string; /** @default "Terms of Service" */ TERMS_OF_SERVICE: string; /** @default "This site is protected by reCAPTCHA." */ PROTECTED_BY_RECAPTCHA: string; /** @default "By continuing, you agree to the" */ BY_CONTINUING_YOU_AGREE: string; /** @default "User" */ USER: string; /** @default "Organizations" */ ORGANIZATIONS: string; /** @default "Manage your organizations and memberships." */ ORGANIZATIONS_DESCRIPTION: string; /** @default "Create an organization to collaborate with other users." */ ORGANIZATIONS_INSTRUCTIONS: string; /** @default "Leave Organization" */ LEAVE_ORGANIZATION: string; /** @default "Are you sure you want to leave this organization?" */ LEAVE_ORGANIZATION_CONFIRM: string; /** @default "You have successfully left the organization." */ LEAVE_ORGANIZATION_SUCCESS: string; /** @default "Manage Organization" */ MANAGE_ORGANIZATION: string; /** @default "Remove Member" */ REMOVE_MEMBER: string; /** @default "Are you sure you want to remove this member from the organization?" */ REMOVE_MEMBER_CONFIRM: string; /** @default "Member removed successfully" */ REMOVE_MEMBER_SUCCESS: string; /** @default "Invite Member" */ INVITE_MEMBER: string; /** @default "Members" */ MEMBERS: string; /** @default "Add or remove members and manage their roles." */ MEMBERS_DESCRIPTION: string; /** @default "Invite new members to your organization." */ MEMBERS_INSTRUCTIONS: string; /** @default "Send an invitation to add a new member to your organization." */ INVITE_MEMBER_DESCRIPTION: string; /** @default "Role" */ ROLE: string; /** @default "Select a role" */ SELECT_ROLE: string; /** @default "Admin" */ ADMIN: string; /** @default "Member" */ MEMBER: string; /** @default "Guest" */ GUEST: string; /** @default "Owner" */ OWNER: string; /** @default "Update the role for this member" */ UPDATE_ROLE_DESCRIPTION: string; /** @default "Update Role" */ UPDATE_ROLE: string; /** @default "Member role updated successfully" */ MEMBER_ROLE_UPDATED: string; /** @default "Send Invitation" */ SEND_INVITATION: string; /** @default "Invitation sent successfully" */ SEND_INVITATION_SUCCESS: string; /** @default "Pending Invitations" */ PENDING_INVITATIONS: string; /** @default "Manage pending invitations to your organization." */ PENDING_INVITATIONS_DESCRIPTION: string; /** @default "Invitations you've received from organizations." */ PENDING_USER_INVITATIONS_DESCRIPTION: string; /** @default "Cancel Invitation" */ CANCEL_INVITATION: string; /** @default "Invitation cancelled successfully" */ INVITATION_CANCELLED: string; /** @default "Accept Invitation" */ ACCEPT_INVITATION: string; /** @default "You have been invited to join an organization." */ ACCEPT_INVITATION_DESCRIPTION: string; /** @default "Invitation accepted successfully" */ INVITATION_ACCEPTED: string; /** @default "Invitation rejected successfully" */ INVITATION_REJECTED: string; /** @default "Accept" */ ACCEPT: string; /** @default "Reject" */ REJECT: string; /** @default "This invitation has expired" */ INVITATION_EXPIRED: string; /** @default "Delete Organization" */ DELETE_ORGANIZATION: string; /** @default "Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution." */ DELETE_ORGANIZATION_DESCRIPTION: string; /** @default "Organization deleted successfully" */ DELETE_ORGANIZATION_SUCCESS: string; /** @default "Enter the organization slug to continue:" */ DELETE_ORGANIZATION_INSTRUCTIONS: string; /** @default "Organization slug is required" */ SLUG_REQUIRED: string; /** @default "The slug does not match" */ SLUG_DOES_NOT_MATCH: string; /** @default "Unknown" */ UNKNOWN: string; /** @default "Enter Your Device Code" */ DEVICE_AUTH_TITLE: string; /** @default "Enter the code shown on your device to continue." */ DEVICE_AUTH_DESCRIPTION: string; /** @default "Device Code" */ DEVICE_CODE_LABEL: string; /** @default "ABCD-1234" */ DEVICE_CODE_PLACEHOLDER: string; /** @default "Please enter a valid device code" */ DEVICE_CODE_REQUIRED: string; /** @default "Invalid or expired code" */ DEVICE_CODE_INVALID: string; /** @default "Auth client not configured" */ DEVICE_CODE_NO_CLIENT: string; /** @default "Format: XXXX-XXXX" */ DEVICE_CODE_FORMAT: string; /** @default "Continue" */ DEVICE_AUTH_SUBMIT: string; /** @default "Device Authorization Request" */ DEVICE_APPROVAL_TITLE: string; /** @default "A device is requesting access to your account." */ DEVICE_APPROVAL_DESCRIPTION: string; /** @default "Code" */ DEVICE_APPROVAL_CODE_LABEL: string; /** @default "Application" */ DEVICE_APPROVAL_APP_LABEL: string; /** @default "Requested Permissions" */ DEVICE_APPROVAL_SCOPES_LABEL: string; /** @default "Approve" */ DEVICE_APPROVE_BUTTON: string; /** @default "Deny" */ DEVICE_DENY_BUTTON: string; /** @default "Device approved successfully" */ DEVICE_APPROVED_SUCCESS: string; /** @default "Device denied" */ DEVICE_DENIED_SUCCESS: string; /** @default "Failed to approve device" */ DEVICE_APPROVE_ERROR: string; /** @default "Failed to deny device" */ DEVICE_DENY_ERROR: string; /** @default "Only approve if you initiated this request on your device." */ DEVICE_APPROVAL_NOTICE: string; /** @default "Sign In on Your Computer" */ DEVICE_DISPLAY_TITLE: string; /** @default "Follow the steps below to complete authentication" */ DEVICE_DISPLAY_DESCRIPTION: string; /** @default "Visit this URL:" */ DEVICE_DISPLAY_URL_LABEL: string; /** @default "Enter this code:" */ DEVICE_DISPLAY_CODE_LABEL: string; /** @default "Scan this QR code to authorize" */ DEVICE_SCAN_QR: string; /** @default "or scan QR code" */ DEVICE_OR_SCAN_QR: string; /** @default "Copy Code" */ DEVICE_COPY_CODE: string; /** @default "Copied!" */ COPIED: string; /** @default "Expires in" */ DEVICE_EXPIRES_IN: string; /** @default "Checking for approval..." */ DEVICE_POLLING_STATUS: string; /** @default "Approved! Redirecting..." */ DEVICE_APPROVED: string; /** @default "Code expired. Please try again." */ DEVICE_EXPIRED: string; /** @default "Access denied" */ DEVICE_ACCESS_DENIED: string; /** @default "SSO Configuration" */ SSO_CONFIG: string; /** @default "Configure SAML and OIDC single sign-on for your organization" */ SSO_CONFIG_DESCRIPTION: string; /** @default "Provider Type" */ SSO_PROVIDER_TYPE: string; /** @default "OIDC (OpenID Connect)" */ SSO_TYPE_OIDC: string; /** @default "SAML 2.0" */ SSO_TYPE_SAML: string; /** @default "Provider ID" */ SSO_PROVIDER_ID: string; /** @default "Unique identifier for this SSO provider" */ SSO_PROVIDER_ID_DESCRIPTION: string; /** @default "my-company-sso" */ SSO_PROVIDER_ID_PLACEHOLDER: string; /** @default "Issuer" */ SSO_ISSUER: string; /** @default "Identity provider issuer URL" */ SSO_ISSUER_DESCRIPTION: string; /** @default "https://idp.example.com" */ SSO_ISSUER_PLACEHOLDER: string; /** @default "Domain" */ SSO_DOMAIN: string; /** @default "Email domain for automatic provider matching" */ SSO_DOMAIN_DESCRIPTION: string; /** @default "example.com" */ SSO_DOMAIN_PLACEHOLDER: string; /** @default "Organization" */ SSO_ORGANIZATION: string; /** @default "Link to organization (optional)" */ SSO_ORGANIZATION_DESCRIPTION: string; /** @default "OIDC Configuration" */ SSO_OIDC_CONFIG: string; /** @default "Client ID" */ SSO_CLIENT_ID: string; /** @default "Client Secret" */ SSO_CLIENT_SECRET: string; /** @default "Authorization Endpoint" */ SSO_AUTH_ENDPOINT: string; /** @default "Token Endpoint" */ SSO_TOKEN_ENDPOINT: string; /** @default "JWKS Endpoint" */ SSO_JWKS_ENDPOINT: string; /** @default "Discovery Endpoint" */ SSO_DISCOVERY_ENDPOINT: string; /** @default "Scopes" */ SSO_SCOPES: string; /** @default "openid email profile" */ SSO_SCOPES_PLACEHOLDER: string; /** @default "Enable PKCE" */ SSO_PKCE_ENABLED: string; /** @default "Use PKCE for additional security" */ SSO_PKCE_DESCRIPTION: string; /** @default "SAML Configuration" */ SSO_SAML_CONFIG: string; /** @default "Entry Point" */ SSO_SAML_ENTRY_POINT: string; /** @default "SAML SSO login URL" */ SSO_SAML_ENTRY_POINT_DESCRIPTION: string; /** @default "Certificate" */ SSO_SAML_CERT: string; /** @default "IdP signing certificate (PEM format)" */ SSO_SAML_CERT_DESCRIPTION: string; /** @default "Callback URL" */ SSO_CALLBACK_URL: string; /** @default "SAML assertion consumer service URL" */ SSO_CALLBACK_URL_DESCRIPTION: string; /** @default "Entity ID / Audience" */ SSO_ENTITY_ID: string; /** @default "Service provider entity identifier" */ SSO_ENTITY_ID_DESCRIPTION: string; /** @default "IdP Metadata XML" */ SSO_IDP_METADATA: string; /** @default "Paste IdP metadata XML or upload file" */ SSO_IDP_METADATA_DESCRIPTION: string; /** @default "SP Metadata" */ SSO_SP_METADATA: string; /** @default "Service Provider metadata for IdP configuration" */ SSO_SP_METADATA_DESCRIPTION: string; /** @default "Advanced Options" */ SSO_ADVANCED_OPTIONS: string; /** @default "Show Advanced" */ SSO_SHOW_ADVANCED: string; /** @default "Hide Advanced" */ SSO_HIDE_ADVANCED: string; /** @default "Attribute Mapping" */ SSO_ATTRIBUTE_MAPPING: string; /** @default "Map SSO attributes to user fields" */ SSO_ATTRIBUTE_MAPPING_DESCRIPTION: string; /** @default "User ID Attribute" */ SSO_MAP_ID: string; /** @default "Email Attribute" */ SSO_MAP_EMAIL: string; /** @default "Name Attribute" */ SSO_MAP_NAME: string; /** @default "First Name Attribute" */ SSO_MAP_FIRST_NAME: string; /** @default "Last Name Attribute" */ SSO_MAP_LAST_NAME: string; /** @default "Email Verified Attribute" */ SSO_MAP_EMAIL_VERIFIED: string; /** @default "Profile Image Attribute" */ SSO_MAP_IMAGE: string; /** @default "Extra Fields (JSON)" */ SSO_EXTRA_FIELDS: string; /** @default "Map additional custom attributes as JSON" */ SSO_EXTRA_FIELDS_DESCRIPTION: string; /** @default "Test Connection" */ SSO_TEST_CONNECTION: string; /** @default "Testing..." */ SSO_TESTING: string; /** @default "Connection successful!" */ SSO_TEST_SUCCESS: string; /** @default "Connection failed" */ SSO_TEST_FAILED: string; /** @default "Copy SP Metadata" */ SSO_COPY_SP_METADATA: string; /** @default "Fetch SP Metadata" */ SSO_FETCH_SP_METADATA: string; /** @default "SSO provider created successfully" */ SSO_PROVIDER_CREATED: string; /** @default "SSO provider updated successfully" */ SSO_PROVIDER_UPDATED: string; /** @default "SSO provider deleted successfully" */ SSO_PROVIDER_DELETED: string; /** @default "Delete SSO Provider" */ SSO_DELETE_PROVIDER: string; /** @default "Are you sure? This will remove SSO authentication for this provider." */ SSO_DELETE_CONFIRM: string; /** @default "Upload File" */ SSO_UPLOAD_FILE: string; /** @default "Or paste metadata XML" */ SSO_PASTE_METADATA: string; }; type AuthLocalization = Partial; type PasswordValidation = { /** * Maximum password length */ maxLength?: number; /** * Minimum password length */ minLength?: number; /** * Password validation regex */ regex?: RegExp; }; declare function cn(...inputs: ClassValue[]): string; declare function getViewByPath(viewPaths: T, path?: string): Extract; /** * Better Auth Client Interface * Defines the minimal interface components need from the auth client * Works with any Better Auth client implementation (@convex-dev/better-auth, better-auth/react, etc.) */ interface BetterAuthSession { user: { id: string; email?: string; name?: string; image?: string; [key: string]: any; }; session: { id: string; userId: string; expiresAt: Date; [key: string]: any; }; [key: string]: any; } interface BetterAuthOrganization { id: string; name: string; slug?: string; logo?: string; metadata?: Record; createdAt?: Date; [key: string]: any; } interface BetterAuthClient { useSession: () => { data: BetterAuthSession | null; isPending: boolean; error?: Error; }; useListOrganizations: () => { data: BetterAuthOrganization[] | null; isPending: boolean; error?: Error; }; [key: string]: any; } declare const authViewPaths: { /** @default "callback" */ CALLBACK: string; /** @default "email-otp" */ EMAIL_OTP: string; /** @default "forgot-password" */ FORGOT_PASSWORD: string; /** @default "magic-link" */ MAGIC_LINK: string; /** @default "recover-account" */ RECOVER_ACCOUNT: string; /** @default "reset-password" */ RESET_PASSWORD: string; /** @default "sign-in" */ SIGN_IN: string; /** @default "sign-out" */ SIGN_OUT: string; /** @default "sign-up" */ SIGN_UP: string; /** @default "two-factor" */ TWO_FACTOR: string; /** @default "accept-invitation" */ ACCEPT_INVITATION: string; }; type AuthViewPaths = typeof authViewPaths; declare const accountViewPaths: { /** @default "settings" */ SETTINGS: string; /** @default "security" */ SECURITY: string; /** @default "api-keys" */ API_KEYS: string; /** @default "organizations" */ ORGANIZATIONS: string; }; type AccountViewPaths = typeof accountViewPaths; declare const organizationViewPaths: { /** @default "settings" */ SETTINGS: string; /** @default "members" */ MEMBERS: string; /** @default "api-keys" */ API_KEYS: string; }; type OrganizationViewPaths = typeof organizationViewPaths; type AuthViewPath = keyof AuthViewPaths; type AccountViewPath = keyof AccountViewPaths; type OrganizationViewPath = keyof OrganizationViewPaths; type AuthFormClassNames = { base?: string; button?: string; checkbox?: string; description?: string; error?: string; forgotPasswordLink?: string; icon?: string; input?: string; label?: string; otpInput?: string; otpInputContainer?: string; outlineButton?: string; primaryButton?: string; providerButton?: string; qrCode?: string; secondaryButton?: string; }; interface AuthFormProps { className?: string; classNames?: AuthFormClassNames; callbackURL?: string; isSubmitting?: boolean; localization?: Partial; pathname?: string; redirectTo?: string; view?: AuthViewPath; otpSeparators?: 0 | 1 | 2; setIsSubmitting?: (isSubmitting: boolean) => void; } declare function AuthForm({ className, classNames, callbackURL, isSubmitting, localization, pathname, redirectTo, view, otpSeparators, setIsSubmitting }: AuthFormProps): react_jsx_runtime.JSX.Element; type AuthViewClassNames = { base?: string; content?: string; description?: string; footer?: string; footerLink?: string; continueWith?: string; form?: AuthFormClassNames; header?: string; separator?: string; title?: string; }; interface AuthViewProps { className?: string; classNames?: AuthViewClassNames; callbackURL?: string; cardHeader?: ReactNode; localization?: AuthLocalization; path?: string; pathname?: string; redirectTo?: string; socialLayout?: "auto" | "horizontal" | "grid" | "vertical"; view?: keyof AuthViewPaths; otpSeparators?: 0 | 1 | 2; } declare function AuthView({ className, classNames, callbackURL, cardHeader, localization, path: pathProp, pathname, redirectTo, socialLayout: socialLayoutProp, view: viewProp, otpSeparators }: AuthViewProps): react_jsx_runtime.JSX.Element; /** * auth-callback * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ declare function AuthCallback({ redirectTo }: { redirectTo?: string; }): react_jsx_runtime.JSX.Element; interface PasskeyButtonProps { classNames?: AuthViewClassNames; isSubmitting?: boolean; localization: Partial; redirectTo?: string; setIsSubmitting?: (isSubmitting: boolean) => void; } declare function PasskeyButton({ classNames, isSubmitting, localization, redirectTo, setIsSubmitting }: PasskeyButtonProps): react_jsx_runtime.JSX.Element; /** * provider-icons * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ interface ProviderIconProps { className?: string; } type ProviderIcon = ComponentType; declare const socialProviders: readonly [{ readonly provider: "apple"; readonly name: "Apple"; readonly icon: ProviderIcon; }, { readonly provider: "discord"; readonly name: "Discord"; readonly icon: ProviderIcon; }, { readonly provider: "dropbox"; readonly name: "Dropbox"; readonly icon: ProviderIcon; }, { readonly provider: "facebook"; readonly name: "Facebook"; readonly icon: ProviderIcon; }, { readonly provider: "github"; readonly name: "GitHub"; readonly icon: ProviderIcon; }, { readonly provider: "gitlab"; readonly name: "GitLab"; readonly icon: ProviderIcon; }, { readonly provider: "google"; readonly name: "Google"; readonly icon: ProviderIcon; }, { readonly provider: "huggingface"; readonly name: "Hugging Face"; readonly icon: ProviderIcon; }, { readonly provider: "kick"; readonly name: "Kick"; readonly icon: ProviderIcon; }, { readonly provider: "linear"; readonly name: "Linear"; readonly icon: ProviderIcon; }, { readonly provider: "linkedin"; readonly name: "LinkedIn"; readonly icon: ProviderIcon; }, { readonly provider: "microsoft"; readonly name: "Microsoft"; readonly icon: ProviderIcon; }, { readonly provider: "notion"; readonly name: "Notion"; readonly icon: ProviderIcon; }, { readonly provider: "reddit"; readonly name: "Reddit"; readonly icon: ProviderIcon; }, { readonly provider: "roblox"; readonly name: "Roblox"; readonly icon: ProviderIcon; }, { readonly provider: "slack"; readonly name: "Slack"; readonly icon: ProviderIcon; }, { readonly provider: "spotify"; readonly name: "Spotify"; readonly icon: ProviderIcon; }, { readonly provider: "tiktok"; readonly name: "TikTok"; readonly icon: ProviderIcon; }, { readonly provider: "twitch"; readonly name: "Twitch"; readonly icon: ProviderIcon; }, { readonly provider: "vk"; readonly name: "VK"; readonly icon: ProviderIcon; }, { readonly provider: "twitter"; readonly name: "X"; readonly icon: ProviderIcon; }, { readonly provider: "zoom"; readonly name: "Zoom"; readonly icon: ProviderIcon; }]; type Provider = { provider: string; name: string; icon?: ProviderIcon; }; interface ProviderButtonProps { className?: string; classNames?: AuthViewClassNames; callbackURL?: string; isSubmitting: boolean; localization: Partial; other?: boolean; provider: Provider; redirectTo?: string; socialLayout: "auto" | "horizontal" | "grid" | "vertical"; setIsSubmitting: (isSubmitting: boolean) => void; } declare function ProviderButton({ className, classNames, callbackURL: callbackURLProp, isSubmitting, localization, other, provider, redirectTo: redirectToProp, socialLayout, setIsSubmitting }: ProviderButtonProps): react_jsx_runtime.JSX.Element; interface MagicLinkButtonProps { classNames?: AuthViewClassNames; isSubmitting?: boolean; localization: Partial; view: AuthViewPath; } declare function MagicLinkButton({ classNames, isSubmitting, localization, view }: MagicLinkButtonProps): react_jsx_runtime.JSX.Element; interface EmailOTPButtonProps { classNames?: AuthViewClassNames; isSubmitting?: boolean; localization: Partial; view: AuthViewPath; } declare function EmailOTPButton({ classNames, isSubmitting, localization, view }: EmailOTPButtonProps): react_jsx_runtime.JSX.Element; /** * one-tap * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ interface OneTapProps { localization: Partial; redirectTo?: string; } declare function OneTap({ localization, redirectTo }: OneTapProps): any; /** * sign-out * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ declare function SignOut(): react_jsx_runtime.JSX.Element; interface PhoneSignInFormProps { className?: string; classNames?: AuthFormClassNames; isSubmitting?: boolean; localization: Partial; redirectTo?: string; setIsSubmitting?: (isSubmitting: boolean) => void; passwordValidation?: PasswordValidation; } declare function PhoneSignInForm({ className, classNames, isSubmitting, localization, redirectTo, setIsSubmitting, passwordValidation }: PhoneSignInFormProps): react_jsx_runtime.JSX.Element; interface PhoneSignUpFormProps { className?: string; classNames?: AuthFormClassNames; isSubmitting?: boolean; localization: Partial; redirectTo?: string; setIsSubmitting?: (isSubmitting: boolean) => void; } declare function PhoneSignUpForm({ className, classNames, isSubmitting, localization, redirectTo, setIsSubmitting }: PhoneSignUpFormProps): react_jsx_runtime.JSX.Element; interface AnonymousSignInButtonProps { /** * Better Auth client instance */ authClient?: BetterAuthClient; /** * Callback fired on successful anonymous sign-in */ onSuccess?: (user: any) => void; /** * Callback fired on error */ onError?: (error: Error) => void; /** * Redirect URL after successful sign-in */ redirectTo?: string; /** * Button text * @default "Continue as Guest" */ children?: React$1.ReactNode; /** * Custom class name */ className?: string; /** * Button variant * @default "outline" */ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link"; /** * Button size * @default "default" */ size?: "default" | "sm" | "lg" | "icon"; /** * Localization strings */ localization?: { buttonText?: string; signingIn?: string; }; /** * Whether the component is in a submitting state */ isSubmitting?: boolean; /** * Callback to update the submitting state */ setIsSubmitting?: (isSubmitting: boolean) => void; } declare function AnonymousSignInButton({ authClient, onSuccess, onError, redirectTo, children, className, variant, size, localization, isSubmitting: isSubmittingProp, setIsSubmitting: setIsSubmittingProp, }: AnonymousSignInButtonProps): react_jsx_runtime.JSX.Element; interface LastLoginBadgeProps { /** * The authentication method that was last used * If not provided, will attempt to read from authClient */ method?: string; /** * Custom CSS class for the badge */ className?: string; /** * Badge variant * @default "secondary" */ variant?: "default" | "secondary" | "outline" | "destructive"; /** * Localization object for customizing text */ localization?: Partial; /** * Show provider icon alongside text * @default true */ showIcon?: boolean; /** * Custom text format * Use {provider} as placeholder for the provider name * @default "Last used" */ text?: string; } /** * LastLoginBadge Component * * Displays a badge indicating the last authentication method used by the user. * Integrates with Better Auth's Last Login Method plugin. * * @example * ```tsx * import { LastLoginBadge } from '@bettercone/ui'; * * export function SignInPage() { * return ( *
* *
* ); * } * ``` * * @example * With custom text * ```tsx * * ``` */ declare function LastLoginBadge({ method: methodProp, className, variant, localization: localizationProp, showIcon, text }: LastLoginBadgeProps): react_jsx_runtime.JSX.Element; interface DeviceAuthorizationCardProps { /** * Custom CSS class for the card */ className?: string; /** * URL to redirect to after successful code validation * The user_code will be appended as a query parameter * @default "/device/approve" */ redirectUrl?: string; /** * Callback when code is successfully validated * @param userCode - The validated user code */ onSuccess?: (userCode: string) => void; /** * Localization object for customizing text */ localization?: Partial; } /** * DeviceAuthorizationCard Component * * A card component that allows users to enter device authorization codes. * Used in the OAuth 2.0 Device Authorization Grant flow (RFC 8628). * Validates the code and redirects to the approval page. * * @example * ```tsx * import { DeviceAuthorizationCard } from '@bettercone/ui'; * * export function DevicePage() { * return ( * * ); * } * ``` * * @example * With custom redirect * ```tsx * console.log('Valid code:', code)} * /> * ``` */ declare function DeviceAuthorizationCard({ className, redirectUrl, onSuccess, localization: localizationProp, }: DeviceAuthorizationCardProps): react_jsx_runtime.JSX.Element; declare const Card: React$1.ForwardRefExoticComponent & React$1.RefAttributes>; declare const buttonVariants: (props?: { variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost"; size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg"; } & class_variance_authority_types.ClassProp) => string; declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"button"> & VariantProps & { asChild?: boolean; }): react_jsx_runtime.JSX.Element; /** * any-auth-client * Type for any Better Auth client */ interface AnyAuthClient { $Infer: { Session: { session: any; user: any; }; }; $fetch: (path: string, options?: any) => Promise; useSession: () => any; listAccounts: any; accountInfo: any; multiSession: any; listSessions: any; useListPasskeys: any; apiKey: any; useActiveOrganization: any; useListOrganizations: any; organization: any; updateUser: any; unlinkAccount: any; passkey: any; revokeSession: any; oneTap: any; signIn: any; signOut: any; twoFactor: any; requestPasswordReset: any; changePassword: any; deleteUser: any; emailOtp: any; resetPassword: any; signUp: any; phoneNumber: any; siwe: { nonce: (params: { walletAddress: string; chainId?: number; }) => Promise<{ data?: { nonce: string; }; error?: any; }>; verify: (params: { message: string; signature: string; walletAddress: string; chainId?: number; email?: string; fetchOptions?: any; }, callbacks?: { onSuccess?: () => void; onError?: (ctx: any) => void; }) => Promise; }; /** * Admin management (optional) * Available when using @better-auth/admin plugin * @see https://www.better-auth.com/docs/plugins/admin */ admin?: { /** * List users with pagination, search, and filtering */ listUsers: (params?: { searchValue?: string; searchField?: string; searchOperator?: "contains" | "starts_with" | "ends_with"; limit?: number; offset?: number; sortBy?: string; sortDirection?: "asc" | "desc"; filterBy?: Record; }) => Promise<{ data?: { users: any[]; total: number; }; error?: any; }>; /** * Ban a user */ banUser: (params: { userId: string; banReason?: string; banExpiresIn?: number; }) => Promise<{ data?: any; error?: any; }>; /** * Unban a user */ unbanUser: (params: { userId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Delete a user */ removeUser: (params: { userId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Impersonate a user */ impersonateUser: (params: { userId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Stop impersonating */ stopImpersonating: () => Promise<{ data?: any; error?: any; }>; }; /** * Device Authorization (optional) * Available when using @better-auth/device-authorization plugin * OAuth 2.0 Device Authorization Grant (RFC 8628) * @see https://www.better-auth.com/docs/plugins/device-authorization */ device?: { /** * Verify user code validity * @param params - Query parameters * @param params.query.user_code - The user code to verify */ (params: { query: { user_code: string; }; }): Promise<{ data?: { clientId?: string; scope?: string; }; error?: any; }>; /** * Request device and user codes * Initiates the device authorization flow */ code: (params: { client_id: string; scope?: string; }) => Promise<{ data?: { device_code: string; user_code: string; verification_uri: string; verification_uri_complete?: string; expires_in: number; interval: number; }; error?: { error: string; error_description?: string; }; }>; /** * Poll for access token * Device polls this endpoint to check authorization status */ token: (params: { grant_type: string; device_code: string; client_id: string; }) => Promise<{ data?: { access_token?: string; token_type?: string; expires_in?: number; }; error?: { error: "authorization_pending" | "slow_down" | "expired_token" | "access_denied" | "invalid_grant"; error_description?: string; }; }>; /** * Approve device authorization request * User must be authenticated to approve */ approve: (params: { userCode: string; }) => Promise<{ data?: any; error?: any; }>; /** * Deny device authorization request * User must be authenticated to deny */ deny: (params: { userCode: string; }) => Promise<{ data?: any; error?: any; }>; }; /** * SSO (Single Sign-On) (optional) * Available when using @better-auth/sso plugin * Supports OIDC, OAuth2, and SAML 2.0 providers * @see https://www.better-auth.com/docs/plugins/sso */ sso?: { /** * Register a new SSO provider (OIDC or SAML) */ register: (params: { providerId: string; issuer: string; domain: string; organizationId?: string; oidcConfig?: { clientId: string; clientSecret: string; authorizationEndpoint: string; tokenEndpoint: string; jwksEndpoint?: string; discoveryEndpoint?: string; scopes?: string[]; pkce?: boolean; mapping?: { id?: string; email?: string; emailVerified?: string; name?: string; image?: string; extraFields?: Record; }; }; samlConfig?: { entryPoint: string; cert: string; callbackUrl: string; audience?: string; wantAssertionsSigned?: boolean; signatureAlgorithm?: string; digestAlgorithm?: string; identifierFormat?: string; idpMetadata?: { metadata: string; privateKey?: string; privateKeyPass?: string; isAssertionEncrypted?: boolean; encPrivateKey?: string; encPrivateKeyPass?: string; }; spMetadata?: { metadata: string; binding?: string; privateKey?: string; privateKeyPass?: string; isAssertionEncrypted?: boolean; encPrivateKey?: string; encPrivateKeyPass?: string; }; mapping?: { id?: string; email?: string; name?: string; firstName?: string; lastName?: string; emailVerified?: string; extraFields?: Record; }; }; }) => Promise<{ data?: any; error?: any; }>; /** * List registered SSO providers */ listProviders: (params?: { domain?: string; organizationId?: string; }) => Promise<{ data?: Array<{ id: string; providerId: string; issuer: string; domain: string; organizationId?: string; userId: string; }>; error?: any; }>; /** * Get SSO provider details */ getProvider: (params: { providerId: string; }) => Promise<{ data?: { id: string; providerId: string; issuer: string; domain: string; oidcConfig?: any; samlConfig?: any; organizationId?: string; }; error?: any; }>; /** * Update SSO provider */ updateProvider: (params: { providerId: string; issuer?: string; domain?: string; oidcConfig?: any; samlConfig?: any; }) => Promise<{ data?: any; error?: any; }>; /** * Delete SSO provider */ deleteProvider: (params: { providerId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Test SSO connection */ testConnection: (params: { providerId: string; }) => Promise<{ data?: { success: boolean; message?: string; }; error?: any; }>; /** * Get SAML Service Provider metadata */ spMetadata: (params: { providerId: string; format?: "xml" | "json"; }) => Promise<{ data?: string | any; error?: any; }>; }; /** * OAuth2 / OIDC Provider (optional) * Available when using better-auth/plugins oidcProvider * Allows your app to act as an OAuth2/OIDC provider * @see https://www.better-auth.com/docs/plugins/oidc-provider */ oauth2?: { /** * Register a new OAuth2/OIDC client application * Supports RFC7591 compliant dynamic client registration */ register: (params: { redirect_uris: string[]; token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post"; grant_types?: Array<"authorization_code" | "implicit" | "password" | "client_credentials" | "refresh_token" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer">; response_types?: Array<"code" | "token">; client_name?: string; client_uri?: string; logo_uri?: string; scope?: string; contacts?: string[]; tos_uri?: string; policy_uri?: string; jwks_uri?: string; jwks?: Record; }) => Promise<{ data?: { client_id: string; client_secret?: string; client_name?: string; redirect_uris: string[]; grant_types?: string[]; response_types?: string[]; token_endpoint_auth_method?: string; }; error?: any; }>; /** * List registered OAuth2 clients */ listClients: () => Promise<{ data?: Array<{ id: string; clientId: string; name: string; type: string; redirectURLs: string[]; disabled: boolean; createdAt: Date; }>; error?: any; }>; /** * Get OAuth2 client details */ getClient: (params: { clientId: string; }) => Promise<{ data?: { id: string; clientId: string; name: string; type: string; redirectURLs: string[]; metadata?: any; disabled: boolean; }; error?: any; }>; /** * Update OAuth2 client */ updateClient: (params: { clientId: string; name?: string; redirectURLs?: string[]; disabled?: boolean; metadata?: any; }) => Promise<{ data?: any; error?: any; }>; /** * Delete OAuth2 client */ deleteClient: (params: { clientId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Revoke OAuth2 client (disable without deletion) */ revokeClient: (params: { clientId: string; }) => Promise<{ data?: any; error?: any; }>; /** * Handle OAuth2 consent * Accept or deny authorization request */ consent: (params: { accept: boolean; consent_code?: string; }) => Promise<{ data?: { redirect_uri?: string; }; error?: any; }>; /** * List active OAuth2 access tokens for current user */ listTokens: () => Promise<{ data?: Array<{ id: string; clientId: string; scopes: string[]; accessTokenExpiresAt: Date; createdAt: Date; }>; error?: any; }>; /** * Revoke OAuth2 access token */ revokeToken: (params: { tokenId: string; }) => Promise<{ data?: any; error?: any; }>; }; } /** * auth-client * Better Auth client type */ type AuthClient = AnyAuthClient; type User = any; /** * Profile type * Basic user profile information */ type Profile = User & { id: string; name?: string | null; email?: string | null; image?: string | null; emailVerified?: boolean; createdAt?: Date; updatedAt?: Date; }; interface UserViewClassNames { base?: string; avatar?: UserAvatarClassNames; content?: string; title?: string; subtitle?: string; skeleton?: string; } interface UserViewProps { className?: string; classNames?: UserViewClassNames; isPending?: boolean; size?: "sm" | "default" | "lg" | "icon-sm" | "icon-lg" | null; user?: Profile | null; /** * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; } interface UserButtonClassNames { base?: string; skeleton?: string; trigger?: { base?: string; avatar?: UserAvatarClassNames; user?: UserViewClassNames; skeleton?: string; }; content?: { base?: string; user?: UserViewClassNames; avatar?: UserAvatarClassNames; menuItem?: string; separator?: string; }; } interface UserButtonProps { className?: string; classNames?: UserButtonClassNames; align?: "center" | "start" | "end"; alignOffset?: number; side?: "top" | "right" | "bottom" | "left"; sideOffset?: number; additionalLinks?: { href: string; icon?: ReactNode; label: ReactNode; signedIn?: boolean; separator?: boolean; }[]; trigger?: ReactNode; disableDefaultLinks?: boolean; /** * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; } /** * Displays an interactive user button with dropdown menu functionality * * Renders a user interface element that can be displayed as either an icon or full button: * - Shows a user avatar or placeholder when in icon mode * - Displays user name and email with dropdown indicator in full mode * - Provides dropdown menu with authentication options (sign in/out, settings, etc.) * - Supports multi-session functionality for switching between accounts * - Can be customized with additional links and styling options */ declare function UserButton({ className, classNames, align, alignOffset, side, sideOffset, trigger, additionalLinks, disableDefaultLinks, localization: propLocalization, size, ...props }: UserButtonProps & ComponentProps): react_jsx_runtime.JSX.Element; declare function Avatar({ className, ...props }: React$1.ComponentProps): react_jsx_runtime.JSX.Element; interface UserAvatarClassNames { base?: string; image?: string; fallback?: string; fallbackIcon?: string; skeleton?: string; } interface UserAvatarProps { classNames?: UserAvatarClassNames; isPending?: boolean; size?: "sm" | "default" | "lg" | "xl" | "icon-sm" | "icon-lg" | null; user?: Profile | null; /** * @default authLocalization * @remarks `AuthLocalization` */ localization?: Partial; } /** * Displays a user avatar with image and fallback support * * Renders a user's avatar image when available, with appropriate fallbacks: * - Shows a skeleton when isPending is true * - Displays first two characters of user's name when no image is available * - Falls back to a generic user icon when neither image nor name is available */ declare function UserAvatar({ className, classNames, isPending, size, user, localization: propLocalization, ...props }: UserAvatarProps & ComponentProps): react_jsx_runtime.JSX.Element; type SettingsCardClassNames = { base?: string; avatar?: UserAvatarClassNames; button?: string; cell?: string; checkbox?: string; destructiveButton?: string; content?: string; description?: string; dialog?: { content?: string; footer?: string; header?: string; }; error?: string; footer?: string; header?: string; icon?: string; input?: string; instructions?: string; label?: string; primaryButton?: string; secondaryButton?: string; outlineButton?: string; skeleton?: string; title?: string; }; interface SettingsCardProps extends Omit, "title"> { children?: ReactNode; className?: string; classNames?: SettingsCardClassNames; title?: ReactNode; description?: ReactNode; instructions?: ReactNode; actionLabel?: ReactNode; isSubmitting?: boolean; disabled?: boolean; isPending?: boolean; optimistic?: boolean; variant?: "default" | "destructive"; size?: "default" | "compact" | "button-only"; icon?: LucideIcon; localization?: AuthLocalization; action?: () => Promise | unknown; } interface DeviceApprovalCardProps { /** * The user code from the device authorization request * Usually passed as a URL query parameter */ userCode: string; /** * Custom CSS class for the card */ className?: string; /** * Custom class names for sub-components */ classNames?: SettingsCardClassNames; /** * URL to redirect to after approval or denial * @default "/" */ redirectUrl?: string; /** * Callback when device is approved */ onApprove?: () => void; /** * Callback when device is denied */ onDeny?: () => void; /** * Whether to show client information if available * @default true */ showClientInfo?: boolean; /** * Localization object for customizing text */ localization?: Partial; } /** * DeviceApprovalCard Component * * Allows authenticated users to approve or deny device authorization requests. * Used in the OAuth 2.0 Device Authorization Grant flow (RFC 8628). * * @example * ```tsx * import { DeviceApprovalCard } from '@bettercone/ui'; * * export function DeviceApprovalPage({ searchParams }) { * return ( * * ); * } * ``` * * @example * With custom redirect * ```tsx * console.log('Approved')} * /> * ``` */ declare function DeviceApprovalCard({ userCode, className, classNames, redirectUrl, onApprove, onDeny, showClientInfo, localization: localizationProp, }: DeviceApprovalCardProps): react_jsx_runtime.JSX.Element; interface DeviceCodeDisplayProps { /** * The device code from the authorization request */ deviceCode: string; /** * The user-friendly code to display */ userCode: string; /** * The verification URI where users enter the code */ verificationUri: string; /** * Complete verification URI (includes user code as parameter) * Optional, for QR code generation */ verificationUriComplete?: string; /** * Time in seconds until the code expires */ expiresIn: number; /** * Custom CSS class for the card */ className?: string; /** * Show QR code for mobile scanning * @default false * Note: Requires QR code component to be installed */ showQRCode?: boolean; /** * Callback when code expires */ onExpired?: () => void; /** * Callback when authorization is successful */ onSuccess?: () => void; /** * Callback when authorization fails */ onError?: (error: string) => void; /** * Polling interval in seconds * @default 5 */ pollingInterval?: number; /** * Whether to automatically poll for authorization * @default true */ autoPoll?: boolean; /** * Localization object for customizing text */ localization?: Partial; } /** * DeviceCodeDisplay Component * * Displays device authorization codes for CLI applications, smart TVs, and IoT devices. * Shows a large, readable code and verification URL, with optional QR code. * Includes countdown timer and automatic polling for authorization status. * * @example * ```tsx * import { DeviceCodeDisplay } from '@bettercone/ui'; * * export function CLIAuthFlow() { * const { deviceCode, userCode, verificationUri, expiresIn } = await requestDeviceCode(); * * return ( * * ); * } * ``` * * @example * With QR code * ```tsx * * ``` */ declare function DeviceCodeDisplay({ deviceCode, userCode, verificationUri, verificationUriComplete, expiresIn, className, showQRCode, onExpired, onSuccess, onError, pollingInterval, autoPoll, localization: localizationProp, }: DeviceCodeDisplayProps): react_jsx_runtime.JSX.Element; interface PasskeyCellProps { className?: string; classNames?: SettingsCardClassNames; localization?: Partial; passkey: { id: string; createdAt: Date; }; } declare function PasskeyCell({ className, classNames, localization, passkey }: PasskeyCellProps): react_jsx_runtime.JSX.Element; interface PasskeysCardProps { className?: string; classNames?: SettingsCardClassNames; localization?: AuthLocalization; } declare function PasskeysCard({ className, classNames, localization }: PasskeysCardProps): react_jsx_runtime.JSX.Element; interface PasskeySetupWizardProps { className?: string; classNames?: { card?: string; header?: string; title?: string; description?: string; content?: string; footer?: string; button?: string; input?: string; label?: string; error?: string; step?: string; stepIcon?: string; stepText?: string; }; localization?: Partial; onSuccess?: () => void; onCancel?: () => void; defaultName?: string; defaultType?: "platform" | "cross-platform"; } declare function PasskeySetupWizard({ className, classNames, localization: localizationProp, onSuccess, onCancel, defaultName, defaultType }: PasskeySetupWizardProps): react_jsx_runtime.JSX.Element; interface TwoFactorCardProps { className?: string; classNames?: SettingsCardClassNames; localization?: AuthLocalization; } declare function TwoFactorCard({ className, classNames, localization }: TwoFactorCardProps): react_jsx_runtime.JSX.Element; declare function Dialog({ ...props }: React$1.ComponentProps): react_jsx_runtime.JSX.Element; interface TwoFactorPasswordDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; isTwoFactorEnabled: boolean; } declare function TwoFactorPasswordDialog({ classNames, onOpenChange, isTwoFactorEnabled, ...props }: TwoFactorPasswordDialogProps): react_jsx_runtime.JSX.Element; interface BackupCodesDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; backupCodes: string[]; } declare function BackupCodesDialog({ classNames, backupCodes, onOpenChange, ...props }: BackupCodesDialogProps): react_jsx_runtime.JSX.Element; interface ChangePasswordCardProps { className?: string; classNames?: SettingsCardClassNames; accounts?: { providerId: string; }[] | null; isPending?: boolean; localization?: AuthLocalization; skipHook?: boolean; passwordValidation?: PasswordValidation; } declare function ChangePasswordCard({ className, classNames, accounts, isPending, localization, skipHook, passwordValidation }: ChangePasswordCardProps): react_jsx_runtime.JSX.Element; interface SessionsCardProps { className?: string; classNames?: SettingsCardClassNames; localization?: Partial; } declare function SessionsCard({ className, classNames, localization }: SessionsCardProps): react_jsx_runtime.JSX.Element; /** * Refetch type * Used for refetching data in components */ type Refetch = () => void | Promise; interface SessionCellProps { className?: string; classNames?: SettingsCardClassNames; localization?: Partial; session: Session; refetch?: Refetch; } declare function SessionCell({ className, classNames, localization, session, refetch }: SessionCellProps): react_jsx_runtime.JSX.Element; declare function ChangeEmailCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element; interface PhoneNumberCardProps { className?: string; classNames?: SettingsCardClassNames; localization?: Partial; } declare function PhoneNumberCard({ className, classNames, localization }: PhoneNumberCardProps): react_jsx_runtime.JSX.Element; interface EmailVerificationBannerClassNames { alert?: string; button?: string; description?: string; error?: string; icon?: string; message?: string; title?: string; } interface EmailVerificationBannerProps { /** * Better Auth client instance */ authClient?: BetterAuthClient; /** * Whether the banner can be dismissed * @default true */ dismissible?: boolean; /** * Cooldown period in seconds before allowing resend * @default 60 */ cooldown?: number; /** * Email address to send verification to * If not provided, uses current user's email */ email?: string; /** * Callback URL after verification */ callbackURL?: string; /** * Callback when verification email is sent */ onResend?: () => void; /** * Callback when verification is successful */ onVerified?: () => void; /** * Callback when banner is dismissed */ onDismiss?: () => void; /** * Additional CSS classes */ className?: string; /** * Custom class names for specific parts */ classNames?: EmailVerificationBannerClassNames; /** * Custom localization strings */ localization?: { title?: string; description?: string; resendButton?: string; resendingButton?: string; dismissButton?: string; successMessage?: string; errorMessage?: string; cooldownMessage?: string; }; } /** * Email Verification Banner Component * * Displays a persistent banner to unverified users prompting them to verify their email. * Includes functionality to resend verification emails with cooldown protection. * * @example * ```tsx * console.log('Email sent')} * /> * ``` */ declare function EmailVerificationBanner({ authClient: providedAuthClient, dismissible, cooldown, email, callbackURL, onResend, onVerified, onDismiss, className, classNames, localization, }: EmailVerificationBannerProps): react_jsx_runtime.JSX.Element; interface AcceptInvitationCardProps { className?: string; classNames?: SettingsCardClassNames; localization?: Partial; } declare function AcceptInvitationCard({ className, classNames, localization: localizationProp }: AcceptInvitationCardProps): react_jsx_runtime.JSX.Element; interface OrganizationCardProps$2 extends SettingsCardProps { } declare function CreateOrganizationCard({ className, classNames, localization: localizationProp, size, icon, ...props }: OrganizationCardProps$2): react_jsx_runtime.JSX.Element; interface OrganizationCardProps$1 extends SettingsCardProps { organization?: Organization; slug?: string; } declare function DeleteOrganizationCard({ className, classNames, localization: localizationProp, slug, size, icon, ...props }: OrganizationCardProps$1): react_jsx_runtime.JSX.Element; interface OrganizationCardProps extends SettingsCardProps { organization: Organization; } declare function LeaveOrganizationCard({ className, classNames, localization: localizationProp, organization, size, icon, ...props }: OrganizationCardProps): react_jsx_runtime.JSX.Element; declare function OrganizationInvitationsCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: SettingsCardProps & { slug?: string; }): react_jsx_runtime.JSX.Element; interface OrganizationLogoCardProps extends ComponentProps { className?: string; classNames?: SettingsCardClassNames; localization?: AuthLocalization; slug?: string; } declare function OrganizationLogoCard({ className, classNames, localization: localizationProp, slug, ...props }: OrganizationLogoCardProps): react_jsx_runtime.JSX.Element; declare function OrganizationMembersCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: SettingsCardProps & { slug?: string; }): react_jsx_runtime.JSX.Element; interface OrganizationNameCardProps extends SettingsCardProps { slug?: string; } declare function OrganizationNameCard({ className, classNames, localization: localizationProp, slug, ...props }: OrganizationNameCardProps): react_jsx_runtime.JSX.Element; interface OrganizationSlugCardProps extends SettingsCardProps { slug?: string; } declare function OrganizationSlugCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: OrganizationSlugCardProps): react_jsx_runtime.JSX.Element; declare function OrganizationsCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element; declare function UserInvitationsCard({ className, classNames, localization: localizationProp, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element; interface CreateOrganizationDialogProps extends ComponentProps { className?: string; classNames?: SettingsCardClassNames; localization?: AuthLocalization; } declare function CreateOrganizationDialog({ className, classNames, localization: localizationProp, onOpenChange, ...props }: CreateOrganizationDialogProps): react_jsx_runtime.JSX.Element; interface DeleteOrganizationDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; organization: Organization; } declare function DeleteOrganizationDialog({ classNames, localization: localizationProp, onOpenChange, organization, ...props }: DeleteOrganizationDialogProps): react_jsx_runtime.JSX.Element; interface InviteMemberDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; organization: Organization; } declare function InviteMemberDialog({ classNames, localization: localizationProp, onOpenChange, organization, ...props }: InviteMemberDialogProps): react_jsx_runtime.JSX.Element; interface LeaveOrganizationDialogProps extends ComponentProps { className?: string; classNames?: SettingsCardClassNames; localization?: AuthLocalization; organization: Organization; } declare function LeaveOrganizationDialog({ organization, className, classNames, localization: localizationProp, onOpenChange, ...props }: LeaveOrganizationDialogProps): react_jsx_runtime.JSX.Element; interface RemoveMemberDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; member: Member & { user?: Partial | null; }; } declare function RemoveMemberDialog({ member, classNames, localization: localizationProp, onOpenChange, ...props }: RemoveMemberDialogProps): react_jsx_runtime.JSX.Element; /** * transfer-ownership-dialog * Transfer organization ownership to another member * Enhanced for @bettercone/ui */ interface TransferOwnershipDialogProps { className?: string; classNames?: { trigger?: string; dialog?: string; header?: string; title?: string; description?: string; content?: string; footer?: string; label?: string; select?: string; button?: string; }; organizationId?: string; onSuccess?: (newOwnerId: string) => void; onCancel?: () => void; children?: React.ReactNode; } declare function TransferOwnershipDialog({ className, classNames, organizationId: orgIdProp, onSuccess, onCancel, children }: TransferOwnershipDialogProps): react_jsx_runtime.JSX.Element; interface UpdateMemberRoleDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; member: Member & { user?: Partial | null; }; } declare function UpdateMemberRoleDialog({ member, classNames, localization: localizationProp, onOpenChange, ...props }: UpdateMemberRoleDialogProps): react_jsx_runtime.JSX.Element; /** * Invitation type * Type for organization invitations */ interface Invitation { id: string; email: string; role: string; status: string; organizationId: string; inviterId: string; expiresAt: Date; createdAt: Date; updatedAt: Date; } interface InvitationCellProps { className?: string; classNames?: SettingsCardClassNames; invitation: Invitation; localization?: AuthLocalization; organization: Organization; } declare function InvitationCell({ className, classNames, invitation, localization: localizationProp, organization }: InvitationCellProps): react_jsx_runtime.JSX.Element; interface MemberCellProps { className?: string; classNames?: SettingsCardClassNames; member: Member & { user?: Partial | null; }; localization?: AuthLocalization; hideActions?: boolean; } declare function MemberCell({ className, classNames, member, localization: localizationProp, hideActions }: MemberCellProps): react_jsx_runtime.JSX.Element; interface OrganizationLogoClassNames { base?: string; image?: string; fallback?: string; fallbackIcon?: string; skeleton?: string; } interface OrganizationLogoProps { classNames?: OrganizationLogoClassNames; isPending?: boolean; size?: "sm" | "default" | "lg" | "xl" | "icon-sm" | "icon-lg" | null; organization?: Partial | null; /** * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; } /** * Displays an organization logo with image and fallback support * * Renders an organization's logo image when available, with appropriate fallbacks: * - Shows a skeleton when isPending is true * - Falls back to a building icon when no logo is available */ declare function OrganizationLogo({ className, classNames, isPending, size, organization, localization: propLocalization, ...props }: OrganizationLogoProps & ComponentProps): react_jsx_runtime.JSX.Element; interface OrganizationViewClassNames { base?: string; avatar?: OrganizationLogoClassNames; content?: string; title?: string; subtitle?: string; skeleton?: string; } interface OrganizationViewProps$1 { className?: string; classNames?: OrganizationViewClassNames; isPending?: boolean; size?: "sm" | "default" | "lg" | "icon-sm" | "icon-lg" | null; organization?: Organization | null; /** * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; } declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }: OrganizationViewProps$1): react_jsx_runtime.JSX.Element; interface OrganizationCellProps { className?: string; classNames?: SettingsCardClassNames; organization: Organization; localization?: AuthLocalization; } declare function OrganizationCell({ className, classNames, organization, localization: localizationProp }: OrganizationCellProps): react_jsx_runtime.JSX.Element; interface OrganizationViewProps { className?: string; classNames?: { base?: string; cards?: string; drawer?: { menuItem?: string; }; sidebar?: { base?: string; button?: string; buttonActive?: string; }; card?: SettingsCardClassNames; }; localization?: AuthLocalization; path?: string; pathname?: string; view?: OrganizationViewPath; hideNav?: boolean; slug?: string; } declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug }: OrganizationViewProps): react_jsx_runtime.JSX.Element; /** * Displays user information with avatar and details in a compact view for personal accounts * * Renders a user's profile information with appropriate fallbacks: * - Shows avatar alongside user name and "Personal Account" subtitle when available * - Shows loading skeletons when isPending is true * - Falls back to generic "User" text when neither name nor email is available * - Always shows "Personal Account" as subtitle for default and lg sizes * - Supports customization through classNames prop */ declare function PersonalAccountView({ className, classNames, isPending, size, user, localization: propLocalization }: UserViewProps): react_jsx_runtime.JSX.Element; type OrganizationSettingsCardsProps = { className?: string; classNames?: { card?: SettingsCardClassNames; cards?: string; }; localization?: Partial; slug?: string; }; declare function OrganizationSettingsCards({ className, classNames, localization, slug }: OrganizationSettingsCardsProps): react_jsx_runtime.JSX.Element; interface OrganizationSwitcherClassNames { base?: string; skeleton?: string; trigger?: { base?: string; avatar?: UserAvatarClassNames; user?: UserViewClassNames; organization?: OrganizationViewClassNames; skeleton?: string; }; content?: { base?: string; user?: UserViewClassNames; organization?: OrganizationViewClassNames; avatar?: UserAvatarClassNames; menuItem?: string; separator?: string; }; } interface OrganizationSwitcherProps extends Omit, "trigger"> { classNames?: OrganizationSwitcherClassNames; align?: "center" | "start" | "end"; alignOffset?: number; side?: "top" | "right" | "bottom" | "left"; sideOffset?: number; trigger?: ReactNode; localization?: AuthLocalization; slug?: string; onSetActive?: (organization: Organization | null) => void; /** * Hide the personal organization option from the switcher. * When true, users can only switch between organizations and cannot access their personal account. * If no organization is active, the first available organization will be automatically selected. * @default false */ hidePersonal?: boolean; } /** * Displays an interactive user button with dropdown menu functionality * * Renders a user interface element that can be displayed as either an icon or full button: * - Shows a user avatar or placeholder when in icon mode * - Displays user name and email with dropdown indicator in full mode * - Provides dropdown menu with authentication options (sign in/out, settings, etc.) * - Supports multi-session functionality for switching between accounts * - Can be customized with additional links and styling options */ declare function OrganizationSwitcher({ className, classNames, align, alignOffset, side, sideOffset, trigger, localization: localizationProp, slug: slugProp, size, onSetActive, hidePersonal, ...props }: OrganizationSwitcherProps): react_jsx_runtime.JSX.Element; interface AccountViewProps { className?: string; classNames?: { base?: string; cards?: string; drawer?: { menuItem?: string; }; sidebar?: { base?: string; button?: string; buttonActive?: string; }; card?: SettingsCardClassNames; }; localization?: AuthLocalization; path?: string; pathname?: string; view?: AccountViewPath; hideNav?: boolean; } declare function AccountView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav }: AccountViewProps): react_jsx_runtime.JSX.Element; interface DeleteAccountCardProps { className?: string; classNames?: SettingsCardClassNames; accounts?: Account[] | null; isPending?: boolean; localization?: AuthLocalization; skipHook?: boolean; } declare function DeleteAccountCard({ className, classNames, accounts, isPending, localization, skipHook }: DeleteAccountCardProps): react_jsx_runtime.JSX.Element; interface DeleteAccountDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; accounts?: Account[] | null; localization?: AuthLocalization; } declare function DeleteAccountDialog({ classNames, accounts, localization, onOpenChange, ...props }: DeleteAccountDialogProps): react_jsx_runtime.JSX.Element; interface AnonymousUpgradeCardClassNames { card?: string; header?: string; title?: string; description?: string; content?: string; alert?: string; buttonContainer?: string; button?: string; } interface AnonymousUpgradeCardLocalization { title?: string; description?: string; alertMessage?: string; signUpWithEmail?: string; linkOAuth?: string; benefits?: { title?: string; items?: string[]; }; } interface AnonymousUpgradeCardProps { /** * Callback when user clicks to upgrade with email */ onUpgradeWithEmail?: () => void; /** * Callback when user clicks to link OAuth account */ onLinkOAuth?: () => void; /** * Show OAuth providers for linking * @default false */ showOAuthProviders?: boolean; /** * OAuth providers to display */ oauthProviders?: Array<{ id: string; name: string; icon?: React$1.ReactNode; }>; /** * Custom class names for styling */ classNames?: AnonymousUpgradeCardClassNames; /** * Localization strings */ localization?: AnonymousUpgradeCardLocalization; /** * Custom class name for the card */ className?: string; } declare function AnonymousUpgradeCard({ onUpgradeWithEmail, onLinkOAuth, showOAuthProviders, oauthProviders, classNames, localization, className, }: AnonymousUpgradeCardProps): react_jsx_runtime.JSX.Element; interface LinkAccountCardProps extends Omit { providers?: Array<{ id: string; name: string; }>; callbackURL?: string; onLinkStart?: (providerId: string) => void; } declare function LinkAccountCard({ className, classNames, localization: localizationProp, providers, callbackURL, onLinkStart }: LinkAccountCardProps): react_jsx_runtime.JSX.Element; interface UnlinkAccountCardProps extends Omit { onUnlinkSuccess?: (providerId: string) => void; onUnlinkError?: (providerId: string, error: any) => void; minimumLinkedAccounts?: number; } declare function UnlinkAccountCard({ className, classNames, localization: localizationProp, onUnlinkSuccess, onUnlinkError, minimumLinkedAccounts }: UnlinkAccountCardProps): react_jsx_runtime.JSX.Element; interface ApiKeysCardProps extends SettingsCardProps { organizationId?: string; onSelectApiKey?: (apiKey: any) => void; selectedApiKeyId?: string; } declare function ApiKeysCard({ className, classNames, localization, organizationId, onSelectApiKey, selectedApiKeyId, ...props }: ApiKeysCardProps): react_jsx_runtime.JSX.Element; /** * API Key type * Type for API keys in the system (Better Auth native fields) */ interface ApiKey { id: string; name?: string; key?: string; start?: string; prefix?: string; userId: string; remaining?: number | null; refillAmount?: number | null; refillInterval?: number | null; lastRefillAt?: Date | null; rateLimitEnabled: boolean; rateLimitTimeWindow?: number | null; rateLimitMax?: number | null; requestCount: number; lastRequest?: Date | null; expiresAt?: Date | null; enabled: boolean; permissions?: string | null; metadata?: any; createdAt: Date; updatedAt: Date; } interface ApiKeyCellProps { className?: string; classNames?: SettingsCardClassNames; apiKey: ApiKey; localization?: Partial; refetch?: Refetch; showUsage?: boolean; showRateLimit?: boolean; showRefill?: boolean; showPermissions?: boolean; onClick?: () => void; isSelected?: boolean; } declare function ApiKeyCell({ className, classNames, apiKey, localization, refetch, showUsage, showRateLimit, showRefill, showPermissions, onClick, isSelected }: ApiKeyCellProps): react_jsx_runtime.JSX.Element; interface CreateApiKeyDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; onSuccess: (key: string) => void; refetch?: Refetch; organizationId?: string; } declare function CreateApiKeyDialog({ classNames, localization, onSuccess, refetch, organizationId, onOpenChange, ...props }: CreateApiKeyDialogProps): react_jsx_runtime.JSX.Element; interface UpdateApiKeyDialogProps extends ComponentProps { classNames?: SettingsCardClassNames; localization?: AuthLocalization; apiKey: ApiKey | null; onSuccess?: () => void; refetch?: Refetch; } declare function UpdateApiKeyDialog({ classNames, localization, apiKey, onSuccess, refetch, onOpenChange, ...props }: UpdateApiKeyDialogProps): react_jsx_runtime.JSX.Element; interface ApiKeyUsageCardClassNames { base?: string; header?: string; title?: string; description?: string; content?: string; icon?: string; badge?: string; progress?: string; stat?: string; } interface ApiKeyUsageCardProps { /** API Key object with usage data */ apiKey: ApiKey; /** Optional CSS class name */ className?: string; /** CSS class names for specific parts */ classNames?: ApiKeyUsageCardClassNames; /** Localization strings */ localization?: Partial; /** Warning threshold percentage (default: 80) */ warningThreshold?: number; } declare function ApiKeyUsageCard({ apiKey, className, classNames, localization, warningThreshold }: ApiKeyUsageCardProps): react_jsx_runtime.JSX.Element; interface UserManagementTableProps { /** * Callback fired when a user action is successful */ onSuccess?: () => void; /** * Callback fired when an error occurs */ onError?: (error: Error) => void; /** * Custom CSS class */ className?: string; /** * Custom localization */ localization?: Partial; } interface UserManagementLocalization { userManagement: string; userManagementDescription: string; searchPlaceholder: string; searchByEmail: string; searchByName: string; email: string; name: string; role: string; status: string; createdAt: string; actions: string; active: string; banned: string; verified: string; unverified: string; viewDetails: string; banUser: string; unbanUser: string; impersonate: string; deleteUser: string; showing: string; of: string; users: string; previous: string; next: string; banUserTitle: string; banUserDescription: string; unbanUserTitle: string; unbanUserDescription: string; deleteUserTitle: string; deleteUserDescription: string; cancel: string; confirm: string; userBanned: string; userUnbanned: string; userDeleted: string; impersonationStarted: string; errorLoadingUsers: string; errorBanningUser: string; errorUnbanningUser: string; errorDeletingUser: string; errorImpersonating: string; noUsers: string; noUsersDescription: string; } declare function UserManagementTable({ onSuccess, onError, className, localization: customLocalization, }: UserManagementTableProps): react_jsx_runtime.JSX.Element; interface BanUserDialogLocalization { title: string; description: string; reasonLabel: string; reasonPlaceholder: string; durationLabel: string; customDurationLabel: string; customDurationPlaceholder: string; daysLabel: string; permanent: string; oneDay: string; threeDays: string; sevenDays: string; thirtyDays: string; custom: string; cancel: string; banUser: string; banning: string; success: string; errorBanning: string; invalidDuration: string; } interface BanUserDialogProps { /** * Whether the dialog is open */ open: boolean; /** * Callback when dialog open state changes */ onOpenChange: (open: boolean) => void; /** * User to ban */ user: { id: string; name?: string; email: string; image?: string; } | null; /** * Callback after successful ban */ onSuccess?: () => void; /** * Callback on error */ onError?: (error: Error) => void; /** * Custom class name */ className?: string; /** * Localization overrides */ localization?: Partial; } declare function BanUserDialog({ open, onOpenChange, user, onSuccess, onError, localization: customLocalization, }: BanUserDialogProps): react_jsx_runtime.JSX.Element; interface ImpersonateUserDialogLocalization { title: string; description: string; warningTitle: string; warningMessage: string; cancel: string; impersonate: string; impersonating: string; success: string; errorImpersonating: string; } interface ImpersonateUserDialogProps { /** * Whether the dialog is open */ open: boolean; /** * Callback when dialog open state changes */ onOpenChange: (open: boolean) => void; /** * User to impersonate */ user: { id: string; name?: string; email: string; image?: string; } | null; /** * Callback after successful impersonation */ onSuccess?: () => void; /** * Callback on error */ onError?: (error: Error) => void; /** * Custom class name */ className?: string; /** * Localization overrides */ localization?: Partial; } declare function ImpersonateUserDialog({ open, onOpenChange, user, onSuccess, onError, localization: customLocalization, }: ImpersonateUserDialogProps): react_jsx_runtime.JSX.Element; /** * signed-in * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ /** * Conditionally renders content for authenticated users only * * Renders its children only when a user is authenticated with a valid session. * If no session exists, nothing is rendered. Useful for displaying protected * content or UI elements that should only be visible to signed-in users. */ declare function SignedIn({ children }: { children: ReactNode; }): ReactNode; /** * signed-out * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ /** * Conditionally renders content for unauthenticated users only * * Renders its children only when no user is authenticated and the authentication * state is not pending. If a session exists or is being loaded, nothing is rendered. * Useful for displaying sign-in prompts or content exclusive to guests. */ declare function SignedOut({ children }: { children: ReactNode; }): ReactNode; /** * auth-loading * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ /** * Conditionally renders content during authentication loading state * * Renders its children only when the authentication state is being determined * (during the loading/pending phase). Once the authentication state is resolved, * nothing is rendered. Useful for displaying loading indicators or temporary * content while waiting for the authentication check to complete. */ declare function AuthLoading({ children }: { children: ReactNode; }): ReactNode; /** * redirect-to-sign-in * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ /** * Redirects the user to the sign-in page * * Renders nothing and automatically redirects the current user to the authentication * sign-in page. Useful for protecting routes that require authentication or * redirecting users to sign in from various parts of the application. */ declare function RedirectToSignIn(): ReactNode; /** * redirect-to-sign-up * Adapted from @daveyplate/better-auth-ui * Enhanced for @bettercone/ui */ /** * Redirects the user to the sign-up page * * Renders nothing and automatically redirects the current user to the authentication * sign-up page. Useful for directing new users to create an account or * for redirecting from marketing pages to the registration flow. */ declare function RedirectToSignUp(): ReactNode; declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element; declare function PasswordInput({ className, enableToggle, onChange, ...props }: ComponentProps & { enableToggle?: boolean; }): react_jsx_runtime.JSX.Element; interface FormErrorProps { title?: string; classNames?: AuthFormClassNames; } declare function FormError({ title, classNames }: FormErrorProps): react_jsx_runtime.JSX.Element; type SiweSignInButtonClassNames = { base?: string; button?: string; }; interface SiweSignInButtonProps { /** * Custom CSS class names for styling different parts of the component */ classNames?: SiweSignInButtonClassNames; /** * Custom CSS class for the button */ className?: string; /** * Whether the component is in a submitting state */ isSubmitting?: boolean; /** * Localization object for customizing text */ localization?: Partial; /** * URL to redirect to after successful sign-in */ redirectTo?: string; /** * Callback to update the submitting state */ setIsSubmitting?: (isSubmitting: boolean) => void; /** * Button variant * @default "default" */ variant?: "default" | "outline" | "ghost" | "secondary"; /** * Button size * @default "default" */ size?: "default" | "sm" | "lg" | "icon"; } /** * SiweSignInButton Component * * Provides a button for Sign-In with Ethereum (SIWE) authentication. * Integrates with Better Auth's SIWE plugin and wallet providers. * * @example * ```tsx * import { SiweSignInButton } from '@bettercone/ui'; * * export function LoginPage() { * return ( *
* *
* ); * } * ``` * * @example * With custom styling * ```tsx * * ``` */ declare function SiweSignInButton({ className, classNames, isSubmitting: isSubmittingProp, localization: localizationProp, redirectTo: redirectToProp, setIsSubmitting: setIsSubmittingProp, variant, size }: SiweSignInButtonProps): react_jsx_runtime.JSX.Element; declare global { interface Window { ethereum?: { request: (args: { method: string; params?: any[]; }) => Promise; on?: (event: string, handler: (...args: any[]) => void) => void; removeListener?: (event: string, handler: (...args: any[]) => void) => void; }; } } type WalletConnectionCardClassNames = { base?: string; header?: string; title?: string; description?: string; content?: string; walletItem?: string; button?: string; badge?: string; }; interface WalletConnectionCardProps { /** * Custom CSS class names for styling different parts of the component */ classNames?: WalletConnectionCardClassNames; /** * Custom CSS class for the card */ className?: string; /** * Localization object for customizing text */ localization?: Partial; /** * Card title * @default "Wallet Connections" */ title?: string; /** * Card description * @default "Manage your connected Web3 wallets" */ description?: string; } /** * WalletConnectionCard Component * * Displays and manages connected Web3 wallets for the current user. * Allows users to view, connect, and disconnect Ethereum wallets. * * @example * ```tsx * import { WalletConnectionCard } from '@bettercone/ui'; * * export function SettingsPage() { * return ( *
* *
* ); * } * ``` * * @example * With custom title * ```tsx * * ``` */ declare function WalletConnectionCard({ className, classNames, localization: localizationProp, title, description }: WalletConnectionCardProps): react_jsx_runtime.JSX.Element; declare global { interface Window { ethereum?: { request: (args: { method: string; params?: any[]; }) => Promise; on?: (event: string, handler: (...args: any[]) => void) => void; removeListener?: (event: string, handler: (...args: any[]) => void) => void; }; } } declare function OIDCConsentScreen(): react_jsx_runtime.JSX.Element; /** * Attribute Mapping for OIDC and SAML */ interface AttributeMapping { id?: string; email?: string; emailVerified?: string; name?: string; firstName?: string; lastName?: string; image?: string; extraFields?: Record; } /** * IdP Metadata (SAML) */ interface IDPMetadata { metadata?: string; privateKey?: string; privateKeyPass?: string; isAssertionEncrypted?: boolean; encPrivateKey?: string; encPrivateKeyPass?: string; } /** * SP Metadata (SAML) */ interface SPMetadata { metadata?: string; binding?: 'post' | 'redirect'; privateKey?: string; privateKeyPass?: string; isAssertionEncrypted?: boolean; encPrivateKey?: string; encPrivateKeyPass?: string; } /** * OIDC Configuration */ interface OIDCConfig { clientId: string; clientSecret?: string; authorizationEndpoint: string; tokenEndpoint: string; jwksEndpoint?: string; discoveryEndpoint?: string; scopes?: string[]; pkce?: boolean; mapping?: AttributeMapping; } /** * SAML Configuration */ interface SAMLConfig { entryPoint: string; cert: string; callbackUrl: string; audience?: string; wantAssertionsSigned?: boolean; signatureAlgorithm?: 'sha1' | 'sha256' | 'sha512'; digestAlgorithm?: 'sha1' | 'sha256' | 'sha512'; identifierFormat?: string; idpMetadata?: IDPMetadata; spMetadata?: SPMetadata; mapping?: AttributeMapping; } /** * SSO Provider Data Structure */ interface SSOProvider { id: string; providerId: string; issuer: string; domain: string; organizationId?: string; oidcConfig?: OIDCConfig; samlConfig?: SAMLConfig; createdAt?: Date; updatedAt?: Date; } /** * Component Props */ interface SSOConfigCardProps { data?: SSOProvider; providerId?: string; authClient?: AnyAuthClient; className?: string; classNames?: { base?: string; header?: string; title?: string; description?: string; content?: string; footer?: string; }; localization?: Partial; onSuccess?: (provider: SSOProvider) => void; onError?: (error: Error) => void; showActions?: boolean; allowDelete?: boolean; allowMetadataUpload?: boolean; } /** * SSOConfigCard Component * * Configure SAML and OIDC single sign-on providers for enterprise authentication. * Clean tab-based layout with separate sections for configuration, mapping, and advanced options. * * @example * ```tsx * import { SSOConfigCard } from '@bettercone/ui'; * * export function SSOPage() { * return ; * } * ``` */ declare function SSOConfigCard({ data: dataProp, providerId: providerIdProp, authClient: authClientProp, className, classNames, localization: localizationProp, onSuccess, onError, showActions, allowDelete, allowMetadataUpload, }: SSOConfigCardProps): react_jsx_runtime.JSX.Element; /** * SAML attribute mapping configuration * Maps SAML assertion attributes to user model fields */ interface SAMLAttributeMapping { /** User ID (typically nameID) */ id?: string; /** Email address attribute */ email?: string; /** Email verified status attribute */ emailVerified?: string; /** Full name attribute */ name?: string; /** First/given name attribute */ firstName?: string; /** Last/family name attribute */ lastName?: string; /** Profile image/picture URL attribute */ image?: string; /** Custom additional attributes */ extraFields?: Record; } /** * Complete SAML configuration */ interface SAMLConfiguration { /** SSO entry point URL (IdP initiated login) */ entryPoint: string; /** X.509 certificate for signature verification (PEM format) */ cert: string; /** Assertion Consumer Service (ACS) URL - your callback endpoint */ callbackUrl: string; /** Expected audience (entity ID) */ audience?: string; /** Entity ID for your service provider */ entityId?: string; /** Require signed SAML assertions */ wantAssertionsSigned?: boolean; /** Signature algorithm */ signatureAlgorithm?: "sha1" | "sha256" | "sha512"; /** Digest algorithm */ digestAlgorithm?: "sha1" | "sha256" | "sha512"; /** NameID format */ identifierFormat?: string; /** Attribute mapping configuration */ mapping?: SAMLAttributeMapping; } /** * Props for SAMLSetupWizard component */ interface SAMLSetupWizardProps { /** Better Auth client instance (optional - uses context if not provided) */ authClient?: { sso?: { createProvider?: (config: SAMLConfiguration) => Promise; testConnection?: (providerId: string) => Promise<{ success: boolean; error?: string; }>; }; }; /** Organization ID to scope this SSO configuration */ organizationId?: string; /** Initial SAML configuration (for editing existing provider) */ initialConfig?: Partial; /** Called when setup completes successfully */ onSuccess?: (config: SAMLConfiguration) => void; /** Called on errors */ onError?: (error: Error) => void; /** Called when wizard is cancelled */ onCancel?: () => void; /** Additional CSS classes */ className?: string; } declare const SAMLSetupWizard: ({ authClient, organizationId, initialConfig, onSuccess, onError, onCancel, className, }: SAMLSetupWizardProps) => react_jsx_runtime.JSX.Element; /** * OAuth2 Client Data Structure (Better Auth Schema) * Based on Better Auth oauthApplication table */ interface OAuth2Client { id: string; clientId: string; clientSecret?: string; name: string; redirectURLs: string[]; type: string; disabled: boolean; userId?: string; metadata?: string | Record; createdAt: Date; updatedAt?: Date; } /** * Component Props */ interface OIDCProviderCardProps { /** * List of OAuth2 clients (optional - auto-fetches if not provided) */ clients?: OAuth2Client[]; /** * Custom auth client */ authClient?: AnyAuthClient; /** * Custom CSS class */ className?: string; /** * Custom class names */ classNames?: { base?: string; header?: string; clientList?: string; clientCard?: string; }; /** * Localization strings */ localization?: Partial; /** * Callback when client is registered */ onClientRegistered?: (client: OAuth2Client) => void; /** * Callback when client is updated */ onClientUpdated?: (client: OAuth2Client) => void; /** * Callback when client is deleted */ onClientDeleted?: (clientId: string) => void; /** * Callback on error */ onError?: (error: Error) => void; /** * Show active tokens section */ showActiveTokens?: boolean; /** * Show trusted clients section */ showTrustedClients?: boolean; /** * Allow dynamic client registration */ allowRegistration?: boolean; } declare function OIDCProviderCard(props: OIDCProviderCardProps): react_jsx_runtime.JSX.Element; declare function useIsHydrated(): boolean; declare function useLang(): { lang: string; }; declare function useOnSuccessTransition({ redirectTo: redirectToProp }: { redirectTo?: string; }): { onSuccess: () => Promise; isPending: boolean; }; declare function useCurrentOrganization({ slug: slugProp }?: { slug?: string; }): { data: { id: string; name: string; slug: string; createdAt: Date; logo?: string; metadata?: any; }; isPending: boolean; isRefetching: boolean; refetch: () => void; }; /** * fetch-error * Error type for fetch operations */ interface FetchError { message: string; status?: number; statusText?: string; } declare function useAuthData({ queryFn, cacheKey, staleTime }: { queryFn: () => Promise<{ data: T | null; error?: FetchError | null; }>; cacheKey?: string; staleTime?: number; }): { data: T; isPending: any; isRefetching: boolean; error: FetchError; refetch: () => Promise; }; interface AuthenticateOptions { authClient?: TAuthClient; authView?: AuthViewPath; enabled?: boolean; } declare function useAuthenticate(options?: AuthenticateOptions): { data: { session: TAuthClient["$Infer"]["Session"]["session"]; user: TAuthClient["$Infer"]["Session"]["user"]; }; user: TAuthClient["$Infer"]["Session"]["user"]; isPending: any; error: any; refetch: any; }; declare function useTheme(): { theme: "light" | "dark"; }; declare function useOrganizationMembers({ organizationId }?: { organizationId?: string; }): { data: (Member & { user?: any; })[] | undefined; isPending: boolean; refetch: Refetch; }; /** * account-options * Configuration options for account management features */ interface AccountOptions { enabled?: boolean; basePath?: string; fields?: any; viewPaths?: any; } interface AccountOptionsContext { enabled?: boolean; basePath?: string; fields?: any; viewPaths?: any; } interface AdditionalFields { [key: string]: any; } type AnyAuthSession = AnyAuthClient["$Infer"]["Session"]; type AuthHook = { isPending: boolean; data?: T | null; error?: BetterFetchError | null; refetch?: Refetch; }; type AuthHooks = { useSession: () => ReturnType; useListAccounts: () => AuthHook; useAccountInfo: (params: Parameters[0]) => AuthHook<{ user: User$1; }>; useListDeviceSessions: () => AuthHook; useListSessions: () => AuthHook; useListPasskeys: () => Partial>; useListApiKeys: () => AuthHook; useActiveOrganization: () => Partial>; useListOrganizations: () => Partial>; useHasPermission: (params: Parameters[0]) => AuthHook<{ error: null; success: boolean; }>; useInvitation: (params: Parameters[0]) => AuthHook; useListInvitations: (params: Parameters[0]) => AuthHook; useListUserInvitations: () => AuthHook; useListMembers: (params: Parameters[0]) => AuthHook<{ members: (Member & { user?: Partial | null; })[]; total: number; }>; useIsRestoring?: () => boolean; useListActiveSubscriptions: (params?: any) => AuthHook; }; /** * auth-mutators * Authentication mutation functions */ interface AuthMutators { signIn?: (params: any) => Promise; signUp?: (params: any) => Promise; signOut?: (params: any) => Promise; forgotPassword?: (params: any) => Promise; resetPassword?: (params: any) => Promise; verifyEmail?: (params: any) => Promise; [key: string]: ((params: any) => Promise) | undefined; } /** * avatar-options * Avatar display configuration */ interface AvatarOptions { enabled?: boolean; upload?: (file: File) => Promise; delete?: boolean; extension?: string; size?: number; Image?: React.ComponentType; } /** * captcha-options * CAPTCHA configuration */ interface CaptchaOptions { enabled?: boolean; provider?: "google-recaptcha-v2-checkbox" | "google-recaptcha-v2-invisible" | "google-recaptcha-v3" | "hcaptcha" | "cloudflare-turnstile"; siteKey?: string; endpoints?: string[]; enterprise?: boolean; recaptchaNet?: boolean; } /** * credentials-options * Email/password authentication configuration */ interface CredentialsOptions { enabled?: boolean; requireEmailVerification?: boolean; forgotPassword?: boolean; confirmPassword?: boolean; passwordValidation?: any; rememberMe?: boolean; username?: boolean; } /** * delete-user-options * Account deletion configuration */ interface DeleteUserOptions { enabled?: boolean; verification?: boolean; } /** * generic-oauth-options * Generic OAuth provider configuration */ interface GenericOAuthOptions { enabled?: boolean; providers?: string[]; signIn?: any; } /** * gravatar-options * Gravatar integration configuration */ interface GravatarOptions { enabled?: boolean; defaultImage?: "404" | "mp" | "identicon" | "monsterid" | "wavatar" | "retro" | "robohash"; jpg?: boolean; size?: number; d?: string; forceDefault?: boolean; } /** * link * Link component type for navigation */ interface Link { (props: { href: string; className?: string; children: ReactNode; }): ReactNode; } /** * organization-options * Organization/team management configuration */ interface OrganizationOptions { enabled?: boolean; pathMode?: "id" | "slug"; slug?: string; logo?: any; basePath?: string; customRoles?: any[]; viewPaths?: any; } interface OrganizationOptionsContext { enabled?: boolean; pathMode?: "id" | "slug"; slug?: string; logo?: any; basePath?: string; customRoles?: any[]; viewPaths?: any; personalPath?: string; apiKey?: boolean; } /** * render-toast * Toast notification rendering function */ interface RenderToast { (options: { variant?: "default" | "success" | "error" | "info" | "warning"; message: string; }): void; } /** * sign-up-options * User registration configuration */ interface SignUpOptions { enabled?: boolean; requireEmailVerification?: boolean; additionalFields?: string[]; fields?: any; } /** * social-options * Social authentication provider configuration */ interface SocialOptions { enabled?: boolean; providers?: Array<{ id: string; name: string; enabled?: boolean; }>; signIn?: any; } type AuthUIContextType = { authClient: AuthClient; /** * Additional fields for users */ additionalFields?: AdditionalFields; /** * API Key plugin configuration */ apiKey?: { /** * Prefix for API Keys */ prefix?: string; /** * Metadata for API Keys */ metadata?: Record; } | boolean; /** * Avatar configuration * @default undefined */ avatar?: AvatarOptions; /** * Base path for the auth views * @default "/auth" */ basePath: string; /** * Front end base URL for auth API callbacks */ baseURL?: string; /** * Captcha configuration */ captcha?: CaptchaOptions; credentials?: CredentialsOptions; /** * Default redirect URL after authenticating * @default "/" */ redirectTo: string; /** * Enable or disable user change email support * @default true */ changeEmail?: boolean; /** * User Account deletion configuration * @default undefined */ deleteUser?: DeleteUserOptions; /** * Show Verify Email card for unverified emails */ emailVerification?: boolean; /** * Freshness age for Session data * @default 60 * 60 * 24 */ freshAge: number; /** * Generic OAuth provider configuration */ genericOAuth?: GenericOAuthOptions; /** * Gravatar configuration */ gravatar?: boolean | GravatarOptions; hooks: AuthHooks; localization: typeof authLocalization; /** * Enable or disable Magic Link support * @default false */ magicLink?: boolean; /** * Enable or disable Email OTP support * @default false */ emailOTP?: boolean; /** * Enable or disable Multi Session support * @default false */ multiSession?: boolean; mutators: AuthMutators; /** * Whether the name field should be required * @default true */ nameRequired?: boolean; /** * Enable or disable One Tap support * @default false */ oneTap?: boolean; /** * Perform some User updates optimistically * @default false */ optimistic?: boolean; /** * Organization configuration */ organization?: OrganizationOptionsContext; /** * Enable or disable Passkey support * @default false */ passkey?: boolean; /** * Enable or disable Anonymous sign-in support * @default false */ anonymous?: boolean; /** * Enable or disable Sign-In with Ethereum (SIWE) support * @default false */ siwe?: boolean; /** * Forces better-auth-tanstack to refresh the Session on the auth callback page * @default false */ persistClient?: boolean; /** * Account configuration */ account?: AccountOptionsContext; /** * Sign Up configuration */ signUp?: SignUpOptions; /** * Social provider configuration */ social?: SocialOptions; toast: RenderToast; /** * Enable or disable two-factor authentication support * @default undefined */ twoFactor?: ("otp" | "totp")[]; /** * Enable or disable Phone Number support * @default false */ phoneNumber?: boolean; /** * OIDC Provider configuration */ oidc?: boolean; /** * Stripe configuration */ stripe?: boolean; /** * Polar configuration */ polar?: boolean; /** * Admin configuration */ admin?: boolean; /** * Autumn configuration */ autumn?: boolean; /** * Dodo Payments configuration */ dodopayments?: boolean; /** * Creem configuration */ creem?: boolean; /** * Dub Analytics configuration */ dub?: boolean; viewPaths: AuthViewPaths; /** * Navigate to a new URL * @default window.location.href */ navigate: (href: string) => void; /** * Called whenever the Session changes */ onSessionChange?: () => void | Promise; /** * Replace the current URL * @default navigate */ replace: (href: string) => void; /** * Custom Link component for navigation * @default */ Link: Link; }; type AuthUIProviderProps = { children: ReactNode; /** * Better Auth client returned from createAuthClient * @default Required * @remarks `AuthClient` */ authClient: AnyAuthClient; /** * Enable account view & account configuration * @default { fields: ["image", "name"] } */ account?: boolean | Partial; /** * Avatar configuration * @default undefined */ avatar?: boolean | Partial; /** * User Account deletion configuration * @default undefined */ deleteUser?: DeleteUserOptions | boolean; /** * ADVANCED: Custom hooks for fetching auth data */ hooks?: Partial; /** * Customize the paths for the auth views * @default authViewPaths * @remarks `AuthViewPaths` */ viewPaths?: Partial; /** * Render custom Toasts * @default Sonner */ toast?: RenderToast; /** * Customize the Localization strings * @default authLocalization * @remarks `AuthLocalization` */ localization?: AuthLocalization; /** * ADVANCED: Custom mutators for updating auth data */ mutators?: Partial; /** * Organization plugin configuration */ organization?: OrganizationOptions | boolean; /** * Enable or disable Credentials support * @default { forgotPassword: true } */ credentials?: boolean | CredentialsOptions; /** * Enable or disable Sign Up form * @default { fields: ["name"] } */ signUp?: SignUpOptions | boolean; /** * Enable or disable Phone Number support * @default false */ phoneNumber?: boolean; /** * OIDC Provider configuration */ oidc?: boolean; /** * Stripe configuration */ stripe?: boolean; /** * Polar configuration */ polar?: boolean; /** * Admin configuration */ admin?: boolean; /** * Autumn configuration */ autumn?: boolean; /** * Dodo Payments configuration */ dodopayments?: boolean; /** * Creem configuration */ creem?: boolean; /** * Dub Analytics configuration */ dub?: boolean; } & Partial>; declare const AuthUIContext: React$1.Context; declare const AuthUIProvider: ({ children, authClient: authClientProp, account: accountProp, avatar: avatarProp, deleteUser: deleteUserProp, social: socialProp, genericOAuth: genericOAuthProp, basePath, baseURL, captcha, redirectTo, credentials: credentialsProp, changeEmail, freshAge, hooks: hooksProp, mutators: mutatorsProp, localization: localizationProp, nameRequired, organization: organizationProp, signUp: signUpProp, toast, viewPaths: viewPathsProp, navigate, replace, Link, stripe: stripeProp, ...props }: AuthUIProviderProps) => react_jsx_runtime.JSX.Element; export { AcceptInvitationCard, AccountView, AnonymousSignInButton, type AnonymousSignInButtonProps, AnonymousUpgradeCard, type AnonymousUpgradeCardProps, type ApiKey, ApiKeyCell, ApiKeyUsageCard, ApiKeysCard, AuthCallback, AuthForm, AuthLoading, AuthUIContext, AuthUIProvider, AuthView, BackupCodesDialog, BanUserDialog, type BetterAuthClient, type BetterAuthOrganization, type BetterAuthSession, ChangeEmailCard, ChangePasswordCard, CreateApiKeyDialog, CreateOrganizationCard, CreateOrganizationDialog, DeleteAccountCard, DeleteAccountDialog, DeleteOrganizationCard, DeleteOrganizationDialog, DeviceApprovalCard, DeviceAuthorizationCard, DeviceCodeDisplay, EmailOTPButton, EmailVerificationBanner, type EmailVerificationBannerProps, FormError, ImpersonateUserDialog, InvitationCell, InviteMemberDialog, LastLoginBadge, LeaveOrganizationCard, LeaveOrganizationDialog, LinkAccountCard, MagicLinkButton, MemberCell, OIDCConsentScreen, OIDCProviderCard, OneTap, OrganizationCell, OrganizationCellView, OrganizationInvitationsCard, OrganizationLogo, OrganizationLogoCard, OrganizationMembersCard, OrganizationNameCard, OrganizationSettingsCards, OrganizationSlugCard, OrganizationSwitcher, OrganizationView, OrganizationsCard, PasskeyButton, PasskeyCell, PasskeySetupWizard, PasskeysCard, PasswordInput, PersonalAccountView, PhoneNumberCard, PhoneSignInForm, PhoneSignUpForm, ProviderButton, type ProviderIcon, RedirectToSignIn, RedirectToSignUp, RemoveMemberDialog, SAMLSetupWizard, SSOConfigCard, SessionCell, SessionsCard, SignOut, SignedIn, SignedOut, SiweSignInButton, type SiweSignInButtonClassNames, type SiweSignInButtonProps, TransferOwnershipDialog, TwoFactorCard, TwoFactorPasswordDialog, UnlinkAccountCard, UpdateApiKeyDialog, UpdateMemberRoleDialog, UserAvatar, UserButton, UserInvitationsCard, UserManagementTable, WalletConnectionCard, type WalletConnectionCardClassNames, type WalletConnectionCardProps, cn, getViewByPath, socialProviders, useAuthData, useAuthenticate, useCurrentOrganization, useIsHydrated, useLang, useOnSuccessTransition, useOrganizationMembers, useTheme };