UNPKG

imagic-sdk

Version:

Official Node.js SDK for Imagic image optimization API

34 lines 983 B
import { SupportedMimeType } from "./types"; /** * Validates if a file type is supported */ export declare function isValidMimeType(mimeType: string): mimeType is SupportedMimeType; /** * Detects MIME type from file extension */ export declare function detectMimeTypeFromExtension(filename: string): string; /** * Validates file size (10MB limit) */ export declare function validateFileSize(size: number): void; /** * Formats bytes to human readable format */ export declare function formatBytes(bytes: number): string; /** * Validates API key format */ export declare function validateApiKey(apiKey: string): void; /** * Validates and reads file from path */ export declare function readFileFromPath(filePath: string): Promise<Buffer>; /** * Extracts filename from file path */ export declare function extractFilename(filePath: string): string; /** * Validates URL format */ export declare function validateUrl(url: string): void; //# sourceMappingURL=utils.d.ts.map