@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
44 lines (43 loc) • 3.13 kB
TypeScript
import type { CapabilityName } from '../../core/models/api/capability';
import { CompanyTypesValue } from '../../core/models/api/company-types-value';
import type { ExistingLegalEntity } from '../../core/models/api/legal-entity';
import { LegalEntityType } from '../../core/models/api/legal-entity-type';
import type { CountryCode } from '../../core/models/country-code';
import type { AccountHolderOption, LegalArrangementOption } from '../../core/types/AccountHolder.types';
import type { IconName } from '../ui/atoms/Icon/Icon';
import type { BusinessType, BusinessTypeMetadata, BusinessTypeModel, LegalArrangementModel, TrusteeType } from './types';
/**
* this is messy business logic
* we determine the legal entity type by the account holder
* however we have partnershipIncorporated;
* which shares the same account holder type as company (a subtype of company)
* we have to force the result of this function to 'legalArrangement' should organization.type is partnershipIncorporated
* could possibly be more of such cases in the future.
*
* @param businessTypeItems - list of BusinessTypeModel
* @param accountHolder - the entity we payout to
* @param legalEntityType - the type of legal entity
* @param companyTypesValue - the subtype of an organization see CompanyValuesType
*/
export declare const organizationTypesToSkipCompanyStructureForm: string[];
export declare const getBusinessType: (businessTypeItems: BusinessTypeMetadata, country: CountryCode, accountHolder: AccountHolderOption | undefined, legalEntityType?: LegalEntityType, companyTypesValue?: CompanyTypesValue | "", capabilities?: CapabilityName[]) => BusinessTypeModel | undefined;
export declare const businessTypeMetadata: BusinessTypeMetadata;
export declare const businessTypeIcons: Record<BusinessType, IconName>;
export declare const legalArrangementMetadata: Record<LegalArrangementOption, LegalArrangementModel>;
export declare const useSelectionOptions: (legalEntityResponse: ExistingLegalEntity) => {
allowedBusinessTypeOptions: BusinessType[];
adjustedBusinessTypeMetadata: {
legalArrangement: BusinessTypeModel;
company: BusinessTypeModel;
individual: BusinessTypeModel;
soleProprietorship: BusinessTypeModel;
};
legalArrangementOptions: LegalArrangementOption[];
};
/**
*
*/
export declare const mapLegalArrangementOptionToCompanyTypesValue: (legalArrangement: LegalArrangementOption | undefined) => CompanyTypesValue | undefined;
export declare const determineOrganizationTypeToUpdate: (targetLegalArrangement?: LegalArrangementOption, currentCompanyTypeValue?: CompanyTypesValue) => CompanyTypesValue | undefined;
export declare const getDefaultLegalArrangementOrSuborganizationType: (legalEntityResponse: ExistingLegalEntity | undefined, accountHolder: AccountHolderOption | undefined) => LegalArrangementOption | undefined;
export declare const getTargetLegalEntityType: (businessType: BusinessType | undefined, legalArrangement: LegalArrangementOption | undefined, trusteeType: TrusteeType | undefined, currentLegalEntityType: LegalEntityType | undefined) => LegalEntityType;