From a70d267b35f48220774e4ef2435c586d7dc62f78 Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 10:42:57 -0800 Subject: [PATCH 1/6] Baseline using previous API version --- .../communicationserviceschat.json | 1734 +++++++++++++++++ ...ions_ListChatReadReceiptsWithPageSize.json | 69 + .../Conversations_SendChatReadReceipt.json | 45 + .../examples/Messages_DeleteChatMessage.json | 43 + .../examples/Messages_GetChatMessage.json | 65 + ...Messages_ListChatMessagesWithPageSize.json | 157 ++ .../examples/Messages_SendChatMessage.json | 57 + .../Messages_SendTypingNotification.json | 45 + .../examples/Messages_UpdateChatMessage.json | 51 + .../Participants_AddChatParticipants.json | 91 + ...ants_ListChatParticipantsWithPageSize.json | 69 + .../Participants_RemoveChatParticipant.json | 48 + .../examples/Threads_CreateChatThread.json | 111 ++ ..._CreateChatThreadWithIdempotencyToken.json | 112 ++ .../examples/Threads_DeleteChatThread.json | 42 + .../examples/Threads_GetChatThread.json | 54 + .../Threads_ListChatThreadsWithPageSize.json | 74 + .../Threads_UpdateChatThreadTopic.json | 46 + 18 files changed, 2913 insertions(+) create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json new file mode 100644 index 000000000000..2b2fa8731a14 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json @@ -0,0 +1,1734 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Chat Service", + "description": "Azure Communication Chat Service", + "version": "2021-09-07" + }, + "paths": { + "/chat/threads/{chatThreadId}/readReceipts": { + "get": { + "tags": [ + "Threads" + ], + "summary": "Gets chat message read receipts for a thread.", + "operationId": "ChatThread_ListChatReadReceipts", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Thread id to get the chat message read receipts for.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "maxPageSize", + "description": "The maximum number of chat message read receipts to be returned per page.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "description": "Skips chat message read receipts up to a specified position in response.", + "type": "integer", + "format": "int32" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns the requested `ChatMessageReadReceipt` resources.", + "schema": { + "$ref": "#/definitions/ChatMessageReadReceiptsCollection" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get thread read receipts with pagination (max page size)": { + "$ref": "./examples/Conversations_ListChatReadReceiptsWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + }, + "post": { + "tags": [ + "Threads" + ], + "summary": "Sends a read receipt event to a thread, on behalf of a user.", + "operationId": "ChatThread_SendChatReadReceipt", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Thread id to send the read receipt event to.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "sendReadReceiptRequest", + "description": "Read receipt details.", + "required": true, + "schema": { + "$ref": "#/definitions/SendReadReceiptRequest" + } + } + ], + "responses": { + "200": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Send read receipt": { + "$ref": "./examples/Conversations_SendChatReadReceipt.json" + } + } + } + }, + "/chat/threads/{chatThreadId}/messages": { + "post": { + "tags": [ + "Messages" + ], + "summary": "Sends a message to a thread.", + "operationId": "ChatThread_SendChatMessage", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The thread id to send the message to.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "sendChatMessageRequest", + "description": "Details of the message to send.", + "required": true, + "schema": { + "$ref": "#/definitions/SendChatMessageRequest" + } + } + ], + "responses": { + "201": { + "description": "Message sent, the `Location` header contains the URL for the newly sent message.", + "schema": { + "$ref": "#/definitions/SendChatMessageResult" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Send Message": { + "$ref": "./examples/Messages_SendChatMessage.json" + } + } + }, + "get": { + "tags": [ + "Messages" + ], + "summary": "Gets a list of messages from a thread.", + "operationId": "ChatThread_ListChatMessages", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The thread id of the message.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "maxPageSize", + "description": "The maximum number of messages to be returned per page.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "startTime", + "description": "The earliest point in time to get messages up to. The timestamp should be in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ChatMessagesCollection" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get messages with pagination (max page size)": { + "$ref": "./examples/Messages_ListChatMessagesWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/chat/threads/{chatThreadId}/messages/{chatMessageId}": { + "get": { + "tags": [ + "Messages" + ], + "summary": "Gets a message by id.", + "operationId": "ChatThread_GetChatMessage", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The thread id to which the message was sent.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "chatMessageId", + "description": "The message id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns a `Message` resource.", + "schema": { + "$ref": "#/definitions/ChatMessage" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get Message": { + "$ref": "./examples/Messages_GetChatMessage.json" + } + } + }, + "patch": { + "tags": [ + "Messages" + ], + "summary": "Updates a message.", + "operationId": "ChatThread_UpdateChatMessage", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The thread id to which the message was sent.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "chatMessageId", + "description": "The message id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "updateChatMessageRequest", + "description": "Details of the request to update the message.", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateChatMessageRequest" + } + } + ], + "responses": { + "204": { + "description": "Message is successfully updated." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Update message content": { + "$ref": "./examples/Messages_UpdateChatMessage.json" + } + } + }, + "delete": { + "tags": [ + "Messages" + ], + "summary": "Deletes a message.", + "operationId": "ChatThread_DeleteChatMessage", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The thread id to which the message was sent.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "chatMessageId", + "description": "The message id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Delete message": { + "$ref": "./examples/Messages_DeleteChatMessage.json" + } + } + } + }, + "/chat/threads/{chatThreadId}/participants": { + "get": { + "tags": [ + "Participants" + ], + "summary": "Gets the participants of a thread.", + "operationId": "ChatThread_ListChatParticipants", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Thread id to get participants for.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "maxPageSize", + "description": "The maximum number of participants to be returned per page.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "description": "Skips participants up to a specified position in response.", + "type": "integer", + "format": "int32" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns the participants of a thread.", + "schema": { + "$ref": "#/definitions/ChatParticipantsCollection" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get participants with pagination (max page size)": { + "$ref": "./examples/Participants_ListChatParticipantsWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/chat/threads/{chatThreadId}/participants/:remove": { + "post": { + "tags": [ + "Participants" + ], + "summary": "Remove a participant from a thread.", + "operationId": "ChatThread_RemoveChatParticipant", + "consumes": [ + "application/json", + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Thread id to remove the participant from.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "participantCommunicationIdentifier", + "description": "Id of the thread participant to remove from the thread.", + "required": true, + "schema": { + "$ref": "#/definitions/CommunicationIdentifierModel" + } + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Remove participant": { + "$ref": "./examples/Participants_RemoveChatParticipant.json" + } + } + } + }, + "/chat/threads/{chatThreadId}/participants/:add": { + "post": { + "tags": [ + "Participants" + ], + "summary": "Adds thread participants to a thread. If participants already exist, no change occurs.", + "operationId": "ChatThread_AddChatParticipants", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Id of the thread to add participants to.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "addChatParticipantsRequest", + "description": "Thread participants to be added to the thread.", + "required": true, + "schema": { + "$ref": "#/definitions/AddChatParticipantsRequest" + } + } + ], + "responses": { + "201": { + "description": "The participants were successfully added.", + "schema": { + "$ref": "#/definitions/AddChatParticipantsResult" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Add participants": { + "$ref": "./examples/Participants_AddChatParticipants.json" + } + } + } + }, + "/chat/threads": { + "post": { + "tags": [ + "Threads" + ], + "summary": "Creates a chat thread.", + "operationId": "Chat_CreateChatThread", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "repeatability-request-id", + "description": "If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs.", + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "createChatThreadRequest", + "description": "Request payload for creating a chat thread.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateChatThreadRequest" + } + } + ], + "responses": { + "201": { + "description": "Thread created, the `Location` header would contain the URL for the newly created thread.", + "schema": { + "$ref": "#/definitions/CreateChatThreadResult" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Create chat thread": { + "$ref": "./examples/Threads_CreateChatThread.json" + }, + "Create chat thread with repeatability request id header": { + "$ref": "./examples/Threads_CreateChatThreadWithIdempotencyToken.json" + } + } + }, + "get": { + "tags": [ + "Threads" + ], + "summary": "Gets the list of chat threads of a user.", + "operationId": "Chat_ListChatThreads", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "maxPageSize", + "description": "The maximum number of chat threads returned per page.", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "startTime", + "description": "The earliest point in time to get chat threads up to. The timestamp should be in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns a `GetThreadsResponse` resource.", + "schema": { + "$ref": "#/definitions/ChatThreadsItemCollection" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get threads with pagination (Max Page Size)": { + "$ref": "./examples/Threads_ListChatThreadsWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/chat/threads/{chatThreadId}": { + "patch": { + "tags": [ + "Threads" + ], + "summary": "Updates a thread's properties.", + "operationId": "ChatThread_UpdateChatThreadProperties", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "The id of the thread to update.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "updateChatThreadRequest", + "description": "Request payload for updating a chat thread.", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateChatThreadRequest" + } + } + ], + "responses": { + "204": { + "description": "Thread was successfully updated." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Update chat thread topic": { + "$ref": "./examples/Threads_UpdateChatThreadTopic.json" + } + } + }, + "get": { + "tags": [ + "Threads" + ], + "summary": "Gets a chat thread's properties.", + "operationId": "ChatThread_GetChatThreadProperties", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Id of the thread.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The action returns a chat thread.", + "schema": { + "$ref": "#/definitions/ChatThreadProperties" + } + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get chat thread": { + "$ref": "./examples/Threads_GetChatThread.json" + } + } + }, + "delete": { + "tags": [ + "Threads" + ], + "summary": "Deletes a thread.", + "operationId": "Chat_DeleteChatThread", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Id of the thread to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Delete chat thread": { + "$ref": "./examples/Threads_DeleteChatThread.json" + } + } + } + }, + "/chat/threads/{chatThreadId}/typing": { + "post": { + "tags": [ + "TypingNotifications" + ], + "summary": "Posts a typing event to a thread, on behalf of a user.", + "operationId": "ChatThread_SendTypingNotification", + "consumes": [ + "application/json", + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Id of the thread.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "sendTypingNotificationRequest", + "description": "Details of the typing notification request.", + "schema": { + "$ref": "#/definitions/SendTypingNotificationRequest" + } + } + ], + "responses": { + "200": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Post typing event to a thread": { + "$ref": "./examples/Messages_SendTypingNotification.json" + } + } + } + } + }, + "definitions": { + "CommunicationUserIdentifierModel": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationUserIdentifierModel" + }, + "CommunicationCloudEnvironment": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationCloudEnvironmentModel" + }, + "MicrosoftTeamsUserIdentifierModel": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/MicrosoftTeamsUserIdentifierModel" + }, + "CommunicationIdentifierModel": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel" + }, + "ChatMessageReadReceipt": { + "description": "A chat message read receipt indicates the time a chat message was read by a recipient.", + "required": [ + "chatMessageId", + "readOn", + "senderCommunicationIdentifier" + ], + "type": "object", + "properties": { + "senderCommunicationIdentifier": { + "$ref": "#/definitions/CommunicationIdentifierModel" + }, + "chatMessageId": { + "description": "Id of the chat message that has been read. This id is generated by the server.", + "type": "string", + "example": "1591137790240" + }, + "readOn": { + "format": "date-time", + "description": "The time at which the message was read. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + } + } + }, + "ChatMessageReadReceiptsCollection": { + "description": "A paged collection of chat message read receipts.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of chat message read receipts.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatMessageReadReceipt" + } + }, + "nextLink": { + "description": "If there are more chat message read receipts that can be retrieved, the next link will be populated.", + "type": "string", + "readOnly": true + } + } + }, + "CommunicationError": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" + }, + "CommunicationErrorResponse": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, + "SendReadReceiptRequest": { + "description": "Request payload for sending a read receipt.", + "required": [ + "chatMessageId" + ], + "type": "object", + "properties": { + "chatMessageId": { + "description": "Id of the latest chat message read by the user.", + "type": "string", + "example": "1592435762364" + } + } + }, + "ChatMessageType": { + "description": "The chat message type.", + "enum": [ + "text", + "html", + "topicUpdated", + "participantAdded", + "participantRemoved" + ], + "type": "string", + "x-ms-enum": { + "name": "ChatMessageType", + "modelAsString": true + } + }, + "SendChatMessageRequest": { + "description": "Details of the message to send.", + "required": [ + "content" + ], + "type": "object", + "properties": { + "content": { + "description": "Chat message content.", + "type": "string", + "example": "Come one guys, lets go for lunch together." + }, + "senderDisplayName": { + "description": "The display name of the chat message sender. This property is used to populate sender name for push notifications.", + "type": "string", + "example": "Bob Admin" + }, + "type": { + "$ref": "#/definitions/ChatMessageType" + }, + "metadata": { + "description": "Message metadata.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SendChatMessageResult": { + "description": "Result of the send message operation.", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "A server-generated message id.", + "type": "string", + "example": "123456789" + } + } + }, + "ChatParticipant": { + "description": "A participant of the chat thread.", + "required": [ + "communicationIdentifier" + ], + "type": "object", + "properties": { + "communicationIdentifier": { + "$ref": "#/definitions/CommunicationIdentifierModel" + }, + "displayName": { + "description": "Display name for the chat participant.", + "type": "string", + "example": "Bob" + }, + "shareHistoryTime": { + "format": "date-time", + "description": "Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + } + } + }, + "ChatMessageContent": { + "description": "Content of a chat message.", + "type": "object", + "properties": { + "message": { + "description": "Chat message content for messages of types text or html.", + "type": "string", + "example": "Come one guys, lets go for lunch together." + }, + "topic": { + "description": "Chat message content for messages of type topicUpdated.", + "type": "string", + "example": "Lunch Chat thread" + }, + "participants": { + "description": "Chat message content for messages of types participantAdded or participantRemoved.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatParticipant" + } + }, + "initiatorCommunicationIdentifier": { + "$ref": "#/definitions/CommunicationIdentifierModel" + } + } + }, + "ChatMessage": { + "description": "Chat message.", + "required": [ + "createdOn", + "id", + "sequenceId", + "type", + "version" + ], + "type": "object", + "properties": { + "id": { + "description": "The id of the chat message. This id is server generated.", + "type": "string", + "example": "123456789" + }, + "type": { + "$ref": "#/definitions/ChatMessageType" + }, + "sequenceId": { + "description": "Sequence of the chat message in the conversation.", + "type": "string" + }, + "version": { + "description": "Version of the chat message.", + "type": "string" + }, + "content": { + "$ref": "#/definitions/ChatMessageContent" + }, + "senderDisplayName": { + "description": "The display name of the chat message sender. This property is used to populate sender name for push notifications.", + "type": "string", + "example": "Jane" + }, + "createdOn": { + "format": "date-time", + "description": "The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + }, + "senderCommunicationIdentifier": { + "$ref": "#/definitions/CommunicationIdentifierModel" + }, + "deletedOn": { + "format": "date-time", + "description": "The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + }, + "editedOn": { + "format": "date-time", + "description": "The last timestamp (if applicable) when the message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + }, + "metadata": { + "description": "Message metadata.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ChatMessagesCollection": { + "description": "Collection of chat messages for a particular chat thread.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of chat messages.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatMessage" + } + }, + "nextLink": { + "description": "If there are more chat messages that can be retrieved, the next link will be populated.", + "type": "string", + "readOnly": true + } + } + }, + "UpdateChatMessageRequest": { + "description": "Request payload for updating a chat message.", + "type": "object", + "properties": { + "content": { + "description": "Chat message content.", + "type": "string", + "example": "Let's go for lunch together." + }, + "metadata": { + "description": "Message metadata.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ChatParticipantsCollection": { + "description": "Collection of participants belong to a particular thread.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Chat participants.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatParticipant" + } + }, + "nextLink": { + "description": "If there are more chat participants that can be retrieved, the next link will be populated.", + "type": "string", + "readOnly": true + } + } + }, + "AddChatParticipantsRequest": { + "description": "Participants to be added to the thread.", + "required": [ + "participants" + ], + "type": "object", + "properties": { + "participants": { + "description": "Participants to add to a chat thread.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatParticipant" + } + } + } + }, + "AddChatParticipantsResult": { + "description": "Result of the add chat participants operation.", + "type": "object", + "properties": { + "invalidParticipants": { + "description": "The participants that failed to be added to the chat thread.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationError" + }, + "readOnly": true + } + } + }, + "CreateChatThreadRequest": { + "description": "Request payload for creating a chat thread.", + "required": [ + "topic" + ], + "type": "object", + "properties": { + "topic": { + "description": "The chat thread topic.", + "type": "string", + "example": "Lunch Thread" + }, + "participants": { + "description": "Participants to be added to the chat thread.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatParticipant" + } + } + } + }, + "ChatThreadProperties": { + "description": "Chat thread.", + "required": [ + "createdByCommunicationIdentifier", + "createdOn", + "id", + "topic" + ], + "type": "object", + "properties": { + "id": { + "description": "Chat thread id.", + "type": "string", + "example": "19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2" + }, + "topic": { + "description": "Chat thread topic.", + "type": "string", + "example": "Lunch Chat thread" + }, + "createdOn": { + "format": "date-time", + "description": "The timestamp when the chat thread was created. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + }, + "createdByCommunicationIdentifier": { + "$ref": "#/definitions/CommunicationIdentifierModel" + }, + "deletedOn": { + "format": "date-time", + "description": "The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + } + } + }, + "CreateChatThreadResult": { + "description": "Result of the create chat thread operation.", + "type": "object", + "properties": { + "chatThread": { + "$ref": "#/definitions/ChatThreadProperties" + }, + "invalidParticipants": { + "description": "The participants that failed to be added to the chat thread.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationError" + }, + "readOnly": true + } + } + }, + "ChatThreadItem": { + "description": "Summary information of a chat thread.", + "required": [ + "id", + "topic" + ], + "type": "object", + "properties": { + "id": { + "description": "Chat thread id.", + "type": "string", + "example": "19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2" + }, + "topic": { + "description": "Chat thread topic.", + "type": "string", + "example": "Lunch Chat thread" + }, + "deletedOn": { + "format": "date-time", + "description": "The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "example": "2020-10-30T10:50:50Z" + }, + "lastMessageReceivedOn": { + "format": "date-time", + "description": "The timestamp when the last message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "readOnly": true, + "example": "2020-10-30T10:50:50Z" + } + } + }, + "ChatThreadsItemCollection": { + "description": "Collection of chat threads.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of chat threads.", + "type": "array", + "items": { + "$ref": "#/definitions/ChatThreadItem" + } + }, + "nextLink": { + "description": "If there are more chat threads that can be retrieved, the next link will be populated.", + "type": "string", + "readOnly": true + } + } + }, + "UpdateChatThreadRequest": { + "description": "Request payload for updating a chat thread.", + "type": "object", + "properties": { + "topic": { + "description": "Chat thread topic.", + "type": "string", + "example": "Lunch Thread" + } + } + }, + "SendTypingNotificationRequest": { + "description": "Request payload for typing notifications.", + "type": "object", + "properties": { + "senderDisplayName": { + "description": "The display name of the typing notification sender. This property is used to populate sender name for push notifications.", + "type": "string", + "example": "Bob Admin" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "Endpoint": { + "in": "path", + "name": "endpoint", + "description": "The endpoint of the Azure Communication resource.", + "required": true, + "type": "string", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + }, + "securityDefinitions": { + "Authorization": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "description": "An ACS (Azure Communication Services) user access token." + } + }, + "security": [ + { + "Authorization": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json new file mode 100644 index 000000000000..fed65da515ad --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "maxPageSize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "chatMessageId": "1591137790240", + "readOn": "2020-06-06T05:55:41.6460000Z" + }, + { + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "chatMessageId": "1591768249318", + "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=2021-09-07" + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json new file mode 100644 index 000000000000..7845c57fcf1a --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "sendReadReceiptRequest": { + "chatMessageId": "1591137790240" + } + }, + "responses": { + "200": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json new file mode 100644 index 000000000000..a65bb507616e --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "chatMessageId": "1591768249318" + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json new file mode 100644 index 000000000000..4da3c694d13a --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "chatMessageId": "1591768249318" + }, + "responses": { + "200": { + "body": { + "id": "1591768249318", + "sequenceId": "1", + "type": "text", + "version": "1599016601134", + "content": { + "message": "Let's head out for lunch in 15 minutes." + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-10T05:50:49.3180000Z", + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "metadata": { + "someKey1": "someValue1", + "someKey2": "someValue2" + } + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json new file mode 100644 index 000000000000..7a2489723e76 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json @@ -0,0 +1,157 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:453dafb77b26481ea2e73bcada0324af@thread.v2", + "maxPageSize": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "1593107077690", + "type": "text", + "version": "1593107077683", + "sequenceId": "5", + "content": { + "message": "So where should we get lunch from today?" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T17:44:37.6830000Z", + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + }, + { + "id": "1593107077683", + "type": "text", + "sequenceId": "4", + "version": "1593107077683", + "content": { + "message": "Let's use this chat to decide what to get for lunch today." + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T17:44:37.6830000Z", + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + }, + { + "id": "1593107046498", + "type": "text", + "sequenceId": "3", + "version": "1593107046498", + "content": { + "message": "Good morning everyone!" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T17:44:06.4980000Z", + "senderCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + }, + { + "id": "1593106976785", + "type": "topicUpdated", + "sequenceId": "2", + "version": "1593106976785", + "content": { + "initiatorCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "topic": "Lunch" + }, + "createdOn": "2020-06-25T17:42:56.7850000Z" + }, + { + "id": "1593106976753", + "type": "participantAdded", + "version": "1593106976753", + "sequenceId": "1", + "content": { + "initiatorCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "participants": [ + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + } + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce" + } + } + } + ] + }, + "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=2021-09-07" + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json new file mode 100644 index 000000000000..8dfec2a84cc4 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "sendChatMessageRequest": { + "content": "Let's head out for lunch in 15 minutes.", + "senderDisplayName": "Jane", + "metadata": { + "someKey1": "someValue1", + "someKey2": "someValue2" + } + } + }, + "responses": { + "201": { + "headers": { + "Location": "https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1593072104708" + }, + "body": { + "id": "1593072104708" + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json new file mode 100644 index 000000000000..1768292dac07 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "sendTypingNotificationRequest": { + "senderDisplayName": "Jane" + } + }, + "responses": { + "200": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json new file mode 100644 index 000000000000..0d2b58022f8b --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "content-type": "application/merge-patch+json", + "api-version": "2021-09-07", + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "chatMessageId": "1591768249318", + "updateChatMessageRequest": { + "content": "Updated message content", + "metadata": { + "someKey1": "someValue1", + "someKey2": "someValue2" + } + } + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json new file mode 100644 index 000000000000..28a67305f79f --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", + "addChatParticipantsRequest": { + "participants": [ + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "displayName": "Alex", + "shareHistoryTime": "2020-06-06T05:55:41Z" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "displayName": "Peter", + "shareHistoryTime": "2020-06-06T05:55:41Z" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce" + } + }, + "displayName": "Rama", + "shareHistoryTime": "2020-06-06T05:55:41Z" + } + ] + } + }, + "responses": { + "201": { + "body": { + "invalidParticipants": [ + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a", + "code": "403", + "message": "Permissions check failed" + }, + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b", + "code": "404", + "message": "Not found" + } + ] + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json new file mode 100644 index 000000000000..ee3dc32c7f6a --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", + "maxPageSize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "displayName": "Jane", + "shareHistoryTime": "2020-06-06T05:55:41Z" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "displayName": "Alex", + "shareHistoryTime": "2020-06-06T05:55:41Z" + } + ], + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/participants?skip=2&maxPageSize=2&api-version=2021-09-07" + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json new file mode 100644 index 000000000000..c1e84f4693ba --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", + "participantCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json new file mode 100644 index 000000000000..5975f2cc34c2 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "createChatThreadRequest": { + "topic": "Lunch", + "participants": [ + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "displayName": "Jane" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "displayName": "Alex" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a" + } + }, + "displayName": "Bob" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b" + } + }, + "displayName": "Peter" + } + ] + } + }, + "responses": { + "201": { + "headers": { + "Location": "https://contoso.westus.communications.azure.com/chat/threads/19%3Auni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2" + }, + "body": { + "chatThread": { + "id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "topic": "Lunch", + "createdOn": "2020-06-06T05:55:41.6460000Z", + "createdByCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + } + }, + "invalidParticipants": [ + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a", + "code": "403", + "message": "Permissions check failed" + }, + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b", + "code": "404", + "message": "Not found" + } + ] + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json new file mode 100644 index 000000000000..e889493e14f5 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "idempotency-token": "35dd6e71-251b-5e29-8376-ba93d09c3fbf", + "createChatThreadRequest": { + "topic": "Lunch", + "participants": [ + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "displayName": "Jane" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + }, + "displayName": "Alex" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a" + } + }, + "displayName": "Bob" + }, + { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b" + } + }, + "displayName": "Peter" + } + ] + } + }, + "responses": { + "201": { + "headers": { + "Location": "https://contoso.westus.communications.azure.com/chat/threads/19%3Auni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2" + }, + "body": { + "chatThread": { + "id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "topic": "Lunch", + "createdOn": "2020-06-06T05:55:41.6460000Z", + "createdByCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + } + }, + "invalidParticipants": [ + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a", + "code": "403", + "message": "Permissions check failed" + }, + { + "target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b", + "code": "404", + "message": "Not found" + } + ] + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json new file mode 100644 index 000000000000..bc86e5cbd962 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:9525281ac1f947fc884bcee1a9f983c2@thread.v2" + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json new file mode 100644 index 000000000000..d0bc79fef711 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2" + }, + "responses": { + "200": { + "body": { + "id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "topic": "Lunch", + "createdOn": "2020-06-06T05:55:41.6460000Z", + "createdByCommunicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + } + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json new file mode 100644 index 000000000000..01b493023f7c --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-09-07", + "maxPageSize": 5 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "topic": "Chat with Samantha", + "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" + }, + { + "id": "19:a0dfe5fc10e04a7f8d8a64d455f4196d@thread.v2", + "topic": "Presentation Brainstorming", + "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" + }, + { + "id": "19:uni01_n242d2bzammtwxiib7pbjtozeevjqzavzn654ku3dajocexfo2na@thread.v2", + "topic": "Chat with Alex", + "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" + }, + { + "id": "19:0062022a28be4e0983734f7e45cd8566@thread.v2", + "topic": "Lunch", + "deletedOn": "2020-07-07T05:55:41.6460000Z", + "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" + }, + { + "id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpe@thread.v2", + "topic": "Chat with Bob", + "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" + } + ], + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads?syncState=W3sic3RhcnQiOiIyMDIwLTA2LTIzVDIzOjMyOjQ3LjMwNSswMDowMCIsImVuZCI6IjIwMjAtMDYtMjVUMDY6NTY6MjMuNjk2KzAwOjAwIn0seyJzdGFydCI6IjE5NzAtMDEtMDFUMDA6MDA6MDArMDA6MDAiLCJlbmQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwKzAwOjAwIn1d&api-version=2021-09-07&maxPageSize=5" + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json new file mode 100644 index 000000000000..f16f1ca18ea3 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "content-type": "application/merge-patch+json", + "api-version": "2021-09-07", + "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", + "updateChatThreadRequest": { + "topic": "Updated Thread Topic" + } + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} From 473647635cde4e557c6eb9805eb3977d49bc4168 Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 10:44:51 -0800 Subject: [PATCH 2/6] Updates for preview7 --- .../communicationserviceschat.json | 88 ++++++++++++++++++- ...ions_ListChatReadReceiptsWithPageSize.json | 4 +- .../Conversations_SendChatReadReceipt.json | 2 +- .../examples/Messages_DeleteChatMessage.json | 2 +- .../examples/Messages_GetChatMessage.json | 2 +- ...Messages_ListChatMessagesWithPageSize.json | 19 ++-- .../examples/Messages_SendChatMessage.json | 2 +- .../Messages_SendTypingNotification.json | 2 +- .../examples/Messages_UpdateChatMessage.json | 2 +- .../Participants_AddChatParticipants.json | 17 +++- ...ants_ListChatParticipantsWithPageSize.json | 14 ++- .../Participants_RemoveChatParticipant.json | 2 +- .../Participants_UpdateChatParticipant.json | 54 ++++++++++++ .../examples/Threads_CreateChatThread.json | 2 +- ..._CreateChatThreadWithIdempotencyToken.json | 2 +- .../examples/Threads_DeleteChatThread.json | 2 +- .../examples/Threads_GetChatThread.json | 2 +- .../Threads_ListChatThreadsWithPageSize.json | 4 +- .../Threads_UpdateChatThreadTopic.json | 2 +- 19 files changed, 192 insertions(+), 32 deletions(-) create mode 100644 specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json index 2b2fa8731a14..e0500450a93f 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Communication Chat Service", "description": "Azure Communication Chat Service", - "version": "2021-09-07" + "version": "2021-10-01-preview7" }, "paths": { "/chat/threads/{chatThreadId}/readReceipts": { @@ -772,6 +772,81 @@ } } }, + "/chat/threads/{chatThreadId}/participants/:update": { + "post": { + "tags": [ + "Participants" + ], + "summary": "Update a participant from a thread.", + "operationId": "ChatThread_UpdateChatParticipant", + "consumes": [ + "application/json", + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "chatThreadId", + "description": "Id of the parent chat thread.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "chatParticipant", + "description": "ChatParticipant to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/ChatParticipant" + } + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "description": "Unauthorized.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "429": { + "description": "Too many requests.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "503": { + "description": "Service unavailable.", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Update participant": { + "$ref": "./examples/Participants_UpdateChatParticipant.json" + } + } + } + }, "/chat/threads": { "post": { "tags": [ @@ -1354,6 +1429,13 @@ "description": "Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", "type": "string", "example": "2020-10-30T10:50:50Z" + }, + "roleIds": { + "description": "Identifiers of roles for this chat participant", + "type": "array", + "items": { + "type": "string" + } } } }, @@ -1719,7 +1801,7 @@ }, "security": [ { - "Authorization": [] + "Authorization": [ ] } ], "x-ms-parameterized-host": { @@ -1731,4 +1813,4 @@ } ] } -} +} \ No newline at end of file diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json index fed65da515ad..9fbd3b6f1977 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_ListChatReadReceiptsWithPageSize.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", "maxPageSize": 2 }, @@ -30,7 +30,7 @@ "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=2021-09-07" + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/readReceipts?skip=2&maxPageSize=2&api-version=2021-10-01-preview7" } }, "401": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json index 7845c57fcf1a..6aa75df0bfb2 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Conversations_SendChatReadReceipt.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "sendReadReceiptRequest": { "chatMessageId": "1591137790240" diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json index a65bb507616e..dbaa9e72c120 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_DeleteChatMessage.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "chatMessageId": "1591768249318" }, diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json index 4da3c694d13a..61fe15f12c00 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_GetChatMessage.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "chatMessageId": "1591768249318" }, diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json index 7a2489723e76..bb818fab3a51 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_ListChatMessagesWithPageSize.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:453dafb77b26481ea2e73bcada0324af@thread.v2", "maxPageSize": 5 }, @@ -95,7 +95,10 @@ "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" } - } + }, + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] }, { "communicationIdentifier": { @@ -103,7 +106,10 @@ "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" } - } + }, + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] }, { "communicationIdentifier": { @@ -111,14 +117,17 @@ "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce" } - } + }, + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] } ] }, "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=2021-09-07" + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/messages?syncState=3e4700000031393a756e6930315f7a626e68336e74326466756666657a6333736f7837646f67377766686b36793571653272776c6e66686c68647a69726968647071407468726561642e763201451fe6e77201000004357fea72010000&startTime=0&maxPageSize=5&api-version=2021-10-01-preview7" } }, "401": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json index 8dfec2a84cc4..4634e341f155 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendChatMessage.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "sendChatMessageRequest": { "content": "Let's head out for lunch in 15 minutes.", diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json index 1768292dac07..a3ed2753e6cd 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_SendTypingNotification.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "sendTypingNotificationRequest": { "senderDisplayName": "Jane" diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json index 0d2b58022f8b..3b01b0320a7f 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Messages_UpdateChatMessage.json @@ -2,7 +2,7 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "content-type": "application/merge-patch+json", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "chatMessageId": "1591768249318", "updateChatMessageRequest": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json index 28a67305f79f..b8d24f505d2c 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_AddChatParticipants.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", "addChatParticipantsRequest": { "participants": [ @@ -13,7 +13,10 @@ } }, "displayName": "Alex", - "shareHistoryTime": "2020-06-06T05:55:41Z" + "shareHistoryTime": "2020-06-06T05:55:41Z", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] }, { "communicationIdentifier": { @@ -23,7 +26,10 @@ } }, "displayName": "Peter", - "shareHistoryTime": "2020-06-06T05:55:41Z" + "shareHistoryTime": "2020-06-06T05:55:41Z", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] }, { "communicationIdentifier": { @@ -33,7 +39,10 @@ } }, "displayName": "Rama", - "shareHistoryTime": "2020-06-06T05:55:41Z" + "shareHistoryTime": "2020-06-06T05:55:41Z", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] } ] } diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json index ee3dc32c7f6a..b15e10de0736 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_ListChatParticipantsWithPageSize.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", "maxPageSize": 2 }, @@ -17,7 +17,10 @@ } }, "displayName": "Jane", - "shareHistoryTime": "2020-06-06T05:55:41Z" + "shareHistoryTime": "2020-06-06T05:55:41Z", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] }, { "communicationIdentifier": { @@ -27,10 +30,13 @@ } }, "displayName": "Alex", - "shareHistoryTime": "2020-06-06T05:55:41Z" + "shareHistoryTime": "2020-06-06T05:55:41Z", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] } ], - "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/participants?skip=2&maxPageSize=2&api-version=2021-09-07" + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/participants?skip=2&maxPageSize=2&api-version=2021-10-01-preview7" } }, "401": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json index c1e84f4693ba..ae7e06906240 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_RemoveChatParticipant.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", "participantCommunicationIdentifier": { "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json new file mode 100644 index 000000000000..6d14e6d35ed3 --- /dev/null +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-01-preview7", + "chatThreadId": "19:f2167429acf6482880c6b7790a9086c1@thread.v2", + "chatParticipant": { + "communicationIdentifier": { + "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715", + "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715" + } + }, + "displayName": "Alex", + "roleIds": [ + "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" + ] + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } + } +} diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json index 5975f2cc34c2..d389841e9a67 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThread.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "createChatThreadRequest": { "topic": "Lunch", "participants": [ diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json index e889493e14f5..c61d69f7d776 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_CreateChatThreadWithIdempotencyToken.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "idempotency-token": "35dd6e71-251b-5e29-8376-ba93d09c3fbf", "createChatThreadRequest": { "topic": "Lunch", diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json index bc86e5cbd962..03e101cdef8e 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_DeleteChatThread.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:9525281ac1f947fc884bcee1a9f983c2@thread.v2" }, "responses": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json index d0bc79fef711..3d7572f1761e 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_GetChatThread.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2" }, "responses": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json index 01b493023f7c..c9c0f77d969f 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_ListChatThreadsWithPageSize.json @@ -1,7 +1,7 @@ { "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "maxPageSize": 5 }, "responses": { @@ -35,7 +35,7 @@ "lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z" } ], - "nextLink": "https://contoso.westus.communications.azure.com/chat/threads?syncState=W3sic3RhcnQiOiIyMDIwLTA2LTIzVDIzOjMyOjQ3LjMwNSswMDowMCIsImVuZCI6IjIwMjAtMDYtMjVUMDY6NTY6MjMuNjk2KzAwOjAwIn0seyJzdGFydCI6IjE5NzAtMDEtMDFUMDA6MDA6MDArMDA6MDAiLCJlbmQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwKzAwOjAwIn1d&api-version=2021-09-07&maxPageSize=5" + "nextLink": "https://contoso.westus.communications.azure.com/chat/threads?syncState=W3sic3RhcnQiOiIyMDIwLTA2LTIzVDIzOjMyOjQ3LjMwNSswMDowMCIsImVuZCI6IjIwMjAtMDYtMjVUMDY6NTY6MjMuNjk2KzAwOjAwIn0seyJzdGFydCI6IjE5NzAtMDEtMDFUMDA6MDA6MDArMDA6MDAiLCJlbmQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwKzAwOjAwIn1d&api-version=2021-10-01-preview7&maxPageSize=5" } }, "401": { diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json index f16f1ca18ea3..543bf20e146a 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Threads_UpdateChatThreadTopic.json @@ -2,7 +2,7 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "content-type": "application/merge-patch+json", - "api-version": "2021-09-07", + "api-version": "2021-10-01-preview7", "chatThreadId": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2", "updateChatThreadRequest": { "topic": "Updated Thread Topic" From fbfd670ed21dc252f1ffd79b27fcec48026573f5 Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 10:51:05 -0800 Subject: [PATCH 3/6] Update readme.md --- specification/communication/data-plane/Chat/readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/specification/communication/data-plane/Chat/readme.md b/specification/communication/data-plane/Chat/readme.md index c7dbb11db650..2af3bb49ff1e 100644 --- a/specification/communication/data-plane/Chat/readme.md +++ b/specification/communication/data-plane/Chat/readme.md @@ -106,6 +106,17 @@ title: Azure Communication Services ``` +### Tag: package-chat-2021-10-01-preview7 + +These settings apply only when `--tag=2021-10-01-preview7` is specified on the command line. + +```yaml $(tag) == 'package-chat-2021-10-01-preview7' +input-file: + - stable/2021-10-01-preview7/communicationserviceschat.json +title: + Azure Communication Services +``` + --- # Code Generation From 41183606e8044c9141d741087d185ffb83cf0daa Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 10:53:48 -0800 Subject: [PATCH 4/6] Prettier fix --- .../2021-10-01-preview7/communicationserviceschat.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json index e0500450a93f..5ca0e1526849 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/communicationserviceschat.json @@ -1801,7 +1801,7 @@ }, "security": [ { - "Authorization": [ ] + "Authorization": [] } ], "x-ms-parameterized-host": { @@ -1813,4 +1813,4 @@ } ] } -} \ No newline at end of file +} From 261ab7ebfcd410af7d52025e721ab50a9f2ddcb3 Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 11:18:35 -0800 Subject: [PATCH 5/6] Fix readme --- specification/communication/data-plane/Chat/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/communication/data-plane/Chat/readme.md b/specification/communication/data-plane/Chat/readme.md index 2af3bb49ff1e..56f3e4264c78 100644 --- a/specification/communication/data-plane/Chat/readme.md +++ b/specification/communication/data-plane/Chat/readme.md @@ -112,7 +112,7 @@ These settings apply only when `--tag=2021-10-01-preview7` is specified on the c ```yaml $(tag) == 'package-chat-2021-10-01-preview7' input-file: - - stable/2021-10-01-preview7/communicationserviceschat.json + - preview/2021-10-01-preview7/communicationserviceschat.json title: Azure Communication Services ``` From 0f996ee5afc5117ee174f5dafe0896849d17367c Mon Sep 17 00:00:00 2001 From: Po Tsang Date: Fri, 26 Nov 2021 11:31:34 -0800 Subject: [PATCH 6/6] Fix example for update-participant --- .../Participants_UpdateChatParticipant.json | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json index 6d14e6d35ed3..7ec7b3049b25 100644 --- a/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json +++ b/specification/communication/data-plane/Chat/preview/2021-10-01-preview7/examples/Participants_UpdateChatParticipant.json @@ -14,39 +14,39 @@ "roleIds": [ "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa" ] - }, - "responses": { - "204": {}, - "401": { - "body": { - "error": { - "code": "Unauthorized", - "message": "Request is not authorized." - } + } + }, + "responses": { + "204": {}, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." } - }, - "403": { - "body": { - "error": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." } - }, - "429": { - "body": { - "error": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." } - }, - "503": { - "body": { - "error": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." } } }