From c616328b895c5ff34fda731a9555433c84005a6c Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Mon, 23 Jan 2023 16:28:50 -0800 Subject: [PATCH 1/8] type structure changes, tested --- .../src/teams/models/mappers.ts | 66 +------------------ .../src/teams/models/teamsMappers.ts | 2 - .../botframework-schema/src/teams/index.ts | 64 ++++++++++++------ 3 files changed, 45 insertions(+), 87 deletions(-) diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index 7bb9f126f8..de1b6c57d7 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -434,40 +434,7 @@ export const TeamsMeetingDetails: msRest.CompositeMapper = { }, }; -export const TeamsMeetingNotificationInfo: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingNotificationInfo', - type: { - name: 'Composite', - className: 'TeamsMeetingNotificationInfo', - modelProperties: { - recipients: { - serializedName: 'recipients', - type: { - name: 'Sequence', - element: { - type: { - name: 'String', - }, - }, - }, - }, - surfaces: { - serializedName: 'surfaces', - type: { - name: 'Sequence', - element: { - type: { - name: 'Composite', - className: 'TeamsMeetingNotificationSurface', - }, - }, - }, - }, - }, - }, -}; - -export const TeamsMeetingNotification: msRest.CompositeMapper = { +export const TeamsMeetingNotification: msRest.CompositeMapper = { serializedName: 'TeamsMeetingNotification', type: { name: 'Composite', @@ -482,8 +449,7 @@ export const TeamsMeetingNotification: msRest.CompositeMapper = { value: { serializedName: 'value', type: { - name: 'Composite', - className: 'TeamsMeetingNotificationInfo', + name: 'any', }, }, channelData: { @@ -497,34 +463,6 @@ export const TeamsMeetingNotification: msRest.CompositeMapper = { }, }; -export const TeamsMeetingNotificationSurface: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingNotificationSurface', - type: { - name: 'Composite', - className: 'TeamsMeetingNotificationSurface', - modelProperties: { - surface: { - serializedName: 'surface', - type: { - name: 'String', - }, - }, - contentType: { - serializedName: 'contentType', - type: { - name: 'String', - }, - }, - content: { - serializedName: 'content', - type: { - name: 'Composite', - className: 'TaskModuleContinueResponse', - }, - }, - }, - }, -}; export const TeamsMeetingNotificationChannelData = { serializedName: 'TeamsMeetingNotificationChannelData', diff --git a/libraries/botframework-connector/src/teams/models/teamsMappers.ts b/libraries/botframework-connector/src/teams/models/teamsMappers.ts index 55686ad3aa..2d7e536b3b 100644 --- a/libraries/botframework-connector/src/teams/models/teamsMappers.ts +++ b/libraries/botframework-connector/src/teams/models/teamsMappers.ts @@ -16,8 +16,6 @@ export { TeamsMeetingInfo, TeamsMeetingParticipant, TeamsMeetingNotification, - TeamsMeetingNotificationInfo, - TeamsMeetingNotificationSurface, TeamsMeetingNotificationChannelData, TeamsMeetingOnBehalfOf, TeamsMeetingNotificationRecipientFailureInfo, diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index b34338df25..d4e552af7a 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1820,28 +1820,50 @@ export interface MeetingEndEventDetails extends MeetingEventDetails { /** * @interface - * Specifies details of a Teams meeting send notification payload. + * Specifies base details of a Teams meeting send notification payload. */ -export interface TeamsMeetingNotification { +export interface TeamsMeetingNotificationBase { /** * @member {string} [type] The type of meeting notification. */ - type: 'targetedMeetingNotification' | string; + type: string; + /** - * @member {TeamsMeetingNotificationInfo} [type] The specific details of the meeting notification. + * @member {T} [value] The specific details of the meeting notification. */ - value: TeamsMeetingNotificationInfo; + value: T; +} + + +/** + * @interface + * Specifies details of a targeted Teams meeting send notification payload. + */ +export interface TargetedMeetingNotification extends TeamsMeetingNotificationBase { /** - * @member {TeamsMeetingNotificationChannelData} [type] The channel data of the meeting notification. + * @member {string} [type] The type of meeting notification. */ - channelData: TeamsMeetingNotificationChannelData; -} + type: 'targetedMeetingNotification'; + + /** + * @member {TeamsMeetingNotificationChannelData} [channelData] The channel data of the meeting notification. + */ + channelData?: TeamsMeetingNotificationChannelData; +} + + +/** + * @type + * Defines the base Teams meeting notification type + */ +export type TeamsMeetingNotification = TargetedMeetingNotification; + /** * @interface * Specifies recipients and surfaces to target in a Teams meeting notification. */ -export interface TeamsMeetingNotificationInfo { +export interface TargetedMeetingNotificationInfo { /** * @member {string[]} [recipients] The list of recipient meeting MRIs. */ @@ -1849,26 +1871,26 @@ export interface TeamsMeetingNotificationInfo { /** * @member {TeamsMeetingNotificationSurface[]} [surfaces] The List of notification surface configuration. */ - surfaces: TeamsMeetingNotificationSurface[]; + surfaces: TeamsMeetingSurface[]; } -/** - * @interface - * Specifies the surface and content for a Teams meeting notification. - */ -export interface TeamsMeetingNotificationSurface { + +export type TeamsMeetingSurface = TeamsMeetingStageSurface; + + +export interface TeamsMeetingStageSurface { /** * @member {string} [surface] The surface type. - */ - surface: 'meetingStage' | string; + */ + surface: 'meetingStage'; /** * @member {string} [contentType] The content type. - */ + */ contentType: 'task' | string; /** - * @member {TaskModuleContinueResponse} [content] The content to display in the meeting notification. + * @member {T} [content] The content to display in the meeting notification. */ - content: TaskModuleContinueResponse; + content: T; } /** @@ -1879,7 +1901,7 @@ export interface TeamsMeetingNotificationChannelData { /** * @member {TeamsMeetingOnBehalfOf} [onBehalfOf] The user that the bot is sending the notification on behalfOf, if any. */ - onBehalfOf?: TeamsMeetingOnBehalfOf; + onBehalfOf?: TeamsMeetingOnBehalfOf[]; } /** From 07dc5045f1cfad3b049d472b6c10f3a3e2f8c7de Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Mon, 23 Jan 2023 17:20:55 -0800 Subject: [PATCH 2/8] yarn lint fix --- .../src/teams/models/mappers.ts | 3 +- .../etc/botframework-schema.api.md | 45 ++++++++++++------- .../botframework-schema/src/teams/index.ts | 27 +++++------ 3 files changed, 43 insertions(+), 32 deletions(-) diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index de1b6c57d7..a7eff1ed13 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -434,7 +434,7 @@ export const TeamsMeetingDetails: msRest.CompositeMapper = { }, }; -export const TeamsMeetingNotification: msRest.CompositeMapper = { +export const TeamsMeetingNotification: msRest.CompositeMapper = { serializedName: 'TeamsMeetingNotification', type: { name: 'Composite', @@ -463,7 +463,6 @@ export const TeamsMeetingNotification: msRest.CompositeMapper = { }, }; - export const TeamsMeetingNotificationChannelData = { serializedName: 'TeamsMeetingNotificationChannelData', type: { diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index f53892e664..2ca30a2438 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -1614,6 +1614,18 @@ export interface TabSuggestedActions { actions: CardAction[]; } +// @public +export interface TargetedMeetingNotification extends TeamsMeetingNotificationBase { + channelData?: TeamsMeetingNotificationChannelData; + type: 'targetedMeetingNotification'; +} + +// @public +export interface TargetedMeetingNotificationInfo { + recipients: string[]; + surfaces: TeamsMeetingSurface[]; +} + // @public export interface TaskModuleCardResponse extends TaskModuleResponseBase { value?: string; @@ -1719,21 +1731,17 @@ export interface TeamsMeetingInfo { } // @public -export interface TeamsMeetingNotification { - channelData: TeamsMeetingNotificationChannelData; - type: 'targetedMeetingNotification' | string; - value: TeamsMeetingNotificationInfo; -} +export type TeamsMeetingNotification = TargetedMeetingNotification; // @public -export interface TeamsMeetingNotificationChannelData { - onBehalfOf?: TeamsMeetingOnBehalfOf; +export interface TeamsMeetingNotificationBase { + type: string; + value: T; } // @public -export interface TeamsMeetingNotificationInfo { - recipients: string[]; - surfaces: TeamsMeetingNotificationSurface[]; +export interface TeamsMeetingNotificationChannelData { + onBehalfOf?: TeamsMeetingOnBehalfOf[]; } // @public @@ -1748,13 +1756,6 @@ export interface TeamsMeetingNotificationRecipientFailureInfos { recipientsFailureInfo: TeamsMeetingNotificationRecipientFailureInfo[]; } -// @public -export interface TeamsMeetingNotificationSurface { - content: TaskModuleContinueResponse; - contentType: 'task' | string; - surface: 'meetingStage' | string; -} - // @public export interface TeamsMeetingOnBehalfOf { displayName?: string; @@ -1770,6 +1771,16 @@ export interface TeamsMeetingParticipant { user?: TeamsChannelAccount; } +// @public (undocumented) +export interface TeamsMeetingStageSurface { + content: T; + contentType: 'task' | string; + surface: 'meetingStage'; +} + +// @public +export type TeamsMeetingSurface = TeamsMeetingStageSurface; + // @public (undocumented) export interface TeamsPagedMembersResult { continuationToken: string; diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index d4e552af7a..b313521178 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1829,11 +1829,11 @@ export interface TeamsMeetingNotificationBase { type: string; /** - * @member {T} [value] The specific details of the meeting notification. + * @template T + * @member {T} value The specific details of the meeting notification. */ value: T; -} - +} /** * @interface @@ -1849,16 +1849,14 @@ export interface TargetedMeetingNotification extends TeamsMeetingNotificationBas * @member {TeamsMeetingNotificationChannelData} [channelData] The channel data of the meeting notification. */ channelData?: TeamsMeetingNotificationChannelData; -} - +} /** - * @type - * Defines the base Teams meeting notification type + * @type {TeamsMeetingNotification} + * Defines the base Teams meeting notification type. */ export type TeamsMeetingNotification = TargetedMeetingNotification; - /** * @interface * Specifies recipients and surfaces to target in a Teams meeting notification. @@ -1869,25 +1867,28 @@ export interface TargetedMeetingNotificationInfo { */ recipients: string[]; /** - * @member {TeamsMeetingNotificationSurface[]} [surfaces] The List of notification surface configuration. + * @member {TeamsMeetingSurface[]} [surfaces] The List of notification surface configuration. */ surfaces: TeamsMeetingSurface[]; } - +/** + * @type {TeamsMeetingNotification} + * Defines the generic Teams meeting surface type. + */ export type TeamsMeetingSurface = TeamsMeetingStageSurface; - export interface TeamsMeetingStageSurface { /** * @member {string} [surface] The surface type. - */ + */ surface: 'meetingStage'; /** * @member {string} [contentType] The content type. - */ + */ contentType: 'task' | string; /** + * @template T * @member {T} [content] The content to display in the meeting notification. */ content: T; From c4e07b12226ae932ef24ca4a3f0f5e1a1f9532e8 Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Mon, 23 Jan 2023 17:27:49 -0800 Subject: [PATCH 3/8] name change --- .../etc/botframework-schema.api.md | 94 +++++++++---------- .../botframework-schema/src/teams/index.ts | 38 ++++---- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index 2ca30a2438..366252dd7e 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -953,11 +953,55 @@ export interface MeetingInfo { organizer: TeamsChannelAccount; } +// @public +export type MeetingNotification = TargetedMeetingNotification; + +// @public +export interface MeetingNotificationBase { + type: string; + value: T; +} + +// @public +export interface MeetingNotificationChannelData { + onBehalfOf?: MeetingOnBehalfOf[]; +} + +// @public +export interface MeetingNotificationRecipientFailureInfo { + errorCode: string; + failureReason: string; + recipientMri: string; +} + +// @public +export interface MeetingNotificationRecipientFailureInfos { + recipientsFailureInfo: MeetingNotificationRecipientFailureInfo[]; +} + +// @public +export interface MeetingOnBehalfOf { + displayName?: string; + itemid: 0 | number; + mentionType: 'person' | string; + mri: string; +} + +// @public (undocumented) +export interface MeetingStageSurface { + content: T; + contentType: 'task' | string; + surface: 'meetingStage'; +} + // @public export interface MeetingStartEventDetails extends MeetingEventDetails { startTime: Date; } +// @public +export type MeetingSurface = MeetingStageSurface; + // @public export interface Mention { mentioned: ChannelAccount; @@ -1615,15 +1659,15 @@ export interface TabSuggestedActions { } // @public -export interface TargetedMeetingNotification extends TeamsMeetingNotificationBase { - channelData?: TeamsMeetingNotificationChannelData; +export interface TargetedMeetingNotification extends MeetingNotificationBase { + channelData?: MeetingNotificationChannelData; type: 'targetedMeetingNotification'; } // @public export interface TargetedMeetingNotificationInfo { recipients: string[]; - surfaces: TeamsMeetingSurface[]; + surfaces: MeetingSurface[]; } // @public @@ -1730,40 +1774,6 @@ export interface TeamsMeetingInfo { id?: string; } -// @public -export type TeamsMeetingNotification = TargetedMeetingNotification; - -// @public -export interface TeamsMeetingNotificationBase { - type: string; - value: T; -} - -// @public -export interface TeamsMeetingNotificationChannelData { - onBehalfOf?: TeamsMeetingOnBehalfOf[]; -} - -// @public -export interface TeamsMeetingNotificationRecipientFailureInfo { - errorCode: string; - failureReason: string; - recipientMri: string; -} - -// @public -export interface TeamsMeetingNotificationRecipientFailureInfos { - recipientsFailureInfo: TeamsMeetingNotificationRecipientFailureInfo[]; -} - -// @public -export interface TeamsMeetingOnBehalfOf { - displayName?: string; - itemid: 0 | number; - mentionType: 'person' | string; - mri: string; -} - // @public export interface TeamsMeetingParticipant { conversation?: ConversationAccount; @@ -1771,16 +1781,6 @@ export interface TeamsMeetingParticipant { user?: TeamsChannelAccount; } -// @public (undocumented) -export interface TeamsMeetingStageSurface { - content: T; - contentType: 'task' | string; - surface: 'meetingStage'; -} - -// @public -export type TeamsMeetingSurface = TeamsMeetingStageSurface; - // @public (undocumented) export interface TeamsPagedMembersResult { continuationToken: string; diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index b313521178..7992a02722 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1822,7 +1822,7 @@ export interface MeetingEndEventDetails extends MeetingEventDetails { * @interface * Specifies base details of a Teams meeting send notification payload. */ -export interface TeamsMeetingNotificationBase { +export interface MeetingNotificationBase { /** * @member {string} [type] The type of meeting notification. */ @@ -1839,23 +1839,23 @@ export interface TeamsMeetingNotificationBase { * @interface * Specifies details of a targeted Teams meeting send notification payload. */ -export interface TargetedMeetingNotification extends TeamsMeetingNotificationBase { +export interface TargetedMeetingNotification extends MeetingNotificationBase { /** * @member {string} [type] The type of meeting notification. */ type: 'targetedMeetingNotification'; /** - * @member {TeamsMeetingNotificationChannelData} [channelData] The channel data of the meeting notification. + * @member {MeetingNotificationChannelData} [channelData] The channel data of the meeting notification. */ - channelData?: TeamsMeetingNotificationChannelData; + channelData?: MeetingNotificationChannelData; } /** - * @type {TeamsMeetingNotification} + * @type {MeetingNotification} * Defines the base Teams meeting notification type. */ -export type TeamsMeetingNotification = TargetedMeetingNotification; +export type MeetingNotification = TargetedMeetingNotification; /** * @interface @@ -1867,18 +1867,18 @@ export interface TargetedMeetingNotificationInfo { */ recipients: string[]; /** - * @member {TeamsMeetingSurface[]} [surfaces] The List of notification surface configuration. + * @member {MeetingSurface[]} [surfaces] The List of notification surface configuration. */ - surfaces: TeamsMeetingSurface[]; + surfaces: MeetingSurface[]; } /** - * @type {TeamsMeetingNotification} + * @type {MeetingSurface} * Defines the generic Teams meeting surface type. */ -export type TeamsMeetingSurface = TeamsMeetingStageSurface; +export type MeetingSurface = MeetingStageSurface; -export interface TeamsMeetingStageSurface { +export interface MeetingStageSurface { /** * @member {string} [surface] The surface type. */ @@ -1898,18 +1898,18 @@ export interface TeamsMeetingStageSurface { * @interface * Specifies channel data associated with the Teams meeting notification. */ -export interface TeamsMeetingNotificationChannelData { +export interface MeetingNotificationChannelData { /** - * @member {TeamsMeetingOnBehalfOf} [onBehalfOf] The user that the bot is sending the notification on behalfOf, if any. + * @member {MeetingOnBehalfOf} [onBehalfOf] The user that the bot is sending the notification on behalfOf, if any. */ - onBehalfOf?: TeamsMeetingOnBehalfOf[]; + onBehalfOf?: MeetingOnBehalfOf[]; } /** * @interface * Specifies the Teams user that triggered the Teams meeting notification. */ -export interface TeamsMeetingOnBehalfOf { +export interface MeetingOnBehalfOf { /** * @member {number} [itemid] The id of the item. */ @@ -1932,7 +1932,7 @@ export interface TeamsMeetingOnBehalfOf { * @interface * Specifies the recipients for which the Teams meeting notification was not sent. */ -export interface TeamsMeetingNotificationRecipientFailureInfo { +export interface MeetingNotificationRecipientFailureInfo { /** * @member {string} [recipientMri] The targeted recipient's MRI. */ @@ -1951,9 +1951,9 @@ export interface TeamsMeetingNotificationRecipientFailureInfo { * @interface * Specifies the list of recipients for which the Teams meeting notification was not sent. */ -export interface TeamsMeetingNotificationRecipientFailureInfos { +export interface MeetingNotificationRecipientFailureInfos { /** - * @member {string} [errorCode] The list of recipients that failed to recieve the sent meetings notification. + * @member {string} [recipientsFailureInfo] The list of recipients that failed to recieve the sent meetings notification. */ - recipientsFailureInfo: TeamsMeetingNotificationRecipientFailureInfo[]; + recipientsFailureInfo: MeetingNotificationRecipientFailureInfo[]; } From 5c2b50b7b6fb103eb35c961950de98240dbaa2e2 Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Tue, 24 Jan 2023 11:36:28 -0800 Subject: [PATCH 4/8] name change' --- libraries/botbuilder/etc/botbuilder.api.md | 6 ++-- libraries/botbuilder/src/teamsInfo.ts | 10 +++--- libraries/botbuilder/tests/teamsInfo.test.js | 2 +- .../src/teams/models/index.ts | 6 ++-- .../src/teams/models/mappers.ts | 36 +++++++++---------- .../src/teams/models/teamsMappers.ts | 10 +++--- .../src/teams/operations/teams.ts | 24 ++++++------- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/libraries/botbuilder/etc/botbuilder.api.md b/libraries/botbuilder/etc/botbuilder.api.md index 8f78810ae4..33e3eec095 100644 --- a/libraries/botbuilder/etc/botbuilder.api.md +++ b/libraries/botbuilder/etc/botbuilder.api.md @@ -40,6 +40,8 @@ import { InvokeResponse } from 'botbuilder-core'; import { IReceiveRequest } from 'botframework-streaming'; import { IStreamingTransportServer } from 'botframework-streaming'; import { MeetingEndEventDetails } from 'botbuilder-core'; +import { MeetingNotification } from 'botbuilder-core'; +import { MeetingNotificationRecipientFailureInfos } from 'botbuilder-core'; import { MeetingStartEventDetails } from 'botbuilder-core'; import { MessagingExtensionAction } from 'botbuilder-core'; import { MessagingExtensionActionResponse } from 'botbuilder-core'; @@ -70,8 +72,6 @@ import { TeamDetails } from 'botbuilder-core'; import { TeamInfo } from 'botbuilder-core'; import { TeamsChannelAccount } from 'botbuilder-core'; import { TeamsMeetingInfo } from 'botbuilder-core'; -import { TeamsMeetingNotification } from 'botbuilder-core'; -import { TeamsMeetingNotificationRecipientFailureInfos } from 'botbuilder-core'; import { TeamsMeetingParticipant } from 'botbuilder-core'; import { TeamsPagedMembersResult } from 'botbuilder-core'; import { TenantInfo } from 'botbuilder-core'; @@ -458,7 +458,7 @@ export class TeamsInfo { static getTeamMember(context: TurnContext, teamId?: string, userId?: string): Promise; // @deprecated static getTeamMembers(context: TurnContext, teamId?: string): Promise; - static sendMeetingNotification(context: TurnContext, notification: TeamsMeetingNotification, meetingId?: string): Promise; + static sendMeetingNotification(context: TurnContext, notification: MeetingNotification, meetingId?: string): Promise; static sendMessageToTeamsChannel(context: TurnContext, activity: Activity, teamsChannelId: string, botAppId?: string): Promise<[ConversationReference, string]>; } diff --git a/libraries/botbuilder/src/teamsInfo.ts b/libraries/botbuilder/src/teamsInfo.ts index d72c780a4c..52e109f823 100644 --- a/libraries/botbuilder/src/teamsInfo.ts +++ b/libraries/botbuilder/src/teamsInfo.ts @@ -22,8 +22,8 @@ import { TeamsMeetingParticipant, TeamsMeetingInfo, Channels, - TeamsMeetingNotification, - TeamsMeetingNotificationRecipientFailureInfos, + MeetingNotification, + MeetingNotificationRecipientFailureInfos, } from 'botbuilder-core'; import { ConnectorClient, TeamsConnectorClient, TeamsConnectorModels } from 'botframework-connector'; @@ -342,14 +342,14 @@ export class TeamsInfo { * @param notification The meeting notification payload. * @param meetingId Id of the Teams meeting. * @returns Promise with either an empty object if notifications were successfully sent to all recipients or - * [TeamsMeetingNotificationRecipientFailureInfos](xref:botframework-schema.TeamsMeetingNotificationRecipientFailureInfos) if notifications + * [MeetingNotificationRecipientFailureInfos](xref:botframework-schema.MeetingNotificationRecipientFailureInfos) if notifications * were sent to some but not all recipients. */ static async sendMeetingNotification( context: TurnContext, - notification: TeamsMeetingNotification, + notification: MeetingNotification, meetingId?: string - ): Promise { + ): Promise { const activity = context.activity; if (meetingId == null) { diff --git a/libraries/botbuilder/tests/teamsInfo.test.js b/libraries/botbuilder/tests/teamsInfo.test.js index bf3c77bbe6..1cb0e46fdf 100644 --- a/libraries/botbuilder/tests/teamsInfo.test.js +++ b/libraries/botbuilder/tests/teamsInfo.test.js @@ -1028,7 +1028,7 @@ describe('TeamsInfo', function () { assert(isEmptyObject(sendTeamsMeetingNotification)); }); - it('should return a TeamsMeetingNotificationRecipientFailureInfos if a 207 status code was returned', async function () { + it('should return a MeetingNotificationRecipientFailureInfos if a 207 status code was returned', async function () { const notification = {}; const meetingId = 'randomGUID'; const { expectedAuthHeader, expectation: fetchOauthToken } = nockOauth(); diff --git a/libraries/botframework-connector/src/teams/models/index.ts b/libraries/botframework-connector/src/teams/models/index.ts index 74777f9ba7..5f64a81c25 100644 --- a/libraries/botframework-connector/src/teams/models/index.ts +++ b/libraries/botframework-connector/src/teams/models/index.ts @@ -8,7 +8,7 @@ import { ConversationList, TeamDetails, TeamsMeetingInfo, - TeamsMeetingNotificationRecipientFailureInfos, + MeetingNotificationRecipientFailureInfos, TeamsMeetingParticipant, } from 'botframework-schema'; @@ -128,7 +128,7 @@ export type TeamsMeetingInfoResponse = TeamsMeetingInfo & { /** * Contains response data for the sendMeetingNotification operation. */ -export type TeamsSendMeetingNotificationResponse = TeamsMeetingNotificationRecipientFailureInfos & { +export type TeamsSendMeetingNotificationResponse = MeetingNotificationRecipientFailureInfos & { /** * The underlying HTTP response. */ @@ -140,6 +140,6 @@ export type TeamsSendMeetingNotificationResponse = TeamsMeetingNotificationRecip /** * The response body as parsed JSON or XML */ - parsedBody: TeamsMeetingNotificationRecipientFailureInfos | {}; + parsedBody: MeetingNotificationRecipientFailureInfos | {}; }; }; diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index a7eff1ed13..9f001463b2 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -434,11 +434,11 @@ export const TeamsMeetingDetails: msRest.CompositeMapper = { }, }; -export const TeamsMeetingNotification: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingNotification', +export const MeetingNotification: msRest.CompositeMapper = { + serializedName: 'MeetingNotification', type: { name: 'Composite', - className: 'TeamsMeetingNotification', + className: 'MeetingNotification', modelProperties: { type: { serializedName: 'type', @@ -456,18 +456,18 @@ export const TeamsMeetingNotification: msRest.CompositeMapper = { serializedName: 'channelData', type: { name: 'Composite', - className: 'TeamsMeetingNotificationChannelData', + className: 'MeetingNotificationChannelData', }, }, }, }, }; -export const TeamsMeetingNotificationChannelData = { - serializedName: 'TeamsMeetingNotificationChannelData', +export const MeetingNotificationChannelData = { + serializedName: 'MeetingNotificationChannelData', type: { name: 'Composite', - className: 'TeamsMeetingNotificationChannelData', + className: 'MeetingNotificationChannelData', modelProperties: { onBehalfOf: { serializedName: 'onBehalfOf', @@ -476,7 +476,7 @@ export const TeamsMeetingNotificationChannelData = { element: { type: { name: 'Composite', - className: 'TeamsMeetingOnBehalfOf', + className: 'MeetingOnBehalfOf', }, }, }, @@ -485,11 +485,11 @@ export const TeamsMeetingNotificationChannelData = { }, }; -export const TeamsMeetingOnBehalfOf: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingOnBehalfOf', +export const MeetingOnBehalfOf: msRest.CompositeMapper = { + serializedName: 'MeetingOnBehalfOf', type: { name: 'Composite', - className: 'TeamsMeetingOnBehalfOf', + className: 'MeetingOnBehalfOf', modelProperties: { itemid: { serializedName: 'itemid', @@ -519,11 +519,11 @@ export const TeamsMeetingOnBehalfOf: msRest.CompositeMapper = { }, }; -export const TeamsMeetingNotificationRecipientFailureInfo: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingNotificationRecipientFailureInfo', +export const MeetingNotificationRecipientFailureInfo: msRest.CompositeMapper = { + serializedName: 'MeetingNotificationRecipientFailureInfo', type: { name: 'Composite', - className: 'TeamsMeetingNotificationRecipientFailureInfo', + className: 'MeetingNotificationRecipientFailureInfo', modelProperties: { recipientMri: { serializedName: 'recipientMri', @@ -547,11 +547,11 @@ export const TeamsMeetingNotificationRecipientFailureInfo: msRest.CompositeMappe }, }; -export const TeamsMeetingNotificationRecipientFailureInfos: msRest.CompositeMapper = { - serializedName: 'TeamsMeetingNotificationRecipientFailureInfos', +export const MeetingNotificationRecipientFailureInfos: msRest.CompositeMapper = { + serializedName: 'MeetingNotificationRecipientFailureInfos', type: { name: 'Composite', - className: 'TeamsMeetingNotificationRecipientFailureInfos', + className: 'MeetingNotificationRecipientFailureInfos', modelProperties: { recipientsFailureInfo: { serializedName: 'recipientsFailureInfo', @@ -560,7 +560,7 @@ export const TeamsMeetingNotificationRecipientFailureInfos: msRest.CompositeMapp element: { type: { name: 'Composite', - className: 'TeamsMeetingNotificationRecipientFailureInfo', + className: 'MeetingNotificationRecipientFailureInfo', }, }, }, diff --git a/libraries/botframework-connector/src/teams/models/teamsMappers.ts b/libraries/botframework-connector/src/teams/models/teamsMappers.ts index 2d7e536b3b..f4d04d0807 100644 --- a/libraries/botframework-connector/src/teams/models/teamsMappers.ts +++ b/libraries/botframework-connector/src/teams/models/teamsMappers.ts @@ -15,11 +15,11 @@ export { TeamsMeetingDetails, TeamsMeetingInfo, TeamsMeetingParticipant, - TeamsMeetingNotification, - TeamsMeetingNotificationChannelData, - TeamsMeetingOnBehalfOf, - TeamsMeetingNotificationRecipientFailureInfo, - TeamsMeetingNotificationRecipientFailureInfos, + MeetingNotification, + MeetingNotificationChannelData, + MeetingOnBehalfOf, + MeetingNotificationRecipientFailureInfo, + MeetingNotificationRecipientFailureInfos, TaskModuleContinueResponse, TaskModuleTaskInfo, Attachment, diff --git a/libraries/botframework-connector/src/teams/operations/teams.ts b/libraries/botframework-connector/src/teams/operations/teams.ts index db04269a4b..d9839dc931 100644 --- a/libraries/botframework-connector/src/teams/operations/teams.ts +++ b/libraries/botframework-connector/src/teams/operations/teams.ts @@ -9,7 +9,7 @@ import * as Models from '../models'; import * as Mappers from '../models/teamsMappers'; import * as Parameters from '../models/parameters'; import { TeamsConnectorClientContext } from '../'; -import { ConversationList, TeamDetails, TeamsMeetingInfo, TeamsMeetingParticipant, TeamsMeetingNotificationRecipientFailureInfos, TeamsMeetingNotification } from 'botframework-schema'; +import { ConversationList, TeamDetails, TeamsMeetingInfo, TeamsMeetingParticipant, MeetingNotificationRecipientFailureInfos, MeetingNotification } from 'botframework-schema'; /** Class representing a Teams. */ export class Teams { @@ -250,7 +250,7 @@ export class Teams { */ sendMeetingNotification( meetingId: string, - notification: TeamsMeetingNotification, + notification: MeetingNotification, options?: msRest.RequestOptionsBase, ): Promise /** @@ -260,8 +260,8 @@ export class Teams { */ sendMeetingNotification( meetingId: string, - notification: TeamsMeetingNotification, - callback: msRest.ServiceCallback + notification: MeetingNotification, + callback: msRest.ServiceCallback ): void; /** * @param meetingId Meeting Id. @@ -271,22 +271,22 @@ export class Teams { */ sendMeetingNotification( meetingId: string, - notification: TeamsMeetingNotification, + notification: MeetingNotification, options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback + callback: msRest.ServiceCallback ): void; /** * @param meetingId Meeting Id. * @param notification The content and configuration for the notification to send. * @param options The optional parameters. * @param callback The callback. - * @returns Promise with either TeamsMeetingNotificationRecipientFailureInfos or an empty object. + * @returns Promise with either MeetingNotificationRecipientFailureInfos or an empty object. */ sendMeetingNotification( meetingId: string, - notification: TeamsMeetingNotification, + notification: MeetingNotification, options?: msRest.RequestOptionsBase, - callback?: msRest.ServiceCallback + callback?: msRest.ServiceCallback ): Promise { return this.client.sendOperationRequest( { @@ -362,16 +362,16 @@ const sendMeetingNotificationOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: 'notification', mapper: { - ...Mappers.TeamsMeetingNotification, + ...Mappers.MeetingNotification, required: true } }, responses: { 202: { - bodyMapper: Mappers.TeamsMeetingNotificationRecipientFailureInfos + bodyMapper: Mappers.MeetingNotificationRecipientFailureInfos }, 207: { - bodyMapper: Mappers.TeamsMeetingNotificationRecipientFailureInfos + bodyMapper: Mappers.MeetingNotificationRecipientFailureInfos }, default: { bodyMapper: Mappers.ErrorResponse From ce55274fce9d5d2a7e11559f17bb80cfe89dd1b9 Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Sun, 29 Jan 2023 18:16:37 -0800 Subject: [PATCH 5/8] name change --- libraries/botbuilder/etc/botbuilder.api.md | 4 ++-- libraries/botbuilder/src/teamsInfo.ts | 6 +++--- libraries/botbuilder/tests/teamsInfo.test.js | 2 +- .../src/teams/models/index.ts | 6 +++--- .../src/teams/models/mappers.ts | 6 +++--- .../src/teams/models/teamsMappers.ts | 2 +- .../src/teams/operations/teams.ts | 20 +++++++++---------- .../etc/botframework-schema.api.md | 2 +- .../botframework-schema/src/teams/index.ts | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libraries/botbuilder/etc/botbuilder.api.md b/libraries/botbuilder/etc/botbuilder.api.md index 33e3eec095..2c10f139c7 100644 --- a/libraries/botbuilder/etc/botbuilder.api.md +++ b/libraries/botbuilder/etc/botbuilder.api.md @@ -41,7 +41,7 @@ import { IReceiveRequest } from 'botframework-streaming'; import { IStreamingTransportServer } from 'botframework-streaming'; import { MeetingEndEventDetails } from 'botbuilder-core'; import { MeetingNotification } from 'botbuilder-core'; -import { MeetingNotificationRecipientFailureInfos } from 'botbuilder-core'; +import { MeetingNotificationResponse } from 'botbuilder-core'; import { MeetingStartEventDetails } from 'botbuilder-core'; import { MessagingExtensionAction } from 'botbuilder-core'; import { MessagingExtensionActionResponse } from 'botbuilder-core'; @@ -458,7 +458,7 @@ export class TeamsInfo { static getTeamMember(context: TurnContext, teamId?: string, userId?: string): Promise; // @deprecated static getTeamMembers(context: TurnContext, teamId?: string): Promise; - static sendMeetingNotification(context: TurnContext, notification: MeetingNotification, meetingId?: string): Promise; + static sendMeetingNotification(context: TurnContext, notification: MeetingNotification, meetingId?: string): Promise; static sendMessageToTeamsChannel(context: TurnContext, activity: Activity, teamsChannelId: string, botAppId?: string): Promise<[ConversationReference, string]>; } diff --git a/libraries/botbuilder/src/teamsInfo.ts b/libraries/botbuilder/src/teamsInfo.ts index 52e109f823..eafe0d9f07 100644 --- a/libraries/botbuilder/src/teamsInfo.ts +++ b/libraries/botbuilder/src/teamsInfo.ts @@ -23,7 +23,7 @@ import { TeamsMeetingInfo, Channels, MeetingNotification, - MeetingNotificationRecipientFailureInfos, + MeetingNotificationResponse, } from 'botbuilder-core'; import { ConnectorClient, TeamsConnectorClient, TeamsConnectorModels } from 'botframework-connector'; @@ -342,14 +342,14 @@ export class TeamsInfo { * @param notification The meeting notification payload. * @param meetingId Id of the Teams meeting. * @returns Promise with either an empty object if notifications were successfully sent to all recipients or - * [MeetingNotificationRecipientFailureInfos](xref:botframework-schema.MeetingNotificationRecipientFailureInfos) if notifications + * [MeetingNotificationResponse](xref:botframework-schema.MeetingNotificationResponse) if notifications * were sent to some but not all recipients. */ static async sendMeetingNotification( context: TurnContext, notification: MeetingNotification, meetingId?: string - ): Promise { + ): Promise { const activity = context.activity; if (meetingId == null) { diff --git a/libraries/botbuilder/tests/teamsInfo.test.js b/libraries/botbuilder/tests/teamsInfo.test.js index 1cb0e46fdf..6da132035b 100644 --- a/libraries/botbuilder/tests/teamsInfo.test.js +++ b/libraries/botbuilder/tests/teamsInfo.test.js @@ -1028,7 +1028,7 @@ describe('TeamsInfo', function () { assert(isEmptyObject(sendTeamsMeetingNotification)); }); - it('should return a MeetingNotificationRecipientFailureInfos if a 207 status code was returned', async function () { + it('should return a MeetingNotificationResponse if a 207 status code was returned', async function () { const notification = {}; const meetingId = 'randomGUID'; const { expectedAuthHeader, expectation: fetchOauthToken } = nockOauth(); diff --git a/libraries/botframework-connector/src/teams/models/index.ts b/libraries/botframework-connector/src/teams/models/index.ts index 5f64a81c25..6a82873db2 100644 --- a/libraries/botframework-connector/src/teams/models/index.ts +++ b/libraries/botframework-connector/src/teams/models/index.ts @@ -8,7 +8,7 @@ import { ConversationList, TeamDetails, TeamsMeetingInfo, - MeetingNotificationRecipientFailureInfos, + MeetingNotificationResponse, TeamsMeetingParticipant, } from 'botframework-schema'; @@ -128,7 +128,7 @@ export type TeamsMeetingInfoResponse = TeamsMeetingInfo & { /** * Contains response data for the sendMeetingNotification operation. */ -export type TeamsSendMeetingNotificationResponse = MeetingNotificationRecipientFailureInfos & { +export type TeamsMeetingNotificationResponse = MeetingNotificationResponse & { /** * The underlying HTTP response. */ @@ -140,6 +140,6 @@ export type TeamsSendMeetingNotificationResponse = MeetingNotificationRecipientF /** * The response body as parsed JSON or XML */ - parsedBody: MeetingNotificationRecipientFailureInfos | {}; + parsedBody: MeetingNotificationResponse | {}; }; }; diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index 9f001463b2..aa5c6182ee 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -547,11 +547,11 @@ export const MeetingNotificationRecipientFailureInfo: msRest.CompositeMapper = { }, }; -export const MeetingNotificationRecipientFailureInfos: msRest.CompositeMapper = { - serializedName: 'MeetingNotificationRecipientFailureInfos', +export const MeetingNotificationResponse: msRest.CompositeMapper = { + serializedName: 'MeetingNotificationResponse', type: { name: 'Composite', - className: 'MeetingNotificationRecipientFailureInfos', + className: 'MeetingNotificationResponse', modelProperties: { recipientsFailureInfo: { serializedName: 'recipientsFailureInfo', diff --git a/libraries/botframework-connector/src/teams/models/teamsMappers.ts b/libraries/botframework-connector/src/teams/models/teamsMappers.ts index f4d04d0807..9be983a6ee 100644 --- a/libraries/botframework-connector/src/teams/models/teamsMappers.ts +++ b/libraries/botframework-connector/src/teams/models/teamsMappers.ts @@ -19,7 +19,7 @@ export { MeetingNotificationChannelData, MeetingOnBehalfOf, MeetingNotificationRecipientFailureInfo, - MeetingNotificationRecipientFailureInfos, + MeetingNotificationResponse, TaskModuleContinueResponse, TaskModuleTaskInfo, Attachment, diff --git a/libraries/botframework-connector/src/teams/operations/teams.ts b/libraries/botframework-connector/src/teams/operations/teams.ts index d9839dc931..5a44bb7e37 100644 --- a/libraries/botframework-connector/src/teams/operations/teams.ts +++ b/libraries/botframework-connector/src/teams/operations/teams.ts @@ -9,7 +9,7 @@ import * as Models from '../models'; import * as Mappers from '../models/teamsMappers'; import * as Parameters from '../models/parameters'; import { TeamsConnectorClientContext } from '../'; -import { ConversationList, TeamDetails, TeamsMeetingInfo, TeamsMeetingParticipant, MeetingNotificationRecipientFailureInfos, MeetingNotification } from 'botframework-schema'; +import { ConversationList, TeamDetails, TeamsMeetingInfo, TeamsMeetingParticipant, MeetingNotificationResponse, MeetingNotification } from 'botframework-schema'; /** Class representing a Teams. */ export class Teams { @@ -252,7 +252,7 @@ export class Teams { meetingId: string, notification: MeetingNotification, options?: msRest.RequestOptionsBase, - ): Promise + ): Promise /** * @param meetingId Meeting Id. * @param notification The content and configuration for the notification to send. @@ -261,7 +261,7 @@ export class Teams { sendMeetingNotification( meetingId: string, notification: MeetingNotification, - callback: msRest.ServiceCallback + callback: msRest.ServiceCallback ): void; /** * @param meetingId Meeting Id. @@ -273,21 +273,21 @@ export class Teams { meetingId: string, notification: MeetingNotification, options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback + callback: msRest.ServiceCallback ): void; /** * @param meetingId Meeting Id. * @param notification The content and configuration for the notification to send. * @param options The optional parameters. * @param callback The callback. - * @returns Promise with either MeetingNotificationRecipientFailureInfos or an empty object. + * @returns Promise with either MeetingNotificationResponse or an empty object. */ sendMeetingNotification( meetingId: string, notification: MeetingNotification, options?: msRest.RequestOptionsBase, - callback?: msRest.ServiceCallback - ): Promise { + callback?: msRest.ServiceCallback + ): Promise { return this.client.sendOperationRequest( { meetingId, @@ -296,7 +296,7 @@ export class Teams { }, sendMeetingNotificationOperationSpec, callback - ) as Promise; + ) as Promise; } } @@ -368,10 +368,10 @@ const sendMeetingNotificationOperationSpec: msRest.OperationSpec = { }, responses: { 202: { - bodyMapper: Mappers.MeetingNotificationRecipientFailureInfos + bodyMapper: Mappers.MeetingNotificationResponse }, 207: { - bodyMapper: Mappers.MeetingNotificationRecipientFailureInfos + bodyMapper: Mappers.MeetingNotificationResponse }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index 366252dd7e..20ae927b8e 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -975,7 +975,7 @@ export interface MeetingNotificationRecipientFailureInfo { } // @public -export interface MeetingNotificationRecipientFailureInfos { +export interface MeetingNotificationResponse { recipientsFailureInfo: MeetingNotificationRecipientFailureInfo[]; } diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index 7992a02722..89bfc9492c 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1951,9 +1951,9 @@ export interface MeetingNotificationRecipientFailureInfo { * @interface * Specifies the list of recipients for which the Teams meeting notification was not sent. */ -export interface MeetingNotificationRecipientFailureInfos { +export interface MeetingNotificationResponse { /** * @member {string} [recipientsFailureInfo] The list of recipients that failed to recieve the sent meetings notification. */ - recipientsFailureInfo: MeetingNotificationRecipientFailureInfo[]; + recipientsFailureInfo?: MeetingNotificationRecipientFailureInfo[]; } From d019154753b3a4d43af4bff660229142ac3695d3 Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Sun, 29 Jan 2023 18:20:08 -0800 Subject: [PATCH 6/8] update MeetingOnBehalfOf to just OnBehalfOf --- .../src/teams/models/mappers.ts | 8 ++++---- .../src/teams/models/teamsMappers.ts | 2 +- .../etc/botframework-schema.api.md | 20 +++++++++---------- .../botframework-schema/src/teams/index.ts | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index aa5c6182ee..3df94868a8 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -476,7 +476,7 @@ export const MeetingNotificationChannelData = { element: { type: { name: 'Composite', - className: 'MeetingOnBehalfOf', + className: 'OnBehalfOf', }, }, }, @@ -485,11 +485,11 @@ export const MeetingNotificationChannelData = { }, }; -export const MeetingOnBehalfOf: msRest.CompositeMapper = { - serializedName: 'MeetingOnBehalfOf', +export const OnBehalfOf: msRest.CompositeMapper = { + serializedName: 'OnBehalfOf', type: { name: 'Composite', - className: 'MeetingOnBehalfOf', + className: 'OnBehalfOf', modelProperties: { itemid: { serializedName: 'itemid', diff --git a/libraries/botframework-connector/src/teams/models/teamsMappers.ts b/libraries/botframework-connector/src/teams/models/teamsMappers.ts index 9be983a6ee..fe2a7a96ae 100644 --- a/libraries/botframework-connector/src/teams/models/teamsMappers.ts +++ b/libraries/botframework-connector/src/teams/models/teamsMappers.ts @@ -17,7 +17,7 @@ export { TeamsMeetingParticipant, MeetingNotification, MeetingNotificationChannelData, - MeetingOnBehalfOf, + OnBehalfOf, MeetingNotificationRecipientFailureInfo, MeetingNotificationResponse, TaskModuleContinueResponse, diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index 20ae927b8e..fb15e9b242 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -964,7 +964,7 @@ export interface MeetingNotificationBase { // @public export interface MeetingNotificationChannelData { - onBehalfOf?: MeetingOnBehalfOf[]; + onBehalfOf?: OnBehalfOf[]; } // @public @@ -976,15 +976,7 @@ export interface MeetingNotificationRecipientFailureInfo { // @public export interface MeetingNotificationResponse { - recipientsFailureInfo: MeetingNotificationRecipientFailureInfo[]; -} - -// @public -export interface MeetingOnBehalfOf { - displayName?: string; - itemid: 0 | number; - mentionType: 'person' | string; - mri: string; + recipientsFailureInfo?: MeetingNotificationRecipientFailureInfo[]; } // @public (undocumented) @@ -1312,6 +1304,14 @@ export interface OAuthCard { tokenPostResource: TokenPostResource; } +// @public +export interface OnBehalfOf { + displayName?: string; + itemid: 0 | number; + mentionType: 'person' | string; + mri: string; +} + // @public export type Os = 'default' | 'iOS' | 'android' | 'windows'; diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index 89bfc9492c..063a52840b 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1900,16 +1900,16 @@ export interface MeetingStageSurface { */ export interface MeetingNotificationChannelData { /** - * @member {MeetingOnBehalfOf} [onBehalfOf] The user that the bot is sending the notification on behalfOf, if any. + * @member {OnBehalfOf} [onBehalfOf] The user that the bot is sending the notification on behalfOf, if any. */ - onBehalfOf?: MeetingOnBehalfOf[]; + onBehalfOf?: OnBehalfOf[]; } /** * @interface * Specifies the Teams user that triggered the Teams meeting notification. */ -export interface MeetingOnBehalfOf { +export interface OnBehalfOf { /** * @member {number} [itemid] The id of the item. */ From 96c7f3e78899298cbb3300378d848dc92b43ce94 Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Wed, 1 Feb 2023 13:46:05 -0800 Subject: [PATCH 7/8] changes --- .../etc/botframework-schema.api.md | 10 +++++----- .../botframework-schema/src/teams/index.ts | 20 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index fb15e9b242..6a92741e0d 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -958,6 +958,7 @@ export type MeetingNotification = TargetedMeetingNotification; // @public export interface MeetingNotificationBase { + channelData?: MeetingNotificationChannelData; type: string; value: T; } @@ -979,10 +980,10 @@ export interface MeetingNotificationResponse { recipientsFailureInfo?: MeetingNotificationRecipientFailureInfo[]; } -// @public (undocumented) +// @public export interface MeetingStageSurface { content: T; - contentType: 'task' | string; + contentType: 'task'; surface: 'meetingStage'; } @@ -1659,13 +1660,12 @@ export interface TabSuggestedActions { } // @public -export interface TargetedMeetingNotification extends MeetingNotificationBase { - channelData?: MeetingNotificationChannelData; +export interface TargetedMeetingNotification extends MeetingNotificationBase { type: 'targetedMeetingNotification'; } // @public -export interface TargetedMeetingNotificationInfo { +export interface TargetedMeetingNotificationValue { recipients: string[]; surfaces: MeetingSurface[]; } diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index 063a52840b..b25119d3bb 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1833,22 +1833,22 @@ export interface MeetingNotificationBase { * @member {T} value The specific details of the meeting notification. */ value: T; + + /** + * @member {MeetingNotificationChannelData} [channelData] The channel data of the meeting notification. + */ + channelData?: MeetingNotificationChannelData; } /** * @interface * Specifies details of a targeted Teams meeting send notification payload. */ -export interface TargetedMeetingNotification extends MeetingNotificationBase { +export interface TargetedMeetingNotification extends MeetingNotificationBase { /** * @member {string} [type] The type of meeting notification. */ type: 'targetedMeetingNotification'; - - /** - * @member {MeetingNotificationChannelData} [channelData] The channel data of the meeting notification. - */ - channelData?: MeetingNotificationChannelData; } /** @@ -1861,7 +1861,7 @@ export type MeetingNotification = TargetedMeetingNotification; * @interface * Specifies recipients and surfaces to target in a Teams meeting notification. */ -export interface TargetedMeetingNotificationInfo { +export interface TargetedMeetingNotificationValue { /** * @member {string[]} [recipients] The list of recipient meeting MRIs. */ @@ -1878,6 +1878,10 @@ export interface TargetedMeetingNotificationInfo { */ export type MeetingSurface = MeetingStageSurface; +/** + * @interface + * Specifies the meeting stage surface in a Teams meeting notification. + */ export interface MeetingStageSurface { /** * @member {string} [surface] The surface type. @@ -1886,7 +1890,7 @@ export interface MeetingStageSurface { /** * @member {string} [contentType] The content type. */ - contentType: 'task' | string; + contentType: 'task'; /** * @template T * @member {T} [content] The content to display in the meeting notification. From d320cca97a1b92b8fff1c40e85e0120c1a5e9f0a Mon Sep 17 00:00:00 2001 From: Kavin Singh Date: Mon, 6 Feb 2023 14:16:44 -0800 Subject: [PATCH 8/8] moved channelData to child interface --- .../botframework-schema/etc/botframework-schema.api.md | 2 +- libraries/botframework-schema/src/teams/index.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index 6a92741e0d..cd2f50b869 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -958,7 +958,6 @@ export type MeetingNotification = TargetedMeetingNotification; // @public export interface MeetingNotificationBase { - channelData?: MeetingNotificationChannelData; type: string; value: T; } @@ -1661,6 +1660,7 @@ export interface TabSuggestedActions { // @public export interface TargetedMeetingNotification extends MeetingNotificationBase { + channelData?: MeetingNotificationChannelData; type: 'targetedMeetingNotification'; } diff --git a/libraries/botframework-schema/src/teams/index.ts b/libraries/botframework-schema/src/teams/index.ts index b25119d3bb..9293fc254b 100644 --- a/libraries/botframework-schema/src/teams/index.ts +++ b/libraries/botframework-schema/src/teams/index.ts @@ -1833,11 +1833,6 @@ export interface MeetingNotificationBase { * @member {T} value The specific details of the meeting notification. */ value: T; - - /** - * @member {MeetingNotificationChannelData} [channelData] The channel data of the meeting notification. - */ - channelData?: MeetingNotificationChannelData; } /** @@ -1849,6 +1844,11 @@ export interface TargetedMeetingNotification extends MeetingNotificationBase