mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(native): native reader for indexer (#14055)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { CrawlResult } from '@affine/nbstore';
|
||||
|
||||
export interface Blob {
|
||||
key: string;
|
||||
// base64 encoded data
|
||||
@@ -149,4 +151,8 @@ export interface NbStorePlugin {
|
||||
uploadedAt: number | null;
|
||||
}) => Promise<void>;
|
||||
clearClocks: (options: { id: string }) => Promise<void>;
|
||||
crawlDocData: (options: {
|
||||
id: string;
|
||||
docId: string;
|
||||
}) => Promise<CrawlResult>;
|
||||
}
|
||||
|
||||
@@ -336,4 +336,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
|
||||
uploadedAt: uploadedAt ? uploadedAt.getTime() : null,
|
||||
});
|
||||
},
|
||||
crawlDocData: async function (id: string, docId: string) {
|
||||
return NbStore.crawlDocData({ id, docId });
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user