@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.
23 lines (22 loc) • 1.37 kB
TypeScript
import { skipToken } from '@tanstack/preact-query';
import type { LegalEntityType } from '../../core/models/api/legal-entity-type';
import type { CountryCode } from '../../types/datasets/country-code';
import type { QueryOptions } from '../types';
import type { ConfigurationsResponse } from './configurations.types';
export type LeType = LegalEntityType;
export type QueryKeyScenarios = ['scenarios', LeType, CountryCode];
/**
* Based on country and capabilities the forms will be different. Since different combinations
* of country+capabilities often have the same result, we group them in scenarios.
*
* Note: this might not be the exact truth, and during the form completion
* some differences might arise, but it is true as a starting point.
*
* @param countryCode - need to be dynamic, might not match the legalEntityId's countryCode
* @param legalEntityType - needs to be dynamic, might not match the legalEntityId's legalEntityType
*/
export declare const useScenarios: (countryCode: CountryCode | typeof skipToken, legalEntityType: LeType, options?: QueryOptions<ConfigurationsResponse>) => {
isLoading: boolean;
isError: boolean;
data: ("L0" | "L1" | "L_TAXINFO" | "L1_ID" | "L1_IDO" | "L1_NAT" | "L1_IDDOC" | "L_PH" | "L_MOTION" | "L" | "L_REGDOC" | "L_TAXDOC" | "L_PROOFOFADDRESS" | "L_BAFIN" | "L_BANKING" | "L_ISSUING")[] | undefined;
};