From 66c27c456c65adceced39c53925e86cec90f5a13 Mon Sep 17 00:00:00 2001 From: Michael <68709574+mbutowicz@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:41:17 -0700 Subject: [PATCH] Added Metadata to chat thread and user level events (#26347) * Added Metadata to chat thread and user level events * Updated examples for each event which has new metadata fields * Apply suggestions for example user metadata * Update example metadata * Fix typo * Remove description from examples and add additional properties value for metadata dictionary to denote type string * Updated remaining examples in cloud-events-schema and event-grid-schema * Removed extra metadata properties --- .../AzureCommunicationServices.json | 28 +++++++++++++++++++ ...participant_added_to_thread_with_user.json | 3 ++ ...icipant_removed_from_thread_with_user.json | 3 ++ .../chat_thread_created.json | 16 +++++++++++ .../chat_thread_created_withUser.json | 9 ++++++ .../chat_thread_participant_added.json | 3 ++ .../chat_thread_participant_removed.json | 3 ++ ...at_thread_properties_updated_per_user.json | 3 ++ ...participant_added_to_thread_with_user.json | 3 ++ ...icipant_removed_from_thread_with_user.json | 3 ++ .../chat_thread_created.json | 15 ++++++++++ .../chat_thread_created_withUser.json | 9 ++++++ .../chat_thread_participant_added.json | 3 ++ .../chat_thread_participant_removed.json | 3 ++ .../chat_thread_properties_updated.json | 3 ++ ...at_thread_properties_updated_per_user.json | 3 ++ 16 files changed, 110 insertions(+) diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json index 88da331c7565..f9c27dc6c67b 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json @@ -964,6 +964,13 @@ "type": "object" } }, + "metadata": { + "description": "The thread metadata", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "participants": { "description": "The list of properties of participants who are part of the thread", "type": "array", @@ -1060,6 +1067,13 @@ "format": "date-time", "type": "string" }, + "metadata": { + "description": "The thread metadata", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "properties": { "description": "The updated thread properties", "type": "object", @@ -1093,6 +1107,13 @@ "additionalProperties": { "type": "object" } + }, + "metadata": { + "description": "The thread metadata", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, @@ -1655,6 +1676,13 @@ "participantCommunicationIdentifier": { "description": "The communication identifier of the user", "$ref": "../../../../../communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel" + }, + "metadata": { + "description": "The metadata of the user", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_added_to_thread_with_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_added_to_thread_with_user.json index 87bd21043d23..596595dc8e24 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_added_to_thread_with_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_added_to_thread_with_user.json @@ -19,6 +19,9 @@ "communicationUser": { "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_00000008-77c9-8785-1655-373a0d00885f" } + }, + "metadata": { + "key": "value" } }, "recipientCommunicationIdentifier": { diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_removed_from_thread_with_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_removed_from_thread_with_user.json index 84f6c7ab7de6..5e3f0c9610c5 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_removed_from_thread_with_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_participant_removed_from_thread_with_user.json @@ -19,6 +19,9 @@ "communicationUser": { "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_00000008-77c9-8785-1655-373a0d00885f" } + }, + "metadata": { + "key": "value" } }, "recipientCommunicationIdentifier": { diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created.json index a6c88fa80bf2..9d148e69059c 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created.json @@ -22,6 +22,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38a0-88f7-084822002453" } + }, + "metadata": { + "key": "value" } }, { @@ -31,6 +34,10 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e6-07fd-084822002467" } + }, + "metadata": { + "key": "value", + "description": "A map of data associated with the participant" } }, { @@ -40,6 +47,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38f6-83fe-084822002337" } + }, + "metadata": { + "key": "value" } }, { @@ -49,9 +59,15 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e3-e1fe-084822002c35" } + }, + "metadata": { + "key": "value" } } ], + "metadata": { + "key": "value" + }, "createTime": "2021-02-19T16:31:54.365-08:00", "version": 1613781114365, "threadId": "19:e07c8ddc5bab4c059ea9f11d29b544b6@thread.v2", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created_withUser.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created_withUser.json index c7f2175a8f1b..63313b8f8941 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created_withUser.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_created_withUser.json @@ -33,6 +33,9 @@ "communicationUser": { "id": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-286d-e1fe-0848220013b9" } + }, + "metadata": { + "key": "value" } }, { @@ -42,9 +45,15 @@ "communicationUser": { "id": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-289b-07fd-0848220015ea" } + }, + "metadata": { + "key": "value" } } ], + "metadata": { + "key": "value" + }, "createTime": "2021-02-18T23:47:26.91Z", "version": 1613692046910, "recipientId": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-286e-84f5-08482200181c", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_added.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_added.json index 2bdd3f896269..361cb9ccf156 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_added.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_added.json @@ -19,6 +19,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38f3-88f7-084822002454" } + }, + "metadata": { + "key": "value" } }, "createTime": "2021-02-19T16:31:54.365-08:00", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_removed.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_removed.json index 0b375f8ed7c1..ea3f3c2ce7af 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_removed.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_participant_removed.json @@ -19,6 +19,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e6-07fd-084822002467" } + }, + "metadata": { + "key": "value" } }, "createTime": "2021-02-19T16:31:54.365-08:00", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_properties_updated_per_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_properties_updated_per_user.json index ef1d1ef51232..57e93d74a8ab 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_properties_updated_per_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/chat_thread_properties_updated_per_user.json @@ -16,6 +16,9 @@ "properties": { "topic": "Communication in Azure" }, + "metadata": { + "key": "value" + }, "createTime": "2021-02-19T00:28:25.864Z", "version": 1613694508719, "recipientId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7caf-07fd-084822001724", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_added_to_thread_with_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_added_to_thread_with_user.json index 2392c8fda34d..ddbc3667a2c9 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_added_to_thread_with_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_added_to_thread_with_user.json @@ -17,6 +17,9 @@ "communicationUser": { "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_00000008-77c9-8785-1655-373a0d00885f" } + }, + "metadata": { + "key": "value" } }, "recipientCommunicationIdentifier": { diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_removed_from_thread_with_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_removed_from_thread_with_user.json index 8723bf9fd8d1..2094c12a48a9 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_removed_from_thread_with_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_participant_removed_from_thread_with_user.json @@ -17,6 +17,9 @@ "communicationUser": { "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_00000008-77c9-8785-1655-373a0d00885f" } + }, + "metadata": { + "key": "value" } }, "recipientCommunicationIdentifier": { diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created.json index 192e0635d6ef..7d5f5cce8b39 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created.json @@ -20,6 +20,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38a0-88f7-084822002453" } + }, + "metadata": { + "key": "value" } }, { @@ -29,6 +32,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e6-07fd-084822002467" } + }, + "metadata": { + "key": "value" } }, { @@ -38,6 +44,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38f6-83fe-084822002337" } + }, + "metadata": { + "key": "value" } }, { @@ -47,9 +56,15 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e3-e1fe-084822002c35" } + }, + "metadata": { + "key": "value" } } ], + "metadata": { + "key": "value" + }, "createTime": "2021-02-20T00:31:54.365+00:00", "version": 1613781114365, "threadId": "19:e07c8ddc5bab4c059ea9f11d29b544b6@thread.v2", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created_withUser.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created_withUser.json index 622ac3d5294f..df46f7f382ff 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created_withUser.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_created_withUser.json @@ -31,6 +31,9 @@ "communicationUser": { "id": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-286d-e1fe-0848220013b9" } + }, + "metadata": { + "key": "value" } }, { @@ -40,9 +43,15 @@ "communicationUser": { "id": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-289b-07fd-0848220015ea" } + }, + "metadata": { + "key": "value" } } ], + "metadata": { + "key": "value" + }, "createTime": "2021-02-18T23:47:26.91Z", "version": 1613692046910, "recipientId": "8:acs:3d703c91-9657-4b3f-b19c-ef9d53f99710_00000008-576c-286e-84f5-08482200181c", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_added.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_added.json index ff483cfb12ff..f7091c5ba96e 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_added.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_added.json @@ -17,6 +17,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38f3-88f7-084822002454" } + }, + "metadata": { + "key": "value" } }, "createTime": "2021-02-20T00:31:54.365+00:00", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_removed.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_removed.json index 09ead6b13a49..fdd171a3a271 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_removed.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_participant_removed.json @@ -17,6 +17,9 @@ "communicationUser": { "id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-5cbb-38e6-07fd-084822002467" } + }, + "metadata": { + "key": "value" } }, "createTime": "2021-02-20T00:31:54.365+00:00", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated.json index ecc9dde035e1..c2403ad7b702 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated.json @@ -13,6 +13,9 @@ "properties": { "topic": "Talk about new Thread Events in commuication services" }, + "metadata": { + "key": "value" + }, "createTime": "2021-02-20T00:00:40.126+00:00", "version": 1613779447695, "threadId": "19:9e8eefe67b3c470a8187b4c2b00240bc@thread.v2", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated_per_user.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated_per_user.json index 384209f7c521..00fa49531dee 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated_per_user.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/chat_thread_properties_updated_per_user.json @@ -14,6 +14,9 @@ "properties": { "topic": "Communication in Azure" }, + "metadata": { + "key": "value" + }, "createTime": "2021-02-19T00:28:25.864Z", "version": 1613694508719, "recipientId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7caf-07fd-084822001724",