/* auto-generated by NAPI-RS */ /* eslint-disable */ export class SqliteConnection { constructor(path: string) connect(): Promise addBlob(key: string, blob: Uint8Array): Promise getBlob(key: string): Promise deleteBlob(key: string): Promise getBlobKeys(): Promise> getUpdates(docId?: string | undefined | null): Promise> deleteUpdates(docId?: string | undefined | null): Promise getUpdatesCount(docId?: string | undefined | null): Promise getAllUpdates(): Promise> insertUpdates(updates: Array): Promise replaceUpdates(docId: string | undefined | null, updates: Array): Promise getServerClock(key: string): Promise setServerClock(key: string, data: Uint8Array): Promise getServerClockKeys(): Promise> clearServerClock(): Promise delServerClock(key: string): Promise getSyncMetadata(key: string): Promise setSyncMetadata(key: string, data: Uint8Array): Promise getSyncMetadataKeys(): Promise> clearSyncMetadata(): Promise delSyncMetadata(key: string): Promise initVersion(): Promise setVersion(version: number): Promise getMaxVersion(): Promise close(): Promise get isClose(): boolean static validate(path: string): Promise migrateAddDocId(): Promise } export interface BlobRow { key: string data: Buffer timestamp: Date } export interface InsertRow { docId?: string data: Uint8Array } export function mintChallengeResponse(resource: string, bits?: number | undefined | null): Promise export interface UpdateRow { id: number timestamp: Date data: Buffer docId?: string } export enum ValidationResult { MissingTables = 0, MissingDocIdColumn = 1, MissingVersionColumn = 2, GeneralError = 3, Valid = 4 } export function verifyChallengeResponse(response: string, bits: number, resource: string): Promise