@@ -327,6 +327,13 @@ export type SearchBlockItem = {
327327export type SearchPageItem = string
328328export type SearchFileItem = string
329329
330+ export type PropertySchema = {
331+ type : 'default' | 'number' | 'node' | 'date' | 'checkbox' | 'url' | string ,
332+ cardinality : 'many' | 'one' ,
333+ hide : boolean
334+ public : boolean
335+ }
336+
330337export interface IPluginSearchServiceHooks {
331338 name : string
332339 options ?: Record < string , any >
@@ -767,7 +774,12 @@ export interface IEditorProxy extends Record<string, any> {
767774 getAllTags : ( ) => Promise < PageEntity [ ] | null >
768775 getAllProperties : ( ) => Promise < PageEntity [ ] | null >
769776 getTagObjects : ( nameOrIdent : string ) => Promise < BlockEntity [ ] | null >
770- createTag : ( tagName : string , opts ?: Partial < { uuid : string } > ) => Promise < PageEntity | null >
777+ createTag : (
778+ tagName : string ,
779+ opts ?: Partial < {
780+ uuid : string , // custom uuid
781+ tagProperties : Array < { name : string , schema ?: Partial < PropertySchema > , properties ?: { } } >
782+ } > ) => Promise < PageEntity | null >
771783 getTag : ( nameOrIdent : string | EntityID ) => Promise < PageEntity | null >
772784 getTagsByName : ( tagName : string ) => Promise < Array < PageEntity > | null >
773785 addTagProperty : ( tagId : BlockIdentity , propertyIdOrName : BlockIdentity ) => Promise < void >
@@ -819,12 +831,7 @@ export interface IEditorProxy extends Record<string, any> {
819831 // insert or update property entity
820832 upsertProperty : (
821833 key : string ,
822- schema ?: Partial < {
823- type : 'default' | 'number' | 'node' | 'date' | 'checkbox' | 'url' | string ,
824- cardinality : 'many' | 'one' ,
825- hide : boolean
826- public : boolean
827- } > ,
834+ schema ?: Partial < PropertySchema > ,
828835 opts ?: { name ?: string } ) => Promise < IEntityID >
829836
830837 // remove property entity
0 commit comments