export type DeleteApiAnnotationsIdArgs = {id: string}; export type DeleteApiAnnotationsIdOptions = {baseUrl?: string | undefined, Auth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes an annotation by its ID. * * DELETE /annotations/{id} */ export const deleteApiAnnotationsId = async (args: DeleteApiAnnotationsIdArgs, options?: DeleteApiAnnotationsIdOptions) => { const {baseUrl = "https://api.axiom.co/v2", fetch: fetchFn = fetch, Auth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Auth !== undefined) headers.set('authorization', `Bearer ${Auth}`) const url = `${baseUrl.replace(/\/+$/, '')}/annotations/${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 };