UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

46 lines 2.58 kB
import type Database from 'better-sqlite3'; import type { AiQuery } from '../../models/AiQuery'; import { type BrowserStorageState } from '../../models/BrowserStorageState'; import type { FlowMetadata, FlowsQuery } from '../../models/FlowMetadata'; import type { PaginatedResult } from '../../models/PaginatedResult'; import type { ToolCall } from '../../models/ToolCall'; import type { VideoSegment } from '../../models/VideoSegment'; import type { FlowsPersistence } from './FlowsPersistence'; /** * A persistence implementation that uses SQLite for all data storage, including binary files. */ export declare class FlowsPersistenceSqlite implements FlowsPersistence { private readonly db; private static readonly VIDEO_MIME_TYPE; private static readonly BROWSER_STATE_FILE_ID; private static readonly VIDEO_FILE_ID; private constructor(); static create(db: Database.Database): Promise<FlowsPersistenceSqlite>; setEnvironmentDatum(key: string, value: string): Promise<void>; deleteEnvironmentDatum(key: string): Promise<void>; getEnvironmentDatum(key: string): Promise<string | undefined>; /** * Get all environment data. */ getEnvironmentData(): Promise<Record<string, string>>; setFlowMetadata(flowMetadata: FlowMetadata): Promise<void>; getFlowMetadataById(flowId: string): Promise<FlowMetadata>; getFlowMetadataByName(flowName: string): Promise<FlowMetadata>; getFlowsMetadata(query: FlowsQuery): Promise<PaginatedResult<FlowMetadata>>; saveScreenShot(flowId: string, bytes: Buffer): Promise<string>; getScreenShot(flowId: string, screenShotId: string): Promise<Buffer | null>; setToolCall(flowId: string, toolCall: ToolCall): Promise<void>; getToolCalls(flowId: string): Promise<ToolCall[]>; deleteToolCall(flowId: string, toolCallId: string): Promise<void>; setAiQuery(flowId: string, aiQuery: AiQuery): Promise<void>; getAiQueries(flowId: string): Promise<AiQuery[]>; setVideo(flowId: string, bytes: Buffer): Promise<void>; getVideoSegment(flowId: string, startOffset: number, length: number): Promise<VideoSegment | null>; getFlowFile(flowId: string, fileId: string): Promise<Buffer | null>; setFlowFile(flowId: string, fileId: string, fileBytes: Buffer): Promise<void>; setBrowserState(flowId: string, browserState: BrowserStorageState): Promise<void>; getBrowserState(flowId: string): Promise<BrowserStorageState | null>; deleteFlow(flowId: string): Promise<void>; close(): void; } //# sourceMappingURL=FlowsPersistenceSqlite.d.ts.map