/** * @module teams-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { TurnContext } from 'botbuilder'; import { InputFile, InputFileDownloader } from './InputFileDownloader'; import { TeamsAdapter } from './TeamsAdapter'; import { TurnState } from './TurnState'; /** * Options for the `TeamsAttachmentDownloader` class. */ export interface TeamsAttachmentDownloaderOptions { /** * The Microsoft App ID of the bot. */ botAppId: string; /** * ServiceClientCredentialsFactory */ adapter: TeamsAdapter; } export interface AuthenticatorResult { /** * The value of the access token resulting from an authentication process. */ accessToken: string; /** * The date and time of expiration relative to Coordinated Universal Time (UTC). */ expiresOn: Date; } /** * Downloads attachments from Teams using the bots access token. */ export declare class TeamsAttachmentDownloader implements InputFileDownloader { private readonly _options; private _httpClient; /** * Creates a new instance of the `TeamsAttachmentDownloader` class. * @param {TeamsAttachmentDownloader} options - Options for the `TeamsAttachmentDownloader` class. */ constructor(options: TeamsAttachmentDownloaderOptions); /** * 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} Promise that resolves to an array of downloaded input files. */ downloadFiles(context: TurnContext, state: TState): Promise; /** * @private * @param {Attachment} attachment - Attachment to download. * @param {string} accessToken - Access token to use for downloading. * @returns {Promise} - Promise that resolves to the downloaded input file. */ private downloadFile; /** * @private * @returns {Promise} - Promise that resolves to the access token. */ private getAccessToken; } //# sourceMappingURL=TeamsAttachmentDownloader.d.ts.map