/* auto-generated by NAPI-RS */ /* eslint-disable */ export class Doc { get guid(): string; } export class Storage { /** Create a storage instance and establish connection to persist store. */ static connect( database: string, debugOnlyAutoMigrate?: boolean | undefined | null ): Promise; /** Get a workspace by id */ getWorkspace(workspaceId: string): Promise; /** Create a new workspace with a init update. */ createWorkspace(workspaceId: string, init: Buffer): Promise; /** Delete a workspace. */ deleteWorkspace(workspaceId: string): Promise; /** Sync doc updates. */ sync(workspaceId: string, guid: string, update: Buffer): Promise; /** Sync doc update with doc guid encoded. */ syncWithGuid(workspaceId: string, update: Buffer): Promise; /** Load doc as update buffer. */ load(guid: string): Promise; /** Fetch a workspace blob. */ blob(workspaceId: string, name: string): Promise; /** Upload a blob into workspace storage. */ uploadBlob(workspaceId: string, blob: Buffer): Promise; /** Workspace size taken by blobs. */ blobsSize(workspaceId: string): Promise; } export class Workspace { get doc(): Doc; isEmpty(): boolean; get id(): string; get clientId(): string; search(query: string): Array; } export interface Blob { contentType: string; lastModified: string; size: number; data: Buffer; } export interface SearchResult { blockId: string; score: number; }