diff --git a/libraries/botbuilder/etc/botbuilder.api.md b/libraries/botbuilder/etc/botbuilder.api.md index c0d7b94426..374f266dde 100644 --- a/libraries/botbuilder/etc/botbuilder.api.md +++ b/libraries/botbuilder/etc/botbuilder.api.md @@ -17,7 +17,6 @@ import { BatchFailedEntriesResponse } from 'botbuilder-core'; import { BatchOperationResponse } from 'botbuilder-core'; import { BatchOperationStateResponse } from 'botbuilder-core'; import { BotAdapter } from 'botbuilder-core'; -import { BotConfigAuth } from 'botbuilder-core'; import { BotFrameworkAuthentication } from 'botframework-connector'; import { BotFrameworkClient } from 'botbuilder-core'; import { BotFrameworkSkill } from 'botbuilder-core'; @@ -29,7 +28,6 @@ import { ChannelInfo } from 'botbuilder-core'; import { ClaimsIdentity } from 'botframework-connector'; import { CloudAdapterBase } from 'botbuilder-core'; import { ConfigResponse } from 'botbuilder-core'; -import { ConfigTaskResponse } from 'botbuilder-core'; import { ConnectorClient } from 'botframework-connector'; import { ConnectorClientOptions } from 'botframework-connector'; import { ConversationAccount } from 'botbuilder-core'; @@ -392,8 +390,8 @@ export class TeamsActivityHandler extends ActivityHandler { protected handleTeamsAnonymousAppBasedLinkQuery(_context: TurnContext, _query: AppBasedLinkQuery): Promise; protected handleTeamsAppBasedLinkQuery(_context: TurnContext, _query: AppBasedLinkQuery): Promise; protected handleTeamsCardActionInvoke(_context: TurnContext): Promise; - protected handleTeamsConfigFetch(_context: TurnContext, _configData: any): Promise>; - protected handleTeamsConfigSubmit(_context: TurnContext, _configData: any): Promise>; + protected handleTeamsConfigFetch(_context: TurnContext, _configData: any): Promise; + protected handleTeamsConfigSubmit(_context: TurnContext, _configData: any): Promise; protected handleTeamsFileConsent(context: TurnContext, fileConsentCardResponse: FileConsentCardResponse): Promise; protected handleTeamsFileConsentAccept(_context: TurnContext, _fileConsentCardResponse: FileConsentCardResponse): Promise; protected handleTeamsFileConsentDecline(_context: TurnContext, _fileConsentCardResponse: FileConsentCardResponse): Promise; diff --git a/libraries/botbuilder/src/teamsActivityHandler.ts b/libraries/botbuilder/src/teamsActivityHandler.ts index 322096d0e8..fe95022307 100644 --- a/libraries/botbuilder/src/teamsActivityHandler.ts +++ b/libraries/botbuilder/src/teamsActivityHandler.ts @@ -9,14 +9,13 @@ import { ActivityHandler, AppBasedLinkQuery, - BotConfigAuth, ChannelInfo, Channels, ConfigResponse, - ConfigTaskResponse, FileConsentCardResponse, InvokeResponse, MeetingEndEventDetails, + MeetingParticipantsEventDetails, MeetingStartEventDetails, MessagingExtensionAction, MessagingExtensionActionResponse, @@ -35,7 +34,6 @@ import { tokenExchangeOperationName, TurnContext, verifyStateOperationName, - MeetingParticipantsEventDetails, } from 'botbuilder-core'; import { ReadReceiptInfo } from 'botframework-connector'; import { TeamsInfo } from './teamsInfo'; @@ -212,10 +210,7 @@ export class TeamsActivityHandler extends ActivityHandler { * @param _configData The object representing the configuration. * @returns A Config Response for the activity. */ - protected async handleTeamsConfigFetch( - _context: TurnContext, - _configData: any - ): Promise> { + protected async handleTeamsConfigFetch(_context: TurnContext, _configData: any): Promise { throw new Error('NotImplemented'); } @@ -226,10 +221,7 @@ export class TeamsActivityHandler extends ActivityHandler { * @param _configData The object representing the configuration. * @returns A Config Response for the activity. */ - protected async handleTeamsConfigSubmit( - _context: TurnContext, - _configData: any - ): Promise> { + protected async handleTeamsConfigSubmit(_context: TurnContext, _configData: any): Promise { throw new Error('NotImplemented'); } diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index f28a52493e..e392bafd51 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -652,20 +652,15 @@ export interface CommandValue { data?: T; } -// @public (undocumented) -export interface ConfigAuthResponse extends ConfigResponse { -} - // @public -export interface ConfigResponse { +export interface ConfigResponse { cacheInfo?: CacheInfo; - config: T; + config: ConfigResponseConfig; responseType: 'config'; } // @public (undocumented) -export interface ConfigTaskResponse extends ConfigResponse { -} +export type ConfigResponseConfig = BotConfigAuth | TaskModuleResponse; // @public export interface ConfirmationDialog { diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index 9752234abf..b1dc15c1c0 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -24,11 +24,8 @@ export interface BotConfigAuth { type: 'auth'; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ConfigAuthResponse extends ConfigResponse {} +export type ConfigResponseConfig = BotConfigAuth | TaskModuleResponse; -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ConfigTaskResponse extends ConfigResponse {} /** * @interface * An interface representing ChannelInfo. @@ -53,16 +50,15 @@ export interface ChannelInfo { * @interface * An interface container for the Config response payload */ -export interface ConfigResponse { +export interface ConfigResponse { /** * @member {CacheInfo} [cacheInfo] The data of the ConfigResponse cache, including cache type and cache duration. */ cacheInfo?: CacheInfo; /** - * @template T - * @member {T} [config] The response to a configuration message. + * @member {ConfigResponseConfig} [config] The ConfigResponse config of BotConfigAuth or TaskModuleResponse */ - config: T; + config: ConfigResponseConfig; /** * @member {string} [responseType] The type of response 'config'. */