import React from "react"; import { EmailTemplate } from "../types/types"; export interface IDictionary { /** * SignUp */ newPasswordLabel?: string; confirmNewPasswordLabel?: string; newEmailLabel?: string; signUpSubmitButton?: string; backToSignIn?: string; signUpHeader?: string; newFirstNameLabel?: string; newLastNameLabel?: string; newFullNameLabel?: string; newDateOfBirthLabel?: string; newPhoneNumberLabel?: string; /** * SignIn */ signInHeader?: string; emailLabel?: string; passwordLabel?: string; forgotPasswordButton?: string; signInSubmitButton?: string; noAccountButton?: string; /** * ForgotPassword */ forgotPasswordHeader?: string; forgotPasswordConfirmHeader?: string; forgotPasswordSecondaryHeader?: string; forgotPasswordConfirmSubmitButton?: string; forgotPasswordSubmitButton?: string; codeLabel?: string; forgotPasswordConfirmLabel?: string; /** * Errors */ errorPasswordsDoNotMatch?: string; errorBadInputFormat?: string; errorPasswordTooShort?: string; errorUserAlreadyExists?: string; errorUserDoesNotExist?: string; errorRequestLimitExceeded?: string; errorNoAccountFound?: string; errorWrongVerificationCode?: string; } export interface IPage { setCurrentPage: React.Dispatch>; dictionary: IDictionary; emailTemplate?: EmailTemplate; } export interface INativePage { setCurrentPage: React.Dispatch>; dictionary: IDictionary; toast: (message: string) => void; emailTemplate?: EmailTemplate; } export interface IStyles { init?: () => any; container?: Record; textFieldRoot?: Record; textField?: Record; textFieldLabel?: Record; submitButton?: Record; genderSelect?: Record; genderSelectLabel?: Record; toast?: Record; form?: Record; headerText?: Record; secondaryText?: Record; secondaryButton?: Record; errorText?: Record; textButton?: Record; selectOption?: Record; textFieldBar?: Record; forgotPassword?: Record; } export interface INativeStyles { container?: Record; form?: Record; headerText?: Record; secondaryButton?: Record; secondaryButtonRoot?: Record; secondaryText?: Record; submitButton?: Record; submitButtonRoot?: Record; textField?: Record; errorText?: Record; forgotPassword?: Record; forgotPasswordRoot?: Record; picker?: Record; toast?: Record; toastText?: Record; closeToastText?: Record; } export interface IAuth { children: React.ReactNode; /** Theme for consistent styling, defaults to 'minimal' */ theme?: "minimal" | "minimal-dark" | "material"; /** Override specific styles for components of an Auth instance */ customStyles?: IStyles; /** Edit specific language across the Auth instance components */ dictionary?: IDictionary; /** Extra fields that will be shown in the SignUp view of . These fields are shown in addition Email, Password, and Confirm Password. */ signUpFields?: ISignUpFields; /** Optional settings for the formatting & content of the verification emails */ emailTemplate?: EmailTemplate; } export interface INativeAuth { children: React.ReactNode; /** Override specific styles for components of an Auth instance */ customStyles?: INativeStyles; /** Edit specific language across the Auth instance components */ dictionary?: IDictionary; /** Extra fields that will be shown in the SignUp view of . These fields are shown in addition Email, Password, and Confirm Password. */ signUpFields?: ISignUpFields; /** Optional settings for the formatting & content of the verification emails */ emailTemplate?: EmailTemplate; } declare type ValidationValueMessage = { value: TValidationValue; message: string; }; declare type ValidationValue = boolean | number | string | RegExp; declare type ValidationRule = TValidationValue | ValidationValueMessage; export interface ISignUpFieldValidators { required?: string | ValidationRule; min?: ValidationRule; max?: ValidationRule; maxLength?: ValidationRule; minLength?: ValidationRule; pattern?: ValidationRule; } export interface ISignUpFields { firstName?: boolean | ISignUpFieldValidators; lastName?: boolean | ISignUpFieldValidators; fullName?: boolean | ISignUpFieldValidators; dateOfBirth?: boolean | ISignUpFieldValidators; gender?: boolean | ISignUpFieldValidators; phoneNumber?: boolean | ISignUpFieldValidators; } export {};