mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 12:45:55 +08:00
fix(electron): export and import (#9767)
This commit is contained in:
Vendored
+14
-1
@@ -1,11 +1,18 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
export declare class DocStorage {
|
||||
constructor(path: string)
|
||||
validate(): Promise<boolean>
|
||||
setSpaceId(spaceId: string): Promise<void>
|
||||
}
|
||||
|
||||
export declare class DocStoragePool {
|
||||
constructor()
|
||||
/** Initialize the database and run migrations. */
|
||||
connect(universalId: string, path: string): Promise<void>
|
||||
disconnect(universalId: string): Promise<void>
|
||||
setSpaceId(universalId: string, spaceId: string): Promise<void>
|
||||
disconnect(universalId: string): Promise<void>
|
||||
checkpoint(universalId: string): Promise<void>
|
||||
pushUpdate(universalId: string, docId: string, update: Uint8Array): Promise<Date>
|
||||
getDocSnapshot(universalId: string, docId: string): Promise<DocRecord | null>
|
||||
setDocSnapshot(universalId: string, snapshot: DocRecord): Promise<boolean>
|
||||
@@ -39,6 +46,7 @@ export declare class SqliteConnection {
|
||||
deleteBlob(key: string): Promise<void>
|
||||
getBlobKeys(): Promise<Array<string>>
|
||||
getUpdates(docId?: string | undefined | null): Promise<Array<UpdateRow>>
|
||||
getDocTimestamps(): Promise<Array<DocTimestampRow>>
|
||||
deleteUpdates(docId?: string | undefined | null): Promise<void>
|
||||
getUpdatesCount(docId?: string | undefined | null): Promise<number>
|
||||
getAllUpdates(): Promise<Array<UpdateRow>>
|
||||
@@ -93,6 +101,11 @@ export interface DocRecord {
|
||||
timestamp: Date
|
||||
}
|
||||
|
||||
export interface DocTimestampRow {
|
||||
docId?: string
|
||||
timestamp: Date
|
||||
}
|
||||
|
||||
export interface DocUpdate {
|
||||
docId: string
|
||||
timestamp: Date
|
||||
|
||||
Reference in New Issue
Block a user