@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.
20 lines (19 loc) • 1.02 kB
TypeScript
import type { EntityProblems } from '../types/errors/entity-problems';
import type { FormList, FormModel, FormModelWithValidity } from '../types/form';
/**
* @@description Based requiredfields and optionalFields determine what forms need to be shown and add a summaryStep in the dropin
*
* @param forms
* @param requiredFields
* @param optionalFields
* @param skipSummary
*/
export declare const getRequiredForms: (forms: FormList, requiredFields: Record<string, string[]> | undefined, optionalFields: Record<string, string[]> | undefined, skipSummary?: boolean) => FormModel[];
/**
* @description Based on validity of fields from formValidity and existence of validationErrors/Verification errors from backend determine whether the forms needs to be shown as valid or not
*
* @param forms
* @param formValidity
* @param problems
*/
export declare const addValidityToForms: (forms: FormModel[], formValidity: Record<string, boolean> | undefined, problems: EntityProblems | undefined) => FormModelWithValidity[];