import { useFormik } from 'formik'; import { FC } from 'react'; import * as Yup from 'yup'; export interface RegisterFormValues { username: string; email: string; displayName?: string; timezone: string; password?: string; confirmPassword?: string; directChallenge?: boolean; mnemonic?: string; [key: string]: string | boolean | undefined; } export interface RegisterFormProps { onSubmit: (values: RegisterFormValues, usePassword: boolean) => Promise<{ success: boolean; message: string; mnemonic?: string; } | { error: string; errorType?: string; field?: string; errors?: Array<{ path: string; msg: string; }>; }>; timezones: string[]; getInitialTimezone: () => string; usernameValidation?: Yup.StringSchema; emailValidation?: Yup.StringSchema; displayNameValidation?: Yup.StringSchema; timezoneValidation?: Yup.StringSchema; passwordValidation?: Yup.StringSchema; confirmPasswordValidation?: Yup.StringSchema; /** * When true, display a TOTP setup step after successful registration. * Defaults to false. When false or not provided, existing flow is unchanged. */ enableTotpSetup?: boolean; /** * Called to initiate TOTP setup (e.g. AuthService.setupTotp()). * Must return provisioning URI and secret on success, or an error. */ onTotpSetup?: () => Promise<{ provisioningUri: string; secret: string; } | { error: string; }>; /** * Called to confirm TOTP setup with a 6-digit code (e.g. AuthService.confirmTotp()). */ onTotpConfirm?: (code: string) => Promise<{ success: boolean; } | { error: string; }>; /** * Called after the user successfully confirms TOTP during the registration flow. */ onTotpSetupComplete?: () => void; /** * List of email domains that are not allowed during registration. * For example, the home system's email domain should be disallowed * so users cannot register with addresses managed by the platform. */ disallowedEmailDomains?: string[]; additionalFields?: (formik: ReturnType>, usePassword: boolean) => React.ReactNode; additionalInitialValues?: Record; additionalValidation?: Record; labels?: { title?: string; username?: string; email?: string; displayName?: string; timezone?: string; password?: string; confirmPassword?: string; useMnemonic?: string; usePassword?: string; registering?: string; register?: string; successTitle?: string; mnemonicSuccess?: string; proceedToLogin?: string; savedRecoveryPhrase?: string; loginLink?: string; mnemonic?: string; totpSetupTitle?: string; totpSkipButton?: string; totpSetupError?: string; totpSetupSuccess?: string; passwordAuthInfo?: string; }; } export declare const RegisterForm: FC; export default RegisterForm; //# sourceMappingURL=RegisterForm.d.ts.map