diff --git a/libs/src/LSPlugin.ts b/libs/src/LSPlugin.ts index 935283e75b..f01c4f3cf3 100644 --- a/libs/src/LSPlugin.ts +++ b/libs/src/LSPlugin.ts @@ -778,7 +778,7 @@ export interface IEditorProxy extends Record { tagName: string, opts?: Partial<{ uuid: string, // custom uuid - tagProperties: Array<{ name: string, schema?: Partial, properties?: {} }> + tagProperties: Array<{ name: string, schema?: Partial, properties?: {} }> }>) => Promise getTag: (nameOrIdent: string | EntityID) => Promise getTagsByName: (tagName: string) => Promise | null> @@ -871,13 +871,6 @@ export interface IEditorProxy extends Record { end: number text: string }> - - /** - * For built-in files path `logseq/custom.js`, `logseq/custom.css`, `logseq/publish.js`, `logseq/publish.css` etc. - * @param path - * @param content - */ - setFileContent: (path: string, content: string) => Promise } /** @@ -885,19 +878,23 @@ export interface IEditorProxy extends Record { */ export interface IDBProxy { /** - * Run a DSL query - * @link https://docs.logseq.com/#/page/queries - * @param dsl + * Run a DSL query. https://docs.logseq.com/#/page/queries */ - q: (dsl: string) => Promise | null> + q: (dsl: string) => Promise /** - * Run a datascript query + * Executes a datalog query through query-react, + * given either a regular datalog query or a simple query. + */ + customQuery: (query: string) => Promise + + /** + * Run a datascript query with parameters. */ datascriptQuery: (query: string, ...inputs: Array) => Promise /** - * Hook all transaction data of DB + * Hook all transaction data of DB. * * @added 0.0.2 */ @@ -920,6 +917,13 @@ export interface IDBProxy { txMeta?: { outlinerOp: string; [key: string]: any } ) => void ): IUserOffHook + + /** + * For built-in files path `logseq/custom.js`, `logseq/custom.css`, `logseq/publish.js`, `logseq/publish.css` etc. + * @param path + * @param content + */ + setFileContent: (path: string, content: string) => Promise } /**