export type DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDJobArgs = {workspaceID: number, indexID: number}; export type DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDJobOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * [Public] IConceptualIndexService * * DELETE /conceptual-analytics/v1/workspaces/{workspaceID}/indexes/{indexID}/job */ export const deleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDJob = async (args: DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDJobArgs, options: DeleteApiConceptualAnalyticsV1WorkspacesWorkspaceIDIndexesIndexIDJobOptions) => { 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))}/job${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 };