From 80f16ddfa104fe1923af75443abad5db143b5e6c Mon Sep 17 00:00:00 2001 From: Camilo Ramirez Date: Thu, 10 Jun 2021 09:11:20 -0700 Subject: [PATCH] Added support for optional user display name in typing notifications API. (#14746) Co-authored-by: Camilo Ramirez --- .../communicationserviceschat.json | 147 ++++++++++-------- .../Messages_SendTypingNotification.json | 5 +- 2 files changed, 89 insertions(+), 63 deletions(-) diff --git a/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/communicationserviceschat.json b/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/communicationserviceschat.json index 667c70287e62..09ddac82e7bc 100644 --- a/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/communicationserviceschat.json +++ b/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/communicationserviceschat.json @@ -537,68 +537,6 @@ } } }, - "/chat/threads/{chatThreadId}/typing": { - "post": { - "tags": [ - "Messages" - ], - "summary": "Posts a typing event to a thread, on behalf of a user.", - "operationId": "ChatThread_SendTypingNotification", - "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." - }, - "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" - } - } - } - }, "/chat/threads/{chatThreadId}/participants": { "get": { "tags": [ @@ -1183,6 +1121,80 @@ } } } + }, + "/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": { @@ -1665,6 +1677,17 @@ "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": { diff --git a/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/examples/Messages_SendTypingNotification.json b/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/examples/Messages_SendTypingNotification.json index c49f8efc76e7..5c1b7831993d 100644 --- a/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/examples/Messages_SendTypingNotification.json +++ b/specification/communication/data-plane/Chat/preview/2021-04-05-preview6/examples/Messages_SendTypingNotification.json @@ -2,7 +2,10 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-04-05-preview6", - "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" + "chatThreadId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "sendTypingNotificationRequest": { + "senderDisplayName": "Jane" + } }, "responses": { "200": {},