import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient"; import { ACSAdapterLogger } from "../../utils/loggers"; type FileMetadata = Record; declare enum FilePermission { READ = 0, WRITE = 1 } interface IUploadedFile { fileId: string; metadata?: FileMetadata; } interface IAttachment { name: string; contentType: string; contentUrl: string; thumbnailUrl?: string; } interface IFileUploadRequest extends IAttachment { permissions?: PermissionsOptions; } interface PermissionsOptions { users: string[]; permission: FilePermission; } interface AmsReferenceContent { uniqueId: string; } interface BotAttachment { name: string; contentType: string; content: AmsReferenceContent; } export declare enum AMSViewScanStatus { PASSED = "passed", MALWARE = "malware", INPROGRESS = "in progress" } declare class AMSFileManager { private logger; private amsClient; private options; private supportedImagesMimeTypes; private omnichannelChatToken; fileScanner: any; constructor(amsClient: FramedClient, logger?: ACSAdapterLogger | null, options?: any); uploadFiles(files: IFileUploadRequest[]): Promise; downloadFiles(files: IUploadedFile[]): Promise; updatePermissions(): Promise; getFileIds(metadata?: Record): string[] | undefined; /** * Creates property for the reference of the attachments to be sent to ACS as metadata after successful upload. * * @param fileIds List of fileIds * @returns */ createFileIdProperty(fileIds: string[]): Record | undefined; getFileMetadata(metadata?: Record): FileMetadata[] | undefined; /** * * Creates property for the metadata of the attachments to be sent to ACS as metadata after successful upload. * * @param metadata List of file metadata * @returns */ createFileMetadataProperty(metadata: FileMetadata[]): Record | undefined; /** * Creates content to be sent to ACS after successful upload. * * @param metadata List of file metadata * @returns */ createBotAttachment(metadata: Record): BotAttachment | null; private uploadFileToAMS; private downloadFileFromAMS; } export default AMSFileManager;