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.

19 lines (18 loc) 1.36 kB
import type { ExtractStrict } from 'type-fest'; import type { SalesChannel } from '../../components/BusinessLines/fields/SalesChannels/types'; import type { EndpointFromPaths } from '../types'; import type { components, paths } from './pci.contract'; export type PciEndpoint = EndpointFromPaths<keyof paths>; export type PciQuestionnaireResponse = components['schemas']['PciQuestionnaireResponse']; export type PciQuestionnaireListEndpoint = ExtractStrict<PciEndpoint, `legalEntities/${string}/pci/questionnaires`>; export type PciQuestionnaireListResponse = components['schemas']['PciQuestionnairesResponse']; export type PciStatusEndpoint = ExtractStrict<PciEndpoint, `legalEntities/${string}/pci/signingRequired`>; export type PciStatusResponse = components['schemas']['PciSigningStatusResponse']; export type PciStatusRequest = Omit<components['schemas']['PciSigningStatusRequest'], 'additionalSalesChannels'> & { additionalSalesChannels?: SalesChannel[]; }; export type PciTemplateEndpoint = ExtractStrict<PciEndpoint, `legalEntities/${string}/pci/generatePciTemplates`>; export type PciTemplateResponse = Required<components['schemas']['GeneratePciDescriptionResponse']>; export type PciTemplateRequest = Omit<components['schemas']['GeneratePciDescriptionRequest'], 'additionalSalesChannels'> & { additionalSalesChannels?: SalesChannel[]; };