Skip to content

Commit

Permalink
Revert "adding MessageAnalysisCompletedEvent to EG SDk (#28912)" (#29789
Browse files Browse the repository at this point in the history
)

This reverts commit 0117e47.
  • Loading branch information
JoshLove-msft authored Jul 10, 2024
1 parent 0117e47 commit a5a3106
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 253 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1160,25 +1160,6 @@ model AcsMessageReceivedEventData extends AcsMessageEventData {
interactive: AcsMessageInteractiveContent;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.AdvancedMessageAnalysisCompleted event. */
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "Maintain compatibility with existing models."
model AcsMessageAnalysisCompletedEventData extends AcsMessageEventData {
/** The original message received. */
originalMessage: string;

/** The analysed message channel kind. */
channelKind: AcsMessageChannelKind;

/** The intent of the analysed message. */
intentAnalysis: string;

/** List of key phrases extracted. */
extractedKeyPhrases: string[];

/** The analysed message language detection. */
languageDetection: AcsMessageLanguageDetection;
}

/** Message Media Content */
model AcsMessageMediaContent {
/** The MIME type of the file this media represents */
Expand Down Expand Up @@ -1269,18 +1250,6 @@ model AcsMessageChannelEventError {
channelMessage?: string;
}

/** Message Analysis Language Detection */
model AcsMessageLanguageDetection {
/** The language of the message. */
language: string;

/** The confidence score of the language detected. */
confidenceScore: float64;

/** The translation of the message. */
translation: string;
}

/** Interactive reply kind */
union AcsInteractiveReplyKind {
/** Messaged interactive reply type is ButtonReply */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,3 @@ using Azure.ClientGenerator.Core;
@@access(Microsoft.EventGrid.SystemEvents.CommunicationCloudEnvironmentModel,
Access.public
);
@@usage(Microsoft.EventGrid.SystemEvents.AcsMessageAnalysisCompletedEventData,
Usage.output
);
@@access(Microsoft.EventGrid.SystemEvents.AcsMessageAnalysisCompletedEventData,
Access.public
);
Original file line number Diff line number Diff line change
Expand Up @@ -1671,70 +1671,6 @@
}
}
},
"AcsMessageAnalysisCompletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.Communication.AdvancedMessageAnalysisCompleted event.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/AcsMessageEventData"
}
],
"properties": {
"originalMessage": {
"description": "The original message received",
"type": "string"
},
"channelType": {
"description": "The Analysed message channel Kind",
"type": "string",
"x-ms-client-name": "channelKind",
"enum": [
"whatsapp"
],
"x-ms-enum": {
"name": "AcsMessageChannelKind",
"modelAsString": true,
"values": [
{
"value": "whatsapp",
"description": "Updated message channel type is Whatsapp"
}
]
}
},
"intentAnalysis": {
"description": "The intent of the analysed message",
"type": "string"
},
"extractedKeyPhrases": {
"description": "List of key phrases extracted",
"type": "array",
"items": {
"type": "string"
}
},
"languageDetection": {
"description": "The analysed message language detection",
"$ref": "#/definitions/AcsMessageLanguageDetection",
"type": "object"
}
},
"required": [
"originalMessage",
"channelType",
"intentAnalysis",
"extractedKeyPhrases",
"languageDetection"
],
"x-ms-examples": {
"snapshotCreatedCloudEventsSchema": {
"$ref": "./examples/cloud-events-schema/advanced_message_analysis_completed.json"
},
"snapshotCreatedEventGridSchema": {
"$ref": "./examples/event-grid-schema/advanced_message_analysis_completed.json"
}
}
},
"AcsMessageEventData": {
"description": "Schema of common properties of all chat thread events",
"type": "object",
Expand Down Expand Up @@ -2402,30 +2338,6 @@
"type": "string"
}
}
},
"AcsMessageLanguageDetection": {
"description": "Message Analysis Language Detection",
"type": "object",
"properties": {
"language": {
"description": "The language of the message",
"type": "string"
},
"confidenceScore": {
"description": "The confidence score of the language detected",
"type": "number",
"format": "double"
},
"translation": {
"description": "The translation of the message",
"type": "string"
}
},
"required": [
"language",
"confidenceScore",
"translation"
]
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"messageId": "d59f9468-0a5c-4022-8200-d7bf6fb78bc5",
"status": "delivered",
"channelType": "whatsapp",
"from": "{recipient@id}",
"to": "{sender@id}",
"from": "12375679879",
"to": "1345679879",
"receivedTimestamp": "2024-03-22T17:06:11.1980225+00:00",
"error": {
"channelCode": "channelCode",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "4611364c-08fb-4a8a-a8b5-7e40203285d3",
"source": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
"subject": "advancedMessage/sender/{sender@id}/recipient/{recipient@id}",
"subject": "advancedMessage/sender/18334411877/recipient/be57b49d-5cd4-4f96-9a6b-4af41bc9fdfb",
"data": {
"content": "Come on guys, lets go for lunch together.",
"channelType": "whatsapp",
Expand All @@ -12,7 +12,7 @@
"caption": "caption"
},
"context": {
"from": "{recipient@id}",
"from": "1234578988",
"id": "messageId"
},
"button": {
Expand All @@ -26,8 +26,8 @@
"title": "button reply"
}
},
"from": "{recipient@id}",
"to": "{sender@id}",
"from": "12375679879",
"to": "1345679879",
"receivedTimestamp": "2024-03-22T17:06:11.2610383+00:00",
"error": {
"channelCode": "channelCode",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"messageId": "d59f9468-0a5c-4022-8200-d7bf6fb78bc5",
"status": "delivered",
"channelType": "whatsapp",
"from": "{sender@id}",
"to": "{recipient@id}",
"from": "12375679879",
"to": "1345679879",
"receivedTimestamp": "2024-03-22T17:06:11.1980225+00:00",
"error": {
"channelCode": "channelCode",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "4611364c-08fb-4a8a-a8b5-7e40203285d3",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
"subject": "advancedMessage/sender/{sender@id}/recipient/{recipient@id}",
"subject": "advancedMessage/sender/18334411877/recipient/be57b49d-5cd4-4f96-9a6b-4af41bc9fdfb",
"data": {
"content": "Come on guys, lets go for lunch together.",
"channelType": "whatsapp",
Expand All @@ -12,7 +12,7 @@
"caption": "caption"
},
"context": {
"from": "{sender@id}",
"from": "1234578988",
"id": "messageId"
},
"button": {
Expand All @@ -26,8 +26,8 @@
"title": "button reply"
}
},
"from": "{sender@id}",
"to": "{recipient@id}",
"from": "12375679879",
"to": "1345679879",
"receivedTimestamp": "2024-03-22T17:06:11.2610383+00:00",
"error": {
"channelCode": "channelCode",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -923,47 +923,6 @@
]
}
},
"AcsMessageAnalysisCompletedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.Communication.AdvancedMessageAnalysisCompleted event.",
"properties": {
"originalMessage": {
"type": "string",
"description": "The original message received."
},
"channelKind": {
"$ref": "#/definitions/AcsMessageChannelKind",
"description": "The analysed message channel kind."
},
"intentAnalysis": {
"type": "string",
"description": "The intent of the analysed message."
},
"extractedKeyPhrases": {
"type": "array",
"description": "List of key phrases extracted.",
"items": {
"type": "string"
}
},
"languageDetection": {
"$ref": "#/definitions/AcsMessageLanguageDetection",
"description": "The analysed message language detection."
}
},
"required": [
"originalMessage",
"channelKind",
"intentAnalysis",
"extractedKeyPhrases",
"languageDetection"
],
"allOf": [
{
"$ref": "#/definitions/AcsMessageEventData"
}
]
},
"AcsMessageButtonContent": {
"type": "object",
"description": "Message Button Content",
Expand Down Expand Up @@ -1186,30 +1145,6 @@
}
}
},
"AcsMessageLanguageDetection": {
"type": "object",
"description": "Message Analysis Language Detection",
"properties": {
"language": {
"type": "string",
"description": "The language of the message."
},
"confidenceScore": {
"type": "number",
"format": "double",
"description": "The confidence score of the language detected."
},
"translation": {
"type": "string",
"description": "The translation of the message."
}
},
"required": [
"language",
"confidenceScore",
"translation"
]
},
"AcsMessageMediaContent": {
"type": "object",
"description": "Message Media Content",
Expand Down

0 comments on commit a5a3106

Please sign in to comment.