UNPKG

@microsoft/agents-hosting-extensions-teams

Version:

Microsoft 365 Agents SDK for JavaScript. Teams extensions

28 lines (27 loc) 1.28 kB
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { InputFile, InputFileDownloader, TurnContext, TurnState } from '@microsoft/agents-hosting'; /** * Downloads attachments from Teams using the bots access token. */ export declare class TeamsAttachmentDownloader<TState extends TurnState = TurnState> implements InputFileDownloader<TState> { private _httpClient; constructor(); /** * Download any files relative to the current user's input. * @template TState - Type of the state object passed to the `TurnContext.turnState` method. * @param {TurnContext} context Context for the current turn of conversation. * @param {TState} state Application state for the current turn of conversation. * @returns {Promise<InputFile[]>} Promise that resolves to an array of downloaded input files. */ downloadFiles(context: TurnContext, state: TState): Promise<InputFile[]>; /** * @private * @param {Attachment} attachment - Attachment to download. * @param {string} accessToken - Access token to use for downloading. * @returns {Promise<InputFile>} - Promise that resolves to the downloaded input file. */ private downloadFile; }