export type DeleteApiApiPublicV1IncidentsIncidentNumberNotesNoteNameArgs = {'X-VO-Api-Id': string, 'X-VO-Api-Key': string, incidentNumber: number, noteName: string}; export type DeleteApiApiPublicV1IncidentsIncidentNumberNotesNoteNameOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a Note * * DELETE /api-public/v1/incidents/{incidentNumber}/notes/{noteName} */ export const deleteApiApiPublicV1IncidentsIncidentNumberNotesNoteName = async (args: DeleteApiApiPublicV1IncidentsIncidentNumberNotesNoteNameArgs, options?: DeleteApiApiPublicV1IncidentsIncidentNumberNotesNoteNameOptions) => { const {baseUrl = "https://api.victorops.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-VO-Api-Id'] != null) headers.set("X-VO-Api-Id", String(args['X-VO-Api-Id'])) if (args['X-VO-Api-Key'] != null) headers.set("X-VO-Api-Key", String(args['X-VO-Api-Key'])) const url = `${baseUrl.replace(/\/+$/, '')}/api-public/v1/incidents/${encodeURIComponent(String(args.incidentNumber))}/notes/${encodeURIComponent(String(args.noteName))}${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 };