import { Ref } from './common'; import { IUser } from './user'; import { IRevision } from './revision'; import { ITag } from './tag'; import { HasObjectId } from './has-object-id'; export interface IPage { path: string, status: string, revision: Ref, tags: Ref[], creator: Ref, createdAt: Date, updatedAt: Date, seenUsers: Ref[], parent: Ref | null, descendantCount: number, isEmpty: boolean, redirectTo: string, grant: number, grantedUsers: Ref[], grantedGroup: Ref, lastUpdateUser: Ref, liker: Ref[], commentCount: number slackChannels: string, pageIdOnHackmd: string, revisionHackmdSynced: Ref, hasDraftOnHackmd: boolean, deleteUser: Ref, deletedAt: Date, } export type IPageHasId = IPage & HasObjectId; export type IPageForItem = Partial; export type IPageInfo = { bookmarkCount: number, sumOfLikers: number, likerIds: string[], sumOfSeenUsers: number, seenUserIds: string[], isSeen?: boolean, isLiked?: boolean, } export type IPageWithMeta> = { pageData: IPageHasId, pageMeta?: Partial & M, };