declare const _default: PreviewService; export default _default; /** * Service deciding whether a node can be previewed in the browser. * * Some file types are rendered natively (images, videos, PDF). Every other * type relies on a server-side "pdf" rendition produced by Alfresco's * transform service. Asking Alfresco to create that rendition for a type it * cannot transform (archives, binaries, ...) generates noise in the logs and * dead-end viewers. * * `listRenditions` (GET /nodes/{id}/renditions) returns only the renditions * applicable to the node's source mimetype and does NOT trigger any transform, * so it is a cheap, side-effect-free way to know up-front whether a "pdf" * rendition is available. Results are cached per mimetype for the session and * are reusable across apps (espaces, marches, media, ...). */ declare class PreviewService { previewableByMimeType: Map; /** * Types rendered directly by the front-end, without a server-side rendition. * @param {string} mimeType * @returns {boolean} */ isNativelyPreviewable(mimeType: string): boolean; /** * Tell whether the given node can be previewed (natively or through a "pdf" * rendition). Never throws: on error it returns false so callers can fall * back to a download-only view. * * @param {object} node a node with `id` and `content.mimeType` * @returns {Promise} */ isPreviewable(node: object): Promise; } //# sourceMappingURL=PreviewService.d.ts.map