UNPKG

@adyen/kyc-components

Version:

`adyen-kyc-components` provides the required pieces to build an onboarding flow based on a legal entity. To onboard and verify users, you need to create a user interface (UI) to collect user data. To speed up building your integration, Adyen offers onboar

63 lines (62 loc) 5.55 kB
import type { CompanySchema } from '../../components/Business/forms/Company/types'; import type { HighExposureSchema } from '../../components/Dropins/HighExposureDropin/types'; import type { FinancialInformationSchema } from '../../components/FinancialInformation/types'; import type { SolePropSchema } from '../../components/SoleProprietorship/forms/SoleProp/types'; import type { TrustSchema } from '../../components/Trust/forms/Trust/types'; import type { Attachment, PageType } from '../../core/models/api/attachment'; import type { Document } from '../../core/models/api/document'; import type { FinancialReport } from '../../core/models/api/financialReport'; import type { Individual } from '../../core/models/api/individual'; import type { ExistingLegalEntity, LegalEntity } from '../../core/models/api/legal-entity'; import type { ExistingTransferInstrument, TransferInstrument } from '../../core/models/api/transfer-instrument'; import type { FileSchema } from '../../core/models/file'; import type { SourceOfFundsSchema } from '../../components/Dropins/SourceOfFundsDropin/types'; import type { BusinessLinesType } from '../../core/models/api/source-of-funds'; import type { PayoutDetailsSchema } from '../../components/BankAccount/forms/PayoutDetails/types'; import type { BankDocumentSchema } from '../../components/BankAccount/forms/BankDocument/types'; import type { PersonalDetailsSchema } from '../../components/Individual/forms/Individual/PersonalDetails/types'; import type { IndividualSchema } from '../../components/Individual/forms/Individual/types'; export declare const adjustIdentificationData: (data: PersonalDetailsSchema, apiData: Individual["identificationData"]) => Individual["identificationData"]; /** * Easy to use function for mapping transferInstrument response to payout account details component data * @param transferInstrument - a transferInstrument the same as found in API response * @returns a Payout Details person data */ export declare const mapTransferInstrumentToPayoutAccount: (transferInstrument: ExistingTransferInstrument) => PayoutDetailsSchema; /** * Easy to use function for mapping payout account details component data to transferInstrument * @param payoutDetails - Details person data * @returns transferInstrument - a transferInstrument the same as found in API response */ export declare const mapPayoutDetailsToTransferInstrument: ({ data, legalEntity, }: { data: PayoutDetailsSchema; legalEntity: ExistingLegalEntity; }) => TransferInstrument; export declare const mapFinancialReportsToFinancialInformation: (financialReports: FinancialReport[], withReportedValueOption?: boolean) => FinancialInformationSchema; export declare const mapFinancialInformationToFinancialReport: ({ currency, financialReportingDate, numberOfEmployees, netAssets, annualTurnover, }: FinancialInformationSchema) => FinancialReport; export declare const mapLegalEntityToIndividual: (legalEntity: ExistingLegalEntity | undefined, isChangingType?: boolean) => IndividualSchema; export declare const mapIndividualToLegalEntity: (data: IndividualSchema) => LegalEntity; export declare const mapLegalEntityToCompany: (legalEntity: LegalEntity) => CompanySchema; export declare const mapCompanyToLegalEntity: (data: CompanySchema, isNumberAbsentEnabled?: boolean) => LegalEntity; export declare const mapLegalEntityToTrust: (legalEntity: LegalEntity) => TrustSchema; export declare const mapTrustToLegalEntity: (data: TrustSchema) => LegalEntity; export declare const mapLegalEntityToHighExposure: (legalEntity: LegalEntity) => HighExposureSchema; export declare const mapHighExposureToLegalEntity: (data: HighExposureSchema) => LegalEntity; export declare const mapLegalEntityToSoleProp: (legalEntity: LegalEntity) => SolePropSchema; export declare const mapSolePropToLegalEntity: (data: SolePropSchema) => LegalEntity; export type IndividualDocumentFields = Pick<IndividualSchema, 'idDocument' | 'proofOfResidency' | 'proofOfNationalId' | 'proofOfRelationship'>; export declare const getPage: ({ attachments }: Document, pageType?: PageType) => Attachment; export declare const getPageName: (document: Document, pageType?: PageType) => string; export declare const mapIndividualDocumentToApiDocument: (data: IndividualSchema, entityId: string) => Promise<Document[]>; export declare const mapExistingFile: (name: string) => FileSchema; export declare const mapApiDocumentToIndividualDocuments: (entityId: string) => IndividualDocumentFields; export declare const mapCompanyDocumentToApiDocument: (data: CompanySchema, entityId: string) => Promise<Document[]>; export declare const mapApiDocumentToCompanyDocuments: (entityId: string) => CompanySchema; export declare const mapTrustDocumentToApiDocument: (data: TrustSchema, entityId: string) => Promise<Document[]>; export declare const mapApiDocumentToTrustDocument: (entityId: string) => TrustSchema; export declare const mapSolePropDocumentToApiDocument: (data: SolePropSchema, entityId: string) => Promise<Document[]>; export declare const mapApiDocumentToSolePropDocuments: (entityId: string) => SolePropSchema; export declare const mapPayoutDocumentsToApiDocuments: (data: PayoutDetailsSchema, entityId: string) => Promise<Document>; export declare const mapApiDocumentToPayoutDocuments: (entityId: string) => BankDocumentSchema; export declare const mapSourceOfFundToSourceOfFundsSchema: (businessLine: BusinessLinesType) => SourceOfFundsSchema; export declare const mapSourceOfFundsSchemaToLegalEntity: (data: SourceOfFundsSchema) => LegalEntity;