Skip to content

Commit

Permalink
Communication Chat - Update WIP preview version (2020-11-01-preview3) (
Browse files Browse the repository at this point in the history
…Azure#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 <juramir@microsoft.com>
Co-authored-by: Amr Elroumy <amr.elroumy@microsoft.com>
  • Loading branch information
3 people authored and mkarmark committed Jul 20, 2021
1 parent 696b3ee commit 9fad538
Show file tree
Hide file tree
Showing 18 changed files with 548 additions and 363 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2020-11-01-preview3",
"chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2",
"$maxpagesize": 2
"maxPageSize": 2
},
"responses": {
"200": {
Expand All @@ -20,31 +20,39 @@
"readOn": "2020-06-06T05:55:41.6460000Z"
}
],
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/readReceipts?skip=2&$maxpagesize=2&api-version=2020-11-01-preview3"
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/readReceipts?skip=2&maxPageSize=2&api-version=2020-11-01-preview3"
}
},
"401": {
"body": {
"code": "Unauthorized",
"message": "Request is not authorized."
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
},
"403": {
"body": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
},
"429": {
"body": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
},
"503": {
"body": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,37 @@
}
},
"responses": {
"201": {},
"200": {},
"401": {
"body": {
"code": "Unauthorized",
"message": "Request is not authorized."
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
},
"403": {
"body": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
},
"429": {
"body": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
},
"503": {
"body": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,34 @@
"204": {},
"401": {
"body": {
"code": "Unauthorized",
"message": "Request is not authorized."
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
},
"403": {
"body": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
},
"429": {
"body": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
},
"503": {
"body": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,47 @@
"200": {
"body": {
"id": "1591768249318",
"type": "Text",
"sequenceId": "1",
"type": "text",
"version": "1599016601134",
"priority": "Normal",
"content": "Let's head out for lunch in 15 minutes.",
"content": {
"message": "Let's head out for lunch in 15 minutes."
},
"senderDisplayName": "Jane",
"createdOn": "2020-06-10T05:50:49.3180000Z",
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
}
},
"401": {
"body": {
"code": "Unauthorized",
"message": "Request is not authorized."
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
},
"403": {
"body": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
},
"429": {
"body": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
},
"503": {
"body": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,114 @@
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2020-11-01-preview3",
"chatThreadId": "19:453dafb77b26481ea2e73bcada0324af@thread.v2",
"$maxpagesize": 5
"maxPageSize": 5
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "1593107077690",
"type": "Text",
"priority": "Normal",
"type": "text",
"version": "1593107077683",
"content": "So where should we get lunch from today?",
"sequenceId": "5",
"content": {
"message": "So where should we get lunch from today?"
},
"senderDisplayName": "Jane",
"createdOn": "2020-06-25T17:44:37.6830000Z",
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
},
{
"id": "1593107077683",
"type": "Text",
"priority": "Normal",
"type": "text",
"sequenceId": "4",
"version": "1593107077683",
"content": "Let's use this chat to decide what to get for lunch today.",
"content": {
"message": "Let's use this chat to decide what to get for lunch today."
},
"senderDisplayName": "Jane",
"createdOn": "2020-06-25T17:44:37.6830000Z",
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
},
{
"id": "1593107046498",
"type": "Text",
"priority": "Normal",
"type": "text",
"sequenceId": "3",
"version": "1593107046498",
"content": "Good morning everyone!",
"content": {
"message": "Good morning everyone!"
},
"senderDisplayName": "Jane",
"createdOn": "2020-06-25T17:44:06.4980000Z",
"senderId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
},
{
"id": "1593106976785",
"type": "ThreadActivity/TopicUpdate",
"priority": "Normal",
"type": "topicUpdated",
"sequenceId": "2",
"version": "1593106976785",
"content": "<topicupdate><eventtime>1593106976785</eventtime><initiator>8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b</initiator><value>Lunch</value></topicupdate>",
"createdOn": "2020-06-25T17:42:56.7850000Z",
"senderId": "19:453dafb77b26481ea2e73bcada0324af@thread.v2"
"content": {
"initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
"topic": "Lunch"
},
"createdOn": "2020-06-25T17:42:56.7850000Z"
},
{
"id": "1593106976753",
"type": "ThreadActivity/AddMember",
"priority": "Normal",
"type": "participantAdded",
"version": "1593106976753",
"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>",
"createdOn": "2020-06-25T17:42:56.7530000Z",
"senderId": "19:453dafb77b26481ea2e73bcada0324af@thread.v2"
"sequenceId": "1",
"content": {
"initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10a",
"participants": [
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10c"
},
{
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10d"
}
]
},
"createdOn": "2020-06-25T17:42:56.7530000Z"
}
],
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/messages?syncState=3e4700000031393a756e6930315f7a626e68336e74326466756666657a6333736f7837646f67377766686b36793571653272776c6e66686c68647a69726968647071407468726561642e763201451fe6e77201000004357fea72010000&startTime=0&$maxpagesize=5&api-version=2020-11-01-preview3"
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/messages?syncState=3e4700000031393a756e6930315f7a626e68336e74326466756666657a6333736f7837646f67377766686b36793571653272776c6e66686c68647a69726968647071407468726561642e763201451fe6e77201000004357fea72010000&startTime=0&maxPageSize=5&api-version=2020-11-01-preview3"
}
},
"401": {
"body": {
"code": "Unauthorized",
"message": "Request is not authorized."
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
},
"403": {
"body": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
},
"429": {
"body": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
},
"503": {
"body": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
}
}
Expand Down
Loading

0 comments on commit 9fad538

Please sign in to comment.