import FileContent from "./FileContent.js"; import { Email } from "./Email.js"; import { User } from "./User.js"; import type AppFileTag from "./AppFileTag.js"; import DateTime from "@entity-access/entity-access/dist/types/DateTime.js"; import LoginSession from "./LoginSession.js"; import type UserPin from "./UserPin.js"; import type Contact from "./Contact.js"; import Mailbox from "./Mailbox.js"; import type WebSite from "./WebSite.js"; import type { WebSiteVersion } from "./WebSiteVersion.js"; import { LocalFile } from "@entity-access/server-pages/dist/core/LocalFile.js"; import type { StoreItem } from "./StoreItem.js"; import type { StoreMediaFile } from "./StoreMediaFile.js"; import type { StoreJournal } from "./StoreJournal.js"; import type ChannelEmail from "./ChannelEmail.js"; import type { ContactFile } from "./Contact.js"; declare const accessTypesEnum: readonly ["create", "read", "write", "delegate"]; export type fileAccessTypes = typeof accessTypesEnum[number]; declare const contentDispositions: readonly ["attachment", "inline"]; export type contentDispositionTypes = typeof contentDispositions[number]; /** * Why path does not contain full folder path? * * The answer is for to improve indexing. * 1. Text Column indexes have size limit, so longer file names might not fit in the path. * 2. Usually we will search with in the folder, so we can always check all descendants. * 3. Too long file paths will also require very large index. * * So current path is set as `${parent.path}${id}/`. */ export default class AppFile { appFileID: number; /** * There is no need to store first slash as it is useless. * `22/*` can only match with `22/` and `22/5/`. * However, last slash is useful. */ path: string; isFolder: boolean; snapshotParentID: number; name: string; fileSize: number; contentType: string; contentDisposition: contentDispositionTypes; contentID: string; fileContentID: number; fileContent: FileContent; creatorID: number; parentID: number; emailID: number; isDeleted: boolean; hidden: boolean; isShared: boolean; dateCreated: DateTime; watermark: string; dateUpdated: DateTime; versions: number; email: Email; parent: AppFile; children: AppFile[]; tags: AppFileTag[]; creator: User; file: LocalFile; sourceUrl: string; sourceEmailLogID: number; accessList: AppFileAccess[]; fileVersions: AppFileVersion[]; folderVersions: AppFileVersion[]; userPins: UserPin[]; previewContacts: Contact[]; mailboxLogos: Mailbox[]; websiteFolder: WebSite; websiteVersions: WebSiteVersion[]; signed: string; storeJournals: StoreJournal[]; storeItems: StoreItem[]; currentVersionWebSites: WebSite[]; storeMediaFiles: StoreMediaFile[]; channelEmails: ChannelEmail[]; contactFiles: ContactFile[]; get postID(): number; get url(): string; set url(v: string); } export declare class ExternalUser { emailAddress: string; name: string; } export declare class AppFileAccess { fileID: number; userID: number; type: fileAccessTypes; accessCode: string; expires: DateTime; dateCreated: DateTime; dateUpdated: DateTime; file: AppFile; user: User; externalUser: ExternalUser; } export declare class AppFileVersion { versionID: number; fileID: number; userID: number; sessionID: number; fileContentID: number; name: string; folderID: number; dateCreated: DateTime; file: AppFile; fileContent: FileContent; folder: AppFile; user: User; session: LoginSession; } export {}; //# sourceMappingURL=AppFile.d.ts.map