export type DeleteApiEmployeeCheckArgs = {companyID: string, employeeCheckID: string}; export type DeleteApiEmployeeCheckOptions = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Employee Check * * DELETE /employeeCheck */ export const deleteApiEmployeeCheck = async (args: DeleteApiEmployeeCheckArgs, options?: DeleteApiEmployeeCheckOptions) => { const {baseUrl = "https://api.zeal.com", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/plain") if (args.companyID != null) query.append("companyID", String(args.companyID)) if (args.employeeCheckID != null) query.append("employeeCheckID", String(args.employeeCheckID)) if (sec0 !== undefined) headers.set("Authorization", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/employeeCheck${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 res.text() };