import { ServiceObject } from "@entity-access/entity-access/dist/di/di.js"; import DBConfig from "../DBConfig.js"; import TempFileService from "../../storage/TempFileService.js"; import SiteDiskContentCache from "./SiteDiskContentCache.js"; import SocialMailContext from "../../model/SocialMailContext.js"; import { ICacheContainer, ObjectCache } from "../../../common/cacheFor.js"; import { ISiteFolder } from "./ISiteFolder.js"; import EncryptionService from "../encryption/EncryptionService.js"; import ReplicaReader from "../replica/ReplicaReader.js"; import type WebSite from "../../model/entities/WebSite.js"; /** * We cannot read from replica as relative path can change anytime, only absolute file content id can be read from replica. */ export default class WebSiteContentService extends ServiceObject implements ICacheContainer { dbConfig: DBConfig; siteCache: SiteDiskContentCache; cache: ObjectCache; replicaReader: ReplicaReader; tfs: TempFileService; ecs: EncryptionService; db: SocialMailContext; postInit(): void; isMailDomain(host: any): Promise; getCurrentSnapshotFolder(host: string): Promise; getCurrentSnapshot(folderID: any, currentVersionID: any): Promise; getWebSiteFolder(folderID: any): Promise; getWildcardHostFor(folderID: any, preview: any): Promise; getWebSite(host: any): Promise<{ folderID: number; currency: string; fromEmail: string; supportEmail: string; emailBCC: string; }>; getFile(_v: string | ISiteFolder, folderID: any, ...path: string[]): Promise; getDbFile(site: ISiteFolder, folderID: any, ...path: string[]): Promise; getFileFromInfo(fileInfo: IFileInfo): Promise; getFileInfo(s: ISiteFolder | string, folderID: any, ...segments: string[]): Promise; getNamedPageContent(host: string, files: string[]): Promise; /** * The reason we are not storing in Cached as we do not want to * save `@latest` replacements as we may want to clear out cache * immediately. * @param folderID * @param path * @param src * @returns */ getSnapshotFile(siteFolder: ISiteFolder, path: string[]): Promise; toEditorDraftCDNUrl({ folderID, eSiteID }: { eSiteID?: any; folderID?: any; }, file: { fileContentID: any; name: any; contentType: any; }): Promise; toDraftCDNUrl({ folderID, eSiteID, draftMode }: { draftMode?: any; eSiteID?: any; folderID?: any; }, file: { fileContentID: any; name: any; contentType: any; }): Promise; getDbFileInfo(_v: string | number, folderID: any, segments: string[]): Promise; private _getFileInfo; } export interface IFileInfo { name: string; contentType: string; appFileID: number; isFolder: boolean; url: string; path: string; fileContentID: number; } //# sourceMappingURL=WebSiteContentService.d.ts.map