@microsoft/agents-hosting
Version:
Microsoft 365 Agents SDK for JavaScript
33 lines (32 loc) • 1.34 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { InputFile, InputFileDownloader } from './inputFileDownloader';
import { TurnState } from './turnState';
import { TurnContext } from '../turnContext';
/**
* A utility class for downloading input files from activity attachments.
*
* @remarks
* This class provides functionality to filter and download attachments from a turn context,
* supporting various content types and handling authentication for secure URLs.
*
* @typeParam TState - The type of the turn state used in the application.
*/
export declare class AttachmentDownloader<TState extends TurnState = TurnState> implements InputFileDownloader<TState> {
private _httpClient;
/**
* Creates an instance of AttachmentDownloader.
* This class is responsible for downloading input files from attachments.
*/
constructor();
/**
* Downloads files from the attachments in the current turn context.
* @param context The turn context containing the activity with attachments.
* @param state The turn state for the current conversation.
* @returns A promise that resolves to an array of downloaded input files.
*/
downloadFiles(context: TurnContext, state: TState): Promise<InputFile[]>;
private downloadFile;
}