export type DeleteApiPluginsPlaybooksApiV0RunsIdTimelineEventIdArgs = {id: string, event_id: string}; export type DeleteApiPluginsPlaybooksApiV0RunsIdTimelineEventIdOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove a timeline event from the playbook run * * DELETE /plugins/playbooks/api/v0/runs/{id}/timeline/{event_id} */ export const deleteApiPluginsPlaybooksApiV0RunsIdTimelineEventId = async (args: DeleteApiPluginsPlaybooksApiV0RunsIdTimelineEventIdArgs, options?: DeleteApiPluginsPlaybooksApiV0RunsIdTimelineEventIdOptions) => { const {baseUrl = "http://localhost:8065/plugins/playbooks/api/v0", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/plugins/playbooks/api/v0/runs/${encodeURIComponent(String(args.id))}/timeline/${encodeURIComponent(String(args.event_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 };