export type CreateApiApiAmlVerificationV1DataloadingAssociatesArgs = {'Content-Type': string, Authorization: string, body: {verificationId: string, associateId: string, associateType: 'BENEFICIARY' | 'REPRESENTATIVE', associateName: string, associateSurname: string, associateBirthDate?: unknown | undefined, associateIdentityNumber?: string | undefined, associateCitizenship: unknown, associateCountryOfBirth: string, pepStatement?: ('true' | 'false') | undefined, verified?: ('true' | 'false') | undefined, externalVerificationData?: ({externalVerificationType: 'MOJEID_PL' | 'MOJEID_CZ' | 'BANKID_CZ' | 'EDO' | 'MYOBYWATEL' | 'BIOMETRIC_VERIFICATION_OCR', documentNumber: string, documentType: string, documentExpiryDate: unknown, identityNumber: string, nationality: string, dateOfBirth: unknown, secondDocumentNumber: string, secondDocumentType: string, secondDocumentExpiryDate: unknown, identityNumberSecondDocument: string, nationalitySecondDocument: string, dateOfBirthSecondDocument: unknown, authologicConversationID: string}) | undefined}}; export type CreateApiApiAmlVerificationV1DataloadingAssociatesOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Add Associates Data * * POST /api/aml-verification/v1/dataloading/associates */ export const createApiApiAmlVerificationV1DataloadingAssociates = async (args: CreateApiApiAmlVerificationV1DataloadingAssociatesArgs, options?: CreateApiApiAmlVerificationV1DataloadingAssociatesOptions) => { const {baseUrl = "https://secure.payu.com", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args['Content-Type'] != null) headers.set("Content-Type", String(args['Content-Type'])) if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/aml-verification/v1/dataloading/associates${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };