export type PatchApiResourcesApplicantsApplicantIdFixedInfoCompanyInfoArgs = {applicantId: string, body: {companyName?: string | undefined, registrationNumber?: string | undefined, country?: string | undefined, alternativeNames?: Array | undefined, legalAddress?: string | undefined, address?: ({street?: string | undefined, subStreet?: string | undefined, town?: string | undefined, state?: string | undefined, postCode?: string | undefined, country?: string | undefined}) | undefined, incorporatedOn?: string | undefined, type?: string | undefined, email?: string | undefined, phone?: string | undefined, controlScheme?: string | undefined, applicantPosition?: string | undefined, taxId?: string | undefined, leiCode?: string | undefined, registrationLocation?: string | undefined, website?: string | undefined, postalAddress?: string | undefined, skippedTypes?: Array | undefined, noDocs?: boolean | undefined}}; export type PatchApiResourcesApplicantsApplicantIdFixedInfoCompanyInfoOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Change provided company data * * PATCH /resources/applicants/{applicantId}/fixedInfo/companyInfo */ export const patchApiResourcesApplicantsApplicantIdFixedInfoCompanyInfo = async (args: PatchApiResourcesApplicantsApplicantIdFixedInfoCompanyInfoArgs, options?: PatchApiResourcesApplicantsApplicantIdFixedInfoCompanyInfoOptions) => { const {baseUrl = "https://api.sumsub.com", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (sec0 !== undefined) headers.set("X-App-Token", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/resources/applicants/${encodeURIComponent(String(args.applicantId))}/fixedInfo/companyInfo${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };