import { User } from '../models'; /** * Represents an entity that can be viewed by users. * * - `_viewedBy`: stores IDs of users who viewed the entity. * - `views`: computed total number of views. * - `viewedBy`: optional populated list of User objects. */ export type IsViewable = { _viewedBy?: string[]; views?: number; viewedBy?: User[]; addView(accountId: string): Promise; removeView(accountId: string): Promise; hasViewed(accountId: string): boolean; };