export type CreateApiApiHistoryHistoryIdItemsItemIdDisableArgs = {historyId: string, itemId: string}; export type CreateApiApiHistoryHistoryIdItemsItemIdDisableOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disable history query item * * POST /api/history/{historyId}/items/{itemId}/disable */ export const createApiApiHistoryHistoryIdItemsItemIdDisable = async (args: CreateApiApiHistoryHistoryIdItemsItemIdDisableArgs, options?: CreateApiApiHistoryHistoryIdItemsItemIdDisableOptions) => { 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))}/items/${encodeURIComponent(String(args.itemId))}/disable${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };