Skip to content
Sheetwrite

Sheetwrite / Documentation

CommentCoordinator@sheetwrite/core

Transport/auth-neutral comment state with server-owned author and timestamp fields.

Transport/auth-neutral comment state with server-owned author and timestamp fields.

Members 10

constructor
constructor(adapter: CommentAdapter, options: CommentCoordinatorOptions);
commentThreads
commentThreads: () => readonly CommentThread[];
create
create: (threadId: string, messageId: string, anchor: CommentAnchor, body: string, clientMutationId: string) => Promise<CommentMutationResponse>;
destroy
destroy: () => void;
load
load: () => Promise<readonly CommentThread[]>;
mutate
mutate: (mutation: CommentMutation, clientMutationId: string) => Promise<CommentMutationResponse>;
on
on: (listener: CommentListener) => () => void;
reply
reply: (threadId: string, messageId: string, body: string, clientMutationId: string) => Promise<CommentMutationResponse>;
resolve
resolve: (threadId: string, resolved: boolean, clientMutationId: string) => Promise<CommentMutationResponse>;
serverVersion
serverVersion: number

Declaration

View full TypeScript declaration
class CommentCoordinator {
constructor(adapter: CommentAdapter, options: CommentCoordinatorOptions);
commentThreads: () => readonly CommentThread[];
create: (
threadId: string,
messageId: string,
anchor: CommentAnchor,
body: string,
clientMutationId: string,
) => Promise<CommentMutationResponse>;
destroy: () => void;
load: () => Promise<readonly CommentThread[]>;
mutate: (
mutation: CommentMutation,
clientMutationId: string,
) => Promise<CommentMutationResponse>;
on: (listener: CommentListener) => () => void;
reply: (
threadId: string,
messageId: string,
body: string,
clientMutationId: string,
) => Promise<CommentMutationResponse>;
resolve: (
threadId: string,
resolved: boolean,
clientMutationId: string,
) => Promise<CommentMutationResponse>;
serverVersion: number;
}