import { MessageState } from "./state/ConversationInputState"; import { ConversationState } from "./state/ConversationState"; /** * File attachment configuration * * @typedef FileAttachmentConfig * @property {boolean} [enabled=true] Represents if file attachments are supported. * @property {number} [numberOfAttachments=1] Maximum number of file attachments supported per message. * @property {number} [maxFileSize=10485760] Maximum file size that can be uploaded. Enter a value in bytes. Default is 10mb * @property {number} [maxFileSizeTotal] Maximum total file attachments size that can be uploaded per message. Enter a value in bytes. * @property {Array} [acceptedExtensions=["jpg", "jpeg", "png", "gif", "txt", "pdf"]] Allowed file extensions to be uploaded. * @property {boolean} [readOnly=false] Represents if file attachment is read only * @memberof Config */ export interface FileAttachmentConfig { enabled?: boolean; numberOfAttachments?: number; maxFileSize?: number; maxTotalFileSize?: number; acceptedExtensions?: Array; readOnly?: boolean; } export declare const FILE_TYPES: { jpg: { extension: RegExp; type: RegExp; iconName: string; }; jpeg: { extension: RegExp; type: RegExp; iconName: string; }; png: { extension: RegExp; type: RegExp; iconName: string; }; heic: { extension: RegExp; type: RegExp; iconName: string; }; gif: { extension: RegExp; type: RegExp; iconName: string; }; amr: { extension: RegExp; type: RegExp; iconName: string; }; mp3: { extension: RegExp; type: RegExp; iconName: string; }; mp4: { extension: RegExp; type: RegExp; iconName: string; }; pdf: { extension: RegExp; type: RegExp; iconName: string; }; txt: { extension: RegExp; type: RegExp; iconName: string; }; }; export declare const MAX_FILE_SIZE: number; export declare const MAX_FILE_COUNT = 1; export declare const ALLOWED_FILE_EXTENSIONS: string[]; export declare const getAllowedFileExtensions: (conversationSid: string) => Array; export declare const isValidFileType: (file: Partial, conversationSid: string) => boolean; export declare const isFileAttachmentEnabled: (conversationSid: string) => boolean; export declare const isFileAttachmentReadOnly: (conversationSid: string) => boolean; export declare const canAttachFile: (messageState: MessageState, conversation: ConversationState, conversationType?: "web" | "email") => boolean; export declare const getFileIcon: (file: Partial) => string; export declare const getSupportedFileExtensionRegex: (fileName: string) => RegExp; export declare const getDerivedFileLimits: (conversation: ConversationState) => { fileSizeLimit: number; totalFileSizeLimit: number; fileCountLimit: number; }; export declare const isTextAndAttachmentRestricted: (conversationSid: string) => boolean;