export type DeleteApiV1WorkspacesWorkspaceUuidArgs = {workspace_uuid: string}; export type DeleteApiV1WorkspacesWorkspaceUuidOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Workspace * * DELETE /v1/workspaces/{workspace_uuid} * * Also accepts auth: AuthBearer */ export const deleteApiV1WorkspacesWorkspaceUuid = async (args: DeleteApiV1WorkspacesWorkspaceUuidArgs, options?: DeleteApiV1WorkspacesWorkspaceUuidOptions) => { const {baseUrl = "https://api.aymara.ai", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set("x-api-key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/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 };