UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

26 lines (25 loc) 1.5 kB
import type { CountryCode } from '../types/datasets/country-code'; import type { FormUtils } from '../utils/formUtils'; import type { ValidationRuleResult, ValidatorMode } from '../utils/validation/types'; import type { UboQuestionnaireSchema } from '../components/Individual/forms/UboQuestionnaire/UboQuestionnaire.types'; interface UseUboQuestionnaireProps { data?: UboQuestionnaireSchema; handleFieldChange?: (fieldName: keyof UboQuestionnaireSchema, mode?: ValidatorMode) => (e: any) => void; openModal: (modalType: keyof UboQuestionnaireSchema) => () => void; country?: CountryCode; formUtils: FormUtils<UboQuestionnaireSchema>; errors?: Partial<Record<keyof UboQuestionnaireSchema, ValidationRuleResult | null>>; fieldValidationErrors?: Partial<Record<keyof UboQuestionnaireSchema, boolean>>; } export declare const useGuidanceQuestionnaire: ({ data, handleFieldChange, openModal, formUtils, errors, fieldValidationErrors, country, }: UseUboQuestionnaireProps) => { registerGuidanceQuestion: (fieldName: keyof UboQuestionnaireSchema) => { name: keyof UboQuestionnaireSchema; value: import("../components/Individual/forms/GuidanceQuestion/GuidanceQuestion").GuidanceQuestionValue | null | undefined; onChange: (e: any) => void; onDescriptionLinkClick: (() => void) | undefined; question: string; descriptionLinkText: string | undefined; errorMessage: string | boolean | undefined; }; }; export {};