Skip to content

Commit b9fb929

Browse files
amrElroumyCamilo RamirezAmr Elroumy
authored
Communication Chat - Update WIP preview version (2020-11-01-preview3) (#12403)
* Added new specification for chat - release 2020-11-01-preview3 * Addressing feedback * Updating max page size parameter name * update `maxpagesize` parameter name in example file. * Runn prettier on examples * Removing obsolete example files, and adding missing description properties. * Update `maxpagesize` query parameter name for `ListChatThreads` * rename $maxpagesize to `maxPageSize` * - Adding SequenceId - Renaming $maxPageSize to maxPageSize - Referenceing common Error Schema - Add ChatMessageType property and allow sending RichText Html - Mark required properties to indicate they are not nullable. - Expose Message' `sequenceId` to allow clients to sort message withing the same conversation. * Fix swagger example model validation * run prettier * Return error response instead of error object * Fix example files * Remove `ChatMessage` Priority from Preview3 API Co-authored-by: Camilo Ramirez <[email protected]> Co-authored-by: Amr Elroumy <[email protected]>
1 parent a35bdde commit b9fb929

18 files changed

+548
-363
lines changed

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/communicationserviceschat.json

Lines changed: 223 additions & 195 deletions
Large diffs are not rendered by default.

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/examples/Conversations_ListChatReadReceiptsWithPageSize.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"endpoint": "https://contoso.westus.communications.azure.com",
44
"api-version": "2020-11-01-preview3",
55
"chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2",
6-
"$maxpagesize": 2
6+
"maxPageSize": 2
77
},
88
"responses": {
99
"200": {
@@ -20,31 +20,39 @@
2020
"readOn": "2020-06-06T05:55:41.6460000Z"
2121
}
2222
],
23-
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:[email protected]/readReceipts?skip=2&$maxpagesize=2&api-version=2020-11-01-preview3"
23+
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:[email protected]/readReceipts?skip=2&maxPageSize=2&api-version=2020-11-01-preview3"
2424
}
2525
},
2626
"401": {
2727
"body": {
28-
"code": "Unauthorized",
29-
"message": "Request is not authorized."
28+
"error": {
29+
"code": "Unauthorized",
30+
"message": "Request is not authorized."
31+
}
3032
}
3133
},
3234
"403": {
3335
"body": {
34-
"code": "Forbidden",
35-
"message": "User is not allowed to perform specified action."
36+
"error": {
37+
"code": "Forbidden",
38+
"message": "User is not allowed to perform specified action."
39+
}
3640
}
3741
},
3842
"429": {
3943
"body": {
40-
"code": "TooManyRequests",
41-
"message": "Rate limit exceeded."
44+
"error": {
45+
"code": "TooManyRequests",
46+
"message": "Rate limit exceeded."
47+
}
4248
}
4349
},
4450
"503": {
4551
"body": {
46-
"code": "ServiceUnavailable",
47-
"message": "The server is currently unable to handle the request."
52+
"error": {
53+
"code": "ServiceUnavailable",
54+
"message": "The server is currently unable to handle the request."
55+
}
4856
}
4957
}
5058
}

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/examples/Conversations_SendChatReadReceipt.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,37 @@
88
}
99
},
1010
"responses": {
11-
"201": {},
11+
"200": {},
1212
"401": {
1313
"body": {
14-
"code": "Unauthorized",
15-
"message": "Request is not authorized."
14+
"error": {
15+
"code": "Unauthorized",
16+
"message": "Request is not authorized."
17+
}
1618
}
1719
},
1820
"403": {
1921
"body": {
20-
"code": "Forbidden",
21-
"message": "User is not allowed to perform specified action."
22+
"error": {
23+
"code": "Forbidden",
24+
"message": "User is not allowed to perform specified action."
25+
}
2226
}
2327
},
2428
"429": {
2529
"body": {
26-
"code": "TooManyRequests",
27-
"message": "Rate limit exceeded."
30+
"error": {
31+
"code": "TooManyRequests",
32+
"message": "Rate limit exceeded."
33+
}
2834
}
2935
},
3036
"503": {
3137
"body": {
32-
"code": "ServiceUnavailable",
33-
"message": "The server is currently unable to handle the request."
38+
"error": {
39+
"code": "ServiceUnavailable",
40+
"message": "The server is currently unable to handle the request."
41+
}
3442
}
3543
}
3644
}

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/examples/Messages_DeleteChatMessage.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,34 @@
99
"204": {},
1010
"401": {
1111
"body": {
12-
"code": "Unauthorized",
13-
"message": "Request is not authorized."
12+
"error": {
13+
"code": "Unauthorized",
14+
"message": "Request is not authorized."
15+
}
1416
}
1517
},
1618
"403": {
1719
"body": {
18-
"code": "Forbidden",
19-
"message": "User is not allowed to perform specified action."
20+
"error": {
21+
"code": "Forbidden",
22+
"message": "User is not allowed to perform specified action."
23+
}
2024
}
2125
},
2226
"429": {
2327
"body": {
24-
"code": "TooManyRequests",
25-
"message": "Rate limit exceeded."
28+
"error": {
29+
"code": "TooManyRequests",
30+
"message": "Rate limit exceeded."
31+
}
2632
}
2733
},
2834
"503": {
2935
"body": {
30-
"code": "ServiceUnavailable",
31-
"message": "The server is currently unable to handle the request."
36+
"error": {
37+
"code": "ServiceUnavailable",
38+
"message": "The server is currently unable to handle the request."
39+
}
3240
}
3341
}
3442
}

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/examples/Messages_GetChatMessage.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,47 @@
99
"200": {
1010
"body": {
1111
"id": "1591768249318",
12-
"type": "Text",
12+
"sequenceId": "1",
13+
"type": "text",
1314
"version": "1599016601134",
14-
"priority": "Normal",
15-
"content": "Let's head out for lunch in 15 minutes.",
15+
"content": {
16+
"message": "Let's head out for lunch in 15 minutes."
17+
},
1618
"senderDisplayName": "Jane",
1719
"createdOn": "2020-06-10T05:50:49.3180000Z",
1820
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
1921
}
2022
},
2123
"401": {
2224
"body": {
23-
"code": "Unauthorized",
24-
"message": "Request is not authorized."
25+
"error": {
26+
"code": "Unauthorized",
27+
"message": "Request is not authorized."
28+
}
2529
}
2630
},
2731
"403": {
2832
"body": {
29-
"code": "Forbidden",
30-
"message": "User is not allowed to perform specified action."
33+
"error": {
34+
"code": "Forbidden",
35+
"message": "User is not allowed to perform specified action."
36+
}
3137
}
3238
},
3339
"429": {
3440
"body": {
35-
"code": "TooManyRequests",
36-
"message": "Rate limit exceeded."
41+
"error": {
42+
"code": "TooManyRequests",
43+
"message": "Rate limit exceeded."
44+
}
3745
}
3846
},
3947
"503": {
4048
"body": {
41-
"code": "ServiceUnavailable",
42-
"message": "The server is currently unable to handle the request."
49+
"error": {
50+
"code": "ServiceUnavailable",
51+
"message": "The server is currently unable to handle the request."
52+
}
4353
}
4454
}
4555
}

specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/examples/Messages_ListChatMessagesWithPageSize.json

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,114 @@
33
"endpoint": "https://contoso.westus.communications.azure.com",
44
"api-version": "2020-11-01-preview3",
55
"chatThreadId": "19:[email protected]",
6-
"$maxpagesize": 5
6+
"maxPageSize": 5
77
},
88
"responses": {
99
"200": {
1010
"body": {
1111
"value": [
1212
{
1313
"id": "1593107077690",
14-
"type": "Text",
15-
"priority": "Normal",
14+
"type": "text",
1615
"version": "1593107077683",
17-
"content": "So where should we get lunch from today?",
16+
"sequenceId": "5",
17+
"content": {
18+
"message": "So where should we get lunch from today?"
19+
},
1820
"senderDisplayName": "Jane",
1921
"createdOn": "2020-06-25T17:44:37.6830000Z",
2022
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
2123
},
2224
{
2325
"id": "1593107077683",
24-
"type": "Text",
25-
"priority": "Normal",
26+
"type": "text",
27+
"sequenceId": "4",
2628
"version": "1593107077683",
27-
"content": "Let's use this chat to decide what to get for lunch today.",
29+
"content": {
30+
"message": "Let's use this chat to decide what to get for lunch today."
31+
},
2832
"senderDisplayName": "Jane",
2933
"createdOn": "2020-06-25T17:44:37.6830000Z",
3034
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
3135
},
3236
{
3337
"id": "1593107046498",
34-
"type": "Text",
35-
"priority": "Normal",
38+
"type": "text",
39+
"sequenceId": "3",
3640
"version": "1593107046498",
37-
"content": "Good morning everyone!",
41+
"content": {
42+
"message": "Good morning everyone!"
43+
},
3844
"senderDisplayName": "Jane",
3945
"createdOn": "2020-06-25T17:44:06.4980000Z",
4046
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
4147
},
4248
{
4349
"id": "1593106976785",
44-
"type": "ThreadActivity/TopicUpdate",
45-
"priority": "Normal",
50+
"type": "topicUpdated",
51+
"sequenceId": "2",
4652
"version": "1593106976785",
47-
"content": "<topicupdate><eventtime>1593106976785</eventtime><initiator>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b</initiator><value>Lunch</value></topicupdate>",
48-
"createdOn": "2020-06-25T17:42:56.7850000Z",
49-
"senderId": "19:[email protected]"
53+
"content": {
54+
"initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
55+
"topic": "Lunch"
56+
},
57+
"createdOn": "2020-06-25T17:42:56.7850000Z"
5058
},
5159
{
5260
"id": "1593106976753",
53-
"type": "ThreadActivity/AddMember",
54-
"priority": "Normal",
61+
"type": "participantAdded",
5562
"version": "1593106976753",
56-
"content": "<addmember><eventtime>1593106976753</eventtime><initiator>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b</initiator><rosterVersion>1593106976566</rosterVersion><target>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a</target><detailedtargetinfo><id>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a</id></detailedtargetinfo><target>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b</target><detailedtargetinfo><id>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b</id></detailedtargetinfo><target>8:acs:29d8ac59-6011-44dc-87c0-1f9f93dbc713_2a711a-6c8ffcdc41</target><detailedtargetinfo><id>8:acs:29d8ac59-6011-44dc-87c0-1f9f93dbc713_2a711a-6c8ffcdc41</id></detailedtargetinfo><target>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c</target><detailedtargetinfo><id>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c</id></detailedtargetinfo></addmember>",
57-
"createdOn": "2020-06-25T17:42:56.7530000Z",
58-
"senderId": "19:[email protected]"
63+
"sequenceId": "1",
64+
"content": {
65+
"initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
66+
"participants": [
67+
{
68+
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
69+
},
70+
{
71+
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c"
72+
},
73+
{
74+
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10d"
75+
}
76+
]
77+
},
78+
"createdOn": "2020-06-25T17:42:56.7530000Z"
5979
}
6080
],
61-
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:[email protected]/messages?syncState=3e4700000031393a756e6930315f7a626e68336e74326466756666657a6333736f7837646f67377766686b36793571653272776c6e66686c68647a69726968647071407468726561642e763201451fe6e77201000004357fea72010000&startTime=0&$maxpagesize=5&api-version=2020-11-01-preview3"
81+
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:[email protected]/messages?syncState=3e4700000031393a756e6930315f7a626e68336e74326466756666657a6333736f7837646f67377766686b36793571653272776c6e66686c68647a69726968647071407468726561642e763201451fe6e77201000004357fea72010000&startTime=0&maxPageSize=5&api-version=2020-11-01-preview3"
6282
}
6383
},
6484
"401": {
6585
"body": {
66-
"code": "Unauthorized",
67-
"message": "Request is not authorized."
86+
"error": {
87+
"code": "Unauthorized",
88+
"message": "Request is not authorized."
89+
}
6890
}
6991
},
7092
"403": {
7193
"body": {
72-
"code": "Forbidden",
73-
"message": "User is not allowed to perform specified action."
94+
"error": {
95+
"code": "Forbidden",
96+
"message": "User is not allowed to perform specified action."
97+
}
7498
}
7599
},
76100
"429": {
77101
"body": {
78-
"code": "TooManyRequests",
79-
"message": "Rate limit exceeded."
102+
"error": {
103+
"code": "TooManyRequests",
104+
"message": "Rate limit exceeded."
105+
}
80106
}
81107
},
82108
"503": {
83109
"body": {
84-
"code": "ServiceUnavailable",
85-
"message": "The server is currently unable to handle the request."
110+
"error": {
111+
"code": "ServiceUnavailable",
112+
"message": "The server is currently unable to handle the request."
113+
}
86114
}
87115
}
88116
}

0 commit comments

Comments
 (0)