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.

26 lines (25 loc) 1.35 kB
import type { ExtractStrict } from 'type-fest'; import type { EndpointFromPaths, QueryOptions } from '../types'; import type { components, paths } from './termsOfService.contract'; export type TermsOfServiceRequest = components['schemas']['TermsOfServiceDocumentRequest']; export type TermsOfServiceResponse = components['schemas']['TermsOfServiceDocumentResponse']; type TermsOfServiceEndpoints = EndpointFromPaths<keyof paths>; export type TermsOfServiceEndpoint = ExtractStrict<TermsOfServiceEndpoints, `legalEntities/${string}/termsOfService`>; export type QueryKeyTermsOfService = ['termsOfService', TermsOfServiceRequest]; export declare const getTermsOfService: (legalEntityId: string, baseUrl: string, data: TermsOfServiceRequest) => Promise<{ document?: string; id?: string; language?: string; termsOfServiceDocumentFormat?: string; termsOfServiceDocumentId?: string; type?: components["schemas"]["TermsOfServiceType"]; }>; export declare const useTermsOfService: (data: TermsOfServiceRequest, options?: QueryOptions<TermsOfServiceResponse>) => import("@tanstack/preact-query").UseQueryResult<{ document?: string; id?: string; language?: string; termsOfServiceDocumentFormat?: string; termsOfServiceDocumentId?: string; type?: components["schemas"]["TermsOfServiceType"]; }, Error>; export {};