UNPKG

@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.

39 lines (38 loc) 1.62 kB
import type { RetrieveAddressSuccessResponse } from '../address/address.types'; import type { CleanseAPIRequestPayload } from '../../core/models/api/contracts'; import type { AddressSchema } from '../../components/Shared/forms/Address/types'; import type { QueryOptions } from '../types'; export type QueryKeyAddressCleanse = ['addressCleanse', CleanseAPIRequestPayload]; export declare const useAddressCleanse: (data: CleanseAPIRequestPayload, options?: QueryOptions<RetrieveAddressSuccessResponse>) => import("@tanstack/preact-query").UseQueryResult<{ city?: string; country: string; houseNumberOrName?: string; isPoBox?: boolean; line1?: string; line2?: string; line3?: string; locale?: string; multilocale?: import("./address.contract").components["schemas"]["AddressDetails"][]; poBox?: boolean; postalCode?: string; stateOrProvince?: string; street?: string; street2?: string; }, Error>; export declare const useAddressCleanseImperatively: () => (data: CleanseAPIRequestPayload) => Promise<{ city?: string; country: string; houseNumberOrName?: string; isPoBox?: boolean; line1?: string; line2?: string; line3?: string; locale?: string; multilocale?: import("./address.contract").components["schemas"]["AddressDetails"][]; poBox?: boolean; postalCode?: string; stateOrProvince?: string; street?: string; street2?: string; }>; export declare const formatAddressForCleanse: ({ address, city, country, postalCode, }: Pick<AddressSchema, "address" | "city" | "country" | "postalCode">) => string | undefined;