enhance(api): plugin class with ident like plugin.class.id/class-name (#12200)

* enhance(api): plugin class with ident like `plugin.class.id/class-name`
* enhance(apis): remove support for namespace separator in create tag
* enhance(apis): get tag with ident or uuid
* fix(lint): remove unused vars
* fix(apis): sanitize user property name
* enhance(apis): get tag ex info
* chore: bump libs version
---------
Co-authored-by: charlie <xyhp915@qq.com>
This commit is contained in:
Tienson Qin
2025-11-14 10:48:08 +08:00
committed by GitHub
parent 82a7ec13ec
commit 0a54e807bb
9 changed files with 64 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@logseq/libs",
"version": "0.2.7",
"version": "0.2.8",
"description": "Logseq SDK libraries",
"main": "dist/lsplugin.user.js",
"typings": "index.d.ts",

View File

@@ -232,6 +232,7 @@ export interface PageEntity {
children?: Array<PageEntity>
properties?: Record<string, any>
journalDay?: number
ident?: string
[key: string]: unknown
}
@@ -779,8 +780,9 @@ export interface IEditorProxy extends Record<string, any> {
getAllPages: (repo?: string) => Promise<PageEntity[] | null>
getAllTags: () => Promise<PageEntity[] | null>
getAllProperties: () => Promise<PageEntity[] | null>
getTagObjects: (PageIdentity) => Promise<BlockEntity[] | null>
getTagObjects: (nameOrIdent: string) => Promise<BlockEntity[] | null>
createTag: (tagName: string, opts?: Partial<{ uuid: string }>) => Promise<PageEntity | null>
getTag: (nameOrIdent: string) => Promise<PageEntity | null>
addTagProperty: (tagId: BlockIdentity, propertyIdOrName: BlockIdentity) => Promise<void>
removeTagProperty: (tagId: BlockIdentity, propertyIdOrName: BlockIdentity) => Promise<void>
addBlockTag: (blockId: BlockIdentity, tagId: BlockIdentity) => Promise<void>