interface MessageExtensionType { hasXSS?: string; sanitized_text?: string; data?: { sensitive_data: string; message_masked: string; }; profanity?: string; message_clean?: string; } /** * Utility class for CometChat UIKit, providing various helper methods * such as deep cloning, ID generation, Unix timestamp retrieval, * and message extension data handling. */ export declare class CometChatUIKitUtility { /** * Creates a deep copy of the value provided * * @remarks * This function cannot copy truly private properties (those that start with a "#" symbol inside a class block). * Functions are copied by reference and additional properties on the array objects are ignored * * @param arg - Any value * @returns A deep copy of `arg` */ static clone(arg: T): T; /** * Checks if an object has a specific property. * * @param obj - The object to check. * @param key - The property key. * @returns `true` if the property exists, `false` otherwise. */ static checkHasOwnProperty: (obj: object | undefined, key: string) => boolean; /** * Generates a unique ID. * * @returns A unique string identifier. */ static ID: () => string; /** * Retrieves the current Unix timestamp. * * @returns The Unix timestamp. */ static getUnixTimestamp: () => number; /** * Retrieves the extension data from a message. * * @param messageObject - The message object containing extensions. * @returns The sanitized message text if available, otherwise the original text. */ static getExtensionData(messageObject: CometChat.BaseMessage): string; /** * Checks for extension data in a message. * * @param message - The message object to check. * @param extensionKey - The extension key to look for. * @returns The extension data if found. */ static checkMessageForExtensionsData: (message: CometChat.BaseMessage | null, extensionKey: string) => (object & MessageExtensionType) | undefined; /** * Convert known rich-text HTML formatting tags to markdown. * This handles messages that arrive with raw HTML (from other platforms or older clients) * so they can be processed by the markdown formatter on the bubble side. * Also handles HTML-entity-escaped tags (e.g., <i>text</i>). * Only converts recognized formatting tags; unknown/dangerous HTML is left for sanitizeText. */ static convertFormattingHtmlToMarkdown(text: string): string; /** * Process and sanitize text to escape dangerous HTML while preserving mention formatting * @param text The text string that may contain HTML and mentions * @returns Sanitized string with dangerous HTML escaped but mentions preserved */ static sanitizeText(text: string): string; /** * Strips markdown formatting syntax from text, leaving only the plain text content. * Preserves mention tokens (<@uid:...> and <@all:...>) and line breaks. */ static stripMarkdownFormatting(text: string): string; static convertBlobToWav: (audioBlob: { arrayBuffer: () => any; }) => Promise<{ wavBlob: Blob; }>; static audioBufferToWav: (audioBuffer: AudioBuffer) => ArrayBuffer; static writeString: (view: DataView, offset: number, string: string) => void; static convertToWav: (audioBlob: Blob) => Promise; } export {};