import { MediaCloudPluginOptions, MimeType } from "../types/index.mjs"; import { S3Store } from "../tus/stores/s3/s3Store.mjs"; import * as payload3 from "payload"; //#region src/utils/file.d.ts /** * Checks if a file is a video file supported by Mux * @param file - The file to check * @returns Promise that resolves to true if the file is a supported video format, false otherwise */ declare function isVideo(file: File): Promise; /** * Gets the MIME type of a file using file-type library * @param file - The file to check * @returns Promise that resolves to the MIME type of the file or undefined if it cannot be determined */ declare function getMimeType(file: File): Promise; /** * Generates a unique filename by appending a random suffix if needed * @param originalFilename - The original filename * @returns A unique filename with a random suffix appended before the extension */ declare function generateUniqueFilename(originalFilename: string): string; /** * Sanitizes a filename by removing/replacing invalid characters and handling edge cases * Converts all non-alphanumeric characters (except dots for extensions) to underscores * @param filename - The filename to sanitize * @returns A sanitized filename safe for all operating systems * @throws {TypeError} When filename is not a string */ declare function sanitizeFilename(filename: string): string; interface CreateFileEndpointsArgs { getS3Store: () => S3Store; pluginOptions: MediaCloudPluginOptions; } declare function createFileEndpoints(args: CreateFileEndpointsArgs): { handler: payload3.PayloadHandler; method: "get"; path: string; }[]; //#endregion export { createFileEndpoints, generateUniqueFilename, getMimeType, isVideo, sanitizeFilename }; //# sourceMappingURL=file.d.mts.map