@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.
18 lines (17 loc) • 922 B
TypeScript
import type { DataSet } from '../core/models/api/data-set';
import type { CountryCode } from '../types/datasets/country-code';
import type { ProvinceCode } from '../types/datasets/province-code';
import type { StateCode } from '../types/datasets/state-code';
export type DatasetIdentifier = 'countries' | `states/${CountryCode}`;
export declare const datasetIdentifier: {
readonly country: "countries";
readonly state: (countryCode: CountryCode) => DatasetIdentifier;
};
export type DatasetUtil = {
getCountryName: (countryCode: CountryCode | undefined) => string | null;
getStateName: (stateCode: StateCode | ProvinceCode, countryCode: CountryCode) => string | null;
setDataset: (datasetKey: string, dataset: DataSet) => void;
getDataset: (identifier: string) => DataSet;
getDatasetKey: (identifier: string) => string;
};
export declare function datasetUtilities(locale: string): DatasetUtil;