import { Collection } from "./collection"; import { User } from "./user"; import { PropertyModel, PropertyValue } from "./property"; export declare enum DocumentType { Document = "document", Database = "database", Row = "row", Whiteboard = "whiteboard", Embed = "embed" } export type DocumentCover = { url?: string; top?: number | string; } | { default: true; }; export type DocumentJSON = { id: string; title: string; url: string; type: DocumentType; icon: string | null; childrenCount: number; children: DocumentJSON[]; isDraft?: boolean; o: string | null; parentDocumentId?: string; }; export type DocumentPath = { collectionName: string | null; documents: DocumentJSON[]; }; export type Document = { id: string; url: string; urlId: string; title: string; type: DocumentType; properties: Record; values: Record; text: string; tasks: { completed: number; total: number; }; createdAt: Date; updatedAt: Date; publishedAt: Date | null; archivedAt: Date | null; deletedAt: Date | null; teamId: string; template: boolean; templateId: string | null; collaboratorIds: string[]; revision: number; fullWidth: boolean; parentDocumentId: string | null; tableOrder: number; cover: DocumentCover | null; version: number; icon: string | null; collectionId?: string | null; collection: Collection | undefined; createdBy?: User; createdById?: string; updatedBy?: User; lastViewedAt?: Date | null; displayConfig?: Record | null; o?: string | null; path?: DocumentPath | null; numId?: number | null; commentsCount?: number | null; }; export type DocumentCreateParams = { text?: Document["text"]; template?: Document["template"]; type?: Document["type"]; properties?: Document["properties"]; values?: Document["values"]; tableOrder?: Document["tableOrder"]; cover?: Document["cover"]; collectionId: Document["collectionId"]; parentDocumentId?: Document["parentDocumentId"]; icon?: Document["icon"]; title?: Document["title"]; version?: Document["version"]; id?: Document["id"]; publish?: boolean; state?: Buffer | null; index?: number; };