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.

30 lines (29 loc) 2.93 kB
import type { ExistingLegalEntity } from '../core/models/api/legal-entity'; import type { LegalEntityAssociation, NomineeType } from '../core/models/api/legal-entity-association'; import { type LegalEntityType } from '../core/models/api/legal-entity-type'; import { type TaskType } from '../stores/globalStore/taskTypes'; import type { AccountHolderOption } from '../types/accountHolder'; import type { CountryCode } from '../types/datasets/country-code'; import type { CapabilityProblems } from '../types/errors/capability-problems'; import type { EntityProblems } from '../types/errors/entity-problems'; import type { BasicDetailsSchema } from '../components/Individual/forms/BasicDetails/BasicDetails.types'; /** * Returns the entity associations from the root LE which have a {@link LegalEntityAssociation.associatorId} matching the given `legalEntityId`. * Can be used to find members of a trust, or decision makers of a trustee company. * * @param rootLE the root legal entity which holds all the entity associations * @param legalEntityId the ID of the legal entity whose associations we wish to find */ export declare const getDirectEntityAssociations: (rootLE: ExistingLegalEntity, legalEntityId: string) => LegalEntityAssociation[]; export declare const getOwnEntityAssociations: (legalEntity: ExistingLegalEntity) => LegalEntityAssociation[]; export declare const getOwnSoleProprietorshipIdArray: (legalEntity: ExistingLegalEntity) => string[]; export declare const hasSolePropInLegalEntity: (rootLegalEntity: ExistingLegalEntity) => boolean; export declare const getOwnSolePropProblems: (rootLegalEntity: ExistingLegalEntity, capabilityProblems: CapabilityProblems) => EntityProblems | undefined; export declare const hasOwnEntityAssociationOfType: (type: LegalEntityType, entityAssociations: LegalEntityAssociation[] | undefined, legalEntityId: string | undefined) => boolean; export declare const removeEntityAssociationByType: (type: LegalEntityType, entityAssociations: LegalEntityAssociation[], legalEntityId: string | undefined) => LegalEntityAssociation[]; export declare const filterOutUnwantedAssociationsIfRootLE: (taskType: TaskType, legalEntity: ExistingLegalEntity | undefined, accountHolder: AccountHolderOption | undefined) => LegalEntityAssociation[] | undefined; export declare const getLegalRepresentative: (legalEntityResponse: ExistingLegalEntity) => LegalEntityAssociation | undefined; export declare const allowedCountriesForNominee: CountryCode[]; export declare const attachNomineeToRole: (existingEntityAssociation: LegalEntityAssociation, country: CountryCode, nominee?: NomineeType) => LegalEntityAssociation; export declare const getNomineeFromAssociation: (entityAssociations: LegalEntityAssociation[], basicDetails: BasicDetailsSchema) => BasicDetailsSchema; export declare const hasNomineesChanged: (basicDetails?: BasicDetailsSchema, nomineesSubmitted?: NomineeType) => boolean;