import type { CellType, CellUpdateAttrsType, CellErrorType } from '@srcbook/shared'; import type { SessionType } from './types.mjs'; export declare function createSession(srcbookDir: string): Promise; export declare function deleteSessionByDirname(dirName: string): Promise; export declare function listSessions(): Promise>; export declare function updateSession(session: SessionType, updates: Partial, flush?: boolean): Promise; export declare function exportSrcmdFile(session: SessionType, destinationPath: string): Promise; export declare function findSession(id: string): Promise; type UpdateResultType = { success: true; cell: CellType; } | { success: false; errors: CellErrorType[]; }; export declare function updateCell(session: SessionType, cell: CellType, updates: CellUpdateAttrsType): Promise; export declare function sessionToResponse(session: SessionType): { id: string; cells: ({ id: string; type: "title"; text: string; } | { id: string; type: "markdown"; text: string; } | { id: string; type: "package.json"; status: "idle" | "running"; source: string; filename: "package.json"; } | { id: string; type: "code"; status: "idle" | "running"; source: string; filename: string; language: "typescript" | "javascript"; })[]; metadata: { language: "typescript" | "javascript"; }; dir: string; openedAt: number; }; export declare function readPackageJsonContentsFromDisk(session: SessionType): Promise; export declare function findCell(session: SessionType, id: string): { id: string; type: "title"; text: string; } | { id: string; type: "markdown"; text: string; } | { id: string; type: "package.json"; status: "idle" | "running"; source: string; filename: "package.json"; } | { id: string; type: "code"; status: "idle" | "running"; source: string; filename: string; language: "typescript" | "javascript"; } | undefined; export declare function replaceCell(session: SessionType, cell: CellType): ({ id: string; type: "title"; text: string; } | { id: string; type: "markdown"; text: string; } | { id: string; type: "package.json"; status: "idle" | "running"; source: string; filename: "package.json"; } | { id: string; type: "code"; status: "idle" | "running"; source: string; filename: string; language: "typescript" | "javascript"; })[]; export declare function insertCellAt(session: SessionType, cell: CellType, index: number): ({ id: string; type: "title"; text: string; } | { id: string; type: "markdown"; text: string; } | { id: string; type: "package.json"; status: "idle" | "running"; source: string; filename: "package.json"; } | { id: string; type: "code"; status: "idle" | "running"; source: string; filename: string; language: "typescript" | "javascript"; })[]; export declare function removeCell(session: SessionType, id: string): ({ id: string; type: "title"; text: string; } | { id: string; type: "markdown"; text: string; } | { id: string; type: "package.json"; status: "idle" | "running"; source: string; filename: "package.json"; } | { id: string; type: "code"; status: "idle" | "running"; source: string; filename: string; language: "typescript" | "javascript"; })[]; export {}; //# sourceMappingURL=session.d.mts.map