From e2c47af7692421a61b607d3eb3c83da012f02fff Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 22 Mar 2021 14:01:12 -0700 Subject: [PATCH 1/4] [EventGrid] Fix ACS Event Names The Azure Communication Services team noticed that some of their event shapes were wrong and have [updated the swagger](https://github.com/Azure/azure-rest-api-specs/pull/13485) to address this. This commit pulls these changes into our SDK. Fixes #14345 --- sdk/eventgrid/eventgrid/CHANGELOG.md | 3 + sdk/eventgrid/eventgrid/package.json | 4 +- .../eventgrid/review/eventgrid.api.md | 6 + .../eventgrid/src/generated/models/index.ts | 36 +++++- .../eventgrid/src/generated/models/mappers.ts | 103 ++++++++++++++++++ sdk/eventgrid/eventgrid/src/predicates.ts | 14 ++- sdk/eventgrid/eventgrid/swagger/README.md | 4 +- 7 files changed, 162 insertions(+), 8 deletions(-) diff --git a/sdk/eventgrid/eventgrid/CHANGELOG.md b/sdk/eventgrid/eventgrid/CHANGELOG.md index 25576a3b0f41..4730ec711f0a 100644 --- a/sdk/eventgrid/eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/eventgrid/CHANGELOG.md @@ -2,6 +2,9 @@ ## 4.0.1 (Unreleased) +- Add `Microsoft.Communication.ChatThreadParticipantAdded` and `Microsoft.Communication.ChatThreadParticipantRemoved` to the list of System Event types. These replace + `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` respectively. Azure Communication Services no + longer sends events with these older names. ## 4.0.0 (2021-03-17) diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index d0d1882d6338..45a4b8cab692 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -34,8 +34,8 @@ "//metadata": { "constantPaths": [ { - "path": "src/generated/generatedClientContext.ts", - "prefix": "packageVersion" + "path": "swagger/README.md", + "prefix": "package-version" }, { "path": "src/constants.ts", diff --git a/sdk/eventgrid/eventgrid/review/eventgrid.api.md b/sdk/eventgrid/eventgrid/review/eventgrid.api.md index edc863e60393..5e87d36aa893 100644 --- a/sdk/eventgrid/eventgrid/review/eventgrid.api.md +++ b/sdk/eventgrid/eventgrid/review/eventgrid.api.md @@ -21,6 +21,7 @@ export interface AcsChatEventBase { // @public export interface AcsChatEventInThreadBase { threadId: string; + transactionId: string; } // @public @@ -128,6 +129,7 @@ export type AcsSmsDeliveryReportReceivedEventData = AcsSmsEventBase & { deliveryStatusDetails: string; deliveryAttempts: AcsSmsDeliveryAttempt[]; receivedTimestamp: string; + tag: string; }; // @public @@ -1172,11 +1174,15 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatMessageDeleted": AcsChatMessageDeletedEventData; "Microsoft.Communication.ChatMessageEdited": AcsChatMessageEditedEventData; "Microsoft.Communication.ChatMessageReceived": AcsChatMessageReceivedEventData; + // @deprecated "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; + // @deprecated "Microsoft.Communication.ChatParticipantRemovedFromThread": AcsChatParticipantRemovedFromThreadEventData; "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; "Microsoft.Communication.ChatThreadCreatedWithUser": AcsChatThreadCreatedWithUserEventData; + "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; + "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; "Microsoft.Communication.SMSDeliveryReportReceived": AcsSmsDeliveryReportReceivedEventData; diff --git a/sdk/eventgrid/eventgrid/src/generated/models/index.ts b/sdk/eventgrid/eventgrid/src/generated/models/index.ts index 52f5adf34614..be6d3916eac1 100644 --- a/sdk/eventgrid/eventgrid/src/generated/models/index.ts +++ b/sdk/eventgrid/eventgrid/src/generated/models/index.ts @@ -1864,6 +1864,8 @@ export interface AcsChatEventBase { /** Schema of common properties of all thread-level chat events */ export interface AcsChatEventInThreadBase { + /** The transaction id will be used as co-relation vector */ + transactionId: string; /** The chat thread id */ threadId: string; } @@ -1896,6 +1898,34 @@ export interface AcsSmsEventBase { to: string; } +/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.RecordingFileStatusUpdated event. */ +export interface AcsRecordingFileStatusUpdatedEventData { + /** The details of recording storage information */ + recordingStorageInfo: AcsRecordingStorageInfo; + /** The time at which the recording started */ + recordingStartTime: string; + /** The recording duration in milliseconds */ + recordingDurationMs: number; + /** The reason for ending recording session */ + sessionEndReason: string; +} + +/** Schema for all properties of Recording Storage Information. */ +export interface AcsRecordingStorageInfo { + /** List of details of recording chunks information */ + recordingChunks: AcsRecordingChunkInfo[]; +} + +/** Schema for all properties of Recording Chunk Information. */ +export interface AcsRecordingChunkInfo { + /** The documentId of the recording chunk */ + documentId: string; + /** The index of the recording chunk */ + index: number; + /** The reason for ending the recording chunk */ + endReason: string; +} + /** Event data for Microsoft.Devices.DeviceCreated event. */ export type IotHubDeviceCreatedEventData = DeviceLifeCycleEvent & {}; @@ -2033,7 +2063,7 @@ export type AcsChatThreadEventInThreadBase = AcsChatEventInThreadBase & { version: number; }; -/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatParticipantAddedToThread event. */ +/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadParticipantAdded event. */ export type AcsChatParticipantAddedToThreadEventData = AcsChatEventInThreadBase & { /** The time at which the user was added to the thread */ time: string; @@ -2045,7 +2075,7 @@ export type AcsChatParticipantAddedToThreadEventData = AcsChatEventInThreadBase version: number; }; -/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatParticipantRemovedFromThread event. */ +/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.ChatThreadParticipantRemoved event. */ export type AcsChatParticipantRemovedFromThreadEventData = AcsChatEventInThreadBase & { /** The time at which the user was removed to the thread */ time: string; @@ -2067,6 +2097,8 @@ export type AcsSmsDeliveryReportReceivedEventData = AcsSmsEventBase & { deliveryAttempts: AcsSmsDeliveryAttempt[]; /** The time at which the SMS delivery report was received */ receivedTimestamp: string; + /** Customer Content */ + tag: string; }; /** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSReceived event. */ diff --git a/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts b/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts index 6e056e432067..ce54c8b67d3f 100644 --- a/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts +++ b/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts @@ -5350,6 +5350,13 @@ export const AcsChatEventInThreadBase: CompositeMapper = { name: "Composite", className: "AcsChatEventInThreadBase", modelProperties: { + transactionId: { + serializedName: "transactionId", + required: true, + type: { + name: "String" + } + }, threadId: { serializedName: "threadId", required: true, @@ -5444,6 +5451,95 @@ export const AcsSmsEventBase: CompositeMapper = { } }; +export const AcsRecordingFileStatusUpdatedEventData: CompositeMapper = { + type: { + name: "Composite", + className: "AcsRecordingFileStatusUpdatedEventData", + modelProperties: { + recordingStorageInfo: { + serializedName: "recordingStorageInfo", + type: { + name: "Composite", + className: "AcsRecordingStorageInfo" + } + }, + recordingStartTime: { + serializedName: "recordingStartTime", + required: true, + type: { + name: "String" + } + }, + recordingDurationMs: { + serializedName: "recordingDurationMs", + required: true, + type: { + name: "Number" + } + }, + sessionEndReason: { + serializedName: "sessionEndReason", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AcsRecordingStorageInfo: CompositeMapper = { + type: { + name: "Composite", + className: "AcsRecordingStorageInfo", + modelProperties: { + recordingChunks: { + serializedName: "recordingChunks", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcsRecordingChunkInfo" + } + } + } + } + } + } +}; + +export const AcsRecordingChunkInfo: CompositeMapper = { + type: { + name: "Composite", + className: "AcsRecordingChunkInfo", + modelProperties: { + documentId: { + serializedName: "documentId", + required: true, + type: { + name: "String" + } + }, + index: { + serializedName: "index", + required: true, + type: { + name: "Number" + } + }, + endReason: { + serializedName: "endReason", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const IotHubDeviceCreatedEventData: CompositeMapper = { type: { name: "Composite", @@ -6022,6 +6118,13 @@ export const AcsSmsDeliveryReportReceivedEventData: CompositeMapper = { type: { name: "String" } + }, + tag: { + serializedName: "tag", + required: true, + type: { + name: "String" + } } } } diff --git a/sdk/eventgrid/eventgrid/src/predicates.ts b/sdk/eventgrid/eventgrid/src/predicates.ts index 8de17f4c72fe..3685c6f7f212 100644 --- a/sdk/eventgrid/eventgrid/src/predicates.ts +++ b/sdk/eventgrid/eventgrid/src/predicates.ts @@ -127,12 +127,22 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser" event. */ "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThread" event. */ + /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThread" event. + * + * @deprecated since 4.0.1. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantAdded instead. + */ "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; + /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantAdded" event. */ + "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThreadWithUser" event. */ "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThread" event. */ + /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThread" event. + * + * @deprecated since 4.0.1. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantRemoved instead. + */ "Microsoft.Communication.ChatParticipantRemovedFromThread": AcsChatParticipantRemovedFromThreadEventData; + /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantRemoved" event. */ + "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser" event. */ "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; /** An interface for the event data of a "Microsoft.Communication.SMSDeliveryReportReceived" event. */ diff --git a/sdk/eventgrid/eventgrid/swagger/README.md b/sdk/eventgrid/eventgrid/swagger/README.md index 06249399637f..6d132a53cf2e 100644 --- a/sdk/eventgrid/eventgrid/swagger/README.md +++ b/sdk/eventgrid/eventgrid/swagger/README.md @@ -5,9 +5,9 @@ ## Configuration ```yaml -require: "https://github.com/Azure/azure-rest-api-specs/blob/bd75cbc7ae9c997f39362ac9d19d557219720bbd/specification/eventgrid/data-plane/readme.md" +require: "https://github.com/Azure/azure-rest-api-specs/blob/cf9d9c44d990d82a763cf8c23a324de337e387a5/specification/eventgrid/data-plane/readme.md" package-name: "@azure/eventgrid" -package-version: "4.0.0" +package-version: "4.0.1" title: GeneratedClient description: EventGrid Client generate-metadata: false From d184be3440286cc16628c3ae066b4a5350b80f79 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 22 Mar 2021 14:20:50 -0700 Subject: [PATCH 2/4] [EventGrid] Add types for RecordingFileStatusUpdated event This is a new event ACS is sending. --- sdk/eventgrid/eventgrid/CHANGELOG.md | 3 ++- sdk/eventgrid/eventgrid/package.json | 2 +- .../eventgrid/review/eventgrid.api.md | 21 +++++++++++++++++++ sdk/eventgrid/eventgrid/src/constants.ts | 2 +- sdk/eventgrid/eventgrid/src/index.ts | 3 +++ sdk/eventgrid/eventgrid/src/predicates.ts | 7 +++++-- sdk/eventgrid/eventgrid/swagger/README.md | 2 +- 7 files changed, 34 insertions(+), 6 deletions(-) diff --git a/sdk/eventgrid/eventgrid/CHANGELOG.md b/sdk/eventgrid/eventgrid/CHANGELOG.md index 4730ec711f0a..e0887c052a78 100644 --- a/sdk/eventgrid/eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/eventgrid/CHANGELOG.md @@ -1,10 +1,11 @@ # Release History -## 4.0.1 (Unreleased) +## 4.1.0 (Unreleased) - Add `Microsoft.Communication.ChatThreadParticipantAdded` and `Microsoft.Communication.ChatThreadParticipantRemoved` to the list of System Event types. These replace `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` respectively. Azure Communication Services no longer sends events with these older names. +- Add `Microsoft.Communications.RecordingFileStatusUpdated` system event. ## 4.0.0 (2021-03-17) diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index 45a4b8cab692..5671e3c65a86 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "description": "An isomorphic client library for the Azure Event Grid service.", - "version": "4.0.1", + "version": "4.1.0", "keywords": [ "node", "azure", diff --git a/sdk/eventgrid/eventgrid/review/eventgrid.api.md b/sdk/eventgrid/eventgrid/review/eventgrid.api.md index 5e87d36aa893..ca55d2c5962f 100644 --- a/sdk/eventgrid/eventgrid/review/eventgrid.api.md +++ b/sdk/eventgrid/eventgrid/review/eventgrid.api.md @@ -116,6 +116,26 @@ export type AcsChatThreadWithUserDeletedEventData = AcsChatThreadEventBase & { deleteTime: string; }; +// @public +export interface AcsRecordingChunkInfo { + documentId: string; + endReason: string; + index: number; +} + +// @public +export interface AcsRecordingFileStatusUpdatedEventData { + recordingDurationMs: number; + recordingStartTime: string; + recordingStorageInfo: AcsRecordingStorageInfo; + sessionEndReason: string; +} + +// @public +export interface AcsRecordingStorageInfo { + recordingChunks: AcsRecordingChunkInfo[]; +} + // @public export interface AcsSmsDeliveryAttempt { segmentsFailed: number; @@ -1185,6 +1205,7 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; + "Microsoft.Communication.RecordingFileStatusUpdated": AcsRecordingFileStatusUpdatedEventData; "Microsoft.Communication.SMSDeliveryReportReceived": AcsSmsDeliveryReportReceivedEventData; "Microsoft.Communication.SMSReceived": AcsSmsReceivedEventData; "Microsoft.ContainerRegistry.ChartDeleted": ContainerRegistryChartDeletedEventData; diff --git a/sdk/eventgrid/eventgrid/src/constants.ts b/sdk/eventgrid/eventgrid/src/constants.ts index 86e9b3420270..8e5bdeaf89c4 100644 --- a/sdk/eventgrid/eventgrid/src/constants.ts +++ b/sdk/eventgrid/eventgrid/src/constants.ts @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "4.0.1"; +export const SDK_VERSION: string = "4.1.0"; export const DEFAULT_API_VERSION = "2018-01-01"; diff --git a/sdk/eventgrid/eventgrid/src/index.ts b/sdk/eventgrid/eventgrid/src/index.ts index 57d1f449ce0d..bed76edbb7eb 100644 --- a/sdk/eventgrid/eventgrid/src/index.ts +++ b/sdk/eventgrid/eventgrid/src/index.ts @@ -37,6 +37,9 @@ export { AcsChatParticipantAddedToThreadWithUserEventData, AcsChatParticipantRemovedFromThreadEventData, AcsChatParticipantRemovedFromThreadWithUserEventData, + AcsRecordingFileStatusUpdatedEventData, + AcsRecordingStorageInfo, + AcsRecordingChunkInfo, CommunicationIdentifierModel, CommunicationUserIdentifierModel, CommunicationCloudEnvironmentModel, diff --git a/sdk/eventgrid/eventgrid/src/predicates.ts b/sdk/eventgrid/eventgrid/src/predicates.ts index 3685c6f7f212..26282b3b0273 100644 --- a/sdk/eventgrid/eventgrid/src/predicates.ts +++ b/sdk/eventgrid/eventgrid/src/predicates.ts @@ -12,6 +12,7 @@ import { AcsChatParticipantAddedToThreadWithUserEventData, AcsChatParticipantRemovedFromThreadEventData, AcsChatParticipantRemovedFromThreadWithUserEventData, + AcsRecordingFileStatusUpdatedEventData, AcsSmsDeliveryReportReceivedEventData, AcsSmsReceivedEventData, AppConfigurationKeyValueDeletedEventData, @@ -129,7 +130,7 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThread" event. * - * @deprecated since 4.0.1. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantAdded instead. + * @deprecated since 4.1.0. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantAdded instead. */ "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantAdded" event. */ @@ -138,13 +139,15 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThread" event. * - * @deprecated since 4.0.1. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantRemoved instead. + * @deprecated since 4.1.0. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantRemoved instead. */ "Microsoft.Communication.ChatParticipantRemovedFromThread": AcsChatParticipantRemovedFromThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantRemoved" event. */ "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser" event. */ "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; + /** An interface for the event data of a "Microsoft.Communication.RecordingFileStatusUpdated" event. */ + "Microsoft.Communication.RecordingFileStatusUpdated": AcsRecordingFileStatusUpdatedEventData; /** An interface for the event data of a "Microsoft.Communication.SMSDeliveryReportReceived" event. */ "Microsoft.Communication.SMSDeliveryReportReceived": AcsSmsDeliveryReportReceivedEventData; /** An interface for the event data of a "Microsoft.Communication.SMSReceived" event. */ diff --git a/sdk/eventgrid/eventgrid/swagger/README.md b/sdk/eventgrid/eventgrid/swagger/README.md index 6d132a53cf2e..7edd658dbccd 100644 --- a/sdk/eventgrid/eventgrid/swagger/README.md +++ b/sdk/eventgrid/eventgrid/swagger/README.md @@ -7,7 +7,7 @@ ```yaml require: "https://github.com/Azure/azure-rest-api-specs/blob/cf9d9c44d990d82a763cf8c23a324de337e387a5/specification/eventgrid/data-plane/readme.md" package-name: "@azure/eventgrid" -package-version: "4.0.1" +package-version: "4.1.0" title: GeneratedClient description: EventGrid Client generate-metadata: false From 142fc41e4bf5e380001e9d42af3c0c8cc2c76e91 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 23 Mar 2021 12:07:08 -0700 Subject: [PATCH 3/4] [EventGrid] Remove incorrect ACS System Events After discussion, we are comfortable removing these two event names from our mapping. The rationale here is that the service never sent events using these names (they made a typo when documenting the event names in Swagger) and so any code using them was going to be wrong. In this case, we like that if you're using TypeScript you'll see a compile time issue here because it will be pointing to place in your code where things were never going to behave as you might have expected. The `CHANGELOG.md` has been updated to provide a little more perscriptive guidence on what to do here, and we feel OK about not doing a major version bump. --- sdk/eventgrid/eventgrid/CHANGELOG.md | 10 +++++++--- sdk/eventgrid/eventgrid/review/eventgrid.api.md | 4 ---- sdk/eventgrid/eventgrid/src/predicates.ts | 10 ---------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/sdk/eventgrid/eventgrid/CHANGELOG.md b/sdk/eventgrid/eventgrid/CHANGELOG.md index e0887c052a78..826733e58cae 100644 --- a/sdk/eventgrid/eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/eventgrid/CHANGELOG.md @@ -2,9 +2,13 @@ ## 4.1.0 (Unreleased) -- Add `Microsoft.Communication.ChatThreadParticipantAdded` and `Microsoft.Communication.ChatThreadParticipantRemoved` to the list of System Event types. These replace - `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` respectively. Azure Communication Services no - longer sends events with these older names. +- The syetem event names `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` have been removed, and + `Microsoft.Communication.ChatThreadParticipantAdded` and `Microsoft.Communication.ChatThreadParticipantRemoved` have been added. The old names did not match the + the type names that Azure Communication Services was using for these events. TypeScript users will now see compliation errors if they are calling `isSystemEvent` with + either `Microsoft.Communication.ChatParticipantAddedToThread` or `Microsoft.Communication.ChatParticipantRemovedFromThread` as the event name. To fix these issues, + replace all uses of `Microsoft.Communication.ChatParticipantAddedToThread` with `Microsoft.Communication.ChatThreadParticipantAdded` and + `Microsoft.Communication.ChatParticipantRemovedFromThread` with `Microsoft.Communication.ChatThreadParticipantRemoved`. + - Add `Microsoft.Communications.RecordingFileStatusUpdated` system event. ## 4.0.0 (2021-03-17) diff --git a/sdk/eventgrid/eventgrid/review/eventgrid.api.md b/sdk/eventgrid/eventgrid/review/eventgrid.api.md index ca55d2c5962f..452c0c1a3fa6 100644 --- a/sdk/eventgrid/eventgrid/review/eventgrid.api.md +++ b/sdk/eventgrid/eventgrid/review/eventgrid.api.md @@ -1194,11 +1194,7 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatMessageDeleted": AcsChatMessageDeletedEventData; "Microsoft.Communication.ChatMessageEdited": AcsChatMessageEditedEventData; "Microsoft.Communication.ChatMessageReceived": AcsChatMessageReceivedEventData; - // @deprecated - "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - // @deprecated - "Microsoft.Communication.ChatParticipantRemovedFromThread": AcsChatParticipantRemovedFromThreadEventData; "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; "Microsoft.Communication.ChatThreadCreatedWithUser": AcsChatThreadCreatedWithUserEventData; "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; diff --git a/sdk/eventgrid/eventgrid/src/predicates.ts b/sdk/eventgrid/eventgrid/src/predicates.ts index 26282b3b0273..379901bee3b2 100644 --- a/sdk/eventgrid/eventgrid/src/predicates.ts +++ b/sdk/eventgrid/eventgrid/src/predicates.ts @@ -128,20 +128,10 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser" event. */ "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThread" event. - * - * @deprecated since 4.1.0. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantAdded instead. - */ - "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantAdded" event. */ "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThreadWithUser" event. */ "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThread" event. - * - * @deprecated since 4.1.0. Azure Communication Services no longer uses this event name. Please use Microsoft.Communication.ChatThreadParticipantRemoved instead. - */ - "Microsoft.Communication.ChatParticipantRemovedFromThread": AcsChatParticipantRemovedFromThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantRemoved" event. */ "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser" event. */ From 46dcf78ab1187b8b7c35d15d1b10563f7ae4feb7 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 23 Mar 2021 12:59:53 -0700 Subject: [PATCH 4/4] Update sdk/eventgrid/eventgrid/CHANGELOG.md Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> --- sdk/eventgrid/eventgrid/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/eventgrid/eventgrid/CHANGELOG.md b/sdk/eventgrid/eventgrid/CHANGELOG.md index 826733e58cae..2ad0228e254f 100644 --- a/sdk/eventgrid/eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/eventgrid/CHANGELOG.md @@ -2,7 +2,7 @@ ## 4.1.0 (Unreleased) -- The syetem event names `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` have been removed, and +- The system event names `Microsoft.Communication.ChatParticipantAddedToThread` and `Microsoft.Communication.ChatParticipantRemovedFromThread` have been removed, and `Microsoft.Communication.ChatThreadParticipantAdded` and `Microsoft.Communication.ChatThreadParticipantRemoved` have been added. The old names did not match the the type names that Azure Communication Services was using for these events. TypeScript users will now see compliation errors if they are calling `isSystemEvent` with either `Microsoft.Communication.ChatParticipantAddedToThread` or `Microsoft.Communication.ChatParticipantRemovedFromThread` as the event name. To fix these issues,