@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
359 lines (358 loc) • 11.7 kB
TypeScript
/**
* MIME Type Constants
* Centralized MIME type definitions organized by category for file processing
*
* @module processors/config/mimeTypes
*/
/**
* Image format MIME types supported by the platform
*/
export declare const IMAGE_MIME_TYPES: {
/** JPEG image format */
readonly JPEG: "image/jpeg";
/** PNG image format */
readonly PNG: "image/png";
/** GIF image format */
readonly GIF: "image/gif";
/** WebP image format */
readonly WEBP: "image/webp";
/** SVG vector image format */
readonly SVG: "image/svg+xml";
/** BMP bitmap format */
readonly BMP: "image/bmp";
/** TIFF image format */
readonly TIFF: "image/tiff";
/** AVIF image format */
readonly AVIF: "image/avif";
/** HEIC image format (Apple) */
readonly HEIC: "image/heic";
/** HEIF image format */
readonly HEIF: "image/heif";
/** ICO icon format */
readonly ICO: "image/x-icon";
/** Microsoft ICO format */
readonly ICO_MS: "image/vnd.microsoft.icon";
};
/**
* Document format MIME types for office documents and PDFs
*/
export declare const DOCUMENT_MIME_TYPES: {
/** PDF document format */
readonly PDF: "application/pdf";
/** Microsoft Word (DOCX) */
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
/** Legacy Microsoft Word (DOC) */
readonly DOC: "application/msword";
/** Microsoft Excel (XLSX) */
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
/** Legacy Microsoft Excel (XLS) */
readonly XLS: "application/vnd.ms-excel";
/** Microsoft PowerPoint (PPTX) */
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
/** Legacy Microsoft PowerPoint (PPT) */
readonly PPT: "application/vnd.ms-powerpoint";
/** OpenDocument Text */
readonly ODT: "application/vnd.oasis.opendocument.text";
/** OpenDocument Spreadsheet */
readonly ODS: "application/vnd.oasis.opendocument.spreadsheet";
/** OpenDocument Presentation */
readonly ODP: "application/vnd.oasis.opendocument.presentation";
/** Rich Text Format */
readonly RTF: "application/rtf";
/** RTF as text type */
readonly RTF_TEXT: "text/rtf";
};
/**
* Data interchange format MIME types
*/
export declare const DATA_MIME_TYPES: {
/** JSON data format */
readonly JSON: "application/json";
/** XML data format */
readonly XML: "application/xml";
/** XML as text type */
readonly XML_TEXT: "text/xml";
/** CSV data format */
readonly CSV: "text/csv";
/** YAML data format */
readonly YAML: "text/yaml";
/** YAML as application type */
readonly YAML_APP: "application/x-yaml";
};
/**
* Text format MIME types for plain text and markup
*/
export declare const TEXT_MIME_TYPES: {
/** Plain text */
readonly PLAIN: "text/plain";
/** HTML markup */
readonly HTML: "text/html";
/** XHTML markup */
readonly XHTML: "application/xhtml+xml";
/** Markdown text */
readonly MARKDOWN: "text/markdown";
/** Markdown text (alternative MIME type) */
readonly MARKDOWN_ALT: "text/x-markdown";
/** CSS stylesheet */
readonly CSS: "text/css";
/** JavaScript code */
readonly JAVASCRIPT: "text/javascript";
/** JavaScript as application type */
readonly JAVASCRIPT_APP: "application/javascript";
};
/**
* Programming language source code MIME types
*/
export declare const SOURCE_CODE_MIME_TYPES: {
/** TypeScript code */
readonly TYPESCRIPT: "text/typescript";
/** Python code */
readonly PYTHON: "text/x-python";
/** Java code */
readonly JAVA: "text/x-java-source";
/** Go code */
readonly GO: "text/x-go";
/** Rust code */
readonly RUST: "text/x-rustsrc";
/** C code */
readonly C: "text/x-c";
/** C++ code */
readonly CPP: "text/x-c++";
/** C# code */
readonly CSHARP: "text/x-csharp";
/** Ruby code */
readonly RUBY: "text/x-ruby";
/** PHP code */
readonly PHP: "text/x-php";
/** Shell script */
readonly SHELL: "text/x-shellscript";
/** SQL query */
readonly SQL: "text/x-sql";
};
/**
* Archive and compressed file MIME types
*/
export declare const ARCHIVE_MIME_TYPES: {
/** ZIP archive */
readonly ZIP: "application/zip";
/** ZIP compressed variant */
readonly ZIP_COMPRESSED: "application/x-zip-compressed";
/** GZIP compressed */
readonly GZIP: "application/gzip";
/** TAR archive */
readonly TAR: "application/x-tar";
/** RAR archive */
readonly RAR: "application/x-rar-compressed";
/** RAR vendor type */
readonly RAR_VND: "application/vnd.rar";
/** 7-Zip archive */
readonly SEVEN_ZIP: "application/x-7z-compressed";
/** Generic binary stream */
readonly OCTET_STREAM: "application/octet-stream";
};
/**
* Video format MIME types
*/
export declare const VIDEO_MIME_TYPES: {
/** MP4 video */
readonly MP4: "video/mp4";
/** AVI video */
readonly AVI: "video/avi";
/** QuickTime video */
readonly MOV: "video/quicktime";
/** Matroska video */
readonly MKV: "video/x-matroska";
/** WebM video */
readonly WEBM: "video/webm";
/** Flash video */
readonly FLV: "video/x-flv";
/** Windows Media Video */
readonly WMV: "video/x-ms-wmv";
};
/**
* Audio format MIME types
*/
export declare const AUDIO_MIME_TYPES: {
/** MP3 audio */
readonly MP3: "audio/mpeg";
/** WAV audio */
readonly WAV: "audio/wav";
/** AAC audio */
readonly AAC: "audio/aac";
/** FLAC audio */
readonly FLAC: "audio/flac";
/** OGG audio */
readonly OGG: "audio/ogg";
/** M4A audio */
readonly M4A: "audio/mp4";
/** WMA audio */
readonly WMA: "audio/x-ms-wma";
};
/**
* All MIME types combined into a single object for convenience
*/
export declare const MIME_TYPES: {
/** MP3 audio */
readonly MP3: "audio/mpeg";
/** WAV audio */
readonly WAV: "audio/wav";
/** AAC audio */
readonly AAC: "audio/aac";
/** FLAC audio */
readonly FLAC: "audio/flac";
/** OGG audio */
readonly OGG: "audio/ogg";
/** M4A audio */
readonly M4A: "audio/mp4";
/** WMA audio */
readonly WMA: "audio/x-ms-wma";
/** MP4 video */
readonly MP4: "video/mp4";
/** AVI video */
readonly AVI: "video/avi";
/** QuickTime video */
readonly MOV: "video/quicktime";
/** Matroska video */
readonly MKV: "video/x-matroska";
/** WebM video */
readonly WEBM: "video/webm";
/** Flash video */
readonly FLV: "video/x-flv";
/** Windows Media Video */
readonly WMV: "video/x-ms-wmv";
/** ZIP archive */
readonly ZIP: "application/zip";
/** ZIP compressed variant */
readonly ZIP_COMPRESSED: "application/x-zip-compressed";
/** GZIP compressed */
readonly GZIP: "application/gzip";
/** TAR archive */
readonly TAR: "application/x-tar";
/** RAR archive */
readonly RAR: "application/x-rar-compressed";
/** RAR vendor type */
readonly RAR_VND: "application/vnd.rar";
/** 7-Zip archive */
readonly SEVEN_ZIP: "application/x-7z-compressed";
/** Generic binary stream */
readonly OCTET_STREAM: "application/octet-stream";
/** TypeScript code */
readonly TYPESCRIPT: "text/typescript";
/** Python code */
readonly PYTHON: "text/x-python";
/** Java code */
readonly JAVA: "text/x-java-source";
/** Go code */
readonly GO: "text/x-go";
/** Rust code */
readonly RUST: "text/x-rustsrc";
/** C code */
readonly C: "text/x-c";
/** C++ code */
readonly CPP: "text/x-c++";
/** C# code */
readonly CSHARP: "text/x-csharp";
/** Ruby code */
readonly RUBY: "text/x-ruby";
/** PHP code */
readonly PHP: "text/x-php";
/** Shell script */
readonly SHELL: "text/x-shellscript";
/** SQL query */
readonly SQL: "text/x-sql";
/** Plain text */
readonly PLAIN: "text/plain";
/** HTML markup */
readonly HTML: "text/html";
/** XHTML markup */
readonly XHTML: "application/xhtml+xml";
/** Markdown text */
readonly MARKDOWN: "text/markdown";
/** Markdown text (alternative MIME type) */
readonly MARKDOWN_ALT: "text/x-markdown";
/** CSS stylesheet */
readonly CSS: "text/css";
/** JavaScript code */
readonly JAVASCRIPT: "text/javascript";
/** JavaScript as application type */
readonly JAVASCRIPT_APP: "application/javascript";
/** JSON data format */
readonly JSON: "application/json";
/** XML data format */
readonly XML: "application/xml";
/** XML as text type */
readonly XML_TEXT: "text/xml";
/** CSV data format */
readonly CSV: "text/csv";
/** YAML data format */
readonly YAML: "text/yaml";
/** YAML as application type */
readonly YAML_APP: "application/x-yaml";
/** PDF document format */
readonly PDF: "application/pdf";
/** Microsoft Word (DOCX) */
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
/** Legacy Microsoft Word (DOC) */
readonly DOC: "application/msword";
/** Microsoft Excel (XLSX) */
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
/** Legacy Microsoft Excel (XLS) */
readonly XLS: "application/vnd.ms-excel";
/** Microsoft PowerPoint (PPTX) */
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
/** Legacy Microsoft PowerPoint (PPT) */
readonly PPT: "application/vnd.ms-powerpoint";
/** OpenDocument Text */
readonly ODT: "application/vnd.oasis.opendocument.text";
/** OpenDocument Spreadsheet */
readonly ODS: "application/vnd.oasis.opendocument.spreadsheet";
/** OpenDocument Presentation */
readonly ODP: "application/vnd.oasis.opendocument.presentation";
/** Rich Text Format */
readonly RTF: "application/rtf";
/** RTF as text type */
readonly RTF_TEXT: "text/rtf";
/** JPEG image format */
readonly JPEG: "image/jpeg";
/** PNG image format */
readonly PNG: "image/png";
/** GIF image format */
readonly GIF: "image/gif";
/** WebP image format */
readonly WEBP: "image/webp";
/** SVG vector image format */
readonly SVG: "image/svg+xml";
/** BMP bitmap format */
readonly BMP: "image/bmp";
/** TIFF image format */
readonly TIFF: "image/tiff";
/** AVIF image format */
readonly AVIF: "image/avif";
/** HEIC image format (Apple) */
readonly HEIC: "image/heic";
/** HEIF image format */
readonly HEIF: "image/heif";
/** ICO icon format */
readonly ICO: "image/x-icon";
/** Microsoft ICO format */
readonly ICO_MS: "image/vnd.microsoft.icon";
};
/**
* Centralized mapping of file extensions (with leading dot) to MIME types.
*
* This is the single source of truth for extension-to-MIME lookups.
* Derived from the category-specific MIME type constants above so that
* consumers (e.g. CLI helpers, file detectors) do not need to maintain
* their own duplicate mappings.
*
* If you add a new MIME type constant above, also add its extension mapping
* here to keep everything in sync.
*/
export declare const EXTENSION_MIME_MAP: Record<string, string>;
/**
* Get MIME type from file extension using the centralized map.
*
* @param ext - File extension (with leading dot, e.g. ".pdf")
* @returns MIME type string, or "application/octet-stream" if unknown
*/
export declare function getMimeTypeForExtension(ext: string): string;