export type DeleteApiResourcesApplicantsApplicantIdInfoCompanyInfoBeneficiariesBeneficiaryApplicantIdArgs = {applicantId: string, beneficiaryApplicantId: string}; export type DeleteApiResourcesApplicantsApplicantIdInfoCompanyInfoBeneficiariesBeneficiaryApplicantIdOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Unlink beneficiary from company (KYB 1.0) * * DELETE /resources/applicants/{applicantId}/info/companyInfo/beneficiaries/{beneficiaryApplicantId} */ export const deleteApiResourcesApplicantsApplicantIdInfoCompanyInfoBeneficiariesBeneficiaryApplicantId = async (args: DeleteApiResourcesApplicantsApplicantIdInfoCompanyInfoBeneficiariesBeneficiaryApplicantIdArgs, options?: DeleteApiResourcesApplicantsApplicantIdInfoCompanyInfoBeneficiariesBeneficiaryApplicantIdOptions) => { const {baseUrl = "https://api.sumsub.com", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (sec0 !== undefined) headers.set("X-App-Token", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/resources/applicants/${encodeURIComponent(String(args.applicantId))}/info/companyInfo/beneficiaries/${encodeURIComponent(String(args.beneficiaryApplicantId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };