export type DeleteApiV2EscalationPathsIdArgs = {id: string}; export type DeleteApiV2EscalationPathsIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * DestroyPath Escalations V2 * * DELETE /v2/escalation_paths/{id} */ export const deleteApiV2EscalationPathsId = async (args: DeleteApiV2EscalationPathsIdArgs, options?: DeleteApiV2EscalationPathsIdOptions) => { const {baseUrl = "https:////api.incident.io", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v2/escalation_paths/${encodeURIComponent(String(args.id))}${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 };