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.

16 lines (15 loc) 1.05 kB
/** * Type exports for the Invitations API. * This is the only file that should import from the contract. */ import type { ExtractStrict } from 'type-fest'; import type { EndpointFromPaths } from '../types'; import type { components, paths } from './invitations.contract'; type InvitationsEndpoints = EndpointFromPaths<keyof paths>; export type CreateInvitationEndpoint = ExtractStrict<InvitationsEndpoints, `legalEntities/${string}/invitations/associations/${string}`>; export type CreateInvitationRequest = components['schemas']['CreateInvitationRequest']; export type InvitationResponse = Required<components['schemas']['InvitationResponse']>; export type GetInvitationStatusEndpoint = ExtractStrict<InvitationsEndpoints, `legalEntities/${string}/invitations/associations/${string}/status`>; export type InvitationStatusResponse = components['schemas']['InvitationStatusResponse']; export type WithdrawInvitationEndpoint = ExtractStrict<InvitationsEndpoints, `legalEntities/${string}/invitations/associations/${string}/withdraw`>; export {};