export type DeleteApiApiHistoryHistoryIdExploreSessionIdArgs = {historyId: string, sessionId: string}; export type DeleteApiApiHistoryHistoryIdExploreSessionIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Close south explore session * * DELETE /api/history/{historyId}/explore/{sessionId} */ export const deleteApiApiHistoryHistoryIdExploreSessionId = async (args: DeleteApiApiHistoryHistoryIdExploreSessionIdArgs, options?: DeleteApiApiHistoryHistoryIdExploreSessionIdOptions) => { const {baseUrl = "http://localhost:2223", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/history/${encodeURIComponent(String(args.historyId))}/explore/${encodeURIComponent(String(args.sessionId))}${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 };