Skip to content

Commit 8b1307d

Browse files
glorialimicrosoftscbeddJoshLove-msft
authored
Add Read Receipts and Typing Indicators for ACS Advanced Messaging (#36253)
* Add StatusNotificationContent for read receipt and typing indicator * update based on latest design doc * update dependency version * Add light weight read receipt endpoint * remove the alternative approach for now * make the description more clear * regenerate json * add examples for 2025-09-01-preview * uuid for channelRegistrationId, use readReceiptContent as body name * add suppression for non-204 response expected to have a body * Add StatusNotificationContent for read receipt and typing indicator * update based on latest design doc * update dependency version * Add light weight read receipt endpoint * remove the alternative approach for now * make the description more clear * regenerate json * add examples for 2025-09-01-preview * uuid for channelRegistrationId, use readReceiptContent as body name * add suppression for non-204 response expected to have a body * fix Swagger Avocado * fix Swagger ModelValidation * fix TypeSpec Validation * fix TypeSpec Validation * try again * run npm ci and npx tsv specification/communication/Communication.Messages * try latest tspconfig.yaml template * try removing src from emitter-output-dir * fix * update emitter-output-dir * try adding /src back * Update specification/communication/Communication.Messages/tspconfig.yaml Co-authored-by: JoshLove-msft <[email protected]> * Add @action("send") * Update tspconfig.yaml --------- Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: JoshLove-msft <[email protected]>
1 parent 8c87aeb commit 8b1307d

File tree

54 files changed

+5092
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+5092
-3
lines changed

specification/communication/Communication.Messages/client.tsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "./main.tsp";
77
using Azure.ClientGenerator.Core;
88
using TypeSpec.Versioning;
99

10-
@useDependency(Azure.Communication.MessagesService.Versions.c2025_04_01_Preview)
10+
@useDependency(Azure.Communication.MessagesService.Versions.c2025_09_01_Preview)
1111
namespace ClientForAcsMessages;
1212

1313
@client({
@@ -20,6 +20,7 @@ interface NotificationMessagesClient
2020
@access(Access.internal, "csharp")
2121
@clientName("downloadMediaInternal", "csharp")
2222
downloadMedia is Azure.Communication.MessagesService.StreamOperations.getMedia;
23+
sendReadReceipt is Azure.Communication.MessagesService.ReadReceiptsOperations.send;
2324
}
2425

2526
@client({
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"title": "Creates a new conversation",
3+
"operationId": "ConversationAdministrationOperations_CreateConversation",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"content-type": "application/json",
7+
"body": {
8+
"conversation": {
9+
"topic": "Test",
10+
"deliveryChannelIds": [
11+
"0f0eb78e-a576-1dfc-b414-0f0756de3338"
12+
],
13+
"outboundDeliveryStrategy": "allParticipants",
14+
"participants": [
15+
{
16+
"displayName": "Customer",
17+
"kind": "external",
18+
"contacts": [
19+
{
20+
"id": "12345678901",
21+
"kind": "whatsApp"
22+
}
23+
]
24+
},
25+
{
26+
"displayName": "Support",
27+
"kind": "internal",
28+
"contact": {
29+
"id": "8:acs:uuid1",
30+
"kind": "communication"
31+
}
32+
}
33+
]
34+
},
35+
"initialMessage": {
36+
"content": "I need help"
37+
}
38+
},
39+
"endpoint": "https://my-resource.communication.azure.com"
40+
},
41+
"responses": {
42+
"201": {
43+
"body": {
44+
"id": "19:[email protected]",
45+
"topic": "Test",
46+
"deliveryChannelIds": [
47+
"0f0eb78e-a576-1dfc-b414-0f0756de3338"
48+
],
49+
"outboundDeliveryStrategy": "allParticipants",
50+
"participants": [
51+
{
52+
"id": "8:acs:uuid2",
53+
"displayName": "Customer",
54+
"kind": "external",
55+
"contacts": [
56+
{
57+
"id": "12345678901",
58+
"kind": "whatsApp"
59+
},
60+
{
61+
"id": "8:acs:uuid2",
62+
"kind": "communication"
63+
}
64+
]
65+
},
66+
{
67+
"id": "8:acs:uuid1",
68+
"displayName": "Support",
69+
"kind": "internal",
70+
"contact": {
71+
"id": "8:acs:uuid1",
72+
"kind": "communication"
73+
}
74+
}
75+
]
76+
}
77+
}
78+
}
79+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Deletes a specific conversation",
3+
"operationId": "ConversationAdministrationOperations_DeleteConversation",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"conversationId": "19:[email protected]",
7+
"endpoint": "https://my-resource.communication.azure.com"
8+
},
9+
"responses": {
10+
"204": {}
11+
}
12+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"title": "Gets the details of a specific conversation",
3+
"operationId": "ConversationAdministrationOperations_GetConversation",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"conversationId": "19:[email protected]",
7+
"endpoint": "https://my-resource.communication.azure.com"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"id": "19:[email protected]",
13+
"topic": "Test",
14+
"deliveryChannelIds": [
15+
"0f0eb78e-a576-1dfc-b414-0f0756de3338"
16+
],
17+
"outboundDeliveryStrategy": "allParticipants",
18+
"participants": [
19+
{
20+
"id": "8:acs:uuid2",
21+
"displayName": "Customer",
22+
"kind": "external",
23+
"contacts": [
24+
{
25+
"id": "12345678901",
26+
"kind": "whatsApp"
27+
},
28+
{
29+
"id": "8:acs:uuid2",
30+
"kind": "communication"
31+
}
32+
]
33+
},
34+
{
35+
"id": "8:acs:uuid1",
36+
"displayName": "Support",
37+
"kind": "internal",
38+
"contact": {
39+
"id": "8:acs:uuid1",
40+
"kind": "communication"
41+
}
42+
}
43+
]
44+
}
45+
}
46+
}
47+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Terminates a specific conversation",
3+
"operationId": "ConversationAdministrationOperations_TerminateConversation",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"conversationId": "19:[email protected]",
7+
"endpoint": "https://my-resource.communication.azure.com"
8+
},
9+
"responses": {
10+
"200": {}
11+
}
12+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"title": "Adds participants to a specific conversation",
3+
"operationId": "ConversationThreadOperations_AddParticipants",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"content-type": "application/json",
7+
"conversationId": "19:[email protected]",
8+
"options": {
9+
"participants": [
10+
{
11+
"displayName": "Customer",
12+
"kind": "external",
13+
"contacts": [
14+
{
15+
"id": "12345678901",
16+
"kind": "whatsApp"
17+
}
18+
]
19+
},
20+
{
21+
"displayName": "Support",
22+
"kind": "internal",
23+
"contact": {
24+
"id": "8:acs:uuid1",
25+
"kind": "communication"
26+
}
27+
}
28+
]
29+
},
30+
"endpoint": "https://my-resource.communication.azure.com"
31+
},
32+
"responses": {
33+
"207": {
34+
"body": {
35+
"invalidParticipants": []
36+
}
37+
}
38+
}
39+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"title": "Get AI Analysis of a conversation",
3+
"operationId": "ConversationThreadOperations_AnalyzeConversation",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"conversationId": "19:[email protected]",
7+
"endpoint": "https://my-resource.communication.azure.com"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"summary": "The customer needs help."
13+
}
14+
}
15+
}
16+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"title": "Retrieves list of conversations",
3+
"operationId": "ConversationThreadOperations_ListConversations",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"maxPageSize": 25,
7+
"channelId": "0f0eb78e-a576-1dfc-b414-0f0756de3338",
8+
"endpoint": "https://my-resource.communication.azure.com"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"value": [
14+
{
15+
"id": "19:[email protected]",
16+
"topic": "Test",
17+
"deliveryChannelIds": [
18+
"0f0eb78e-a576-1dfc-b414-0f0756de3338"
19+
],
20+
"outboundDeliveryStrategy": "allParticipants",
21+
"participants": [
22+
{
23+
"id": "8:acs:uuid2",
24+
"displayName": "Customer",
25+
"kind": "external",
26+
"contacts": [
27+
{
28+
"id": "12345678901",
29+
"kind": "whatsApp"
30+
},
31+
{
32+
"id": "8:acs:uuid2",
33+
"kind": "communication"
34+
}
35+
]
36+
},
37+
{
38+
"id": "8:acs:uuid1",
39+
"displayName": "Support",
40+
"kind": "internal",
41+
"contact": {
42+
"id": "8:acs:uuid1",
43+
"kind": "communication"
44+
}
45+
}
46+
]
47+
},
48+
{
49+
"id": "19:[email protected]",
50+
"topic": "Test",
51+
"deliveryChannelIds": [
52+
"0f0eb78e-a576-1dfc-b414-0f0756de3338"
53+
],
54+
"outboundDeliveryStrategy": "allParticipants",
55+
"participants": [
56+
{
57+
"id": "8:acs:uuid3",
58+
"displayName": "Customer",
59+
"kind": "external",
60+
"contacts": [
61+
{
62+
"id": "12331112222",
63+
"kind": "whatsApp"
64+
},
65+
{
66+
"id": "8:acs:uuid3",
67+
"kind": "communication"
68+
}
69+
]
70+
},
71+
{
72+
"id": "8:acs:uuid3",
73+
"displayName": "Support",
74+
"kind": "internal",
75+
"contact": {
76+
"id": "8:acs:uuid3",
77+
"kind": "communication"
78+
}
79+
}
80+
]
81+
}
82+
]
83+
}
84+
}
85+
}
86+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"title": "Retrieves list of conversation messages",
3+
"operationId": "ConversationThreadOperations_ListMessages",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"conversationId": "19:[email protected]",
7+
"endpoint": "https://my-resource.communication.azure.com"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"id": "1593108077690",
15+
"sequenceId": 6,
16+
"message": {
17+
"kind": "text",
18+
"content": "My order did not arrive"
19+
},
20+
"senderDisplayName": "Jane",
21+
"createdOn": "2020-06-25T18:01:17.6900000Z",
22+
"senderCommunicationIdentifier": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
23+
},
24+
{
25+
"id": "1593107077690",
26+
"sequenceId": 5,
27+
"message": {
28+
"kind": "text",
29+
"content": "Hi I need help"
30+
},
31+
"senderDisplayName": "Jane",
32+
"createdOn": "2020-06-25T17:44:37.6830000Z",
33+
"senderCommunicationIdentifier": "8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
34+
}
35+
]
36+
}
37+
}
38+
}
39+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"title": "remove a participant from a conversation",
3+
"operationId": "ConversationThreadOperations_RemoveParticipants",
4+
"parameters": {
5+
"api-version": "2025-09-01-preview",
6+
"content-type": "application/json",
7+
"conversationId": "19:[email protected]",
8+
"options": {
9+
"participantIds": [
10+
"8:acs:uuid2"
11+
]
12+
},
13+
"endpoint": "https://my-resource.communication.azure.com"
14+
},
15+
"responses": {
16+
"207": {
17+
"body": {
18+
"invalidParticipants": []
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)