/** * @file WorkspaceService — 工作空间 CRUD * @description 基于 WorkspaceStore,提供工作空间增删改查及关联数据清理 */ import type { WorkspaceEntity } from '../types.js'; export declare function getWorkspaces(): WorkspaceEntity[]; export declare function getWorkspace(id: number): WorkspaceEntity | undefined; /** * 确保存在至少一个默认工作空间。 * 首次启动(无任何工作空间)时自动创建 "默认空间"。 */ export declare function ensureDefaultWorkspace(): void; export declare function createWorkspace(data: { name: string; description?: string; color?: string; icon?: string; }): WorkspaceEntity; export declare function updateWorkspace(id: number, data: Partial>): WorkspaceEntity | undefined; /** * 删除工作空间 * 删除后其下的线程和自动化任务的 workspaceId 将被置为 undefined(归入"未分组") */ export declare function deleteWorkspace(id: number): boolean; /** * 刷新工作空间的线程计数(线程增删时调用) */ export declare function refreshThreadCount(workspaceId: number): void; /** * 刷新工作空间的自动化任务计数 */ export declare function refreshAutomationCount(workspaceId: number): void; //# sourceMappingURL=workspace.service.d.ts.map