Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventGrid] Add Azure Communication Service Events #11428

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/eventgrid/eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 3.0.0-beta.2 (Unreleased)

- Added support for system events sent by the Azure Communication Services.

## 3.0.0-beta.1 (2020-09-08)

Expand Down
123 changes: 122 additions & 1 deletion sdk/eventgrid/eventgrid/review/eventgrid.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,117 @@ import { KeyCredential } from '@azure/core-auth';
import { OperationOptions } from '@azure/core-http';
import { PipelineOptions } from '@azure/core-http';

// @public
export interface ACSChatEventBase {
recipientId?: string;
threadId?: string;
transactionId?: string;
}

// @public
export type ACSChatMemberAddedToThreadWithUserEventData = ACSChatThreadEventBase & {
time?: Date;
addedBy?: string;
memberAdded?: ACSChatThreadMember;
};

// @public
export type ACSChatMemberRemovedFromThreadWithUserEventData = ACSChatThreadEventBase & {
time?: Date;
removedBy?: string;
memberRemoved?: ACSChatThreadMember;
};

// @public
export type ACSChatMessageDeletedEventData = ACSChatMessageEventBase & {
deleteTime?: Date;
};

// @public
export type ACSChatMessageEditedEventData = ACSChatMessageEventBase & {
messageBody?: string;
editTime?: Date;
};

// @public
export type ACSChatMessageEventBase = ACSChatEventBase & {
messageId?: string;
senderId?: string;
senderDisplayName?: string;
composeTime?: Date;
type?: string;
version?: number;
};

// @public
export type ACSChatMessageReceivedEventData = ACSChatMessageEventBase & {
messageBody?: string;
};

// @public
export type ACSChatThreadCreatedWithUserEventData = ACSChatThreadEventBase & {
createdBy?: string;
properties?: {
[propertyName: string]: any;
};
members?: ACSChatThreadMember[];
};

// @public
export type ACSChatThreadEventBase = ACSChatEventBase & {
createTime?: Date;
version?: number;
};

// @public
export interface ACSChatThreadMember {
displayName?: string;
memberId?: string;
}

// @public
export type ACSChatThreadPropertiesUpdatedPerUserEventData = ACSChatThreadEventBase & {
editedBy?: string;
editTime?: Date;
properties?: {
[propertyName: string]: any;
};
};

// @public
export type ACSChatThreadWithUserDeletedEventData = ACSChatThreadEventBase & {
deletedBy?: string;
deleteTime?: Date;
};

// @public
export interface AcssmsDeliveryAttempt {
segmentsFailed?: number;
segmentsSucceeded?: number;
timestamp?: Date;
}

// @public
export type AcssmsDeliveryReportReceivedEventData = AcssmsEventBase & {
deliveryStatus?: string;
deliveryStatusDetails?: string;
deliveryAttempts?: AcssmsDeliveryAttempt[];
receivedTimestamp?: Date;
};

// @public
export interface AcssmsEventBase {
from?: string;
messageId?: string;
to?: string;
}

// @public
export type AcssmsReceivedEventData = AcssmsEventBase & {
message?: string;
receivedTimestamp?: Date;
};

// @public
export type AppAction = "Restarted" | "Stopped" | "ChangedAppSettings" | "Started" | "Completed" | "Failed";

