createThread(
args
: {comments?
:Pick
<NewState
<ThreadComment
>,"body"
>[];entity?
:LixEntityCanonical
|LixEntity
;id?
:string
;lix
:Lix
;versionId?
:string
; }):Promise
<{id
:LixGenerated
<string
>;metadata?
:null
|Record
<string
,any
>; } & {comments
: {body
:unknown
;id
:LixGenerated
<string
>;parent_id?
:null
|string
;thread_id
:string
; } & {body
: {content
: ({children
: ...[];metadata?
: ... | ...;style
:string
;type
:"zettel_text_block"
;zettel_key
:string
; } | {type
: ...;zettel_key
: ...; } & {[key
: ...]: ...; })[];type
:"zettel_doc"
; }; } & {lixcol_version_id
:string
; }[];lixcol_version_id
:string
; }>
Starts a new discussion thread.
Threads allow collaborators to attach comments to a specific version or entity. Initial comments can be provided and will be inserted sequentially.
Parameter | Type | Description |
---|---|---|
args | { comments? : Pick <NewState <ThreadComment >, "body" >[]; entity? : LixEntityCanonical | LixEntity ; id? : string ; lix : Lix ; versionId? : string ; } | - |
args.comments? | Pick <NewState <ThreadComment >, "body" >[] | - |
args.entity? | LixEntityCanonical | LixEntity | Optional entity to attach the thread to |
args.id? | string | - |
args.lix | Lix | - |
args.versionId? | string | defaults to global |
Promise
<{ id
: LixGenerated
<string
>; metadata?
: null
| Record
<string
, any
>; } & { comments
: { body
: unknown
; id
: LixGenerated
<string
>; parent_id?
: null
| string
; thread_id
: string
; } & { body
: { content
: ({ children
: ...[]; metadata?
: ... | ...; style
: string
; type
: "zettel_text_block"
; zettel_key
: string
; } | { type
: ...; zettel_key
: ...; } & {[key
: ...]: ...; })[]; type
: "zettel_doc"
; }; } & { lixcol_version_id
: string
; }[]; lixcol_version_id
: string
; }>