import type { CommsApi, Thread } from '@doist/comms-sdk'; import type { MutationOptions, StdinOptions } from '../../lib/options.js'; export declare function printSeparator(label: string): void; export interface CommentLike { id: string; creator: number; posted: Date; content: string; } export declare function printComment(comment: CommentLike, userMap: Map, raw: boolean): Promise; export type NamedEntity = { id: number | string; name: string; }; export interface NotifiedInfo { users: NamedEntity[]; groups: NamedEntity[]; } export interface ResolvedNotify { recipients: number[] | undefined; groups: string[] | undefined; notified: NotifiedInfo; } export declare function resolveNotifyIds(ids: string[], workspaceId: number): Promise; export declare function formatNotifyLabel(items: NamedEntity[]): string; export type ReadStateTextStatus = 'changed' | 'preview' | 'unchanged'; export type ThreadReadState = { thread: Thread; /** * Object index of the last comment the user has read, or `null` when the * thread is fully read (absent from the workspace's unread list). `-1` * means nothing has been read, including the thread body. */ lastReadObjIndex: number | null; }; export type ReadStatePlan = { /** Appended to messages, e.g. `' from comment X'`; empty for the whole thread. */ scope: string; isUnchanged(state: ThreadReadState): boolean; /** JSON row; `outcome` is `'unchanged'` when nothing needs to move. */ status(state: ThreadReadState, outcome: 'planned' | 'unchanged'): Status; /** Performs the mutation and returns the thread's new `lastReadObjIndex`. */ apply(client: CommsApi, state: ThreadReadState): Promise; }; export type ReadStateMutation = { verb: 'read' | 'unread'; /** Runs on the full ref list (positional plus `--stdin`) before anything is loaded. */ validateRefs?(rawRefs: string[]): void; /** * Builds the per-thread plan. Runs before the unread lookup so an invalid * option (a bad `--from` ref) fails without a workspace-wide request. */ plan(client: CommsApi, threadId: string): Promise>; }; export declare function runThreadReadStateMutation(refs: string[], options: MutationOptions & StdinOptions, mutation: ReadStateMutation): Promise; export declare function threadLabel(thread: Pick): string; //# sourceMappingURL=helpers.d.ts.map