diff --git a/sdk/eventgrid/eventgrid/CHANGELOG.md b/sdk/eventgrid/eventgrid/CHANGELOG.md index 25576a3b0f41..2ad0228e254f 100644 --- a/sdk/eventgrid/eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/eventgrid/CHANGELOG.md @@ -1,7 +1,15 @@ # Release History -## 4.0.1 (Unreleased) +## 4.1.0 (Unreleased) +- 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, + 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/package.json b/sdk/eventgrid/eventgrid/package.json index d0d1882d6338..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", @@ -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..452c0c1a3fa6 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 @@ -115,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; @@ -128,6 +149,7 @@ export type AcsSmsDeliveryReportReceivedEventData = AcsSmsEventBase & { deliveryStatusDetails: string; deliveryAttempts: AcsSmsDeliveryAttempt[]; receivedTimestamp: string; + tag: string; }; // @public @@ -1172,13 +1194,14 @@ export interface SystemEventNameToEventData { "Microsoft.Communication.ChatMessageDeleted": AcsChatMessageDeletedEventData; "Microsoft.Communication.ChatMessageEdited": AcsChatMessageEditedEventData; "Microsoft.Communication.ChatMessageReceived": AcsChatMessageReceivedEventData; - "Microsoft.Communication.ChatParticipantAddedToThread": AcsChatParticipantAddedToThreadEventData; "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - "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.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/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/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 8de17f4c72fe..379901bee3b2 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, @@ -127,14 +128,16 @@ 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. */ - "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. */ - "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 06249399637f..7edd658dbccd 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.1.0" title: GeneratedClient description: EventGrid Client generate-metadata: false