Expand Down Expand Up @@ -293,7 +404,7 @@ export function isSystemEvent<T extends KnownSystemEventTypes>(eventType: T, eve
export function isSystemEvent<T extends KnownSystemEventTypes>(eventType: T, event: CloudEvent<unknown>): event is CloudEvent<SystemEventNameToEventData[T]>;

// @public
export type KnownSystemEventTypes = "Microsoft.AppConfiguration.KeyValueDeleted" | "Microsoft.AppConfiguration.KeyValueModified" | "Microsoft.ContainerRegistry.ImagePushed" | "Microsoft.ContainerRegistry.ImageDeleted" | "Microsoft.ContainerRegistry.ChartDeleted" | "Microsoft.ContainerRegistry.ChartPushed" | "Microsoft.Devices.DeviceCreated" | "Microsoft.Devices.DeviceDeleted" | "Microsoft.Devices.DeviceConnected" | "Microsoft.Devices.DeviceDisconnected" | "Microsoft.Devices.DeviceTelemetry" | "Microsoft.EventGrid.SubscriptionValidationEvent" | "Microsoft.EventGrid.SubscriptionDeletedEvent" | "Microsoft.EventHub.CaptureFileCreated" | "Microsoft.MachineLearningServices.DatasetDriftDetected" | "Microsoft.MachineLearningServices.ModelDeployed" | "Microsoft.MachineLearningServices.ModelRegistered" | "Microsoft.MachineLearningServices.RunCompleted" | "Microsoft.MachineLearningServices.RunStatusChanged" | "Microsoft.Maps.GeofenceEntered" | "Microsoft.Maps.GeofenceExited" | "Microsoft.Maps.GeofenceResult" | "Microsoft.Media.JobStateChange" | "Microsoft.Media.JobOutputStateChange" | "Microsoft.Media.JobScheduled" | "Microsoft.Media.JobProcessing" | "Microsoft.Media.JobCanceling" | "Microsoft.Media.JobFinished" | "Microsoft.Media.JobCanceled" | "Microsoft.Media.JobErrored" | "Microsoft.Media.JobOutputCanceled" | "Microsoft.Media.JobOutputCanceling" | "Microsoft.Media.JobOutputErrored" | "Microsoft.Media.JobOutputFinished" | "Microsoft.Media.JobOutputProcessing" | "Microsoft.Media.JobOutputScheduled" | "Microsoft.Media.JobOutputProgress" | "Microsoft.Media.LiveEventEncoderConnected" | "Microsoft.Media.LiveEventConnectionRejected" | "Microsoft.Media.LiveEventEncoderDisconnected" | "Microsoft.Media.LiveEventIncomingStreamReceived" | "Microsoft.Media.LiveEventIncomingStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingDataChunkDropped" | "Microsoft.Media.LiveEventIngestHeartbeat" | "Microsoft.Media.LiveEventTrackDiscontinuityDetected" | "Microsoft.Resources.ResourceWriteSuccess" | "Microsoft.Resources.ResourceWriteFailure" | "Microsoft.Resources.ResourceWriteCancel" | "Microsoft.Resources.ResourceDeleteSuccess" | "Microsoft.Resources.ResourceDeleteFailure" | "Microsoft.Resources.ResourceDeleteCancel" | "Microsoft.Resources.ResourceActionSuccess" | "Microsoft.Resources.ResourceActionFailure" | "Microsoft.Resources.ResourceActionCancel" | "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners" | "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener" | "Microsoft.Storage.BlobCreated" | "Microsoft.Storage.BlobDeleted" | "Microsoft.Storage.BlobRenamed" | "Microsoft.Storage.DirectoryCreated" | "Microsoft.Storage.DirectoryDeleted" | "Microsoft.Storage.DirectoryRenamed" | "Microsoft.Storage.LifecyclePolicyCompleted" | "Microsoft.Web.AppUpdated" | "Microsoft.Web.BackupOperationStarted" | "Microsoft.Web.BackupOperationCompleted" | "Microsoft.Web.BackupOperationFailed" | "Microsoft.Web.RestoreOperationStarted" | "Microsoft.Web.RestoreOperationCompleted" | "Microsoft.Web.RestoreOperationFailed" | "Microsoft.Web.SlotSwapStarted" | "Microsoft.Web.SlotSwapCompleted" | "Microsoft.Web.SlotSwapFailed" | "Microsoft.Web.SlotSwapWithPreviewStarted" | "Microsoft.Web.SlotSwapWithPreviewCancelled" | "Microsoft.Web.AppServicePlanUpdated";
export type KnownSystemEventTypes = "Microsoft.AppConfiguration.KeyValueDeleted" | "Microsoft.AppConfiguration.KeyValueModified" | "Microsoft.Communication.ChatMessageReceived" | "Microsoft.Communication.ChatMessageEdited" | "Microsoft.Communication.ChatMessageDeleted" | "Microsoft.Communication.ChatThreadCreatedWithUser" | "Microsoft.Communication.ChatThreadWithUserDeleted" | "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser" | "Microsoft.Communication.ChatMemberAddedToThreadWithUser" | "Microsoft.Communication.ChatMemberRemovedFromThreadWithUser" | "Microsoft.Communication.SMSDeliveryReportReceived" | "Microsoft.Communication.SMSReceived" | "Microsoft.ContainerRegistry.ImagePushed" | "Microsoft.ContainerRegistry.ImageDeleted" | "Microsoft.ContainerRegistry.ChartDeleted" | "Microsoft.ContainerRegistry.ChartPushed" | "Microsoft.Devices.DeviceCreated" | "Microsoft.Devices.DeviceDeleted" | "Microsoft.Devices.DeviceConnected" | "Microsoft.Devices.DeviceDisconnected" | "Microsoft.Devices.DeviceTelemetry" | "Microsoft.EventGrid.SubscriptionValidationEvent" | "Microsoft.EventGrid.SubscriptionDeletedEvent" | "Microsoft.EventHub.CaptureFileCreated" | "Microsoft.MachineLearningServices.DatasetDriftDetected" | "Microsoft.MachineLearningServices.ModelDeployed" | "Microsoft.MachineLearningServices.ModelRegistered" | "Microsoft.MachineLearningServices.RunCompleted" | "Microsoft.MachineLearningServices.RunStatusChanged" | "Microsoft.Maps.GeofenceEntered" | "Microsoft.Maps.GeofenceExited" | "Microsoft.Maps.GeofenceResult" | "Microsoft.Media.JobStateChange" | "Microsoft.Media.JobOutputStateChange" | "Microsoft.Media.JobScheduled" | "Microsoft.Media.JobProcessing" | "Microsoft.Media.JobCanceling" | "Microsoft.Media.JobFinished" | "Microsoft.Media.JobCanceled" | "Microsoft.Media.JobErrored" | "Microsoft.Media.JobOutputCanceled" | "Microsoft.Media.JobOutputCanceling" | "Microsoft.Media.JobOutputErrored" | "Microsoft.Media.JobOutputFinished" | "Microsoft.Media.JobOutputProcessing" | "Microsoft.Media.JobOutputScheduled" | "Microsoft.Media.JobOutputProgress" | "Microsoft.Media.LiveEventEncoderConnected" | "Microsoft.Media.LiveEventConnectionRejected" | "Microsoft.Media.LiveEventEncoderDisconnected" | "Microsoft.Media.LiveEventIncomingStreamReceived" | "Microsoft.Media.LiveEventIncomingStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingDataChunkDropped" | "Microsoft.Media.LiveEventIngestHeartbeat" | "Microsoft.Media.LiveEventTrackDiscontinuityDetected" | "Microsoft.Resources.ResourceWriteSuccess" | "Microsoft.Resources.ResourceWriteFailure" | "Microsoft.Resources.ResourceWriteCancel" | "Microsoft.Resources.ResourceDeleteSuccess" | "Microsoft.Resources.ResourceDeleteFailure" | "Microsoft.Resources.ResourceDeleteCancel" | "Microsoft.Resources.ResourceActionSuccess" | "Microsoft.Resources.ResourceActionFailure" | "Microsoft.Resources.ResourceActionCancel" | "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners" | "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener" | "Microsoft.Storage.BlobCreated" | "Microsoft.Storage.BlobDeleted" | "Microsoft.Storage.BlobRenamed" | "Microsoft.Storage.DirectoryCreated" | "Microsoft.Storage.DirectoryDeleted" | "Microsoft.Storage.DirectoryRenamed" | "Microsoft.Storage.LifecyclePolicyCompleted" | "Microsoft.Web.AppUpdated" | "Microsoft.Web.BackupOperationStarted" | "Microsoft.Web.BackupOperationCompleted" | "Microsoft.Web.BackupOperationFailed" | "Microsoft.Web.RestoreOperationStarted" | "Microsoft.Web.RestoreOperationCompleted" | "Microsoft.Web.RestoreOperationFailed" | "Microsoft.Web.SlotSwapStarted" | "Microsoft.Web.SlotSwapCompleted" | "Microsoft.Web.SlotSwapFailed" | "Microsoft.Web.SlotSwapWithPreviewStarted" | "Microsoft.Web.SlotSwapWithPreviewCancelled" | "Microsoft.Web.AppServicePlanUpdated";

// @public
export interface MachineLearningServicesDatasetDriftDetectedEventData {
Expand Down Expand Up @@ -878,6 +989,16 @@ export interface SubscriptionValidationEventData {
export interface SystemEventNameToEventData {
"Microsoft.AppConfiguration.KeyValueDeleted": AppConfigurationKeyValueDeletedEventData;
"Microsoft.AppConfiguration.KeyValueModified": AppConfigurationKeyValueModifiedEventData;
"Microsoft.Communication.ChatMemberAddedToThreadWithUser": ACSChatMemberAddedToThreadWithUserEventData;
"Microsoft.Communication.ChatMemberRemovedFromThreadWithUser": ACSChatMemberRemovedFromThreadWithUserEventData;
"Microsoft.Communication.ChatMessageDeleted": ACSChatMessageDeletedEventData;
"Microsoft.Communication.ChatMessageEdited": ACSChatMessageEditedEventData;
"Microsoft.Communication.ChatMessageReceived": ACSChatMessageReceivedEventData;
"Microsoft.Communication.ChatThreadCreatedWithUser": ACSChatThreadCreatedWithUserEventData;
"Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": ACSChatThreadPropertiesUpdatedPerUserEventData;
"Microsoft.Communication.ChatThreadWithUserDeleted": ACSChatThreadWithUserDeletedEventData;
"Microsoft.Communication.SMSDeliveryReportReceived": AcssmsDeliveryReportReceivedEventData;
"Microsoft.Communication.SMSReceived": AcssmsReceivedEventData;
"Microsoft.ContainerRegistry.ChartDeleted": ContainerRegistryChartDeletedEventData;
"Microsoft.ContainerRegistry.ChartPushed": ContainerRegistryChartPushedEventData;
"Microsoft.ContainerRegistry.ImageDeleted": ContainerRegistryImageDeletedEventData;
Expand Down
Loading