import type { JaitDB } from "../db/connection.js";
export interface CreateWorkspaceParams {
    userId?: string;
    title?: string;
    rootPath?: string | null;
    nodeId?: string | null;
    metadata?: Record<string, unknown>;
}
export declare class WorkspaceService {
    private db;
    constructor(db: JaitDB);
    create(params?: CreateWorkspaceParams): {
        id: string;
        userId: string | null;
        title: string | null;
        rootPath: string | null;
        nodeId: string | null;
        createdAt: string;
        lastActiveAt: string;
        status: string | null;
        metadata: string | null;
    };
    list(status?: string, userId?: string, limit?: number): {
        id: string;
        userId: string | null;
        title: string | null;
        rootPath: string | null;
        nodeId: string | null;
        createdAt: string;
        lastActiveAt: string;
        status: string | null;
        metadata: string | null;
    }[];
    listWithSessions(userId?: string, status?: string, limit?: number): {
        workspaces: {
            sessions: {
                id: string;
                userId: string | null;
                workspaceId: string | null;
                name: string | null;
                workspacePath: string | null;
                createdAt: string;
                lastActiveAt: string;
                status: string | null;
                metadata: string | null;
            }[];
            id: string;
            userId: string | null;
            title: string | null;
            rootPath: string | null;
            nodeId: string | null;
            createdAt: string;
            lastActiveAt: string;
            status: string | null;
            metadata: string | null;
        }[];
        hasMore: boolean;
    };
    getById(id: string, userId?: string): {
        id: string;
        userId: string | null;
        title: string | null;
        rootPath: string | null;
        nodeId: string | null;
        createdAt: string;
        lastActiveAt: string;
        status: string | null;
        metadata: string | null;
    } | undefined;
    getOrCreateForRoot(params: CreateWorkspaceParams): {
        id: string;
        userId: string | null;
        title: string | null;
        rootPath: string | null;
        nodeId: string | null;
        createdAt: string;
        lastActiveAt: string;
        status: string | null;
        metadata: string | null;
    };
    touch(id: string): void;
    update(id: string, data: {
        title?: string;
        rootPath?: string | null;
        nodeId?: string | null;
        metadata?: Record<string, unknown>;
    }, userId?: string): void;
    archive(id: string, userId?: string): void;
    restore(id: string, userId?: string): void;
    delete(id: string, userId?: string): void;
    /** Delete (soft) all archived workspaces for a user. Returns count of affected rows. */
    deleteArchived(userId: string): number;
    getActiveSessionCounts(userId: string): Map<string, number>;
}
//# sourceMappingURL=workspaces.d.ts.map