export type DeleteApiRestOperations10IncidentsIncidentIdArgs = {incidentId: string}; export type DeleteApiRestOperations10IncidentsIncidentIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a Incident by ID * * DELETE /rest/operations/1.0/incidents/{incidentId} */ export const deleteApiRestOperations10IncidentsIncidentId = async (args: DeleteApiRestOperations10IncidentsIncidentIdArgs, options?: DeleteApiRestOperations10IncidentsIncidentIdOptions) => { const {baseUrl = "https://your-domain.atlassian.net", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/rest/operations/1.0/incidents/${encodeURIComponent(String(args.incidentId))}${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 };