import { Ref } from './common'; import { HasObjectId } from './has-object-id'; import { HasRevisionShortbody, IRevision, IRevisionHasId } from './revision'; import { SubscriptionStatusType } from './subscription'; import { ITag } from './tag'; import { IUser, IUserGroup, IUserGroupHasId, IUserHasId } from './user'; export declare const GroupType: { readonly userGroup: "UserGroup"; readonly externalUserGroup: "ExternalUserGroup"; }; export type GroupType = (typeof GroupType)[keyof typeof GroupType]; export type IGrantedGroup = { type: GroupType; item: Ref; }; export type IPage = { path: string; status: string; revision?: Ref; tags: Ref[]; creator?: Ref; createdAt: Date; updatedAt: Date; seenUsers: Ref[]; parent: Ref | null; descendantCount: number; isEmpty: boolean; grant: PageGrant; grantedUsers: Ref[]; grantedGroups: IGrantedGroup[]; lastUpdateUser?: Ref; liker: Ref[]; commentCount: number; slackChannels: string; deleteUser: Ref; deletedAt: Date; latestRevision?: Ref; latestRevisionBodyLength?: number; expandContentWidth?: boolean; wip?: boolean; ttlTimestamp?: Date; }; export type IPagePopulatedToShowRevision = Omit & { lastUpdateUser?: IUserHasId; creator?: IUserHasId; deleteUser: IUserHasId; grantedGroups: { type: GroupType; item: IUserGroupHasId; }[]; revision?: IRevisionHasId; author: IUserHasId; }; export declare const PageGrant: { readonly GRANT_PUBLIC: 1; readonly GRANT_RESTRICTED: 2; readonly GRANT_SPECIFIED: 3; readonly GRANT_OWNER: 4; readonly GRANT_USER_GROUP: 5; }; type UnionPageGrantKeys = keyof typeof PageGrant; export type PageGrant = (typeof PageGrant)[UnionPageGrantKeys]; export declare const PageStatus: { readonly STATUS_PUBLISHED: "published"; readonly STATUS_DELETED: "deleted"; }; export type PageStatus = (typeof PageStatus)[keyof typeof PageStatus]; export type IPageHasId = IPage & HasObjectId; export type IPageNotFoundInfo = { isNotFound: true; isForbidden: boolean; }; export type IPageInfo = { isNotFound: boolean; isV5Compatible: boolean; isEmpty: boolean; isMovable: boolean; isDeletable: boolean; isAbleToDeleteCompletely: boolean; isRevertible: boolean; bookmarkCount: number; }; export type IPageInfoForEmpty = Omit & { emptyPageId: string; isNotFound: false; isEmpty: true; isBookmarked?: boolean; }; export type IPageInfoForEntity = Omit & { isNotFound: false; isEmpty: false; sumOfLikers: number; likerIds: string[]; sumOfSeenUsers: number; seenUserIds: string[]; contentAge: number; descendantCount: number; commentCount: number; latestRevisionId: Ref; }; export type IPageInfoForOperation = IPageInfoForEntity & { isBookmarked?: boolean; isLiked?: boolean; subscriptionStatus?: SubscriptionStatusType; }; export type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody; export type IPageInfoExt = IPageInfo | IPageInfoForEmpty | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing; export declare const isIPageNotFoundInfo: (pageInfo: any | undefined) => pageInfo is IPageNotFoundInfo; export declare const isIPageInfo: (pageInfo: any | undefined) => pageInfo is IPageInfo; export declare const isIPageInfoForEmpty: (pageInfo: any | undefined) => pageInfo is IPageInfoForEmpty; export declare const isIPageInfoForEntity: (pageInfo: any | undefined) => pageInfo is IPageInfoForEntity; export type IPageInfoBasicForEmpty = Omit; export type IPageInfoBasicForEntity = Omit; export type IPageInfoBasic = IPageInfoBasicForEmpty | IPageInfoBasicForEntity; export declare const isIPageInfoForOperation: (pageInfo: any | undefined) => pageInfo is IPageInfoForOperation; export declare const isIPageInfoForListing: (pageInfo: any | undefined) => pageInfo is IPageInfoForListing; export type IDataWithMeta = { data: D; meta?: M; }; export type IDataWithRequiredMeta = IDataWithMeta & { meta: M; }; export type IPageWithMeta = IDataWithMeta; export type IPageToDeleteWithMeta = IDataWithMeta; export type IPageToRenameWithMeta = IPageToDeleteWithMeta; export {};