Per-resource comment threads with @mentions and resolve/reopen, scoped by tenant. Emits hooks (comment:created, comment:mentioned, …) so live updates (@basaltkit/realtime) and notifications wire up without coupling.
Whether the host app registered @basaltkit/tenancy. commentsPlugin wires this to the container's 'tenancy:active' metadata marker — a signal, not an import, so this generic package never depends on the opt-in SaaS layer. Defaults to false (single-tenant).
basalt / comments/src / Comments
Class: Comments
Defined in: comments/src/comments.ts:148
Per-resource comment threads with
@mentionsand resolve/reopen, scoped by tenant. Emits hooks (comment:created,comment:mentioned, …) so live updates (@basaltkit/realtime) and notifications wire up without coupling.Constructors
Constructor
> new Comments(
options?,tenancyActive?):CommentsDefined in: comments/src/comments.ts:157
Parameters
options?
CommentsOptions={}tenancyActive?
() =>
booleanWhether the host app registered
@basaltkit/tenancy.commentsPluginwires this to the container's'tenancy:active'metadata marker — a signal, not an import, so this generic package never depends on the opt-in SaaS layer. Defaults tofalse(single-tenant).Returns
CommentsMethods
edit()
> edit(
id,body,tenantId?):Promise<Comment>Defined in: comments/src/comments.ts:189
Parameters
id
stringbody
stringtenantId?
stringReturns
Promise<Comment>get()
> get(
id,tenantId?):Promise<Comment|null>Defined in: comments/src/comments.ts:185
Parameters
id
stringtenantId?
stringReturns
Promise<Comment|null>on()
> on(
resourceType,resourceId,tenantId?):ResourceCommentsDefined in: comments/src/comments.ts:176
Parameters
resourceType
stringresourceId
stringtenantId?
stringReturns
ResourceCommentsremove()
> remove(
id,tenantId?):Promise<void>Defined in: comments/src/comments.ts:198
Parameters
id
stringtenantId?
stringReturns
Promise<void>reopen()
> reopen(
id,tenantId?):Promise<Comment>Defined in: comments/src/comments.ts:217
Parameters
id
stringtenantId?
stringReturns
Promise<Comment>resolve()
> resolve(
id,resolvedBy,tenantId?):Promise<Comment>Defined in: comments/src/comments.ts:211
Parameters
id
stringresolvedBy
stringtenantId?
stringReturns
Promise<Comment>