export type DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDArgs = {workspaceID: number, indexID: number}; export type DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * [Public] IConceptualIndexService * * DELETE /conceptual-analytics/v1/workspaces/{workspaceID}/indexes/{indexID} */ export const deleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexID = async (args: DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDArgs, options: DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/conceptual-analytics/v1/workspaces/${encodeURIComponent(String(args.workspaceID))}/indexes/${encodeURIComponent(String(args.indexID))}${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 };