import { NormPoint, Shape } from './annotation.types'; /** A user that can author comments or be @mentioned. */ export interface User { id: string; name: string; /** * Optional short handle. When set, the mention menu shows `Name (nickname)` * and picking the user inserts `@nickname` into the comment (instead of the * full name), so mentions stay compact for multi-word names. */ nickname?: string; avatarUrl?: string; email?: string; /** * Makes this entry a mention **group** (e.g. a team) when non-empty. The * mention menu lists a group by its name only, and picking it inserts a * mention of each member instead (`@Ann, @Bob`). A group is never a mention * itself: it is not stored on `Comment.mentions` nor highlighted in a body, * so only its members get mentioned. An empty list makes it a regular user. */ members?: User[]; } /** A file/image attached to a comment (consumer-uploaded). */ export interface Attachment { id: string; name: string; /** URL of the attachment. */ url: string; /** Optional thumbnail URL for image previews. */ thumbnailUrl?: string; /** MIME type, used to decide inline image vs. file chip. */ contentType?: string; } /** Resolution status of a comment thread. */ export type CommentStatus = 'open' | 'resolved'; /** * A single comment. Root comments may carry a pin and/or shapes; replies * reference their root via `parentId`. */ export interface Comment { id: string; body: string; author: User; /** ISO-8601 creation timestamp. */ createdAt: string; /** Root comment id for replies; undefined for root comments. */ parentId?: string; /** Pin anchor on the media (normalized), if this comment is anchored. */ pin?: NormPoint; /** Shapes attached to this comment. */ shapes?: Shape[]; /** Video timestamp (seconds) the comment is anchored to, if any. */ timestamp?: number; /** End of a video time range (seconds), if this is a range comment. */ endTime?: number; status: CommentStatus; /** * Users @mentioned in the body, resolved against the roster at creation time. * Carried on the comment so it can be highlighted even if the mentioned user * later leaves the `getUsers` roster. Hosts may also seed this directly. */ mentions?: User[]; /** Files/images attached to this comment. */ attachments?: Attachment[]; /** Ids of users who liked this comment. */ likes?: string[]; /** Ids of users subscribed to (watching) this comment thread. */ subscribers?: string[]; /** ISO-8601 timestamp of the last edit, if the body was edited. */ editedAt?: string; } /** A root comment together with its replies, as presented in the panel. */ export interface CommentThread { root: Comment; replies: Comment[]; } /** Filter applied to the comments panel. */ export type CommentFilter = 'all' | 'open' | 'resolved'; /** * Sort order for the comments panel. `'timeline'` orders by the comment's video * timestamp (earliest first) and is offered/defaulted only for video media. */ export type CommentSort = 'newest' | 'oldest' | 'timeline'; //# sourceMappingURL=comment.types.d.ts.map