export type CreateApiResourcesApplicantsApplicantIdEkycSubmitOldArgs = {applicantId: string, body: {info: {firstName?: string | undefined, middleName?: string | undefined, lastName?: string | undefined, aliasName?: string | undefined, legalName?: string | undefined, gender?: ('M' | 'F' | 'X') | undefined, dob?: string | undefined, placeOfBirth?: string | undefined, countryOfBirth?: string | undefined, stateOfBirth?: string | undefined, country?: string | undefined, nationality?: string | undefined, addresses?: (Array<{country?: string | undefined, postCode?: string | undefined, town?: string | undefined, street?: string | undefined, subStreet?: string | undefined, state?: string | undefined, buildingName?: string | undefined, flatNumber?: string | undefined, buildingNumber?: string | undefined, formattedAddress?: string | undefined}>) | undefined, tin?: string | undefined}}}; export type CreateApiResourcesApplicantsApplicantIdEkycSubmitOldOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Submit applicant data for non-doc verification * * POST /resources/applicants/{applicantId}/ekyc/submit (old) */ export const createApiResourcesApplicantsApplicantIdEkycSubmitOld = async (args: CreateApiResourcesApplicantsApplicantIdEkycSubmitOldArgs, options?: CreateApiResourcesApplicantsApplicantIdEkycSubmitOldOptions) => { 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))}/ekyc/submit (old)${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 };