export type DeleteApiV1AdminWorkspacesWorkspaceUuidArgs = {workspace_uuid: string}; export type DeleteApiV1AdminWorkspacesWorkspaceUuidOptions = {baseUrl?: string | undefined, AdminApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Workspaces * * DELETE /v1/admin/workspaces/{workspace_uuid} */ export const deleteApiV1AdminWorkspacesWorkspaceUuid = async (args: DeleteApiV1AdminWorkspacesWorkspaceUuidArgs, options?: DeleteApiV1AdminWorkspacesWorkspaceUuidOptions) => { const {baseUrl = "https://api.mistral.ai", fetch: fetchFn = fetch, AdminApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (AdminApiKey !== undefined) headers.set('authorization', `Bearer ${AdminApiKey}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/admin/workspaces/${encodeURIComponent(String(args.workspace_uuid))}${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 };