export type DeleteApiTasksTaskIdEstimateArgs = {task_id: string}; export type DeleteApiTasksTaskIdEstimateOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Task Estimate * * DELETE /tasks/{task_id}/estimate */ export const deleteApiTasksTaskIdEstimate = async (args: DeleteApiTasksTaskIdEstimateArgs, options?: DeleteApiTasksTaskIdEstimateOptions) => { const {baseUrl = "https://api.everhour.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-Api-Key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/tasks/${encodeURIComponent(String(args.task_id))}/estimate${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 };