@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.
12 lines (11 loc) • 783 B
TypeScript
import type { Address } from '../core/models/api/address';
import type { AddressSchema } from '../components/Shared/forms/Address/types';
import type { DatasetUtil } from './datasetUtil';
/**
* Maps an Address object from the API model to the local AddressSchema used by forms.
* This is the single source of truth for this conversion.
* @param address - The Address object from the API (uses `street`, `street2`).
* @returns An AddressSchema object for use in UI components (uses `address`, `otherAddressInformation`).
*/
export declare const mapApiAddressToSchema: (address: Address) => AddressSchema;
export declare const addressToString: ({ address, otherAddressInformation, postalCode, city, stateOrProvince, country }: AddressSchema, datasetUtils: DatasetUtil) => string;